ok
Direktori : /home2/selectio/public_html/assets/vendor/plyr/ |
Current File : /home2/selectio/public_html/assets/vendor/plyr/plyr.polyfilled.min.js.map |
{"version":3,"sources":["plyr.polyfilled.js","node_modules/custom-event-polyfill/polyfill.js","node_modules/core-js/internals/global.js","node_modules/core-js/internals/internal-state.js","node_modules/core-js/internals/fails.js","node_modules/core-js/internals/descriptors.js","node_modules/core-js/internals/object-property-is-enumerable.js","node_modules/core-js/internals/create-property-descriptor.js","node_modules/core-js/internals/classof-raw.js","node_modules/core-js/internals/indexed-object.js","node_modules/core-js/internals/require-object-coercible.js","node_modules/core-js/internals/to-indexed-object.js","node_modules/core-js/internals/is-object.js","node_modules/core-js/internals/to-primitive.js","node_modules/core-js/internals/has.js","node_modules/core-js/internals/document-create-element.js","node_modules/core-js/internals/ie8-dom-define.js","node_modules/core-js/internals/object-get-own-property-descriptor.js","node_modules/core-js/internals/an-object.js","node_modules/core-js/internals/object-define-property.js","node_modules/core-js/internals/hide.js","node_modules/core-js/internals/set-global.js","node_modules/core-js/internals/shared.js","node_modules/core-js/internals/function-to-string.js","node_modules/core-js/internals/native-weak-map.js","node_modules/core-js/internals/uid.js","node_modules/core-js/internals/shared-key.js","node_modules/core-js/internals/hidden-keys.js","node_modules/core-js/internals/redefine.js","node_modules/core-js/internals/path.js","node_modules/core-js/internals/get-built-in.js","node_modules/core-js/internals/to-integer.js","node_modules/core-js/internals/to-length.js","node_modules/core-js/internals/to-absolute-index.js","node_modules/core-js/internals/array-includes.js","node_modules/core-js/internals/object-keys-internal.js","node_modules/core-js/internals/enum-bug-keys.js","node_modules/core-js/internals/object-get-own-property-names.js","node_modules/core-js/internals/object-get-own-property-symbols.js","node_modules/core-js/internals/own-keys.js","node_modules/core-js/internals/copy-constructor-properties.js","node_modules/core-js/internals/is-forced.js","node_modules/core-js/internals/export.js","node_modules/core-js/internals/native-symbol.js","node_modules/core-js/internals/is-array.js","node_modules/core-js/internals/to-object.js","node_modules/core-js/internals/object-keys.js","node_modules/core-js/internals/object-define-properties.js","node_modules/core-js/internals/html.js","node_modules/core-js/internals/object-create.js","node_modules/core-js/internals/object-get-own-property-names-external.js","node_modules/core-js/internals/well-known-symbol.js","node_modules/core-js/internals/wrapped-well-known-symbol.js","node_modules/core-js/internals/define-well-known-symbol.js","node_modules/core-js/internals/set-to-string-tag.js","node_modules/core-js/internals/a-function.js","node_modules/core-js/internals/bind-context.js","node_modules/core-js/internals/array-species-create.js","node_modules/core-js/internals/array-iteration.js","node_modules/core-js/modules/es.symbol.js","node_modules/core-js/modules/es.symbol.description.js","node_modules/core-js/modules/es.symbol.iterator.js","node_modules/core-js/internals/add-to-unscopables.js","node_modules/core-js/internals/iterators-core.js","node_modules/core-js/internals/iterators.js","node_modules/core-js/internals/correct-prototype-getter.js","node_modules/core-js/internals/object-get-prototype-of.js","node_modules/core-js/internals/create-iterator-constructor.js","node_modules/core-js/internals/object-set-prototype-of.js","node_modules/core-js/internals/a-possible-prototype.js","node_modules/core-js/internals/define-iterator.js","node_modules/core-js/modules/es.array.iterator.js","node_modules/core-js/internals/sloppy-array-method.js","node_modules/core-js/modules/es.array.join.js","node_modules/core-js/internals/create-property.js","node_modules/core-js/internals/array-method-has-species-support.js","node_modules/core-js/modules/es.array.slice.js","node_modules/core-js/internals/classof.js","node_modules/core-js/internals/object-to-string.js","node_modules/core-js/modules/es.object.to-string.js","node_modules/core-js/internals/regexp-flags.js","node_modules/core-js/modules/es.regexp.to-string.js","node_modules/core-js/internals/string-multibyte.js","node_modules/core-js/modules/es.string.iterator.js","node_modules/core-js/internals/regexp-exec.js","node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js","node_modules/core-js/internals/advance-string-index.js","node_modules/core-js/internals/regexp-exec-abstract.js","node_modules/core-js/modules/es.string.replace.js","node_modules/core-js/internals/same-value.js","node_modules/core-js/modules/es.string.search.js","node_modules/core-js/internals/is-regexp.js","node_modules/core-js/internals/species-constructor.js","node_modules/core-js/modules/es.string.split.js","node_modules/core-js/internals/dom-iterables.js","node_modules/core-js/internals/array-for-each.js","node_modules/core-js/modules/web.dom-collections.for-each.js","node_modules/core-js/modules/web.dom-collections.iterator.js","node_modules/core-js/internals/native-url.js","node_modules/core-js/internals/an-instance.js","node_modules/core-js/internals/object-assign.js","node_modules/core-js/internals/call-with-safe-iteration-closing.js","node_modules/core-js/internals/is-array-iterator-method.js","node_modules/core-js/internals/get-iterator-method.js","node_modules/core-js/internals/array-from.js","node_modules/core-js/internals/punycode-to-ascii.js","node_modules/core-js/internals/redefine-all.js","node_modules/core-js/internals/get-iterator.js","node_modules/core-js/modules/web.url-search-params.js","node_modules/core-js/modules/web.url.js","node_modules/url-polyfill/url-polyfill.js","node_modules/core-js/modules/es.array.concat.js","node_modules/core-js/modules/es.array.filter.js","node_modules/core-js/modules/es.array.find.js","node_modules/core-js/internals/check-correctness-of-iteration.js","node_modules/core-js/modules/es.array.from.js","node_modules/core-js/modules/es.array.includes.js","node_modules/core-js/modules/es.array.map.js","node_modules/core-js/internals/inherit-if-required.js","node_modules/core-js/internals/whitespaces.js","node_modules/core-js/internals/string-trim.js","node_modules/core-js/modules/es.number.constructor.js","node_modules/core-js/modules/es.object.keys.js","node_modules/core-js/internals/not-a-regexp.js","node_modules/core-js/internals/correct-is-regexp-logic.js","node_modules/core-js/modules/es.string.includes.js","node_modules/core-js/internals/freezing.js","node_modules/core-js/internals/internal-metadata.js","node_modules/core-js/internals/iterate.js","node_modules/core-js/internals/collection-weak.js","node_modules/core-js/modules/es.weak-map.js","node_modules/core-js/internals/collection.js","node_modules/core-js/modules/es.object.assign.js","node_modules/core-js/internals/forced-string-trim-method.js","node_modules/core-js/modules/es.string.trim.js","node_modules/core-js/internals/this-number-value.js","node_modules/core-js/internals/string-repeat.js","node_modules/core-js/modules/es.number.to-fixed.js","node_modules/core-js/internals/object-to-array.js","node_modules/core-js/modules/es.object.entries.js","node_modules/core-js/modules/es.object.values.js","node_modules/rangetouch/src/js/config.js","node_modules/core-js/modules/es.number.is-nan.js","node_modules/rangetouch/src/js/utils/is.js","node_modules/rangetouch/src/js/utils/numbers.js","node_modules/core-js/modules/es.string.match.js","node_modules/core-js/internals/task.js","node_modules/rangetouch/src/js/rangetouch.js","node_modules/rangetouch/src/js/utils/events.js","node_modules/rangetouch/src/js/utils/css.js","node_modules/core-js/internals/set-species.js","node_modules/core-js/internals/microtask.js","node_modules/core-js/internals/user-agent.js","node_modules/core-js/modules/es.promise.js","node_modules/core-js/internals/new-promise-capability.js","node_modules/core-js/internals/promise-resolve.js","node_modules/core-js/internals/perform.js","node_modules/core-js/internals/host-report-errors.js","node_modules/core-js/modules/es.string.starts-with.js","src/js/utils/is.js","src/js/utils/animation.js","src/js/utils/browser.js","src/js/utils/events.js","src/js/utils/objects.js","src/js/utils/elements.js","src/js/support.js","src/js/utils/style.js","src/js/html5.js","src/js/utils/arrays.js","node_modules/core-js/modules/es.regexp.constructor.js","src/js/utils/strings.js","src/js/utils/i18n.js","src/js/storage.js","src/js/utils/fetch.js","src/js/utils/load-sprite.js","node_modules/core-js/modules/es.math.trunc.js","src/js/utils/time.js","src/js/controls.js","src/js/utils/urls.js","src/js/captions.js","src/js/config/defaults.js","src/js/config/states.js","src/js/config/types.js","src/js/console.js","src/js/fullscreen.js","node_modules/core-js/internals/math-sign.js","src/js/utils/load-image.js","node_modules/core-js/modules/es.math.sign.js","src/js/ui.js","src/js/listeners.js","node_modules/core-js/modules/es.function.name.js","node_modules/core-js/modules/es.array.splice.js","node_modules/loadjs/dist/loadjs.umd.js","src/js/utils/load-script.js","src/js/plugins/vimeo.js","src/js/plugins/youtube.js","src/js/media.js","src/js/plugins/ads.js","node_modules/core-js/modules/es.array.find-index.js","src/js/plugins/preview-thumbnails.js","src/js/source.js","src/js/plyr.js","src/js/utils/numbers.js"],"names":["navigator","global","factory","exports","module","define","amd","self","Plyr","this","window","ce","CustomEvent","cancelable","preventDefault","defaultPrevented","Error","e","event","params","evt","origPrevent","bubbles","document","createEvent","initCustomEvent","detail","call","Object","defineProperty","get","prototype","Event","commonjsGlobal","globalThis","createCommonjsModule","fn","set","has","O","check","it","Math","global_1","Function","fails","exec","error","descriptors","a","nativePropertyIsEnumerable","propertyIsEnumerable","getOwnPropertyDescriptor","objectPropertyIsEnumerable","f","1","V","descriptor","enumerable","createPropertyDescriptor","bitmap","value","configurable","writable","toString","classofRaw","slice","split","indexedObject","classof","requireObjectCoercible","undefined","TypeError","toIndexedObject","IndexedObject","isObject","toPrimitive","input","PREFERRED_STRING","val","valueOf","hasOwnProperty","key","EXISTS","createElement","documentCreateElement","ie8DomDefine","DESCRIPTORS","nativeGetOwnPropertyDescriptor","objectGetOwnPropertyDescriptor","P","IE8_DOM_DEFINE","propertyIsEnumerableModule","anObject","String","nativeDefineProperty","objectDefineProperty","Attributes","hide","object","definePropertyModule","setGlobal","shared","store","push","version","mode","copyright","functionToString","WeakMap","nativeWeakMap","test","nativeFunctionToString","id","postfix","random","uid","keys","sharedKey","hiddenKeys","NATIVE_WEAK_MAP","wmget","wmhas","wmset","metadata","STATE","objectHas","internalState","enforce","getterFor","TYPE","state","type","redefine","getInternalState","InternalStateModule","enforceInternalState","TEMPLATE","options","unsafe","simple","noTargetGet","source","join","path","require$$0","aFunction","variable","getBuiltIn","namespace","method","arguments","length","ceil","floor","toInteger","argument","isNaN","min","toLength","max","toAbsoluteIndex","index","integer","createMethod","IS_INCLUDES","$this","el","fromIndex","arrayIncludes","includes","indexOf","objectKeysInternal","names","i","result","enumBugKeys","concat","objectGetOwnPropertyNames","getOwnPropertyNames","internalObjectKeys","objectGetOwnPropertySymbols","getOwnPropertySymbols","ownKeys","getOwnPropertyNamesModule","getOwnPropertySymbolsModule","copyConstructorProperties","target","getOwnPropertyDescriptorModule","replacement","isForced","feature","detection","data","normalize","POLYFILL","NATIVE","string","replace","toLowerCase","isForced_1","_export","targetProperty","sourceProperty","TARGET","GLOBAL","STATIC","stat","forced","sham","nativeSymbol","Symbol","isArray","Array","arg","toObject","objectKeys","objectDefineProperties","defineProperties","Properties","html","IE_PROTO","Empty","createDict","iframeDocument","iframe","style","display","appendChild","src","contentWindow","open","write","lt","close","F","objectCreate","create","nativeGetOwnPropertyNames","windowNames","objectGetOwnPropertyNamesExternal","getWindowNames","wellKnownSymbol","name","NATIVE_SYMBOL","wrappedWellKnownSymbol","defineWellKnownSymbol","NAME","wrappedWellKnownSymbolModule","TO_STRING_TAG","setToStringTag","TAG","aFunction$1","bindContext","that","b","c","apply","SPECIES","arraySpeciesCreate","originalArray","C","constructor","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","callbackfn","specificCreate","boundFunction","bind","arrayIteration","forEach","map","filter","some","every","find","findIndex","$forEach","HIDDEN","TO_PRIMITIVE","setInternalState","ObjectPrototype","$Symbol","JSON","nativeJSONStringify","stringify","getOwnPropertyNamesExternal","AllSymbols","ObjectPrototypeSymbols","StringToSymbolRegistry","SymbolToStringRegistry","WellKnownSymbolsStore","QObject","USE_SETTER","findChild","setSymbolDescriptor","nativeObjectCreate","ObjectPrototypeDescriptor","wrap","tag","description","symbol","isSymbol","iterator","$defineProperty","$defineProperties","properties","$getOwnPropertySymbols","$propertyIsEnumerable","$getOwnPropertyDescriptor","$getOwnPropertyNames","IS_OBJECT_PROTOTYPE","setter","$","for","keyFor","sym","useSetter","useSimple","replacer","$replacer","args","NativeSymbol","EmptyStringDescriptionStore","SymbolWrapper","symbolPrototype","symbolToString","native","regexp","desc","UNSCOPABLES","ArrayPrototype","IteratorPrototype","PrototypeOfArrayIteratorPrototype","arrayIterator","addToUnscopables","iterators","correctPrototypeGetter","getPrototypeOf","objectGetPrototypeOf","CORRECT_PROTOTYPE_GETTER","ITERATOR","BUGGY_SAFARI_ITERATORS","iteratorsCore","returnThis","createIteratorConstructor","IteratorConstructor","next","Iterators","objectSetPrototypeOf","setPrototypeOf","CORRECT_SETTER","proto","aPossiblePrototype","__proto__","IteratorsCore","defineIterator","Iterable","DEFAULT","IS_SET","FORCED","CurrentIteratorPrototype","methods","KEY","getIterationMethod","KIND","defaultIterator","IterablePrototype","INCORRECT_VALUES_NAME","nativeIterator","anyNativeIterator","entries","values","es_array_iterator","iterated","kind","done","Arguments","sloppyArrayMethod","METHOD_NAME","nativeJoin","ES3_STRINGS","SLOPPY_METHOD","separator","createProperty","propertyKey","arrayMethodHasSpeciesSupport","array","foo","Boolean","nativeSlice","start","end","Constructor","n","k","fin","CORRECT_ARGUMENTS","tryGet","callee","objectToString","regexpFlags","ignoreCase","multiline","dotAll","unicode","sticky","RegExpPrototype","RegExp","nativeToString","NOT_GENERIC","flags","INCORRECT_NAME","R","p","rf","CONVERT_TO_STRING","pos","first","second","S","position","size","charCodeAt","charAt","stringMultibyte","codeAt","point","nativeExec","nativeReplace","patchedExec","UPDATES_LAST_INDEX_WRONG","re1","re2","lastIndex","NPCG_INCLUDED","str","reCopy","match","re","regexpExec","REPLACE_SUPPORTS_NAMED_GROUPS","groups","SPLIT_WORKS_WITH_OVERWRITTEN_EXEC","originalExec","fixRegexpWellKnownSymbolLogic","SYMBOL","DELEGATES_TO_SYMBOL","DELEGATES_TO_EXEC","execCalled","nativeRegExpMethod","nativeMethod","arg2","forceStringMethod","stringMethod","regexMethod","advanceStringIndex","regexpExecAbstract","SUBSTITUTION_SYMBOLS","SUBSTITUTION_SYMBOLS_NO_NAMED","fixRegExpWellKnownSymbolLogic","REPLACE","maybeCallNative","searchValue","replaceValue","res","rx","functionalReplace","fullUnicode","results","regExpExec","accumulatedResult","nextSourcePosition","matched","captures","j","namedCaptures","replacerArgs","getSubstitution","tailPos","m","symbols","ch","capture","sameValue","is","x","y","SEARCH","nativeSearch","searcher","previousLastIndex","MATCH","isRegexp","isRegExp","speciesConstructor","defaultConstructor","arrayPush","SUPPORTS_Y","SPLIT","nativeSplit","internalSplit","limit","lim","lastLength","output","lastLastIndex","separatorCopy","splitter","unicodeMatching","callRegExpExec","q","A","z","domIterables","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","arrayForEach","COLLECTION_NAME","DOMIterables","Collection","CollectionPrototype","ArrayValues","ArrayIteratorMethods","nativeUrl","url","URL","searchParams","pathname","sort","href","URLSearchParams","username","host","hash","anInstance","nativeAssign","assign","objectAssign","B","chr","T","argumentsLength","callWithSafeIterationClosing","ENTRIES","returnMethod","isArrayIteratorMethod","getIteratorMethod","arrayFrom","arrayLike","step","mapfn","mapping","iteratorMethod","regexNonASCII","regexSeparators","OVERFLOW_ERROR","stringFromCharCode","fromCharCode","digitToBasic","digit","adapt","delta","numPoints","firstTime","baseMinusTMin","base","encode","currentValue","inputLength","counter","extra","ucs2decode","bias","basicLength","handledCPCount","handledCPCountPlusOne","RangeError","t","qMinusT","baseMinusT","redefineAll","getIterator","getInternalParamsState","getInternalIteratorState","URL_SEARCH_PARAMS","plus","sequences","percentSequence","bytes","percentDecode","sequence","decodeURIComponent","deserialize","!","'","(",")","~","%20","serialize","encodeURIComponent","parseSearchParams","query","attribute","entry","attributes","shift","updateSearchParams","validateArgumentsLength","passed","required","URLSearchParamsIterator","URLSearchParamsConstructor","entryIterator","init","updateURL","hasOwn","URLSearchParamsPrototype","append","delete","splice","getAll","found","entriesIndex","sliceIndex","callback","USE_NATIVE_URL","EOF","web_urlSearchParams","getState","require$$1","NativeURL","URLSearchParamsModule","getInternalSearchParamsState","getInternalURLState","pow","ALPHA","ALPHANUMERIC","DIGIT","HEX_START","OCT","DEC","HEX","FORBIDDEN_HOST_CODE_POINT","FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT","LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE","TAB_AND_NEW_LINE","parseHost","codePoints","parseIPv6","isSpecial","label","encoded","labels","toASCII","parseIPv4","percentEncode","C0ControlPercentEncodeSet","partsLength","numbers","part","radix","number","ipv4","parts","pop","parseInt","numbersSeen","ipv4Piece","swaps","swap","address","pieceIndex","compress","pointer","char","serializeHost","ignore0","unshift","ipv6","maxIndex","maxLength","currStart","currLength","findLongestZeroSequence","fragmentPercentEncodeSet"," ","\"","<",">","`","pathPercentEncodeSet","#","?","{","}","userinfoPercentEncodeSet","/",":",";","=","@","[","\\","]","^","|","code","specialSchemes","ftp","file","gopher","http","https","ws","wss","scheme","includesCredentials","password","cannotHaveUsernamePasswordPort","cannotBeABaseURL","isWindowsDriveLetter","normalized","startsWithWindowsDriveLetter","third","shortenURLsPath","pathSize","isSingleDot","segment","SCHEME_START","SCHEME","NO_SCHEME","SPECIAL_RELATIVE_OR_AUTHORITY","PATH_OR_AUTHORITY","RELATIVE","RELATIVE_SLASH","SPECIAL_AUTHORITY_SLASHES","SPECIAL_AUTHORITY_IGNORE_SLASHES","AUTHORITY","HOST","HOSTNAME","PORT","FILE","FILE_SLASH","FILE_HOST","PATH_START","PATH","CANNOT_BE_A_BASE_URL_PATH","QUERY","FRAGMENT","parseURL","stateOverride","bufferCodePoints","failure","buffer","seenAt","seenBracket","seenPasswordToken","port","fragment","codePoint","encodedCodePoints","URLConstructor","baseState","urlString","searchParamsState","serializeURL","origin","getOrigin","protocol","getProtocol","getUsername","getPassword","getHost","hostname","getHostname","getPort","getPathname","search","getSearch","getSearchParams","getHash","URLPrototype","accessorDescriptor","getter","nativeCreateObjectURL","createObjectURL","nativeRevokeObjectURL","revokeObjectURL","blob","_typeof","obj","_classCallCheck","instance","_defineProperties","props","_createClass","protoProps","staticProps","_defineProperty","_slicedToArray","arr","_arrayWithHoles","_arr","_n","_d","_e","_s","_i","err","_iterableToArrayLimit","_nonIterableRest","_toConsumableArray","arr2","_arrayWithoutHoles","iter","from","_iterableToArray","_nonIterableSpread","iteratorSupported","checkIfIteratorIsSupported","createIterator","items","serializeParam","deserializeParam","searchString","typeofSearchString","_fromString","_this","_entries","thisArg","searchArray","polyfillURLSearchParams","u","checkIfURLIsSupported","_URL","baseElement","doc","location","implementation","createHTMLDocument","head","anchorElement","body","enableSearchUpdate","enableSearchParamsUpdate","methodName","attributeName","_anchorElement","linkURLWithAnchorAttribute","_updateSearchParams","expectedPort","http:","https:","ftp:","addPortToOrigin","polyfillURL","setInterval","IS_CONCAT_SPREADABLE","IS_CONCAT_SPREADABLE_SUPPORT","SPECIES_SUPPORT","isConcatSpreadable","spreadable","len","E","$filter","$find","SKIPS_HOLES","SAFE_CLOSING","called","iteratorWithReturn","return","checkCorrectnessOfIteration","SKIP_CLOSING","ITERATION_SUPPORT","INCORRECT_ITERATION","iterable","$includes","$map","inheritIfRequired","dummy","Wrapper","NewTarget","NewTargetPrototype","whitespaces","whitespace","ltrim","rtrim","stringTrim","trim","require$$2","require$$3","NativeNumber","NumberPrototype","BROKEN_CLASSOF","toNumber","maxCode","digits","NaN","NumberWrapper","FAILS_ON_PRIMITIVES","nativeKeys","notARegexp","correctIsRegexpLogic","correctIsRegExpLogic","notARegExp","freezing","isExtensible","preventExtensions","internalMetadata","METADATA","setMetadata","objectID","weakData","meta","REQUIRED","fastKey","getWeakData","onFreeze","FREEZING","iterate_1","Result","stopped","AS_ENTRIES","IS_ITERATOR","iterFn","stop","internalStateGetterFor","ArrayIterationModule","uncaughtFrozenStore","frozen","UncaughtFrozenStore","findUncaughtFrozen","collectionWeak","getConstructor","wrapper","CONSTRUCTOR_NAME","ADDER","iterate","$has","add","InternalWeakMap","enforceIternalState","IS_IE11","ActiveXObject","$WeakMap","common","IS_WEAK","NativeConstructor","NativePrototype","exported","fixMethod","InternalMetadataModule","HASNT_CHAINING","THROWS_ON_PRIMITIVES","ACCEPT_ITERABLES","BUGGY_ZERO","$instance","clear","setStrong","collection","WeakMapPrototype","nativeDelete","nativeHas","nativeGet","nativeSet","$trim","forcedStringTrimMethod","stringRepeat","repeat","count","Infinity","nativeToFixed","toFixed","acc","fractionDigits","thisNumberValue","fractDigits","sign","multiply","c2","divide","dataToString","s","x2","log","TO_ENTRIES","objectToArray","$entries","$values","defaults","addCSS","thumbWidth","watch","instanceOf","isNullOrUndefined","isString","isNodeList","nullOrUndefined","Number","boolean","function","nodeList","element","Element","empty","round","places","parseFloat","nativeMatch","matcher","matchStr","defer","channel","RangeTouch","querySelector","rangeTouch","config","enabled","userSelect","webKitUserSelect","touchAction","listeners","toggle","percent","touch","changedTouches","getAttribute","clientRect","getBoundingClientRect","width","clientX","left","disabled","dispatchEvent","trigger","targets","querySelectorAll","MutationObserver","mutations","mutation","addedNodes","node","selector","observe","childList","subtree","documentElement","setSpecies","setImmediate","clearImmediate","process","MessageChannel","Dispatch","queue","run","runner","listener","post","postMessage","nextTick","now","port2","port1","onmessage","addEventListener","importScripts","removeChild","setTimeout","flush","last","notify","promise","task","userAgent","macrotask","WebKitMutationObserver","Promise","IS_NODE","queueMicrotaskDescriptor","queueMicrotask","parent","domain","exit","enter","createTextNode","characterData","resolve","then","Internal","OwnPromiseCapability","PromiseWrapper","microtask","PromiseCapability","reject","$$resolve","$$reject","newPromiseCapability","promiseResolve","promiseCapability","perform","PROMISE","getInternalPromiseState","PromiseConstructor","$fetch","fetch","versions","v8","newPromiseCapabilityModule","newGenericPromiseCapability","DISPATCH_EVENT","FakePromise","PromiseRejectionEvent","all","isThenable","isReject","notified","chain","reactions","ok","exited","reaction","handler","fail","rejection","onHandleUnhandled","onUnhandled","reason","initEvent","console","hostReportErrors","isUnhandled","emit","unwrap","internalReject","internalResolve","executor","onFulfilled","onRejected","catch","r","capability","FORCED$2","$promiseResolve","remaining","alreadyCalled","race","nativeStartsWith","startsWith","events","isEmpty","is$1","weakMap","textNode","Text","keyboardEvent","KeyboardEvent","cue","TextTrackCue","VTTCue","track","TextTrack","transitionEndEvent","WebkitTransition","MozTransition","OTransition","transition","repaint","delay","hidden","offsetHeight","browser","isIE","documentMode","isEdge","isWebkit","isIPhone","platform","isIos","supportsPassiveListeners","supported","removeEventListener","toggleListener","passive","eventListeners","on","off","once","_this2","onceCallback","_len","_key","triggerEvent","plyr","getDeep","reduce","extend","sources","elements","reverse","child","cloneNode","parentNode","sibling","nextSibling","insertBefore","setAttributes","_ref","_ref3","_ref4","setAttribute","text","innerText","insertElement","removeElement","emptyElement","childNodes","lastChild","replaceElement","newChild","oldChild","replaceChild","getAttributesFromSelector","sel","existingAttributes","existing","className","class","toggleHidden","toggleClass","force","classList","contains","hasClass","matches","getElements","container","getElement","setFocus","tabFocus","focus","preventScroll","classNames","range","defaultCodecs","audio/ogg","audio/wav","video/webm","video/mp4","video/ogg","support","audio","video","provider","playsinline","canPlayInline","api","ui","rangeInput","pip","webkitSetPresentationMode","pictureInPictureEnabled","disablePictureInPicture","airplay","WebKitPlaybackTargetAvailabilityEvent","mime","mediaType","isHTML5","media","canPlayType","textTracks","transitions","reducedMotion","matchMedia","validateRatio","reduceAspectRatio","ratio","_ratio","height","divider","getDivider","w","h","getAspectRatio","parse","embed","_this$media","videoWidth","videoHeight","setAspectRatio","isVideo","_ref2","padding","paddingBottom","isVimeo","offset","transform","videoFixedRatio","html5","getSources","getQualityOptions","player","_player$media","currentTime","paused","preload","readyState","play","load","quality","cancelRequests","blankVideo","debug","dedupe","item","NativeRegExp","CORRECT_NEW","RegExpWrapper","pattern","thisIsRegExp","patternIsRegExp","flagsAreUndefined","getFlags","proxy","format","replaceAll","toTitleCase","toUpperCase","substr","toCamelCase","toPascalCase","getHTML","innerHTML","resources","vimeo","youtube","i18n","{seektime}","seekTime","{title}","title","v","Storage","storage","localStorage","getItem","json","setItem","removeItem","responseType","request","XMLHttpRequest","responseText","response","status","send","loadSprite","hasId","exists","getElementById","update","insertAdjacentElement","useStorage","cached","content","trunc","getHours","getMinutes","getSeconds","formatTime","time","displayHours","inverted","hours","mins","secs","controls","getIconUrl","cors","iconUrl","svg4everybody","findElements","selectors","buttons","pause","restart","rewind","fastForward","mute","settings","captions","fullscreen","progress","inputs","seek","volume","duration","seekTooltip","tooltip","warn","toggleNativeControls","createIcon","iconPath","iconPrefix","icon","createElementNS","role","focusable","use","setAttributeNS","createLabel","attr","createBadge","badge","menu","createButton","buttonType","labelPressed","iconPressed","control","button","createRange","autocomplete","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","updateRangeFill","setup","createProgress","aria-hidden","suffixKey","played","suffix","createTime","attrs","bindMenuItemShortcuts","menuItem","which","stopPropagation","isRadioButton","showMenuPanel","nextElementSibling","firstElementChild","previousElementSibling","lastElementChild","focusFirstMenuItem","createMenuItem","_this3","list","_ref$badge","_ref$checked","checked","aria-checked","flex","children","currentTrack","speed","updateTimeDisplay","updateVolume","setRange","muted","pressed","updateProgress","_this4","current","getPercentage","getElementsByTagName","nodeValue","setProgress","buffered","setProperty","updateSeekTooltip","_this5","tooltips","visible","show","pageX","timeUpdate","invert","invertTime","seeking","durationUpdate","hasDuration","displayDuration","toggleMenuButton","setting","updateSetting","pane","panels","default","getLabel","setQualityMenu","_this6","checkMenu","getBadge","sorting","setCaptionsMenu","_this7","tracks","getTracks","toggled","language","setSpeedMenu","_this8","popup","firstItem","toggleMenu","composedPath","isMenuItem","getMenuSize","tab","clone","opacity","removeAttribute","scrollWidth","scrollHeight","_this9","restore","propertyName","setDownloadUrl","download","_this10","defaultAttributes","progressContainer","aria-haspopup","aria-controls","aria-expanded","inner","home","backButton","urls","isEmbed","inject","_this11","seektime","addProperty","controlPressed","_this$config","parseUrl","parser","buildUrlParams","isYouTube","insertAfter","languages","userLanguage","active","trackEvents","_this$captions","currentTrackNode","languageExists","updateCues","setLanguage","activeClass","findTrack","enableTextTrack","sortIsDefault","sorted","getCurrentTrack","cues","activeCues","getCueAsHTML","cueText","caption","autoplay","autopause","toggleInvert","clickToPlay","hideControls","resetOnEnd","disableContextMenu","loop","selected","keyboard","focused","fallback","iosNative","seekLabel","unmute","enableCaptions","disableCaptions","enterFullscreen","exitFullscreen","frameTitle","menuBack","normal","reset","advertisement","qualityBadge","2160","1440","1080","720","576","480","sdk","googleIMA","editable","embedContainer","poster","posterEnabled","ads","playing","loading","hover","isTouch","uiSupported","noTransition","previewThumbnails","thumbContainer","thumbContainerShown","imageContainer","timeContainer","scrubbingContainer","scrubbingContainerShown","publisherId","tagUrl","byline","portrait","transparent","noCookie","rel","showinfo","iv_load_policy","modestbranding","providers","types","noop","Console","onChange","keyCode","activeElement","shiftKey","toggleFallback","scrollPosition","scrollX","scrollY","scrollTo","overflow","viewport","property","hasProperty","cleanupViewport","Fullscreen","prefix","forceFallback","webkitEnterFullscreen","requestFullscreen","webkitExitFullscreen","action","cancelFullScreen","fullscreenElement","fullscreenEnabled","webkitFullscreenEnabled","mozFullScreenEnabled","msFullscreenEnabled","pre","mathSign","loadImage","minWidth","image","Image","onload","onerror","naturalWidth","addStyleHook","build","checkPlaying","ready","setTitle","setPoster","togglePoster","enable","backgroundImage","backgroundSize","toggleControls","checkLoading","clearTimeout","timers","controlsElement","recentTouchSeek","lastSeekTime","Date","Listeners","lastKey","focusTimer","lastKeyDown","handleKey","setTabFocus","firstTouch","altKey","ctrlKey","metaKey","togglePlay","increaseVolume","decreaseVolume","forward","toggleCaptions","usingNative","timeStamp","wasKeyDown","setPlayerSize","measure","rect","resized","_player$fullscreen","isEnter","_setPlayerSize","firstChild","_getAspectRatio$call2","videoX","videoY","maxWidth","margin","setGutter","hasAudio","isAudio","ended","proxyEvents","_event$detail","defaultHandler","customHandlerKey","customHandler","returned","hasCustomHandler","inputEvent","currentTarget","hasAttribute","seekTo","loaded","startMove","endMove","startScrubbing","endScrubbing","webkitDirectionInvertedFromDevice","_map2","deltaX","deltaY","direction","abs","FunctionPrototype","FunctionPrototypeToString","nameRE","deleteCount","insertCount","actualDeleteCount","to","actualStart","loadjs_umd","devnull","bundleIdCache","bundleResultCache","bundleCallbackQueue","publish","bundleId","pathsNotFound","executeCallbacks","depsNotFound","success","loadFile","callbackFn","numTries","isLegacyIECss","async","maxTries","numRetries","beforeCallbackFn","before","pathStripped","relList","as","onbeforeload","ev","sheet","cssText","loadjs","paths","arg1","loadFn","numWaiting","loadFiles","returnPromise","deps","bundleIds","subscribe","isDefined","loadScript","assurePlaybackState","hasPlayed","Vimeo","gesture","$2","thumbnail_large","Player","disableTextTrack","restorePause","setVolume","setCurrentTime","setPlaybackRate","currentSrc","setLoop","getVideoUrl","getVideoWidth","getVideoHeight","dimensions","_dimensions","setAutopause","getVideoTitle","getCurrentTime","getDuration","getTextTracks","_ref$cues","strippedCues","createDocumentFragment","stripHTML","getPaused","seconds","YT","onYouTubeIframeAPIReady","getTitle","videoId","currentId","posterSrc","playerVars","hl","disablekb","cc_load_policy","cc_lang_pref","widget_referrer","onError","message","2","5","100","101","150","onPlaybackRateChange","playbackRate","getPlaybackRate","onReady","playVideo","pauseVideo","stopVideo","getAvailablePlaybackRates","clearInterval","buffering","getVideoLoadedFraction","lastBuffered","onStateChange","unMute","Ads","initialized","displayContainer","manager","loader","cuePoints","safetyTimer","countdownTimer","managerPromise","google","ima","destroy","remove","startSafetyTimer","clearSafetyTimer","setupIMA","setVpaidMode","ImaSdkSettings","VpaidMode","ENABLED","setLocale","setDisableCustomPlaybackForIOS10Plus","AdDisplayContainer","requestAds","AdsLoader","AdsManagerLoadedEvent","Type","ADS_MANAGER_LOADED","onAdsManagerLoaded","AdErrorEvent","AD_ERROR","onAdError","AdsRequest","adTagUrl","linearAdSlotWidth","offsetWidth","linearAdSlotHeight","nonLinearAdSlotWidth","nonLinearAdSlotHeight","forceNonLinearFullSlot","setAdWillPlayMuted","getRemainingTime","AdsRenderingSettings","restoreCustomPlaybackStateOnAdBreakComplete","enablePreloading","getAdsManager","getCuePoints","AdEvent","onAdEvent","cuePoint","seekElement","cuePercentage","ad","getAd","adData","getAdData","LOADED","pollCountdown","isLinear","STARTED","ALL_ADS_COMPLETED","loadAds","CONTENT_PAUSE_REQUESTED","pauseContent","CONTENT_RESUME_REQUESTED","resumeContent","LOG","adError","getMessage","cancel","addCuePoints","contentComplete","seekedTime","discardAdBreak","resize","ViewMode","NORMAL","initialize","zIndex","_this12","handlers","_this13","AV_PUBLISHERID","AV_CHANNELID","AV_URL","cb","AV_WIDTH","AV_HEIGHT","AV_CDIM2","$findIndex","PreviewThumbnails","thumbnails","lastMouseMoveTime","mouseDown","loadedImages","thumb","scrubbing","getThumbnails","render","determineContainerAutoSizing","promises","getThumbnail","vttDataString","processedList","thumbnail","frames","frame","line","startTime","lineSplit","_lineSplit","_lineSplit$1$split2","matchTimes","endTime","urlPrefix","substring","lastIndexOf","tempImage","naturalHeight","percentage","mousePosX","showImageAtCurrentTime","toggleThumbContainer","toggleScrubbingContainer","lastTime","setScrubbingContainerSize","setThumbContainerSizeAndPos","thumbNum","hasThumb","qualityIndex","showingThumb","thumbFilename","thumbUrl","currentImageElement","dataset","filename","showImage","removeOldImages","loadingImage","usingSprites","previewImage","showingThumbFilename","newImage","setImageSizeAndOffset","currentImageContainer","preloadNearby","getHigherQuality","currentImage","tagName","removeDelay","deleting","oldThumbFilename","thumbnailsClone","foundOne","newThumbFilename","thumbURL","currentQualityIndex","previewImageHeight","thumbContainerHeight","clearShowing","clientHeight","sizeSpecifiedInCSS","thumbAspectRatio","setThumbContainerPos","seekbarRect","plyrRect","minVal","maxVal","right","clientWidth","previewPos","multiplier","top","currentScrubbingImageElement","currentThumbnailImageElement","insertElements","change","_sources$","_sources$$provider","crossorigin","failed","jQuery","original","getProviderByUrl","truthy","tabindex","webkitShowPlaybackTargetPicker","isHidden","hiding","eventName","soft","unload","inputIsValid","fauxDuration","realDuration","mozHasAudio","webkitAudioDecodedByteCount","audioTracks","minimumSpeed","maximumSpeed","clamp","updateStorage","prev","curr","closest","requestPictureInPicture","exitPictureInPicture","webkitPresentationMode","pictureInPictureElement","inline"],"mappings":"AAAqB,iBAAdA,WAA2B,SAAUC,EAAQC,GAC/B,iBAAZC,SAA0C,oBAAXC,OAAyBA,OAAOD,QAAUD,IAC9D,mBAAXG,QAAyBA,OAAOC,IAAMD,OAAO,OAAQH,IAC3D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5O,EACbxhC,KAAK6wC,MAAMmxB,0BACJhiE,KAAKowC,MAAQ5O,GACpB1gC,SAASmhE,0BzM+obnB5gE,IAAK,WyMtobH,OAAKsuC,GAAQS,IAKRpyB,GAAGsiB,MAAMtgC,KAAK6wC,MAAMqxB,wBAKlBliE,KAAK6wC,QAAU/vC,SAASqhE,wBAJpBniE,KAAK6wC,MAAMqxB,yBAA2B9xB,GALtC,QzMkpbX,CAAC,CACH3rC,IAAK,YACLrB,MAAO,SyM78aQuE,EAAMmoC,EAAUsyB,GAC7B,OAAOzyB,GAAQ5tC,MAAM4F,EAAMmoC,EAAUsyB,KzMq9atC,CACD39D,IAAK,aACLrB,MAAO,SyM/8aSif,EAAK7b,GACnB,OAAO6vC,GAAWh0B,EAAK7b,KzMu9axB,CACD/B,IAAK,QACLrB,MAAO,SyMj9aIw/B,GAAwB,IAAd36B,EAAca,UAAAC,OAAA,QAAAjF,IAAAgF,UAAA,GAAAA,UAAA,GAAJ,GACzBu5B,EAAU,KAUd,OARIrkB,GAAGpS,OAAOg3B,GACVP,EAAUz1B,MAAM6nB,KAAK3zB,SAASwhC,iBAAiBM,IACxC5kB,GAAGmiB,SAASyC,GACnBP,EAAUz1B,MAAM6nB,KAAKmO,GACd5kB,GAAGlG,MAAM8qB,KAChBP,EAAUO,EAASjyB,OAAOqN,GAAGoiB,UAG7BpiB,GAAGsiB,MAAM+B,GACF,KAGJA,EAAQ3xB,IAAI,SAAAgV,GAAC,OAAI,IAAI3lB,EAAK2lB,EAAGzd,SzMw9ajClI,EA1uCT,GAivCA,OyM39aFA,GAAKw/B,UtC1tCqB75B,GsC0tCA65B,GtCztCfjuB,KAAKugC,MAAMvgC,KAAKE,UAAU9L,MnKord5B3F","file":"plyr.polyfilled.min.js","sourcesContent":["typeof navigator === \"object\" && (function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define('Plyr', factory) :\n (global = global || self, global.Plyr = factory());\n}(this, function () { 'use strict';\n\n // Polyfill for creating CustomEvents on IE9/10/11\n // code pulled from:\n // https://github.com/d4tocchini/customevent-polyfill\n // https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent#Polyfill\n (function () {\n if (typeof window === 'undefined') {\n return;\n }\n\n try {\n var ce = new window.CustomEvent('test', {\n cancelable: true\n });\n ce.preventDefault();\n\n if (ce.defaultPrevented !== true) {\n // IE has problems with .preventDefault() on custom events\n // http://stackoverflow.com/questions/23349191\n throw new Error('Could not prevent default');\n }\n } catch (e) {\n var CustomEvent = function CustomEvent(event, params) {\n var evt, origPrevent;\n params = params || {};\n params.bubbles = !!params.bubbles;\n params.cancelable = !!params.cancelable;\n evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n origPrevent = evt.preventDefault;\n\n evt.preventDefault = function () {\n origPrevent.call(this);\n\n try {\n Object.defineProperty(this, 'defaultPrevented', {\n get: function get() {\n return true;\n }\n });\n } catch (e) {\n this.defaultPrevented = true;\n }\n };\n\n return evt;\n };\n\n CustomEvent.prototype = window.Event.prototype;\n window.CustomEvent = CustomEvent; // expose definition to window\n }\n })();\n\n var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\n function createCommonjsModule(fn, module) {\n \treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n }\n\n var O = 'object';\n var check = function (it) {\n return it && it.Math == Math && it;\n };\n\n // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\n var global_1 =\n // eslint-disable-next-line no-undef\n check(typeof globalThis == O && globalThis) ||\n check(typeof window == O && window) ||\n check(typeof self == O && self) ||\n check(typeof commonjsGlobal == O && commonjsGlobal) ||\n // eslint-disable-next-line no-new-func\n Function('return this')();\n\n var fails = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n };\n\n // Thank's IE8 for his funny defineProperty\n var descriptors = !fails(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n });\n\n var nativePropertyIsEnumerable = {}.propertyIsEnumerable;\n var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n // Nashorn ~ JDK8 bug\n var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);\n\n // `Object.prototype.propertyIsEnumerable` method implementation\n // https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable\n var f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n } : nativePropertyIsEnumerable;\n\n var objectPropertyIsEnumerable = {\n \tf: f\n };\n\n var createPropertyDescriptor = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n };\n\n var toString = {}.toString;\n\n var classofRaw = function (it) {\n return toString.call(it).slice(8, -1);\n };\n\n var split = ''.split;\n\n // fallback for non-array-like ES3 and non-enumerable old V8 strings\n var indexedObject = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins\n return !Object('z').propertyIsEnumerable(0);\n }) ? function (it) {\n return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);\n } : Object;\n\n // `RequireObjectCoercible` abstract operation\n // https://tc39.github.io/ecma262/#sec-requireobjectcoercible\n var requireObjectCoercible = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n };\n\n // toObject with fallback for non-array-like ES3 strings\n\n\n\n var toIndexedObject = function (it) {\n return indexedObject(requireObjectCoercible(it));\n };\n\n var isObject = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n };\n\n // `ToPrimitive` abstract operation\n // https://tc39.github.io/ecma262/#sec-toprimitive\n // instead of the ES6 spec version, we didn't implement @@toPrimitive case\n // and the second argument - flag - preferred type is a string\n var toPrimitive = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n };\n\n var hasOwnProperty = {}.hasOwnProperty;\n\n var has = function (it, key) {\n return hasOwnProperty.call(it, key);\n };\n\n var document$1 = global_1.document;\n // typeof document.createElement is 'object' in old IE\n var EXISTS = isObject(document$1) && isObject(document$1.createElement);\n\n var documentCreateElement = function (it) {\n return EXISTS ? document$1.createElement(it) : {};\n };\n\n // Thank's IE8 for his funny defineProperty\n var ie8DomDefine = !descriptors && !fails(function () {\n return Object.defineProperty(documentCreateElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n });\n\n var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n // `Object.getOwnPropertyDescriptor` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor\n var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (ie8DomDefine) try {\n return nativeGetOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);\n };\n\n var objectGetOwnPropertyDescriptor = {\n \tf: f$1\n };\n\n var anObject = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n } return it;\n };\n\n var nativeDefineProperty = Object.defineProperty;\n\n // `Object.defineProperty` method\n // https://tc39.github.io/ecma262/#sec-object.defineproperty\n var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (ie8DomDefine) try {\n return nativeDefineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n };\n\n var objectDefineProperty = {\n \tf: f$2\n };\n\n var hide = descriptors ? function (object, key, value) {\n return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));\n } : function (object, key, value) {\n object[key] = value;\n return object;\n };\n\n var setGlobal = function (key, value) {\n try {\n hide(global_1, key, value);\n } catch (error) {\n global_1[key] = value;\n } return value;\n };\n\n var isPure = false;\n\n var shared = createCommonjsModule(function (module) {\n var SHARED = '__core-js_shared__';\n var store = global_1[SHARED] || setGlobal(SHARED, {});\n\n (module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n })('versions', []).push({\n version: '3.1.3',\n mode: 'global',\n copyright: '© 2019 Denis Pushkarev (zloirock.ru)'\n });\n });\n\n var functionToString = shared('native-function-to-string', Function.toString);\n\n var WeakMap$1 = global_1.WeakMap;\n\n var nativeWeakMap = typeof WeakMap$1 === 'function' && /native code/.test(functionToString.call(WeakMap$1));\n\n var id = 0;\n var postfix = Math.random();\n\n var uid = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n };\n\n var keys = shared('keys');\n\n var sharedKey = function (key) {\n return keys[key] || (keys[key] = uid(key));\n };\n\n var hiddenKeys = {};\n\n var WeakMap$2 = global_1.WeakMap;\n var set, get, has$1;\n\n var enforce = function (it) {\n return has$1(it) ? get(it) : set(it, {});\n };\n\n var getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n };\n\n if (nativeWeakMap) {\n var store = new WeakMap$2();\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has$1 = function (it) {\n return wmhas.call(store, it);\n };\n } else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n hide(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return has(it, STATE) ? it[STATE] : {};\n };\n has$1 = function (it) {\n return has(it, STATE);\n };\n }\n\n var internalState = {\n set: set,\n get: get,\n has: has$1,\n enforce: enforce,\n getterFor: getterFor\n };\n\n var redefine = createCommonjsModule(function (module) {\n var getInternalState = internalState.get;\n var enforceInternalState = internalState.enforce;\n var TEMPLATE = String(functionToString).split('toString');\n\n shared('inspectSource', function (it) {\n return functionToString.call(it);\n });\n\n (module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n if (typeof value == 'function') {\n if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key);\n enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');\n }\n if (O === global_1) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else hide(O, key, value);\n // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n })(Function.prototype, 'toString', function toString() {\n return typeof this == 'function' && getInternalState(this).source || functionToString.call(this);\n });\n });\n\n var path = global_1;\n\n var aFunction = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n };\n\n var getBuiltIn = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])\n : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];\n };\n\n var ceil = Math.ceil;\n var floor = Math.floor;\n\n // `ToInteger` abstract operation\n // https://tc39.github.io/ecma262/#sec-tointeger\n var toInteger = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n };\n\n var min = Math.min;\n\n // `ToLength` abstract operation\n // https://tc39.github.io/ecma262/#sec-tolength\n var toLength = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n };\n\n var max = Math.max;\n var min$1 = Math.min;\n\n // Helper for a popular repeating case of the spec:\n // Let integer be ? ToInteger(index).\n // If integer < 0, let result be max((length + integer), 0); else let result be min(length, length).\n var toAbsoluteIndex = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min$1(integer, length);\n };\n\n // `Array.prototype.{ indexOf, includes }` methods implementation\n var createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n };\n\n var arrayIncludes = {\n // `Array.prototype.includes` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n };\n\n var indexOf = arrayIncludes.indexOf;\n\n\n var objectKeysInternal = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n };\n\n // IE8- don't enum bug keys\n var enumBugKeys = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n ];\n\n var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');\n\n // `Object.getOwnPropertyNames` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertynames\n var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return objectKeysInternal(O, hiddenKeys$1);\n };\n\n var objectGetOwnPropertyNames = {\n \tf: f$3\n };\n\n var f$4 = Object.getOwnPropertySymbols;\n\n var objectGetOwnPropertySymbols = {\n \tf: f$4\n };\n\n // all object keys, includes non-enumerable and symbols\n var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = objectGetOwnPropertyNames.f(anObject(it));\n var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n };\n\n var copyConstructorProperties = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = objectDefineProperty.f;\n var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n };\n\n var replacement = /#|\\.prototype\\./;\n\n var isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : typeof detection == 'function' ? fails(detection)\n : !!detection;\n };\n\n var normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n };\n\n var data = isForced.data = {};\n var NATIVE = isForced.NATIVE = 'N';\n var POLYFILL = isForced.POLYFILL = 'P';\n\n var isForced_1 = isForced;\n\n var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;\n\n\n\n\n\n\n /*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n */\n var _export = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global_1;\n } else if (STATIC) {\n target = global_1[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global_1[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor$1(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n hide(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n };\n\n var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {\n // Chrome 38 Symbol has incorrect toString conversion\n // eslint-disable-next-line no-undef\n return !String(Symbol());\n });\n\n // `IsArray` abstract operation\n // https://tc39.github.io/ecma262/#sec-isarray\n var isArray = Array.isArray || function isArray(arg) {\n return classofRaw(arg) == 'Array';\n };\n\n // `ToObject` abstract operation\n // https://tc39.github.io/ecma262/#sec-toobject\n var toObject = function (argument) {\n return Object(requireObjectCoercible(argument));\n };\n\n // `Object.keys` method\n // https://tc39.github.io/ecma262/#sec-object.keys\n var objectKeys = Object.keys || function keys(O) {\n return objectKeysInternal(O, enumBugKeys);\n };\n\n // `Object.defineProperties` method\n // https://tc39.github.io/ecma262/#sec-object.defineproperties\n var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);\n return O;\n };\n\n var html = getBuiltIn('document', 'documentElement');\n\n var IE_PROTO = sharedKey('IE_PROTO');\n\n var PROTOTYPE = 'prototype';\n var Empty = function () { /* empty */ };\n\n // Create object with fake `null` prototype: use iframe Object with cleared prototype\n var createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var length = enumBugKeys.length;\n var lt = '<';\n var script = 'script';\n var gt = '>';\n var js = 'java' + script + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n iframe.src = String(js);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];\n return createDict();\n };\n\n // `Object.create` method\n // https://tc39.github.io/ecma262/#sec-object.create\n var objectCreate = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : objectDefineProperties(result, Properties);\n };\n\n hiddenKeys[IE_PROTO] = true;\n\n var nativeGetOwnPropertyNames = objectGetOwnPropertyNames.f;\n\n var toString$1 = {}.toString;\n\n var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\n var getWindowNames = function (it) {\n try {\n return nativeGetOwnPropertyNames(it);\n } catch (error) {\n return windowNames.slice();\n }\n };\n\n // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\n var f$5 = function getOwnPropertyNames(it) {\n return windowNames && toString$1.call(it) == '[object Window]'\n ? getWindowNames(it)\n : nativeGetOwnPropertyNames(toIndexedObject(it));\n };\n\n var objectGetOwnPropertyNamesExternal = {\n \tf: f$5\n };\n\n var Symbol$1 = global_1.Symbol;\n var store$1 = shared('wks');\n\n var wellKnownSymbol = function (name) {\n return store$1[name] || (store$1[name] = nativeSymbol && Symbol$1[name]\n || (nativeSymbol ? Symbol$1 : uid)('Symbol.' + name));\n };\n\n var f$6 = wellKnownSymbol;\n\n var wrappedWellKnownSymbol = {\n \tf: f$6\n };\n\n var defineProperty = objectDefineProperty.f;\n\n var defineWellKnownSymbol = function (NAME) {\n var Symbol = path.Symbol || (path.Symbol = {});\n if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {\n value: wrappedWellKnownSymbol.f(NAME)\n });\n };\n\n var defineProperty$1 = objectDefineProperty.f;\n\n\n\n var TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\n var setToStringTag = function (it, TAG, STATIC) {\n if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {\n defineProperty$1(it, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n };\n\n var aFunction$1 = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n } return it;\n };\n\n // optional / simple context binding\n var bindContext = function (fn, that, length) {\n aFunction$1(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n };\n\n var SPECIES = wellKnownSymbol('species');\n\n // `ArraySpeciesCreate` abstract operation\n // https://tc39.github.io/ecma262/#sec-arrayspeciescreate\n var arraySpeciesCreate = function (originalArray, length) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);\n };\n\n var push = [].push;\n\n // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation\n var createMethod$1 = function (TYPE) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = indexedObject(O);\n var boundFunction = bindContext(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;\n var value, result;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3: return true; // some\n case 5: return value; // find\n case 6: return index; // findIndex\n case 2: push.call(target, value); // filter\n } else if (IS_EVERY) return false; // every\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n };\n\n var arrayIteration = {\n // `Array.prototype.forEach` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.foreach\n forEach: createMethod$1(0),\n // `Array.prototype.map` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.map\n map: createMethod$1(1),\n // `Array.prototype.filter` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.filter\n filter: createMethod$1(2),\n // `Array.prototype.some` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.some\n some: createMethod$1(3),\n // `Array.prototype.every` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.every\n every: createMethod$1(4),\n // `Array.prototype.find` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.find\n find: createMethod$1(5),\n // `Array.prototype.findIndex` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod$1(6)\n };\n\n var $forEach = arrayIteration.forEach;\n\n var HIDDEN = sharedKey('hidden');\n var SYMBOL = 'Symbol';\n var PROTOTYPE$1 = 'prototype';\n var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n var setInternalState = internalState.set;\n var getInternalState = internalState.getterFor(SYMBOL);\n var ObjectPrototype = Object[PROTOTYPE$1];\n var $Symbol = global_1.Symbol;\n var JSON$1 = global_1.JSON;\n var nativeJSONStringify = JSON$1 && JSON$1.stringify;\n var nativeGetOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;\n var nativeDefineProperty$1 = objectDefineProperty.f;\n var nativeGetOwnPropertyNames$1 = objectGetOwnPropertyNamesExternal.f;\n var nativePropertyIsEnumerable$1 = objectPropertyIsEnumerable.f;\n var AllSymbols = shared('symbols');\n var ObjectPrototypeSymbols = shared('op-symbols');\n var StringToSymbolRegistry = shared('string-to-symbol-registry');\n var SymbolToStringRegistry = shared('symbol-to-string-registry');\n var WellKnownSymbolsStore = shared('wks');\n var QObject = global_1.QObject;\n // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\n var USE_SETTER = !QObject || !QObject[PROTOTYPE$1] || !QObject[PROTOTYPE$1].findChild;\n\n // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\n var setSymbolDescriptor = descriptors && fails(function () {\n return objectCreate(nativeDefineProperty$1({}, 'a', {\n get: function () { return nativeDefineProperty$1(this, 'a', { value: 7 }).a; }\n })).a != 7;\n }) ? function (O, P, Attributes) {\n var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor$1(ObjectPrototype, P);\n if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];\n nativeDefineProperty$1(O, P, Attributes);\n if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {\n nativeDefineProperty$1(ObjectPrototype, P, ObjectPrototypeDescriptor);\n }\n } : nativeDefineProperty$1;\n\n var wrap = function (tag, description) {\n var symbol = AllSymbols[tag] = objectCreate($Symbol[PROTOTYPE$1]);\n setInternalState(symbol, {\n type: SYMBOL,\n tag: tag,\n description: description\n });\n if (!descriptors) symbol.description = description;\n return symbol;\n };\n\n var isSymbol = nativeSymbol && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n } : function (it) {\n return Object(it) instanceof $Symbol;\n };\n\n var $defineProperty = function defineProperty(O, P, Attributes) {\n if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);\n anObject(O);\n var key = toPrimitive(P, true);\n anObject(Attributes);\n if (has(AllSymbols, key)) {\n if (!Attributes.enumerable) {\n if (!has(O, HIDDEN)) nativeDefineProperty$1(O, HIDDEN, createPropertyDescriptor(1, {}));\n O[HIDDEN][key] = true;\n } else {\n if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;\n Attributes = objectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });\n } return setSymbolDescriptor(O, key, Attributes);\n } return nativeDefineProperty$1(O, key, Attributes);\n };\n\n var $defineProperties = function defineProperties(O, Properties) {\n anObject(O);\n var properties = toIndexedObject(Properties);\n var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));\n $forEach(keys, function (key) {\n if (!descriptors || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);\n });\n return O;\n };\n\n var $create = function create(O, Properties) {\n return Properties === undefined ? objectCreate(O) : $defineProperties(objectCreate(O), Properties);\n };\n\n var $propertyIsEnumerable = function propertyIsEnumerable(V) {\n var P = toPrimitive(V, true);\n var enumerable = nativePropertyIsEnumerable$1.call(this, P);\n if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;\n return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;\n };\n\n var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {\n var it = toIndexedObject(O);\n var key = toPrimitive(P, true);\n if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;\n var descriptor = nativeGetOwnPropertyDescriptor$1(it, key);\n if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {\n descriptor.enumerable = true;\n }\n return descriptor;\n };\n\n var $getOwnPropertyNames = function getOwnPropertyNames(O) {\n var names = nativeGetOwnPropertyNames$1(toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);\n });\n return result;\n };\n\n var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {\n var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;\n var names = nativeGetOwnPropertyNames$1(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {\n result.push(AllSymbols[key]);\n }\n });\n return result;\n };\n\n // `Symbol` constructor\n // https://tc39.github.io/ecma262/#sec-symbol-constructor\n if (!nativeSymbol) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');\n var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);\n var tag = uid(description);\n var setter = function (value) {\n if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));\n };\n if (descriptors && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });\n return wrap(tag, description);\n };\n\n redefine($Symbol[PROTOTYPE$1], 'toString', function toString() {\n return getInternalState(this).tag;\n });\n\n objectPropertyIsEnumerable.f = $propertyIsEnumerable;\n objectDefineProperty.f = $defineProperty;\n objectGetOwnPropertyDescriptor.f = $getOwnPropertyDescriptor;\n objectGetOwnPropertyNames.f = objectGetOwnPropertyNamesExternal.f = $getOwnPropertyNames;\n objectGetOwnPropertySymbols.f = $getOwnPropertySymbols;\n\n if (descriptors) {\n // https://github.com/tc39/proposal-Symbol-description\n nativeDefineProperty$1($Symbol[PROTOTYPE$1], 'description', {\n configurable: true,\n get: function description() {\n return getInternalState(this).description;\n }\n });\n {\n redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });\n }\n }\n\n wrappedWellKnownSymbol.f = function (name) {\n return wrap(wellKnownSymbol(name), name);\n };\n }\n\n _export({ global: true, wrap: true, forced: !nativeSymbol, sham: !nativeSymbol }, {\n Symbol: $Symbol\n });\n\n $forEach(objectKeys(WellKnownSymbolsStore), function (name) {\n defineWellKnownSymbol(name);\n });\n\n _export({ target: SYMBOL, stat: true, forced: !nativeSymbol }, {\n // `Symbol.for` method\n // https://tc39.github.io/ecma262/#sec-symbol.for\n 'for': function (key) {\n var string = String(key);\n if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];\n var symbol = $Symbol(string);\n StringToSymbolRegistry[string] = symbol;\n SymbolToStringRegistry[symbol] = string;\n return symbol;\n },\n // `Symbol.keyFor` method\n // https://tc39.github.io/ecma262/#sec-symbol.keyfor\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');\n if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];\n },\n useSetter: function () { USE_SETTER = true; },\n useSimple: function () { USE_SETTER = false; }\n });\n\n _export({ target: 'Object', stat: true, forced: !nativeSymbol, sham: !descriptors }, {\n // `Object.create` method\n // https://tc39.github.io/ecma262/#sec-object.create\n create: $create,\n // `Object.defineProperty` method\n // https://tc39.github.io/ecma262/#sec-object.defineproperty\n defineProperty: $defineProperty,\n // `Object.defineProperties` method\n // https://tc39.github.io/ecma262/#sec-object.defineproperties\n defineProperties: $defineProperties,\n // `Object.getOwnPropertyDescriptor` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor\n });\n\n _export({ target: 'Object', stat: true, forced: !nativeSymbol }, {\n // `Object.getOwnPropertyNames` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertynames\n getOwnPropertyNames: $getOwnPropertyNames,\n // `Object.getOwnPropertySymbols` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols\n getOwnPropertySymbols: $getOwnPropertySymbols\n });\n\n // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n // https://bugs.chromium.org/p/v8/issues/detail?id=3443\n _export({ target: 'Object', stat: true, forced: fails(function () { objectGetOwnPropertySymbols.f(1); }) }, {\n getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n return objectGetOwnPropertySymbols.f(toObject(it));\n }\n });\n\n // `JSON.stringify` method behavior with symbols\n // https://tc39.github.io/ecma262/#sec-json.stringify\n JSON$1 && _export({ target: 'JSON', stat: true, forced: !nativeSymbol || fails(function () {\n var symbol = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n return nativeJSONStringify([symbol]) != '[null]'\n // WebKit converts symbol values to JSON as null\n || nativeJSONStringify({ a: symbol }) != '{}'\n // V8 throws on boxed symbols\n || nativeJSONStringify(Object(symbol)) != '{}';\n }) }, {\n stringify: function stringify(it) {\n var args = [it];\n var index = 1;\n var replacer, $replacer;\n while (arguments.length > index) args.push(arguments[index++]);\n $replacer = replacer = args[1];\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return nativeJSONStringify.apply(JSON$1, args);\n }\n });\n\n // `Symbol.prototype[@@toPrimitive]` method\n // https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive\n if (!$Symbol[PROTOTYPE$1][TO_PRIMITIVE]) hide($Symbol[PROTOTYPE$1], TO_PRIMITIVE, $Symbol[PROTOTYPE$1].valueOf);\n // `Symbol.prototype[@@toStringTag]` property\n // https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag\n setToStringTag($Symbol, SYMBOL);\n\n hiddenKeys[HIDDEN] = true;\n\n var defineProperty$2 = objectDefineProperty.f;\n\n\n var NativeSymbol = global_1.Symbol;\n\n if (descriptors && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||\n // Safari 12 bug\n NativeSymbol().description !== undefined\n )) {\n var EmptyStringDescriptionStore = {};\n // wrap Symbol constructor for correct work with undefined description\n var SymbolWrapper = function Symbol() {\n var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);\n var result = this instanceof SymbolWrapper\n ? new NativeSymbol(description)\n // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'\n : description === undefined ? NativeSymbol() : NativeSymbol(description);\n if (description === '') EmptyStringDescriptionStore[result] = true;\n return result;\n };\n copyConstructorProperties(SymbolWrapper, NativeSymbol);\n var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;\n symbolPrototype.constructor = SymbolWrapper;\n\n var symbolToString = symbolPrototype.toString;\n var native = String(NativeSymbol('test')) == 'Symbol(test)';\n var regexp = /^Symbol\\((.*)\\)[^)]+$/;\n defineProperty$2(symbolPrototype, 'description', {\n configurable: true,\n get: function description() {\n var symbol = isObject(this) ? this.valueOf() : this;\n var string = symbolToString.call(symbol);\n if (has(EmptyStringDescriptionStore, symbol)) return '';\n var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');\n return desc === '' ? undefined : desc;\n }\n });\n\n _export({ global: true, forced: true }, {\n Symbol: SymbolWrapper\n });\n }\n\n // `Symbol.iterator` well-known symbol\n // https://tc39.github.io/ecma262/#sec-symbol.iterator\n defineWellKnownSymbol('iterator');\n\n var UNSCOPABLES = wellKnownSymbol('unscopables');\n var ArrayPrototype = Array.prototype;\n\n // Array.prototype[@@unscopables]\n // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\n if (ArrayPrototype[UNSCOPABLES] == undefined) {\n hide(ArrayPrototype, UNSCOPABLES, objectCreate(null));\n }\n\n // add a key to Array.prototype[@@unscopables]\n var addToUnscopables = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n };\n\n var iterators = {};\n\n var correctPrototypeGetter = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n return Object.getPrototypeOf(new F()) !== F.prototype;\n });\n\n var IE_PROTO$1 = sharedKey('IE_PROTO');\n var ObjectPrototype$1 = Object.prototype;\n\n // `Object.getPrototypeOf` method\n // https://tc39.github.io/ecma262/#sec-object.getprototypeof\n var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO$1)) return O[IE_PROTO$1];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectPrototype$1 : null;\n };\n\n var ITERATOR = wellKnownSymbol('iterator');\n var BUGGY_SAFARI_ITERATORS = false;\n\n var returnThis = function () { return this; };\n\n // `%IteratorPrototype%` object\n // https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object\n var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n if ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n }\n\n if (IteratorPrototype == undefined) IteratorPrototype = {};\n\n // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\n if (!has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);\n\n var iteratorsCore = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n };\n\n var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;\n\n\n\n\n\n var returnThis$1 = function () { return this; };\n\n var createIteratorConstructor = function (IteratorConstructor, NAME, next) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(1, next) });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false);\n iterators[TO_STRING_TAG] = returnThis$1;\n return IteratorConstructor;\n };\n\n var aPossiblePrototype = function (it) {\n if (!isObject(it) && it !== null) {\n throw TypeError(\"Can't set \" + String(it) + ' as a prototype');\n } return it;\n };\n\n // `Object.setPrototypeOf` method\n // https://tc39.github.io/ecma262/#sec-object.setprototypeof\n // Works with __proto__ only. Old v8 can't work with null proto objects.\n /* eslint-disable no-proto */\n var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n setter.call(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter.call(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n }() : undefined);\n\n var IteratorPrototype$2 = iteratorsCore.IteratorPrototype;\n var BUGGY_SAFARI_ITERATORS$1 = iteratorsCore.BUGGY_SAFARI_ITERATORS;\n var ITERATOR$1 = wellKnownSymbol('iterator');\n var KEYS = 'keys';\n var VALUES = 'values';\n var ENTRIES = 'entries';\n\n var returnThis$2 = function () { return this; };\n\n var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS$1 && KIND in IterablePrototype) return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n } return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR$1]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS$1 && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (IteratorPrototype$2 !== Object.prototype && CurrentIteratorPrototype.next) {\n if (objectGetPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype$2) {\n if (objectSetPrototypeOf) {\n objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2);\n } else if (typeof CurrentIteratorPrototype[ITERATOR$1] != 'function') {\n hide(CurrentIteratorPrototype, ITERATOR$1, returnThis$2);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);\n }\n }\n\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return nativeIterator.call(this); };\n }\n\n // define iterator\n if (IterablePrototype[ITERATOR$1] !== defaultIterator) {\n hide(IterablePrototype, ITERATOR$1, defaultIterator);\n }\n iterators[NAME] = defaultIterator;\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else _export({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME }, methods);\n }\n\n return methods;\n };\n\n var ARRAY_ITERATOR = 'Array Iterator';\n var setInternalState$1 = internalState.set;\n var getInternalState$1 = internalState.getterFor(ARRAY_ITERATOR);\n\n // `Array.prototype.entries` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.entries\n // `Array.prototype.keys` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.keys\n // `Array.prototype.values` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.values\n // `Array.prototype[@@iterator]` method\n // https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator\n // `CreateArrayIterator` internal method\n // https://tc39.github.io/ecma262/#sec-createarrayiterator\n var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState$1(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated), // target\n index: 0, // next index\n kind: kind // kind\n });\n // `%ArrayIteratorPrototype%.next` method\n // https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next\n }, function () {\n var state = getInternalState$1(this);\n var target = state.target;\n var kind = state.kind;\n var index = state.index++;\n if (!target || index >= target.length) {\n state.target = undefined;\n return { value: undefined, done: true };\n }\n if (kind == 'keys') return { value: index, done: false };\n if (kind == 'values') return { value: target[index], done: false };\n return { value: [index, target[index]], done: false };\n }, 'values');\n\n // argumentsList[@@iterator] is %ArrayProto_values%\n // https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject\n // https://tc39.github.io/ecma262/#sec-createmappedargumentsobject\n iterators.Arguments = iterators.Array;\n\n // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\n addToUnscopables('keys');\n addToUnscopables('values');\n addToUnscopables('entries');\n\n var sloppyArrayMethod = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !method || !fails(function () {\n // eslint-disable-next-line no-useless-call,no-throw-literal\n method.call(null, argument || function () { throw 1; }, 1);\n });\n };\n\n var nativeJoin = [].join;\n\n var ES3_STRINGS = indexedObject != Object;\n var SLOPPY_METHOD = sloppyArrayMethod('join', ',');\n\n // `Array.prototype.join` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.join\n _export({ target: 'Array', proto: true, forced: ES3_STRINGS || SLOPPY_METHOD }, {\n join: function join(separator) {\n return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);\n }\n });\n\n var createProperty = function (object, key, value) {\n var propertyKey = toPrimitive(key);\n if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));\n else object[propertyKey] = value;\n };\n\n var SPECIES$1 = wellKnownSymbol('species');\n\n var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {\n return !fails(function () {\n var array = [];\n var constructor = array.constructor = {};\n constructor[SPECIES$1] = function () {\n return { foo: 1 };\n };\n return array[METHOD_NAME](Boolean).foo !== 1;\n });\n };\n\n var SPECIES$2 = wellKnownSymbol('species');\n var nativeSlice = [].slice;\n var max$1 = Math.max;\n\n // `Array.prototype.slice` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.slice\n // fallback for not array-like ES3 strings and DOM objects\n _export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('slice') }, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n var Constructor, result, n;\n if (isArray(O)) {\n Constructor = O.constructor;\n // cross-realm fallback\n if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES$2];\n if (Constructor === null) Constructor = undefined;\n }\n if (Constructor === Array || Constructor === undefined) {\n return nativeSlice.call(O, k, fin);\n }\n }\n result = new (Constructor === undefined ? Array : Constructor)(max$1(fin - k, 0));\n for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n }\n });\n\n var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');\n // ES3 wrong here\n var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n // fallback for IE11 Script Access Denied error\n var tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n };\n\n // getting tag from ES6+ `Object.prototype.toString`\n var classof = function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;\n };\n\n var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');\n var test = {};\n\n test[TO_STRING_TAG$2] = 'z';\n\n // `Object.prototype.toString` method implementation\n // https://tc39.github.io/ecma262/#sec-object.prototype.tostring\n var objectToString = String(test) !== '[object z]' ? function toString() {\n return '[object ' + classof(this) + ']';\n } : test.toString;\n\n var ObjectPrototype$2 = Object.prototype;\n\n // `Object.prototype.toString` method\n // https://tc39.github.io/ecma262/#sec-object.prototype.tostring\n if (objectToString !== ObjectPrototype$2.toString) {\n redefine(ObjectPrototype$2, 'toString', objectToString, { unsafe: true });\n }\n\n // `RegExp.prototype.flags` getter implementation\n // https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags\n var regexpFlags = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.dotAll) result += 's';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n };\n\n var TO_STRING = 'toString';\n var RegExpPrototype = RegExp.prototype;\n var nativeToString = RegExpPrototype[TO_STRING];\n\n var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });\n // FF44- RegExp#toString has a wrong name\n var INCORRECT_NAME = nativeToString.name != TO_STRING;\n\n // `RegExp.prototype.toString` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring\n if (NOT_GENERIC || INCORRECT_NAME) {\n redefine(RegExp.prototype, TO_STRING, function toString() {\n var R = anObject(this);\n var p = String(R.source);\n var rf = R.flags;\n var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? regexpFlags.call(R) : rf);\n return '/' + p + '/' + f;\n }, { unsafe: true });\n }\n\n // `String.prototype.{ codePointAt, at }` methods implementation\n var createMethod$2 = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = String(requireObjectCoercible($this));\n var position = toInteger(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = S.charCodeAt(position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size\n || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF\n ? CONVERT_TO_STRING ? S.charAt(position) : first\n : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n };\n\n var stringMultibyte = {\n // `String.prototype.codePointAt` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod$2(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod$2(true)\n };\n\n var charAt = stringMultibyte.charAt;\n\n\n\n var STRING_ITERATOR = 'String Iterator';\n var setInternalState$2 = internalState.set;\n var getInternalState$2 = internalState.getterFor(STRING_ITERATOR);\n\n // `String.prototype[@@iterator]` method\n // https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator\n defineIterator(String, 'String', function (iterated) {\n setInternalState$2(this, {\n type: STRING_ITERATOR,\n string: String(iterated),\n index: 0\n });\n // `%StringIteratorPrototype%.next` method\n // https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next\n }, function next() {\n var state = getInternalState$2(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return { value: undefined, done: true };\n point = charAt(string, index);\n state.index += point.length;\n return { value: point, done: false };\n });\n\n var nativeExec = RegExp.prototype.exec;\n // This always refers to the native implementation, because the\n // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,\n // which loads this file before patching the method.\n var nativeReplace = String.prototype.replace;\n\n var patchedExec = nativeExec;\n\n var UPDATES_LAST_INDEX_WRONG = (function () {\n var re1 = /a/;\n var re2 = /b*/g;\n nativeExec.call(re1, 'a');\n nativeExec.call(re2, 'a');\n return re1.lastIndex !== 0 || re2.lastIndex !== 0;\n })();\n\n // nonparticipating capturing group, copied from es5-shim's String#split patch.\n var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\n\n var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;\n\n if (PATCH) {\n patchedExec = function exec(str) {\n var re = this;\n var lastIndex, reCopy, match, i;\n\n if (NPCG_INCLUDED) {\n reCopy = new RegExp('^' + re.source + '$(?!\\\\s)', regexpFlags.call(re));\n }\n if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;\n\n match = nativeExec.call(re, str);\n\n if (UPDATES_LAST_INDEX_WRONG && match) {\n re.lastIndex = re.global ? match.index + match[0].length : lastIndex;\n }\n if (NPCG_INCLUDED && match && match.length > 1) {\n // Fix browsers whose `exec` methods don't consistently return `undefined`\n // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n nativeReplace.call(match[0], reCopy, function () {\n for (i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n return match;\n };\n }\n\n var regexpExec = patchedExec;\n\n var SPECIES$3 = wellKnownSymbol('species');\n\n var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {\n // #replace needs built-in support for named groups.\n // #match works fine because it just return the exec results, even if it has\n // a \"grops\" property.\n var re = /./;\n re.exec = function () {\n var result = [];\n result.groups = { a: '7' };\n return result;\n };\n return ''.replace(re, '$<a>') !== '7';\n });\n\n // Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n // Weex JS has frozen built-in prototypes, so use try / catch wrapper\n var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {\n var re = /(?:)/;\n var originalExec = re.exec;\n re.exec = function () { return originalExec.apply(this, arguments); };\n var result = 'ab'.split(re);\n return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';\n });\n\n var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {\n var SYMBOL = wellKnownSymbol(KEY);\n\n var DELEGATES_TO_SYMBOL = !fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n });\n\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n re.exec = function () { execCalled = true; return null; };\n\n if (KEY === 'split') {\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n re.constructor[SPECIES$3] = function () { return re; };\n }\n\n re[SYMBOL]('');\n return !execCalled;\n });\n\n if (\n !DELEGATES_TO_SYMBOL ||\n !DELEGATES_TO_EXEC ||\n (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||\n (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)\n ) {\n var nativeRegExpMethod = /./[SYMBOL];\n var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {\n if (regexp.exec === regexpExec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };\n }\n return { done: true, value: nativeMethod.call(str, regexp, arg2) };\n }\n return { done: false };\n });\n var stringMethod = methods[0];\n var regexMethod = methods[1];\n\n redefine(String.prototype, KEY, stringMethod);\n redefine(RegExp.prototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) { return regexMethod.call(string, this, arg); }\n // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) { return regexMethod.call(string, this); }\n );\n if (sham) hide(RegExp.prototype[SYMBOL], 'sham', true);\n }\n };\n\n var charAt$1 = stringMultibyte.charAt;\n\n // `AdvanceStringIndex` abstract operation\n // https://tc39.github.io/ecma262/#sec-advancestringindex\n var advanceStringIndex = function (S, index, unicode) {\n return index + (unicode ? charAt$1(S, index).length : 1);\n };\n\n // `RegExpExec` abstract operation\n // https://tc39.github.io/ecma262/#sec-regexpexec\n var regexpExecAbstract = function (R, S) {\n var exec = R.exec;\n if (typeof exec === 'function') {\n var result = exec.call(R, S);\n if (typeof result !== 'object') {\n throw TypeError('RegExp exec method returned something other than an Object or null');\n }\n return result;\n }\n\n if (classofRaw(R) !== 'RegExp') {\n throw TypeError('RegExp#exec called on incompatible receiver');\n }\n\n return regexpExec.call(R, S);\n };\n\n var max$2 = Math.max;\n var min$2 = Math.min;\n var floor$1 = Math.floor;\n var SUBSTITUTION_SYMBOLS = /\\$([$&'`]|\\d\\d?|<[^>]*>)/g;\n var SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&'`]|\\d\\d?)/g;\n\n var maybeToString = function (it) {\n return it === undefined ? it : String(it);\n };\n\n // @@replace logic\n fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative) {\n return [\n // `String.prototype.replace` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = requireObjectCoercible(this);\n var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];\n return replacer !== undefined\n ? replacer.call(searchValue, O, replaceValue)\n : nativeReplace.call(String(O), searchValue, replaceValue);\n },\n // `RegExp.prototype[@@replace]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace\n function (regexp, replaceValue) {\n var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n\n var functionalReplace = typeof replaceValue === 'function';\n if (!functionalReplace) replaceValue = String(replaceValue);\n\n var global = rx.global;\n if (global) {\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n var results = [];\n while (true) {\n var result = regexpExecAbstract(rx, S);\n if (result === null) break;\n\n results.push(result);\n if (!global) break;\n\n var matchStr = String(result[0]);\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n }\n\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n\n var matched = String(result[0]);\n var position = max$2(min$2(toInteger(result.index), S.length), 0);\n var captures = [];\n // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n var namedCaptures = result.groups;\n if (functionalReplace) {\n var replacerArgs = [matched].concat(captures, position, S);\n if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n var replacement = String(replaceValue.apply(undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n if (position >= nextSourcePosition) {\n accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n return accumulatedResult + S.slice(nextSourcePosition);\n }\n ];\n\n // https://tc39.github.io/ecma262/#sec-getsubstitution\n function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n if (namedCaptures !== undefined) {\n namedCaptures = toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n return nativeReplace.call(replacement, symbols, function (match, ch) {\n var capture;\n switch (ch.charAt(0)) {\n case '$': return '$';\n case '&': return matched;\n case '`': return str.slice(0, position);\n case \"'\": return str.slice(tailPos);\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n default: // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n if (n > m) {\n var f = floor$1(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n capture = captures[n - 1];\n }\n return capture === undefined ? '' : capture;\n });\n }\n });\n\n // `SameValue` abstract operation\n // https://tc39.github.io/ecma262/#sec-samevalue\n var sameValue = Object.is || function is(x, y) {\n // eslint-disable-next-line no-self-compare\n return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n };\n\n // @@search logic\n fixRegexpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {\n return [\n // `String.prototype.search` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.search\n function search(regexp) {\n var O = requireObjectCoercible(this);\n var searcher = regexp == undefined ? undefined : regexp[SEARCH];\n return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));\n },\n // `RegExp.prototype[@@search]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search\n function (regexp) {\n var res = maybeCallNative(nativeSearch, regexp, this);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n\n var previousLastIndex = rx.lastIndex;\n if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;\n var result = regexpExecAbstract(rx, S);\n if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;\n return result === null ? -1 : result.index;\n }\n ];\n });\n\n var MATCH = wellKnownSymbol('match');\n\n // `IsRegExp` abstract operation\n // https://tc39.github.io/ecma262/#sec-isregexp\n var isRegexp = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');\n };\n\n var SPECIES$4 = wellKnownSymbol('species');\n\n // `SpeciesConstructor` abstract operation\n // https://tc39.github.io/ecma262/#sec-speciesconstructor\n var speciesConstructor = function (O, defaultConstructor) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES$4]) == undefined ? defaultConstructor : aFunction$1(S);\n };\n\n var arrayPush = [].push;\n var min$3 = Math.min;\n var MAX_UINT32 = 0xFFFFFFFF;\n\n // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError\n var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });\n\n // @@split logic\n fixRegexpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {\n var internalSplit;\n if (\n 'abbc'.split(/(b)*/)[1] == 'c' ||\n 'test'.split(/(?:)/, -1).length != 4 ||\n 'ab'.split(/(?:ab)*/).length != 2 ||\n '.'.split(/(.?)(.?)/).length != 4 ||\n '.'.split(/()()/).length > 1 ||\n ''.split(/.?/).length\n ) {\n // based on es5-shim implementation, need to rework it\n internalSplit = function (separator, limit) {\n var string = String(requireObjectCoercible(this));\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (separator === undefined) return [string];\n // If `separator` is not a regex, use native split\n if (!isRegexp(separator)) {\n return nativeSplit.call(string, separator, lim);\n }\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var match, lastIndex, lastLength;\n while (match = regexpExec.call(separatorCopy, string)) {\n lastIndex = separatorCopy.lastIndex;\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));\n lastLength = match[0].length;\n lastLastIndex = lastIndex;\n if (output.length >= lim) break;\n }\n if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop\n }\n if (lastLastIndex === string.length) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output.length > lim ? output.slice(0, lim) : output;\n };\n // Chakra, V8\n } else if ('0'.split(undefined, 0).length) {\n internalSplit = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);\n };\n } else internalSplit = nativeSplit;\n\n return [\n // `String.prototype.split` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = requireObjectCoercible(this);\n var splitter = separator == undefined ? undefined : separator[SPLIT];\n return splitter !== undefined\n ? splitter.call(separator, O, limit)\n : internalSplit.call(String(O), separator, limit);\n },\n // `RegExp.prototype[@@split]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (regexp, limit) {\n var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n var C = speciesConstructor(rx, RegExp);\n\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') +\n (rx.multiline ? 'm' : '') +\n (rx.unicode ? 'u' : '') +\n (SUPPORTS_Y ? 'y' : 'g');\n\n // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return regexpExecAbstract(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n while (q < S.length) {\n splitter.lastIndex = SUPPORTS_Y ? q : 0;\n var z = regexpExecAbstract(splitter, SUPPORTS_Y ? S : S.slice(q));\n var e;\n if (\n z === null ||\n (e = min$3(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p\n ) {\n q = advanceStringIndex(S, q, unicodeMatching);\n } else {\n A.push(S.slice(p, q));\n if (A.length === lim) return A;\n for (var i = 1; i <= z.length - 1; i++) {\n A.push(z[i]);\n if (A.length === lim) return A;\n }\n q = p = e;\n }\n }\n A.push(S.slice(p));\n return A;\n }\n ];\n }, !SUPPORTS_Y);\n\n // iterable DOM collections\n // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\n var domIterables = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n };\n\n var $forEach$1 = arrayIteration.forEach;\n\n\n // `Array.prototype.forEach` method implementation\n // https://tc39.github.io/ecma262/#sec-array.prototype.foreach\n var arrayForEach = sloppyArrayMethod('forEach') ? function forEach(callbackfn /* , thisArg */) {\n return $forEach$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n } : [].forEach;\n\n for (var COLLECTION_NAME in domIterables) {\n var Collection = global_1[COLLECTION_NAME];\n var CollectionPrototype = Collection && Collection.prototype;\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try {\n hide(CollectionPrototype, 'forEach', arrayForEach);\n } catch (error) {\n CollectionPrototype.forEach = arrayForEach;\n }\n }\n\n var ITERATOR$2 = wellKnownSymbol('iterator');\n var TO_STRING_TAG$3 = wellKnownSymbol('toStringTag');\n var ArrayValues = es_array_iterator.values;\n\n for (var COLLECTION_NAME$1 in domIterables) {\n var Collection$1 = global_1[COLLECTION_NAME$1];\n var CollectionPrototype$1 = Collection$1 && Collection$1.prototype;\n if (CollectionPrototype$1) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype$1[ITERATOR$2] !== ArrayValues) try {\n hide(CollectionPrototype$1, ITERATOR$2, ArrayValues);\n } catch (error) {\n CollectionPrototype$1[ITERATOR$2] = ArrayValues;\n }\n if (!CollectionPrototype$1[TO_STRING_TAG$3]) hide(CollectionPrototype$1, TO_STRING_TAG$3, COLLECTION_NAME$1);\n if (domIterables[COLLECTION_NAME$1]) for (var METHOD_NAME in es_array_iterator) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype$1[METHOD_NAME] !== es_array_iterator[METHOD_NAME]) try {\n hide(CollectionPrototype$1, METHOD_NAME, es_array_iterator[METHOD_NAME]);\n } catch (error) {\n CollectionPrototype$1[METHOD_NAME] = es_array_iterator[METHOD_NAME];\n }\n }\n }\n }\n\n var ITERATOR$3 = wellKnownSymbol('iterator');\n\n var nativeUrl = !fails(function () {\n var url = new URL('b?e=1', 'http://a');\n var searchParams = url.searchParams;\n url.pathname = 'c%20d';\n return (isPure && !url.toJSON)\n || !searchParams.sort\n || url.href !== 'http://a/c%20d?e=1'\n || searchParams.get('e') !== '1'\n || String(new URLSearchParams('?a=1')) !== 'a=1'\n || !searchParams[ITERATOR$3]\n // throws in Edge\n || new URL('https://a@b').username !== 'a'\n || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'\n // not punycoded in Edge\n || new URL('http://тест').host !== 'xn--e1aybc'\n // not escaped in Chrome 62-\n || new URL('http://a#б').hash !== '#%D0%B1';\n });\n\n var anInstance = function (it, Constructor, name) {\n if (!(it instanceof Constructor)) {\n throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n } return it;\n };\n\n var nativeAssign = Object.assign;\n\n // `Object.assign` method\n // https://tc39.github.io/ecma262/#sec-object.assign\n // should work with symbols and should have deterministic property order (V8 bug)\n var objectAssign = !nativeAssign || fails(function () {\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var symbol = Symbol();\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;\n }) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;\n var propertyIsEnumerable = objectPropertyIsEnumerable.f;\n while (argumentsLength > index) {\n var S = indexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key];\n }\n } return T;\n } : nativeAssign;\n\n // call something on iterator step with safe closing on error\n var callWithSafeIterationClosing = function (iterator, fn, value, ENTRIES) {\n try {\n return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (error) {\n var returnMethod = iterator['return'];\n if (returnMethod !== undefined) anObject(returnMethod.call(iterator));\n throw error;\n }\n };\n\n var ITERATOR$4 = wellKnownSymbol('iterator');\n var ArrayPrototype$1 = Array.prototype;\n\n // check on default Array iterator\n var isArrayIteratorMethod = function (it) {\n return it !== undefined && (iterators.Array === it || ArrayPrototype$1[ITERATOR$4] === it);\n };\n\n var ITERATOR$5 = wellKnownSymbol('iterator');\n\n var getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR$5]\n || it['@@iterator']\n || iterators[classof(it)];\n };\n\n // `Array.from` method implementation\n // https://tc39.github.io/ecma262/#sec-array.from\n var arrayFrom = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var index = 0;\n var iteratorMethod = getIteratorMethod(O);\n var length, result, step, iterator;\n if (mapping) mapfn = bindContext(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);\n // if the target is not iterable or it's an array with the default iterator - use a simple case\n if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {\n iterator = iteratorMethod.call(O);\n result = new C();\n for (;!(step = iterator.next()).done; index++) {\n createProperty(result, index, mapping\n ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true)\n : step.value\n );\n }\n } else {\n length = toLength(O.length);\n result = new C(length);\n for (;length > index; index++) {\n createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);\n }\n }\n result.length = index;\n return result;\n };\n\n // based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js\n var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n var base = 36;\n var tMin = 1;\n var tMax = 26;\n var skew = 38;\n var damp = 700;\n var initialBias = 72;\n var initialN = 128; // 0x80\n var delimiter = '-'; // '\\x2D'\n var regexNonASCII = /[^\\0-\\u007E]/; // non-ASCII chars\n var regexSeparators = /[.\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';\n var baseMinusTMin = base - tMin;\n var floor$2 = Math.floor;\n var stringFromCharCode = String.fromCharCode;\n\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.\n */\n var ucs2decode = function (string) {\n var output = [];\n var counter = 0;\n var length = string.length;\n while (counter < length) {\n var value = string.charCodeAt(counter++);\n if (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n // It's a high surrogate, and there is a next character.\n var extra = string.charCodeAt(counter++);\n if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n } else {\n // It's an unmatched surrogate; only append this code unit, in case the\n // next code unit is the high surrogate of a surrogate pair.\n output.push(value);\n counter--;\n }\n } else {\n output.push(value);\n }\n }\n return output;\n };\n\n /**\n * Converts a digit/integer into a basic code point.\n */\n var digitToBasic = function (digit) {\n // 0..25 map to ASCII a..z or A..Z\n // 26..35 map to ASCII 0..9\n return digit + 22 + 75 * (digit < 26);\n };\n\n /**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n */\n var adapt = function (delta, numPoints, firstTime) {\n var k = 0;\n delta = firstTime ? floor$2(delta / damp) : delta >> 1;\n delta += floor$2(delta / numPoints);\n for (; delta > baseMinusTMin * tMax >> 1; k += base) {\n delta = floor$2(delta / baseMinusTMin);\n }\n return floor$2(k + (baseMinusTMin + 1) * delta / (delta + skew));\n };\n\n /**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n */\n // eslint-disable-next-line max-statements\n var encode = function (input) {\n var output = [];\n\n // Convert the input in UCS-2 to an array of Unicode code points.\n input = ucs2decode(input);\n\n // Cache the length.\n var inputLength = input.length;\n\n // Initialize the state.\n var n = initialN;\n var delta = 0;\n var bias = initialBias;\n var i, currentValue;\n\n // Handle the basic code points.\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue < 0x80) {\n output.push(stringFromCharCode(currentValue));\n }\n }\n\n var basicLength = output.length; // number of basic code points.\n var handledCPCount = basicLength; // number of code points that have been handled;\n\n // Finish the basic string with a delimiter unless it's empty.\n if (basicLength) {\n output.push(delimiter);\n }\n\n // Main encoding loop:\n while (handledCPCount < inputLength) {\n // All non-basic code points < n have been handled already. Find the next larger one:\n var m = maxInt;\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue >= n && currentValue < m) {\n m = currentValue;\n }\n }\n\n // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.\n var handledCPCountPlusOne = handledCPCount + 1;\n if (m - n > floor$2((maxInt - delta) / handledCPCountPlusOne)) {\n throw RangeError(OVERFLOW_ERROR);\n }\n\n delta += (m - n) * handledCPCountPlusOne;\n n = m;\n\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue < n && ++delta > maxInt) {\n throw RangeError(OVERFLOW_ERROR);\n }\n if (currentValue == n) {\n // Represent delta as a generalized variable-length integer.\n var q = delta;\n for (var k = base; /* no condition */; k += base) {\n var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n if (q < t) break;\n var qMinusT = q - t;\n var baseMinusT = base - t;\n output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT)));\n q = floor$2(qMinusT / baseMinusT);\n }\n\n output.push(stringFromCharCode(digitToBasic(q)));\n bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n delta = 0;\n ++handledCPCount;\n }\n }\n\n ++delta;\n ++n;\n }\n return output.join('');\n };\n\n var punycodeToAscii = function (input) {\n var encoded = [];\n var labels = input.toLowerCase().replace(regexSeparators, '\\u002E').split('.');\n var i, label;\n for (i = 0; i < labels.length; i++) {\n label = labels[i];\n encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label);\n }\n return encoded.join('.');\n };\n\n var redefineAll = function (target, src, options) {\n for (var key in src) redefine(target, key, src[key], options);\n return target;\n };\n\n var getIterator = function (it) {\n var iteratorMethod = getIteratorMethod(it);\n if (typeof iteratorMethod != 'function') {\n throw TypeError(String(it) + ' is not iterable');\n } return anObject(iteratorMethod.call(it));\n };\n\n // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n var ITERATOR$6 = wellKnownSymbol('iterator');\n var URL_SEARCH_PARAMS = 'URLSearchParams';\n var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';\n var setInternalState$3 = internalState.set;\n var getInternalParamsState = internalState.getterFor(URL_SEARCH_PARAMS);\n var getInternalIteratorState = internalState.getterFor(URL_SEARCH_PARAMS_ITERATOR);\n\n var plus = /\\+/g;\n var sequences = Array(4);\n\n var percentSequence = function (bytes) {\n return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\\\da-f]{2}){' + bytes + '})', 'gi'));\n };\n\n var percentDecode = function (sequence) {\n try {\n return decodeURIComponent(sequence);\n } catch (error) {\n return sequence;\n }\n };\n\n var deserialize = function (it) {\n var result = it.replace(plus, ' ');\n var bytes = 4;\n try {\n return decodeURIComponent(result);\n } catch (error) {\n while (bytes) {\n result = result.replace(percentSequence(bytes--), percentDecode);\n }\n return result;\n }\n };\n\n var find = /[!'()~]|%20/g;\n\n var replace = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+'\n };\n\n var replacer = function (match) {\n return replace[match];\n };\n\n var serialize = function (it) {\n return encodeURIComponent(it).replace(find, replacer);\n };\n\n var parseSearchParams = function (result, query) {\n if (query) {\n var attributes = query.split('&');\n var index = 0;\n var attribute, entry;\n while (index < attributes.length) {\n attribute = attributes[index++];\n if (attribute.length) {\n entry = attribute.split('=');\n result.push({\n key: deserialize(entry.shift()),\n value: deserialize(entry.join('='))\n });\n }\n }\n }\n };\n\n var updateSearchParams = function (query) {\n this.entries.length = 0;\n parseSearchParams(this.entries, query);\n };\n\n var validateArgumentsLength = function (passed, required) {\n if (passed < required) throw TypeError('Not enough arguments');\n };\n\n var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {\n setInternalState$3(this, {\n type: URL_SEARCH_PARAMS_ITERATOR,\n iterator: getIterator(getInternalParamsState(params).entries),\n kind: kind\n });\n }, 'Iterator', function next() {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var step = state.iterator.next();\n var entry = step.value;\n if (!step.done) {\n step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];\n } return step;\n });\n\n // `URLSearchParams` constructor\n // https://url.spec.whatwg.org/#interface-urlsearchparams\n var URLSearchParamsConstructor = function URLSearchParams(/* init */) {\n anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n var init = arguments.length > 0 ? arguments[0] : undefined;\n var that = this;\n var entries = [];\n var iteratorMethod, iterator, step, entryIterator, first, second, key;\n\n setInternalState$3(that, {\n type: URL_SEARCH_PARAMS,\n entries: entries,\n updateURL: function () { /* empty */ },\n updateSearchParams: updateSearchParams\n });\n\n if (init !== undefined) {\n if (isObject(init)) {\n iteratorMethod = getIteratorMethod(init);\n if (typeof iteratorMethod === 'function') {\n iterator = iteratorMethod.call(init);\n while (!(step = iterator.next()).done) {\n entryIterator = getIterator(anObject(step.value));\n if (\n (first = entryIterator.next()).done ||\n (second = entryIterator.next()).done ||\n !entryIterator.next().done\n ) throw TypeError('Expected sequence with length 2');\n entries.push({ key: first.value + '', value: second.value + '' });\n }\n } else for (key in init) if (has(init, key)) entries.push({ key: key, value: init[key] + '' });\n } else {\n parseSearchParams(entries, typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : init + '');\n }\n }\n };\n\n var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;\n\n redefineAll(URLSearchParamsPrototype, {\n // `URLSearchParams.prototype.appent` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-append\n append: function append(name, value) {\n validateArgumentsLength(arguments.length, 2);\n var state = getInternalParamsState(this);\n state.entries.push({ key: name + '', value: value + '' });\n state.updateURL();\n },\n // `URLSearchParams.prototype.delete` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-delete\n 'delete': function (name) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var key = name + '';\n var index = 0;\n while (index < entries.length) {\n if (entries[index].key === key) entries.splice(index, 1);\n else index++;\n }\n state.updateURL();\n },\n // `URLSearchParams.prototype.get` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-get\n get: function get(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = name + '';\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) return entries[index].value;\n }\n return null;\n },\n // `URLSearchParams.prototype.getAll` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-getall\n getAll: function getAll(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = name + '';\n var result = [];\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) result.push(entries[index].value);\n }\n return result;\n },\n // `URLSearchParams.prototype.has` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-has\n has: function has(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = name + '';\n var index = 0;\n while (index < entries.length) {\n if (entries[index++].key === key) return true;\n }\n return false;\n },\n // `URLSearchParams.prototype.set` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-set\n set: function set(name, value) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var found = false;\n var key = name + '';\n var val = value + '';\n var index = 0;\n var entry;\n for (; index < entries.length; index++) {\n entry = entries[index];\n if (entry.key === key) {\n if (found) entries.splice(index--, 1);\n else {\n found = true;\n entry.value = val;\n }\n }\n }\n if (!found) entries.push({ key: key, value: val });\n state.updateURL();\n },\n // `URLSearchParams.prototype.sort` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-sort\n sort: function sort() {\n var state = getInternalParamsState(this);\n var entries = state.entries;\n // Array#sort is not stable in some engines\n var slice = entries.slice();\n var entry, entriesIndex, sliceIndex;\n entries.length = 0;\n for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) {\n entry = slice[sliceIndex];\n for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) {\n if (entries[entriesIndex].key > entry.key) {\n entries.splice(entriesIndex, 0, entry);\n break;\n }\n }\n if (entriesIndex === sliceIndex) entries.push(entry);\n }\n state.updateURL();\n },\n // `URLSearchParams.prototype.forEach` method\n forEach: function forEach(callback /* , thisArg */) {\n var entries = getInternalParamsState(this).entries;\n var boundFunction = bindContext(callback, arguments.length > 1 ? arguments[1] : undefined, 3);\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n boundFunction(entry.value, entry.key, this);\n }\n },\n // `URLSearchParams.prototype.keys` method\n keys: function keys() {\n return new URLSearchParamsIterator(this, 'keys');\n },\n // `URLSearchParams.prototype.values` method\n values: function values() {\n return new URLSearchParamsIterator(this, 'values');\n },\n // `URLSearchParams.prototype.entries` method\n entries: function entries() {\n return new URLSearchParamsIterator(this, 'entries');\n }\n }, { enumerable: true });\n\n // `URLSearchParams.prototype[@@iterator]` method\n redefine(URLSearchParamsPrototype, ITERATOR$6, URLSearchParamsPrototype.entries);\n\n // `URLSearchParams.prototype.toString` method\n // https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior\n redefine(URLSearchParamsPrototype, 'toString', function toString() {\n var entries = getInternalParamsState(this).entries;\n var result = [];\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n result.push(serialize(entry.key) + '=' + serialize(entry.value));\n } return result.join('&');\n }, { enumerable: true });\n\n setToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n\n _export({ global: true, forced: !nativeUrl }, {\n URLSearchParams: URLSearchParamsConstructor\n });\n\n var web_urlSearchParams = {\n URLSearchParams: URLSearchParamsConstructor,\n getState: getInternalParamsState\n };\n\n // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\n\n\n\n\n\n\n\n\n\n\n\n var codeAt = stringMultibyte.codeAt;\n\n\n\n\n\n var NativeURL = global_1.URL;\n var URLSearchParams$1 = web_urlSearchParams.URLSearchParams;\n var getInternalSearchParamsState = web_urlSearchParams.getState;\n var setInternalState$4 = internalState.set;\n var getInternalURLState = internalState.getterFor('URL');\n var floor$3 = Math.floor;\n var pow = Math.pow;\n\n var INVALID_AUTHORITY = 'Invalid authority';\n var INVALID_SCHEME = 'Invalid scheme';\n var INVALID_HOST = 'Invalid host';\n var INVALID_PORT = 'Invalid port';\n\n var ALPHA = /[A-Za-z]/;\n var ALPHANUMERIC = /[\\d+\\-.A-Za-z]/;\n var DIGIT = /\\d/;\n var HEX_START = /^(0x|0X)/;\n var OCT = /^[0-7]+$/;\n var DEC = /^\\d+$/;\n var HEX = /^[\\dA-Fa-f]+$/;\n // eslint-disable-next-line no-control-regex\n var FORBIDDEN_HOST_CODE_POINT = /[\\u0000\\u0009\\u000A\\u000D #%/:?@[\\\\]]/;\n // eslint-disable-next-line no-control-regex\n var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\\u0000\\u0009\\u000A\\u000D #/:?@[\\\\]]/;\n // eslint-disable-next-line no-control-regex\n var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\\u0000-\\u001F ]+|[\\u0000-\\u001F ]+$/g;\n // eslint-disable-next-line no-control-regex\n var TAB_AND_NEW_LINE = /[\\u0009\\u000A\\u000D]/g;\n var EOF;\n\n var parseHost = function (url, input) {\n var result, codePoints, index;\n if (input.charAt(0) == '[') {\n if (input.charAt(input.length - 1) != ']') return INVALID_HOST;\n result = parseIPv6(input.slice(1, -1));\n if (!result) return INVALID_HOST;\n url.host = result;\n // opaque host\n } else if (!isSpecial(url)) {\n if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST;\n result = '';\n codePoints = arrayFrom(input);\n for (index = 0; index < codePoints.length; index++) {\n result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);\n }\n url.host = result;\n } else {\n input = punycodeToAscii(input);\n if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST;\n result = parseIPv4(input);\n if (result === null) return INVALID_HOST;\n url.host = result;\n }\n };\n\n var parseIPv4 = function (input) {\n var parts = input.split('.');\n var partsLength, numbers, index, part, radix, number, ipv4;\n if (parts.length && parts[parts.length - 1] == '') {\n parts.pop();\n }\n partsLength = parts.length;\n if (partsLength > 4) return input;\n numbers = [];\n for (index = 0; index < partsLength; index++) {\n part = parts[index];\n if (part == '') return input;\n radix = 10;\n if (part.length > 1 && part.charAt(0) == '0') {\n radix = HEX_START.test(part) ? 16 : 8;\n part = part.slice(radix == 8 ? 1 : 2);\n }\n if (part === '') {\n number = 0;\n } else {\n if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input;\n number = parseInt(part, radix);\n }\n numbers.push(number);\n }\n for (index = 0; index < partsLength; index++) {\n number = numbers[index];\n if (index == partsLength - 1) {\n if (number >= pow(256, 5 - partsLength)) return null;\n } else if (number > 255) return null;\n }\n ipv4 = numbers.pop();\n for (index = 0; index < numbers.length; index++) {\n ipv4 += numbers[index] * pow(256, 3 - index);\n }\n return ipv4;\n };\n\n // eslint-disable-next-line max-statements\n var parseIPv6 = function (input) {\n var address = [0, 0, 0, 0, 0, 0, 0, 0];\n var pieceIndex = 0;\n var compress = null;\n var pointer = 0;\n var value, length, numbersSeen, ipv4Piece, number, swaps, swap;\n\n var char = function () {\n return input.charAt(pointer);\n };\n\n if (char() == ':') {\n if (input.charAt(1) != ':') return;\n pointer += 2;\n pieceIndex++;\n compress = pieceIndex;\n }\n while (char()) {\n if (pieceIndex == 8) return;\n if (char() == ':') {\n if (compress !== null) return;\n pointer++;\n pieceIndex++;\n compress = pieceIndex;\n continue;\n }\n value = length = 0;\n while (length < 4 && HEX.test(char())) {\n value = value * 16 + parseInt(char(), 16);\n pointer++;\n length++;\n }\n if (char() == '.') {\n if (length == 0) return;\n pointer -= length;\n if (pieceIndex > 6) return;\n numbersSeen = 0;\n while (char()) {\n ipv4Piece = null;\n if (numbersSeen > 0) {\n if (char() == '.' && numbersSeen < 4) pointer++;\n else return;\n }\n if (!DIGIT.test(char())) return;\n while (DIGIT.test(char())) {\n number = parseInt(char(), 10);\n if (ipv4Piece === null) ipv4Piece = number;\n else if (ipv4Piece == 0) return;\n else ipv4Piece = ipv4Piece * 10 + number;\n if (ipv4Piece > 255) return;\n pointer++;\n }\n address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;\n numbersSeen++;\n if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;\n }\n if (numbersSeen != 4) return;\n break;\n } else if (char() == ':') {\n pointer++;\n if (!char()) return;\n } else if (char()) return;\n address[pieceIndex++] = value;\n }\n if (compress !== null) {\n swaps = pieceIndex - compress;\n pieceIndex = 7;\n while (pieceIndex != 0 && swaps > 0) {\n swap = address[pieceIndex];\n address[pieceIndex--] = address[compress + swaps - 1];\n address[compress + --swaps] = swap;\n }\n } else if (pieceIndex != 8) return;\n return address;\n };\n\n var findLongestZeroSequence = function (ipv6) {\n var maxIndex = null;\n var maxLength = 1;\n var currStart = null;\n var currLength = 0;\n var index = 0;\n for (; index < 8; index++) {\n if (ipv6[index] !== 0) {\n if (currLength > maxLength) {\n maxIndex = currStart;\n maxLength = currLength;\n }\n currStart = null;\n currLength = 0;\n } else {\n if (currStart === null) currStart = index;\n ++currLength;\n }\n }\n if (currLength > maxLength) {\n maxIndex = currStart;\n maxLength = currLength;\n }\n return maxIndex;\n };\n\n var serializeHost = function (host) {\n var result, index, compress, ignore0;\n // ipv4\n if (typeof host == 'number') {\n result = [];\n for (index = 0; index < 4; index++) {\n result.unshift(host % 256);\n host = floor$3(host / 256);\n } return result.join('.');\n // ipv6\n } else if (typeof host == 'object') {\n result = '';\n compress = findLongestZeroSequence(host);\n for (index = 0; index < 8; index++) {\n if (ignore0 && host[index] === 0) continue;\n if (ignore0) ignore0 = false;\n if (compress === index) {\n result += index ? ':' : '::';\n ignore0 = true;\n } else {\n result += host[index].toString(16);\n if (index < 7) result += ':';\n }\n }\n return '[' + result + ']';\n } return host;\n };\n\n var C0ControlPercentEncodeSet = {};\n var fragmentPercentEncodeSet = objectAssign({}, C0ControlPercentEncodeSet, {\n ' ': 1, '\"': 1, '<': 1, '>': 1, '`': 1\n });\n var pathPercentEncodeSet = objectAssign({}, fragmentPercentEncodeSet, {\n '#': 1, '?': 1, '{': 1, '}': 1\n });\n var userinfoPercentEncodeSet = objectAssign({}, pathPercentEncodeSet, {\n '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\\\': 1, ']': 1, '^': 1, '|': 1\n });\n\n var percentEncode = function (char, set) {\n var code = codeAt(char, 0);\n return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char);\n };\n\n var specialSchemes = {\n ftp: 21,\n file: null,\n gopher: 70,\n http: 80,\n https: 443,\n ws: 80,\n wss: 443\n };\n\n var isSpecial = function (url) {\n return has(specialSchemes, url.scheme);\n };\n\n var includesCredentials = function (url) {\n return url.username != '' || url.password != '';\n };\n\n var cannotHaveUsernamePasswordPort = function (url) {\n return !url.host || url.cannotBeABaseURL || url.scheme == 'file';\n };\n\n var isWindowsDriveLetter = function (string, normalized) {\n var second;\n return string.length == 2 && ALPHA.test(string.charAt(0))\n && ((second = string.charAt(1)) == ':' || (!normalized && second == '|'));\n };\n\n var startsWithWindowsDriveLetter = function (string) {\n var third;\n return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && (\n string.length == 2 ||\n ((third = string.charAt(2)) === '/' || third === '\\\\' || third === '?' || third === '#')\n );\n };\n\n var shortenURLsPath = function (url) {\n var path = url.path;\n var pathSize = path.length;\n if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {\n path.pop();\n }\n };\n\n var isSingleDot = function (segment) {\n return segment === '.' || segment.toLowerCase() === '%2e';\n };\n\n var isDoubleDot = function (segment) {\n segment = segment.toLowerCase();\n return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';\n };\n\n // States:\n var SCHEME_START = {};\n var SCHEME = {};\n var NO_SCHEME = {};\n var SPECIAL_RELATIVE_OR_AUTHORITY = {};\n var PATH_OR_AUTHORITY = {};\n var RELATIVE = {};\n var RELATIVE_SLASH = {};\n var SPECIAL_AUTHORITY_SLASHES = {};\n var SPECIAL_AUTHORITY_IGNORE_SLASHES = {};\n var AUTHORITY = {};\n var HOST = {};\n var HOSTNAME = {};\n var PORT = {};\n var FILE = {};\n var FILE_SLASH = {};\n var FILE_HOST = {};\n var PATH_START = {};\n var PATH = {};\n var CANNOT_BE_A_BASE_URL_PATH = {};\n var QUERY = {};\n var FRAGMENT = {};\n\n // eslint-disable-next-line max-statements\n var parseURL = function (url, input, stateOverride, base) {\n var state = stateOverride || SCHEME_START;\n var pointer = 0;\n var buffer = '';\n var seenAt = false;\n var seenBracket = false;\n var seenPasswordToken = false;\n var codePoints, char, bufferCodePoints, failure;\n\n if (!stateOverride) {\n url.scheme = '';\n url.username = '';\n url.password = '';\n url.host = null;\n url.port = null;\n url.path = [];\n url.query = null;\n url.fragment = null;\n url.cannotBeABaseURL = false;\n input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');\n }\n\n input = input.replace(TAB_AND_NEW_LINE, '');\n\n codePoints = arrayFrom(input);\n\n while (pointer <= codePoints.length) {\n char = codePoints[pointer];\n switch (state) {\n case SCHEME_START:\n if (char && ALPHA.test(char)) {\n buffer += char.toLowerCase();\n state = SCHEME;\n } else if (!stateOverride) {\n state = NO_SCHEME;\n continue;\n } else return INVALID_SCHEME;\n break;\n\n case SCHEME:\n if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) {\n buffer += char.toLowerCase();\n } else if (char == ':') {\n if (stateOverride && (\n (isSpecial(url) != has(specialSchemes, buffer)) ||\n (buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||\n (url.scheme == 'file' && !url.host)\n )) return;\n url.scheme = buffer;\n if (stateOverride) {\n if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null;\n return;\n }\n buffer = '';\n if (url.scheme == 'file') {\n state = FILE;\n } else if (isSpecial(url) && base && base.scheme == url.scheme) {\n state = SPECIAL_RELATIVE_OR_AUTHORITY;\n } else if (isSpecial(url)) {\n state = SPECIAL_AUTHORITY_SLASHES;\n } else if (codePoints[pointer + 1] == '/') {\n state = PATH_OR_AUTHORITY;\n pointer++;\n } else {\n url.cannotBeABaseURL = true;\n url.path.push('');\n state = CANNOT_BE_A_BASE_URL_PATH;\n }\n } else if (!stateOverride) {\n buffer = '';\n state = NO_SCHEME;\n pointer = 0;\n continue;\n } else return INVALID_SCHEME;\n break;\n\n case NO_SCHEME:\n if (!base || (base.cannotBeABaseURL && char != '#')) return INVALID_SCHEME;\n if (base.cannotBeABaseURL && char == '#') {\n url.scheme = base.scheme;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n url.cannotBeABaseURL = true;\n state = FRAGMENT;\n break;\n }\n state = base.scheme == 'file' ? FILE : RELATIVE;\n continue;\n\n case SPECIAL_RELATIVE_OR_AUTHORITY:\n if (char == '/' && codePoints[pointer + 1] == '/') {\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n pointer++;\n } else {\n state = RELATIVE;\n continue;\n } break;\n\n case PATH_OR_AUTHORITY:\n if (char == '/') {\n state = AUTHORITY;\n break;\n } else {\n state = PATH;\n continue;\n }\n\n case RELATIVE:\n url.scheme = base.scheme;\n if (char == EOF) {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = base.query;\n } else if (char == '/' || (char == '\\\\' && isSpecial(url))) {\n state = RELATIVE_SLASH;\n } else if (char == '?') {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n state = FRAGMENT;\n } else {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.path.pop();\n state = PATH;\n continue;\n } break;\n\n case RELATIVE_SLASH:\n if (isSpecial(url) && (char == '/' || char == '\\\\')) {\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n } else if (char == '/') {\n state = AUTHORITY;\n } else {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n state = PATH;\n continue;\n } break;\n\n case SPECIAL_AUTHORITY_SLASHES:\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n if (char != '/' || buffer.charAt(pointer + 1) != '/') continue;\n pointer++;\n break;\n\n case SPECIAL_AUTHORITY_IGNORE_SLASHES:\n if (char != '/' && char != '\\\\') {\n state = AUTHORITY;\n continue;\n } break;\n\n case AUTHORITY:\n if (char == '@') {\n if (seenAt) buffer = '%40' + buffer;\n seenAt = true;\n bufferCodePoints = arrayFrom(buffer);\n for (var i = 0; i < bufferCodePoints.length; i++) {\n var codePoint = bufferCodePoints[i];\n if (codePoint == ':' && !seenPasswordToken) {\n seenPasswordToken = true;\n continue;\n }\n var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);\n if (seenPasswordToken) url.password += encodedCodePoints;\n else url.username += encodedCodePoints;\n }\n buffer = '';\n } else if (\n char == EOF || char == '/' || char == '?' || char == '#' ||\n (char == '\\\\' && isSpecial(url))\n ) {\n if (seenAt && buffer == '') return INVALID_AUTHORITY;\n pointer -= arrayFrom(buffer).length + 1;\n buffer = '';\n state = HOST;\n } else buffer += char;\n break;\n\n case HOST:\n case HOSTNAME:\n if (stateOverride && url.scheme == 'file') {\n state = FILE_HOST;\n continue;\n } else if (char == ':' && !seenBracket) {\n if (buffer == '') return INVALID_HOST;\n failure = parseHost(url, buffer);\n if (failure) return failure;\n buffer = '';\n state = PORT;\n if (stateOverride == HOSTNAME) return;\n } else if (\n char == EOF || char == '/' || char == '?' || char == '#' ||\n (char == '\\\\' && isSpecial(url))\n ) {\n if (isSpecial(url) && buffer == '') return INVALID_HOST;\n if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return;\n failure = parseHost(url, buffer);\n if (failure) return failure;\n buffer = '';\n state = PATH_START;\n if (stateOverride) return;\n continue;\n } else {\n if (char == '[') seenBracket = true;\n else if (char == ']') seenBracket = false;\n buffer += char;\n } break;\n\n case PORT:\n if (DIGIT.test(char)) {\n buffer += char;\n } else if (\n char == EOF || char == '/' || char == '?' || char == '#' ||\n (char == '\\\\' && isSpecial(url)) ||\n stateOverride\n ) {\n if (buffer != '') {\n var port = parseInt(buffer, 10);\n if (port > 0xFFFF) return INVALID_PORT;\n url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port;\n buffer = '';\n }\n if (stateOverride) return;\n state = PATH_START;\n continue;\n } else return INVALID_PORT;\n break;\n\n case FILE:\n url.scheme = 'file';\n if (char == '/' || char == '\\\\') state = FILE_SLASH;\n else if (base && base.scheme == 'file') {\n if (char == EOF) {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = base.query;\n } else if (char == '?') {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n state = FRAGMENT;\n } else {\n if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {\n url.host = base.host;\n url.path = base.path.slice();\n shortenURLsPath(url);\n }\n state = PATH;\n continue;\n }\n } else {\n state = PATH;\n continue;\n } break;\n\n case FILE_SLASH:\n if (char == '/' || char == '\\\\') {\n state = FILE_HOST;\n break;\n }\n if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {\n if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]);\n else url.host = base.host;\n }\n state = PATH;\n continue;\n\n case FILE_HOST:\n if (char == EOF || char == '/' || char == '\\\\' || char == '?' || char == '#') {\n if (!stateOverride && isWindowsDriveLetter(buffer)) {\n state = PATH;\n } else if (buffer == '') {\n url.host = '';\n if (stateOverride) return;\n state = PATH_START;\n } else {\n failure = parseHost(url, buffer);\n if (failure) return failure;\n if (url.host == 'localhost') url.host = '';\n if (stateOverride) return;\n buffer = '';\n state = PATH_START;\n } continue;\n } else buffer += char;\n break;\n\n case PATH_START:\n if (isSpecial(url)) {\n state = PATH;\n if (char != '/' && char != '\\\\') continue;\n } else if (!stateOverride && char == '?') {\n url.query = '';\n state = QUERY;\n } else if (!stateOverride && char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (char != EOF) {\n state = PATH;\n if (char != '/') continue;\n } break;\n\n case PATH:\n if (\n char == EOF || char == '/' ||\n (char == '\\\\' && isSpecial(url)) ||\n (!stateOverride && (char == '?' || char == '#'))\n ) {\n if (isDoubleDot(buffer)) {\n shortenURLsPath(url);\n if (char != '/' && !(char == '\\\\' && isSpecial(url))) {\n url.path.push('');\n }\n } else if (isSingleDot(buffer)) {\n if (char != '/' && !(char == '\\\\' && isSpecial(url))) {\n url.path.push('');\n }\n } else {\n if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {\n if (url.host) url.host = '';\n buffer = buffer.charAt(0) + ':'; // normalize windows drive letter\n }\n url.path.push(buffer);\n }\n buffer = '';\n if (url.scheme == 'file' && (char == EOF || char == '?' || char == '#')) {\n while (url.path.length > 1 && url.path[0] === '') {\n url.path.shift();\n }\n }\n if (char == '?') {\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n }\n } else {\n buffer += percentEncode(char, pathPercentEncodeSet);\n } break;\n\n case CANNOT_BE_A_BASE_URL_PATH:\n if (char == '?') {\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (char != EOF) {\n url.path[0] += percentEncode(char, C0ControlPercentEncodeSet);\n } break;\n\n case QUERY:\n if (!stateOverride && char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (char != EOF) {\n if (char == \"'\" && isSpecial(url)) url.query += '%27';\n else if (char == '#') url.query += '%23';\n else url.query += percentEncode(char, C0ControlPercentEncodeSet);\n } break;\n\n case FRAGMENT:\n if (char != EOF) url.fragment += percentEncode(char, fragmentPercentEncodeSet);\n break;\n }\n\n pointer++;\n }\n };\n\n // `URL` constructor\n // https://url.spec.whatwg.org/#url-class\n var URLConstructor = function URL(url /* , base */) {\n var that = anInstance(this, URLConstructor, 'URL');\n var base = arguments.length > 1 ? arguments[1] : undefined;\n var urlString = String(url);\n var state = setInternalState$4(that, { type: 'URL' });\n var baseState, failure;\n if (base !== undefined) {\n if (base instanceof URLConstructor) baseState = getInternalURLState(base);\n else {\n failure = parseURL(baseState = {}, String(base));\n if (failure) throw TypeError(failure);\n }\n }\n failure = parseURL(state, urlString, null, baseState);\n if (failure) throw TypeError(failure);\n var searchParams = state.searchParams = new URLSearchParams$1();\n var searchParamsState = getInternalSearchParamsState(searchParams);\n searchParamsState.updateSearchParams(state.query);\n searchParamsState.updateURL = function () {\n state.query = String(searchParams) || null;\n };\n if (!descriptors) {\n that.href = serializeURL.call(that);\n that.origin = getOrigin.call(that);\n that.protocol = getProtocol.call(that);\n that.username = getUsername.call(that);\n that.password = getPassword.call(that);\n that.host = getHost.call(that);\n that.hostname = getHostname.call(that);\n that.port = getPort.call(that);\n that.pathname = getPathname.call(that);\n that.search = getSearch.call(that);\n that.searchParams = getSearchParams.call(that);\n that.hash = getHash.call(that);\n }\n };\n\n var URLPrototype = URLConstructor.prototype;\n\n var serializeURL = function () {\n var url = getInternalURLState(this);\n var scheme = url.scheme;\n var username = url.username;\n var password = url.password;\n var host = url.host;\n var port = url.port;\n var path = url.path;\n var query = url.query;\n var fragment = url.fragment;\n var output = scheme + ':';\n if (host !== null) {\n output += '//';\n if (includesCredentials(url)) {\n output += username + (password ? ':' + password : '') + '@';\n }\n output += serializeHost(host);\n if (port !== null) output += ':' + port;\n } else if (scheme == 'file') output += '//';\n output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';\n if (query !== null) output += '?' + query;\n if (fragment !== null) output += '#' + fragment;\n return output;\n };\n\n var getOrigin = function () {\n var url = getInternalURLState(this);\n var scheme = url.scheme;\n var port = url.port;\n if (scheme == 'blob') try {\n return new URL(scheme.path[0]).origin;\n } catch (error) {\n return 'null';\n }\n if (scheme == 'file' || !isSpecial(url)) return 'null';\n return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : '');\n };\n\n var getProtocol = function () {\n return getInternalURLState(this).scheme + ':';\n };\n\n var getUsername = function () {\n return getInternalURLState(this).username;\n };\n\n var getPassword = function () {\n return getInternalURLState(this).password;\n };\n\n var getHost = function () {\n var url = getInternalURLState(this);\n var host = url.host;\n var port = url.port;\n return host === null ? ''\n : port === null ? serializeHost(host)\n : serializeHost(host) + ':' + port;\n };\n\n var getHostname = function () {\n var host = getInternalURLState(this).host;\n return host === null ? '' : serializeHost(host);\n };\n\n var getPort = function () {\n var port = getInternalURLState(this).port;\n return port === null ? '' : String(port);\n };\n\n var getPathname = function () {\n var url = getInternalURLState(this);\n var path = url.path;\n return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';\n };\n\n var getSearch = function () {\n var query = getInternalURLState(this).query;\n return query ? '?' + query : '';\n };\n\n var getSearchParams = function () {\n return getInternalURLState(this).searchParams;\n };\n\n var getHash = function () {\n var fragment = getInternalURLState(this).fragment;\n return fragment ? '#' + fragment : '';\n };\n\n var accessorDescriptor = function (getter, setter) {\n return { get: getter, set: setter, configurable: true, enumerable: true };\n };\n\n if (descriptors) {\n objectDefineProperties(URLPrototype, {\n // `URL.prototype.href` accessors pair\n // https://url.spec.whatwg.org/#dom-url-href\n href: accessorDescriptor(serializeURL, function (href) {\n var url = getInternalURLState(this);\n var urlString = String(href);\n var failure = parseURL(url, urlString);\n if (failure) throw TypeError(failure);\n getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);\n }),\n // `URL.prototype.origin` getter\n // https://url.spec.whatwg.org/#dom-url-origin\n origin: accessorDescriptor(getOrigin),\n // `URL.prototype.protocol` accessors pair\n // https://url.spec.whatwg.org/#dom-url-protocol\n protocol: accessorDescriptor(getProtocol, function (protocol) {\n var url = getInternalURLState(this);\n parseURL(url, String(protocol) + ':', SCHEME_START);\n }),\n // `URL.prototype.username` accessors pair\n // https://url.spec.whatwg.org/#dom-url-username\n username: accessorDescriptor(getUsername, function (username) {\n var url = getInternalURLState(this);\n var codePoints = arrayFrom(String(username));\n if (cannotHaveUsernamePasswordPort(url)) return;\n url.username = '';\n for (var i = 0; i < codePoints.length; i++) {\n url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n }\n }),\n // `URL.prototype.password` accessors pair\n // https://url.spec.whatwg.org/#dom-url-password\n password: accessorDescriptor(getPassword, function (password) {\n var url = getInternalURLState(this);\n var codePoints = arrayFrom(String(password));\n if (cannotHaveUsernamePasswordPort(url)) return;\n url.password = '';\n for (var i = 0; i < codePoints.length; i++) {\n url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n }\n }),\n // `URL.prototype.host` accessors pair\n // https://url.spec.whatwg.org/#dom-url-host\n host: accessorDescriptor(getHost, function (host) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n parseURL(url, String(host), HOST);\n }),\n // `URL.prototype.hostname` accessors pair\n // https://url.spec.whatwg.org/#dom-url-hostname\n hostname: accessorDescriptor(getHostname, function (hostname) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n parseURL(url, String(hostname), HOSTNAME);\n }),\n // `URL.prototype.port` accessors pair\n // https://url.spec.whatwg.org/#dom-url-port\n port: accessorDescriptor(getPort, function (port) {\n var url = getInternalURLState(this);\n if (cannotHaveUsernamePasswordPort(url)) return;\n port = String(port);\n if (port == '') url.port = null;\n else parseURL(url, port, PORT);\n }),\n // `URL.prototype.pathname` accessors pair\n // https://url.spec.whatwg.org/#dom-url-pathname\n pathname: accessorDescriptor(getPathname, function (pathname) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n url.path = [];\n parseURL(url, pathname + '', PATH_START);\n }),\n // `URL.prototype.search` accessors pair\n // https://url.spec.whatwg.org/#dom-url-search\n search: accessorDescriptor(getSearch, function (search) {\n var url = getInternalURLState(this);\n search = String(search);\n if (search == '') {\n url.query = null;\n } else {\n if ('?' == search.charAt(0)) search = search.slice(1);\n url.query = '';\n parseURL(url, search, QUERY);\n }\n getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);\n }),\n // `URL.prototype.searchParams` getter\n // https://url.spec.whatwg.org/#dom-url-searchparams\n searchParams: accessorDescriptor(getSearchParams),\n // `URL.prototype.hash` accessors pair\n // https://url.spec.whatwg.org/#dom-url-hash\n hash: accessorDescriptor(getHash, function (hash) {\n var url = getInternalURLState(this);\n hash = String(hash);\n if (hash == '') {\n url.fragment = null;\n return;\n }\n if ('#' == hash.charAt(0)) hash = hash.slice(1);\n url.fragment = '';\n parseURL(url, hash, FRAGMENT);\n })\n });\n }\n\n // `URL.prototype.toJSON` method\n // https://url.spec.whatwg.org/#dom-url-tojson\n redefine(URLPrototype, 'toJSON', function toJSON() {\n return serializeURL.call(this);\n }, { enumerable: true });\n\n // `URL.prototype.toString` method\n // https://url.spec.whatwg.org/#URL-stringification-behavior\n redefine(URLPrototype, 'toString', function toString() {\n return serializeURL.call(this);\n }, { enumerable: true });\n\n if (NativeURL) {\n var nativeCreateObjectURL = NativeURL.createObjectURL;\n var nativeRevokeObjectURL = NativeURL.revokeObjectURL;\n // `URL.createObjectURL` method\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL\n // eslint-disable-next-line no-unused-vars\n if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) {\n return nativeCreateObjectURL.apply(NativeURL, arguments);\n });\n // `URL.revokeObjectURL` method\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL\n // eslint-disable-next-line no-unused-vars\n if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) {\n return nativeRevokeObjectURL.apply(NativeURL, arguments);\n });\n }\n\n setToStringTag(URLConstructor, 'URL');\n\n _export({ global: true, forced: !nativeUrl, sham: !descriptors }, {\n URL: URLConstructor\n });\n\n function _typeof(obj) {\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\n return _typeof(obj);\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n function _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\n function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();\n }\n\n function _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n }\n\n function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n }\n\n function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n }\n\n function _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n }\n\n function _iterableToArrayLimit(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n }\n\n function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n\n (function (global) {\n /**\r\n * Polyfill URLSearchParams\r\n *\r\n * Inspired from : https://github.com/WebReflection/url-search-params/blob/master/src/url-search-params.js\r\n */\n var checkIfIteratorIsSupported = function checkIfIteratorIsSupported() {\n try {\n return !!Symbol.iterator;\n } catch (error) {\n return false;\n }\n };\n\n var iteratorSupported = checkIfIteratorIsSupported();\n\n var createIterator = function createIterator(items) {\n var iterator = {\n next: function next() {\n var value = items.shift();\n return {\n done: value === void 0,\n value: value\n };\n }\n };\n\n if (iteratorSupported) {\n iterator[Symbol.iterator] = function () {\n return iterator;\n };\n }\n\n return iterator;\n };\n /**\r\n * Search param name and values should be encoded according to https://url.spec.whatwg.org/#urlencoded-serializing\r\n * encodeURIComponent() produces the same result except encoding spaces as `%20` instead of `+`.\r\n */\n\n\n var serializeParam = function serializeParam(value) {\n return encodeURIComponent(value).replace(/%20/g, '+');\n };\n\n var deserializeParam = function deserializeParam(value) {\n return decodeURIComponent(String(value).replace(/\\+/g, ' '));\n };\n\n var polyfillURLSearchParams = function polyfillURLSearchParams() {\n var URLSearchParams = function URLSearchParams(searchString) {\n Object.defineProperty(this, '_entries', {\n writable: true,\n value: {}\n });\n\n var typeofSearchString = _typeof(searchString);\n\n if (typeofSearchString === 'undefined') ; else if (typeofSearchString === 'string') {\n if (searchString !== '') {\n this._fromString(searchString);\n }\n } else if (searchString instanceof URLSearchParams) {\n var _this = this;\n\n searchString.forEach(function (value, name) {\n _this.append(name, value);\n });\n } else if (searchString !== null && typeofSearchString === 'object') {\n if (Object.prototype.toString.call(searchString) === '[object Array]') {\n for (var i = 0; i < searchString.length; i++) {\n var entry = searchString[i];\n\n if (Object.prototype.toString.call(entry) === '[object Array]' || entry.length !== 2) {\n this.append(entry[0], entry[1]);\n } else {\n throw new TypeError('Expected [string, any] as entry at index ' + i + ' of URLSearchParams\\'s input');\n }\n }\n } else {\n for (var key in searchString) {\n if (searchString.hasOwnProperty(key)) {\n this.append(key, searchString[key]);\n }\n }\n }\n } else {\n throw new TypeError('Unsupported input\\'s type for URLSearchParams');\n }\n };\n\n var proto = URLSearchParams.prototype;\n\n proto.append = function (name, value) {\n if (name in this._entries) {\n this._entries[name].push(String(value));\n } else {\n this._entries[name] = [String(value)];\n }\n };\n\n proto.delete = function (name) {\n delete this._entries[name];\n };\n\n proto.get = function (name) {\n return name in this._entries ? this._entries[name][0] : null;\n };\n\n proto.getAll = function (name) {\n return name in this._entries ? this._entries[name].slice(0) : [];\n };\n\n proto.has = function (name) {\n return name in this._entries;\n };\n\n proto.set = function (name, value) {\n this._entries[name] = [String(value)];\n };\n\n proto.forEach = function (callback, thisArg) {\n var entries;\n\n for (var name in this._entries) {\n if (this._entries.hasOwnProperty(name)) {\n entries = this._entries[name];\n\n for (var i = 0; i < entries.length; i++) {\n callback.call(thisArg, entries[i], name, this);\n }\n }\n }\n };\n\n proto.keys = function () {\n var items = [];\n this.forEach(function (value, name) {\n items.push(name);\n });\n return createIterator(items);\n };\n\n proto.values = function () {\n var items = [];\n this.forEach(function (value) {\n items.push(value);\n });\n return createIterator(items);\n };\n\n proto.entries = function () {\n var items = [];\n this.forEach(function (value, name) {\n items.push([name, value]);\n });\n return createIterator(items);\n };\n\n if (iteratorSupported) {\n proto[Symbol.iterator] = proto.entries;\n }\n\n proto.toString = function () {\n var searchArray = [];\n this.forEach(function (value, name) {\n searchArray.push(serializeParam(name) + '=' + serializeParam(value));\n });\n return searchArray.join('&');\n };\n\n global.URLSearchParams = URLSearchParams;\n };\n\n if (!('URLSearchParams' in global) || new global.URLSearchParams('?a=1').toString() !== 'a=1') {\n polyfillURLSearchParams();\n }\n\n var proto = global.URLSearchParams.prototype;\n\n if (typeof proto.sort !== 'function') {\n proto.sort = function () {\n var _this = this;\n\n var items = [];\n this.forEach(function (value, name) {\n items.push([name, value]);\n\n if (!_this._entries) {\n _this.delete(name);\n }\n });\n items.sort(function (a, b) {\n if (a[0] < b[0]) {\n return -1;\n } else if (a[0] > b[0]) {\n return +1;\n } else {\n return 0;\n }\n });\n\n if (_this._entries) {\n // force reset because IE keeps keys index\n _this._entries = {};\n }\n\n for (var i = 0; i < items.length; i++) {\n this.append(items[i][0], items[i][1]);\n }\n };\n }\n\n if (typeof proto._fromString !== 'function') {\n Object.defineProperty(proto, '_fromString', {\n enumerable: false,\n configurable: false,\n writable: false,\n value: function value(searchString) {\n if (this._entries) {\n this._entries = {};\n } else {\n var keys = [];\n this.forEach(function (value, name) {\n keys.push(name);\n });\n\n for (var i = 0; i < keys.length; i++) {\n this.delete(keys[i]);\n }\n }\n\n searchString = searchString.replace(/^\\?/, '');\n var attributes = searchString.split('&');\n var attribute;\n\n for (var i = 0; i < attributes.length; i++) {\n attribute = attributes[i].split('=');\n this.append(deserializeParam(attribute[0]), attribute.length > 1 ? deserializeParam(attribute[1]) : '');\n }\n }\n });\n } // HTMLAnchorElement\n\n })(typeof commonjsGlobal !== 'undefined' ? commonjsGlobal : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : commonjsGlobal);\n\n (function (global) {\n /**\r\n * Polyfill URL\r\n *\r\n * Inspired from : https://github.com/arv/DOM-URL-Polyfill/blob/master/src/url.js\r\n */\n var checkIfURLIsSupported = function checkIfURLIsSupported() {\n try {\n var u = new global.URL('b', 'http://a');\n u.pathname = 'c%20d';\n return u.href === 'http://a/c%20d' && u.searchParams;\n } catch (e) {\n return false;\n }\n };\n\n var polyfillURL = function polyfillURL() {\n var _URL = global.URL;\n\n var URL = function URL(url, base) {\n if (typeof url !== 'string') url = String(url); // Only create another document if the base is different from current location.\n\n var doc = document,\n baseElement;\n\n if (base && (global.location === void 0 || base !== global.location.href)) {\n doc = document.implementation.createHTMLDocument('');\n baseElement = doc.createElement('base');\n baseElement.href = base;\n doc.head.appendChild(baseElement);\n\n try {\n if (baseElement.href.indexOf(base) !== 0) throw new Error(baseElement.href);\n } catch (err) {\n throw new Error('URL unable to set base ' + base + ' due to ' + err);\n }\n }\n\n var anchorElement = doc.createElement('a');\n anchorElement.href = url;\n\n if (baseElement) {\n doc.body.appendChild(anchorElement);\n anchorElement.href = anchorElement.href; // force href to refresh\n }\n\n if (anchorElement.protocol === ':' || !/:/.test(anchorElement.href)) {\n throw new TypeError('Invalid URL');\n }\n\n Object.defineProperty(this, '_anchorElement', {\n value: anchorElement\n }); // create a linked searchParams which reflect its changes on URL\n\n var searchParams = new global.URLSearchParams(this.search);\n var enableSearchUpdate = true;\n var enableSearchParamsUpdate = true;\n\n var _this = this;\n\n ['append', 'delete', 'set'].forEach(function (methodName) {\n var method = searchParams[methodName];\n\n searchParams[methodName] = function () {\n method.apply(searchParams, arguments);\n\n if (enableSearchUpdate) {\n enableSearchParamsUpdate = false;\n _this.search = searchParams.toString();\n enableSearchParamsUpdate = true;\n }\n };\n });\n Object.defineProperty(this, 'searchParams', {\n value: searchParams,\n enumerable: true\n });\n var search = void 0;\n Object.defineProperty(this, '_updateSearchParams', {\n enumerable: false,\n configurable: false,\n writable: false,\n value: function value() {\n if (this.search !== search) {\n search = this.search;\n\n if (enableSearchParamsUpdate) {\n enableSearchUpdate = false;\n\n this.searchParams._fromString(this.search);\n\n enableSearchUpdate = true;\n }\n }\n }\n });\n };\n\n var proto = URL.prototype;\n\n var linkURLWithAnchorAttribute = function linkURLWithAnchorAttribute(attributeName) {\n Object.defineProperty(proto, attributeName, {\n get: function get() {\n return this._anchorElement[attributeName];\n },\n set: function set(value) {\n this._anchorElement[attributeName] = value;\n },\n enumerable: true\n });\n };\n\n ['hash', 'host', 'hostname', 'port', 'protocol'].forEach(function (attributeName) {\n linkURLWithAnchorAttribute(attributeName);\n });\n Object.defineProperty(proto, 'search', {\n get: function get() {\n return this._anchorElement['search'];\n },\n set: function set(value) {\n this._anchorElement['search'] = value;\n\n this._updateSearchParams();\n },\n enumerable: true\n });\n Object.defineProperties(proto, {\n 'toString': {\n get: function get() {\n var _this = this;\n\n return function () {\n return _this.href;\n };\n }\n },\n 'href': {\n get: function get() {\n return this._anchorElement.href.replace(/\\?$/, '');\n },\n set: function set(value) {\n this._anchorElement.href = value;\n\n this._updateSearchParams();\n },\n enumerable: true\n },\n 'pathname': {\n get: function get() {\n return this._anchorElement.pathname.replace(/(^\\/?)/, '/');\n },\n set: function set(value) {\n this._anchorElement.pathname = value;\n },\n enumerable: true\n },\n 'origin': {\n get: function get() {\n // get expected port from protocol\n var expectedPort = {\n 'http:': 80,\n 'https:': 443,\n 'ftp:': 21\n }[this._anchorElement.protocol]; // add port to origin if, expected port is different than actual port\n // and it is not empty f.e http://foo:8080\n // 8080 != 80 && 8080 != ''\n\n var addPortToOrigin = this._anchorElement.port != expectedPort && this._anchorElement.port !== '';\n return this._anchorElement.protocol + '//' + this._anchorElement.hostname + (addPortToOrigin ? ':' + this._anchorElement.port : '');\n },\n enumerable: true\n },\n 'password': {\n // TODO\n get: function get() {\n return '';\n },\n set: function set(value) {},\n enumerable: true\n },\n 'username': {\n // TODO\n get: function get() {\n return '';\n },\n set: function set(value) {},\n enumerable: true\n }\n });\n\n URL.createObjectURL = function (blob) {\n return _URL.createObjectURL.apply(_URL, arguments);\n };\n\n URL.revokeObjectURL = function (url) {\n return _URL.revokeObjectURL.apply(_URL, arguments);\n };\n\n global.URL = URL;\n };\n\n if (!checkIfURLIsSupported()) {\n polyfillURL();\n }\n\n if (global.location !== void 0 && !('origin' in global.location)) {\n var getOrigin = function getOrigin() {\n return global.location.protocol + '//' + global.location.hostname + (global.location.port ? ':' + global.location.port : '');\n };\n\n try {\n Object.defineProperty(global.location, 'origin', {\n get: getOrigin,\n enumerable: true\n });\n } catch (e) {\n setInterval(function () {\n global.location.origin = getOrigin();\n }, 100);\n }\n }\n })(typeof commonjsGlobal !== 'undefined' ? commonjsGlobal : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : commonjsGlobal);\n\n var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');\n var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\n var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';\n\n var IS_CONCAT_SPREADABLE_SUPPORT = !fails(function () {\n var array = [];\n array[IS_CONCAT_SPREADABLE] = false;\n return array.concat()[0] !== array;\n });\n\n var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');\n\n var isConcatSpreadable = function (O) {\n if (!isObject(O)) return false;\n var spreadable = O[IS_CONCAT_SPREADABLE];\n return spreadable !== undefined ? !!spreadable : isArray(O);\n };\n\n var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;\n\n // `Array.prototype.concat` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.concat\n // with adding support of @@isConcatSpreadable and @@species\n _export({ target: 'Array', proto: true, forced: FORCED }, {\n concat: function concat(arg) { // eslint-disable-line no-unused-vars\n var O = toObject(this);\n var A = arraySpeciesCreate(O, 0);\n var n = 0;\n var i, k, length, len, E;\n for (i = -1, length = arguments.length; i < length; i++) {\n E = i === -1 ? O : arguments[i];\n if (isConcatSpreadable(E)) {\n len = toLength(E.length);\n if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);\n } else {\n if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n createProperty(A, n++, E);\n }\n }\n A.length = n;\n return A;\n }\n });\n\n var $filter = arrayIteration.filter;\n\n\n // `Array.prototype.filter` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.filter\n // with adding support of @@species\n _export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('filter') }, {\n filter: function filter(callbackfn /* , thisArg */) {\n return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n });\n\n var $find = arrayIteration.find;\n\n\n var FIND = 'find';\n var SKIPS_HOLES = true;\n\n // Shouldn't skip holes\n if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });\n\n // `Array.prototype.find` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.find\n _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {\n find: function find(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n });\n\n // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\n addToUnscopables(FIND);\n\n var ITERATOR$7 = wellKnownSymbol('iterator');\n var SAFE_CLOSING = false;\n\n try {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR$7] = function () {\n return this;\n };\n // eslint-disable-next-line no-throw-literal\n Array.from(iteratorWithReturn, function () { throw 2; });\n } catch (error) { /* empty */ }\n\n var checkCorrectnessOfIteration = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR$7] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n };\n\n var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {\n Array.from(iterable);\n });\n\n // `Array.from` method\n // https://tc39.github.io/ecma262/#sec-array.from\n _export({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {\n from: arrayFrom\n });\n\n var $includes = arrayIncludes.includes;\n\n\n // `Array.prototype.includes` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.includes\n _export({ target: 'Array', proto: true }, {\n includes: function includes(el /* , fromIndex = 0 */) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n });\n\n // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\n addToUnscopables('includes');\n\n var $map = arrayIteration.map;\n\n\n // `Array.prototype.map` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.map\n // with adding support of @@species\n _export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('map') }, {\n map: function map(callbackfn /* , thisArg */) {\n return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n });\n\n // makes subclassing work correct for wrapped built-ins\n var inheritIfRequired = function ($this, dummy, Wrapper) {\n var NewTarget, NewTargetPrototype;\n if (\n // it can work only with native `setPrototypeOf`\n objectSetPrototypeOf &&\n // we haven't completely correct pre-ES6 way for getting `new.target`, so use this\n typeof (NewTarget = dummy.constructor) == 'function' &&\n NewTarget !== Wrapper &&\n isObject(NewTargetPrototype = NewTarget.prototype) &&\n NewTargetPrototype !== Wrapper.prototype\n ) objectSetPrototypeOf($this, NewTargetPrototype);\n return $this;\n };\n\n // a string of all valid unicode whitespaces\n // eslint-disable-next-line max-len\n var whitespaces = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n\n var whitespace = '[' + whitespaces + ']';\n var ltrim = RegExp('^' + whitespace + whitespace + '*');\n var rtrim = RegExp(whitespace + whitespace + '*$');\n\n // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\n var createMethod$3 = function (TYPE) {\n return function ($this) {\n var string = String(requireObjectCoercible($this));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n };\n };\n\n var stringTrim = {\n // `String.prototype.{ trimLeft, trimStart }` methods\n // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart\n start: createMethod$3(1),\n // `String.prototype.{ trimRight, trimEnd }` methods\n // https://tc39.github.io/ecma262/#sec-string.prototype.trimend\n end: createMethod$3(2),\n // `String.prototype.trim` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.trim\n trim: createMethod$3(3)\n };\n\n var getOwnPropertyNames = objectGetOwnPropertyNames.f;\n var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;\n var defineProperty$3 = objectDefineProperty.f;\n var trim = stringTrim.trim;\n\n var NUMBER = 'Number';\n var NativeNumber = global_1[NUMBER];\n var NumberPrototype = NativeNumber.prototype;\n\n // Opera ~12 has broken Object#toString\n var BROKEN_CLASSOF = classofRaw(objectCreate(NumberPrototype)) == NUMBER;\n\n // `ToNumber` abstract operation\n // https://tc39.github.io/ecma262/#sec-tonumber\n var toNumber = function (argument) {\n var it = toPrimitive(argument, false);\n var first, third, radix, maxCode, digits, length, index, code;\n if (typeof it == 'string' && it.length > 2) {\n it = trim(it);\n first = it.charCodeAt(0);\n if (first === 43 || first === 45) {\n third = it.charCodeAt(2);\n if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if (first === 48) {\n switch (it.charCodeAt(1)) {\n case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i\n case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i\n default: return +it;\n }\n digits = it.slice(2);\n length = digits.length;\n for (index = 0; index < length; index++) {\n code = digits.charCodeAt(index);\n // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n if (code < 48 || code > maxCode) return NaN;\n } return parseInt(digits, radix);\n }\n } return +it;\n };\n\n // `Number` constructor\n // https://tc39.github.io/ecma262/#sec-number-constructor\n if (isForced_1(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {\n var NumberWrapper = function Number(value) {\n var it = arguments.length < 1 ? 0 : value;\n var dummy = this;\n return dummy instanceof NumberWrapper\n // check on 1..constructor(foo) case\n && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classofRaw(dummy) != NUMBER)\n ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);\n };\n for (var keys$1 = descriptors ? getOwnPropertyNames(NativeNumber) : (\n // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +\n // ES2015 (in case, if modules with ES2015 Number statics required before):\n 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +\n 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'\n ).split(','), j = 0, key; keys$1.length > j; j++) {\n if (has(NativeNumber, key = keys$1[j]) && !has(NumberWrapper, key)) {\n defineProperty$3(NumberWrapper, key, getOwnPropertyDescriptor$2(NativeNumber, key));\n }\n }\n NumberWrapper.prototype = NumberPrototype;\n NumberPrototype.constructor = NumberWrapper;\n redefine(global_1, NUMBER, NumberWrapper);\n }\n\n var FAILS_ON_PRIMITIVES = fails(function () { objectKeys(1); });\n\n // `Object.keys` method\n // https://tc39.github.io/ecma262/#sec-object.keys\n _export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n keys: function keys(it) {\n return objectKeys(toObject(it));\n }\n });\n\n var notARegexp = function (it) {\n if (isRegexp(it)) {\n throw TypeError(\"The method doesn't accept regular expressions\");\n } return it;\n };\n\n var MATCH$1 = wellKnownSymbol('match');\n\n var correctIsRegexpLogic = function (METHOD_NAME) {\n var regexp = /./;\n try {\n '/./'[METHOD_NAME](regexp);\n } catch (e) {\n try {\n regexp[MATCH$1] = false;\n return '/./'[METHOD_NAME](regexp);\n } catch (f) { /* empty */ }\n } return false;\n };\n\n // `String.prototype.includes` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.includes\n _export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, {\n includes: function includes(searchString /* , position = 0 */) {\n return !!~String(requireObjectCoercible(this))\n .indexOf(notARegexp(searchString), arguments.length > 1 ? arguments[1] : undefined);\n }\n });\n\n var freezing = !fails(function () {\n return Object.isExtensible(Object.preventExtensions({}));\n });\n\n var internalMetadata = createCommonjsModule(function (module) {\n var defineProperty = objectDefineProperty.f;\n\n\n\n var METADATA = uid('meta');\n var id = 0;\n\n var isExtensible = Object.isExtensible || function () {\n return true;\n };\n\n var setMetadata = function (it) {\n defineProperty(it, METADATA, { value: {\n objectID: 'O' + ++id, // object ID\n weakData: {} // weak collections IDs\n } });\n };\n\n var fastKey = function (it, create) {\n // return a primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMetadata(it);\n // return object ID\n } return it[METADATA].objectID;\n };\n\n var getWeakData = function (it, create) {\n if (!has(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMetadata(it);\n // return the store of weak collections IDs\n } return it[METADATA].weakData;\n };\n\n // add metadata on freeze-family methods calling\n var onFreeze = function (it) {\n if (freezing && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);\n return it;\n };\n\n var meta = module.exports = {\n REQUIRED: false,\n fastKey: fastKey,\n getWeakData: getWeakData,\n onFreeze: onFreeze\n };\n\n hiddenKeys[METADATA] = true;\n });\n var internalMetadata_1 = internalMetadata.REQUIRED;\n var internalMetadata_2 = internalMetadata.fastKey;\n var internalMetadata_3 = internalMetadata.getWeakData;\n var internalMetadata_4 = internalMetadata.onFreeze;\n\n var iterate_1 = createCommonjsModule(function (module) {\n var Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n };\n\n var iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {\n var boundFunction = bindContext(fn, that, AS_ENTRIES ? 2 : 1);\n var iterator, iterFn, index, length, result, step;\n\n if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (typeof iterFn != 'function') throw TypeError('Target is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = toLength(iterable.length); length > index; index++) {\n result = AS_ENTRIES\n ? boundFunction(anObject(step = iterable[index])[0], step[1])\n : boundFunction(iterable[index]);\n if (result && result instanceof Result) return result;\n } return new Result(false);\n }\n iterator = iterFn.call(iterable);\n }\n\n while (!(step = iterator.next()).done) {\n result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES);\n if (result && result instanceof Result) return result;\n } return new Result(false);\n };\n\n iterate.stop = function (result) {\n return new Result(true, result);\n };\n });\n\n var collection = function (CONSTRUCTOR_NAME, wrapper, common, IS_MAP, IS_WEAK) {\n var NativeConstructor = global_1[CONSTRUCTOR_NAME];\n var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n var Constructor = NativeConstructor;\n var ADDER = IS_MAP ? 'set' : 'add';\n var exported = {};\n\n var fixMethod = function (KEY) {\n var nativeMethod = NativePrototype[KEY];\n redefine(NativePrototype, KEY,\n KEY == 'add' ? function add(a) {\n nativeMethod.call(this, a === 0 ? 0 : a);\n return this;\n } : KEY == 'delete' ? function (a) {\n return IS_WEAK && !isObject(a) ? false : nativeMethod.call(this, a === 0 ? 0 : a);\n } : KEY == 'get' ? function get(a) {\n return IS_WEAK && !isObject(a) ? undefined : nativeMethod.call(this, a === 0 ? 0 : a);\n } : KEY == 'has' ? function has(a) {\n return IS_WEAK && !isObject(a) ? false : nativeMethod.call(this, a === 0 ? 0 : a);\n } : function set(a, b) {\n nativeMethod.call(this, a === 0 ? 0 : a, b);\n return this;\n }\n );\n };\n\n // eslint-disable-next-line max-len\n if (isForced_1(CONSTRUCTOR_NAME, typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {\n new NativeConstructor().entries().next();\n })))) {\n // create collection constructor\n Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);\n internalMetadata.REQUIRED = true;\n } else if (isForced_1(CONSTRUCTOR_NAME, true)) {\n var instance = new Constructor();\n // early implementations not supports chaining\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;\n // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n // most early implementations doesn't supports iterables, most modern - not close it correctly\n // eslint-disable-next-line no-new\n var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });\n // for early implementations -0 and +0 not the same\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new NativeConstructor();\n var index = 5;\n while (index--) $instance[ADDER](index, index);\n return !$instance.has(-0);\n });\n\n if (!ACCEPT_ITERABLES) {\n Constructor = wrapper(function (dummy, iterable) {\n anInstance(dummy, Constructor, CONSTRUCTOR_NAME);\n var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);\n if (iterable != undefined) iterate_1(iterable, that[ADDER], that, IS_MAP);\n return that;\n });\n Constructor.prototype = NativePrototype;\n NativePrototype.constructor = Constructor;\n }\n\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n\n if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n\n // weak collections should not contains .clear method\n if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;\n }\n\n exported[CONSTRUCTOR_NAME] = Constructor;\n _export({ global: true, forced: Constructor != NativeConstructor }, exported);\n\n setToStringTag(Constructor, CONSTRUCTOR_NAME);\n\n if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);\n\n return Constructor;\n };\n\n var getWeakData = internalMetadata.getWeakData;\n\n\n\n\n\n\n\n\n var setInternalState$5 = internalState.set;\n var internalStateGetterFor = internalState.getterFor;\n var find$1 = arrayIteration.find;\n var findIndex = arrayIteration.findIndex;\n var id$1 = 0;\n\n // fallback for uncaught frozen keys\n var uncaughtFrozenStore = function (store) {\n return store.frozen || (store.frozen = new UncaughtFrozenStore());\n };\n\n var UncaughtFrozenStore = function () {\n this.entries = [];\n };\n\n var findUncaughtFrozen = function (store, key) {\n return find$1(store.entries, function (it) {\n return it[0] === key;\n });\n };\n\n UncaughtFrozenStore.prototype = {\n get: function (key) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) return entry[1];\n },\n has: function (key) {\n return !!findUncaughtFrozen(this, key);\n },\n set: function (key, value) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) entry[1] = value;\n else this.entries.push([key, value]);\n },\n 'delete': function (key) {\n var index = findIndex(this.entries, function (it) {\n return it[0] === key;\n });\n if (~index) this.entries.splice(index, 1);\n return !!~index;\n }\n };\n\n var collectionWeak = {\n getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, CONSTRUCTOR_NAME);\n setInternalState$5(that, {\n type: CONSTRUCTOR_NAME,\n id: id$1++,\n frozen: undefined\n });\n if (iterable != undefined) iterate_1(iterable, that[ADDER], that, IS_MAP);\n });\n\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n var define = function (that, key, value) {\n var state = getInternalState(that);\n var data = getWeakData(anObject(key), true);\n if (data === true) uncaughtFrozenStore(state).set(key, value);\n else data[state.id] = value;\n return that;\n };\n\n redefineAll(C.prototype, {\n // 23.3.3.2 WeakMap.prototype.delete(key)\n // 23.4.3.3 WeakSet.prototype.delete(value)\n 'delete': function (key) {\n var state = getInternalState(this);\n if (!isObject(key)) return false;\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state)['delete'](key);\n return data && has(data, state.id) && delete data[state.id];\n },\n // 23.3.3.4 WeakMap.prototype.has(key)\n // 23.4.3.4 WeakSet.prototype.has(value)\n has: function has$1(key) {\n var state = getInternalState(this);\n if (!isObject(key)) return false;\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state).has(key);\n return data && has(data, state.id);\n }\n });\n\n redefineAll(C.prototype, IS_MAP ? {\n // 23.3.3.3 WeakMap.prototype.get(key)\n get: function get(key) {\n var state = getInternalState(this);\n if (isObject(key)) {\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state).get(key);\n return data ? data[state.id] : undefined;\n }\n },\n // 23.3.3.5 WeakMap.prototype.set(key, value)\n set: function set(key, value) {\n return define(this, key, value);\n }\n } : {\n // 23.4.3.1 WeakSet.prototype.add(value)\n add: function add(value) {\n return define(this, value, true);\n }\n });\n\n return C;\n }\n };\n\n var es_weakMap = createCommonjsModule(function (module) {\n\n\n\n\n\n\n var enforceIternalState = internalState.enforce;\n\n\n var IS_IE11 = !global_1.ActiveXObject && 'ActiveXObject' in global_1;\n var isExtensible = Object.isExtensible;\n var InternalWeakMap;\n\n var wrapper = function (get) {\n return function WeakMap() {\n return get(this, arguments.length ? arguments[0] : undefined);\n };\n };\n\n // `WeakMap` constructor\n // https://tc39.github.io/ecma262/#sec-weakmap-constructor\n var $WeakMap = module.exports = collection('WeakMap', wrapper, collectionWeak, true, true);\n\n // IE11 WeakMap frozen keys fix\n // We can't use feature detection because it crash some old IE builds\n // https://github.com/zloirock/core-js/issues/485\n if (nativeWeakMap && IS_IE11) {\n InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true);\n internalMetadata.REQUIRED = true;\n var WeakMapPrototype = $WeakMap.prototype;\n var nativeDelete = WeakMapPrototype['delete'];\n var nativeHas = WeakMapPrototype.has;\n var nativeGet = WeakMapPrototype.get;\n var nativeSet = WeakMapPrototype.set;\n redefineAll(WeakMapPrototype, {\n 'delete': function (key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceIternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeDelete.call(this, key) || state.frozen['delete'](key);\n } return nativeDelete.call(this, key);\n },\n has: function has(key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceIternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeHas.call(this, key) || state.frozen.has(key);\n } return nativeHas.call(this, key);\n },\n get: function get(key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceIternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeHas.call(this, key) ? nativeGet.call(this, key) : state.frozen.get(key);\n } return nativeGet.call(this, key);\n },\n set: function set(key, value) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceIternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n nativeHas.call(this, key) ? nativeSet.call(this, key, value) : state.frozen.set(key, value);\n } else nativeSet.call(this, key, value);\n return this;\n }\n });\n }\n });\n\n // `Object.assign` method\n // https://tc39.github.io/ecma262/#sec-object.assign\n _export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, {\n assign: objectAssign\n });\n\n var non = '\\u200B\\u0085\\u180E';\n\n // check that a method works with the correct list\n // of whitespaces and has a correct name\n var forcedStringTrimMethod = function (METHOD_NAME) {\n return fails(function () {\n return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;\n });\n };\n\n var $trim = stringTrim.trim;\n\n\n // `String.prototype.trim` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.trim\n _export({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {\n trim: function trim() {\n return $trim(this);\n }\n });\n\n // `thisNumberValue` abstract operation\n // https://tc39.github.io/ecma262/#sec-thisnumbervalue\n var thisNumberValue = function (value) {\n if (typeof value != 'number' && classofRaw(value) != 'Number') {\n throw TypeError('Incorrect invocation');\n }\n return +value;\n };\n\n // `String.prototype.repeat` method implementation\n // https://tc39.github.io/ecma262/#sec-string.prototype.repeat\n var stringRepeat = ''.repeat || function repeat(count) {\n var str = String(requireObjectCoercible(this));\n var result = '';\n var n = toInteger(count);\n if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions');\n for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;\n return result;\n };\n\n var nativeToFixed = 1.0.toFixed;\n var floor$4 = Math.floor;\n\n var pow$1 = function (x, n, acc) {\n return n === 0 ? acc : n % 2 === 1 ? pow$1(x, n - 1, acc * x) : pow$1(x * x, n / 2, acc);\n };\n\n var log = function (x) {\n var n = 0;\n var x2 = x;\n while (x2 >= 4096) {\n n += 12;\n x2 /= 4096;\n }\n while (x2 >= 2) {\n n += 1;\n x2 /= 2;\n } return n;\n };\n\n var FORCED$1 = nativeToFixed && (\n 0.00008.toFixed(3) !== '0.000' ||\n 0.9.toFixed(0) !== '1' ||\n 1.255.toFixed(2) !== '1.25' ||\n 1000000000000000128.0.toFixed(0) !== '1000000000000000128'\n ) || !fails(function () {\n // V8 ~ Android 4.3-\n nativeToFixed.call({});\n });\n\n // `Number.prototype.toFixed` method\n // https://tc39.github.io/ecma262/#sec-number.prototype.tofixed\n _export({ target: 'Number', proto: true, forced: FORCED$1 }, {\n // eslint-disable-next-line max-statements\n toFixed: function toFixed(fractionDigits) {\n var number = thisNumberValue(this);\n var fractDigits = toInteger(fractionDigits);\n var data = [0, 0, 0, 0, 0, 0];\n var sign = '';\n var result = '0';\n var e, z, j, k;\n\n var multiply = function (n, c) {\n var index = -1;\n var c2 = c;\n while (++index < 6) {\n c2 += n * data[index];\n data[index] = c2 % 1e7;\n c2 = floor$4(c2 / 1e7);\n }\n };\n\n var divide = function (n) {\n var index = 6;\n var c = 0;\n while (--index >= 0) {\n c += data[index];\n data[index] = floor$4(c / n);\n c = (c % n) * 1e7;\n }\n };\n\n var dataToString = function () {\n var index = 6;\n var s = '';\n while (--index >= 0) {\n if (s !== '' || index === 0 || data[index] !== 0) {\n var t = String(data[index]);\n s = s === '' ? t : s + stringRepeat.call('0', 7 - t.length) + t;\n }\n } return s;\n };\n\n if (fractDigits < 0 || fractDigits > 20) throw RangeError('Incorrect fraction digits');\n // eslint-disable-next-line no-self-compare\n if (number != number) return 'NaN';\n if (number <= -1e21 || number >= 1e21) return String(number);\n if (number < 0) {\n sign = '-';\n number = -number;\n }\n if (number > 1e-21) {\n e = log(number * pow$1(2, 69, 1)) - 69;\n z = e < 0 ? number * pow$1(2, -e, 1) : number / pow$1(2, e, 1);\n z *= 0x10000000000000;\n e = 52 - e;\n if (e > 0) {\n multiply(0, z);\n j = fractDigits;\n while (j >= 7) {\n multiply(1e7, 0);\n j -= 7;\n }\n multiply(pow$1(10, j, 1), 0);\n j = e - 1;\n while (j >= 23) {\n divide(1 << 23);\n j -= 23;\n }\n divide(1 << j);\n multiply(1, 1);\n divide(2);\n result = dataToString();\n } else {\n multiply(0, z);\n multiply(1 << -e, 0);\n result = dataToString() + stringRepeat.call('0', fractDigits);\n }\n }\n if (fractDigits > 0) {\n k = result.length;\n result = sign + (k <= fractDigits\n ? '0.' + stringRepeat.call('0', fractDigits - k) + result\n : result.slice(0, k - fractDigits) + '.' + result.slice(k - fractDigits));\n } else {\n result = sign + result;\n } return result;\n }\n });\n\n var propertyIsEnumerable = objectPropertyIsEnumerable.f;\n\n // `Object.{ entries, values }` methods implementation\n var createMethod$4 = function (TO_ENTRIES) {\n return function (it) {\n var O = toIndexedObject(it);\n var keys = objectKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) {\n key = keys[i++];\n if (!descriptors || propertyIsEnumerable.call(O, key)) {\n result.push(TO_ENTRIES ? [key, O[key]] : O[key]);\n }\n }\n return result;\n };\n };\n\n var objectToArray = {\n // `Object.entries` method\n // https://tc39.github.io/ecma262/#sec-object.entries\n entries: createMethod$4(true),\n // `Object.values` method\n // https://tc39.github.io/ecma262/#sec-object.values\n values: createMethod$4(false)\n };\n\n var $entries = objectToArray.entries;\n\n // `Object.entries` method\n // https://tc39.github.io/ecma262/#sec-object.entries\n _export({ target: 'Object', stat: true }, {\n entries: function entries(O) {\n return $entries(O);\n }\n });\n\n var $values = objectToArray.values;\n\n // `Object.values` method\n // https://tc39.github.io/ecma262/#sec-object.values\n _export({ target: 'Object', stat: true }, {\n values: function values(O) {\n return $values(O);\n }\n });\n\n var defaults = {\n addCSS: true,\n // Add CSS to the element to improve usability (required here or in your CSS!)\n thumbWidth: 15,\n // The width of the thumb handle\n watch: true // Watch for new elements that match a string target\n\n };\n\n // Element matches a selector\n function matches(element, selector) {\n\n function match() {\n return Array.from(document.querySelectorAll(selector)).includes(this);\n }\n\n var matches = match;\n return matches.call(element, selector);\n }\n\n // Trigger event\n function trigger(element, type) {\n if (!element || !type) {\n return;\n } // Create and dispatch the event\n\n\n var event = new Event(type); // Dispatch the event\n\n element.dispatchEvent(event);\n }\n\n // `Number.isNaN` method\n // https://tc39.github.io/ecma262/#sec-number.isnan\n _export({ target: 'Number', stat: true }, {\n isNaN: function isNaN(number) {\n // eslint-disable-next-line no-self-compare\n return number != number;\n }\n });\n\n // ==========================================================================\n // Type checking utils\n // ==========================================================================\n var getConstructor = function getConstructor(input) {\n return input !== null && typeof input !== 'undefined' ? input.constructor : null;\n };\n\n var instanceOf = function instanceOf(input, constructor) {\n return Boolean(input && constructor && input instanceof constructor);\n };\n\n var isNullOrUndefined = function isNullOrUndefined(input) {\n return input === null || typeof input === 'undefined';\n };\n\n var isObject$1 = function isObject(input) {\n return getConstructor(input) === Object;\n };\n\n var isNumber = function isNumber(input) {\n return getConstructor(input) === Number && !Number.isNaN(input);\n };\n\n var isString = function isString(input) {\n return getConstructor(input) === String;\n };\n\n var isBoolean = function isBoolean(input) {\n return getConstructor(input) === Boolean;\n };\n\n var isFunction = function isFunction(input) {\n return getConstructor(input) === Function;\n };\n\n var isArray$1 = function isArray(input) {\n return Array.isArray(input);\n };\n\n var isNodeList = function isNodeList(input) {\n return instanceOf(input, NodeList);\n };\n\n var isElement = function isElement(input) {\n return instanceOf(input, Element);\n };\n\n var isEvent = function isEvent(input) {\n return instanceOf(input, Event);\n };\n\n var isEmpty = function isEmpty(input) {\n return isNullOrUndefined(input) || (isString(input) || isArray$1(input) || isNodeList(input)) && !input.length || isObject$1(input) && !Object.keys(input).length;\n };\n\n var is = {\n nullOrUndefined: isNullOrUndefined,\n object: isObject$1,\n number: isNumber,\n string: isString,\n boolean: isBoolean,\n function: isFunction,\n array: isArray$1,\n nodeList: isNodeList,\n element: isElement,\n event: isEvent,\n empty: isEmpty\n };\n\n // @@match logic\n fixRegexpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = regexp == undefined ? undefined : regexp[MATCH];\n return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match\n function (regexp) {\n var res = maybeCallNative(nativeMatch, regexp, this);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n\n if (!rx.global) return regexpExecAbstract(rx, S);\n\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regexpExecAbstract(rx, S)) !== null) {\n var matchStr = String(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n });\n\n // Get the number of decimal places\n function getDecimalPlaces(value) {\n var match = \"\".concat(value).match(/(?:\\.(\\d+))?(?:[eE]([+-]?\\d+))?$/);\n\n if (!match) {\n return 0;\n }\n\n return Math.max(0, // Number of digits right of decimal point.\n (match[1] ? match[1].length : 0) - ( // Adjust for scientific notation.\n match[2] ? +match[2] : 0));\n } // Round to the nearest step\n\n function round(number, step) {\n if (step < 1) {\n var places = getDecimalPlaces(step);\n return parseFloat(number.toFixed(places));\n }\n\n return Math.round(number / step) * step;\n }\n\n var RangeTouch =\n /*#__PURE__*/\n function () {\n /**\n * Setup a new instance\n * @param {String|Element} target\n * @param {Object} options\n */\n function RangeTouch(target, options) {\n _classCallCheck(this, RangeTouch);\n\n if (is.element(target)) {\n // An Element is passed, use it directly\n this.element = target;\n } else if (is.string(target)) {\n // A CSS Selector is passed, fetch it from the DOM\n this.element = document.querySelector(target);\n }\n\n if (!is.element(this.element) || !is.empty(this.element.rangeTouch)) {\n return;\n }\n\n this.config = Object.assign({}, defaults, options);\n this.init();\n }\n\n _createClass(RangeTouch, [{\n key: \"init\",\n value: function init() {\n // Bail if not a touch enabled device\n if (!RangeTouch.enabled) {\n return;\n } // Add useful CSS\n\n\n if (this.config.addCSS) {\n // TODO: Restore original values on destroy\n this.element.style.userSelect = 'none';\n this.element.style.webKitUserSelect = 'none';\n this.element.style.touchAction = 'manipulation';\n }\n\n this.listeners(true);\n this.element.rangeTouch = this;\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n // Bail if not a touch enabled device\n if (!RangeTouch.enabled) {\n return;\n }\n\n this.listeners(false);\n this.element.rangeTouch = null;\n }\n }, {\n key: \"listeners\",\n value: function listeners(toggle) {\n var _this = this;\n\n var method = toggle ? 'addEventListener' : 'removeEventListener'; // Listen for events\n\n ['touchstart', 'touchmove', 'touchend'].forEach(function (type) {\n _this.element[method](type, function (event) {\n return _this.set(event);\n }, false);\n });\n }\n /**\n * Get the value based on touch position\n * @param {Event} event\n */\n\n }, {\n key: \"get\",\n value: function get(event) {\n if (!RangeTouch.enabled || !is.event(event)) {\n return null;\n }\n\n var input = event.target;\n var touch = event.changedTouches[0];\n var min = parseFloat(input.getAttribute('min')) || 0;\n var max = parseFloat(input.getAttribute('max')) || 100;\n var step = parseFloat(input.getAttribute('step')) || 1;\n var delta = max - min; // Calculate percentage\n\n var percent;\n var clientRect = input.getBoundingClientRect();\n var thumbWidth = 100 / clientRect.width * (this.config.thumbWidth / 2) / 100; // Determine left percentage\n\n percent = 100 / clientRect.width * (touch.clientX - clientRect.left); // Don't allow outside bounds\n\n if (percent < 0) {\n percent = 0;\n } else if (percent > 100) {\n percent = 100;\n } // Factor in the thumb offset\n\n\n if (percent < 50) {\n percent -= (100 - percent * 2) * thumbWidth;\n } else if (percent > 50) {\n percent += (percent - 50) * 2 * thumbWidth;\n } // Find the closest step to the mouse position\n\n\n return min + round(delta * (percent / 100), step);\n }\n /**\n * Update range value based on position\n * @param {Event} event\n */\n\n }, {\n key: \"set\",\n value: function set(event) {\n if (!RangeTouch.enabled || !is.event(event) || event.target.disabled) {\n return;\n } // Prevent text highlight on iOS\n\n\n event.preventDefault(); // Set value\n\n event.target.value = this.get(event); // Trigger event\n\n trigger(event.target, event.type === 'touchend' ? 'change' : 'input');\n }\n }], [{\n key: \"setup\",\n\n /**\n * Setup multiple instances\n * @param {String|Element|NodeList|Array} target\n * @param {Object} options\n */\n value: function setup(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var targets = null;\n\n if (is.empty(target) || is.string(target)) {\n targets = Array.from(document.querySelectorAll(is.string(target) ? target : 'input[type=\"range\"]'));\n } else if (is.element(target)) {\n targets = [target];\n } else if (is.nodeList(target)) {\n targets = Array.from(target);\n } else if (is.array(target)) {\n targets = target.filter(is.element);\n }\n\n if (is.empty(targets)) {\n return null;\n }\n\n var config = Object.assign({}, defaults, options);\n\n if (is.string(target) && config.watch) {\n // Create an observer instance\n var observer = new MutationObserver(function (mutations) {\n Array.from(mutations).forEach(function (mutation) {\n Array.from(mutation.addedNodes).forEach(function (node) {\n if (!is.element(node) || !matches(node, target)) {\n return;\n } // eslint-disable-next-line no-unused-vars\n\n\n var range = new RangeTouch(node, config);\n });\n });\n }); // Pass in the target node, as well as the observer options\n\n observer.observe(document.body, {\n childList: true,\n subtree: true\n });\n }\n\n return targets.map(function (t) {\n return new RangeTouch(t, options);\n });\n }\n }, {\n key: \"enabled\",\n get: function get() {\n return 'ontouchstart' in document.documentElement;\n }\n }]);\n\n return RangeTouch;\n }();\n\n var SPECIES$5 = wellKnownSymbol('species');\n\n var setSpecies = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n var defineProperty = objectDefineProperty.f;\n\n if (descriptors && Constructor && !Constructor[SPECIES$5]) {\n defineProperty(Constructor, SPECIES$5, {\n configurable: true,\n get: function () { return this; }\n });\n }\n };\n\n var location = global_1.location;\n var set$1 = global_1.setImmediate;\n var clear = global_1.clearImmediate;\n var process = global_1.process;\n var MessageChannel = global_1.MessageChannel;\n var Dispatch = global_1.Dispatch;\n var counter = 0;\n var queue = {};\n var ONREADYSTATECHANGE = 'onreadystatechange';\n var defer, channel, port;\n\n var run = function (id) {\n // eslint-disable-next-line no-prototype-builtins\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n };\n\n var runner = function (id) {\n return function () {\n run(id);\n };\n };\n\n var listener = function (event) {\n run(event.data);\n };\n\n var post = function (id) {\n // old engines have not location.origin\n global_1.postMessage(id + '', location.protocol + '//' + location.host);\n };\n\n // Node.js 0.9+ & IE10+ has setImmediate, otherwise:\n if (!set$1 || !clear) {\n set$1 = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\n (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);\n };\n defer(counter);\n return counter;\n };\n clear = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (classofRaw(process) == 'process') {\n defer = function (id) {\n process.nextTick(runner(id));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(runner(id));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if (MessageChannel) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = bindContext(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (global_1.addEventListener && typeof postMessage == 'function' && !global_1.importScripts && !fails(post)) {\n defer = post;\n global_1.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in documentCreateElement('script')) {\n defer = function (id) {\n html.appendChild(documentCreateElement('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(runner(id), 0);\n };\n }\n }\n\n var task = {\n set: set$1,\n clear: clear\n };\n\n var userAgent = getBuiltIn('navigator', 'userAgent') || '';\n\n var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f;\n\n var macrotask = task.set;\n\n\n var MutationObserver$1 = global_1.MutationObserver || global_1.WebKitMutationObserver;\n var process$1 = global_1.process;\n var Promise$1 = global_1.Promise;\n var IS_NODE = classofRaw(process$1) == 'process';\n // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`\n var queueMicrotaskDescriptor = getOwnPropertyDescriptor$3(global_1, 'queueMicrotask');\n var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;\n\n var flush, head, last, notify, toggle, node, promise;\n\n // modern engines have queueMicrotask method\n if (!queueMicrotask) {\n flush = function () {\n var parent, fn;\n if (IS_NODE && (parent = process$1.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (error) {\n if (head) notify();\n else last = undefined;\n throw error;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // Node.js\n if (IS_NODE) {\n notify = function () {\n process$1.nextTick(flush);\n };\n // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339\n } else if (MutationObserver$1 && !/(iphone|ipod|ipad).*applewebkit/i.test(userAgent)) {\n toggle = true;\n node = document.createTextNode('');\n new MutationObserver$1(flush).observe(node, { characterData: true }); // eslint-disable-line no-new\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise$1 && Promise$1.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n promise = Promise$1.resolve(undefined);\n notify = function () {\n promise.then(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global_1, flush);\n };\n }\n }\n\n var microtask = queueMicrotask || function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n };\n\n var PromiseCapability = function (C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction$1(resolve);\n this.reject = aFunction$1(reject);\n };\n\n // 25.4.1.5 NewPromiseCapability(C)\n var f$7 = function (C) {\n return new PromiseCapability(C);\n };\n\n var newPromiseCapability = {\n \tf: f$7\n };\n\n var promiseResolve = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n };\n\n var hostReportErrors = function (a, b) {\n var console = global_1.console;\n if (console && console.error) {\n arguments.length === 1 ? console.error(a) : console.error(a, b);\n }\n };\n\n var perform = function (exec) {\n try {\n return { error: false, value: exec() };\n } catch (error) {\n return { error: true, value: error };\n }\n };\n\n var task$1 = task.set;\n\n\n\n\n\n\n\n\n\n\n var SPECIES$6 = wellKnownSymbol('species');\n var PROMISE = 'Promise';\n var getInternalState$3 = internalState.get;\n var setInternalState$6 = internalState.set;\n var getInternalPromiseState = internalState.getterFor(PROMISE);\n var PromiseConstructor = global_1[PROMISE];\n var TypeError$1 = global_1.TypeError;\n var document$2 = global_1.document;\n var process$2 = global_1.process;\n var $fetch = global_1.fetch;\n var versions = process$2 && process$2.versions;\n var v8 = versions && versions.v8 || '';\n var newPromiseCapability$1 = newPromiseCapability.f;\n var newGenericPromiseCapability = newPromiseCapability$1;\n var IS_NODE$1 = classofRaw(process$2) == 'process';\n var DISPATCH_EVENT = !!(document$2 && document$2.createEvent && global_1.dispatchEvent);\n var UNHANDLED_REJECTION = 'unhandledrejection';\n var REJECTION_HANDLED = 'rejectionhandled';\n var PENDING = 0;\n var FULFILLED = 1;\n var REJECTED = 2;\n var HANDLED = 1;\n var UNHANDLED = 2;\n var Internal, OwnPromiseCapability, PromiseWrapper;\n\n var FORCED$2 = isForced_1(PROMISE, function () {\n // correct subclassing with @@species support\n var promise = PromiseConstructor.resolve(1);\n var empty = function () { /* empty */ };\n var FakePromise = (promise.constructor = {})[SPECIES$6] = function (exec) {\n exec(empty, empty);\n };\n // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return !((IS_NODE$1 || typeof PromiseRejectionEvent == 'function')\n && (!isPure || promise['finally'])\n && promise.then(empty) instanceof FakePromise\n // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // we can't detect it synchronously, so just check versions\n && v8.indexOf('6.6') !== 0\n && userAgent.indexOf('Chrome/66') === -1);\n });\n\n var INCORRECT_ITERATION$1 = FORCED$2 || !checkCorrectnessOfIteration(function (iterable) {\n PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });\n });\n\n // helpers\n var isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n };\n\n var notify$1 = function (promise, state, isReject) {\n if (state.notified) return;\n state.notified = true;\n var chain = state.reactions;\n microtask(function () {\n var value = state.value;\n var ok = state.state == FULFILLED;\n var index = 0;\n // variable length - can't use forEach\n while (chain.length > index) {\n var reaction = chain[index++];\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (state.rejection === UNHANDLED) onHandleUnhandled(promise, state);\n state.rejection = HANDLED;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // can throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError$1('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (error) {\n if (domain && !exited) domain.exit();\n reject(error);\n }\n }\n state.reactions = [];\n state.notified = false;\n if (isReject && !state.rejection) onUnhandled(promise, state);\n });\n };\n\n var dispatchEvent = function (name, promise, reason) {\n var event, handler;\n if (DISPATCH_EVENT) {\n event = document$2.createEvent('Event');\n event.promise = promise;\n event.reason = reason;\n event.initEvent(name, false, true);\n global_1.dispatchEvent(event);\n } else event = { promise: promise, reason: reason };\n if (handler = global_1['on' + name]) handler(event);\n else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n };\n\n var onUnhandled = function (promise, state) {\n task$1.call(global_1, function () {\n var value = state.value;\n var IS_UNHANDLED = isUnhandled(state);\n var result;\n if (IS_UNHANDLED) {\n result = perform(function () {\n if (IS_NODE$1) {\n process$2.emit('unhandledRejection', value, promise);\n } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n state.rejection = IS_NODE$1 || isUnhandled(state) ? UNHANDLED : HANDLED;\n if (result.error) throw result.value;\n }\n });\n };\n\n var isUnhandled = function (state) {\n return state.rejection !== HANDLED && !state.parent;\n };\n\n var onHandleUnhandled = function (promise, state) {\n task$1.call(global_1, function () {\n if (IS_NODE$1) {\n process$2.emit('rejectionHandled', promise);\n } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n });\n };\n\n var bind = function (fn, promise, state, unwrap) {\n return function (value) {\n fn(promise, state, value, unwrap);\n };\n };\n\n var internalReject = function (promise, state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n state.value = value;\n state.state = REJECTED;\n notify$1(promise, state, true);\n };\n\n var internalResolve = function (promise, state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n try {\n if (promise === value) throw TypeError$1(\"Promise can't be resolved itself\");\n var then = isThenable(value);\n if (then) {\n microtask(function () {\n var wrapper = { done: false };\n try {\n then.call(value,\n bind(internalResolve, promise, wrapper, state),\n bind(internalReject, promise, wrapper, state)\n );\n } catch (error) {\n internalReject(promise, wrapper, error, state);\n }\n });\n } else {\n state.value = value;\n state.state = FULFILLED;\n notify$1(promise, state, false);\n }\n } catch (error) {\n internalReject(promise, { done: false }, error, state);\n }\n };\n\n // constructor polyfill\n if (FORCED$2) {\n // 25.4.3.1 Promise(executor)\n PromiseConstructor = function Promise(executor) {\n anInstance(this, PromiseConstructor, PROMISE);\n aFunction$1(executor);\n Internal.call(this);\n var state = getInternalState$3(this);\n try {\n executor(bind(internalResolve, this, state), bind(internalReject, this, state));\n } catch (error) {\n internalReject(this, state, error);\n }\n };\n // eslint-disable-next-line no-unused-vars\n Internal = function Promise(executor) {\n setInternalState$6(this, {\n type: PROMISE,\n done: false,\n notified: false,\n parent: false,\n reactions: [],\n rejection: false,\n state: PENDING,\n value: undefined\n });\n };\n Internal.prototype = redefineAll(PromiseConstructor.prototype, {\n // `Promise.prototype.then` method\n // https://tc39.github.io/ecma262/#sec-promise.prototype.then\n then: function then(onFulfilled, onRejected) {\n var state = getInternalPromiseState(this);\n var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = IS_NODE$1 ? process$2.domain : undefined;\n state.parent = true;\n state.reactions.push(reaction);\n if (state.state != PENDING) notify$1(this, state, false);\n return reaction.promise;\n },\n // `Promise.prototype.catch` method\n // https://tc39.github.io/ecma262/#sec-promise.prototype.catch\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n var state = getInternalState$3(promise);\n this.promise = promise;\n this.resolve = bind(internalResolve, promise, state);\n this.reject = bind(internalReject, promise, state);\n };\n newPromiseCapability.f = newPromiseCapability$1 = function (C) {\n return C === PromiseConstructor || C === PromiseWrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n\n // wrap fetch result\n if (typeof $fetch == 'function') _export({ global: true, enumerable: true, forced: true }, {\n // eslint-disable-next-line no-unused-vars\n fetch: function fetch(input) {\n return promiseResolve(PromiseConstructor, $fetch.apply(global_1, arguments));\n }\n });\n }\n\n _export({ global: true, wrap: true, forced: FORCED$2 }, {\n Promise: PromiseConstructor\n });\n\n setToStringTag(PromiseConstructor, PROMISE, false);\n setSpecies(PROMISE);\n\n PromiseWrapper = path[PROMISE];\n\n // statics\n _export({ target: PROMISE, stat: true, forced: FORCED$2 }, {\n // `Promise.reject` method\n // https://tc39.github.io/ecma262/#sec-promise.reject\n reject: function reject(r) {\n var capability = newPromiseCapability$1(this);\n capability.reject.call(undefined, r);\n return capability.promise;\n }\n });\n\n _export({ target: PROMISE, stat: true, forced: FORCED$2 }, {\n // `Promise.resolve` method\n // https://tc39.github.io/ecma262/#sec-promise.resolve\n resolve: function resolve(x) {\n return promiseResolve(this, x);\n }\n });\n\n _export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION$1 }, {\n // `Promise.all` method\n // https://tc39.github.io/ecma262/#sec-promise.all\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability$1(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aFunction$1(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate_1(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n $promiseResolve.call(C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n },\n // `Promise.race` method\n // https://tc39.github.io/ecma262/#sec-promise.race\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability$1(C);\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aFunction$1(C.resolve);\n iterate_1(iterable, function (promise) {\n $promiseResolve.call(C, promise).then(capability.resolve, reject);\n });\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n });\n\n var nativeStartsWith = ''.startsWith;\n var min$4 = Math.min;\n\n // `String.prototype.startsWith` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.startswith\n _export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('startsWith') }, {\n startsWith: function startsWith(searchString /* , position = 0 */) {\n var that = String(requireObjectCoercible(this));\n notARegexp(searchString);\n var index = toLength(min$4(arguments.length > 1 ? arguments[1] : undefined, that.length));\n var search = String(searchString);\n return nativeStartsWith\n ? nativeStartsWith.call(that, search, index)\n : that.slice(index, index + search.length) === search;\n }\n });\n\n // ==========================================================================\n // Type checking utils\n // ==========================================================================\n var getConstructor$1 = function getConstructor(input) {\n return input !== null && typeof input !== 'undefined' ? input.constructor : null;\n };\n\n var instanceOf$1 = function instanceOf(input, constructor) {\n return Boolean(input && constructor && input instanceof constructor);\n };\n\n var isNullOrUndefined$1 = function isNullOrUndefined(input) {\n return input === null || typeof input === 'undefined';\n };\n\n var isObject$2 = function isObject(input) {\n return getConstructor$1(input) === Object;\n };\n\n var isNumber$1 = function isNumber(input) {\n return getConstructor$1(input) === Number && !Number.isNaN(input);\n };\n\n var isString$1 = function isString(input) {\n return getConstructor$1(input) === String;\n };\n\n var isBoolean$1 = function isBoolean(input) {\n return getConstructor$1(input) === Boolean;\n };\n\n var isFunction$1 = function isFunction(input) {\n return getConstructor$1(input) === Function;\n };\n\n var isArray$2 = function isArray(input) {\n return Array.isArray(input);\n };\n\n var isWeakMap = function isWeakMap(input) {\n return instanceOf$1(input, WeakMap);\n };\n\n var isNodeList$1 = function isNodeList(input) {\n return instanceOf$1(input, NodeList);\n };\n\n var isElement$1 = function isElement(input) {\n return instanceOf$1(input, Element);\n };\n\n var isTextNode = function isTextNode(input) {\n return getConstructor$1(input) === Text;\n };\n\n var isEvent$1 = function isEvent(input) {\n return instanceOf$1(input, Event);\n };\n\n var isKeyboardEvent = function isKeyboardEvent(input) {\n return instanceOf$1(input, KeyboardEvent);\n };\n\n var isCue = function isCue(input) {\n return instanceOf$1(input, window.TextTrackCue) || instanceOf$1(input, window.VTTCue);\n };\n\n var isTrack = function isTrack(input) {\n return instanceOf$1(input, TextTrack) || !isNullOrUndefined$1(input) && isString$1(input.kind);\n };\n\n var isPromise = function isPromise(input) {\n return instanceOf$1(input, Promise);\n };\n\n var isEmpty$1 = function isEmpty(input) {\n return isNullOrUndefined$1(input) || (isString$1(input) || isArray$2(input) || isNodeList$1(input)) && !input.length || isObject$2(input) && !Object.keys(input).length;\n };\n\n var isUrl = function isUrl(input) {\n // Accept a URL object\n if (instanceOf$1(input, window.URL)) {\n return true;\n } // Must be string from here\n\n\n if (!isString$1(input)) {\n return false;\n } // Add the protocol if required\n\n\n var string = input;\n\n if (!input.startsWith('http://') || !input.startsWith('https://')) {\n string = \"http://\".concat(input);\n }\n\n try {\n return !isEmpty$1(new URL(string).hostname);\n } catch (e) {\n return false;\n }\n };\n\n var is$1 = {\n nullOrUndefined: isNullOrUndefined$1,\n object: isObject$2,\n number: isNumber$1,\n string: isString$1,\n boolean: isBoolean$1,\n function: isFunction$1,\n array: isArray$2,\n weakMap: isWeakMap,\n nodeList: isNodeList$1,\n element: isElement$1,\n textNode: isTextNode,\n event: isEvent$1,\n keyboardEvent: isKeyboardEvent,\n cue: isCue,\n track: isTrack,\n promise: isPromise,\n url: isUrl,\n empty: isEmpty$1\n };\n\n var transitionEndEvent = function () {\n var element = document.createElement('span');\n var events = {\n WebkitTransition: 'webkitTransitionEnd',\n MozTransition: 'transitionend',\n OTransition: 'oTransitionEnd otransitionend',\n transition: 'transitionend'\n };\n var type = Object.keys(events).find(function (event) {\n return element.style[event] !== undefined;\n });\n return is$1.string(type) ? events[type] : false;\n }(); // Force repaint of element\n\n function repaint(element, delay) {\n setTimeout(function () {\n try {\n // eslint-disable-next-line no-param-reassign\n element.hidden = true; // eslint-disable-next-line no-unused-expressions\n\n element.offsetHeight; // eslint-disable-next-line no-param-reassign\n\n element.hidden = false;\n } catch (e) {// Do nothing\n }\n }, delay);\n }\n\n // ==========================================================================\n // Browser sniffing\n // Unfortunately, due to mixed support, UA sniffing is required\n // ==========================================================================\n var browser = {\n isIE:\n /* @cc_on!@ */\n !!document.documentMode,\n isEdge: window.navigator.userAgent.includes('Edge'),\n isWebkit: 'WebkitAppearance' in document.documentElement.style && !/Edge/.test(navigator.userAgent),\n isIPhone: /(iPhone|iPod)/gi.test(navigator.platform),\n isIos: /(iPad|iPhone|iPod)/gi.test(navigator.platform)\n };\n\n // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n // https://www.youtube.com/watch?v=NPM6172J22g\n\n var supportsPassiveListeners = function () {\n // Test via a getter in the options object to see if the passive property is accessed\n var supported = false;\n\n try {\n var options = Object.defineProperty({}, 'passive', {\n get: function get() {\n supported = true;\n return null;\n }\n });\n window.addEventListener('test', null, options);\n window.removeEventListener('test', null, options);\n } catch (e) {// Do nothing\n }\n\n return supported;\n }(); // Toggle event listener\n\n\n function toggleListener(element, event, callback) {\n var _this = this;\n\n var toggle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var passive = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n var capture = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;\n\n // Bail if no element, event, or callback\n if (!element || !('addEventListener' in element) || is$1.empty(event) || !is$1.function(callback)) {\n return;\n } // Allow multiple events\n\n\n var events = event.split(' '); // Build options\n // Default to just the capture boolean for browsers with no passive listener support\n\n var options = capture; // If passive events listeners are supported\n\n if (supportsPassiveListeners) {\n options = {\n // Whether the listener can be passive (i.e. default never prevented)\n passive: passive,\n // Whether the listener is a capturing listener or not\n capture: capture\n };\n } // If a single node is passed, bind the event listener\n\n\n events.forEach(function (type) {\n if (_this && _this.eventListeners && toggle) {\n // Cache event listener\n _this.eventListeners.push({\n element: element,\n type: type,\n callback: callback,\n options: options\n });\n }\n\n element[toggle ? 'addEventListener' : 'removeEventListener'](type, callback, options);\n });\n } // Bind event handler\n\n function on(element) {\n var events = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var callback = arguments.length > 2 ? arguments[2] : undefined;\n var passive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n var capture = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n toggleListener.call(this, element, events, callback, true, passive, capture);\n } // Unbind event handler\n\n function off(element) {\n var events = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var callback = arguments.length > 2 ? arguments[2] : undefined;\n var passive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n var capture = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n toggleListener.call(this, element, events, callback, false, passive, capture);\n } // Bind once-only event handler\n\n function once(element) {\n var _this2 = this;\n\n var events = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var callback = arguments.length > 2 ? arguments[2] : undefined;\n var passive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n var capture = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\n var onceCallback = function onceCallback() {\n off(element, events, onceCallback, passive, capture);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n callback.apply(_this2, args);\n };\n\n toggleListener.call(this, element, events, onceCallback, true, passive, capture);\n } // Trigger event\n\n function triggerEvent(element) {\n var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var bubbles = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var detail = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n // Bail if no element\n if (!is$1.element(element) || is$1.empty(type)) {\n return;\n } // Create and dispatch the event\n\n\n var event = new CustomEvent(type, {\n bubbles: bubbles,\n detail: Object.assign({}, detail, {\n plyr: this\n })\n }); // Dispatch the event\n\n element.dispatchEvent(event);\n } // Unbind all cached event listeners\n\n function unbindListeners() {\n if (this && this.eventListeners) {\n this.eventListeners.forEach(function (item) {\n var element = item.element,\n type = item.type,\n callback = item.callback,\n options = item.options;\n element.removeEventListener(type, callback, options);\n });\n this.eventListeners = [];\n }\n } // Run method when / if player is ready\n\n function ready() {\n var _this3 = this;\n\n return new Promise(function (resolve) {\n return _this3.ready ? setTimeout(resolve, 0) : on.call(_this3, _this3.elements.container, 'ready', resolve);\n }).then(function () {});\n }\n\n function cloneDeep(object) {\n return JSON.parse(JSON.stringify(object));\n } // Get a nested value in an object\n\n function getDeep(object, path) {\n return path.split('.').reduce(function (obj, key) {\n return obj && obj[key];\n }, object);\n } // Deep extend destination object with N more objects\n\n function extend() {\n var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n sources[_key - 1] = arguments[_key];\n }\n\n if (!sources.length) {\n return target;\n }\n\n var source = sources.shift();\n\n if (!is$1.object(source)) {\n return target;\n }\n\n Object.keys(source).forEach(function (key) {\n if (is$1.object(source[key])) {\n if (!Object.keys(target).includes(key)) {\n Object.assign(target, _defineProperty({}, key, {}));\n }\n\n extend(target[key], source[key]);\n } else {\n Object.assign(target, _defineProperty({}, key, source[key]));\n }\n });\n return extend.apply(void 0, [target].concat(sources));\n }\n\n function wrap$1(elements, wrapper) {\n // Convert `elements` to an array, if necessary.\n var targets = elements.length ? elements : [elements]; // Loops backwards to prevent having to clone the wrapper on the\n // first element (see `child` below).\n\n Array.from(targets).reverse().forEach(function (element, index) {\n var child = index > 0 ? wrapper.cloneNode(true) : wrapper; // Cache the current parent and sibling.\n\n var parent = element.parentNode;\n var sibling = element.nextSibling; // Wrap the element (is automatically removed from its current\n // parent).\n\n child.appendChild(element); // If the element had a sibling, insert the wrapper before\n // the sibling to maintain the HTML structure; otherwise, just\n // append it to the parent.\n\n if (sibling) {\n parent.insertBefore(child, sibling);\n } else {\n parent.appendChild(child);\n }\n });\n } // Set attributes\n\n function setAttributes(element, attributes) {\n if (!is$1.element(element) || is$1.empty(attributes)) {\n return;\n } // Assume null and undefined attributes should be left out,\n // Setting them would otherwise convert them to \"null\" and \"undefined\"\n\n\n Object.entries(attributes).filter(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n value = _ref2[1];\n\n return !is$1.nullOrUndefined(value);\n }).forEach(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n key = _ref4[0],\n value = _ref4[1];\n\n return element.setAttribute(key, value);\n });\n } // Create a DocumentFragment\n\n function createElement(type, attributes, text) {\n // Create a new <element>\n var element = document.createElement(type); // Set all passed attributes\n\n if (is$1.object(attributes)) {\n setAttributes(element, attributes);\n } // Add text node\n\n\n if (is$1.string(text)) {\n element.innerText = text;\n } // Return built element\n\n\n return element;\n } // Inaert an element after another\n\n function insertAfter(element, target) {\n if (!is$1.element(element) || !is$1.element(target)) {\n return;\n }\n\n target.parentNode.insertBefore(element, target.nextSibling);\n } // Insert a DocumentFragment\n\n function insertElement(type, parent, attributes, text) {\n if (!is$1.element(parent)) {\n return;\n }\n\n parent.appendChild(createElement(type, attributes, text));\n } // Remove element(s)\n\n function removeElement(element) {\n if (is$1.nodeList(element) || is$1.array(element)) {\n Array.from(element).forEach(removeElement);\n return;\n }\n\n if (!is$1.element(element) || !is$1.element(element.parentNode)) {\n return;\n }\n\n element.parentNode.removeChild(element);\n } // Remove all child elements\n\n function emptyElement(element) {\n if (!is$1.element(element)) {\n return;\n }\n\n var length = element.childNodes.length;\n\n while (length > 0) {\n element.removeChild(element.lastChild);\n length -= 1;\n }\n } // Replace element\n\n function replaceElement(newChild, oldChild) {\n if (!is$1.element(oldChild) || !is$1.element(oldChild.parentNode) || !is$1.element(newChild)) {\n return null;\n }\n\n oldChild.parentNode.replaceChild(newChild, oldChild);\n return newChild;\n } // Get an attribute object from a string selector\n\n function getAttributesFromSelector(sel, existingAttributes) {\n // For example:\n // '.test' to { class: 'test' }\n // '#test' to { id: 'test' }\n // '[data-test=\"test\"]' to { 'data-test': 'test' }\n if (!is$1.string(sel) || is$1.empty(sel)) {\n return {};\n }\n\n var attributes = {};\n var existing = extend({}, existingAttributes);\n sel.split(',').forEach(function (s) {\n // Remove whitespace\n var selector = s.trim();\n var className = selector.replace('.', '');\n var stripped = selector.replace(/[[\\]]/g, ''); // Get the parts and value\n\n var parts = stripped.split('=');\n\n var _parts = _slicedToArray(parts, 1),\n key = _parts[0];\n\n var value = parts.length > 1 ? parts[1].replace(/[\"']/g, '') : ''; // Get the first character\n\n var start = selector.charAt(0);\n\n switch (start) {\n case '.':\n // Add to existing classname\n if (is$1.string(existing.class)) {\n attributes.class = \"\".concat(existing.class, \" \").concat(className);\n } else {\n attributes.class = className;\n }\n\n break;\n\n case '#':\n // ID selector\n attributes.id = selector.replace('#', '');\n break;\n\n case '[':\n // Attribute selector\n attributes[key] = value;\n break;\n\n default:\n break;\n }\n });\n return extend(existing, attributes);\n } // Toggle hidden\n\n function toggleHidden(element, hidden) {\n if (!is$1.element(element)) {\n return;\n }\n\n var hide = hidden;\n\n if (!is$1.boolean(hide)) {\n hide = !element.hidden;\n } // eslint-disable-next-line no-param-reassign\n\n\n element.hidden = hide;\n } // Mirror Element.classList.toggle, with IE compatibility for \"force\" argument\n\n function toggleClass(element, className, force) {\n if (is$1.nodeList(element)) {\n return Array.from(element).map(function (e) {\n return toggleClass(e, className, force);\n });\n }\n\n if (is$1.element(element)) {\n var method = 'toggle';\n\n if (typeof force !== 'undefined') {\n method = force ? 'add' : 'remove';\n }\n\n element.classList[method](className);\n return element.classList.contains(className);\n }\n\n return false;\n } // Has class name\n\n function hasClass(element, className) {\n return is$1.element(element) && element.classList.contains(className);\n } // Element matches selector\n\n function matches$1(element, selector) {\n\n function match() {\n return Array.from(document.querySelectorAll(selector)).includes(this);\n }\n\n var method = match;\n return method.call(element, selector);\n } // Find all elements\n\n function getElements(selector) {\n return this.elements.container.querySelectorAll(selector);\n } // Find a single element\n\n function getElement(selector) {\n return this.elements.container.querySelector(selector);\n } // Trap focus inside container\n\n function trapFocus() {\n var element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n var toggle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (!is$1.element(element)) {\n return;\n }\n\n var focusable = getElements.call(this, 'button:not(:disabled), input:not(:disabled), [tabindex]');\n var first = focusable[0];\n var last = focusable[focusable.length - 1];\n\n var trap = function trap(event) {\n // Bail if not tab key or not fullscreen\n if (event.key !== 'Tab' || event.keyCode !== 9) {\n return;\n } // Get the current focused element\n\n\n var focused = document.activeElement;\n\n if (focused === last && !event.shiftKey) {\n // Move focus to first element that can be tabbed if Shift isn't used\n first.focus();\n event.preventDefault();\n } else if (focused === first && event.shiftKey) {\n // Move focus to last element that can be tabbed if Shift is used\n last.focus();\n event.preventDefault();\n }\n };\n\n toggleListener.call(this, this.elements.container, 'keydown', trap, toggle, false);\n } // Set focus and tab focus class\n\n function setFocus() {\n var element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n var tabFocus = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (!is$1.element(element)) {\n return;\n } // Set regular focus\n\n\n element.focus({\n preventScroll: true\n }); // If we want to mimic keyboard focus via tab\n\n if (tabFocus) {\n toggleClass(element, this.config.classNames.tabFocus);\n }\n }\n\n var defaultCodecs = {\n 'audio/ogg': 'vorbis',\n 'audio/wav': '1',\n 'video/webm': 'vp8, vorbis',\n 'video/mp4': 'avc1.42E01E, mp4a.40.2',\n 'video/ogg': 'theora'\n }; // Check for feature support\n\n var support = {\n // Basic support\n audio: 'canPlayType' in document.createElement('audio'),\n video: 'canPlayType' in document.createElement('video'),\n // Check for support\n // Basic functionality vs full UI\n check: function check(type, provider, playsinline) {\n var canPlayInline = browser.isIPhone && playsinline && support.playsinline;\n var api = support[type] || provider !== 'html5';\n var ui = api && support.rangeInput && (type !== 'video' || !browser.isIPhone || canPlayInline);\n return {\n api: api,\n ui: ui\n };\n },\n // Picture-in-picture support\n // Safari & Chrome only currently\n pip: function () {\n if (browser.isIPhone) {\n return false;\n } // Safari\n // https://developer.apple.com/documentation/webkitjs/adding_picture_in_picture_to_your_safari_media_controls\n\n\n if (is$1.function(createElement('video').webkitSetPresentationMode)) {\n return true;\n } // Chrome\n // https://developers.google.com/web/updates/2018/10/watch-video-using-picture-in-picture\n\n\n if (document.pictureInPictureEnabled && !createElement('video').disablePictureInPicture) {\n return true;\n }\n\n return false;\n }(),\n // Airplay support\n // Safari only currently\n airplay: is$1.function(window.WebKitPlaybackTargetAvailabilityEvent),\n // Inline playback support\n // https://webkit.org/blog/6784/new-video-policies-for-ios/\n playsinline: 'playsInline' in document.createElement('video'),\n // Check for mime type support against a player instance\n // Credits: http://diveintohtml5.info/everything.html\n // Related: http://www.leanbackplayer.com/test/h5mt.html\n mime: function mime(input) {\n if (is$1.empty(input)) {\n return false;\n }\n\n var _input$split = input.split('/'),\n _input$split2 = _slicedToArray(_input$split, 1),\n mediaType = _input$split2[0];\n\n var type = input; // Verify we're using HTML5 and there's no media type mismatch\n\n if (!this.isHTML5 || mediaType !== this.type) {\n return false;\n } // Add codec if required\n\n\n if (Object.keys(defaultCodecs).includes(type)) {\n type += \"; codecs=\\\"\".concat(defaultCodecs[input], \"\\\"\");\n }\n\n try {\n return Boolean(type && this.media.canPlayType(type).replace(/no/, ''));\n } catch (e) {\n return false;\n }\n },\n // Check for textTracks support\n textTracks: 'textTracks' in document.createElement('video'),\n // <input type=\"range\"> Sliders\n rangeInput: function () {\n var range = document.createElement('input');\n range.type = 'range';\n return range.type === 'range';\n }(),\n // Touch\n // NOTE: Remember a device can be mouse + touch enabled so we check on first touch event\n touch: 'ontouchstart' in document.documentElement,\n // Detect transitions support\n transitions: transitionEndEvent !== false,\n // Reduced motion iOS & MacOS setting\n // https://webkit.org/blog/7551/responsive-design-for-motion/\n reducedMotion: 'matchMedia' in window && window.matchMedia('(prefers-reduced-motion)').matches\n };\n\n function validateRatio(input) {\n if (!is$1.array(input) && (!is$1.string(input) || !input.includes(':'))) {\n return false;\n }\n\n var ratio = is$1.array(input) ? input : input.split(':');\n return ratio.map(Number).every(is$1.number);\n }\n function reduceAspectRatio(ratio) {\n if (!is$1.array(ratio) || !ratio.every(is$1.number)) {\n return null;\n }\n\n var _ratio = _slicedToArray(ratio, 2),\n width = _ratio[0],\n height = _ratio[1];\n\n var getDivider = function getDivider(w, h) {\n return h === 0 ? w : getDivider(h, w % h);\n };\n\n var divider = getDivider(width, height);\n return [width / divider, height / divider];\n }\n function getAspectRatio(input) {\n var parse = function parse(ratio) {\n return validateRatio(ratio) ? ratio.split(':').map(Number) : null;\n }; // Try provided ratio\n\n\n var ratio = parse(input); // Get from config\n\n if (ratio === null) {\n ratio = parse(this.config.ratio);\n } // Get from embed\n\n\n if (ratio === null && !is$1.empty(this.embed) && is$1.array(this.embed.ratio)) {\n ratio = this.embed.ratio;\n } // Get from HTML5 video\n\n\n if (ratio === null && this.isHTML5) {\n var _this$media = this.media,\n videoWidth = _this$media.videoWidth,\n videoHeight = _this$media.videoHeight;\n ratio = reduceAspectRatio([videoWidth, videoHeight]);\n }\n\n return ratio;\n } // Set aspect ratio for responsive container\n\n function setAspectRatio(input) {\n if (!this.isVideo) {\n return {};\n }\n\n var ratio = getAspectRatio.call(this, input);\n\n var _ref = is$1.array(ratio) ? ratio : [0, 0],\n _ref2 = _slicedToArray(_ref, 2),\n w = _ref2[0],\n h = _ref2[1];\n\n var padding = 100 / w * h;\n this.elements.wrapper.style.paddingBottom = \"\".concat(padding, \"%\"); // For Vimeo we have an extra <div> to hide the standard controls and UI\n\n if (this.isVimeo && this.supported.ui) {\n var height = 240;\n var offset = (height - padding) / (height / 50);\n this.media.style.transform = \"translateY(-\".concat(offset, \"%)\");\n } else if (this.isHTML5) {\n this.elements.wrapper.classList.toggle(this.config.classNames.videoFixedRatio, ratio !== null);\n }\n\n return {\n padding: padding,\n ratio: ratio\n };\n }\n\n var html5 = {\n getSources: function getSources() {\n var _this = this;\n\n if (!this.isHTML5) {\n return [];\n }\n\n var sources = Array.from(this.media.querySelectorAll('source')); // Filter out unsupported sources (if type is specified)\n\n return sources.filter(function (source) {\n var type = source.getAttribute('type');\n\n if (is$1.empty(type)) {\n return true;\n }\n\n return support.mime.call(_this, type);\n });\n },\n // Get quality levels\n getQualityOptions: function getQualityOptions() {\n // Get sizes from <source> elements\n return html5.getSources.call(this).map(function (source) {\n return Number(source.getAttribute('size'));\n }).filter(Boolean);\n },\n extend: function extend() {\n if (!this.isHTML5) {\n return;\n }\n\n var player = this; // Set aspect ratio if fixed\n\n if (!is$1.empty(this.config.ratio)) {\n setAspectRatio.call(player);\n } // Quality\n\n\n Object.defineProperty(player.media, 'quality', {\n get: function get() {\n // Get sources\n var sources = html5.getSources.call(player);\n var source = sources.find(function (s) {\n return s.getAttribute('src') === player.source;\n }); // Return size, if match is found\n\n return source && Number(source.getAttribute('size'));\n },\n set: function set(input) {\n // Get sources\n var sources = html5.getSources.call(player); // Get first match for requested size\n\n var source = sources.find(function (s) {\n return Number(s.getAttribute('size')) === input;\n }); // No matching source found\n\n if (!source) {\n return;\n } // Get current state\n\n\n var _player$media = player.media,\n currentTime = _player$media.currentTime,\n paused = _player$media.paused,\n preload = _player$media.preload,\n readyState = _player$media.readyState; // Set new source\n\n player.media.src = source.getAttribute('src'); // Prevent loading if preload=\"none\" and the current source isn't loaded (#1044)\n\n if (preload !== 'none' || readyState) {\n // Restore time\n player.once('loadedmetadata', function () {\n player.currentTime = currentTime; // Resume playing\n\n if (!paused) {\n player.play();\n }\n }); // Load new source\n\n player.media.load();\n } // Trigger change event\n\n\n triggerEvent.call(player, player.media, 'qualitychange', false, {\n quality: input\n });\n }\n });\n },\n // Cancel current network requests\n // See https://github.com/sampotts/plyr/issues/174\n cancelRequests: function cancelRequests() {\n if (!this.isHTML5) {\n return;\n } // Remove child sources\n\n\n removeElement(html5.getSources.call(this)); // Set blank video src attribute\n // This is to prevent a MEDIA_ERR_SRC_NOT_SUPPORTED error\n // Info: http://stackoverflow.com/questions/32231579/how-to-properly-dispose-of-an-html5-video-and-close-socket-or-connection\n\n this.media.setAttribute('src', this.config.blankVideo); // Load the new empty source\n // This will cancel existing requests\n // See https://github.com/sampotts/plyr/issues/174\n\n this.media.load(); // Debugging\n\n this.debug.log('Cancelled network requests');\n }\n };\n\n function dedupe(array) {\n if (!is$1.array(array)) {\n return array;\n }\n\n return array.filter(function (item, index) {\n return array.indexOf(item) === index;\n });\n } // Get the closest value in an array\n\n function closest(array, value) {\n if (!is$1.array(array) || !array.length) {\n return null;\n }\n\n return array.reduce(function (prev, curr) {\n return Math.abs(curr - value) < Math.abs(prev - value) ? curr : prev;\n });\n }\n\n var defineProperty$4 = objectDefineProperty.f;\n var getOwnPropertyNames$1 = objectGetOwnPropertyNames.f;\n\n\n\n\n\n\n\n var MATCH$2 = wellKnownSymbol('match');\n var NativeRegExp = global_1.RegExp;\n var RegExpPrototype$1 = NativeRegExp.prototype;\n var re1 = /a/g;\n var re2 = /a/g;\n\n // \"new\" should create a new object, old webkit bug\n var CORRECT_NEW = new NativeRegExp(re1) !== re1;\n\n var FORCED$3 = descriptors && isForced_1('RegExp', (!CORRECT_NEW || fails(function () {\n re2[MATCH$2] = false;\n // RegExp constructor can alter flags and IsRegExp works correct with @@match\n return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';\n })));\n\n // `RegExp` constructor\n // https://tc39.github.io/ecma262/#sec-regexp-constructor\n if (FORCED$3) {\n var RegExpWrapper = function RegExp(pattern, flags) {\n var thisIsRegExp = this instanceof RegExpWrapper;\n var patternIsRegExp = isRegexp(pattern);\n var flagsAreUndefined = flags === undefined;\n return !thisIsRegExp && patternIsRegExp && pattern.constructor === RegExpWrapper && flagsAreUndefined ? pattern\n : inheritIfRequired(CORRECT_NEW\n ? new NativeRegExp(patternIsRegExp && !flagsAreUndefined ? pattern.source : pattern, flags)\n : NativeRegExp((patternIsRegExp = pattern instanceof RegExpWrapper)\n ? pattern.source\n : pattern, patternIsRegExp && flagsAreUndefined ? regexpFlags.call(pattern) : flags)\n , thisIsRegExp ? this : RegExpPrototype$1, RegExpWrapper);\n };\n var proxy = function (key) {\n key in RegExpWrapper || defineProperty$4(RegExpWrapper, key, {\n configurable: true,\n get: function () { return NativeRegExp[key]; },\n set: function (it) { NativeRegExp[key] = it; }\n });\n };\n var keys$2 = getOwnPropertyNames$1(NativeRegExp);\n var index = 0;\n while (keys$2.length > index) proxy(keys$2[index++]);\n RegExpPrototype$1.constructor = RegExpWrapper;\n RegExpWrapper.prototype = RegExpPrototype$1;\n redefine(global_1, 'RegExp', RegExpWrapper);\n }\n\n // https://tc39.github.io/ecma262/#sec-get-regexp-@@species\n setSpecies('RegExp');\n\n function generateId(prefix) {\n return \"\".concat(prefix, \"-\").concat(Math.floor(Math.random() * 10000));\n } // Format string\n\n function format(input) {\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 if (is$1.empty(input)) {\n return input;\n }\n\n return input.toString().replace(/{(\\d+)}/g, function (match, i) {\n return args[i].toString();\n });\n } // Get percentage\n\n function getPercentage(current, max) {\n if (current === 0 || max === 0 || Number.isNaN(current) || Number.isNaN(max)) {\n return 0;\n }\n\n return (current / max * 100).toFixed(2);\n } // Replace all occurances of a string in a string\n\n function replaceAll() {\n var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var find = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var replace = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n return input.replace(new RegExp(find.toString().replace(/([.*+?^=!:${}()|[\\]/\\\\])/g, '\\\\$1'), 'g'), replace.toString());\n } // Convert to title case\n\n function toTitleCase() {\n var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n return input.toString().replace(/\\w\\S*/g, function (text) {\n return text.charAt(0).toUpperCase() + text.substr(1).toLowerCase();\n });\n } // Convert string to pascalCase\n\n function toPascalCase() {\n var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var string = input.toString(); // Convert kebab case\n\n string = replaceAll(string, '-', ' '); // Convert snake case\n\n string = replaceAll(string, '_', ' '); // Convert to title case\n\n string = toTitleCase(string); // Convert to pascal case\n\n return replaceAll(string, ' ', '');\n } // Convert string to pascalCase\n\n function toCamelCase() {\n var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var string = input.toString(); // Convert to pascal case\n\n string = toPascalCase(string); // Convert first character to lowercase\n\n return string.charAt(0).toLowerCase() + string.slice(1);\n } // Remove HTML from a string\n\n function stripHTML(source) {\n var fragment = document.createDocumentFragment();\n var element = document.createElement('div');\n fragment.appendChild(element);\n element.innerHTML = source;\n return fragment.firstChild.innerText;\n } // Like outerHTML, but also works for DocumentFragment\n\n function getHTML(element) {\n var wrapper = document.createElement('div');\n wrapper.appendChild(element);\n return wrapper.innerHTML;\n }\n\n var resources = {\n pip: 'PIP',\n airplay: 'AirPlay',\n html5: 'HTML5',\n vimeo: 'Vimeo',\n youtube: 'YouTube'\n };\n var i18n = {\n get: function get() {\n var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (is$1.empty(key) || is$1.empty(config)) {\n return '';\n }\n\n var string = getDeep(config.i18n, key);\n\n if (is$1.empty(string)) {\n if (Object.keys(resources).includes(key)) {\n return resources[key];\n }\n\n return '';\n }\n\n var replace = {\n '{seektime}': config.seekTime,\n '{title}': config.title\n };\n Object.entries(replace).forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n k = _ref2[0],\n v = _ref2[1];\n\n string = replaceAll(string, k, v);\n });\n return string;\n }\n };\n\n var Storage =\n /*#__PURE__*/\n function () {\n function Storage(player) {\n _classCallCheck(this, Storage);\n\n this.enabled = player.config.storage.enabled;\n this.key = player.config.storage.key;\n } // Check for actual support (see if we can use it)\n\n\n _createClass(Storage, [{\n key: \"get\",\n value: function get(key) {\n if (!Storage.supported || !this.enabled) {\n return null;\n }\n\n var store = window.localStorage.getItem(this.key);\n\n if (is$1.empty(store)) {\n return null;\n }\n\n var json = JSON.parse(store);\n return is$1.string(key) && key.length ? json[key] : json;\n }\n }, {\n key: \"set\",\n value: function set(object) {\n // Bail if we don't have localStorage support or it's disabled\n if (!Storage.supported || !this.enabled) {\n return;\n } // Can only store objectst\n\n\n if (!is$1.object(object)) {\n return;\n } // Get current storage\n\n\n var storage = this.get(); // Default to empty object\n\n if (is$1.empty(storage)) {\n storage = {};\n } // Update the working copy of the values\n\n\n extend(storage, object); // Update storage\n\n window.localStorage.setItem(this.key, JSON.stringify(storage));\n }\n }], [{\n key: \"supported\",\n get: function get() {\n try {\n if (!('localStorage' in window)) {\n return false;\n }\n\n var test = '___test'; // Try to use it (it might be disabled, e.g. user is in private mode)\n // see: https://github.com/sampotts/plyr/issues/131\n\n window.localStorage.setItem(test, test);\n window.localStorage.removeItem(test);\n return true;\n } catch (e) {\n return false;\n }\n }\n }]);\n\n return Storage;\n }();\n\n // ==========================================================================\n // Fetch wrapper\n // Using XHR to avoid issues with older browsers\n // ==========================================================================\n function fetch(url) {\n var responseType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'text';\n return new Promise(function (resolve, reject) {\n try {\n var request = new XMLHttpRequest(); // Check for CORS support\n\n if (!('withCredentials' in request)) {\n return;\n }\n\n request.addEventListener('load', function () {\n if (responseType === 'text') {\n try {\n resolve(JSON.parse(request.responseText));\n } catch (e) {\n resolve(request.responseText);\n }\n } else {\n resolve(request.response);\n }\n });\n request.addEventListener('error', function () {\n throw new Error(request.status);\n });\n request.open('GET', url, true); // Set the required response type\n\n request.responseType = responseType;\n request.send();\n } catch (e) {\n reject(e);\n }\n });\n }\n\n // ==========================================================================\n\n function loadSprite(url, id) {\n if (!is$1.string(url)) {\n return;\n }\n\n var prefix = 'cache';\n var hasId = is$1.string(id);\n var isCached = false;\n\n var exists = function exists() {\n return document.getElementById(id) !== null;\n };\n\n var update = function update(container, data) {\n // eslint-disable-next-line no-param-reassign\n container.innerHTML = data; // Check again incase of race condition\n\n if (hasId && exists()) {\n return;\n } // Inject the SVG to the body\n\n\n document.body.insertAdjacentElement('afterbegin', container);\n }; // Only load once if ID set\n\n\n if (!hasId || !exists()) {\n var useStorage = Storage.supported; // Create container\n\n var container = document.createElement('div');\n container.setAttribute('hidden', '');\n\n if (hasId) {\n container.setAttribute('id', id);\n } // Check in cache\n\n\n if (useStorage) {\n var cached = window.localStorage.getItem(\"\".concat(prefix, \"-\").concat(id));\n isCached = cached !== null;\n\n if (isCached) {\n var data = JSON.parse(cached);\n update(container, data.content);\n }\n } // Get the sprite\n\n\n fetch(url).then(function (result) {\n if (is$1.empty(result)) {\n return;\n }\n\n if (useStorage) {\n window.localStorage.setItem(\"\".concat(prefix, \"-\").concat(id), JSON.stringify({\n content: result\n }));\n }\n\n update(container, result);\n }).catch(function () {});\n }\n }\n\n var ceil$1 = Math.ceil;\n var floor$5 = Math.floor;\n\n // `Math.trunc` method\n // https://tc39.github.io/ecma262/#sec-math.trunc\n _export({ target: 'Math', stat: true }, {\n trunc: function trunc(it) {\n return (it > 0 ? floor$5 : ceil$1)(it);\n }\n });\n\n var getHours = function getHours(value) {\n return Math.trunc(value / 60 / 60 % 60, 10);\n };\n var getMinutes = function getMinutes(value) {\n return Math.trunc(value / 60 % 60, 10);\n };\n var getSeconds = function getSeconds(value) {\n return Math.trunc(value % 60, 10);\n }; // Format time to UI friendly string\n\n function formatTime() {\n var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var displayHours = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var inverted = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n // Bail if the value isn't a number\n if (!is$1.number(time)) {\n return formatTime(null, displayHours, inverted);\n } // Format time component to add leading zero\n\n\n var format = function format(value) {\n return \"0\".concat(value).slice(-2);\n }; // Breakdown to hours, mins, secs\n\n\n var hours = getHours(time);\n var mins = getMinutes(time);\n var secs = getSeconds(time); // Do we need to display hours?\n\n if (displayHours || hours > 0) {\n hours = \"\".concat(hours, \":\");\n } else {\n hours = '';\n } // Render\n\n\n return \"\".concat(inverted && time > 0 ? '-' : '').concat(hours).concat(format(mins), \":\").concat(format(secs));\n }\n\n var controls = {\n // Get icon URL\n getIconUrl: function getIconUrl() {\n var url = new URL(this.config.iconUrl, window.location);\n var cors = url.host !== window.location.host || browser.isIE && !window.svg4everybody;\n return {\n url: this.config.iconUrl,\n cors: cors\n };\n },\n // Find the UI controls\n findElements: function findElements() {\n try {\n this.elements.controls = getElement.call(this, this.config.selectors.controls.wrapper); // Buttons\n\n this.elements.buttons = {\n play: getElements.call(this, this.config.selectors.buttons.play),\n pause: getElement.call(this, this.config.selectors.buttons.pause),\n restart: getElement.call(this, this.config.selectors.buttons.restart),\n rewind: getElement.call(this, this.config.selectors.buttons.rewind),\n fastForward: getElement.call(this, this.config.selectors.buttons.fastForward),\n mute: getElement.call(this, this.config.selectors.buttons.mute),\n pip: getElement.call(this, this.config.selectors.buttons.pip),\n airplay: getElement.call(this, this.config.selectors.buttons.airplay),\n settings: getElement.call(this, this.config.selectors.buttons.settings),\n captions: getElement.call(this, this.config.selectors.buttons.captions),\n fullscreen: getElement.call(this, this.config.selectors.buttons.fullscreen)\n }; // Progress\n\n this.elements.progress = getElement.call(this, this.config.selectors.progress); // Inputs\n\n this.elements.inputs = {\n seek: getElement.call(this, this.config.selectors.inputs.seek),\n volume: getElement.call(this, this.config.selectors.inputs.volume)\n }; // Display\n\n this.elements.display = {\n buffer: getElement.call(this, this.config.selectors.display.buffer),\n currentTime: getElement.call(this, this.config.selectors.display.currentTime),\n duration: getElement.call(this, this.config.selectors.display.duration)\n }; // Seek tooltip\n\n if (is$1.element(this.elements.progress)) {\n this.elements.display.seekTooltip = this.elements.progress.querySelector(\".\".concat(this.config.classNames.tooltip));\n }\n\n return true;\n } catch (error) {\n // Log it\n this.debug.warn('It looks like there is a problem with your custom controls HTML', error); // Restore native video controls\n\n this.toggleNativeControls(true);\n return false;\n }\n },\n // Create <svg> icon\n createIcon: function createIcon(type, attributes) {\n var namespace = 'http://www.w3.org/2000/svg';\n var iconUrl = controls.getIconUrl.call(this);\n var iconPath = \"\".concat(!iconUrl.cors ? iconUrl.url : '', \"#\").concat(this.config.iconPrefix); // Create <svg>\n\n var icon = document.createElementNS(namespace, 'svg');\n setAttributes(icon, extend(attributes, {\n role: 'presentation',\n focusable: 'false'\n })); // Create the <use> to reference sprite\n\n var use = document.createElementNS(namespace, 'use');\n var path = \"\".concat(iconPath, \"-\").concat(type); // Set `href` attributes\n // https://github.com/sampotts/plyr/issues/460\n // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href\n\n if ('href' in use) {\n use.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);\n } // Always set the older attribute even though it's \"deprecated\" (it'll be around for ages)\n\n\n use.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', path); // Add <use> to <svg>\n\n icon.appendChild(use);\n return icon;\n },\n // Create hidden text label\n createLabel: function createLabel(key) {\n var attr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var text = i18n.get(key, this.config);\n var attributes = Object.assign({}, attr, {\n class: [attr.class, this.config.classNames.hidden].filter(Boolean).join(' ')\n });\n return createElement('span', attributes, text);\n },\n // Create a badge\n createBadge: function createBadge(text) {\n if (is$1.empty(text)) {\n return null;\n }\n\n var badge = createElement('span', {\n class: this.config.classNames.menu.value\n });\n badge.appendChild(createElement('span', {\n class: this.config.classNames.menu.badge\n }, text));\n return badge;\n },\n // Create a <button>\n createButton: function createButton(buttonType, attr) {\n var _this = this;\n\n var attributes = extend({}, attr);\n var type = toCamelCase(buttonType);\n var props = {\n element: 'button',\n toggle: false,\n label: null,\n icon: null,\n labelPressed: null,\n iconPressed: null\n };\n ['element', 'icon', 'label'].forEach(function (key) {\n if (Object.keys(attributes).includes(key)) {\n props[key] = attributes[key];\n delete attributes[key];\n }\n }); // Default to 'button' type to prevent form submission\n\n if (props.element === 'button' && !Object.keys(attributes).includes('type')) {\n attributes.type = 'button';\n } // Set class name\n\n\n if (Object.keys(attributes).includes('class')) {\n if (!attributes.class.split(' ').some(function (c) {\n return c === _this.config.classNames.control;\n })) {\n extend(attributes, {\n class: \"\".concat(attributes.class, \" \").concat(this.config.classNames.control)\n });\n }\n } else {\n attributes.class = this.config.classNames.control;\n } // Large play button\n\n\n switch (buttonType) {\n case 'play':\n props.toggle = true;\n props.label = 'play';\n props.labelPressed = 'pause';\n props.icon = 'play';\n props.iconPressed = 'pause';\n break;\n\n case 'mute':\n props.toggle = true;\n props.label = 'mute';\n props.labelPressed = 'unmute';\n props.icon = 'volume';\n props.iconPressed = 'muted';\n break;\n\n case 'captions':\n props.toggle = true;\n props.label = 'enableCaptions';\n props.labelPressed = 'disableCaptions';\n props.icon = 'captions-off';\n props.iconPressed = 'captions-on';\n break;\n\n case 'fullscreen':\n props.toggle = true;\n props.label = 'enterFullscreen';\n props.labelPressed = 'exitFullscreen';\n props.icon = 'enter-fullscreen';\n props.iconPressed = 'exit-fullscreen';\n break;\n\n case 'play-large':\n attributes.class += \" \".concat(this.config.classNames.control, \"--overlaid\");\n type = 'play';\n props.label = 'play';\n props.icon = 'play';\n break;\n\n default:\n if (is$1.empty(props.label)) {\n props.label = type;\n }\n\n if (is$1.empty(props.icon)) {\n props.icon = buttonType;\n }\n\n }\n\n var button = createElement(props.element); // Setup toggle icon and labels\n\n if (props.toggle) {\n // Icon\n button.appendChild(controls.createIcon.call(this, props.iconPressed, {\n class: 'icon--pressed'\n }));\n button.appendChild(controls.createIcon.call(this, props.icon, {\n class: 'icon--not-pressed'\n })); // Label/Tooltip\n\n button.appendChild(controls.createLabel.call(this, props.labelPressed, {\n class: 'label--pressed'\n }));\n button.appendChild(controls.createLabel.call(this, props.label, {\n class: 'label--not-pressed'\n }));\n } else {\n button.appendChild(controls.createIcon.call(this, props.icon));\n button.appendChild(controls.createLabel.call(this, props.label));\n } // Merge and set attributes\n\n\n extend(attributes, getAttributesFromSelector(this.config.selectors.buttons[type], attributes));\n setAttributes(button, attributes); // We have multiple play buttons\n\n if (type === 'play') {\n if (!is$1.array(this.elements.buttons[type])) {\n this.elements.buttons[type] = [];\n }\n\n this.elements.buttons[type].push(button);\n } else {\n this.elements.buttons[type] = button;\n }\n\n return button;\n },\n // Create an <input type='range'>\n createRange: function createRange(type, attributes) {\n // Seek input\n var input = createElement('input', extend(getAttributesFromSelector(this.config.selectors.inputs[type]), {\n type: 'range',\n min: 0,\n max: 100,\n step: 0.01,\n value: 0,\n autocomplete: 'off',\n // A11y fixes for https://github.com/sampotts/plyr/issues/905\n role: 'slider',\n 'aria-label': i18n.get(type, this.config),\n 'aria-valuemin': 0,\n 'aria-valuemax': 100,\n 'aria-valuenow': 0\n }, attributes));\n this.elements.inputs[type] = input; // Set the fill for webkit now\n\n controls.updateRangeFill.call(this, input); // Improve support on touch devices\n\n RangeTouch.setup(input);\n return input;\n },\n // Create a <progress>\n createProgress: function createProgress(type, attributes) {\n var progress = createElement('progress', extend(getAttributesFromSelector(this.config.selectors.display[type]), {\n min: 0,\n max: 100,\n value: 0,\n role: 'progressbar',\n 'aria-hidden': true\n }, attributes)); // Create the label inside\n\n if (type !== 'volume') {\n progress.appendChild(createElement('span', null, '0'));\n var suffixKey = {\n played: 'played',\n buffer: 'buffered'\n }[type];\n var suffix = suffixKey ? i18n.get(suffixKey, this.config) : '';\n progress.innerText = \"% \".concat(suffix.toLowerCase());\n }\n\n this.elements.display[type] = progress;\n return progress;\n },\n // Create time display\n createTime: function createTime(type, attrs) {\n var attributes = getAttributesFromSelector(this.config.selectors.display[type], attrs);\n var container = createElement('div', extend(attributes, {\n class: \"\".concat(attributes.class ? attributes.class : '', \" \").concat(this.config.classNames.display.time, \" \").trim(),\n 'aria-label': i18n.get(type, this.config)\n }), '00:00'); // Reference for updates\n\n this.elements.display[type] = container;\n return container;\n },\n // Bind keyboard shortcuts for a menu item\n // We have to bind to keyup otherwise Firefox triggers a click when a keydown event handler shifts focus\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1220143\n bindMenuItemShortcuts: function bindMenuItemShortcuts(menuItem, type) {\n var _this2 = this;\n\n // Navigate through menus via arrow keys and space\n on(menuItem, 'keydown keyup', function (event) {\n // We only care about space and ⬆️ ⬇️️ ➡️\n if (![32, 38, 39, 40].includes(event.which)) {\n return;\n } // Prevent play / seek\n\n\n event.preventDefault();\n event.stopPropagation(); // We're just here to prevent the keydown bubbling\n\n if (event.type === 'keydown') {\n return;\n }\n\n var isRadioButton = matches$1(menuItem, '[role=\"menuitemradio\"]'); // Show the respective menu\n\n if (!isRadioButton && [32, 39].includes(event.which)) {\n controls.showMenuPanel.call(_this2, type, true);\n } else {\n var target;\n\n if (event.which !== 32) {\n if (event.which === 40 || isRadioButton && event.which === 39) {\n target = menuItem.nextElementSibling;\n\n if (!is$1.element(target)) {\n target = menuItem.parentNode.firstElementChild;\n }\n } else {\n target = menuItem.previousElementSibling;\n\n if (!is$1.element(target)) {\n target = menuItem.parentNode.lastElementChild;\n }\n }\n\n setFocus.call(_this2, target, true);\n }\n }\n }, false); // Enter will fire a `click` event but we still need to manage focus\n // So we bind to keyup which fires after and set focus here\n\n on(menuItem, 'keyup', function (event) {\n if (event.which !== 13) {\n return;\n }\n\n controls.focusFirstMenuItem.call(_this2, null, true);\n });\n },\n // Create a settings menu item\n createMenuItem: function createMenuItem(_ref) {\n var _this3 = this;\n\n var value = _ref.value,\n list = _ref.list,\n type = _ref.type,\n title = _ref.title,\n _ref$badge = _ref.badge,\n badge = _ref$badge === void 0 ? null : _ref$badge,\n _ref$checked = _ref.checked,\n checked = _ref$checked === void 0 ? false : _ref$checked;\n var attributes = getAttributesFromSelector(this.config.selectors.inputs[type]);\n var menuItem = createElement('button', extend(attributes, {\n type: 'button',\n role: 'menuitemradio',\n class: \"\".concat(this.config.classNames.control, \" \").concat(attributes.class ? attributes.class : '').trim(),\n 'aria-checked': checked,\n value: value\n }));\n var flex = createElement('span'); // We have to set as HTML incase of special characters\n\n flex.innerHTML = title;\n\n if (is$1.element(badge)) {\n flex.appendChild(badge);\n }\n\n menuItem.appendChild(flex); // Replicate radio button behaviour\n\n Object.defineProperty(menuItem, 'checked', {\n enumerable: true,\n get: function get() {\n return menuItem.getAttribute('aria-checked') === 'true';\n },\n set: function set(check) {\n // Ensure exclusivity\n if (check) {\n Array.from(menuItem.parentNode.children).filter(function (node) {\n return matches$1(node, '[role=\"menuitemradio\"]');\n }).forEach(function (node) {\n return node.setAttribute('aria-checked', 'false');\n });\n }\n\n menuItem.setAttribute('aria-checked', check ? 'true' : 'false');\n }\n });\n this.listeners.bind(menuItem, 'click keyup', function (event) {\n if (is$1.keyboardEvent(event) && event.which !== 32) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n menuItem.checked = true;\n\n switch (type) {\n case 'language':\n _this3.currentTrack = Number(value);\n break;\n\n case 'quality':\n _this3.quality = value;\n break;\n\n case 'speed':\n _this3.speed = parseFloat(value);\n break;\n\n default:\n break;\n }\n\n controls.showMenuPanel.call(_this3, 'home', is$1.keyboardEvent(event));\n }, type, false);\n controls.bindMenuItemShortcuts.call(this, menuItem, type);\n list.appendChild(menuItem);\n },\n // Format a time for display\n formatTime: function formatTime$1() {\n var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var inverted = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n // Bail if the value isn't a number\n if (!is$1.number(time)) {\n return time;\n } // Always display hours if duration is over an hour\n\n\n var forceHours = getHours(this.duration) > 0;\n return formatTime(time, forceHours, inverted);\n },\n // Update the displayed time\n updateTimeDisplay: function updateTimeDisplay() {\n var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n var time = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var inverted = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n // Bail if there's no element to display or the value isn't a number\n if (!is$1.element(target) || !is$1.number(time)) {\n return;\n } // eslint-disable-next-line no-param-reassign\n\n\n target.innerText = controls.formatTime(time, inverted);\n },\n // Update volume UI and storage\n updateVolume: function updateVolume() {\n if (!this.supported.ui) {\n return;\n } // Update range\n\n\n if (is$1.element(this.elements.inputs.volume)) {\n controls.setRange.call(this, this.elements.inputs.volume, this.muted ? 0 : this.volume);\n } // Update mute state\n\n\n if (is$1.element(this.elements.buttons.mute)) {\n this.elements.buttons.mute.pressed = this.muted || this.volume === 0;\n }\n },\n // Update seek value and lower fill\n setRange: function setRange(target) {\n var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n if (!is$1.element(target)) {\n return;\n } // eslint-disable-next-line\n\n\n target.value = value; // Webkit range fill\n\n controls.updateRangeFill.call(this, target);\n },\n // Update <progress> elements\n updateProgress: function updateProgress(event) {\n var _this4 = this;\n\n if (!this.supported.ui || !is$1.event(event)) {\n return;\n }\n\n var value = 0;\n\n var setProgress = function setProgress(target, input) {\n var val = is$1.number(input) ? input : 0;\n var progress = is$1.element(target) ? target : _this4.elements.display.buffer; // Update value and label\n\n if (is$1.element(progress)) {\n progress.value = val; // Update text label inside\n\n var label = progress.getElementsByTagName('span')[0];\n\n if (is$1.element(label)) {\n label.childNodes[0].nodeValue = val;\n }\n }\n };\n\n if (event) {\n switch (event.type) {\n // Video playing\n case 'timeupdate':\n case 'seeking':\n case 'seeked':\n value = getPercentage(this.currentTime, this.duration); // Set seek range value only if it's a 'natural' time event\n\n if (event.type === 'timeupdate') {\n controls.setRange.call(this, this.elements.inputs.seek, value);\n }\n\n break;\n // Check buffer status\n\n case 'playing':\n case 'progress':\n setProgress(this.elements.display.buffer, this.buffered * 100);\n break;\n\n default:\n break;\n }\n }\n },\n // Webkit polyfill for lower fill range\n updateRangeFill: function updateRangeFill(target) {\n // Get range from event if event passed\n var range = is$1.event(target) ? target.target : target; // Needs to be a valid <input type='range'>\n\n if (!is$1.element(range) || range.getAttribute('type') !== 'range') {\n return;\n } // Set aria values for https://github.com/sampotts/plyr/issues/905\n\n\n if (matches$1(range, this.config.selectors.inputs.seek)) {\n range.setAttribute('aria-valuenow', this.currentTime);\n var currentTime = controls.formatTime(this.currentTime);\n var duration = controls.formatTime(this.duration);\n var format = i18n.get('seekLabel', this.config);\n range.setAttribute('aria-valuetext', format.replace('{currentTime}', currentTime).replace('{duration}', duration));\n } else if (matches$1(range, this.config.selectors.inputs.volume)) {\n var percent = range.value * 100;\n range.setAttribute('aria-valuenow', percent);\n range.setAttribute('aria-valuetext', \"\".concat(percent.toFixed(1), \"%\"));\n } else {\n range.setAttribute('aria-valuenow', range.value);\n } // WebKit only\n\n\n if (!browser.isWebkit) {\n return;\n } // Set CSS custom property\n\n\n range.style.setProperty('--value', \"\".concat(range.value / range.max * 100, \"%\"));\n },\n // Update hover tooltip for seeking\n updateSeekTooltip: function updateSeekTooltip(event) {\n var _this5 = this;\n\n // Bail if setting not true\n if (!this.config.tooltips.seek || !is$1.element(this.elements.inputs.seek) || !is$1.element(this.elements.display.seekTooltip) || this.duration === 0) {\n return;\n }\n\n var visible = \"\".concat(this.config.classNames.tooltip, \"--visible\");\n\n var toggle = function toggle(show) {\n return toggleClass(_this5.elements.display.seekTooltip, visible, show);\n }; // Hide on touch\n\n\n if (this.touch) {\n toggle(false);\n return;\n } // Determine percentage, if already visible\n\n\n var percent = 0;\n var clientRect = this.elements.progress.getBoundingClientRect();\n\n if (is$1.event(event)) {\n percent = 100 / clientRect.width * (event.pageX - clientRect.left);\n } else if (hasClass(this.elements.display.seekTooltip, visible)) {\n percent = parseFloat(this.elements.display.seekTooltip.style.left, 10);\n } else {\n return;\n } // Set bounds\n\n\n if (percent < 0) {\n percent = 0;\n } else if (percent > 100) {\n percent = 100;\n } // Display the time a click would seek to\n\n\n controls.updateTimeDisplay.call(this, this.elements.display.seekTooltip, this.duration / 100 * percent); // Set position\n\n this.elements.display.seekTooltip.style.left = \"\".concat(percent, \"%\"); // Show/hide the tooltip\n // If the event is a moues in/out and percentage is inside bounds\n\n if (is$1.event(event) && ['mouseenter', 'mouseleave'].includes(event.type)) {\n toggle(event.type === 'mouseenter');\n }\n },\n // Handle time change event\n timeUpdate: function timeUpdate(event) {\n // Only invert if only one time element is displayed and used for both duration and currentTime\n var invert = !is$1.element(this.elements.display.duration) && this.config.invertTime; // Duration\n\n controls.updateTimeDisplay.call(this, this.elements.display.currentTime, invert ? this.duration - this.currentTime : this.currentTime, invert); // Ignore updates while seeking\n\n if (event && event.type === 'timeupdate' && this.media.seeking) {\n return;\n } // Playing progress\n\n\n controls.updateProgress.call(this, event);\n },\n // Show the duration on metadataloaded or durationchange events\n durationUpdate: function durationUpdate() {\n // Bail if no UI or durationchange event triggered after playing/seek when invertTime is false\n if (!this.supported.ui || !this.config.invertTime && this.currentTime) {\n return;\n } // If duration is the 2**32 (shaka), Infinity (HLS), DASH-IF (Number.MAX_SAFE_INTEGER || Number.MAX_VALUE) indicating live we hide the currentTime and progressbar.\n // https://github.com/video-dev/hls.js/blob/5820d29d3c4c8a46e8b75f1e3afa3e68c1a9a2db/src/controller/buffer-controller.js#L415\n // https://github.com/google/shaka-player/blob/4d889054631f4e1cf0fbd80ddd2b71887c02e232/lib/media/streaming_engine.js#L1062\n // https://github.com/Dash-Industry-Forum/dash.js/blob/69859f51b969645b234666800d4cb596d89c602d/src/dash/models/DashManifestModel.js#L338\n\n\n if (this.duration >= Math.pow(2, 32)) {\n toggleHidden(this.elements.display.currentTime, true);\n toggleHidden(this.elements.progress, true);\n return;\n } // Update ARIA values\n\n\n if (is$1.element(this.elements.inputs.seek)) {\n this.elements.inputs.seek.setAttribute('aria-valuemax', this.duration);\n } // If there's a spot to display duration\n\n\n var hasDuration = is$1.element(this.elements.display.duration); // If there's only one time display, display duration there\n\n if (!hasDuration && this.config.displayDuration && this.paused) {\n controls.updateTimeDisplay.call(this, this.elements.display.currentTime, this.duration);\n } // If there's a duration element, update content\n\n\n if (hasDuration) {\n controls.updateTimeDisplay.call(this, this.elements.display.duration, this.duration);\n } // Update the tooltip (if visible)\n\n\n controls.updateSeekTooltip.call(this);\n },\n // Hide/show a tab\n toggleMenuButton: function toggleMenuButton(setting, toggle) {\n toggleHidden(this.elements.settings.buttons[setting], !toggle);\n },\n // Update the selected setting\n updateSetting: function updateSetting(setting, container, input) {\n var pane = this.elements.settings.panels[setting];\n var value = null;\n var list = container;\n\n if (setting === 'captions') {\n value = this.currentTrack;\n } else {\n value = !is$1.empty(input) ? input : this[setting]; // Get default\n\n if (is$1.empty(value)) {\n value = this.config[setting].default;\n } // Unsupported value\n\n\n if (!is$1.empty(this.options[setting]) && !this.options[setting].includes(value)) {\n this.debug.warn(\"Unsupported value of '\".concat(value, \"' for \").concat(setting));\n return;\n } // Disabled value\n\n\n if (!this.config[setting].options.includes(value)) {\n this.debug.warn(\"Disabled value of '\".concat(value, \"' for \").concat(setting));\n return;\n }\n } // Get the list if we need to\n\n\n if (!is$1.element(list)) {\n list = pane && pane.querySelector('[role=\"menu\"]');\n } // If there's no list it means it's not been rendered...\n\n\n if (!is$1.element(list)) {\n return;\n } // Update the label\n\n\n var label = this.elements.settings.buttons[setting].querySelector(\".\".concat(this.config.classNames.menu.value));\n label.innerHTML = controls.getLabel.call(this, setting, value); // Find the radio option and check it\n\n var target = list && list.querySelector(\"[value=\\\"\".concat(value, \"\\\"]\"));\n\n if (is$1.element(target)) {\n target.checked = true;\n }\n },\n // Translate a value into a nice label\n getLabel: function getLabel(setting, value) {\n switch (setting) {\n case 'speed':\n return value === 1 ? i18n.get('normal', this.config) : \"\".concat(value, \"×\");\n\n case 'quality':\n if (is$1.number(value)) {\n var label = i18n.get(\"qualityLabel.\".concat(value), this.config);\n\n if (!label.length) {\n return \"\".concat(value, \"p\");\n }\n\n return label;\n }\n\n return toTitleCase(value);\n\n case 'captions':\n return captions.getLabel.call(this);\n\n default:\n return null;\n }\n },\n // Set the quality menu\n setQualityMenu: function setQualityMenu(options) {\n var _this6 = this;\n\n // Menu required\n if (!is$1.element(this.elements.settings.panels.quality)) {\n return;\n }\n\n var type = 'quality';\n var list = this.elements.settings.panels.quality.querySelector('[role=\"menu\"]'); // Set options if passed and filter based on uniqueness and config\n\n if (is$1.array(options)) {\n this.options.quality = dedupe(options).filter(function (quality) {\n return _this6.config.quality.options.includes(quality);\n });\n } // Toggle the pane and tab\n\n\n var toggle = !is$1.empty(this.options.quality) && this.options.quality.length > 1;\n controls.toggleMenuButton.call(this, type, toggle); // Empty the menu\n\n emptyElement(list); // Check if we need to toggle the parent\n\n controls.checkMenu.call(this); // If we're hiding, nothing more to do\n\n if (!toggle) {\n return;\n } // Get the badge HTML for HD, 4K etc\n\n\n var getBadge = function getBadge(quality) {\n var label = i18n.get(\"qualityBadge.\".concat(quality), _this6.config);\n\n if (!label.length) {\n return null;\n }\n\n return controls.createBadge.call(_this6, label);\n }; // Sort options by the config and then render options\n\n\n this.options.quality.sort(function (a, b) {\n var sorting = _this6.config.quality.options;\n return sorting.indexOf(a) > sorting.indexOf(b) ? 1 : -1;\n }).forEach(function (quality) {\n controls.createMenuItem.call(_this6, {\n value: quality,\n list: list,\n type: type,\n title: controls.getLabel.call(_this6, 'quality', quality),\n badge: getBadge(quality)\n });\n });\n controls.updateSetting.call(this, type, list);\n },\n // Set the looping options\n\n /* setLoopMenu() {\n // Menu required\n if (!is.element(this.elements.settings.panels.loop)) {\n return;\n }\n const options = ['start', 'end', 'all', 'reset'];\n const list = this.elements.settings.panels.loop.querySelector('[role=\"menu\"]');\n // Show the pane and tab\n toggleHidden(this.elements.settings.buttons.loop, false);\n toggleHidden(this.elements.settings.panels.loop, false);\n // Toggle the pane and tab\n const toggle = !is.empty(this.loop.options);\n controls.toggleMenuButton.call(this, 'loop', toggle);\n // Empty the menu\n emptyElement(list);\n options.forEach(option => {\n const item = createElement('li');\n const button = createElement(\n 'button',\n extend(getAttributesFromSelector(this.config.selectors.buttons.loop), {\n type: 'button',\n class: this.config.classNames.control,\n 'data-plyr-loop-action': option,\n }),\n i18n.get(option, this.config)\n );\n if (['start', 'end'].includes(option)) {\n const badge = controls.createBadge.call(this, '00:00');\n button.appendChild(badge);\n }\n item.appendChild(button);\n list.appendChild(item);\n });\n }, */\n // Get current selected caption language\n // TODO: rework this to user the getter in the API?\n // Set a list of available captions languages\n setCaptionsMenu: function setCaptionsMenu() {\n var _this7 = this;\n\n // Menu required\n if (!is$1.element(this.elements.settings.panels.captions)) {\n return;\n } // TODO: Captions or language? Currently it's mixed\n\n\n var type = 'captions';\n var list = this.elements.settings.panels.captions.querySelector('[role=\"menu\"]');\n var tracks = captions.getTracks.call(this);\n var toggle = Boolean(tracks.length); // Toggle the pane and tab\n\n controls.toggleMenuButton.call(this, type, toggle); // Empty the menu\n\n emptyElement(list); // Check if we need to toggle the parent\n\n controls.checkMenu.call(this); // If there's no captions, bail\n\n if (!toggle) {\n return;\n } // Generate options data\n\n\n var options = tracks.map(function (track, value) {\n return {\n value: value,\n checked: _this7.captions.toggled && _this7.currentTrack === value,\n title: captions.getLabel.call(_this7, track),\n badge: track.language && controls.createBadge.call(_this7, track.language.toUpperCase()),\n list: list,\n type: 'language'\n };\n }); // Add the \"Disabled\" option to turn off captions\n\n options.unshift({\n value: -1,\n checked: !this.captions.toggled,\n title: i18n.get('disabled', this.config),\n list: list,\n type: 'language'\n }); // Generate options\n\n options.forEach(controls.createMenuItem.bind(this));\n controls.updateSetting.call(this, type, list);\n },\n // Set a list of available captions languages\n setSpeedMenu: function setSpeedMenu(options) {\n var _this8 = this;\n\n // Menu required\n if (!is$1.element(this.elements.settings.panels.speed)) {\n return;\n }\n\n var type = 'speed';\n var list = this.elements.settings.panels.speed.querySelector('[role=\"menu\"]'); // Set the speed options\n\n if (is$1.array(options)) {\n this.options.speed = options;\n } else if (this.isHTML5 || this.isVimeo) {\n this.options.speed = [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2];\n } // Set options if passed and filter based on config\n\n\n this.options.speed = this.options.speed.filter(function (speed) {\n return _this8.config.speed.options.includes(speed);\n }); // Toggle the pane and tab\n\n var toggle = !is$1.empty(this.options.speed) && this.options.speed.length > 1;\n controls.toggleMenuButton.call(this, type, toggle); // Empty the menu\n\n emptyElement(list); // Check if we need to toggle the parent\n\n controls.checkMenu.call(this); // If we're hiding, nothing more to do\n\n if (!toggle) {\n return;\n } // Create items\n\n\n this.options.speed.forEach(function (speed) {\n controls.createMenuItem.call(_this8, {\n value: speed,\n list: list,\n type: type,\n title: controls.getLabel.call(_this8, 'speed', speed)\n });\n });\n controls.updateSetting.call(this, type, list);\n },\n // Check if we need to hide/show the settings menu\n checkMenu: function checkMenu() {\n var buttons = this.elements.settings.buttons;\n var visible = !is$1.empty(buttons) && Object.values(buttons).some(function (button) {\n return !button.hidden;\n });\n toggleHidden(this.elements.settings.menu, !visible);\n },\n // Focus the first menu item in a given (or visible) menu\n focusFirstMenuItem: function focusFirstMenuItem(pane) {\n var tabFocus = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (this.elements.settings.popup.hidden) {\n return;\n }\n\n var target = pane;\n\n if (!is$1.element(target)) {\n target = Object.values(this.elements.settings.panels).find(function (p) {\n return !p.hidden;\n });\n }\n\n var firstItem = target.querySelector('[role^=\"menuitem\"]');\n setFocus.call(this, firstItem, tabFocus);\n },\n // Show/hide menu\n toggleMenu: function toggleMenu(input) {\n var popup = this.elements.settings.popup;\n var button = this.elements.buttons.settings; // Menu and button are required\n\n if (!is$1.element(popup) || !is$1.element(button)) {\n return;\n } // True toggle by default\n\n\n var hidden = popup.hidden;\n var show = hidden;\n\n if (is$1.boolean(input)) {\n show = input;\n } else if (is$1.keyboardEvent(input) && input.which === 27) {\n show = false;\n } else if (is$1.event(input)) {\n // If Plyr is in a shadowDOM, the event target is set to the component, instead of the\n // Element in the shadowDOM. The path, if available, is complete.\n var target = is$1.function(input.composedPath) ? input.composedPath()[0] : input.target;\n var isMenuItem = popup.contains(target); // If the click was inside the menu or if the click\n // wasn't the button or menu item and we're trying to\n // show the menu (a doc click shouldn't show the menu)\n\n if (isMenuItem || !isMenuItem && input.target !== button && show) {\n return;\n }\n } // Set button attributes\n\n\n button.setAttribute('aria-expanded', show); // Show the actual popup\n\n toggleHidden(popup, !show); // Add class hook\n\n toggleClass(this.elements.container, this.config.classNames.menu.open, show); // Focus the first item if key interaction\n\n if (show && is$1.keyboardEvent(input)) {\n controls.focusFirstMenuItem.call(this, null, true);\n } else if (!show && !hidden) {\n // If closing, re-focus the button\n setFocus.call(this, button, is$1.keyboardEvent(input));\n }\n },\n // Get the natural size of a menu panel\n getMenuSize: function getMenuSize(tab) {\n var clone = tab.cloneNode(true);\n clone.style.position = 'absolute';\n clone.style.opacity = 0;\n clone.removeAttribute('hidden'); // Append to parent so we get the \"real\" size\n\n tab.parentNode.appendChild(clone); // Get the sizes before we remove\n\n var width = clone.scrollWidth;\n var height = clone.scrollHeight; // Remove from the DOM\n\n removeElement(clone);\n return {\n width: width,\n height: height\n };\n },\n // Show a panel in the menu\n showMenuPanel: function showMenuPanel() {\n var _this9 = this;\n\n var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var tabFocus = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var target = this.elements.container.querySelector(\"#plyr-settings-\".concat(this.id, \"-\").concat(type)); // Nothing to show, bail\n\n if (!is$1.element(target)) {\n return;\n } // Hide all other panels\n\n\n var container = target.parentNode;\n var current = Array.from(container.children).find(function (node) {\n return !node.hidden;\n }); // If we can do fancy animations, we'll animate the height/width\n\n if (support.transitions && !support.reducedMotion) {\n // Set the current width as a base\n container.style.width = \"\".concat(current.scrollWidth, \"px\");\n container.style.height = \"\".concat(current.scrollHeight, \"px\"); // Get potential sizes\n\n var size = controls.getMenuSize.call(this, target); // Restore auto height/width\n\n var restore = function restore(event) {\n // We're only bothered about height and width on the container\n if (event.target !== container || !['width', 'height'].includes(event.propertyName)) {\n return;\n } // Revert back to auto\n\n\n container.style.width = '';\n container.style.height = ''; // Only listen once\n\n off.call(_this9, container, transitionEndEvent, restore);\n }; // Listen for the transition finishing and restore auto height/width\n\n\n on.call(this, container, transitionEndEvent, restore); // Set dimensions to target\n\n container.style.width = \"\".concat(size.width, \"px\");\n container.style.height = \"\".concat(size.height, \"px\");\n } // Set attributes on current tab\n\n\n toggleHidden(current, true); // Set attributes on target\n\n toggleHidden(target, false); // Focus the first item\n\n controls.focusFirstMenuItem.call(this, target, tabFocus);\n },\n // Set the download URL\n setDownloadUrl: function setDownloadUrl() {\n var button = this.elements.buttons.download; // Bail if no button\n\n if (!is$1.element(button)) {\n return;\n } // Set attribute\n\n\n button.setAttribute('href', this.download);\n },\n // Build the default HTML\n create: function create(data) {\n var _this10 = this;\n\n var bindMenuItemShortcuts = controls.bindMenuItemShortcuts,\n createButton = controls.createButton,\n createProgress = controls.createProgress,\n createRange = controls.createRange,\n createTime = controls.createTime,\n setQualityMenu = controls.setQualityMenu,\n setSpeedMenu = controls.setSpeedMenu,\n showMenuPanel = controls.showMenuPanel;\n this.elements.controls = null; // Larger overlaid play button\n\n if (this.config.controls.includes('play-large')) {\n this.elements.container.appendChild(createButton.call(this, 'play-large'));\n } // Create the container\n\n\n var container = createElement('div', getAttributesFromSelector(this.config.selectors.controls.wrapper));\n this.elements.controls = container; // Default item attributes\n\n var defaultAttributes = {\n class: 'plyr__controls__item'\n }; // Loop through controls in order\n\n dedupe(this.config.controls).forEach(function (control) {\n // Restart button\n if (control === 'restart') {\n container.appendChild(createButton.call(_this10, 'restart', defaultAttributes));\n } // Rewind button\n\n\n if (control === 'rewind') {\n container.appendChild(createButton.call(_this10, 'rewind', defaultAttributes));\n } // Play/Pause button\n\n\n if (control === 'play') {\n container.appendChild(createButton.call(_this10, 'play', defaultAttributes));\n } // Fast forward button\n\n\n if (control === 'fast-forward') {\n container.appendChild(createButton.call(_this10, 'fast-forward', defaultAttributes));\n } // Progress\n\n\n if (control === 'progress') {\n var progressContainer = createElement('div', {\n class: \"\".concat(defaultAttributes.class, \" plyr__progress__container\")\n });\n var progress = createElement('div', getAttributesFromSelector(_this10.config.selectors.progress)); // Seek range slider\n\n progress.appendChild(createRange.call(_this10, 'seek', {\n id: \"plyr-seek-\".concat(data.id)\n })); // Buffer progress\n\n progress.appendChild(createProgress.call(_this10, 'buffer')); // TODO: Add loop display indicator\n // Seek tooltip\n\n if (_this10.config.tooltips.seek) {\n var tooltip = createElement('span', {\n class: _this10.config.classNames.tooltip\n }, '00:00');\n progress.appendChild(tooltip);\n _this10.elements.display.seekTooltip = tooltip;\n }\n\n _this10.elements.progress = progress;\n progressContainer.appendChild(_this10.elements.progress);\n container.appendChild(progressContainer);\n } // Media current time display\n\n\n if (control === 'current-time') {\n container.appendChild(createTime.call(_this10, 'currentTime', defaultAttributes));\n } // Media duration display\n\n\n if (control === 'duration') {\n container.appendChild(createTime.call(_this10, 'duration', defaultAttributes));\n } // Volume controls\n\n\n if (control === 'mute' || control === 'volume') {\n var volume = _this10.elements.volume; // Create the volume container if needed\n\n if (!is$1.element(volume) || !container.contains(volume)) {\n volume = createElement('div', extend({}, defaultAttributes, {\n class: \"\".concat(defaultAttributes.class, \" plyr__volume\").trim()\n }));\n _this10.elements.volume = volume;\n container.appendChild(volume);\n } // Toggle mute button\n\n\n if (control === 'mute') {\n volume.appendChild(createButton.call(_this10, 'mute'));\n } // Volume range control\n\n\n if (control === 'volume') {\n // Set the attributes\n var attributes = {\n max: 1,\n step: 0.05,\n value: _this10.config.volume\n }; // Create the volume range slider\n\n volume.appendChild(createRange.call(_this10, 'volume', extend(attributes, {\n id: \"plyr-volume-\".concat(data.id)\n })));\n }\n } // Toggle captions button\n\n\n if (control === 'captions') {\n container.appendChild(createButton.call(_this10, 'captions', defaultAttributes));\n } // Settings button / menu\n\n\n if (control === 'settings' && !is$1.empty(_this10.config.settings)) {\n var wrapper = createElement('div', extend({}, defaultAttributes, {\n class: \"\".concat(defaultAttributes.class, \" plyr__menu\").trim(),\n hidden: ''\n }));\n wrapper.appendChild(createButton.call(_this10, 'settings', {\n 'aria-haspopup': true,\n 'aria-controls': \"plyr-settings-\".concat(data.id),\n 'aria-expanded': false\n }));\n var popup = createElement('div', {\n class: 'plyr__menu__container',\n id: \"plyr-settings-\".concat(data.id),\n hidden: ''\n });\n var inner = createElement('div');\n var home = createElement('div', {\n id: \"plyr-settings-\".concat(data.id, \"-home\")\n }); // Create the menu\n\n var menu = createElement('div', {\n role: 'menu'\n });\n home.appendChild(menu);\n inner.appendChild(home);\n _this10.elements.settings.panels.home = home; // Build the menu items\n\n _this10.config.settings.forEach(function (type) {\n // TODO: bundle this with the createMenuItem helper and bindings\n var menuItem = createElement('button', extend(getAttributesFromSelector(_this10.config.selectors.buttons.settings), {\n type: 'button',\n class: \"\".concat(_this10.config.classNames.control, \" \").concat(_this10.config.classNames.control, \"--forward\"),\n role: 'menuitem',\n 'aria-haspopup': true,\n hidden: ''\n })); // Bind menu shortcuts for keyboard users\n\n bindMenuItemShortcuts.call(_this10, menuItem, type); // Show menu on click\n\n on(menuItem, 'click', function () {\n showMenuPanel.call(_this10, type, false);\n });\n var flex = createElement('span', null, i18n.get(type, _this10.config));\n var value = createElement('span', {\n class: _this10.config.classNames.menu.value\n }); // Speed contains HTML entities\n\n value.innerHTML = data[type];\n flex.appendChild(value);\n menuItem.appendChild(flex);\n menu.appendChild(menuItem); // Build the panes\n\n var pane = createElement('div', {\n id: \"plyr-settings-\".concat(data.id, \"-\").concat(type),\n hidden: ''\n }); // Back button\n\n var backButton = createElement('button', {\n type: 'button',\n class: \"\".concat(_this10.config.classNames.control, \" \").concat(_this10.config.classNames.control, \"--back\")\n }); // Visible label\n\n backButton.appendChild(createElement('span', {\n 'aria-hidden': true\n }, i18n.get(type, _this10.config))); // Screen reader label\n\n backButton.appendChild(createElement('span', {\n class: _this10.config.classNames.hidden\n }, i18n.get('menuBack', _this10.config))); // Go back via keyboard\n\n on(pane, 'keydown', function (event) {\n // We only care about <-\n if (event.which !== 37) {\n return;\n } // Prevent seek\n\n\n event.preventDefault();\n event.stopPropagation(); // Show the respective menu\n\n showMenuPanel.call(_this10, 'home', true);\n }, false); // Go back via button click\n\n on(backButton, 'click', function () {\n showMenuPanel.call(_this10, 'home', false);\n }); // Add to pane\n\n pane.appendChild(backButton); // Menu\n\n pane.appendChild(createElement('div', {\n role: 'menu'\n }));\n inner.appendChild(pane);\n _this10.elements.settings.buttons[type] = menuItem;\n _this10.elements.settings.panels[type] = pane;\n });\n\n popup.appendChild(inner);\n wrapper.appendChild(popup);\n container.appendChild(wrapper);\n _this10.elements.settings.popup = popup;\n _this10.elements.settings.menu = wrapper;\n } // Picture in picture button\n\n\n if (control === 'pip' && support.pip) {\n container.appendChild(createButton.call(_this10, 'pip', defaultAttributes));\n } // Airplay button\n\n\n if (control === 'airplay' && support.airplay) {\n container.appendChild(createButton.call(_this10, 'airplay', defaultAttributes));\n } // Download button\n\n\n if (control === 'download') {\n var _attributes = extend({}, defaultAttributes, {\n element: 'a',\n href: _this10.download,\n target: '_blank'\n });\n\n var download = _this10.config.urls.download;\n\n if (!is$1.url(download) && _this10.isEmbed) {\n extend(_attributes, {\n icon: \"logo-\".concat(_this10.provider),\n label: _this10.provider\n });\n }\n\n container.appendChild(createButton.call(_this10, 'download', _attributes));\n } // Toggle fullscreen button\n\n\n if (control === 'fullscreen') {\n container.appendChild(createButton.call(_this10, 'fullscreen', defaultAttributes));\n }\n }); // Set available quality levels\n\n if (this.isHTML5) {\n setQualityMenu.call(this, html5.getQualityOptions.call(this));\n }\n\n setSpeedMenu.call(this);\n return container;\n },\n // Insert controls\n inject: function inject() {\n var _this11 = this;\n\n // Sprite\n if (this.config.loadSprite) {\n var icon = controls.getIconUrl.call(this); // Only load external sprite using AJAX\n\n if (icon.cors) {\n loadSprite(icon.url, 'sprite-plyr');\n }\n } // Create a unique ID\n\n\n this.id = Math.floor(Math.random() * 10000); // Null by default\n\n var container = null;\n this.elements.controls = null; // Set template properties\n\n var props = {\n id: this.id,\n seektime: this.config.seekTime,\n title: this.config.title\n };\n var update = true; // If function, run it and use output\n\n if (is$1.function(this.config.controls)) {\n this.config.controls = this.config.controls.call(this, props);\n } // Convert falsy controls to empty array (primarily for empty strings)\n\n\n if (!this.config.controls) {\n this.config.controls = [];\n }\n\n if (is$1.element(this.config.controls) || is$1.string(this.config.controls)) {\n // HTMLElement or Non-empty string passed as the option\n container = this.config.controls;\n } else {\n // Create controls\n container = controls.create.call(this, {\n id: this.id,\n seektime: this.config.seekTime,\n speed: this.speed,\n quality: this.quality,\n captions: captions.getLabel.call(this) // TODO: Looping\n // loop: 'None',\n\n });\n update = false;\n } // Replace props with their value\n\n\n var replace = function replace(input) {\n var result = input;\n Object.entries(props).forEach(function (_ref2) {\n var _ref3 = _slicedToArray(_ref2, 2),\n key = _ref3[0],\n value = _ref3[1];\n\n result = replaceAll(result, \"{\".concat(key, \"}\"), value);\n });\n return result;\n }; // Update markup\n\n\n if (update) {\n if (is$1.string(this.config.controls)) {\n container = replace(container);\n } else if (is$1.element(container)) {\n container.innerHTML = replace(container.innerHTML);\n }\n } // Controls container\n\n\n var target; // Inject to custom location\n\n if (is$1.string(this.config.selectors.controls.container)) {\n target = document.querySelector(this.config.selectors.controls.container);\n } // Inject into the container by default\n\n\n if (!is$1.element(target)) {\n target = this.elements.container;\n } // Inject controls HTML (needs to be before captions, hence \"afterbegin\")\n\n\n var insertMethod = is$1.element(container) ? 'insertAdjacentElement' : 'insertAdjacentHTML';\n target[insertMethod]('afterbegin', container); // Find the elements if need be\n\n if (!is$1.element(this.elements.controls)) {\n controls.findElements.call(this);\n } // Add pressed property to buttons\n\n\n if (!is$1.empty(this.elements.buttons)) {\n var addProperty = function addProperty(button) {\n var className = _this11.config.classNames.controlPressed;\n Object.defineProperty(button, 'pressed', {\n enumerable: true,\n get: function get() {\n return hasClass(button, className);\n },\n set: function set() {\n var pressed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n toggleClass(button, className, pressed);\n }\n });\n }; // Toggle classname when pressed property is set\n\n\n Object.values(this.elements.buttons).filter(Boolean).forEach(function (button) {\n if (is$1.array(button) || is$1.nodeList(button)) {\n Array.from(button).filter(Boolean).forEach(addProperty);\n } else {\n addProperty(button);\n }\n });\n } // Edge sometimes doesn't finish the paint so force a repaint\n\n\n if (browser.isEdge) {\n repaint(target);\n } // Setup tooltips\n\n\n if (this.config.tooltips.controls) {\n var _this$config = this.config,\n classNames = _this$config.classNames,\n selectors = _this$config.selectors;\n var selector = \"\".concat(selectors.controls.wrapper, \" \").concat(selectors.labels, \" .\").concat(classNames.hidden);\n var labels = getElements.call(this, selector);\n Array.from(labels).forEach(function (label) {\n toggleClass(label, _this11.config.classNames.hidden, false);\n toggleClass(label, _this11.config.classNames.tooltip, true);\n });\n }\n }\n };\n\n /**\n * Parse a string to a URL object\n * @param {String} input - the URL to be parsed\n * @param {Boolean} safe - failsafe parsing\n */\n\n function parseUrl(input) {\n var safe = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var url = input;\n\n if (safe) {\n var parser = document.createElement('a');\n parser.href = url;\n url = parser.href;\n }\n\n try {\n return new URL(url);\n } catch (e) {\n return null;\n }\n } // Convert object to URLSearchParams\n\n function buildUrlParams(input) {\n var params = new URLSearchParams();\n\n if (is$1.object(input)) {\n Object.entries(input).forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n value = _ref2[1];\n\n params.set(key, value);\n });\n }\n\n return params;\n }\n\n var captions = {\n // Setup captions\n setup: function setup() {\n // Requires UI support\n if (!this.supported.ui) {\n return;\n } // Only Vimeo and HTML5 video supported at this point\n\n\n if (!this.isVideo || this.isYouTube || this.isHTML5 && !support.textTracks) {\n // Clear menu and hide\n if (is$1.array(this.config.controls) && this.config.controls.includes('settings') && this.config.settings.includes('captions')) {\n controls.setCaptionsMenu.call(this);\n }\n\n return;\n } // Inject the container\n\n\n if (!is$1.element(this.elements.captions)) {\n this.elements.captions = createElement('div', getAttributesFromSelector(this.config.selectors.captions));\n insertAfter(this.elements.captions, this.elements.wrapper);\n } // Fix IE captions if CORS is used\n // Fetch captions and inject as blobs instead (data URIs not supported!)\n\n\n if (browser.isIE && window.URL) {\n var elements = this.media.querySelectorAll('track');\n Array.from(elements).forEach(function (track) {\n var src = track.getAttribute('src');\n var url = parseUrl(src);\n\n if (url !== null && url.hostname !== window.location.href.hostname && ['http:', 'https:'].includes(url.protocol)) {\n fetch(src, 'blob').then(function (blob) {\n track.setAttribute('src', window.URL.createObjectURL(blob));\n }).catch(function () {\n removeElement(track);\n });\n }\n });\n } // Get and set initial data\n // The \"preferred\" options are not realized unless / until the wanted language has a match\n // * languages: Array of user's browser languages.\n // * language: The language preferred by user settings or config\n // * active: The state preferred by user settings or config\n // * toggled: The real captions state\n\n\n var browserLanguages = navigator.languages || [navigator.language || navigator.userLanguage || 'en'];\n var languages = dedupe(browserLanguages.map(function (language) {\n return language.split('-')[0];\n }));\n var language = (this.storage.get('language') || this.config.captions.language || 'auto').toLowerCase(); // Use first browser language when language is 'auto'\n\n if (language === 'auto') {\n var _languages = _slicedToArray(languages, 1);\n\n language = _languages[0];\n }\n\n var active = this.storage.get('captions');\n\n if (!is$1.boolean(active)) {\n active = this.config.captions.active;\n }\n\n Object.assign(this.captions, {\n toggled: false,\n active: active,\n language: language,\n languages: languages\n }); // Watch changes to textTracks and update captions menu\n\n if (this.isHTML5) {\n var trackEvents = this.config.captions.update ? 'addtrack removetrack' : 'removetrack';\n on.call(this, this.media.textTracks, trackEvents, captions.update.bind(this));\n } // Update available languages in list next tick (the event must not be triggered before the listeners)\n\n\n setTimeout(captions.update.bind(this), 0);\n },\n // Update available language options in settings based on tracks\n update: function update() {\n var _this = this;\n\n var tracks = captions.getTracks.call(this, true); // Get the wanted language\n\n var _this$captions = this.captions,\n active = _this$captions.active,\n language = _this$captions.language,\n meta = _this$captions.meta,\n currentTrackNode = _this$captions.currentTrackNode;\n var languageExists = Boolean(tracks.find(function (track) {\n return track.language === language;\n })); // Handle tracks (add event listener and \"pseudo\"-default)\n\n if (this.isHTML5 && this.isVideo) {\n tracks.filter(function (track) {\n return !meta.get(track);\n }).forEach(function (track) {\n _this.debug.log('Track added', track); // Attempt to store if the original dom element was \"default\"\n\n\n meta.set(track, {\n default: track.mode === 'showing'\n }); // Turn off native caption rendering to avoid double captions\n // eslint-disable-next-line no-param-reassign\n\n track.mode = 'hidden'; // Add event listener for cue changes\n\n on.call(_this, track, 'cuechange', function () {\n return captions.updateCues.call(_this);\n });\n });\n } // Update language first time it matches, or if the previous matching track was removed\n\n\n if (languageExists && this.language !== language || !tracks.includes(currentTrackNode)) {\n captions.setLanguage.call(this, language);\n captions.toggle.call(this, active && languageExists);\n } // Enable or disable captions based on track length\n\n\n toggleClass(this.elements.container, this.config.classNames.captions.enabled, !is$1.empty(tracks)); // Update available languages in list\n\n if ((this.config.controls || []).includes('settings') && this.config.settings.includes('captions')) {\n controls.setCaptionsMenu.call(this);\n }\n },\n // Toggle captions display\n // Used internally for the toggleCaptions method, with the passive option forced to false\n toggle: function toggle(input) {\n var passive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n // If there's no full support\n if (!this.supported.ui) {\n return;\n }\n\n var toggled = this.captions.toggled; // Current state\n\n var activeClass = this.config.classNames.captions.active; // Get the next state\n // If the method is called without parameter, toggle based on current value\n\n var active = is$1.nullOrUndefined(input) ? !toggled : input; // Update state and trigger event\n\n if (active !== toggled) {\n // When passive, don't override user preferences\n if (!passive) {\n this.captions.active = active;\n this.storage.set({\n captions: active\n });\n } // Force language if the call isn't passive and there is no matching language to toggle to\n\n\n if (!this.language && active && !passive) {\n var tracks = captions.getTracks.call(this);\n var track = captions.findTrack.call(this, [this.captions.language].concat(_toConsumableArray(this.captions.languages)), true); // Override user preferences to avoid switching languages if a matching track is added\n\n this.captions.language = track.language; // Set caption, but don't store in localStorage as user preference\n\n captions.set.call(this, tracks.indexOf(track));\n return;\n } // Toggle button if it's enabled\n\n\n if (this.elements.buttons.captions) {\n this.elements.buttons.captions.pressed = active;\n } // Add class hook\n\n\n toggleClass(this.elements.container, activeClass, active);\n this.captions.toggled = active; // Update settings menu\n\n controls.updateSetting.call(this, 'captions'); // Trigger event (not used internally)\n\n triggerEvent.call(this, this.media, active ? 'captionsenabled' : 'captionsdisabled');\n }\n },\n // Set captions by track index\n // Used internally for the currentTrack setter with the passive option forced to false\n set: function set(index) {\n var passive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var tracks = captions.getTracks.call(this); // Disable captions if setting to -1\n\n if (index === -1) {\n captions.toggle.call(this, false, passive);\n return;\n }\n\n if (!is$1.number(index)) {\n this.debug.warn('Invalid caption argument', index);\n return;\n }\n\n if (!(index in tracks)) {\n this.debug.warn('Track not found', index);\n return;\n }\n\n if (this.captions.currentTrack !== index) {\n this.captions.currentTrack = index;\n var track = tracks[index];\n\n var _ref = track || {},\n language = _ref.language; // Store reference to node for invalidation on remove\n\n\n this.captions.currentTrackNode = track; // Update settings menu\n\n controls.updateSetting.call(this, 'captions'); // When passive, don't override user preferences\n\n if (!passive) {\n this.captions.language = language;\n this.storage.set({\n language: language\n });\n } // Handle Vimeo captions\n\n\n if (this.isVimeo) {\n this.embed.enableTextTrack(language);\n } // Trigger event\n\n\n triggerEvent.call(this, this.media, 'languagechange');\n } // Show captions\n\n\n captions.toggle.call(this, true, passive);\n\n if (this.isHTML5 && this.isVideo) {\n // If we change the active track while a cue is already displayed we need to update it\n captions.updateCues.call(this);\n }\n },\n // Set captions by language\n // Used internally for the language setter with the passive option forced to false\n setLanguage: function setLanguage(input) {\n var passive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (!is$1.string(input)) {\n this.debug.warn('Invalid language argument', input);\n return;\n } // Normalize\n\n\n var language = input.toLowerCase();\n this.captions.language = language; // Set currentTrack\n\n var tracks = captions.getTracks.call(this);\n var track = captions.findTrack.call(this, [language]);\n captions.set.call(this, tracks.indexOf(track), passive);\n },\n // Get current valid caption tracks\n // If update is false it will also ignore tracks without metadata\n // This is used to \"freeze\" the language options when captions.update is false\n getTracks: function getTracks() {\n var _this2 = this;\n\n var update = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n // Handle media or textTracks missing or null\n var tracks = Array.from((this.media || {}).textTracks || []); // For HTML5, use cache instead of current tracks when it exists (if captions.update is false)\n // Filter out removed tracks and tracks that aren't captions/subtitles (for example metadata)\n\n return tracks.filter(function (track) {\n return !_this2.isHTML5 || update || _this2.captions.meta.has(track);\n }).filter(function (track) {\n return ['captions', 'subtitles'].includes(track.kind);\n });\n },\n // Match tracks based on languages and get the first\n findTrack: function findTrack(languages) {\n var _this3 = this;\n\n var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var tracks = captions.getTracks.call(this);\n\n var sortIsDefault = function sortIsDefault(track) {\n return Number((_this3.captions.meta.get(track) || {}).default);\n };\n\n var sorted = Array.from(tracks).sort(function (a, b) {\n return sortIsDefault(b) - sortIsDefault(a);\n });\n var track;\n languages.every(function (language) {\n track = sorted.find(function (t) {\n return t.language === language;\n });\n return !track; // Break iteration if there is a match\n }); // If no match is found but is required, get first\n\n return track || (force ? sorted[0] : undefined);\n },\n // Get the current track\n getCurrentTrack: function getCurrentTrack() {\n return captions.getTracks.call(this)[this.currentTrack];\n },\n // Get UI label for track\n getLabel: function getLabel(track) {\n var currentTrack = track;\n\n if (!is$1.track(currentTrack) && support.textTracks && this.captions.toggled) {\n currentTrack = captions.getCurrentTrack.call(this);\n }\n\n if (is$1.track(currentTrack)) {\n if (!is$1.empty(currentTrack.label)) {\n return currentTrack.label;\n }\n\n if (!is$1.empty(currentTrack.language)) {\n return track.language.toUpperCase();\n }\n\n return i18n.get('enabled', this.config);\n }\n\n return i18n.get('disabled', this.config);\n },\n // Update captions using current track's active cues\n // Also optional array argument in case there isn't any track (ex: vimeo)\n updateCues: function updateCues(input) {\n // Requires UI\n if (!this.supported.ui) {\n return;\n }\n\n if (!is$1.element(this.elements.captions)) {\n this.debug.warn('No captions element to render to');\n return;\n } // Only accept array or empty input\n\n\n if (!is$1.nullOrUndefined(input) && !Array.isArray(input)) {\n this.debug.warn('updateCues: Invalid input', input);\n return;\n }\n\n var cues = input; // Get cues from track\n\n if (!cues) {\n var track = captions.getCurrentTrack.call(this);\n cues = Array.from((track || {}).activeCues || []).map(function (cue) {\n return cue.getCueAsHTML();\n }).map(getHTML);\n } // Set new caption text\n\n\n var content = cues.map(function (cueText) {\n return cueText.trim();\n }).join('\\n');\n var changed = content !== this.elements.captions.innerHTML;\n\n if (changed) {\n // Empty the container and create a new child element\n emptyElement(this.elements.captions);\n var caption = createElement('span', getAttributesFromSelector(this.config.selectors.caption));\n caption.innerHTML = content;\n this.elements.captions.appendChild(caption); // Trigger event\n\n triggerEvent.call(this, this.media, 'cuechange');\n }\n }\n };\n\n // ==========================================================================\n // Plyr default config\n // ==========================================================================\n var defaults$1 = {\n // Disable\n enabled: true,\n // Custom media title\n title: '',\n // Logging to console\n debug: false,\n // Auto play (if supported)\n autoplay: false,\n // Only allow one media playing at once (vimeo only)\n autopause: true,\n // Allow inline playback on iOS (this effects YouTube/Vimeo - HTML5 requires the attribute present)\n // TODO: Remove iosNative fullscreen option in favour of this (logic needs work)\n playsinline: true,\n // Default time to skip when rewind/fast forward\n seekTime: 10,\n // Default volume\n volume: 1,\n muted: false,\n // Pass a custom duration\n duration: null,\n // Display the media duration on load in the current time position\n // If you have opted to display both duration and currentTime, this is ignored\n displayDuration: true,\n // Invert the current time to be a countdown\n invertTime: true,\n // Clicking the currentTime inverts it's value to show time left rather than elapsed\n toggleInvert: true,\n // Force an aspect ratio\n // The format must be `'w:h'` (e.g. `'16:9'`)\n ratio: null,\n // Click video container to play/pause\n clickToPlay: true,\n // Auto hide the controls\n hideControls: true,\n // Reset to start when playback ended\n resetOnEnd: false,\n // Disable the standard context menu\n disableContextMenu: true,\n // Sprite (for icons)\n loadSprite: true,\n iconPrefix: 'plyr',\n iconUrl: 'https://cdn.plyr.io/3.5.6/plyr.svg',\n // Blank video (used to prevent errors on source change)\n blankVideo: 'https://cdn.plyr.io/static/blank.mp4',\n // Quality default\n quality: {\n default: 576,\n options: [4320, 2880, 2160, 1440, 1080, 720, 576, 480, 360, 240]\n },\n // Set loops\n loop: {\n active: false // start: null,\n // end: null,\n\n },\n // Speed default and options to display\n speed: {\n selected: 1,\n options: [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2]\n },\n // Keyboard shortcut settings\n keyboard: {\n focused: true,\n global: false\n },\n // Display tooltips\n tooltips: {\n controls: false,\n seek: true\n },\n // Captions settings\n captions: {\n active: false,\n language: 'auto',\n // Listen to new tracks added after Plyr is initialized.\n // This is needed for streaming captions, but may result in unselectable options\n update: false\n },\n // Fullscreen settings\n fullscreen: {\n enabled: true,\n // Allow fullscreen?\n fallback: true,\n // Fallback using full viewport/window\n iosNative: false // Use the native fullscreen in iOS (disables custom controls)\n\n },\n // Local storage\n storage: {\n enabled: true,\n key: 'plyr'\n },\n // Default controls\n controls: ['play-large', // 'restart',\n // 'rewind',\n 'play', // 'fast-forward',\n 'progress', 'current-time', // 'duration',\n 'mute', 'volume', 'captions', 'settings', 'pip', 'airplay', // 'download',\n 'fullscreen'],\n settings: ['captions', 'quality', 'speed'],\n // Localisation\n i18n: {\n restart: 'Restart',\n rewind: 'Rewind {seektime}s',\n play: 'Play',\n pause: 'Pause',\n fastForward: 'Forward {seektime}s',\n seek: 'Seek',\n seekLabel: '{currentTime} of {duration}',\n played: 'Played',\n buffered: 'Buffered',\n currentTime: 'Current time',\n duration: 'Duration',\n volume: 'Volume',\n mute: 'Mute',\n unmute: 'Unmute',\n enableCaptions: 'Enable captions',\n disableCaptions: 'Disable captions',\n download: 'Download',\n enterFullscreen: 'Enter fullscreen',\n exitFullscreen: 'Exit fullscreen',\n frameTitle: 'Player for {title}',\n captions: 'Captions',\n settings: 'Settings',\n menuBack: 'Go back to previous menu',\n speed: 'Speed',\n normal: 'Normal',\n quality: 'Quality',\n loop: 'Loop',\n start: 'Start',\n end: 'End',\n all: 'All',\n reset: 'Reset',\n disabled: 'Disabled',\n enabled: 'Enabled',\n advertisement: 'Ad',\n qualityBadge: {\n 2160: '4K',\n 1440: 'HD',\n 1080: 'HD',\n 720: 'HD',\n 576: 'SD',\n 480: 'SD'\n }\n },\n // URLs\n urls: {\n download: null,\n vimeo: {\n sdk: 'https://player.vimeo.com/api/player.js',\n iframe: 'https://player.vimeo.com/video/{0}?{1}',\n api: 'https://vimeo.com/api/v2/video/{0}.json'\n },\n youtube: {\n sdk: 'https://www.youtube.com/iframe_api',\n api: 'https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}'\n },\n googleIMA: {\n sdk: 'https://imasdk.googleapis.com/js/sdkloader/ima3.js'\n }\n },\n // Custom control listeners\n listeners: {\n seek: null,\n play: null,\n pause: null,\n restart: null,\n rewind: null,\n fastForward: null,\n mute: null,\n volume: null,\n captions: null,\n download: null,\n fullscreen: null,\n pip: null,\n airplay: null,\n speed: null,\n quality: null,\n loop: null,\n language: null\n },\n // Events to watch and bubble\n events: [// Events to watch on HTML5 media elements and bubble\n // https://developer.mozilla.org/en/docs/Web/Guide/Events/Media_events\n 'ended', 'progress', 'stalled', 'playing', 'waiting', 'canplay', 'canplaythrough', 'loadstart', 'loadeddata', 'loadedmetadata', 'timeupdate', 'volumechange', 'play', 'pause', 'error', 'seeking', 'seeked', 'emptied', 'ratechange', 'cuechange', // Custom events\n 'download', 'enterfullscreen', 'exitfullscreen', 'captionsenabled', 'captionsdisabled', 'languagechange', 'controlshidden', 'controlsshown', 'ready', // YouTube\n 'statechange', // Quality\n 'qualitychange', // Ads\n 'adsloaded', 'adscontentpause', 'adscontentresume', 'adstarted', 'adsmidpoint', 'adscomplete', 'adsallcomplete', 'adsimpression', 'adsclick'],\n // Selectors\n // Change these to match your template if using custom HTML\n selectors: {\n editable: 'input, textarea, select, [contenteditable]',\n container: '.plyr',\n controls: {\n container: null,\n wrapper: '.plyr__controls'\n },\n labels: '[data-plyr]',\n buttons: {\n play: '[data-plyr=\"play\"]',\n pause: '[data-plyr=\"pause\"]',\n restart: '[data-plyr=\"restart\"]',\n rewind: '[data-plyr=\"rewind\"]',\n fastForward: '[data-plyr=\"fast-forward\"]',\n mute: '[data-plyr=\"mute\"]',\n captions: '[data-plyr=\"captions\"]',\n download: '[data-plyr=\"download\"]',\n fullscreen: '[data-plyr=\"fullscreen\"]',\n pip: '[data-plyr=\"pip\"]',\n airplay: '[data-plyr=\"airplay\"]',\n settings: '[data-plyr=\"settings\"]',\n loop: '[data-plyr=\"loop\"]'\n },\n inputs: {\n seek: '[data-plyr=\"seek\"]',\n volume: '[data-plyr=\"volume\"]',\n speed: '[data-plyr=\"speed\"]',\n language: '[data-plyr=\"language\"]',\n quality: '[data-plyr=\"quality\"]'\n },\n display: {\n currentTime: '.plyr__time--current',\n duration: '.plyr__time--duration',\n buffer: '.plyr__progress__buffer',\n loop: '.plyr__progress__loop',\n // Used later\n volume: '.plyr__volume--display'\n },\n progress: '.plyr__progress',\n captions: '.plyr__captions',\n caption: '.plyr__caption'\n },\n // Class hooks added to the player in different states\n classNames: {\n type: 'plyr--{0}',\n provider: 'plyr--{0}',\n video: 'plyr__video-wrapper',\n embed: 'plyr__video-embed',\n videoFixedRatio: 'plyr__video-wrapper--fixed-ratio',\n embedContainer: 'plyr__video-embed__container',\n poster: 'plyr__poster',\n posterEnabled: 'plyr__poster-enabled',\n ads: 'plyr__ads',\n control: 'plyr__control',\n controlPressed: 'plyr__control--pressed',\n playing: 'plyr--playing',\n paused: 'plyr--paused',\n stopped: 'plyr--stopped',\n loading: 'plyr--loading',\n hover: 'plyr--hover',\n tooltip: 'plyr__tooltip',\n cues: 'plyr__cues',\n hidden: 'plyr__sr-only',\n hideControls: 'plyr--hide-controls',\n isIos: 'plyr--is-ios',\n isTouch: 'plyr--is-touch',\n uiSupported: 'plyr--full-ui',\n noTransition: 'plyr--no-transition',\n display: {\n time: 'plyr__time'\n },\n menu: {\n value: 'plyr__menu__value',\n badge: 'plyr__badge',\n open: 'plyr--menu-open'\n },\n captions: {\n enabled: 'plyr--captions-enabled',\n active: 'plyr--captions-active'\n },\n fullscreen: {\n enabled: 'plyr--fullscreen-enabled',\n fallback: 'plyr--fullscreen-fallback'\n },\n pip: {\n supported: 'plyr--pip-supported',\n active: 'plyr--pip-active'\n },\n airplay: {\n supported: 'plyr--airplay-supported',\n active: 'plyr--airplay-active'\n },\n tabFocus: 'plyr__tab-focus',\n previewThumbnails: {\n // Tooltip thumbs\n thumbContainer: 'plyr__preview-thumb',\n thumbContainerShown: 'plyr__preview-thumb--is-shown',\n imageContainer: 'plyr__preview-thumb__image-container',\n timeContainer: 'plyr__preview-thumb__time-container',\n // Scrubbing\n scrubbingContainer: 'plyr__preview-scrubbing',\n scrubbingContainerShown: 'plyr__preview-scrubbing--is-shown'\n }\n },\n // Embed attributes\n attributes: {\n embed: {\n provider: 'data-plyr-provider',\n id: 'data-plyr-embed-id'\n }\n },\n // Advertisements plugin\n // Register for an account here: http://vi.ai/publisher-video-monetization/?aid=plyrio\n ads: {\n enabled: false,\n publisherId: '',\n tagUrl: ''\n },\n // Preview Thumbnails plugin\n previewThumbnails: {\n enabled: false,\n src: ''\n },\n // Vimeo plugin\n vimeo: {\n byline: false,\n portrait: false,\n title: false,\n speed: true,\n transparent: false\n },\n // YouTube plugin\n youtube: {\n noCookie: false,\n // Whether to use an alternative version of YouTube without cookies\n rel: 0,\n // No related vids\n showinfo: 0,\n // Hide info\n iv_load_policy: 3,\n // Hide annotations\n modestbranding: 1 // Hide logos as much as possible (they still show one in the corner when paused)\n\n }\n };\n\n // ==========================================================================\n // Plyr states\n // ==========================================================================\n var pip = {\n active: 'picture-in-picture',\n inactive: 'inline'\n };\n\n // ==========================================================================\n // Plyr supported types and providers\n // ==========================================================================\n var providers = {\n html5: 'html5',\n youtube: 'youtube',\n vimeo: 'vimeo'\n };\n var types = {\n audio: 'audio',\n video: 'video'\n };\n /**\n * Get provider by URL\n * @param {String} url\n */\n\n function getProviderByUrl(url) {\n // YouTube\n if (/^(https?:\\/\\/)?(www\\.)?(youtube\\.com|youtube-nocookie\\.com|youtu\\.?be)\\/.+$/.test(url)) {\n return providers.youtube;\n } // Vimeo\n\n\n if (/^https?:\\/\\/player.vimeo.com\\/video\\/\\d{0,9}(?=\\b|\\/)/.test(url)) {\n return providers.vimeo;\n }\n\n return null;\n }\n\n // ==========================================================================\n // Console wrapper\n // ==========================================================================\n var noop = function noop() {};\n\n var Console =\n /*#__PURE__*/\n function () {\n function Console() {\n var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n _classCallCheck(this, Console);\n\n this.enabled = window.console && enabled;\n\n if (this.enabled) {\n this.log('Debugging enabled');\n }\n }\n\n _createClass(Console, [{\n key: \"log\",\n get: function get() {\n // eslint-disable-next-line no-console\n return this.enabled ? Function.prototype.bind.call(console.log, console) : noop;\n }\n }, {\n key: \"warn\",\n get: function get() {\n // eslint-disable-next-line no-console\n return this.enabled ? Function.prototype.bind.call(console.warn, console) : noop;\n }\n }, {\n key: \"error\",\n get: function get() {\n // eslint-disable-next-line no-console\n return this.enabled ? Function.prototype.bind.call(console.error, console) : noop;\n }\n }]);\n\n return Console;\n }();\n\n function onChange() {\n if (!this.enabled) {\n return;\n } // Update toggle button\n\n\n var button = this.player.elements.buttons.fullscreen;\n\n if (is$1.element(button)) {\n button.pressed = this.active;\n } // Trigger an event\n\n\n triggerEvent.call(this.player, this.target, this.active ? 'enterfullscreen' : 'exitfullscreen', true); // Trap focus in container\n\n if (!browser.isIos) {\n trapFocus.call(this.player, this.target, this.active);\n }\n }\n\n function toggleFallback() {\n var toggle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n // Store or restore scroll position\n if (toggle) {\n this.scrollPosition = {\n x: window.scrollX || 0,\n y: window.scrollY || 0\n };\n } else {\n window.scrollTo(this.scrollPosition.x, this.scrollPosition.y);\n } // Toggle scroll\n\n\n document.body.style.overflow = toggle ? 'hidden' : ''; // Toggle class hook\n\n toggleClass(this.target, this.player.config.classNames.fullscreen.fallback, toggle); // Force full viewport on iPhone X+\n\n if (browser.isIos) {\n var viewport = document.head.querySelector('meta[name=\"viewport\"]');\n var property = 'viewport-fit=cover'; // Inject the viewport meta if required\n\n if (!viewport) {\n viewport = document.createElement('meta');\n viewport.setAttribute('name', 'viewport');\n } // Check if the property already exists\n\n\n var hasProperty = is$1.string(viewport.content) && viewport.content.includes(property);\n\n if (toggle) {\n this.cleanupViewport = !hasProperty;\n\n if (!hasProperty) {\n viewport.content += \",\".concat(property);\n }\n } else if (this.cleanupViewport) {\n viewport.content = viewport.content.split(',').filter(function (part) {\n return part.trim() !== property;\n }).join(',');\n }\n } // Toggle button and fire events\n\n\n onChange.call(this);\n }\n\n var Fullscreen =\n /*#__PURE__*/\n function () {\n function Fullscreen(player) {\n var _this = this;\n\n _classCallCheck(this, Fullscreen);\n\n // Keep reference to parent\n this.player = player; // Get prefix\n\n this.prefix = Fullscreen.prefix;\n this.property = Fullscreen.property; // Scroll position\n\n this.scrollPosition = {\n x: 0,\n y: 0\n }; // Force the use of 'full window/browser' rather than fullscreen\n\n this.forceFallback = player.config.fullscreen.fallback === 'force'; // Register event listeners\n // Handle event (incase user presses escape etc)\n\n on.call(this.player, document, this.prefix === 'ms' ? 'MSFullscreenChange' : \"\".concat(this.prefix, \"fullscreenchange\"), function () {\n // TODO: Filter for target??\n onChange.call(_this);\n }); // Fullscreen toggle on double click\n\n on.call(this.player, this.player.elements.container, 'dblclick', function (event) {\n // Ignore double click in controls\n if (is$1.element(_this.player.elements.controls) && _this.player.elements.controls.contains(event.target)) {\n return;\n }\n\n _this.toggle();\n }); // Update the UI\n\n this.update();\n } // Determine if native supported\n\n\n _createClass(Fullscreen, [{\n key: \"update\",\n // Update UI\n value: function update() {\n if (this.enabled) {\n var mode;\n\n if (this.forceFallback) {\n mode = 'Fallback (forced)';\n } else if (Fullscreen.native) {\n mode = 'Native';\n } else {\n mode = 'Fallback';\n }\n\n this.player.debug.log(\"\".concat(mode, \" fullscreen enabled\"));\n } else {\n this.player.debug.log('Fullscreen not supported and fallback disabled');\n } // Add styling hook to show button\n\n\n toggleClass(this.player.elements.container, this.player.config.classNames.fullscreen.enabled, this.enabled);\n } // Make an element fullscreen\n\n }, {\n key: \"enter\",\n value: function enter() {\n if (!this.enabled) {\n return;\n } // iOS native fullscreen doesn't need the request step\n\n\n if (browser.isIos && this.player.config.fullscreen.iosNative) {\n this.target.webkitEnterFullscreen();\n } else if (!Fullscreen.native || this.forceFallback) {\n toggleFallback.call(this, true);\n } else if (!this.prefix) {\n this.target.requestFullscreen();\n } else if (!is$1.empty(this.prefix)) {\n this.target[\"\".concat(this.prefix, \"Request\").concat(this.property)]();\n }\n } // Bail from fullscreen\n\n }, {\n key: \"exit\",\n value: function exit() {\n if (!this.enabled) {\n return;\n } // iOS native fullscreen\n\n\n if (browser.isIos && this.player.config.fullscreen.iosNative) {\n this.target.webkitExitFullscreen();\n this.player.play();\n } else if (!Fullscreen.native || this.forceFallback) {\n toggleFallback.call(this, false);\n } else if (!this.prefix) {\n (document.cancelFullScreen || document.exitFullscreen).call(document);\n } else if (!is$1.empty(this.prefix)) {\n var action = this.prefix === 'moz' ? 'Cancel' : 'Exit';\n document[\"\".concat(this.prefix).concat(action).concat(this.property)]();\n }\n } // Toggle state\n\n }, {\n key: \"toggle\",\n value: function toggle() {\n if (!this.active) {\n this.enter();\n } else {\n this.exit();\n }\n }\n }, {\n key: \"usingNative\",\n // If we're actually using native\n get: function get() {\n return Fullscreen.native && !this.forceFallback;\n } // Get the prefix for handlers\n\n }, {\n key: \"enabled\",\n // Determine if fullscreen is enabled\n get: function get() {\n return (Fullscreen.native || this.player.config.fullscreen.fallback) && this.player.config.fullscreen.enabled && this.player.supported.ui && this.player.isVideo;\n } // Get active state\n\n }, {\n key: \"active\",\n get: function get() {\n if (!this.enabled) {\n return false;\n } // Fallback using classname\n\n\n if (!Fullscreen.native || this.forceFallback) {\n return hasClass(this.target, this.player.config.classNames.fullscreen.fallback);\n }\n\n var element = !this.prefix ? document.fullscreenElement : document[\"\".concat(this.prefix).concat(this.property, \"Element\")];\n return element === this.target;\n } // Get target element\n\n }, {\n key: \"target\",\n get: function get() {\n return browser.isIos && this.player.config.fullscreen.iosNative ? this.player.media : this.player.elements.container;\n }\n }], [{\n key: \"native\",\n get: function get() {\n return !!(document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled);\n }\n }, {\n key: \"prefix\",\n get: function get() {\n // No prefix\n if (is$1.function(document.exitFullscreen)) {\n return '';\n } // Check for fullscreen support by vendor prefix\n\n\n var value = '';\n var prefixes = ['webkit', 'moz', 'ms'];\n prefixes.some(function (pre) {\n if (is$1.function(document[\"\".concat(pre, \"ExitFullscreen\")]) || is$1.function(document[\"\".concat(pre, \"CancelFullScreen\")])) {\n value = pre;\n return true;\n }\n\n return false;\n });\n return value;\n }\n }, {\n key: \"property\",\n get: function get() {\n return this.prefix === 'moz' ? 'FullScreen' : 'Fullscreen';\n }\n }]);\n\n return Fullscreen;\n }();\n\n // `Math.sign` method implementation\n // https://tc39.github.io/ecma262/#sec-math.sign\n var mathSign = Math.sign || function sign(x) {\n // eslint-disable-next-line no-self-compare\n return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;\n };\n\n // `Math.sign` method\n // https://tc39.github.io/ecma262/#sec-math.sign\n _export({ target: 'Math', stat: true }, {\n sign: mathSign\n });\n\n // ==========================================================================\n // Load image avoiding xhr/fetch CORS issues\n // Server status can't be obtained this way unfortunately, so this uses \"naturalWidth\" to determine if the image has loaded\n // By default it checks if it is at least 1px, but you can add a second argument to change this\n // ==========================================================================\n function loadImage(src) {\n var minWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n return new Promise(function (resolve, reject) {\n var image = new Image();\n\n var handler = function handler() {\n delete image.onload;\n delete image.onerror;\n (image.naturalWidth >= minWidth ? resolve : reject)(image);\n };\n\n Object.assign(image, {\n onload: handler,\n onerror: handler,\n src: src\n });\n });\n }\n\n var ui = {\n addStyleHook: function addStyleHook() {\n toggleClass(this.elements.container, this.config.selectors.container.replace('.', ''), true);\n toggleClass(this.elements.container, this.config.classNames.uiSupported, this.supported.ui);\n },\n // Toggle native HTML5 media controls\n toggleNativeControls: function toggleNativeControls() {\n var toggle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n if (toggle && this.isHTML5) {\n this.media.setAttribute('controls', '');\n } else {\n this.media.removeAttribute('controls');\n }\n },\n // Setup the UI\n build: function build() {\n var _this = this;\n\n // Re-attach media element listeners\n // TODO: Use event bubbling?\n this.listeners.media(); // Don't setup interface if no support\n\n if (!this.supported.ui) {\n this.debug.warn(\"Basic support only for \".concat(this.provider, \" \").concat(this.type)); // Restore native controls\n\n ui.toggleNativeControls.call(this, true); // Bail\n\n return;\n } // Inject custom controls if not present\n\n\n if (!is$1.element(this.elements.controls)) {\n // Inject custom controls\n controls.inject.call(this); // Re-attach control listeners\n\n this.listeners.controls();\n } // Remove native controls\n\n\n ui.toggleNativeControls.call(this); // Setup captions for HTML5\n\n if (this.isHTML5) {\n captions.setup.call(this);\n } // Reset volume\n\n\n this.volume = null; // Reset mute state\n\n this.muted = null; // Reset loop state\n\n this.loop = null; // Reset quality setting\n\n this.quality = null; // Reset speed\n\n this.speed = null; // Reset volume display\n\n controls.updateVolume.call(this); // Reset time display\n\n controls.timeUpdate.call(this); // Update the UI\n\n ui.checkPlaying.call(this); // Check for picture-in-picture support\n\n toggleClass(this.elements.container, this.config.classNames.pip.supported, support.pip && this.isHTML5 && this.isVideo); // Check for airplay support\n\n toggleClass(this.elements.container, this.config.classNames.airplay.supported, support.airplay && this.isHTML5); // Add iOS class\n\n toggleClass(this.elements.container, this.config.classNames.isIos, browser.isIos); // Add touch class\n\n toggleClass(this.elements.container, this.config.classNames.isTouch, this.touch); // Ready for API calls\n\n this.ready = true; // Ready event at end of execution stack\n\n setTimeout(function () {\n triggerEvent.call(_this, _this.media, 'ready');\n }, 0); // Set the title\n\n ui.setTitle.call(this); // Assure the poster image is set, if the property was added before the element was created\n\n if (this.poster) {\n ui.setPoster.call(this, this.poster, false).catch(function () {});\n } // Manually set the duration if user has overridden it.\n // The event listeners for it doesn't get called if preload is disabled (#701)\n\n\n if (this.config.duration) {\n controls.durationUpdate.call(this);\n }\n },\n // Setup aria attribute for play and iframe title\n setTitle: function setTitle() {\n // Find the current text\n var label = i18n.get('play', this.config); // If there's a media title set, use that for the label\n\n if (is$1.string(this.config.title) && !is$1.empty(this.config.title)) {\n label += \", \".concat(this.config.title);\n } // If there's a play button, set label\n\n\n Array.from(this.elements.buttons.play || []).forEach(function (button) {\n button.setAttribute('aria-label', label);\n }); // Set iframe title\n // https://github.com/sampotts/plyr/issues/124\n\n if (this.isEmbed) {\n var iframe = getElement.call(this, 'iframe');\n\n if (!is$1.element(iframe)) {\n return;\n } // Default to media type\n\n\n var title = !is$1.empty(this.config.title) ? this.config.title : 'video';\n var format = i18n.get('frameTitle', this.config);\n iframe.setAttribute('title', format.replace('{title}', title));\n }\n },\n // Toggle poster\n togglePoster: function togglePoster(enable) {\n toggleClass(this.elements.container, this.config.classNames.posterEnabled, enable);\n },\n // Set the poster image (async)\n // Used internally for the poster setter, with the passive option forced to false\n setPoster: function setPoster(poster) {\n var _this2 = this;\n\n var passive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n // Don't override if call is passive\n if (passive && this.poster) {\n return Promise.reject(new Error('Poster already set'));\n } // Set property synchronously to respect the call order\n\n\n this.media.setAttribute('poster', poster); // Wait until ui is ready\n\n return ready.call(this) // Load image\n .then(function () {\n return loadImage(poster);\n }).catch(function (err) {\n // Hide poster on error unless it's been set by another call\n if (poster === _this2.poster) {\n ui.togglePoster.call(_this2, false);\n } // Rethrow\n\n\n throw err;\n }).then(function () {\n // Prevent race conditions\n if (poster !== _this2.poster) {\n throw new Error('setPoster cancelled by later call to setPoster');\n }\n }).then(function () {\n Object.assign(_this2.elements.poster.style, {\n backgroundImage: \"url('\".concat(poster, \"')\"),\n // Reset backgroundSize as well (since it can be set to \"cover\" for padded thumbnails for youtube)\n backgroundSize: ''\n });\n ui.togglePoster.call(_this2, true);\n return poster;\n });\n },\n // Check playing state\n checkPlaying: function checkPlaying(event) {\n var _this3 = this;\n\n // Class hooks\n toggleClass(this.elements.container, this.config.classNames.playing, this.playing);\n toggleClass(this.elements.container, this.config.classNames.paused, this.paused);\n toggleClass(this.elements.container, this.config.classNames.stopped, this.stopped); // Set state\n\n Array.from(this.elements.buttons.play || []).forEach(function (target) {\n Object.assign(target, {\n pressed: _this3.playing\n });\n }); // Only update controls on non timeupdate events\n\n if (is$1.event(event) && event.type === 'timeupdate') {\n return;\n } // Toggle controls\n\n\n ui.toggleControls.call(this);\n },\n // Check if media is loading\n checkLoading: function checkLoading(event) {\n var _this4 = this;\n\n this.loading = ['stalled', 'waiting'].includes(event.type); // Clear timer\n\n clearTimeout(this.timers.loading); // Timer to prevent flicker when seeking\n\n this.timers.loading = setTimeout(function () {\n // Update progress bar loading class state\n toggleClass(_this4.elements.container, _this4.config.classNames.loading, _this4.loading); // Update controls visibility\n\n ui.toggleControls.call(_this4);\n }, this.loading ? 250 : 0);\n },\n // Toggle controls based on state and `force` argument\n toggleControls: function toggleControls(force) {\n var controlsElement = this.elements.controls;\n\n if (controlsElement && this.config.hideControls) {\n // Don't hide controls if a touch-device user recently seeked. (Must be limited to touch devices, or it occasionally prevents desktop controls from hiding.)\n var recentTouchSeek = this.touch && this.lastSeekTime + 2000 > Date.now(); // Show controls if force, loading, paused, button interaction, or recent seek, otherwise hide\n\n this.toggleControls(Boolean(force || this.loading || this.paused || controlsElement.pressed || controlsElement.hover || recentTouchSeek));\n }\n }\n };\n\n var Listeners =\n /*#__PURE__*/\n function () {\n function Listeners(player) {\n _classCallCheck(this, Listeners);\n\n this.player = player;\n this.lastKey = null;\n this.focusTimer = null;\n this.lastKeyDown = null;\n this.handleKey = this.handleKey.bind(this);\n this.toggleMenu = this.toggleMenu.bind(this);\n this.setTabFocus = this.setTabFocus.bind(this);\n this.firstTouch = this.firstTouch.bind(this);\n } // Handle key presses\n\n\n _createClass(Listeners, [{\n key: \"handleKey\",\n value: function handleKey(event) {\n var player = this.player;\n var elements = player.elements;\n var code = event.keyCode ? event.keyCode : event.which;\n var pressed = event.type === 'keydown';\n var repeat = pressed && code === this.lastKey; // Bail if a modifier key is set\n\n if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) {\n return;\n } // If the event is bubbled from the media element\n // Firefox doesn't get the keycode for whatever reason\n\n\n if (!is$1.number(code)) {\n return;\n } // Seek by the number keys\n\n\n var seekByKey = function seekByKey() {\n // Divide the max duration into 10th's and times by the number value\n player.currentTime = player.duration / 10 * (code - 48);\n }; // Handle the key on keydown\n // Reset on keyup\n\n\n if (pressed) {\n // Check focused element\n // and if the focused element is not editable (e.g. text input)\n // and any that accept key input http://webaim.org/techniques/keyboard/\n var focused = document.activeElement;\n\n if (is$1.element(focused)) {\n var editable = player.config.selectors.editable;\n var seek = elements.inputs.seek;\n\n if (focused !== seek && matches$1(focused, editable)) {\n return;\n }\n\n if (event.which === 32 && matches$1(focused, 'button, [role^=\"menuitem\"]')) {\n return;\n }\n } // Which keycodes should we prevent default\n\n\n var preventDefault = [32, 37, 38, 39, 40, 48, 49, 50, 51, 52, 53, 54, 56, 57, 67, 70, 73, 75, 76, 77, 79]; // If the code is found prevent default (e.g. prevent scrolling for arrows)\n\n if (preventDefault.includes(code)) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n switch (code) {\n case 48:\n case 49:\n case 50:\n case 51:\n case 52:\n case 53:\n case 54:\n case 55:\n case 56:\n case 57:\n // 0-9\n if (!repeat) {\n seekByKey();\n }\n\n break;\n\n case 32:\n case 75:\n // Space and K key\n if (!repeat) {\n player.togglePlay();\n }\n\n break;\n\n case 38:\n // Arrow up\n player.increaseVolume(0.1);\n break;\n\n case 40:\n // Arrow down\n player.decreaseVolume(0.1);\n break;\n\n case 77:\n // M key\n if (!repeat) {\n player.muted = !player.muted;\n }\n\n break;\n\n case 39:\n // Arrow forward\n player.forward();\n break;\n\n case 37:\n // Arrow back\n player.rewind();\n break;\n\n case 70:\n // F key\n player.fullscreen.toggle();\n break;\n\n case 67:\n // C key\n if (!repeat) {\n player.toggleCaptions();\n }\n\n break;\n\n case 76:\n // L key\n player.loop = !player.loop;\n break;\n\n /* case 73:\n this.setLoop('start');\n break;\n case 76:\n this.setLoop();\n break;\n case 79:\n this.setLoop('end');\n break; */\n\n default:\n break;\n } // Escape is handle natively when in full screen\n // So we only need to worry about non native\n\n\n if (code === 27 && !player.fullscreen.usingNative && player.fullscreen.active) {\n player.fullscreen.toggle();\n } // Store last code for next cycle\n\n\n this.lastKey = code;\n } else {\n this.lastKey = null;\n }\n } // Toggle menu\n\n }, {\n key: \"toggleMenu\",\n value: function toggleMenu(event) {\n controls.toggleMenu.call(this.player, event);\n } // Device is touch enabled\n\n }, {\n key: \"firstTouch\",\n value: function firstTouch() {\n var player = this.player;\n var elements = player.elements;\n player.touch = true; // Add touch class\n\n toggleClass(elements.container, player.config.classNames.isTouch, true);\n }\n }, {\n key: \"setTabFocus\",\n value: function setTabFocus(event) {\n var player = this.player;\n var elements = player.elements;\n clearTimeout(this.focusTimer); // Ignore any key other than tab\n\n if (event.type === 'keydown' && event.which !== 9) {\n return;\n } // Store reference to event timeStamp\n\n\n if (event.type === 'keydown') {\n this.lastKeyDown = event.timeStamp;\n } // Remove current classes\n\n\n var removeCurrent = function removeCurrent() {\n var className = player.config.classNames.tabFocus;\n var current = getElements.call(player, \".\".concat(className));\n toggleClass(current, className, false);\n }; // Determine if a key was pressed to trigger this event\n\n\n var wasKeyDown = event.timeStamp - this.lastKeyDown <= 20; // Ignore focus events if a key was pressed prior\n\n if (event.type === 'focus' && !wasKeyDown) {\n return;\n } // Remove all current\n\n\n removeCurrent(); // Delay the adding of classname until the focus has changed\n // This event fires before the focusin event\n\n this.focusTimer = setTimeout(function () {\n var focused = document.activeElement; // Ignore if current focus element isn't inside the player\n\n if (!elements.container.contains(focused)) {\n return;\n }\n\n toggleClass(document.activeElement, player.config.classNames.tabFocus, true);\n }, 10);\n } // Global window & document listeners\n\n }, {\n key: \"global\",\n value: function global() {\n var toggle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var player = this.player; // Keyboard shortcuts\n\n if (player.config.keyboard.global) {\n toggleListener.call(player, window, 'keydown keyup', this.handleKey, toggle, false);\n } // Click anywhere closes menu\n\n\n toggleListener.call(player, document.body, 'click', this.toggleMenu, toggle); // Detect touch by events\n\n once.call(player, document.body, 'touchstart', this.firstTouch); // Tab focus detection\n\n toggleListener.call(player, document.body, 'keydown focus blur', this.setTabFocus, toggle, false, true);\n } // Container listeners\n\n }, {\n key: \"container\",\n value: function container() {\n var player = this.player;\n var config = player.config,\n elements = player.elements,\n timers = player.timers; // Keyboard shortcuts\n\n if (!config.keyboard.global && config.keyboard.focused) {\n on.call(player, elements.container, 'keydown keyup', this.handleKey, false);\n } // Toggle controls on mouse events and entering fullscreen\n\n\n on.call(player, elements.container, 'mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen', function (event) {\n var controlsElement = elements.controls; // Remove button states for fullscreen\n\n if (controlsElement && event.type === 'enterfullscreen') {\n controlsElement.pressed = false;\n controlsElement.hover = false;\n } // Show, then hide after a timeout unless another control event occurs\n\n\n var show = ['touchstart', 'touchmove', 'mousemove'].includes(event.type);\n var delay = 0;\n\n if (show) {\n ui.toggleControls.call(player, true); // Use longer timeout for touch devices\n\n delay = player.touch ? 3000 : 2000;\n } // Clear timer\n\n\n clearTimeout(timers.controls); // Set new timer to prevent flicker when seeking\n\n timers.controls = setTimeout(function () {\n return ui.toggleControls.call(player, false);\n }, delay);\n }); // Set a gutter for Vimeo\n\n var setGutter = function setGutter(ratio, padding, toggle) {\n if (!player.isVimeo) {\n return;\n }\n\n var target = player.elements.wrapper.firstChild;\n\n var _ratio = _slicedToArray(ratio, 2),\n y = _ratio[1];\n\n var _getAspectRatio$call = getAspectRatio.call(player),\n _getAspectRatio$call2 = _slicedToArray(_getAspectRatio$call, 2),\n videoX = _getAspectRatio$call2[0],\n videoY = _getAspectRatio$call2[1];\n\n target.style.maxWidth = toggle ? \"\".concat(y / videoY * videoX, \"px\") : null;\n target.style.margin = toggle ? '0 auto' : null;\n }; // Resize on fullscreen change\n\n\n var setPlayerSize = function setPlayerSize(measure) {\n // If we don't need to measure the viewport\n if (!measure) {\n return setAspectRatio.call(player);\n }\n\n var rect = elements.container.getBoundingClientRect();\n var width = rect.width,\n height = rect.height;\n return setAspectRatio.call(player, \"\".concat(width, \":\").concat(height));\n };\n\n var resized = function resized() {\n clearTimeout(timers.resized);\n timers.resized = setTimeout(setPlayerSize, 50);\n };\n\n on.call(player, elements.container, 'enterfullscreen exitfullscreen', function (event) {\n var _player$fullscreen = player.fullscreen,\n target = _player$fullscreen.target,\n usingNative = _player$fullscreen.usingNative; // Ignore events not from target\n\n if (target !== elements.container) {\n return;\n } // If it's not an embed and no ratio specified\n\n\n if (!player.isEmbed && is$1.empty(player.config.ratio)) {\n return;\n }\n\n var isEnter = event.type === 'enterfullscreen'; // Set the player size when entering fullscreen to viewport size\n\n var _setPlayerSize = setPlayerSize(isEnter),\n padding = _setPlayerSize.padding,\n ratio = _setPlayerSize.ratio; // Set Vimeo gutter\n\n\n setGutter(ratio, padding, isEnter); // If not using native fullscreen, we need to check for resizes of viewport\n\n if (!usingNative) {\n if (isEnter) {\n on.call(player, window, 'resize', resized);\n } else {\n off.call(player, window, 'resize', resized);\n }\n }\n });\n } // Listen for media events\n\n }, {\n key: \"media\",\n value: function media() {\n var _this = this;\n\n var player = this.player;\n var elements = player.elements; // Time change on media\n\n on.call(player, player.media, 'timeupdate seeking seeked', function (event) {\n return controls.timeUpdate.call(player, event);\n }); // Display duration\n\n on.call(player, player.media, 'durationchange loadeddata loadedmetadata', function (event) {\n return controls.durationUpdate.call(player, event);\n }); // Check for audio tracks on load\n // We can't use `loadedmetadata` as it doesn't seem to have audio tracks at that point\n\n on.call(player, player.media, 'canplay loadeddata', function () {\n toggleHidden(elements.volume, !player.hasAudio);\n toggleHidden(elements.buttons.mute, !player.hasAudio);\n }); // Handle the media finishing\n\n on.call(player, player.media, 'ended', function () {\n // Show poster on end\n if (player.isHTML5 && player.isVideo && player.config.resetOnEnd) {\n // Restart\n player.restart();\n }\n }); // Check for buffer progress\n\n on.call(player, player.media, 'progress playing seeking seeked', function (event) {\n return controls.updateProgress.call(player, event);\n }); // Handle volume changes\n\n on.call(player, player.media, 'volumechange', function (event) {\n return controls.updateVolume.call(player, event);\n }); // Handle play/pause\n\n on.call(player, player.media, 'playing play pause ended emptied timeupdate', function (event) {\n return ui.checkPlaying.call(player, event);\n }); // Loading state\n\n on.call(player, player.media, 'waiting canplay seeked playing', function (event) {\n return ui.checkLoading.call(player, event);\n }); // Click video\n\n if (player.supported.ui && player.config.clickToPlay && !player.isAudio) {\n // Re-fetch the wrapper\n var wrapper = getElement.call(player, \".\".concat(player.config.classNames.video)); // Bail if there's no wrapper (this should never happen)\n\n if (!is$1.element(wrapper)) {\n return;\n } // On click play, pause or restart\n\n\n on.call(player, elements.container, 'click', function (event) {\n var targets = [elements.container, wrapper]; // Ignore if click if not container or in video wrapper\n\n if (!targets.includes(event.target) && !wrapper.contains(event.target)) {\n return;\n } // Touch devices will just show controls (if hidden)\n\n\n if (player.touch && player.config.hideControls) {\n return;\n }\n\n if (player.ended) {\n _this.proxy(event, player.restart, 'restart');\n\n _this.proxy(event, player.play, 'play');\n } else {\n _this.proxy(event, player.togglePlay, 'play');\n }\n });\n } // Disable right click\n\n\n if (player.supported.ui && player.config.disableContextMenu) {\n on.call(player, elements.wrapper, 'contextmenu', function (event) {\n event.preventDefault();\n }, false);\n } // Volume change\n\n\n on.call(player, player.media, 'volumechange', function () {\n // Save to storage\n player.storage.set({\n volume: player.volume,\n muted: player.muted\n });\n }); // Speed change\n\n on.call(player, player.media, 'ratechange', function () {\n // Update UI\n controls.updateSetting.call(player, 'speed'); // Save to storage\n\n\n player.storage.set({\n speed: player.speed\n });\n }); // Quality change\n\n on.call(player, player.media, 'qualitychange', function (event) {\n // Update UI\n controls.updateSetting.call(player, 'quality', null, event.detail.quality);\n }); // Update download link when ready and if quality changes\n\n on.call(player, player.media, 'ready qualitychange', function () {\n controls.setDownloadUrl.call(player);\n }); // Proxy events to container\n // Bubble up key events for Edge\n\n var proxyEvents = player.config.events.concat(['keyup', 'keydown']).join(' ');\n on.call(player, player.media, proxyEvents, function (event) {\n var _event$detail = event.detail,\n detail = _event$detail === void 0 ? {} : _event$detail; // Get error details from media\n\n if (event.type === 'error') {\n detail = player.media.error;\n }\n\n triggerEvent.call(player, elements.container, event.type, true, detail);\n });\n } // Run default and custom handlers\n\n }, {\n key: \"proxy\",\n value: function proxy(event, defaultHandler, customHandlerKey) {\n var player = this.player;\n var customHandler = player.config.listeners[customHandlerKey];\n var hasCustomHandler = is$1.function(customHandler);\n var returned = true; // Execute custom handler\n\n if (hasCustomHandler) {\n returned = customHandler.call(player, event);\n } // Only call default handler if not prevented in custom handler\n\n\n if (returned && is$1.function(defaultHandler)) {\n defaultHandler.call(player, event);\n }\n } // Trigger custom and default handlers\n\n }, {\n key: \"bind\",\n value: function bind(element, type, defaultHandler, customHandlerKey) {\n var _this2 = this;\n\n var passive = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n var player = this.player;\n var customHandler = player.config.listeners[customHandlerKey];\n var hasCustomHandler = is$1.function(customHandler);\n on.call(player, element, type, function (event) {\n return _this2.proxy(event, defaultHandler, customHandlerKey);\n }, passive && !hasCustomHandler);\n } // Listen for control events\n\n }, {\n key: \"controls\",\n value: function controls$1() {\n var _this3 = this;\n\n var player = this.player;\n var elements = player.elements; // IE doesn't support input event, so we fallback to change\n\n var inputEvent = browser.isIE ? 'change' : 'input'; // Play/pause toggle\n\n if (elements.buttons.play) {\n Array.from(elements.buttons.play).forEach(function (button) {\n _this3.bind(button, 'click', player.togglePlay, 'play');\n });\n } // Pause\n\n\n this.bind(elements.buttons.restart, 'click', player.restart, 'restart'); // Rewind\n\n this.bind(elements.buttons.rewind, 'click', player.rewind, 'rewind'); // Rewind\n\n this.bind(elements.buttons.fastForward, 'click', player.forward, 'fastForward'); // Mute toggle\n\n this.bind(elements.buttons.mute, 'click', function () {\n player.muted = !player.muted;\n }, 'mute'); // Captions toggle\n\n this.bind(elements.buttons.captions, 'click', function () {\n return player.toggleCaptions();\n }); // Download\n\n this.bind(elements.buttons.download, 'click', function () {\n triggerEvent.call(player, player.media, 'download');\n }, 'download'); // Fullscreen toggle\n\n this.bind(elements.buttons.fullscreen, 'click', function () {\n player.fullscreen.toggle();\n }, 'fullscreen'); // Picture-in-Picture\n\n this.bind(elements.buttons.pip, 'click', function () {\n player.pip = 'toggle';\n }, 'pip'); // Airplay\n\n this.bind(elements.buttons.airplay, 'click', player.airplay, 'airplay'); // Settings menu - click toggle\n\n this.bind(elements.buttons.settings, 'click', function (event) {\n // Prevent the document click listener closing the menu\n event.stopPropagation();\n\n controls.toggleMenu.call(player, event);\n }); // Settings menu - keyboard toggle\n // We have to bind to keyup otherwise Firefox triggers a click when a keydown event handler shifts focus\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1220143\n\n this.bind(elements.buttons.settings, 'keyup', function (event) {\n var code = event.which; // We only care about space and return\n\n if (![13, 32].includes(code)) {\n return;\n } // Because return triggers a click anyway, all we need to do is set focus\n\n\n if (code === 13) {\n controls.focusFirstMenuItem.call(player, null, true);\n\n return;\n } // Prevent scroll\n\n\n event.preventDefault(); // Prevent playing video (Firefox)\n\n event.stopPropagation(); // Toggle menu\n\n controls.toggleMenu.call(player, event);\n }, null, false // Can't be passive as we're preventing default\n ); // Escape closes menu\n\n this.bind(elements.settings.menu, 'keydown', function (event) {\n if (event.which === 27) {\n controls.toggleMenu.call(player, event);\n }\n }); // Set range input alternative \"value\", which matches the tooltip time (#954)\n\n this.bind(elements.inputs.seek, 'mousedown mousemove', function (event) {\n var rect = elements.progress.getBoundingClientRect();\n var percent = 100 / rect.width * (event.pageX - rect.left);\n event.currentTarget.setAttribute('seek-value', percent);\n }); // Pause while seeking\n\n this.bind(elements.inputs.seek, 'mousedown mouseup keydown keyup touchstart touchend', function (event) {\n var seek = event.currentTarget;\n var code = event.keyCode ? event.keyCode : event.which;\n var attribute = 'play-on-seeked';\n\n if (is$1.keyboardEvent(event) && code !== 39 && code !== 37) {\n return;\n } // Record seek time so we can prevent hiding controls for a few seconds after seek\n\n\n player.lastSeekTime = Date.now(); // Was playing before?\n\n var play = seek.hasAttribute(attribute); // Done seeking\n\n var done = ['mouseup', 'touchend', 'keyup'].includes(event.type); // If we're done seeking and it was playing, resume playback\n\n if (play && done) {\n seek.removeAttribute(attribute);\n player.play();\n } else if (!done && player.playing) {\n seek.setAttribute(attribute, '');\n player.pause();\n }\n }); // Fix range inputs on iOS\n // Super weird iOS bug where after you interact with an <input type=\"range\">,\n // it takes over further interactions on the page. This is a hack\n\n if (browser.isIos) {\n var inputs = getElements.call(player, 'input[type=\"range\"]');\n Array.from(inputs).forEach(function (input) {\n return _this3.bind(input, inputEvent, function (event) {\n return repaint(event.target);\n });\n });\n } // Seek\n\n\n this.bind(elements.inputs.seek, inputEvent, function (event) {\n var seek = event.currentTarget; // If it exists, use seek-value instead of \"value\" for consistency with tooltip time (#954)\n\n var seekTo = seek.getAttribute('seek-value');\n\n if (is$1.empty(seekTo)) {\n seekTo = seek.value;\n }\n\n seek.removeAttribute('seek-value');\n player.currentTime = seekTo / seek.max * player.duration;\n }, 'seek'); // Seek tooltip\n\n this.bind(elements.progress, 'mouseenter mouseleave mousemove', function (event) {\n return controls.updateSeekTooltip.call(player, event);\n }); // Preview thumbnails plugin\n // TODO: Really need to work on some sort of plug-in wide event bus or pub-sub for this\n\n this.bind(elements.progress, 'mousemove touchmove', function (event) {\n var previewThumbnails = player.previewThumbnails;\n\n if (previewThumbnails && previewThumbnails.loaded) {\n previewThumbnails.startMove(event);\n }\n }); // Hide thumbnail preview - on mouse click, mouse leave, and video play/seek. All four are required, e.g., for buffering\n\n this.bind(elements.progress, 'mouseleave click', function () {\n var previewThumbnails = player.previewThumbnails;\n\n if (previewThumbnails && previewThumbnails.loaded) {\n previewThumbnails.endMove(false, true);\n }\n }); // Show scrubbing preview\n\n this.bind(elements.progress, 'mousedown touchstart', function (event) {\n var previewThumbnails = player.previewThumbnails;\n\n if (previewThumbnails && previewThumbnails.loaded) {\n previewThumbnails.startScrubbing(event);\n }\n });\n this.bind(elements.progress, 'mouseup touchend', function (event) {\n var previewThumbnails = player.previewThumbnails;\n\n if (previewThumbnails && previewThumbnails.loaded) {\n previewThumbnails.endScrubbing(event);\n }\n }); // Polyfill for lower fill in <input type=\"range\"> for webkit\n\n if (browser.isWebkit) {\n Array.from(getElements.call(player, 'input[type=\"range\"]')).forEach(function (element) {\n _this3.bind(element, 'input', function (event) {\n return controls.updateRangeFill.call(player, event.target);\n });\n });\n } // Current time invert\n // Only if one time element is used for both currentTime and duration\n\n\n if (player.config.toggleInvert && !is$1.element(elements.display.duration)) {\n this.bind(elements.display.currentTime, 'click', function () {\n // Do nothing if we're at the start\n if (player.currentTime === 0) {\n return;\n }\n\n player.config.invertTime = !player.config.invertTime;\n\n controls.timeUpdate.call(player);\n });\n } // Volume\n\n\n this.bind(elements.inputs.volume, inputEvent, function (event) {\n player.volume = event.target.value;\n }, 'volume'); // Update controls.hover state (used for ui.toggleControls to avoid hiding when interacting)\n\n this.bind(elements.controls, 'mouseenter mouseleave', function (event) {\n elements.controls.hover = !player.touch && event.type === 'mouseenter';\n }); // Update controls.pressed state (used for ui.toggleControls to avoid hiding when interacting)\n\n this.bind(elements.controls, 'mousedown mouseup touchstart touchend touchcancel', function (event) {\n elements.controls.pressed = ['mousedown', 'touchstart'].includes(event.type);\n }); // Show controls when they receive focus (e.g., when using keyboard tab key)\n\n this.bind(elements.controls, 'focusin', function () {\n var config = player.config,\n timers = player.timers; // Skip transition to prevent focus from scrolling the parent element\n\n toggleClass(elements.controls, config.classNames.noTransition, true); // Toggle\n\n ui.toggleControls.call(player, true); // Restore transition\n\n setTimeout(function () {\n toggleClass(elements.controls, config.classNames.noTransition, false);\n }, 0); // Delay a little more for mouse users\n\n var delay = _this3.touch ? 3000 : 4000; // Clear timer\n\n clearTimeout(timers.controls); // Hide again after delay\n\n timers.controls = setTimeout(function () {\n return ui.toggleControls.call(player, false);\n }, delay);\n }); // Mouse wheel for volume\n\n this.bind(elements.inputs.volume, 'wheel', function (event) {\n // Detect \"natural\" scroll - suppored on OS X Safari only\n // Other browsers on OS X will be inverted until support improves\n var inverted = event.webkitDirectionInvertedFromDevice; // Get delta from event. Invert if `inverted` is true\n\n var _map = [event.deltaX, -event.deltaY].map(function (value) {\n return inverted ? -value : value;\n }),\n _map2 = _slicedToArray(_map, 2),\n x = _map2[0],\n y = _map2[1]; // Using the biggest delta, normalize to 1 or -1 (or 0 if no delta)\n\n\n var direction = Math.sign(Math.abs(x) > Math.abs(y) ? x : y); // Change the volume by 2%\n\n player.increaseVolume(direction / 50); // Don't break page scrolling at max and min\n\n var volume = player.media.volume;\n\n if (direction === 1 && volume < 1 || direction === -1 && volume > 0) {\n event.preventDefault();\n }\n }, 'volume', false);\n }\n }]);\n\n return Listeners;\n }();\n\n var defineProperty$5 = objectDefineProperty.f;\n\n var FunctionPrototype = Function.prototype;\n var FunctionPrototypeToString = FunctionPrototype.toString;\n var nameRE = /^\\s*function ([^ (]*)/;\n var NAME = 'name';\n\n // Function instances `.name` property\n // https://tc39.github.io/ecma262/#sec-function-instances-name\n if (descriptors && !(NAME in FunctionPrototype)) {\n defineProperty$5(FunctionPrototype, NAME, {\n configurable: true,\n get: function () {\n try {\n return FunctionPrototypeToString.call(this).match(nameRE)[1];\n } catch (error) {\n return '';\n }\n }\n });\n }\n\n var max$3 = Math.max;\n var min$5 = Math.min;\n var MAX_SAFE_INTEGER$1 = 0x1FFFFFFFFFFFFF;\n var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';\n\n // `Array.prototype.splice` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.splice\n // with adding support of @@species\n _export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('splice') }, {\n splice: function splice(start, deleteCount /* , ...items */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var actualStart = toAbsoluteIndex(start, len);\n var argumentsLength = arguments.length;\n var insertCount, actualDeleteCount, A, k, from, to;\n if (argumentsLength === 0) {\n insertCount = actualDeleteCount = 0;\n } else if (argumentsLength === 1) {\n insertCount = 0;\n actualDeleteCount = len - actualStart;\n } else {\n insertCount = argumentsLength - 2;\n actualDeleteCount = min$5(max$3(toInteger(deleteCount), 0), len - actualStart);\n }\n if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER$1) {\n throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);\n }\n A = arraySpeciesCreate(O, actualDeleteCount);\n for (k = 0; k < actualDeleteCount; k++) {\n from = actualStart + k;\n if (from in O) createProperty(A, k, O[from]);\n }\n A.length = actualDeleteCount;\n if (insertCount < actualDeleteCount) {\n for (k = actualStart; k < len - actualDeleteCount; k++) {\n from = k + actualDeleteCount;\n to = k + insertCount;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];\n } else if (insertCount > actualDeleteCount) {\n for (k = len - actualDeleteCount; k > actualStart; k--) {\n from = k + actualDeleteCount - 1;\n to = k + insertCount - 1;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n }\n for (k = 0; k < insertCount; k++) {\n O[k + actualStart] = arguments[k + 2];\n }\n O.length = len - actualDeleteCount + insertCount;\n return A;\n }\n });\n\n var loadjs_umd = createCommonjsModule(function (module, exports) {\n (function (root, factory) {\n {\n module.exports = factory();\n }\n })(commonjsGlobal, function () {\n /**\n * Global dependencies.\n * @global {Object} document - DOM\n */\n var devnull = function devnull() {},\n bundleIdCache = {},\n bundleResultCache = {},\n bundleCallbackQueue = {};\n /**\n * Subscribe to bundle load event.\n * @param {string[]} bundleIds - Bundle ids\n * @param {Function} callbackFn - The callback function\n */\n\n\n function subscribe(bundleIds, callbackFn) {\n // listify\n bundleIds = bundleIds.push ? bundleIds : [bundleIds];\n var depsNotFound = [],\n i = bundleIds.length,\n numWaiting = i,\n fn,\n bundleId,\n r,\n q; // define callback function\n\n fn = function fn(bundleId, pathsNotFound) {\n if (pathsNotFound.length) depsNotFound.push(bundleId);\n numWaiting--;\n if (!numWaiting) callbackFn(depsNotFound);\n }; // register callback\n\n\n while (i--) {\n bundleId = bundleIds[i]; // execute callback if in result cache\n\n r = bundleResultCache[bundleId];\n\n if (r) {\n fn(bundleId, r);\n continue;\n } // add to callback queue\n\n\n q = bundleCallbackQueue[bundleId] = bundleCallbackQueue[bundleId] || [];\n q.push(fn);\n }\n }\n /**\n * Publish bundle load event.\n * @param {string} bundleId - Bundle id\n * @param {string[]} pathsNotFound - List of files not found\n */\n\n\n function publish(bundleId, pathsNotFound) {\n // exit if id isn't defined\n if (!bundleId) return;\n var q = bundleCallbackQueue[bundleId]; // cache result\n\n bundleResultCache[bundleId] = pathsNotFound; // exit if queue is empty\n\n if (!q) return; // empty callback queue\n\n while (q.length) {\n q[0](bundleId, pathsNotFound);\n q.splice(0, 1);\n }\n }\n /**\n * Execute callbacks.\n * @param {Object or Function} args - The callback args\n * @param {string[]} depsNotFound - List of dependencies not found\n */\n\n\n function executeCallbacks(args, depsNotFound) {\n // accept function as argument\n if (args.call) args = {\n success: args\n }; // success and error callbacks\n\n if (depsNotFound.length) (args.error || devnull)(depsNotFound);else (args.success || devnull)(args);\n }\n /**\n * Load individual file.\n * @param {string} path - The file path\n * @param {Function} callbackFn - The callback function\n */\n\n\n function loadFile(path, callbackFn, args, numTries) {\n var doc = document,\n async = args.async,\n maxTries = (args.numRetries || 0) + 1,\n beforeCallbackFn = args.before || devnull,\n pathStripped = path.replace(/^(css|img)!/, ''),\n isLegacyIECss,\n e;\n numTries = numTries || 0;\n\n if (/(^css!|\\.css$)/.test(path)) {\n // css\n e = doc.createElement('link');\n e.rel = 'stylesheet';\n e.href = pathStripped; // tag IE9+\n\n isLegacyIECss = 'hideFocus' in e; // use preload in IE Edge (to detect load errors)\n\n if (isLegacyIECss && e.relList) {\n isLegacyIECss = 0;\n e.rel = 'preload';\n e.as = 'style';\n }\n } else if (/(^img!|\\.(png|gif|jpg|svg)$)/.test(path)) {\n // image\n e = doc.createElement('img');\n e.src = pathStripped;\n } else {\n // javascript\n e = doc.createElement('script');\n e.src = path;\n e.async = async === undefined ? true : async;\n }\n\n e.onload = e.onerror = e.onbeforeload = function (ev) {\n var result = ev.type[0]; // treat empty stylesheets as failures to get around lack of onerror\n // support in IE9-11\n\n if (isLegacyIECss) {\n try {\n if (!e.sheet.cssText.length) result = 'e';\n } catch (x) {\n // sheets objects created from load errors don't allow access to\n // `cssText` (unless error is Code:18 SecurityError)\n if (x.code != 18) result = 'e';\n }\n } // handle retries in case of load failure\n\n\n if (result == 'e') {\n // increment counter\n numTries += 1; // exit function and try again\n\n if (numTries < maxTries) {\n return loadFile(path, callbackFn, args, numTries);\n }\n } else if (e.rel == 'preload' && e.as == 'style') {\n // activate preloaded stylesheets\n return e.rel = 'stylesheet'; // jshint ignore:line\n } // execute callback\n\n\n callbackFn(path, result, ev.defaultPrevented);\n }; // add to document (unless callback returns `false`)\n\n\n if (beforeCallbackFn(path, e) !== false) doc.head.appendChild(e);\n }\n /**\n * Load multiple files.\n * @param {string[]} paths - The file paths\n * @param {Function} callbackFn - The callback function\n */\n\n\n function loadFiles(paths, callbackFn, args) {\n // listify paths\n paths = paths.push ? paths : [paths];\n var numWaiting = paths.length,\n x = numWaiting,\n pathsNotFound = [],\n fn,\n i; // define callback function\n\n fn = function fn(path, result, defaultPrevented) {\n // handle error\n if (result == 'e') pathsNotFound.push(path); // handle beforeload event. If defaultPrevented then that means the load\n // will be blocked (ex. Ghostery/ABP on Safari)\n\n if (result == 'b') {\n if (defaultPrevented) pathsNotFound.push(path);else return;\n }\n\n numWaiting--;\n if (!numWaiting) callbackFn(pathsNotFound);\n }; // load scripts\n\n\n for (i = 0; i < x; i++) {\n loadFile(paths[i], fn, args);\n }\n }\n /**\n * Initiate script load and register bundle.\n * @param {(string|string[])} paths - The file paths\n * @param {(string|Function|Object)} [arg1] - The (1) bundleId or (2) success\n * callback or (3) object literal with success/error arguments, numRetries,\n * etc.\n * @param {(Function|Object)} [arg2] - The (1) success callback or (2) object\n * literal with success/error arguments, numRetries, etc.\n */\n\n\n function loadjs(paths, arg1, arg2) {\n var bundleId, args; // bundleId (if string)\n\n if (arg1 && arg1.trim) bundleId = arg1; // args (default is {})\n\n args = (bundleId ? arg2 : arg1) || {}; // throw error if bundle is already defined\n\n if (bundleId) {\n if (bundleId in bundleIdCache) {\n throw \"LoadJS\";\n } else {\n bundleIdCache[bundleId] = true;\n }\n }\n\n function loadFn(resolve, reject) {\n loadFiles(paths, function (pathsNotFound) {\n // execute callbacks\n executeCallbacks(args, pathsNotFound); // resolve Promise\n\n if (resolve) {\n executeCallbacks({\n success: resolve,\n error: reject\n }, pathsNotFound);\n } // publish bundle load event\n\n\n publish(bundleId, pathsNotFound);\n }, args);\n }\n\n if (args.returnPromise) return new Promise(loadFn);else loadFn();\n }\n /**\n * Execute callbacks when dependencies have been satisfied.\n * @param {(string|string[])} deps - List of bundle ids\n * @param {Object} args - success/error arguments\n */\n\n\n loadjs.ready = function ready(deps, args) {\n // subscribe to bundle load event\n subscribe(deps, function (depsNotFound) {\n // execute callbacks\n executeCallbacks(args, depsNotFound);\n });\n return loadjs;\n };\n /**\n * Manually satisfy bundle dependencies.\n * @param {string} bundleId - The bundle id\n */\n\n\n loadjs.done = function done(bundleId) {\n publish(bundleId, []);\n };\n /**\n * Reset loadjs dependencies statuses\n */\n\n\n loadjs.reset = function reset() {\n bundleIdCache = {};\n bundleResultCache = {};\n bundleCallbackQueue = {};\n };\n /**\n * Determine if bundle has already been defined\n * @param String} bundleId - The bundle id\n */\n\n\n loadjs.isDefined = function isDefined(bundleId) {\n return bundleId in bundleIdCache;\n }; // export\n\n\n return loadjs;\n });\n });\n\n function loadScript(url) {\n return new Promise(function (resolve, reject) {\n loadjs_umd(url, {\n success: resolve,\n error: reject\n });\n });\n }\n\n function parseId(url) {\n if (is$1.empty(url)) {\n return null;\n }\n\n if (is$1.number(Number(url))) {\n return url;\n }\n\n var regex = /^.*(vimeo.com\\/|video\\/)(\\d+).*/;\n return url.match(regex) ? RegExp.$2 : url;\n } // Set playback state and trigger change (only on actual change)\n\n\n function assurePlaybackState(play) {\n if (play && !this.embed.hasPlayed) {\n this.embed.hasPlayed = true;\n }\n\n if (this.media.paused === play) {\n this.media.paused = !play;\n triggerEvent.call(this, this.media, play ? 'play' : 'pause');\n }\n }\n\n var vimeo = {\n setup: function setup() {\n var _this = this;\n\n // Add embed class for responsive\n toggleClass(this.elements.wrapper, this.config.classNames.embed, true); // Set intial ratio\n\n setAspectRatio.call(this); // Load the SDK if not already\n\n if (!is$1.object(window.Vimeo)) {\n loadScript(this.config.urls.vimeo.sdk).then(function () {\n vimeo.ready.call(_this);\n }).catch(function (error) {\n _this.debug.warn('Vimeo SDK (player.js) failed to load', error);\n });\n } else {\n vimeo.ready.call(this);\n }\n },\n // API Ready\n ready: function ready() {\n var _this2 = this;\n\n var player = this;\n var config = player.config.vimeo; // Get Vimeo params for the iframe\n\n var params = buildUrlParams(extend({}, {\n loop: player.config.loop.active,\n autoplay: player.autoplay,\n muted: player.muted,\n gesture: 'media',\n playsinline: !this.config.fullscreen.iosNative\n }, config)); // Get the source URL or ID\n\n var source = player.media.getAttribute('src'); // Get from <div> if needed\n\n if (is$1.empty(source)) {\n source = player.media.getAttribute(player.config.attributes.embed.id);\n }\n\n var id = parseId(source); // Build an iframe\n\n var iframe = createElement('iframe');\n var src = format(player.config.urls.vimeo.iframe, id, params);\n iframe.setAttribute('src', src);\n iframe.setAttribute('allowfullscreen', '');\n iframe.setAttribute('allowtransparency', '');\n iframe.setAttribute('allow', 'autoplay'); // Get poster, if already set\n\n var poster = player.poster; // Inject the package\n\n var wrapper = createElement('div', {\n poster: poster,\n class: player.config.classNames.embedContainer\n });\n wrapper.appendChild(iframe);\n player.media = replaceElement(wrapper, player.media); // Get poster image\n\n fetch(format(player.config.urls.vimeo.api, id), 'json').then(function (response) {\n if (is$1.empty(response)) {\n return;\n } // Get the URL for thumbnail\n\n\n var url = new URL(response[0].thumbnail_large); // Get original image\n\n url.pathname = \"\".concat(url.pathname.split('_')[0], \".jpg\"); // Set and show poster\n\n ui.setPoster.call(player, url.href).catch(function () {});\n }); // Setup instance\n // https://github.com/vimeo/player.js\n\n player.embed = new window.Vimeo.Player(iframe, {\n autopause: player.config.autopause,\n muted: player.muted\n });\n player.media.paused = true;\n player.media.currentTime = 0; // Disable native text track rendering\n\n if (player.supported.ui) {\n player.embed.disableTextTrack();\n } // Create a faux HTML5 API using the Vimeo API\n\n\n player.media.play = function () {\n assurePlaybackState.call(player, true);\n return player.embed.play();\n };\n\n player.media.pause = function () {\n assurePlaybackState.call(player, false);\n return player.embed.pause();\n };\n\n player.media.stop = function () {\n player.pause();\n player.currentTime = 0;\n }; // Seeking\n\n\n var currentTime = player.media.currentTime;\n Object.defineProperty(player.media, 'currentTime', {\n get: function get() {\n return currentTime;\n },\n set: function set(time) {\n // Vimeo will automatically play on seek if the video hasn't been played before\n // Get current paused state and volume etc\n var embed = player.embed,\n media = player.media,\n paused = player.paused,\n volume = player.volume;\n var restorePause = paused && !embed.hasPlayed; // Set seeking state and trigger event\n\n media.seeking = true;\n triggerEvent.call(player, media, 'seeking'); // If paused, mute until seek is complete\n\n Promise.resolve(restorePause && embed.setVolume(0)) // Seek\n .then(function () {\n return embed.setCurrentTime(time);\n }) // Restore paused\n .then(function () {\n return restorePause && embed.pause();\n }) // Restore volume\n .then(function () {\n return restorePause && embed.setVolume(volume);\n }).catch(function () {// Do nothing\n });\n }\n }); // Playback speed\n\n var speed = player.config.speed.selected;\n Object.defineProperty(player.media, 'playbackRate', {\n get: function get() {\n return speed;\n },\n set: function set(input) {\n player.embed.setPlaybackRate(input).then(function () {\n speed = input;\n triggerEvent.call(player, player.media, 'ratechange');\n }).catch(function (error) {\n // Hide menu item (and menu if empty)\n if (error.name === 'Error') {\n controls.setSpeedMenu.call(player, []);\n }\n });\n }\n }); // Volume\n\n var volume = player.config.volume;\n Object.defineProperty(player.media, 'volume', {\n get: function get() {\n return volume;\n },\n set: function set(input) {\n player.embed.setVolume(input).then(function () {\n volume = input;\n triggerEvent.call(player, player.media, 'volumechange');\n });\n }\n }); // Muted\n\n var muted = player.config.muted;\n Object.defineProperty(player.media, 'muted', {\n get: function get() {\n return muted;\n },\n set: function set(input) {\n var toggle = is$1.boolean(input) ? input : false;\n player.embed.setVolume(toggle ? 0 : player.config.volume).then(function () {\n muted = toggle;\n triggerEvent.call(player, player.media, 'volumechange');\n });\n }\n }); // Loop\n\n var loop = player.config.loop;\n Object.defineProperty(player.media, 'loop', {\n get: function get() {\n return loop;\n },\n set: function set(input) {\n var toggle = is$1.boolean(input) ? input : player.config.loop.active;\n player.embed.setLoop(toggle).then(function () {\n loop = toggle;\n });\n }\n }); // Source\n\n var currentSrc;\n player.embed.getVideoUrl().then(function (value) {\n currentSrc = value;\n controls.setDownloadUrl.call(player);\n }).catch(function (error) {\n _this2.debug.warn(error);\n });\n Object.defineProperty(player.media, 'currentSrc', {\n get: function get() {\n return currentSrc;\n }\n }); // Ended\n\n Object.defineProperty(player.media, 'ended', {\n get: function get() {\n return player.currentTime === player.duration;\n }\n }); // Set aspect ratio based on video size\n\n Promise.all([player.embed.getVideoWidth(), player.embed.getVideoHeight()]).then(function (dimensions) {\n var _dimensions = _slicedToArray(dimensions, 2),\n width = _dimensions[0],\n height = _dimensions[1];\n\n player.embed.ratio = [width, height];\n setAspectRatio.call(_this2);\n }); // Set autopause\n\n player.embed.setAutopause(player.config.autopause).then(function (state) {\n player.config.autopause = state;\n }); // Get title\n\n player.embed.getVideoTitle().then(function (title) {\n player.config.title = title;\n ui.setTitle.call(_this2);\n }); // Get current time\n\n player.embed.getCurrentTime().then(function (value) {\n currentTime = value;\n triggerEvent.call(player, player.media, 'timeupdate');\n }); // Get duration\n\n player.embed.getDuration().then(function (value) {\n player.media.duration = value;\n triggerEvent.call(player, player.media, 'durationchange');\n }); // Get captions\n\n player.embed.getTextTracks().then(function (tracks) {\n player.media.textTracks = tracks;\n captions.setup.call(player);\n });\n player.embed.on('cuechange', function (_ref) {\n var _ref$cues = _ref.cues,\n cues = _ref$cues === void 0 ? [] : _ref$cues;\n var strippedCues = cues.map(function (cue) {\n return stripHTML(cue.text);\n });\n captions.updateCues.call(player, strippedCues);\n });\n player.embed.on('loaded', function () {\n // Assure state and events are updated on autoplay\n player.embed.getPaused().then(function (paused) {\n assurePlaybackState.call(player, !paused);\n\n if (!paused) {\n triggerEvent.call(player, player.media, 'playing');\n }\n });\n\n if (is$1.element(player.embed.element) && player.supported.ui) {\n var frame = player.embed.element; // Fix keyboard focus issues\n // https://github.com/sampotts/plyr/issues/317\n\n frame.setAttribute('tabindex', -1);\n }\n });\n player.embed.on('play', function () {\n assurePlaybackState.call(player, true);\n triggerEvent.call(player, player.media, 'playing');\n });\n player.embed.on('pause', function () {\n assurePlaybackState.call(player, false);\n });\n player.embed.on('timeupdate', function (data) {\n player.media.seeking = false;\n currentTime = data.seconds;\n triggerEvent.call(player, player.media, 'timeupdate');\n });\n player.embed.on('progress', function (data) {\n player.media.buffered = data.percent;\n triggerEvent.call(player, player.media, 'progress'); // Check all loaded\n\n if (parseInt(data.percent, 10) === 1) {\n triggerEvent.call(player, player.media, 'canplaythrough');\n } // Get duration as if we do it before load, it gives an incorrect value\n // https://github.com/sampotts/plyr/issues/891\n\n\n player.embed.getDuration().then(function (value) {\n if (value !== player.media.duration) {\n player.media.duration = value;\n triggerEvent.call(player, player.media, 'durationchange');\n }\n });\n });\n player.embed.on('seeked', function () {\n player.media.seeking = false;\n triggerEvent.call(player, player.media, 'seeked');\n });\n player.embed.on('ended', function () {\n player.media.paused = true;\n triggerEvent.call(player, player.media, 'ended');\n });\n player.embed.on('error', function (detail) {\n player.media.error = detail;\n triggerEvent.call(player, player.media, 'error');\n }); // Rebuild UI\n\n setTimeout(function () {\n return ui.build.call(player);\n }, 0);\n }\n };\n\n function parseId$1(url) {\n if (is$1.empty(url)) {\n return null;\n }\n\n var regex = /^.*(youtu.be\\/|v\\/|u\\/\\w\\/|embed\\/|watch\\?v=|&v=)([^#&?]*).*/;\n return url.match(regex) ? RegExp.$2 : url;\n } // Set playback state and trigger change (only on actual change)\n\n\n function assurePlaybackState$1(play) {\n if (play && !this.embed.hasPlayed) {\n this.embed.hasPlayed = true;\n }\n\n if (this.media.paused === play) {\n this.media.paused = !play;\n triggerEvent.call(this, this.media, play ? 'play' : 'pause');\n }\n }\n\n function getHost$1(config) {\n if (config.noCookie) {\n return 'https://www.youtube-nocookie.com';\n }\n\n if (window.location.protocol === 'http:') {\n return 'http://www.youtube.com';\n } // Use YouTube's default\n\n\n return undefined;\n }\n\n var youtube = {\n setup: function setup() {\n var _this = this;\n\n // Add embed class for responsive\n toggleClass(this.elements.wrapper, this.config.classNames.embed, true); // Setup API\n\n if (is$1.object(window.YT) && is$1.function(window.YT.Player)) {\n youtube.ready.call(this);\n } else {\n // Reference current global callback\n var callback = window.onYouTubeIframeAPIReady; // Set callback to process queue\n\n window.onYouTubeIframeAPIReady = function () {\n // Call global callback if set\n if (is$1.function(callback)) {\n callback();\n }\n\n youtube.ready.call(_this);\n }; // Load the SDK\n\n\n loadScript(this.config.urls.youtube.sdk).catch(function (error) {\n _this.debug.warn('YouTube API failed to load', error);\n });\n }\n },\n // Get the media title\n getTitle: function getTitle(videoId) {\n var _this2 = this;\n\n var url = format(this.config.urls.youtube.api, videoId);\n fetch(url).then(function (data) {\n if (is$1.object(data)) {\n var title = data.title,\n height = data.height,\n width = data.width; // Set title\n\n _this2.config.title = title;\n ui.setTitle.call(_this2); // Set aspect ratio\n\n _this2.embed.ratio = [width, height];\n }\n\n setAspectRatio.call(_this2);\n }).catch(function () {\n // Set aspect ratio\n setAspectRatio.call(_this2);\n });\n },\n // API ready\n ready: function ready() {\n var player = this; // Ignore already setup (race condition)\n\n var currentId = player.media && player.media.getAttribute('id');\n\n if (!is$1.empty(currentId) && currentId.startsWith('youtube-')) {\n return;\n } // Get the source URL or ID\n\n\n var source = player.media.getAttribute('src'); // Get from <div> if needed\n\n if (is$1.empty(source)) {\n source = player.media.getAttribute(this.config.attributes.embed.id);\n } // Replace the <iframe> with a <div> due to YouTube API issues\n\n\n var videoId = parseId$1(source);\n var id = generateId(player.provider); // Get poster, if already set\n\n var poster = player.poster; // Replace media element\n\n var container = createElement('div', {\n id: id,\n poster: poster\n });\n player.media = replaceElement(container, player.media); // Id to poster wrapper\n\n var posterSrc = function posterSrc(s) {\n return \"https://i.ytimg.com/vi/\".concat(videoId, \"/\").concat(s, \"default.jpg\");\n }; // Check thumbnail images in order of quality, but reject fallback thumbnails (120px wide)\n\n\n loadImage(posterSrc('maxres'), 121) // Higest quality and unpadded\n .catch(function () {\n return loadImage(posterSrc('sd'), 121);\n }) // 480p padded 4:3\n .catch(function () {\n return loadImage(posterSrc('hq'));\n }) // 360p padded 4:3. Always exists\n .then(function (image) {\n return ui.setPoster.call(player, image.src);\n }).then(function (src) {\n // If the image is padded, use background-size \"cover\" instead (like youtube does too with their posters)\n if (!src.includes('maxres')) {\n player.elements.poster.style.backgroundSize = 'cover';\n }\n }).catch(function () {});\n var config = player.config.youtube; // Setup instance\n // https://developers.google.com/youtube/iframe_api_reference\n\n player.embed = new window.YT.Player(id, {\n videoId: videoId,\n host: getHost$1(config),\n playerVars: extend({}, {\n autoplay: player.config.autoplay ? 1 : 0,\n // Autoplay\n hl: player.config.hl,\n // iframe interface language\n controls: player.supported.ui ? 0 : 1,\n // Only show controls if not fully supported\n disablekb: 1,\n // Disable keyboard as we handle it\n playsinline: !player.config.fullscreen.iosNative ? 1 : 0,\n // Allow iOS inline playback\n // Captions are flaky on YouTube\n cc_load_policy: player.captions.active ? 1 : 0,\n cc_lang_pref: player.config.captions.language,\n // Tracking for stats\n widget_referrer: window ? window.location.href : null\n }, config),\n events: {\n onError: function onError(event) {\n // YouTube may fire onError twice, so only handle it once\n if (!player.media.error) {\n var code = event.data; // Messages copied from https://developers.google.com/youtube/iframe_api_reference#onError\n\n var message = {\n 2: 'The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.',\n 5: 'The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.',\n 100: 'The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.',\n 101: 'The owner of the requested video does not allow it to be played in embedded players.',\n 150: 'The owner of the requested video does not allow it to be played in embedded players.'\n }[code] || 'An unknown error occured';\n player.media.error = {\n code: code,\n message: message\n };\n triggerEvent.call(player, player.media, 'error');\n }\n },\n onPlaybackRateChange: function onPlaybackRateChange(event) {\n // Get the instance\n var instance = event.target; // Get current speed\n\n player.media.playbackRate = instance.getPlaybackRate();\n triggerEvent.call(player, player.media, 'ratechange');\n },\n onReady: function onReady(event) {\n // Bail if onReady has already been called. See issue #1108\n if (is$1.function(player.media.play)) {\n return;\n } // Get the instance\n\n\n var instance = event.target; // Get the title\n\n youtube.getTitle.call(player, videoId); // Create a faux HTML5 API using the YouTube API\n\n player.media.play = function () {\n assurePlaybackState$1.call(player, true);\n instance.playVideo();\n };\n\n player.media.pause = function () {\n assurePlaybackState$1.call(player, false);\n instance.pauseVideo();\n };\n\n player.media.stop = function () {\n instance.stopVideo();\n };\n\n player.media.duration = instance.getDuration();\n player.media.paused = true; // Seeking\n\n player.media.currentTime = 0;\n Object.defineProperty(player.media, 'currentTime', {\n get: function get() {\n return Number(instance.getCurrentTime());\n },\n set: function set(time) {\n // If paused and never played, mute audio preventively (YouTube starts playing on seek if the video hasn't been played yet).\n if (player.paused && !player.embed.hasPlayed) {\n player.embed.mute();\n } // Set seeking state and trigger event\n\n\n player.media.seeking = true;\n triggerEvent.call(player, player.media, 'seeking'); // Seek after events sent\n\n instance.seekTo(time);\n }\n }); // Playback speed\n\n Object.defineProperty(player.media, 'playbackRate', {\n get: function get() {\n return instance.getPlaybackRate();\n },\n set: function set(input) {\n instance.setPlaybackRate(input);\n }\n }); // Volume\n\n var volume = player.config.volume;\n Object.defineProperty(player.media, 'volume', {\n get: function get() {\n return volume;\n },\n set: function set(input) {\n volume = input;\n instance.setVolume(volume * 100);\n triggerEvent.call(player, player.media, 'volumechange');\n }\n }); // Muted\n\n var muted = player.config.muted;\n Object.defineProperty(player.media, 'muted', {\n get: function get() {\n return muted;\n },\n set: function set(input) {\n var toggle = is$1.boolean(input) ? input : muted;\n muted = toggle;\n instance[toggle ? 'mute' : 'unMute']();\n triggerEvent.call(player, player.media, 'volumechange');\n }\n }); // Source\n\n Object.defineProperty(player.media, 'currentSrc', {\n get: function get() {\n return instance.getVideoUrl();\n }\n }); // Ended\n\n Object.defineProperty(player.media, 'ended', {\n get: function get() {\n return player.currentTime === player.duration;\n }\n }); // Get available speeds\n\n player.options.speed = instance.getAvailablePlaybackRates(); // Set the tabindex to avoid focus entering iframe\n\n if (player.supported.ui) {\n player.media.setAttribute('tabindex', -1);\n }\n\n triggerEvent.call(player, player.media, 'timeupdate');\n triggerEvent.call(player, player.media, 'durationchange'); // Reset timer\n\n clearInterval(player.timers.buffering); // Setup buffering\n\n player.timers.buffering = setInterval(function () {\n // Get loaded % from YouTube\n player.media.buffered = instance.getVideoLoadedFraction(); // Trigger progress only when we actually buffer something\n\n if (player.media.lastBuffered === null || player.media.lastBuffered < player.media.buffered) {\n triggerEvent.call(player, player.media, 'progress');\n } // Set last buffer point\n\n\n player.media.lastBuffered = player.media.buffered; // Bail if we're at 100%\n\n if (player.media.buffered === 1) {\n clearInterval(player.timers.buffering); // Trigger event\n\n triggerEvent.call(player, player.media, 'canplaythrough');\n }\n }, 200); // Rebuild UI\n\n setTimeout(function () {\n return ui.build.call(player);\n }, 50);\n },\n onStateChange: function onStateChange(event) {\n // Get the instance\n var instance = event.target; // Reset timer\n\n clearInterval(player.timers.playing);\n var seeked = player.media.seeking && [1, 2].includes(event.data);\n\n if (seeked) {\n // Unset seeking and fire seeked event\n player.media.seeking = false;\n triggerEvent.call(player, player.media, 'seeked');\n } // Handle events\n // -1 Unstarted\n // 0 Ended\n // 1 Playing\n // 2 Paused\n // 3 Buffering\n // 5 Video cued\n\n\n switch (event.data) {\n case -1:\n // Update scrubber\n triggerEvent.call(player, player.media, 'timeupdate'); // Get loaded % from YouTube\n\n player.media.buffered = instance.getVideoLoadedFraction();\n triggerEvent.call(player, player.media, 'progress');\n break;\n\n case 0:\n assurePlaybackState$1.call(player, false); // YouTube doesn't support loop for a single video, so mimick it.\n\n if (player.media.loop) {\n // YouTube needs a call to `stopVideo` before playing again\n instance.stopVideo();\n instance.playVideo();\n } else {\n triggerEvent.call(player, player.media, 'ended');\n }\n\n break;\n\n case 1:\n // Restore paused state (YouTube starts playing on seek if the video hasn't been played yet)\n if (!player.config.autoplay && player.media.paused && !player.embed.hasPlayed) {\n player.media.pause();\n } else {\n assurePlaybackState$1.call(player, true);\n triggerEvent.call(player, player.media, 'playing'); // Poll to get playback progress\n\n player.timers.playing = setInterval(function () {\n triggerEvent.call(player, player.media, 'timeupdate');\n }, 50); // Check duration again due to YouTube bug\n // https://github.com/sampotts/plyr/issues/374\n // https://code.google.com/p/gdata-issues/issues/detail?id=8690\n\n if (player.media.duration !== instance.getDuration()) {\n player.media.duration = instance.getDuration();\n triggerEvent.call(player, player.media, 'durationchange');\n }\n }\n\n break;\n\n case 2:\n // Restore audio (YouTube starts playing on seek if the video hasn't been played yet)\n if (!player.muted) {\n player.embed.unMute();\n }\n\n assurePlaybackState$1.call(player, false);\n break;\n\n default:\n break;\n }\n\n triggerEvent.call(player, player.elements.container, 'statechange', false, {\n code: event.data\n });\n }\n }\n });\n }\n };\n\n var media = {\n // Setup media\n setup: function setup() {\n // If there's no media, bail\n if (!this.media) {\n this.debug.warn('No media element found!');\n return;\n } // Add type class\n\n\n toggleClass(this.elements.container, this.config.classNames.type.replace('{0}', this.type), true); // Add provider class\n\n toggleClass(this.elements.container, this.config.classNames.provider.replace('{0}', this.provider), true); // Add video class for embeds\n // This will require changes if audio embeds are added\n\n if (this.isEmbed) {\n toggleClass(this.elements.container, this.config.classNames.type.replace('{0}', 'video'), true);\n } // Inject the player wrapper\n\n\n if (this.isVideo) {\n // Create the wrapper div\n this.elements.wrapper = createElement('div', {\n class: this.config.classNames.video\n }); // Wrap the video in a container\n\n wrap$1(this.media, this.elements.wrapper); // Faux poster container\n\n this.elements.poster = createElement('div', {\n class: this.config.classNames.poster\n });\n this.elements.wrapper.appendChild(this.elements.poster);\n }\n\n if (this.isHTML5) {\n html5.extend.call(this);\n } else if (this.isYouTube) {\n youtube.setup.call(this);\n } else if (this.isVimeo) {\n vimeo.setup.call(this);\n }\n }\n };\n\n var destroy = function destroy(instance) {\n // Destroy our adsManager\n if (instance.manager) {\n instance.manager.destroy();\n } // Destroy our adsManager\n\n\n if (instance.elements.displayContainer) {\n instance.elements.displayContainer.destroy();\n }\n\n instance.elements.container.remove();\n };\n\n var Ads =\n /*#__PURE__*/\n function () {\n /**\n * Ads constructor.\n * @param {Object} player\n * @return {Ads}\n */\n function Ads(player) {\n var _this = this;\n\n _classCallCheck(this, Ads);\n\n this.player = player;\n this.config = player.config.ads;\n this.playing = false;\n this.initialized = false;\n this.elements = {\n container: null,\n displayContainer: null\n };\n this.manager = null;\n this.loader = null;\n this.cuePoints = null;\n this.events = {};\n this.safetyTimer = null;\n this.countdownTimer = null; // Setup a promise to resolve when the IMA manager is ready\n\n this.managerPromise = new Promise(function (resolve, reject) {\n // The ad is loaded and ready\n _this.on('loaded', resolve); // Ads failed\n\n\n _this.on('error', reject);\n });\n this.load();\n }\n\n _createClass(Ads, [{\n key: \"load\",\n\n /**\n * Load the IMA SDK\n */\n value: function load() {\n var _this2 = this;\n\n if (!this.enabled) {\n return;\n } // Check if the Google IMA3 SDK is loaded or load it ourselves\n\n\n if (!is$1.object(window.google) || !is$1.object(window.google.ima)) {\n loadScript(this.player.config.urls.googleIMA.sdk).then(function () {\n _this2.ready();\n }).catch(function () {\n // Script failed to load or is blocked\n _this2.trigger('error', new Error('Google IMA SDK failed to load'));\n });\n } else {\n this.ready();\n }\n }\n /**\n * Get the ads instance ready\n */\n\n }, {\n key: \"ready\",\n value: function ready() {\n var _this3 = this;\n\n // Double check we're enabled\n if (!this.enabled) {\n destroy(this);\n } // Start ticking our safety timer. If the whole advertisement\n // thing doesn't resolve within our set time; we bail\n\n\n this.startSafetyTimer(12000, 'ready()'); // Clear the safety timer\n\n this.managerPromise.then(function () {\n _this3.clearSafetyTimer('onAdsManagerLoaded()');\n }); // Set listeners on the Plyr instance\n\n this.listeners(); // Setup the IMA SDK\n\n this.setupIMA();\n } // Build the tag URL\n\n }, {\n key: \"setupIMA\",\n\n /**\n * In order for the SDK to display ads for our video, we need to tell it where to put them,\n * so here we define our ad container. This div is set up to render on top of the video player.\n * Using the code below, we tell the SDK to render ads within that div. We also provide a\n * handle to the content video player - the SDK will poll the current time of our player to\n * properly place mid-rolls. After we create the ad display container, we initialize it. On\n * mobile devices, this initialization is done as the result of a user action.\n */\n value: function setupIMA() {\n // Create the container for our advertisements\n this.elements.container = createElement('div', {\n class: this.player.config.classNames.ads\n });\n this.player.elements.container.appendChild(this.elements.container); // So we can run VPAID2\n\n google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED); // Set language\n\n google.ima.settings.setLocale(this.player.config.ads.language); // Set playback for iOS10+\n\n google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline); // We assume the adContainer is the video container of the plyr element that will house the ads\n\n this.elements.displayContainer = new google.ima.AdDisplayContainer(this.elements.container, this.player.media); // Request video ads to be pre-loaded\n\n this.requestAds();\n }\n /**\n * Request advertisements\n */\n\n }, {\n key: \"requestAds\",\n value: function requestAds() {\n var _this4 = this;\n\n var container = this.player.elements.container;\n\n try {\n // Create ads loader\n this.loader = new google.ima.AdsLoader(this.elements.displayContainer); // Listen and respond to ads loaded and error events\n\n this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED, function (event) {\n return _this4.onAdsManagerLoaded(event);\n }, false);\n this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR, function (error) {\n return _this4.onAdError(error);\n }, false); // Request video ads\n\n var request = new google.ima.AdsRequest();\n request.adTagUrl = this.tagUrl; // Specify the linear and nonlinear slot sizes. This helps the SDK\n // to select the correct creative if multiple are returned\n\n request.linearAdSlotWidth = container.offsetWidth;\n request.linearAdSlotHeight = container.offsetHeight;\n request.nonLinearAdSlotWidth = container.offsetWidth;\n request.nonLinearAdSlotHeight = container.offsetHeight; // We only overlay ads as we only support video.\n\n request.forceNonLinearFullSlot = false; // Mute based on current state\n\n request.setAdWillPlayMuted(!this.player.muted);\n this.loader.requestAds(request);\n } catch (e) {\n this.onAdError(e);\n }\n }\n /**\n * Update the ad countdown\n * @param {Boolean} start\n */\n\n }, {\n key: \"pollCountdown\",\n value: function pollCountdown() {\n var _this5 = this;\n\n var start = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n if (!start) {\n clearInterval(this.countdownTimer);\n this.elements.container.removeAttribute('data-badge-text');\n return;\n }\n\n var update = function update() {\n var time = formatTime(Math.max(_this5.manager.getRemainingTime(), 0));\n var label = \"\".concat(i18n.get('advertisement', _this5.player.config), \" - \").concat(time);\n\n _this5.elements.container.setAttribute('data-badge-text', label);\n };\n\n this.countdownTimer = setInterval(update, 100);\n }\n /**\n * This method is called whenever the ads are ready inside the AdDisplayContainer\n * @param {Event} adsManagerLoadedEvent\n */\n\n }, {\n key: \"onAdsManagerLoaded\",\n value: function onAdsManagerLoaded(event) {\n var _this6 = this;\n\n // Load could occur after a source change (race condition)\n if (!this.enabled) {\n return;\n } // Get the ads manager\n\n\n var settings = new google.ima.AdsRenderingSettings(); // Tell the SDK to save and restore content video state on our behalf\n\n settings.restoreCustomPlaybackStateOnAdBreakComplete = true;\n settings.enablePreloading = true; // The SDK is polling currentTime on the contentPlayback. And needs a duration\n // so it can determine when to start the mid- and post-roll\n\n this.manager = event.getAdsManager(this.player, settings); // Get the cue points for any mid-rolls by filtering out the pre- and post-roll\n\n this.cuePoints = this.manager.getCuePoints(); // Add listeners to the required events\n // Advertisement error events\n\n this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR, function (error) {\n return _this6.onAdError(error);\n }); // Advertisement regular events\n\n Object.keys(google.ima.AdEvent.Type).forEach(function (type) {\n _this6.manager.addEventListener(google.ima.AdEvent.Type[type], function (e) {\n return _this6.onAdEvent(e);\n });\n }); // Resolve our adsManager\n\n this.trigger('loaded');\n }\n }, {\n key: \"addCuePoints\",\n value: function addCuePoints() {\n var _this7 = this;\n\n // Add advertisement cue's within the time line if available\n if (!is$1.empty(this.cuePoints)) {\n this.cuePoints.forEach(function (cuePoint) {\n if (cuePoint !== 0 && cuePoint !== -1 && cuePoint < _this7.player.duration) {\n var seekElement = _this7.player.elements.progress;\n\n if (is$1.element(seekElement)) {\n var cuePercentage = 100 / _this7.player.duration * cuePoint;\n var cue = createElement('span', {\n class: _this7.player.config.classNames.cues\n });\n cue.style.left = \"\".concat(cuePercentage.toString(), \"%\");\n seekElement.appendChild(cue);\n }\n }\n });\n }\n }\n /**\n * This is where all the event handling takes place. Retrieve the ad from the event. Some\n * events (e.g. ALL_ADS_COMPLETED) don't have the ad object associated\n * https://developers.google.com/interactive-media-ads/docs/sdks/html5/v3/apis#ima.AdEvent.Type\n * @param {Event} event\n */\n\n }, {\n key: \"onAdEvent\",\n value: function onAdEvent(event) {\n var _this8 = this;\n\n var container = this.player.elements.container; // Retrieve the ad from the event. Some events (e.g. ALL_ADS_COMPLETED)\n // don't have ad object associated\n\n var ad = event.getAd();\n var adData = event.getAdData(); // Proxy event\n\n var dispatchEvent = function dispatchEvent(type) {\n triggerEvent.call(_this8.player, _this8.player.media, \"ads\".concat(type.replace(/_/g, '').toLowerCase()));\n }; // Bubble the event\n\n\n dispatchEvent(event.type);\n\n switch (event.type) {\n case google.ima.AdEvent.Type.LOADED:\n // This is the first event sent for an ad - it is possible to determine whether the\n // ad is a video ad or an overlay\n this.trigger('loaded'); // Start countdown\n\n this.pollCountdown(true);\n\n if (!ad.isLinear()) {\n // Position AdDisplayContainer correctly for overlay\n ad.width = container.offsetWidth;\n ad.height = container.offsetHeight;\n } // console.info('Ad type: ' + event.getAd().getAdPodInfo().getPodIndex());\n // console.info('Ad time: ' + event.getAd().getAdPodInfo().getTimeOffset());\n\n\n break;\n\n case google.ima.AdEvent.Type.STARTED:\n // Set volume to match player\n this.manager.setVolume(this.player.volume);\n break;\n\n case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:\n // All ads for the current videos are done. We can now request new advertisements\n // in case the video is re-played\n // TODO: Example for what happens when a next video in a playlist would be loaded.\n // So here we load a new video when all ads are done.\n // Then we load new ads within a new adsManager. When the video\n // Is started - after - the ads are loaded, then we get ads.\n // You can also easily test cancelling and reloading by running\n // player.ads.cancel() and player.ads.play from the console I guess.\n // this.player.source = {\n // type: 'video',\n // title: 'View From A Blue Moon',\n // sources: [{\n // src:\n // 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.mp4', type:\n // 'video/mp4', }], poster:\n // 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.jpg', tracks:\n // [ { kind: 'captions', label: 'English', srclang: 'en', src:\n // 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.en.vtt',\n // default: true, }, { kind: 'captions', label: 'French', srclang: 'fr', src:\n // 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.fr.vtt', }, ],\n // };\n // TODO: So there is still this thing where a video should only be allowed to start\n // playing when the IMA SDK is ready or has failed\n this.loadAds();\n break;\n\n case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:\n // This event indicates the ad has started - the video player can adjust the UI,\n // for example display a pause button and remaining time. Fired when content should\n // be paused. This usually happens right before an ad is about to cover the content\n this.pauseContent();\n break;\n\n case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:\n // This event indicates the ad has finished - the video player can perform\n // appropriate UI actions, such as removing the timer for remaining time detection.\n // Fired when content should be resumed. This usually happens when an ad finishes\n // or collapses\n this.pollCountdown();\n this.resumeContent();\n break;\n\n case google.ima.AdEvent.Type.LOG:\n if (adData.adError) {\n this.player.debug.warn(\"Non-fatal ad error: \".concat(adData.adError.getMessage()));\n }\n\n break;\n\n default:\n break;\n }\n }\n /**\n * Any ad error handling comes through here\n * @param {Event} event\n */\n\n }, {\n key: \"onAdError\",\n value: function onAdError(event) {\n this.cancel();\n this.player.debug.warn('Ads error', event);\n }\n /**\n * Setup hooks for Plyr and window events. This ensures\n * the mid- and post-roll launch at the correct time. And\n * resize the advertisement when the player resizes\n */\n\n }, {\n key: \"listeners\",\n value: function listeners() {\n var _this9 = this;\n\n var container = this.player.elements.container;\n var time;\n this.player.on('canplay', function () {\n _this9.addCuePoints();\n });\n this.player.on('ended', function () {\n _this9.loader.contentComplete();\n });\n this.player.on('timeupdate', function () {\n time = _this9.player.currentTime;\n });\n this.player.on('seeked', function () {\n var seekedTime = _this9.player.currentTime;\n\n if (is$1.empty(_this9.cuePoints)) {\n return;\n }\n\n _this9.cuePoints.forEach(function (cuePoint, index) {\n if (time < cuePoint && cuePoint < seekedTime) {\n _this9.manager.discardAdBreak();\n\n _this9.cuePoints.splice(index, 1);\n }\n });\n }); // Listen to the resizing of the window. And resize ad accordingly\n // TODO: eventually implement ResizeObserver\n\n window.addEventListener('resize', function () {\n if (_this9.manager) {\n _this9.manager.resize(container.offsetWidth, container.offsetHeight, google.ima.ViewMode.NORMAL);\n }\n });\n }\n /**\n * Initialize the adsManager and start playing advertisements\n */\n\n }, {\n key: \"play\",\n value: function play() {\n var _this10 = this;\n\n var container = this.player.elements.container;\n\n if (!this.managerPromise) {\n this.resumeContent();\n } // Play the requested advertisement whenever the adsManager is ready\n\n\n this.managerPromise.then(function () {\n // Set volume to match player\n _this10.manager.setVolume(_this10.player.volume); // Initialize the container. Must be done via a user action on mobile devices\n\n\n _this10.elements.displayContainer.initialize();\n\n try {\n if (!_this10.initialized) {\n // Initialize the ads manager. Ad rules playlist will start at this time\n _this10.manager.init(container.offsetWidth, container.offsetHeight, google.ima.ViewMode.NORMAL); // Call play to start showing the ad. Single video and overlay ads will\n // start at this time; the call will be ignored for ad rules\n\n\n _this10.manager.start();\n }\n\n _this10.initialized = true;\n } catch (adError) {\n // An error may be thrown if there was a problem with the\n // VAST response\n _this10.onAdError(adError);\n }\n }).catch(function () {});\n }\n /**\n * Resume our video\n */\n\n }, {\n key: \"resumeContent\",\n value: function resumeContent() {\n // Hide the advertisement container\n this.elements.container.style.zIndex = ''; // Ad is stopped\n\n this.playing = false; // Play video\n\n this.player.media.play();\n }\n /**\n * Pause our video\n */\n\n }, {\n key: \"pauseContent\",\n value: function pauseContent() {\n // Show the advertisement container\n this.elements.container.style.zIndex = 3; // Ad is playing\n\n this.playing = true; // Pause our video.\n\n this.player.media.pause();\n }\n /**\n * Destroy the adsManager so we can grab new ads after this. If we don't then we're not\n * allowed to call new ads based on google policies, as they interpret this as an accidental\n * video requests. https://developers.google.com/interactive-\n * media-ads/docs/sdks/android/faq#8\n */\n\n }, {\n key: \"cancel\",\n value: function cancel() {\n // Pause our video\n if (this.initialized) {\n this.resumeContent();\n } // Tell our instance that we're done for now\n\n\n this.trigger('error'); // Re-create our adsManager\n\n this.loadAds();\n }\n /**\n * Re-create our adsManager\n */\n\n }, {\n key: \"loadAds\",\n value: function loadAds() {\n var _this11 = this;\n\n // Tell our adsManager to go bye bye\n this.managerPromise.then(function () {\n // Destroy our adsManager\n if (_this11.manager) {\n _this11.manager.destroy();\n } // Re-set our adsManager promises\n\n\n _this11.managerPromise = new Promise(function (resolve) {\n _this11.on('loaded', resolve);\n\n _this11.player.debug.log(_this11.manager);\n }); // Now request some new advertisements\n\n _this11.requestAds();\n }).catch(function () {});\n }\n /**\n * Handles callbacks after an ad event was invoked\n * @param {String} event - Event type\n */\n\n }, {\n key: \"trigger\",\n value: function trigger(event) {\n var _this12 = this;\n\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 var handlers = this.events[event];\n\n if (is$1.array(handlers)) {\n handlers.forEach(function (handler) {\n if (is$1.function(handler)) {\n handler.apply(_this12, args);\n }\n });\n }\n }\n /**\n * Add event listeners\n * @param {String} event - Event type\n * @param {Function} callback - Callback for when event occurs\n * @return {Ads}\n */\n\n }, {\n key: \"on\",\n value: function on(event, callback) {\n if (!is$1.array(this.events[event])) {\n this.events[event] = [];\n }\n\n this.events[event].push(callback);\n return this;\n }\n /**\n * Setup a safety timer for when the ad network doesn't respond for whatever reason.\n * The advertisement has 12 seconds to get its things together. We stop this timer when the\n * advertisement is playing, or when a user action is required to start, then we clear the\n * timer on ad ready\n * @param {Number} time\n * @param {String} from\n */\n\n }, {\n key: \"startSafetyTimer\",\n value: function startSafetyTimer(time, from) {\n var _this13 = this;\n\n this.player.debug.log(\"Safety timer invoked from: \".concat(from));\n this.safetyTimer = setTimeout(function () {\n _this13.cancel();\n\n _this13.clearSafetyTimer('startSafetyTimer()');\n }, time);\n }\n /**\n * Clear our safety timer(s)\n * @param {String} from\n */\n\n }, {\n key: \"clearSafetyTimer\",\n value: function clearSafetyTimer(from) {\n if (!is$1.nullOrUndefined(this.safetyTimer)) {\n this.player.debug.log(\"Safety timer cleared from: \".concat(from));\n clearTimeout(this.safetyTimer);\n this.safetyTimer = null;\n }\n }\n }, {\n key: \"enabled\",\n get: function get() {\n var config = this.config;\n return this.player.isHTML5 && this.player.isVideo && config.enabled && (!is$1.empty(config.publisherId) || is$1.url(config.tagUrl));\n }\n }, {\n key: \"tagUrl\",\n get: function get() {\n var config = this.config;\n\n if (is$1.url(config.tagUrl)) {\n return config.tagUrl;\n }\n\n var params = {\n AV_PUBLISHERID: '58c25bb0073ef448b1087ad6',\n AV_CHANNELID: '5a0458dc28a06145e4519d21',\n AV_URL: window.location.hostname,\n cb: Date.now(),\n AV_WIDTH: 640,\n AV_HEIGHT: 480,\n AV_CDIM2: this.publisherId\n };\n var base = 'https://go.aniview.com/api/adserver6/vast/';\n return \"\".concat(base, \"?\").concat(buildUrlParams(params));\n }\n }]);\n\n return Ads;\n }();\n\n var $findIndex = arrayIteration.findIndex;\n\n\n var FIND_INDEX = 'findIndex';\n var SKIPS_HOLES$1 = true;\n\n // Shouldn't skip holes\n if (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES$1 = false; });\n\n // `Array.prototype.findIndex` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.findindex\n _export({ target: 'Array', proto: true, forced: SKIPS_HOLES$1 }, {\n findIndex: function findIndex(callbackfn /* , that = undefined */) {\n return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n });\n\n // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\n addToUnscopables(FIND_INDEX);\n\n var parseVtt = function parseVtt(vttDataString) {\n var processedList = [];\n var frames = vttDataString.split(/\\r\\n\\r\\n|\\n\\n|\\r\\r/);\n frames.forEach(function (frame) {\n var result = {};\n var lines = frame.split(/\\r\\n|\\n|\\r/);\n lines.forEach(function (line) {\n if (!is$1.number(result.startTime)) {\n // The line with start and end times on it is the first line of interest\n var matchTimes = line.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/); // Note that this currently ignores caption formatting directives that are optionally on the end of this line - fine for non-captions VTT\n\n if (matchTimes) {\n result.startTime = Number(matchTimes[1] || 0) * 60 * 60 + Number(matchTimes[2]) * 60 + Number(matchTimes[3]) + Number(\"0.\".concat(matchTimes[4]));\n result.endTime = Number(matchTimes[6] || 0) * 60 * 60 + Number(matchTimes[7]) * 60 + Number(matchTimes[8]) + Number(\"0.\".concat(matchTimes[9]));\n }\n } else if (!is$1.empty(line.trim()) && is$1.empty(result.text)) {\n // If we already have the startTime, then we're definitely up to the text line(s)\n var lineSplit = line.trim().split('#xywh=');\n\n var _lineSplit = _slicedToArray(lineSplit, 1);\n\n result.text = _lineSplit[0];\n\n // If there's content in lineSplit[1], then we have sprites. If not, then it's just one frame per image\n if (lineSplit[1]) {\n var _lineSplit$1$split = lineSplit[1].split(',');\n\n var _lineSplit$1$split2 = _slicedToArray(_lineSplit$1$split, 4);\n\n result.x = _lineSplit$1$split2[0];\n result.y = _lineSplit$1$split2[1];\n result.w = _lineSplit$1$split2[2];\n result.h = _lineSplit$1$split2[3];\n }\n }\n });\n\n if (result.text) {\n processedList.push(result);\n }\n });\n return processedList;\n };\n /**\n * Preview thumbnails for seek hover and scrubbing\n * Seeking: Hover over the seek bar (desktop only): shows a small preview container above the seek bar\n * Scrubbing: Click and drag the seek bar (desktop and mobile): shows the preview image over the entire video, as if the video is scrubbing at very high speed\n *\n * Notes:\n * - Thumbs are set via JS settings on Plyr init, not HTML5 'track' property. Using the track property would be a bit gross, because it doesn't support custom 'kinds'. kind=metadata might be used for something else, and we want to allow multiple thumbnails tracks. Tracks must have a unique combination of 'kind' and 'label'. We would have to do something like kind=metadata,label=thumbnails1 / kind=metadata,label=thumbnails2. Square peg, round hole\n * - VTT info: the image URL is relative to the VTT, not the current document. But if the url starts with a slash, it will naturally be relative to the current domain. https://support.jwplayer.com/articles/how-to-add-preview-thumbnails\n * - This implementation uses multiple separate img elements. Other implementations use background-image on one element. This would be nice and simple, but Firefox and Safari have flickering issues with replacing backgrounds of larger images. It seems that YouTube perhaps only avoids this because they don't have the option for high-res previews (even the fullscreen ones, when mousedown/seeking). Images appear over the top of each other, and previous ones are discarded once the new ones have been rendered\n */\n\n\n var PreviewThumbnails =\n /*#__PURE__*/\n function () {\n /**\n * PreviewThumbnails constructor.\n * @param {Plyr} player\n * @return {PreviewThumbnails}\n */\n function PreviewThumbnails(player) {\n _classCallCheck(this, PreviewThumbnails);\n\n this.player = player;\n this.thumbnails = [];\n this.loaded = false;\n this.lastMouseMoveTime = Date.now();\n this.mouseDown = false;\n this.loadedImages = [];\n this.elements = {\n thumb: {},\n scrubbing: {}\n };\n this.load();\n }\n\n _createClass(PreviewThumbnails, [{\n key: \"load\",\n value: function load() {\n var _this = this;\n\n // Togglethe regular seek tooltip\n if (this.player.elements.display.seekTooltip) {\n this.player.elements.display.seekTooltip.hidden = this.enabled;\n }\n\n if (!this.enabled) {\n return;\n }\n\n this.getThumbnails().then(function () {\n if (!_this.enabled) {\n return;\n } // Render DOM elements\n\n\n _this.render(); // Check to see if thumb container size was specified manually in CSS\n\n\n _this.determineContainerAutoSizing();\n\n _this.loaded = true;\n });\n } // Download VTT files and parse them\n\n }, {\n key: \"getThumbnails\",\n value: function getThumbnails() {\n var _this2 = this;\n\n return new Promise(function (resolve) {\n var src = _this2.player.config.previewThumbnails.src;\n\n if (is$1.empty(src)) {\n throw new Error('Missing previewThumbnails.src config attribute');\n } // If string, convert into single-element list\n\n\n var urls = is$1.string(src) ? [src] : src; // Loop through each src URL. Download and process the VTT file, storing the resulting data in this.thumbnails\n\n var promises = urls.map(function (u) {\n return _this2.getThumbnail(u);\n });\n Promise.all(promises).then(function () {\n // Sort smallest to biggest (e.g., [120p, 480p, 1080p])\n _this2.thumbnails.sort(function (x, y) {\n return x.height - y.height;\n });\n\n _this2.player.debug.log('Preview thumbnails', _this2.thumbnails);\n\n resolve();\n });\n });\n } // Process individual VTT file\n\n }, {\n key: \"getThumbnail\",\n value: function getThumbnail(url) {\n var _this3 = this;\n\n return new Promise(function (resolve) {\n fetch(url).then(function (response) {\n var thumbnail = {\n frames: parseVtt(response),\n height: null,\n urlPrefix: ''\n }; // If the URLs don't start with '/', then we need to set their relative path to be the location of the VTT file\n // If the URLs do start with '/', then they obviously don't need a prefix, so it will remain blank\n // If the thumbnail URLs start with with none of '/', 'http://' or 'https://', then we need to set their relative path to be the location of the VTT file\n\n if (!thumbnail.frames[0].text.startsWith('/') && !thumbnail.frames[0].text.startsWith('http://') && !thumbnail.frames[0].text.startsWith('https://')) {\n thumbnail.urlPrefix = url.substring(0, url.lastIndexOf('/') + 1);\n } // Download the first frame, so that we can determine/set the height of this thumbnailsDef\n\n\n var tempImage = new Image();\n\n tempImage.onload = function () {\n thumbnail.height = tempImage.naturalHeight;\n thumbnail.width = tempImage.naturalWidth;\n\n _this3.thumbnails.push(thumbnail);\n\n resolve();\n };\n\n tempImage.src = thumbnail.urlPrefix + thumbnail.frames[0].text;\n });\n });\n }\n }, {\n key: \"startMove\",\n value: function startMove(event) {\n if (!this.loaded) {\n return;\n }\n\n if (!is$1.event(event) || !['touchmove', 'mousemove'].includes(event.type)) {\n return;\n } // Wait until media has a duration\n\n\n if (!this.player.media.duration) {\n return;\n }\n\n if (event.type === 'touchmove') {\n // Calculate seek hover position as approx video seconds\n this.seekTime = this.player.media.duration * (this.player.elements.inputs.seek.value / 100);\n } else {\n // Calculate seek hover position as approx video seconds\n var clientRect = this.player.elements.progress.getBoundingClientRect();\n var percentage = 100 / clientRect.width * (event.pageX - clientRect.left);\n this.seekTime = this.player.media.duration * (percentage / 100);\n\n if (this.seekTime < 0) {\n // The mousemove fires for 10+px out to the left\n this.seekTime = 0;\n }\n\n if (this.seekTime > this.player.media.duration - 1) {\n // Took 1 second off the duration for safety, because different players can disagree on the real duration of a video\n this.seekTime = this.player.media.duration - 1;\n }\n\n this.mousePosX = event.pageX; // Set time text inside image container\n\n this.elements.thumb.time.innerText = formatTime(this.seekTime);\n } // Download and show image\n\n\n this.showImageAtCurrentTime();\n }\n }, {\n key: \"endMove\",\n value: function endMove() {\n this.toggleThumbContainer(false, true);\n }\n }, {\n key: \"startScrubbing\",\n value: function startScrubbing(event) {\n // Only act on left mouse button (0), or touch device (event.button is false)\n if (event.button === false || event.button === 0) {\n this.mouseDown = true; // Wait until media has a duration\n\n if (this.player.media.duration) {\n this.toggleScrubbingContainer(true);\n this.toggleThumbContainer(false, true); // Download and show image\n\n this.showImageAtCurrentTime();\n }\n }\n }\n }, {\n key: \"endScrubbing\",\n value: function endScrubbing() {\n var _this4 = this;\n\n this.mouseDown = false; // Hide scrubbing preview. But wait until the video has successfully seeked before hiding the scrubbing preview\n\n if (Math.ceil(this.lastTime) === Math.ceil(this.player.media.currentTime)) {\n // The video was already seeked/loaded at the chosen time - hide immediately\n this.toggleScrubbingContainer(false);\n } else {\n // The video hasn't seeked yet. Wait for that\n once.call(this.player, this.player.media, 'timeupdate', function () {\n // Re-check mousedown - we might have already started scrubbing again\n if (!_this4.mouseDown) {\n _this4.toggleScrubbingContainer(false);\n }\n });\n }\n }\n /**\n * Setup hooks for Plyr and window events\n */\n\n }, {\n key: \"listeners\",\n value: function listeners() {\n var _this5 = this;\n\n // Hide thumbnail preview - on mouse click, mouse leave (in listeners.js for now), and video play/seek. All four are required, e.g., for buffering\n this.player.on('play', function () {\n _this5.toggleThumbContainer(false, true);\n });\n this.player.on('seeked', function () {\n _this5.toggleThumbContainer(false);\n });\n this.player.on('timeupdate', function () {\n _this5.lastTime = _this5.player.media.currentTime;\n });\n }\n /**\n * Create HTML elements for image containers\n */\n\n }, {\n key: \"render\",\n value: function render() {\n // Create HTML element: plyr__preview-thumbnail-container\n this.elements.thumb.container = createElement('div', {\n class: this.player.config.classNames.previewThumbnails.thumbContainer\n }); // Wrapper for the image for styling\n\n this.elements.thumb.imageContainer = createElement('div', {\n class: this.player.config.classNames.previewThumbnails.imageContainer\n });\n this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer); // Create HTML element, parent+span: time text (e.g., 01:32:00)\n\n var timeContainer = createElement('div', {\n class: this.player.config.classNames.previewThumbnails.timeContainer\n });\n this.elements.thumb.time = createElement('span', {}, '00:00');\n timeContainer.appendChild(this.elements.thumb.time);\n this.elements.thumb.container.appendChild(timeContainer); // Inject the whole thumb\n\n if (is$1.element(this.player.elements.progress)) {\n this.player.elements.progress.appendChild(this.elements.thumb.container);\n } // Create HTML element: plyr__preview-scrubbing-container\n\n\n this.elements.scrubbing.container = createElement('div', {\n class: this.player.config.classNames.previewThumbnails.scrubbingContainer\n });\n this.player.elements.wrapper.appendChild(this.elements.scrubbing.container);\n }\n }, {\n key: \"showImageAtCurrentTime\",\n value: function showImageAtCurrentTime() {\n var _this6 = this;\n\n if (this.mouseDown) {\n this.setScrubbingContainerSize();\n } else {\n this.setThumbContainerSizeAndPos();\n } // Find the desired thumbnail index\n // TODO: Handle a video longer than the thumbs where thumbNum is null\n\n\n var thumbNum = this.thumbnails[0].frames.findIndex(function (frame) {\n return _this6.seekTime >= frame.startTime && _this6.seekTime <= frame.endTime;\n });\n var hasThumb = thumbNum >= 0;\n var qualityIndex = 0; // Show the thumb container if we're not scrubbing\n\n if (!this.mouseDown) {\n this.toggleThumbContainer(hasThumb);\n } // No matching thumb found\n\n\n if (!hasThumb) {\n return;\n } // Check to see if we've already downloaded higher quality versions of this image\n\n\n this.thumbnails.forEach(function (thumbnail, index) {\n if (_this6.loadedImages.includes(thumbnail.frames[thumbNum].text)) {\n qualityIndex = index;\n }\n }); // Only proceed if either thumbnum or thumbfilename has changed\n\n if (thumbNum !== this.showingThumb) {\n this.showingThumb = thumbNum;\n this.loadImage(qualityIndex);\n }\n } // Show the image that's currently specified in this.showingThumb\n\n }, {\n key: \"loadImage\",\n value: function loadImage() {\n var _this7 = this;\n\n var qualityIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var thumbNum = this.showingThumb;\n var thumbnail = this.thumbnails[qualityIndex];\n var urlPrefix = thumbnail.urlPrefix;\n var frame = thumbnail.frames[thumbNum];\n var thumbFilename = thumbnail.frames[thumbNum].text;\n var thumbUrl = urlPrefix + thumbFilename;\n\n if (!this.currentImageElement || this.currentImageElement.dataset.filename !== thumbFilename) {\n // If we're already loading a previous image, remove its onload handler - we don't want it to load after this one\n // Only do this if not using sprites. Without sprites we really want to show as many images as possible, as a best-effort\n if (this.loadingImage && this.usingSprites) {\n this.loadingImage.onload = null;\n } // We're building and adding a new image. In other implementations of similar functionality (YouTube), background image\n // is instead used. But this causes issues with larger images in Firefox and Safari - switching between background\n // images causes a flicker. Putting a new image over the top does not\n\n\n var previewImage = new Image();\n previewImage.src = thumbUrl;\n previewImage.dataset.index = thumbNum;\n previewImage.dataset.filename = thumbFilename;\n this.showingThumbFilename = thumbFilename;\n this.player.debug.log(\"Loading image: \".concat(thumbUrl)); // For some reason, passing the named function directly causes it to execute immediately. So I've wrapped it in an anonymous function...\n\n previewImage.onload = function () {\n return _this7.showImage(previewImage, frame, qualityIndex, thumbNum, thumbFilename, true);\n };\n\n this.loadingImage = previewImage;\n this.removeOldImages(previewImage);\n } else {\n // Update the existing image\n this.showImage(this.currentImageElement, frame, qualityIndex, thumbNum, thumbFilename, false);\n this.currentImageElement.dataset.index = thumbNum;\n this.removeOldImages(this.currentImageElement);\n }\n }\n }, {\n key: \"showImage\",\n value: function showImage(previewImage, frame, qualityIndex, thumbNum, thumbFilename) {\n var newImage = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;\n this.player.debug.log(\"Showing thumb: \".concat(thumbFilename, \". num: \").concat(thumbNum, \". qual: \").concat(qualityIndex, \". newimg: \").concat(newImage));\n this.setImageSizeAndOffset(previewImage, frame);\n\n if (newImage) {\n this.currentImageContainer.appendChild(previewImage);\n this.currentImageElement = previewImage;\n\n if (!this.loadedImages.includes(thumbFilename)) {\n this.loadedImages.push(thumbFilename);\n }\n } // Preload images before and after the current one\n // Show higher quality of the same frame\n // Each step here has a short time delay, and only continues if still hovering/seeking the same spot. This is to protect slow connections from overloading\n\n\n this.preloadNearby(thumbNum, true).then(this.preloadNearby(thumbNum, false)).then(this.getHigherQuality(qualityIndex, previewImage, frame, thumbFilename));\n } // Remove all preview images that aren't the designated current image\n\n }, {\n key: \"removeOldImages\",\n value: function removeOldImages(currentImage) {\n var _this8 = this;\n\n // Get a list of all images, convert it from a DOM list to an array\n Array.from(this.currentImageContainer.children).forEach(function (image) {\n if (image.tagName.toLowerCase() !== 'img') {\n return;\n }\n\n var removeDelay = _this8.usingSprites ? 500 : 1000;\n\n if (image.dataset.index !== currentImage.dataset.index && !image.dataset.deleting) {\n // Wait 200ms, as the new image can take some time to show on certain browsers (even though it was downloaded before showing). This will prevent flicker, and show some generosity towards slower clients\n // First set attribute 'deleting' to prevent multi-handling of this on repeat firing of this function\n // eslint-disable-next-line no-param-reassign\n image.dataset.deleting = true; // This has to be set before the timeout - to prevent issues switching between hover and scrub\n\n var currentImageContainer = _this8.currentImageContainer;\n setTimeout(function () {\n currentImageContainer.removeChild(image);\n\n _this8.player.debug.log(\"Removing thumb: \".concat(image.dataset.filename));\n }, removeDelay);\n }\n });\n } // Preload images before and after the current one. Only if the user is still hovering/seeking the same frame\n // This will only preload the lowest quality\n\n }, {\n key: \"preloadNearby\",\n value: function preloadNearby(thumbNum) {\n var _this9 = this;\n\n var forward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n return new Promise(function (resolve) {\n setTimeout(function () {\n var oldThumbFilename = _this9.thumbnails[0].frames[thumbNum].text;\n\n if (_this9.showingThumbFilename === oldThumbFilename) {\n // Find the nearest thumbs with different filenames. Sometimes it'll be the next index, but in the case of sprites, it might be 100+ away\n var thumbnailsClone;\n\n if (forward) {\n thumbnailsClone = _this9.thumbnails[0].frames.slice(thumbNum);\n } else {\n thumbnailsClone = _this9.thumbnails[0].frames.slice(0, thumbNum).reverse();\n }\n\n var foundOne = false;\n thumbnailsClone.forEach(function (frame) {\n var newThumbFilename = frame.text;\n\n if (newThumbFilename !== oldThumbFilename) {\n // Found one with a different filename. Make sure it hasn't already been loaded on this page visit\n if (!_this9.loadedImages.includes(newThumbFilename)) {\n foundOne = true;\n\n _this9.player.debug.log(\"Preloading thumb filename: \".concat(newThumbFilename));\n\n var urlPrefix = _this9.thumbnails[0].urlPrefix;\n var thumbURL = urlPrefix + newThumbFilename;\n var previewImage = new Image();\n previewImage.src = thumbURL;\n\n previewImage.onload = function () {\n _this9.player.debug.log(\"Preloaded thumb filename: \".concat(newThumbFilename));\n\n if (!_this9.loadedImages.includes(newThumbFilename)) _this9.loadedImages.push(newThumbFilename); // We don't resolve until the thumb is loaded\n\n resolve();\n };\n }\n }\n }); // If there are none to preload then we want to resolve immediately\n\n if (!foundOne) {\n resolve();\n }\n }\n }, 300);\n });\n } // If user has been hovering current image for half a second, look for a higher quality one\n\n }, {\n key: \"getHigherQuality\",\n value: function getHigherQuality(currentQualityIndex, previewImage, frame, thumbFilename) {\n var _this10 = this;\n\n if (currentQualityIndex < this.thumbnails.length - 1) {\n // Only use the higher quality version if it's going to look any better - if the current thumb is of a lower pixel density than the thumbnail container\n var previewImageHeight = previewImage.naturalHeight;\n\n if (this.usingSprites) {\n previewImageHeight = frame.h;\n }\n\n if (previewImageHeight < this.thumbContainerHeight) {\n // Recurse back to the loadImage function - show a higher quality one, but only if the viewer is on this frame for a while\n setTimeout(function () {\n // Make sure the mouse hasn't already moved on and started hovering at another image\n if (_this10.showingThumbFilename === thumbFilename) {\n _this10.player.debug.log(\"Showing higher quality thumb for: \".concat(thumbFilename));\n\n _this10.loadImage(currentQualityIndex + 1);\n }\n }, 300);\n }\n }\n }\n }, {\n key: \"toggleThumbContainer\",\n value: function toggleThumbContainer() {\n var toggle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var clearShowing = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var className = this.player.config.classNames.previewThumbnails.thumbContainerShown;\n this.elements.thumb.container.classList.toggle(className, toggle);\n\n if (!toggle && clearShowing) {\n this.showingThumb = null;\n this.showingThumbFilename = null;\n }\n }\n }, {\n key: \"toggleScrubbingContainer\",\n value: function toggleScrubbingContainer() {\n var toggle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var className = this.player.config.classNames.previewThumbnails.scrubbingContainerShown;\n this.elements.scrubbing.container.classList.toggle(className, toggle);\n\n if (!toggle) {\n this.showingThumb = null;\n this.showingThumbFilename = null;\n }\n }\n }, {\n key: \"determineContainerAutoSizing\",\n value: function determineContainerAutoSizing() {\n if (this.elements.thumb.imageContainer.clientHeight > 20) {\n // This will prevent auto sizing in this.setThumbContainerSizeAndPos()\n this.sizeSpecifiedInCSS = true;\n }\n } // Set the size to be about a quarter of the size of video. Unless option dynamicSize === false, in which case it needs to be set in CSS\n\n }, {\n key: \"setThumbContainerSizeAndPos\",\n value: function setThumbContainerSizeAndPos() {\n if (!this.sizeSpecifiedInCSS) {\n var thumbWidth = Math.floor(this.thumbContainerHeight * this.thumbAspectRatio);\n this.elements.thumb.imageContainer.style.height = \"\".concat(this.thumbContainerHeight, \"px\");\n this.elements.thumb.imageContainer.style.width = \"\".concat(thumbWidth, \"px\");\n }\n\n this.setThumbContainerPos();\n }\n }, {\n key: \"setThumbContainerPos\",\n value: function setThumbContainerPos() {\n var seekbarRect = this.player.elements.progress.getBoundingClientRect();\n var plyrRect = this.player.elements.container.getBoundingClientRect();\n var container = this.elements.thumb.container; // Find the lowest and highest desired left-position, so we don't slide out the side of the video container\n\n var minVal = plyrRect.left - seekbarRect.left + 10;\n var maxVal = plyrRect.right - seekbarRect.left - container.clientWidth - 10; // Set preview container position to: mousepos, minus seekbar.left, minus half of previewContainer.clientWidth\n\n var previewPos = this.mousePosX - seekbarRect.left - container.clientWidth / 2;\n\n if (previewPos < minVal) {\n previewPos = minVal;\n }\n\n if (previewPos > maxVal) {\n previewPos = maxVal;\n }\n\n container.style.left = \"\".concat(previewPos, \"px\");\n } // Can't use 100% width, in case the video is a different aspect ratio to the video container\n\n }, {\n key: \"setScrubbingContainerSize\",\n value: function setScrubbingContainerSize() {\n this.elements.scrubbing.container.style.width = \"\".concat(this.player.media.clientWidth, \"px\"); // Can't use media.clientHeight - html5 video goes big and does black bars above and below\n\n this.elements.scrubbing.container.style.height = \"\".concat(this.player.media.clientWidth / this.thumbAspectRatio, \"px\");\n } // Sprites need to be offset to the correct location\n\n }, {\n key: \"setImageSizeAndOffset\",\n value: function setImageSizeAndOffset(previewImage, frame) {\n if (!this.usingSprites) {\n return;\n } // Find difference between height and preview container height\n\n\n var multiplier = this.thumbContainerHeight / frame.h; // eslint-disable-next-line no-param-reassign\n\n previewImage.style.height = \"\".concat(Math.floor(previewImage.naturalHeight * multiplier), \"px\"); // eslint-disable-next-line no-param-reassign\n\n previewImage.style.width = \"\".concat(Math.floor(previewImage.naturalWidth * multiplier), \"px\"); // eslint-disable-next-line no-param-reassign\n\n previewImage.style.left = \"-\".concat(frame.x * multiplier, \"px\"); // eslint-disable-next-line no-param-reassign\n\n previewImage.style.top = \"-\".concat(frame.y * multiplier, \"px\");\n }\n }, {\n key: \"enabled\",\n get: function get() {\n return this.player.isHTML5 && this.player.isVideo && this.player.config.previewThumbnails.enabled;\n }\n }, {\n key: \"currentImageContainer\",\n get: function get() {\n if (this.mouseDown) {\n return this.elements.scrubbing.container;\n }\n\n return this.elements.thumb.imageContainer;\n }\n }, {\n key: \"usingSprites\",\n get: function get() {\n return Object.keys(this.thumbnails[0].frames[0]).includes('w');\n }\n }, {\n key: \"thumbAspectRatio\",\n get: function get() {\n if (this.usingSprites) {\n return this.thumbnails[0].frames[0].w / this.thumbnails[0].frames[0].h;\n }\n\n return this.thumbnails[0].width / this.thumbnails[0].height;\n }\n }, {\n key: \"thumbContainerHeight\",\n get: function get() {\n if (this.mouseDown) {\n // Can't use media.clientHeight - HTML5 video goes big and does black bars above and below\n return Math.floor(this.player.media.clientWidth / this.thumbAspectRatio);\n }\n\n return Math.floor(this.player.media.clientWidth / this.thumbAspectRatio / 4);\n }\n }, {\n key: \"currentImageElement\",\n get: function get() {\n if (this.mouseDown) {\n return this.currentScrubbingImageElement;\n }\n\n return this.currentThumbnailImageElement;\n },\n set: function set(element) {\n if (this.mouseDown) {\n this.currentScrubbingImageElement = element;\n } else {\n this.currentThumbnailImageElement = element;\n }\n }\n }]);\n\n return PreviewThumbnails;\n }();\n\n var source = {\n // Add elements to HTML5 media (source, tracks, etc)\n insertElements: function insertElements(type, attributes) {\n var _this = this;\n\n if (is$1.string(attributes)) {\n insertElement(type, this.media, {\n src: attributes\n });\n } else if (is$1.array(attributes)) {\n attributes.forEach(function (attribute) {\n insertElement(type, _this.media, attribute);\n });\n }\n },\n // Update source\n // Sources are not checked for support so be careful\n change: function change(input) {\n var _this2 = this;\n\n if (!getDeep(input, 'sources.length')) {\n this.debug.warn('Invalid source format');\n return;\n } // Cancel current network requests\n\n\n html5.cancelRequests.call(this); // Destroy instance and re-setup\n\n this.destroy.call(this, function () {\n // Reset quality options\n _this2.options.quality = []; // Remove elements\n\n removeElement(_this2.media);\n _this2.media = null; // Reset class name\n\n if (is$1.element(_this2.elements.container)) {\n _this2.elements.container.removeAttribute('class');\n } // Set the type and provider\n\n\n var sources = input.sources,\n type = input.type;\n\n var _sources = _slicedToArray(sources, 1),\n _sources$ = _sources[0],\n _sources$$provider = _sources$.provider,\n provider = _sources$$provider === void 0 ? providers.html5 : _sources$$provider,\n src = _sources$.src;\n\n var tagName = provider === 'html5' ? type : 'div';\n var attributes = provider === 'html5' ? {} : {\n src: src\n };\n Object.assign(_this2, {\n provider: provider,\n type: type,\n // Check for support\n supported: support.check(type, provider, _this2.config.playsinline),\n // Create new element\n media: createElement(tagName, attributes)\n }); // Inject the new element\n\n _this2.elements.container.appendChild(_this2.media); // Autoplay the new source?\n\n\n if (is$1.boolean(input.autoplay)) {\n _this2.config.autoplay = input.autoplay;\n } // Set attributes for audio and video\n\n\n if (_this2.isHTML5) {\n if (_this2.config.crossorigin) {\n _this2.media.setAttribute('crossorigin', '');\n }\n\n if (_this2.config.autoplay) {\n _this2.media.setAttribute('autoplay', '');\n }\n\n if (!is$1.empty(input.poster)) {\n _this2.poster = input.poster;\n }\n\n if (_this2.config.loop.active) {\n _this2.media.setAttribute('loop', '');\n }\n\n if (_this2.config.muted) {\n _this2.media.setAttribute('muted', '');\n }\n\n if (_this2.config.playsinline) {\n _this2.media.setAttribute('playsinline', '');\n }\n } // Restore class hook\n\n\n ui.addStyleHook.call(_this2); // Set new sources for html5\n\n if (_this2.isHTML5) {\n source.insertElements.call(_this2, 'source', sources);\n } // Set video title\n\n\n _this2.config.title = input.title; // Set up from scratch\n\n media.setup.call(_this2); // HTML5 stuff\n\n if (_this2.isHTML5) {\n // Setup captions\n if (Object.keys(input).includes('tracks')) {\n source.insertElements.call(_this2, 'track', input.tracks);\n }\n } // If HTML5 or embed but not fully supported, setupInterface and call ready now\n\n\n if (_this2.isHTML5 || _this2.isEmbed && !_this2.supported.ui) {\n // Setup interface\n ui.build.call(_this2);\n } // Load HTML5 sources\n\n\n if (_this2.isHTML5) {\n _this2.media.load();\n } // Reload thumbnails\n\n\n if (_this2.previewThumbnails) {\n _this2.previewThumbnails.load();\n } // Update the fullscreen support\n\n\n _this2.fullscreen.update();\n }, true);\n }\n };\n\n /**\n * Returns a number whose value is limited to the given range.\n *\n * Example: limit the output of this computation to between 0 and 255\n * (x * 255).clamp(0, 255)\n *\n * @param {Number} input\n * @param {Number} min The lower boundary of the output range\n * @param {Number} max The upper boundary of the output range\n * @returns A number in the range [min, max]\n * @type Number\n */\n function clamp() {\n var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 255;\n return Math.min(Math.max(input, min), max);\n }\n\n // TODO: Use a WeakMap for private globals\n // const globals = new WeakMap();\n // Plyr instance\n\n var Plyr =\n /*#__PURE__*/\n function () {\n function Plyr(target, options) {\n var _this = this;\n\n _classCallCheck(this, Plyr);\n\n this.timers = {}; // State\n\n this.ready = false;\n this.loading = false;\n this.failed = false; // Touch device\n\n this.touch = support.touch; // Set the media element\n\n this.media = target; // String selector passed\n\n if (is$1.string(this.media)) {\n this.media = document.querySelectorAll(this.media);\n } // jQuery, NodeList or Array passed, use first element\n\n\n if (window.jQuery && this.media instanceof jQuery || is$1.nodeList(this.media) || is$1.array(this.media)) {\n // eslint-disable-next-line\n this.media = this.media[0];\n } // Set config\n\n\n this.config = extend({}, defaults$1, Plyr.defaults, options || {}, function () {\n try {\n return JSON.parse(_this.media.getAttribute('data-plyr-config'));\n } catch (e) {\n return {};\n }\n }()); // Elements cache\n\n this.elements = {\n container: null,\n captions: null,\n buttons: {},\n display: {},\n progress: {},\n inputs: {},\n settings: {\n popup: null,\n menu: null,\n panels: {},\n buttons: {}\n }\n }; // Captions\n\n this.captions = {\n active: null,\n currentTrack: -1,\n meta: new WeakMap()\n }; // Fullscreen\n\n this.fullscreen = {\n active: false\n }; // Options\n\n this.options = {\n speed: [],\n quality: []\n }; // Debugging\n // TODO: move to globals\n\n this.debug = new Console(this.config.debug); // Log config options and support\n\n this.debug.log('Config', this.config);\n this.debug.log('Support', support); // We need an element to setup\n\n if (is$1.nullOrUndefined(this.media) || !is$1.element(this.media)) {\n this.debug.error('Setup failed: no suitable element passed');\n return;\n } // Bail if the element is initialized\n\n\n if (this.media.plyr) {\n this.debug.warn('Target already setup');\n return;\n } // Bail if not enabled\n\n\n if (!this.config.enabled) {\n this.debug.error('Setup failed: disabled by config');\n return;\n } // Bail if disabled or no basic support\n // You may want to disable certain UAs etc\n\n\n if (!support.check().api) {\n this.debug.error('Setup failed: no support');\n return;\n } // Cache original element state for .destroy()\n\n\n var clone = this.media.cloneNode(true);\n clone.autoplay = false;\n this.elements.original = clone; // Set media type based on tag or data attribute\n // Supported: video, audio, vimeo, youtube\n\n var type = this.media.tagName.toLowerCase(); // Embed properties\n\n var iframe = null;\n var url = null; // Different setup based on type\n\n switch (type) {\n case 'div':\n // Find the frame\n iframe = this.media.querySelector('iframe'); // <iframe> type\n\n if (is$1.element(iframe)) {\n // Detect provider\n url = parseUrl(iframe.getAttribute('src'));\n this.provider = getProviderByUrl(url.toString()); // Rework elements\n\n this.elements.container = this.media;\n this.media = iframe; // Reset classname\n\n this.elements.container.className = ''; // Get attributes from URL and set config\n\n if (url.search.length) {\n var truthy = ['1', 'true'];\n\n if (truthy.includes(url.searchParams.get('autoplay'))) {\n this.config.autoplay = true;\n }\n\n if (truthy.includes(url.searchParams.get('loop'))) {\n this.config.loop.active = true;\n } // TODO: replace fullscreen.iosNative with this playsinline config option\n // YouTube requires the playsinline in the URL\n\n\n if (this.isYouTube) {\n this.config.playsinline = truthy.includes(url.searchParams.get('playsinline'));\n this.config.youtube.hl = url.searchParams.get('hl'); // TODO: Should this be setting language?\n } else {\n this.config.playsinline = true;\n }\n }\n } else {\n // <div> with attributes\n this.provider = this.media.getAttribute(this.config.attributes.embed.provider); // Remove attribute\n\n this.media.removeAttribute(this.config.attributes.embed.provider);\n } // Unsupported or missing provider\n\n\n if (is$1.empty(this.provider) || !Object.keys(providers).includes(this.provider)) {\n this.debug.error('Setup failed: Invalid provider');\n return;\n } // Audio will come later for external providers\n\n\n this.type = types.video;\n break;\n\n case 'video':\n case 'audio':\n this.type = type;\n this.provider = providers.html5; // Get config from attributes\n\n if (this.media.hasAttribute('crossorigin')) {\n this.config.crossorigin = true;\n }\n\n if (this.media.hasAttribute('autoplay')) {\n this.config.autoplay = true;\n }\n\n if (this.media.hasAttribute('playsinline') || this.media.hasAttribute('webkit-playsinline')) {\n this.config.playsinline = true;\n }\n\n if (this.media.hasAttribute('muted')) {\n this.config.muted = true;\n }\n\n if (this.media.hasAttribute('loop')) {\n this.config.loop.active = true;\n }\n\n break;\n\n default:\n this.debug.error('Setup failed: unsupported type');\n return;\n } // Check for support again but with type\n\n\n this.supported = support.check(this.type, this.provider, this.config.playsinline); // If no support for even API, bail\n\n if (!this.supported.api) {\n this.debug.error('Setup failed: no support');\n return;\n }\n\n this.eventListeners = []; // Create listeners\n\n this.listeners = new Listeners(this); // Setup local storage for user settings\n\n this.storage = new Storage(this); // Store reference\n\n this.media.plyr = this; // Wrap media\n\n if (!is$1.element(this.elements.container)) {\n this.elements.container = createElement('div', {\n tabindex: 0\n });\n wrap$1(this.media, this.elements.container);\n } // Add style hook\n\n\n ui.addStyleHook.call(this); // Setup media\n\n media.setup.call(this); // Listen for events if debugging\n\n if (this.config.debug) {\n on.call(this, this.elements.container, this.config.events.join(' '), function (event) {\n _this.debug.log(\"event: \".concat(event.type));\n });\n } // Setup interface\n // If embed but not fully supported, build interface now to avoid flash of controls\n\n\n if (this.isHTML5 || this.isEmbed && !this.supported.ui) {\n ui.build.call(this);\n } // Container listeners\n\n\n this.listeners.container(); // Global listeners\n\n this.listeners.global(); // Setup fullscreen\n\n this.fullscreen = new Fullscreen(this); // Setup ads if provided\n\n if (this.config.ads.enabled) {\n this.ads = new Ads(this);\n } // Autoplay if required\n\n\n if (this.isHTML5 && this.config.autoplay) {\n setTimeout(function () {\n return _this.play();\n }, 10);\n } // Seek time will be recorded (in listeners.js) so we can prevent hiding controls for a few seconds after seek\n\n\n this.lastSeekTime = 0; // Setup preview thumbnails if enabled\n\n if (this.config.previewThumbnails.enabled) {\n this.previewThumbnails = new PreviewThumbnails(this);\n }\n } // ---------------------------------------\n // API\n // ---------------------------------------\n\n /**\n * Types and provider helpers\n */\n\n\n _createClass(Plyr, [{\n key: \"play\",\n\n /**\n * Play the media, or play the advertisement (if they are not blocked)\n */\n value: function play() {\n var _this2 = this;\n\n if (!is$1.function(this.media.play)) {\n return null;\n } // Intecept play with ads\n\n\n if (this.ads && this.ads.enabled) {\n this.ads.managerPromise.then(function () {\n return _this2.ads.play();\n }).catch(function () {\n return _this2.media.play();\n });\n } // Return the promise (for HTML5)\n\n\n return this.media.play();\n }\n /**\n * Pause the media\n */\n\n }, {\n key: \"pause\",\n value: function pause() {\n if (!this.playing || !is$1.function(this.media.pause)) {\n return;\n }\n\n this.media.pause();\n }\n /**\n * Get playing state\n */\n\n }, {\n key: \"togglePlay\",\n\n /**\n * Toggle playback based on current status\n * @param {Boolean} input\n */\n value: function togglePlay(input) {\n // Toggle based on current state if nothing passed\n var toggle = is$1.boolean(input) ? input : !this.playing;\n\n if (toggle) {\n this.play();\n } else {\n this.pause();\n }\n }\n /**\n * Stop playback\n */\n\n }, {\n key: \"stop\",\n value: function stop() {\n if (this.isHTML5) {\n this.pause();\n this.restart();\n } else if (is$1.function(this.media.stop)) {\n this.media.stop();\n }\n }\n /**\n * Restart playback\n */\n\n }, {\n key: \"restart\",\n value: function restart() {\n this.currentTime = 0;\n }\n /**\n * Rewind\n * @param {Number} seekTime - how far to rewind in seconds. Defaults to the config.seekTime\n */\n\n }, {\n key: \"rewind\",\n value: function rewind(seekTime) {\n this.currentTime = this.currentTime - (is$1.number(seekTime) ? seekTime : this.config.seekTime);\n }\n /**\n * Fast forward\n * @param {Number} seekTime - how far to fast forward in seconds. Defaults to the config.seekTime\n */\n\n }, {\n key: \"forward\",\n value: function forward(seekTime) {\n this.currentTime = this.currentTime + (is$1.number(seekTime) ? seekTime : this.config.seekTime);\n }\n /**\n * Seek to a time\n * @param {Number} input - where to seek to in seconds. Defaults to 0 (the start)\n */\n\n }, {\n key: \"increaseVolume\",\n\n /**\n * Increase volume\n * @param {Boolean} step - How much to decrease by (between 0 and 1)\n */\n value: function increaseVolume(step) {\n var volume = this.media.muted ? 0 : this.volume;\n this.volume = volume + (is$1.number(step) ? step : 0);\n }\n /**\n * Decrease volume\n * @param {Boolean} step - How much to decrease by (between 0 and 1)\n */\n\n }, {\n key: \"decreaseVolume\",\n value: function decreaseVolume(step) {\n this.increaseVolume(-step);\n }\n /**\n * Set muted state\n * @param {Boolean} mute\n */\n\n }, {\n key: \"toggleCaptions\",\n\n /**\n * Toggle captions\n * @param {Boolean} input - Whether to enable captions\n */\n value: function toggleCaptions(input) {\n captions.toggle.call(this, input, false);\n }\n /**\n * Set the caption track by index\n * @param {Number} - Caption index\n */\n\n }, {\n key: \"airplay\",\n\n /**\n * Trigger the airplay dialog\n * TODO: update player with state, support, enabled\n */\n value: function airplay() {\n // Show dialog if supported\n if (support.airplay) {\n this.media.webkitShowPlaybackTargetPicker();\n }\n }\n /**\n * Toggle the player controls\n * @param {Boolean} [toggle] - Whether to show the controls\n */\n\n }, {\n key: \"toggleControls\",\n value: function toggleControls(toggle) {\n // Don't toggle if missing UI support or if it's audio\n if (this.supported.ui && !this.isAudio) {\n // Get state before change\n var isHidden = hasClass(this.elements.container, this.config.classNames.hideControls); // Negate the argument if not undefined since adding the class to hides the controls\n\n var force = typeof toggle === 'undefined' ? undefined : !toggle; // Apply and get updated state\n\n var hiding = toggleClass(this.elements.container, this.config.classNames.hideControls, force); // Close menu\n\n if (hiding && this.config.controls.includes('settings') && !is$1.empty(this.config.settings)) {\n controls.toggleMenu.call(this, false);\n } // Trigger event on change\n\n\n if (hiding !== isHidden) {\n var eventName = hiding ? 'controlshidden' : 'controlsshown';\n triggerEvent.call(this, this.media, eventName);\n }\n\n return !hiding;\n }\n\n return false;\n }\n /**\n * Add event listeners\n * @param {String} event - Event type\n * @param {Function} callback - Callback for when event occurs\n */\n\n }, {\n key: \"on\",\n value: function on$1(event, callback) {\n on.call(this, this.elements.container, event, callback);\n }\n /**\n * Add event listeners once\n * @param {String} event - Event type\n * @param {Function} callback - Callback for when event occurs\n */\n\n }, {\n key: \"once\",\n value: function once$1(event, callback) {\n once.call(this, this.elements.container, event, callback);\n }\n /**\n * Remove event listeners\n * @param {String} event - Event type\n * @param {Function} callback - Callback for when event occurs\n */\n\n }, {\n key: \"off\",\n value: function off$1(event, callback) {\n off(this.elements.container, event, callback);\n }\n /**\n * Destroy an instance\n * Event listeners are removed when elements are removed\n * http://stackoverflow.com/questions/12528049/if-a-dom-element-is-removed-are-its-listeners-also-removed-from-memory\n * @param {Function} callback - Callback for when destroy is complete\n * @param {Boolean} soft - Whether it's a soft destroy (for source changes etc)\n */\n\n }, {\n key: \"destroy\",\n value: function destroy(callback) {\n var _this3 = this;\n\n var soft = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (!this.ready) {\n return;\n }\n\n var done = function done() {\n // Reset overflow (incase destroyed while in fullscreen)\n document.body.style.overflow = ''; // GC for embed\n\n _this3.embed = null; // If it's a soft destroy, make minimal changes\n\n if (soft) {\n if (Object.keys(_this3.elements).length) {\n // Remove elements\n removeElement(_this3.elements.buttons.play);\n removeElement(_this3.elements.captions);\n removeElement(_this3.elements.controls);\n removeElement(_this3.elements.wrapper); // Clear for GC\n\n _this3.elements.buttons.play = null;\n _this3.elements.captions = null;\n _this3.elements.controls = null;\n _this3.elements.wrapper = null;\n } // Callback\n\n\n if (is$1.function(callback)) {\n callback();\n }\n } else {\n // Unbind listeners\n unbindListeners.call(_this3); // Replace the container with the original element provided\n\n replaceElement(_this3.elements.original, _this3.elements.container); // Event\n\n triggerEvent.call(_this3, _this3.elements.original, 'destroyed', true); // Callback\n\n if (is$1.function(callback)) {\n callback.call(_this3.elements.original);\n } // Reset state\n\n\n _this3.ready = false; // Clear for garbage collection\n\n setTimeout(function () {\n _this3.elements = null;\n _this3.media = null;\n }, 200);\n }\n }; // Stop playback\n\n\n this.stop(); // Clear timeouts\n\n clearTimeout(this.timers.loading);\n clearTimeout(this.timers.controls);\n clearTimeout(this.timers.resized); // Provider specific stuff\n\n if (this.isHTML5) {\n // Restore native video controls\n ui.toggleNativeControls.call(this, true); // Clean up\n\n done();\n } else if (this.isYouTube) {\n // Clear timers\n clearInterval(this.timers.buffering);\n clearInterval(this.timers.playing); // Destroy YouTube API\n\n if (this.embed !== null && is$1.function(this.embed.destroy)) {\n this.embed.destroy();\n } // Clean up\n\n\n done();\n } else if (this.isVimeo) {\n // Destroy Vimeo API\n // then clean up (wait, to prevent postmessage errors)\n if (this.embed !== null) {\n this.embed.unload().then(done);\n } // Vimeo does not always return\n\n\n setTimeout(done, 200);\n }\n }\n /**\n * Check for support for a mime type (HTML5 only)\n * @param {String} type - Mime type\n */\n\n }, {\n key: \"supports\",\n value: function supports(type) {\n return support.mime.call(this, type);\n }\n /**\n * Check for support\n * @param {String} type - Player type (audio/video)\n * @param {String} provider - Provider (html5/youtube/vimeo)\n * @param {Boolean} inline - Where player has `playsinline` sttribute\n */\n\n }, {\n key: \"isHTML5\",\n get: function get() {\n return this.provider === providers.html5;\n }\n }, {\n key: \"isEmbed\",\n get: function get() {\n return this.isYouTube || this.isVimeo;\n }\n }, {\n key: \"isYouTube\",\n get: function get() {\n return this.provider === providers.youtube;\n }\n }, {\n key: \"isVimeo\",\n get: function get() {\n return this.provider === providers.vimeo;\n }\n }, {\n key: \"isVideo\",\n get: function get() {\n return this.type === types.video;\n }\n }, {\n key: \"isAudio\",\n get: function get() {\n return this.type === types.audio;\n }\n }, {\n key: \"playing\",\n get: function get() {\n return Boolean(this.ready && !this.paused && !this.ended);\n }\n /**\n * Get paused state\n */\n\n }, {\n key: \"paused\",\n get: function get() {\n return Boolean(this.media.paused);\n }\n /**\n * Get stopped state\n */\n\n }, {\n key: \"stopped\",\n get: function get() {\n return Boolean(this.paused && this.currentTime === 0);\n }\n /**\n * Get ended state\n */\n\n }, {\n key: \"ended\",\n get: function get() {\n return Boolean(this.media.ended);\n }\n }, {\n key: \"currentTime\",\n set: function set(input) {\n // Bail if media duration isn't available yet\n if (!this.duration) {\n return;\n } // Validate input\n\n\n var inputIsValid = is$1.number(input) && input > 0; // Set\n\n this.media.currentTime = inputIsValid ? Math.min(input, this.duration) : 0; // Logging\n\n this.debug.log(\"Seeking to \".concat(this.currentTime, \" seconds\"));\n }\n /**\n * Get current time\n */\n ,\n get: function get() {\n return Number(this.media.currentTime);\n }\n /**\n * Get buffered\n */\n\n }, {\n key: \"buffered\",\n get: function get() {\n var buffered = this.media.buffered; // YouTube / Vimeo return a float between 0-1\n\n if (is$1.number(buffered)) {\n return buffered;\n } // HTML5\n // TODO: Handle buffered chunks of the media\n // (i.e. seek to another section buffers only that section)\n\n\n if (buffered && buffered.length && this.duration > 0) {\n return buffered.end(0) / this.duration;\n }\n\n return 0;\n }\n /**\n * Get seeking status\n */\n\n }, {\n key: \"seeking\",\n get: function get() {\n return Boolean(this.media.seeking);\n }\n /**\n * Get the duration of the current media\n */\n\n }, {\n key: \"duration\",\n get: function get() {\n // Faux duration set via config\n var fauxDuration = parseFloat(this.config.duration); // Media duration can be NaN or Infinity before the media has loaded\n\n var realDuration = (this.media || {}).duration;\n var duration = !is$1.number(realDuration) || realDuration === Infinity ? 0 : realDuration; // If config duration is funky, use regular duration\n\n return fauxDuration || duration;\n }\n /**\n * Set the player volume\n * @param {Number} value - must be between 0 and 1. Defaults to the value from local storage and config.volume if not set in storage\n */\n\n }, {\n key: \"volume\",\n set: function set(value) {\n var volume = value;\n var max = 1;\n var min = 0;\n\n if (is$1.string(volume)) {\n volume = Number(volume);\n } // Load volume from storage if no value specified\n\n\n if (!is$1.number(volume)) {\n volume = this.storage.get('volume');\n } // Use config if all else fails\n\n\n if (!is$1.number(volume)) {\n volume = this.config.volume;\n } // Maximum is volumeMax\n\n\n if (volume > max) {\n volume = max;\n } // Minimum is volumeMin\n\n\n if (volume < min) {\n volume = min;\n } // Update config\n\n\n this.config.volume = volume; // Set the player volume\n\n this.media.volume = volume; // If muted, and we're increasing volume manually, reset muted state\n\n if (!is$1.empty(value) && this.muted && volume > 0) {\n this.muted = false;\n }\n }\n /**\n * Get the current player volume\n */\n ,\n get: function get() {\n return Number(this.media.volume);\n }\n }, {\n key: \"muted\",\n set: function set(mute) {\n var toggle = mute; // Load muted state from storage\n\n if (!is$1.boolean(toggle)) {\n toggle = this.storage.get('muted');\n } // Use config if all else fails\n\n\n if (!is$1.boolean(toggle)) {\n toggle = this.config.muted;\n } // Update config\n\n\n this.config.muted = toggle; // Set mute on the player\n\n this.media.muted = toggle;\n }\n /**\n * Get current muted state\n */\n ,\n get: function get() {\n return Boolean(this.media.muted);\n }\n /**\n * Check if the media has audio\n */\n\n }, {\n key: \"hasAudio\",\n get: function get() {\n // Assume yes for all non HTML5 (as we can't tell...)\n if (!this.isHTML5) {\n return true;\n }\n\n if (this.isAudio) {\n return true;\n } // Get audio tracks\n\n\n return Boolean(this.media.mozHasAudio) || Boolean(this.media.webkitAudioDecodedByteCount) || Boolean(this.media.audioTracks && this.media.audioTracks.length);\n }\n /**\n * Set playback speed\n * @param {Number} speed - the speed of playback (0.5-2.0)\n */\n\n }, {\n key: \"speed\",\n set: function set(input) {\n var _this4 = this;\n\n var speed = null;\n\n if (is$1.number(input)) {\n speed = input;\n }\n\n if (!is$1.number(speed)) {\n speed = this.storage.get('speed');\n }\n\n if (!is$1.number(speed)) {\n speed = this.config.speed.selected;\n } // Clamp to min/max\n\n\n var min = this.minimumSpeed,\n max = this.maximumSpeed;\n speed = clamp(speed, min, max); // Update config\n\n this.config.speed.selected = speed; // Set media speed\n\n setTimeout(function () {\n _this4.media.playbackRate = speed;\n }, 0);\n }\n /**\n * Get current playback speed\n */\n ,\n get: function get() {\n return Number(this.media.playbackRate);\n }\n /**\n * Get the minimum allowed speed\n */\n\n }, {\n key: \"minimumSpeed\",\n get: function get() {\n if (this.isYouTube) {\n // https://developers.google.com/youtube/iframe_api_reference#setPlaybackRate\n return Math.min.apply(Math, _toConsumableArray(this.options.speed));\n }\n\n if (this.isVimeo) {\n // https://github.com/vimeo/player.js/#setplaybackrateplaybackrate-number-promisenumber-rangeerrorerror\n return 0.5;\n } // https://stackoverflow.com/a/32320020/1191319\n\n\n return 0.0625;\n }\n /**\n * Get the maximum allowed speed\n */\n\n }, {\n key: \"maximumSpeed\",\n get: function get() {\n if (this.isYouTube) {\n // https://developers.google.com/youtube/iframe_api_reference#setPlaybackRate\n return Math.max.apply(Math, _toConsumableArray(this.options.speed));\n }\n\n if (this.isVimeo) {\n // https://github.com/vimeo/player.js/#setplaybackrateplaybackrate-number-promisenumber-rangeerrorerror\n return 2;\n } // https://stackoverflow.com/a/32320020/1191319\n\n\n return 16;\n }\n /**\n * Set playback quality\n * Currently HTML5 & YouTube only\n * @param {Number} input - Quality level\n */\n\n }, {\n key: \"quality\",\n set: function set(input) {\n var config = this.config.quality;\n var options = this.options.quality;\n\n if (!options.length) {\n return;\n }\n\n var quality = [!is$1.empty(input) && Number(input), this.storage.get('quality'), config.selected, config.default].find(is$1.number);\n var updateStorage = true;\n\n if (!options.includes(quality)) {\n var value = closest(options, quality);\n this.debug.warn(\"Unsupported quality option: \".concat(quality, \", using \").concat(value, \" instead\"));\n quality = value; // Don't update storage if quality is not supported\n\n updateStorage = false;\n } // Update config\n\n\n config.selected = quality; // Set quality\n\n this.media.quality = quality; // Save to storage\n\n if (updateStorage) {\n this.storage.set({\n quality: quality\n });\n }\n }\n /**\n * Get current quality level\n */\n ,\n get: function get() {\n return this.media.quality;\n }\n /**\n * Toggle loop\n * TODO: Finish fancy new logic. Set the indicator on load as user may pass loop as config\n * @param {Boolean} input - Whether to loop or not\n */\n\n }, {\n key: \"loop\",\n set: function set(input) {\n var toggle = is$1.boolean(input) ? input : this.config.loop.active;\n this.config.loop.active = toggle;\n this.media.loop = toggle; // Set default to be a true toggle\n\n /* const type = ['start', 'end', 'all', 'none', 'toggle'].includes(input) ? input : 'toggle';\n switch (type) {\n case 'start':\n if (this.config.loop.end && this.config.loop.end <= this.currentTime) {\n this.config.loop.end = null;\n }\n this.config.loop.start = this.currentTime;\n // this.config.loop.indicator.start = this.elements.display.played.value;\n break;\n case 'end':\n if (this.config.loop.start >= this.currentTime) {\n return this;\n }\n this.config.loop.end = this.currentTime;\n // this.config.loop.indicator.end = this.elements.display.played.value;\n break;\n case 'all':\n this.config.loop.start = 0;\n this.config.loop.end = this.duration - 2;\n this.config.loop.indicator.start = 0;\n this.config.loop.indicator.end = 100;\n break;\n case 'toggle':\n if (this.config.loop.active) {\n this.config.loop.start = 0;\n this.config.loop.end = null;\n } else {\n this.config.loop.start = 0;\n this.config.loop.end = this.duration - 2;\n }\n break;\n default:\n this.config.loop.start = 0;\n this.config.loop.end = null;\n break;\n } */\n }\n /**\n * Get current loop state\n */\n ,\n get: function get() {\n return Boolean(this.media.loop);\n }\n /**\n * Set new media source\n * @param {Object} input - The new source object (see docs)\n */\n\n }, {\n key: \"source\",\n set: function set(input) {\n source.change.call(this, input);\n }\n /**\n * Get current source\n */\n ,\n get: function get() {\n return this.media.currentSrc;\n }\n /**\n * Get a download URL (either source or custom)\n */\n\n }, {\n key: \"download\",\n get: function get() {\n var download = this.config.urls.download;\n return is$1.url(download) ? download : this.source;\n }\n /**\n * Set the download URL\n */\n ,\n set: function set(input) {\n if (!is$1.url(input)) {\n return;\n }\n\n this.config.urls.download = input;\n controls.setDownloadUrl.call(this);\n }\n /**\n * Set the poster image for a video\n * @param {String} input - the URL for the new poster image\n */\n\n }, {\n key: \"poster\",\n set: function set(input) {\n if (!this.isVideo) {\n this.debug.warn('Poster can only be set for video');\n return;\n }\n\n ui.setPoster.call(this, input, false).catch(function () {});\n }\n /**\n * Get the current poster image\n */\n ,\n get: function get() {\n if (!this.isVideo) {\n return null;\n }\n\n return this.media.getAttribute('poster');\n }\n /**\n * Get the current aspect ratio in use\n */\n\n }, {\n key: \"ratio\",\n get: function get() {\n if (!this.isVideo) {\n return null;\n }\n\n var ratio = reduceAspectRatio(getAspectRatio.call(this));\n return is$1.array(ratio) ? ratio.join(':') : ratio;\n }\n /**\n * Set video aspect ratio\n */\n ,\n set: function set(input) {\n if (!this.isVideo) {\n this.debug.warn('Aspect ratio can only be set for video');\n return;\n }\n\n if (!is$1.string(input) || !validateRatio(input)) {\n this.debug.error(\"Invalid aspect ratio specified (\".concat(input, \")\"));\n return;\n }\n\n this.config.ratio = input;\n setAspectRatio.call(this);\n }\n /**\n * Set the autoplay state\n * @param {Boolean} input - Whether to autoplay or not\n */\n\n }, {\n key: \"autoplay\",\n set: function set(input) {\n var toggle = is$1.boolean(input) ? input : this.config.autoplay;\n this.config.autoplay = toggle;\n }\n /**\n * Get the current autoplay state\n */\n ,\n get: function get() {\n return Boolean(this.config.autoplay);\n }\n }, {\n key: \"currentTrack\",\n set: function set(input) {\n captions.set.call(this, input, false);\n }\n /**\n * Get the current caption track index (-1 if disabled)\n */\n ,\n get: function get() {\n var _this$captions = this.captions,\n toggled = _this$captions.toggled,\n currentTrack = _this$captions.currentTrack;\n return toggled ? currentTrack : -1;\n }\n /**\n * Set the wanted language for captions\n * Since tracks can be added later it won't update the actual caption track until there is a matching track\n * @param {String} - Two character ISO language code (e.g. EN, FR, PT, etc)\n */\n\n }, {\n key: \"language\",\n set: function set(input) {\n captions.setLanguage.call(this, input, false);\n }\n /**\n * Get the current track's language\n */\n ,\n get: function get() {\n return (captions.getCurrentTrack.call(this) || {}).language;\n }\n /**\n * Toggle picture-in-picture playback on WebKit/MacOS\n * TODO: update player with state, support, enabled\n * TODO: detect outside changes\n */\n\n }, {\n key: \"pip\",\n set: function set(input) {\n // Bail if no support\n if (!support.pip) {\n return;\n } // Toggle based on current state if not passed\n\n\n var toggle = is$1.boolean(input) ? input : !this.pip; // Toggle based on current state\n // Safari\n\n if (is$1.function(this.media.webkitSetPresentationMode)) {\n this.media.webkitSetPresentationMode(toggle ? pip.active : pip.inactive);\n } // Chrome\n\n\n if (is$1.function(this.media.requestPictureInPicture)) {\n if (!this.pip && toggle) {\n this.media.requestPictureInPicture();\n } else if (this.pip && !toggle) {\n document.exitPictureInPicture();\n }\n }\n }\n /**\n * Get the current picture-in-picture state\n */\n ,\n get: function get() {\n if (!support.pip) {\n return null;\n } // Safari\n\n\n if (!is$1.empty(this.media.webkitPresentationMode)) {\n return this.media.webkitPresentationMode === pip.active;\n } // Chrome\n\n\n return this.media === document.pictureInPictureElement;\n }\n }], [{\n key: \"supported\",\n value: function supported(type, provider, inline) {\n return support.check(type, provider, inline);\n }\n /**\n * Load an SVG sprite into the page\n * @param {String} url - URL for the SVG sprite\n * @param {String} [id] - Unique ID\n */\n\n }, {\n key: \"loadSprite\",\n value: function loadSprite$1(url, id) {\n return loadSprite(url, id);\n }\n /**\n * Setup multiple instances\n * @param {*} selector\n * @param {Object} options\n */\n\n }, {\n key: \"setup\",\n value: function setup(selector) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var targets = null;\n\n if (is$1.string(selector)) {\n targets = Array.from(document.querySelectorAll(selector));\n } else if (is$1.nodeList(selector)) {\n targets = Array.from(selector);\n } else if (is$1.array(selector)) {\n targets = selector.filter(is$1.element);\n }\n\n if (is$1.empty(targets)) {\n return null;\n }\n\n return targets.map(function (t) {\n return new Plyr(t, options);\n });\n }\n }]);\n\n return Plyr;\n }();\n\n Plyr.defaults = cloneDeep(defaults$1);\n\n // ==========================================================================\n\n return Plyr;\n\n}));\n","// Polyfill for creating CustomEvents on IE9/10/11\n\n// code pulled from:\n// https://github.com/d4tocchini/customevent-polyfill\n// https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent#Polyfill\n\n(function() {\n if (typeof window === 'undefined') {\n return;\n }\n\n try {\n var ce = new window.CustomEvent('test', { cancelable: true });\n ce.preventDefault();\n if (ce.defaultPrevented !== true) {\n // IE has problems with .preventDefault() on custom events\n // http://stackoverflow.com/questions/23349191\n throw new Error('Could not prevent default');\n }\n } catch (e) {\n var CustomEvent = function(event, params) {\n var evt, origPrevent;\n params = params || {};\n params.bubbles = !!params.bubbles;\n params.cancelable = !!params.cancelable;\n\n evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(\n event,\n params.bubbles,\n params.cancelable,\n params.detail\n );\n origPrevent = evt.preventDefault;\n evt.preventDefault = function() {\n origPrevent.call(this);\n try {\n Object.defineProperty(this, 'defaultPrevented', {\n get: function() {\n return true;\n }\n });\n } catch (e) {\n this.defaultPrevented = true;\n }\n };\n return evt;\n };\n\n CustomEvent.prototype = window.Event.prototype;\n window.CustomEvent = CustomEvent; // expose definition to window\n }\n})();\n","var O = 'object';\nvar check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line no-undef\n check(typeof globalThis == O && globalThis) ||\n check(typeof window == O && window) ||\n check(typeof self == O && self) ||\n check(typeof global == O && global) ||\n // eslint-disable-next-line no-new-func\n Function('return this')();\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar hide = require('../internals/hide');\nvar objectHas = require('../internals/has');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP) {\n var store = new WeakMap();\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n hide(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","var fails = require('../internals/fails');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !fails(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","'use strict';\nvar nativePropertyIsEnumerable = {}.propertyIsEnumerable;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : nativePropertyIsEnumerable;\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","// `RequireObjectCoercible` abstract operation\n// https://tc39.github.io/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var isObject = require('../internals/is-object');\n\n// `ToPrimitive` abstract operation\n// https://tc39.github.io/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n","var DESCRIPTORS = require('../internals/descriptors');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar has = require('../internals/has');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\nvar nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return nativeGetOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n } return it;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar anObject = require('../internals/an-object');\nvar toPrimitive = require('../internals/to-primitive');\n\nvar nativeDefineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return nativeDefineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var global = require('../internals/global');\nvar hide = require('../internals/hide');\n\nmodule.exports = function (key, value) {\n try {\n hide(global, key, value);\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","var global = require('../internals/global');\nvar setGlobal = require('../internals/set-global');\nvar IS_PURE = require('../internals/is-pure');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.1.3',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2019 Denis Pushkarev (zloirock.ru)'\n});\n","var shared = require('../internals/shared');\n\nmodule.exports = shared('native-function-to-string', Function.toString);\n","var global = require('../internals/global');\nvar nativeFunctionToString = require('../internals/function-to-string');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(nativeFunctionToString.call(WeakMap));\n","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","module.exports = {};\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar hide = require('../internals/hide');\nvar has = require('../internals/has');\nvar setGlobal = require('../internals/set-global');\nvar nativeFunctionToString = require('../internals/function-to-string');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(nativeFunctionToString).split('toString');\n\nshared('inspectSource', function (it) {\n return nativeFunctionToString.call(it);\n});\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n if (typeof value == 'function') {\n if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key);\n enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else hide(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return typeof this == 'function' && getInternalState(this).source || nativeFunctionToString.call(this);\n});\n","module.exports = require('../internals/global');\n","var path = require('../internals/path');\nvar global = require('../internals/global');\n\nvar aFunction = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])\n : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.github.io/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n","var toInteger = require('../internals/to-integer');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.github.io/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(length, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var has = require('../internals/has');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertynames\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","exports.f = Object.getOwnPropertySymbols;\n","var getBuiltIn = require('../internals/get-built-in');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n","var has = require('../internals/has');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n","var fails = require('../internals/fails');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : typeof detection == 'function' ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar hide = require('../internals/hide');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n hide(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","var fails = require('../internals/fails');\n\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n // Chrome 38 Symbol has incorrect toString conversion\n // eslint-disable-next-line no-undef\n return !String(Symbol());\n});\n","var classof = require('../internals/classof-raw');\n\n// `IsArray` abstract operation\n// https://tc39.github.io/ecma262/#sec-isarray\nmodule.exports = Array.isArray || function isArray(arg) {\n return classof(arg) == 'Array';\n};\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `ToObject` abstract operation\n// https://tc39.github.io/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.github.io/ecma262/#sec-object.keys\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperties\nmodule.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);\n return O;\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n","var anObject = require('../internals/an-object');\nvar defineProperties = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar PROTOTYPE = 'prototype';\nvar Empty = function () { /* empty */ };\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var length = enumBugKeys.length;\n var lt = '<';\n var script = 'script';\n var gt = '>';\n var js = 'java' + script + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n iframe.src = String(js);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];\n return createDict();\n};\n\n// `Object.create` method\n// https://tc39.github.io/ecma262/#sec-object.create\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : defineProperties(result, Properties);\n};\n\nhiddenKeys[IE_PROTO] = true;\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar nativeGetOwnPropertyNames = require('../internals/object-get-own-property-names').f;\n\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return nativeGetOwnPropertyNames(it);\n } catch (error) {\n return windowNames.slice();\n }\n};\n\n// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]'\n ? getWindowNames(it)\n : nativeGetOwnPropertyNames(toIndexedObject(it));\n};\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\n\nvar Symbol = global.Symbol;\nvar store = shared('wks');\n\nmodule.exports = function (name) {\n return store[name] || (store[name] = NATIVE_SYMBOL && Symbol[name]\n || (NATIVE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n","exports.f = require('../internals/well-known-symbol');\n","var path = require('../internals/path');\nvar has = require('../internals/has');\nvar wrappedWellKnownSymbolModule = require('../internals/wrapped-well-known-symbol');\nvar defineProperty = require('../internals/object-define-property').f;\n\nmodule.exports = function (NAME) {\n var Symbol = path.Symbol || (path.Symbol = {});\n if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {\n value: wrappedWellKnownSymbolModule.f(NAME)\n });\n};\n","var defineProperty = require('../internals/object-define-property').f;\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC) {\n if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {\n defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n};\n","module.exports = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n } return it;\n};\n","var aFunction = require('../internals/a-function');\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","var isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.github.io/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);\n};\n","var bind = require('../internals/bind-context');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\nvar push = [].push;\n\n// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation\nvar createMethod = function (TYPE) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = IndexedObject(O);\n var boundFunction = bind(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;\n var value, result;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3: return true; // some\n case 5: return value; // find\n case 6: return index; // findIndex\n case 2: push.call(target, value); // filter\n } else if (IS_EVERY) return false; // every\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.forEach` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.foreach\n forEach: createMethod(0),\n // `Array.prototype.map` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.map\n map: createMethod(1),\n // `Array.prototype.filter` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.filter\n filter: createMethod(2),\n // `Array.prototype.some` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.some\n some: createMethod(3),\n // `Array.prototype.every` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.every\n every: createMethod(4),\n // `Array.prototype.find` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.find\n find: createMethod(5),\n // `Array.prototype.findIndex` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod(6)\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar IS_PURE = require('../internals/is-pure');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar fails = require('../internals/fails');\nvar has = require('../internals/has');\nvar isArray = require('../internals/is-array');\nvar isObject = require('../internals/is-object');\nvar anObject = require('../internals/an-object');\nvar toObject = require('../internals/to-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar nativeObjectCreate = require('../internals/object-create');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertyNamesExternal = require('../internals/object-get-own-property-names-external');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar hide = require('../internals/hide');\nvar redefine = require('../internals/redefine');\nvar shared = require('../internals/shared');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar uid = require('../internals/uid');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar wrappedWellKnownSymbolModule = require('../internals/wrapped-well-known-symbol');\nvar defineWellKnownSymbol = require('../internals/define-well-known-symbol');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar InternalStateModule = require('../internals/internal-state');\nvar $forEach = require('../internals/array-iteration').forEach;\n\nvar HIDDEN = sharedKey('hidden');\nvar SYMBOL = 'Symbol';\nvar PROTOTYPE = 'prototype';\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(SYMBOL);\nvar ObjectPrototype = Object[PROTOTYPE];\nvar $Symbol = global.Symbol;\nvar JSON = global.JSON;\nvar nativeJSONStringify = JSON && JSON.stringify;\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;\nvar nativePropertyIsEnumerable = propertyIsEnumerableModule.f;\nvar AllSymbols = shared('symbols');\nvar ObjectPrototypeSymbols = shared('op-symbols');\nvar StringToSymbolRegistry = shared('string-to-symbol-registry');\nvar SymbolToStringRegistry = shared('symbol-to-string-registry');\nvar WellKnownSymbolsStore = shared('wks');\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDescriptor = DESCRIPTORS && fails(function () {\n return nativeObjectCreate(nativeDefineProperty({}, 'a', {\n get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (O, P, Attributes) {\n var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);\n if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];\n nativeDefineProperty(O, P, Attributes);\n if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {\n nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);\n }\n} : nativeDefineProperty;\n\nvar wrap = function (tag, description) {\n var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]);\n setInternalState(symbol, {\n type: SYMBOL,\n tag: tag,\n description: description\n });\n if (!DESCRIPTORS) symbol.description = description;\n return symbol;\n};\n\nvar isSymbol = NATIVE_SYMBOL && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return Object(it) instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(O, P, Attributes) {\n if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);\n anObject(O);\n var key = toPrimitive(P, true);\n anObject(Attributes);\n if (has(AllSymbols, key)) {\n if (!Attributes.enumerable) {\n if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));\n O[HIDDEN][key] = true;\n } else {\n if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;\n Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });\n } return setSymbolDescriptor(O, key, Attributes);\n } return nativeDefineProperty(O, key, Attributes);\n};\n\nvar $defineProperties = function defineProperties(O, Properties) {\n anObject(O);\n var properties = toIndexedObject(Properties);\n var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));\n $forEach(keys, function (key) {\n if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);\n });\n return O;\n};\n\nvar $create = function create(O, Properties) {\n return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);\n};\n\nvar $propertyIsEnumerable = function propertyIsEnumerable(V) {\n var P = toPrimitive(V, true);\n var enumerable = nativePropertyIsEnumerable.call(this, P);\n if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;\n return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;\n};\n\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {\n var it = toIndexedObject(O);\n var key = toPrimitive(P, true);\n if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;\n var descriptor = nativeGetOwnPropertyDescriptor(it, key);\n if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {\n descriptor.enumerable = true;\n }\n return descriptor;\n};\n\nvar $getOwnPropertyNames = function getOwnPropertyNames(O) {\n var names = nativeGetOwnPropertyNames(toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);\n });\n return result;\n};\n\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(O) {\n var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;\n var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {\n result.push(AllSymbols[key]);\n }\n });\n return result;\n};\n\n// `Symbol` constructor\n// https://tc39.github.io/ecma262/#sec-symbol-constructor\nif (!NATIVE_SYMBOL) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');\n var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);\n var tag = uid(description);\n var setter = function (value) {\n if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));\n };\n if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });\n return wrap(tag, description);\n };\n\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return getInternalState(this).tag;\n });\n\n propertyIsEnumerableModule.f = $propertyIsEnumerable;\n definePropertyModule.f = $defineProperty;\n getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;\n getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;\n getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS) {\n // https://github.com/tc39/proposal-Symbol-description\n nativeDefineProperty($Symbol[PROTOTYPE], 'description', {\n configurable: true,\n get: function description() {\n return getInternalState(this).description;\n }\n });\n if (!IS_PURE) {\n redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });\n }\n }\n\n wrappedWellKnownSymbolModule.f = function (name) {\n return wrap(wellKnownSymbol(name), name);\n };\n}\n\n$({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {\n Symbol: $Symbol\n});\n\n$forEach(objectKeys(WellKnownSymbolsStore), function (name) {\n defineWellKnownSymbol(name);\n});\n\n$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {\n // `Symbol.for` method\n // https://tc39.github.io/ecma262/#sec-symbol.for\n 'for': function (key) {\n var string = String(key);\n if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];\n var symbol = $Symbol(string);\n StringToSymbolRegistry[string] = symbol;\n SymbolToStringRegistry[symbol] = string;\n return symbol;\n },\n // `Symbol.keyFor` method\n // https://tc39.github.io/ecma262/#sec-symbol.keyfor\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');\n if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];\n },\n useSetter: function () { USE_SETTER = true; },\n useSimple: function () { USE_SETTER = false; }\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {\n // `Object.create` method\n // https://tc39.github.io/ecma262/#sec-object.create\n create: $create,\n // `Object.defineProperty` method\n // https://tc39.github.io/ecma262/#sec-object.defineproperty\n defineProperty: $defineProperty,\n // `Object.defineProperties` method\n // https://tc39.github.io/ecma262/#sec-object.defineproperties\n defineProperties: $defineProperties,\n // `Object.getOwnPropertyDescriptor` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {\n // `Object.getOwnPropertyNames` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertynames\n getOwnPropertyNames: $getOwnPropertyNames,\n // `Object.getOwnPropertySymbols` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\n$({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {\n getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n return getOwnPropertySymbolsModule.f(toObject(it));\n }\n});\n\n// `JSON.stringify` method behavior with symbols\n// https://tc39.github.io/ecma262/#sec-json.stringify\nJSON && $({ target: 'JSON', stat: true, forced: !NATIVE_SYMBOL || fails(function () {\n var symbol = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n return nativeJSONStringify([symbol]) != '[null]'\n // WebKit converts symbol values to JSON as null\n || nativeJSONStringify({ a: symbol }) != '{}'\n // V8 throws on boxed symbols\n || nativeJSONStringify(Object(symbol)) != '{}';\n}) }, {\n stringify: function stringify(it) {\n var args = [it];\n var index = 1;\n var replacer, $replacer;\n while (arguments.length > index) args.push(arguments[index++]);\n $replacer = replacer = args[1];\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return nativeJSONStringify.apply(JSON, args);\n }\n});\n\n// `Symbol.prototype[@@toPrimitive]` method\n// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive\nif (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) hide($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// `Symbol.prototype[@@toStringTag]` property\n// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag\nsetToStringTag($Symbol, SYMBOL);\n\nhiddenKeys[HIDDEN] = true;\n","// `Symbol.prototype.description` getter\n// https://tc39.github.io/ecma262/#sec-symbol.prototype.description\n'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar has = require('../internals/has');\nvar isObject = require('../internals/is-object');\nvar defineProperty = require('../internals/object-define-property').f;\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\n\nvar NativeSymbol = global.Symbol;\n\nif (DESCRIPTORS && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||\n // Safari 12 bug\n NativeSymbol().description !== undefined\n)) {\n var EmptyStringDescriptionStore = {};\n // wrap Symbol constructor for correct work with undefined description\n var SymbolWrapper = function Symbol() {\n var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);\n var result = this instanceof SymbolWrapper\n ? new NativeSymbol(description)\n // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'\n : description === undefined ? NativeSymbol() : NativeSymbol(description);\n if (description === '') EmptyStringDescriptionStore[result] = true;\n return result;\n };\n copyConstructorProperties(SymbolWrapper, NativeSymbol);\n var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;\n symbolPrototype.constructor = SymbolWrapper;\n\n var symbolToString = symbolPrototype.toString;\n var native = String(NativeSymbol('test')) == 'Symbol(test)';\n var regexp = /^Symbol\\((.*)\\)[^)]+$/;\n defineProperty(symbolPrototype, 'description', {\n configurable: true,\n get: function description() {\n var symbol = isObject(this) ? this.valueOf() : this;\n var string = symbolToString.call(symbol);\n if (has(EmptyStringDescriptionStore, symbol)) return '';\n var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');\n return desc === '' ? undefined : desc;\n }\n });\n\n $({ global: true, forced: true }, {\n Symbol: SymbolWrapper\n });\n}\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.iterator` well-known symbol\n// https://tc39.github.io/ecma262/#sec-symbol.iterator\ndefineWellKnownSymbol('iterator');\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar hide = require('../internals/hide');\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n hide(ArrayPrototype, UNSCOPABLES, create(null));\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n","'use strict';\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar hide = require('../internals/hide');\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\nvar returnThis = function () { return this; };\n\n// `%IteratorPrototype%` object\n// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nif (IteratorPrototype == undefined) IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nif (!IS_PURE && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n","module.exports = {};\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n","var has = require('../internals/has');\nvar toObject = require('../internals/to-object');\nvar sharedKey = require('../internals/shared-key');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.getprototypeof\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectPrototype : null;\n};\n","'use strict';\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar Iterators = require('../internals/iterators');\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};\n","var anObject = require('../internals/an-object');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\n\n// `Object.setPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n setter.call(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter.call(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it) && it !== null) {\n throw TypeError(\"Can't set \" + String(it) + ' as a prototype');\n } return it;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar hide = require('../internals/hide');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n } return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {\n hide(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return nativeIterator.call(this); };\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n hide(IterablePrototype, ITERATOR, defaultIterator);\n }\n Iterators[NAME] = defaultIterator;\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n return methods;\n};\n","'use strict';\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar Iterators = require('../internals/iterators');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n// `Array.prototype.entries` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.github.io/ecma262/#sec-createarrayiterator\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated), // target\n index: 0, // next index\n kind: kind // kind\n });\n// `%ArrayIteratorPrototype%.next` method\n// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n var state = getInternalState(this);\n var target = state.target;\n var kind = state.kind;\n var index = state.index++;\n if (!target || index >= target.length) {\n state.target = undefined;\n return { value: undefined, done: true };\n }\n if (kind == 'keys') return { value: index, done: false };\n if (kind == 'values') return { value: target[index], done: false };\n return { value: [index, target[index]], done: false };\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject\nIterators.Arguments = Iterators.Array;\n\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !method || !fails(function () {\n // eslint-disable-next-line no-useless-call,no-throw-literal\n method.call(null, argument || function () { throw 1; }, 1);\n });\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar IndexedObject = require('../internals/indexed-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar sloppyArrayMethod = require('../internals/sloppy-array-method');\n\nvar nativeJoin = [].join;\n\nvar ES3_STRINGS = IndexedObject != Object;\nvar SLOPPY_METHOD = sloppyArrayMethod('join', ',');\n\n// `Array.prototype.join` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.join\n$({ target: 'Array', proto: true, forced: ES3_STRINGS || SLOPPY_METHOD }, {\n join: function join(separator) {\n return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);\n }\n});\n","'use strict';\nvar toPrimitive = require('../internals/to-primitive');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = function (object, key, value) {\n var propertyKey = toPrimitive(key);\n if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));\n else object[propertyKey] = value;\n};\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n return !fails(function () {\n var array = [];\n var constructor = array.constructor = {};\n constructor[SPECIES] = function () {\n return { foo: 1 };\n };\n return array[METHOD_NAME](Boolean).foo !== 1;\n });\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\nvar nativeSlice = [].slice;\nvar max = Math.max;\n\n// `Array.prototype.slice` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n$({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('slice') }, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n var Constructor, result, n;\n if (isArray(O)) {\n Constructor = O.constructor;\n // cross-realm fallback\n if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES];\n if (Constructor === null) Constructor = undefined;\n }\n if (Constructor === Array || Constructor === undefined) {\n return nativeSlice.call(O, k, fin);\n }\n }\n result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));\n for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n }\n});\n","var classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;\n};\n","'use strict';\nvar classof = require('../internals/classof');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\n// `Object.prototype.toString` method implementation\n// https://tc39.github.io/ecma262/#sec-object.prototype.tostring\nmodule.exports = String(test) !== '[object z]' ? function toString() {\n return '[object ' + classof(this) + ']';\n} : test.toString;\n","var redefine = require('../internals/redefine');\nvar toString = require('../internals/object-to-string');\n\nvar ObjectPrototype = Object.prototype;\n\n// `Object.prototype.toString` method\n// https://tc39.github.io/ecma262/#sec-object.prototype.tostring\nif (toString !== ObjectPrototype.toString) {\n redefine(ObjectPrototype, 'toString', toString, { unsafe: true });\n}\n","'use strict';\nvar anObject = require('../internals/an-object');\n\n// `RegExp.prototype.flags` getter implementation\n// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.dotAll) result += 's';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n","'use strict';\nvar redefine = require('../internals/redefine');\nvar anObject = require('../internals/an-object');\nvar fails = require('../internals/fails');\nvar flags = require('../internals/regexp-flags');\n\nvar TO_STRING = 'toString';\nvar RegExpPrototype = RegExp.prototype;\nvar nativeToString = RegExpPrototype[TO_STRING];\n\nvar NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });\n// FF44- RegExp#toString has a wrong name\nvar INCORRECT_NAME = nativeToString.name != TO_STRING;\n\n// `RegExp.prototype.toString` method\n// https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring\nif (NOT_GENERIC || INCORRECT_NAME) {\n redefine(RegExp.prototype, TO_STRING, function toString() {\n var R = anObject(this);\n var p = String(R.source);\n var rf = R.flags;\n var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);\n return '/' + p + '/' + f;\n }, { unsafe: true });\n}\n","var toInteger = require('../internals/to-integer');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `String.prototype.{ codePointAt, at }` methods implementation\nvar createMethod = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = String(requireObjectCoercible($this));\n var position = toInteger(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = S.charCodeAt(position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size\n || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF\n ? CONVERT_TO_STRING ? S.charAt(position) : first\n : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n};\n\nmodule.exports = {\n // `String.prototype.codePointAt` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod(true)\n};\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: String(iterated),\n index: 0\n });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return { value: undefined, done: true };\n point = charAt(string, index);\n state.index += point.length;\n return { value: point, done: false };\n});\n","'use strict';\nvar regexpFlags = require('./regexp-flags');\n\nvar nativeExec = RegExp.prototype.exec;\n// This always refers to the native implementation, because the\n// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,\n// which loads this file before patching the method.\nvar nativeReplace = String.prototype.replace;\n\nvar patchedExec = nativeExec;\n\nvar UPDATES_LAST_INDEX_WRONG = (function () {\n var re1 = /a/;\n var re2 = /b*/g;\n nativeExec.call(re1, 'a');\n nativeExec.call(re2, 'a');\n return re1.lastIndex !== 0 || re2.lastIndex !== 0;\n})();\n\n// nonparticipating capturing group, copied from es5-shim's String#split patch.\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\n\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;\n\nif (PATCH) {\n patchedExec = function exec(str) {\n var re = this;\n var lastIndex, reCopy, match, i;\n\n if (NPCG_INCLUDED) {\n reCopy = new RegExp('^' + re.source + '$(?!\\\\s)', regexpFlags.call(re));\n }\n if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;\n\n match = nativeExec.call(re, str);\n\n if (UPDATES_LAST_INDEX_WRONG && match) {\n re.lastIndex = re.global ? match.index + match[0].length : lastIndex;\n }\n if (NPCG_INCLUDED && match && match.length > 1) {\n // Fix browsers whose `exec` methods don't consistently return `undefined`\n // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n nativeReplace.call(match[0], reCopy, function () {\n for (i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n return match;\n };\n}\n\nmodule.exports = patchedExec;\n","'use strict';\nvar hide = require('../internals/hide');\nvar redefine = require('../internals/redefine');\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar regexpExec = require('../internals/regexp-exec');\n\nvar SPECIES = wellKnownSymbol('species');\n\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {\n // #replace needs built-in support for named groups.\n // #match works fine because it just return the exec results, even if it has\n // a \"grops\" property.\n var re = /./;\n re.exec = function () {\n var result = [];\n result.groups = { a: '7' };\n return result;\n };\n return ''.replace(re, '$<a>') !== '7';\n});\n\n// Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n// Weex JS has frozen built-in prototypes, so use try / catch wrapper\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {\n var re = /(?:)/;\n var originalExec = re.exec;\n re.exec = function () { return originalExec.apply(this, arguments); };\n var result = 'ab'.split(re);\n return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';\n});\n\nmodule.exports = function (KEY, length, exec, sham) {\n var SYMBOL = wellKnownSymbol(KEY);\n\n var DELEGATES_TO_SYMBOL = !fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n });\n\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n re.exec = function () { execCalled = true; return null; };\n\n if (KEY === 'split') {\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n re.constructor[SPECIES] = function () { return re; };\n }\n\n re[SYMBOL]('');\n return !execCalled;\n });\n\n if (\n !DELEGATES_TO_SYMBOL ||\n !DELEGATES_TO_EXEC ||\n (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||\n (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)\n ) {\n var nativeRegExpMethod = /./[SYMBOL];\n var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {\n if (regexp.exec === regexpExec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };\n }\n return { done: true, value: nativeMethod.call(str, regexp, arg2) };\n }\n return { done: false };\n });\n var stringMethod = methods[0];\n var regexMethod = methods[1];\n\n redefine(String.prototype, KEY, stringMethod);\n redefine(RegExp.prototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) { return regexMethod.call(string, this, arg); }\n // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) { return regexMethod.call(string, this); }\n );\n if (sham) hide(RegExp.prototype[SYMBOL], 'sham', true);\n }\n};\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\n\n// `AdvanceStringIndex` abstract operation\n// https://tc39.github.io/ecma262/#sec-advancestringindex\nmodule.exports = function (S, index, unicode) {\n return index + (unicode ? charAt(S, index).length : 1);\n};\n","var classof = require('./classof-raw');\nvar regexpExec = require('./regexp-exec');\n\n// `RegExpExec` abstract operation\n// https://tc39.github.io/ecma262/#sec-regexpexec\nmodule.exports = function (R, S) {\n var exec = R.exec;\n if (typeof exec === 'function') {\n var result = exec.call(R, S);\n if (typeof result !== 'object') {\n throw TypeError('RegExp exec method returned something other than an Object or null');\n }\n return result;\n }\n\n if (classof(R) !== 'RegExp') {\n throw TypeError('RegExp#exec called on incompatible receiver');\n }\n\n return regexpExec.call(R, S);\n};\n\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar toInteger = require('../internals/to-integer');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\nvar max = Math.max;\nvar min = Math.min;\nvar floor = Math.floor;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&'`]|\\d\\d?|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&'`]|\\d\\d?)/g;\n\nvar maybeToString = function (it) {\n return it === undefined ? it : String(it);\n};\n\n// @@replace logic\nfixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative) {\n return [\n // `String.prototype.replace` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = requireObjectCoercible(this);\n var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];\n return replacer !== undefined\n ? replacer.call(searchValue, O, replaceValue)\n : nativeReplace.call(String(O), searchValue, replaceValue);\n },\n // `RegExp.prototype[@@replace]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace\n function (regexp, replaceValue) {\n var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n\n var functionalReplace = typeof replaceValue === 'function';\n if (!functionalReplace) replaceValue = String(replaceValue);\n\n var global = rx.global;\n if (global) {\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n var results = [];\n while (true) {\n var result = regExpExec(rx, S);\n if (result === null) break;\n\n results.push(result);\n if (!global) break;\n\n var matchStr = String(result[0]);\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n }\n\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n\n var matched = String(result[0]);\n var position = max(min(toInteger(result.index), S.length), 0);\n var captures = [];\n // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n var namedCaptures = result.groups;\n if (functionalReplace) {\n var replacerArgs = [matched].concat(captures, position, S);\n if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n var replacement = String(replaceValue.apply(undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n if (position >= nextSourcePosition) {\n accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n return accumulatedResult + S.slice(nextSourcePosition);\n }\n ];\n\n // https://tc39.github.io/ecma262/#sec-getsubstitution\n function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n if (namedCaptures !== undefined) {\n namedCaptures = toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n return nativeReplace.call(replacement, symbols, function (match, ch) {\n var capture;\n switch (ch.charAt(0)) {\n case '$': return '$';\n case '&': return matched;\n case '`': return str.slice(0, position);\n case \"'\": return str.slice(tailPos);\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n default: // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n if (n > m) {\n var f = floor(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n capture = captures[n - 1];\n }\n return capture === undefined ? '' : capture;\n });\n }\n});\n","// `SameValue` abstract operation\n// https://tc39.github.io/ecma262/#sec-samevalue\nmodule.exports = Object.is || function is(x, y) {\n // eslint-disable-next-line no-self-compare\n return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n};\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar sameValue = require('../internals/same-value');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@search logic\nfixRegExpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {\n return [\n // `String.prototype.search` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.search\n function search(regexp) {\n var O = requireObjectCoercible(this);\n var searcher = regexp == undefined ? undefined : regexp[SEARCH];\n return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));\n },\n // `RegExp.prototype[@@search]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search\n function (regexp) {\n var res = maybeCallNative(nativeSearch, regexp, this);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n\n var previousLastIndex = rx.lastIndex;\n if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;\n var result = regExpExec(rx, S);\n if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;\n return result === null ? -1 : result.index;\n }\n ];\n});\n","var isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\n// `IsRegExp` abstract operation\n// https://tc39.github.io/ecma262/#sec-isregexp\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');\n};\n","var anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.github.io/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);\n};\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar isRegExp = require('../internals/is-regexp');\nvar anObject = require('../internals/an-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar speciesConstructor = require('../internals/species-constructor');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar toLength = require('../internals/to-length');\nvar callRegExpExec = require('../internals/regexp-exec-abstract');\nvar regexpExec = require('../internals/regexp-exec');\nvar fails = require('../internals/fails');\n\nvar arrayPush = [].push;\nvar min = Math.min;\nvar MAX_UINT32 = 0xFFFFFFFF;\n\n// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError\nvar SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });\n\n// @@split logic\nfixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {\n var internalSplit;\n if (\n 'abbc'.split(/(b)*/)[1] == 'c' ||\n 'test'.split(/(?:)/, -1).length != 4 ||\n 'ab'.split(/(?:ab)*/).length != 2 ||\n '.'.split(/(.?)(.?)/).length != 4 ||\n '.'.split(/()()/).length > 1 ||\n ''.split(/.?/).length\n ) {\n // based on es5-shim implementation, need to rework it\n internalSplit = function (separator, limit) {\n var string = String(requireObjectCoercible(this));\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (separator === undefined) return [string];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) {\n return nativeSplit.call(string, separator, lim);\n }\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var match, lastIndex, lastLength;\n while (match = regexpExec.call(separatorCopy, string)) {\n lastIndex = separatorCopy.lastIndex;\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));\n lastLength = match[0].length;\n lastLastIndex = lastIndex;\n if (output.length >= lim) break;\n }\n if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop\n }\n if (lastLastIndex === string.length) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output.length > lim ? output.slice(0, lim) : output;\n };\n // Chakra, V8\n } else if ('0'.split(undefined, 0).length) {\n internalSplit = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);\n };\n } else internalSplit = nativeSplit;\n\n return [\n // `String.prototype.split` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = requireObjectCoercible(this);\n var splitter = separator == undefined ? undefined : separator[SPLIT];\n return splitter !== undefined\n ? splitter.call(separator, O, limit)\n : internalSplit.call(String(O), separator, limit);\n },\n // `RegExp.prototype[@@split]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (regexp, limit) {\n var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n var C = speciesConstructor(rx, RegExp);\n\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') +\n (rx.multiline ? 'm' : '') +\n (rx.unicode ? 'u' : '') +\n (SUPPORTS_Y ? 'y' : 'g');\n\n // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n while (q < S.length) {\n splitter.lastIndex = SUPPORTS_Y ? q : 0;\n var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));\n var e;\n if (\n z === null ||\n (e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p\n ) {\n q = advanceStringIndex(S, q, unicodeMatching);\n } else {\n A.push(S.slice(p, q));\n if (A.length === lim) return A;\n for (var i = 1; i <= z.length - 1; i++) {\n A.push(z[i]);\n if (A.length === lim) return A;\n }\n q = p = e;\n }\n }\n A.push(S.slice(p));\n return A;\n }\n ];\n}, !SUPPORTS_Y);\n","// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};\n","'use strict';\nvar $forEach = require('../internals/array-iteration').forEach;\nvar sloppyArrayMethod = require('../internals/sloppy-array-method');\n\n// `Array.prototype.forEach` method implementation\n// https://tc39.github.io/ecma262/#sec-array.prototype.foreach\nmodule.exports = sloppyArrayMethod('forEach') ? function forEach(callbackfn /* , thisArg */) {\n return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n} : [].forEach;\n","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar forEach = require('../internals/array-for-each');\nvar hide = require('../internals/hide');\n\nfor (var COLLECTION_NAME in DOMIterables) {\n var Collection = global[COLLECTION_NAME];\n var CollectionPrototype = Collection && Collection.prototype;\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {\n hide(CollectionPrototype, 'forEach', forEach);\n } catch (error) {\n CollectionPrototype.forEach = forEach;\n }\n}\n","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar ArrayIteratorMethods = require('../modules/es.array.iterator');\nvar hide = require('../internals/hide');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar ArrayValues = ArrayIteratorMethods.values;\n\nfor (var COLLECTION_NAME in DOMIterables) {\n var Collection = global[COLLECTION_NAME];\n var CollectionPrototype = Collection && Collection.prototype;\n if (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[ITERATOR] !== ArrayValues) try {\n hide(CollectionPrototype, ITERATOR, ArrayValues);\n } catch (error) {\n CollectionPrototype[ITERATOR] = ArrayValues;\n }\n if (!CollectionPrototype[TO_STRING_TAG]) hide(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);\n if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {\n hide(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);\n } catch (error) {\n CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];\n }\n }\n }\n}\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = !fails(function () {\n var url = new URL('b?e=1', 'http://a');\n var searchParams = url.searchParams;\n url.pathname = 'c%20d';\n return (IS_PURE && !url.toJSON)\n || !searchParams.sort\n || url.href !== 'http://a/c%20d?e=1'\n || searchParams.get('e') !== '1'\n || String(new URLSearchParams('?a=1')) !== 'a=1'\n || !searchParams[ITERATOR]\n // throws in Edge\n || new URL('https://a@b').username !== 'a'\n || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'\n // not punycoded in Edge\n || new URL('http://тест').host !== 'xn--e1aybc'\n // not escaped in Chrome 62-\n || new URL('http://a#б').hash !== '#%D0%B1';\n});\n","module.exports = function (it, Constructor, name) {\n if (!(it instanceof Constructor)) {\n throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n } return it;\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\n\nvar nativeAssign = Object.assign;\n\n// `Object.assign` method\n// https://tc39.github.io/ecma262/#sec-object.assign\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !nativeAssign || fails(function () {\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var symbol = Symbol();\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n var propertyIsEnumerable = propertyIsEnumerableModule.f;\n while (argumentsLength > index) {\n var S = IndexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];\n }\n } return T;\n} : nativeAssign;\n","var anObject = require('../internals/an-object');\n\n// call something on iterator step with safe closing on error\nmodule.exports = function (iterator, fn, value, ENTRIES) {\n try {\n return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (error) {\n var returnMethod = iterator['return'];\n if (returnMethod !== undefined) anObject(returnMethod.call(iterator));\n throw error;\n }\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n","var classof = require('../internals/classof');\nvar Iterators = require('../internals/iterators');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n","'use strict';\nvar bind = require('../internals/bind-context');\nvar toObject = require('../internals/to-object');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\n// `Array.from` method implementation\n// https://tc39.github.io/ecma262/#sec-array.from\nmodule.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var index = 0;\n var iteratorMethod = getIteratorMethod(O);\n var length, result, step, iterator;\n if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);\n // if the target is not iterable or it's an array with the default iterator - use a simple case\n if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {\n iterator = iteratorMethod.call(O);\n result = new C();\n for (;!(step = iterator.next()).done; index++) {\n createProperty(result, index, mapping\n ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true)\n : step.value\n );\n }\n } else {\n length = toLength(O.length);\n result = new C(length);\n for (;length > index; index++) {\n createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);\n }\n }\n result.length = index;\n return result;\n};\n","'use strict';\n// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js\nvar maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\nvar base = 36;\nvar tMin = 1;\nvar tMax = 26;\nvar skew = 38;\nvar damp = 700;\nvar initialBias = 72;\nvar initialN = 128; // 0x80\nvar delimiter = '-'; // '\\x2D'\nvar regexNonASCII = /[^\\0-\\u007E]/; // non-ASCII chars\nvar regexSeparators = /[.\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\nvar OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';\nvar baseMinusTMin = base - tMin;\nvar floor = Math.floor;\nvar stringFromCharCode = String.fromCharCode;\n\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.\n */\nvar ucs2decode = function (string) {\n var output = [];\n var counter = 0;\n var length = string.length;\n while (counter < length) {\n var value = string.charCodeAt(counter++);\n if (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n // It's a high surrogate, and there is a next character.\n var extra = string.charCodeAt(counter++);\n if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n } else {\n // It's an unmatched surrogate; only append this code unit, in case the\n // next code unit is the high surrogate of a surrogate pair.\n output.push(value);\n counter--;\n }\n } else {\n output.push(value);\n }\n }\n return output;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n */\nvar digitToBasic = function (digit) {\n // 0..25 map to ASCII a..z or A..Z\n // 26..35 map to ASCII 0..9\n return digit + 22 + 75 * (digit < 26);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n */\nvar adapt = function (delta, numPoints, firstTime) {\n var k = 0;\n delta = firstTime ? floor(delta / damp) : delta >> 1;\n delta += floor(delta / numPoints);\n for (; delta > baseMinusTMin * tMax >> 1; k += base) {\n delta = floor(delta / baseMinusTMin);\n }\n return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n */\n// eslint-disable-next-line max-statements\nvar encode = function (input) {\n var output = [];\n\n // Convert the input in UCS-2 to an array of Unicode code points.\n input = ucs2decode(input);\n\n // Cache the length.\n var inputLength = input.length;\n\n // Initialize the state.\n var n = initialN;\n var delta = 0;\n var bias = initialBias;\n var i, currentValue;\n\n // Handle the basic code points.\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue < 0x80) {\n output.push(stringFromCharCode(currentValue));\n }\n }\n\n var basicLength = output.length; // number of basic code points.\n var handledCPCount = basicLength; // number of code points that have been handled;\n\n // Finish the basic string with a delimiter unless it's empty.\n if (basicLength) {\n output.push(delimiter);\n }\n\n // Main encoding loop:\n while (handledCPCount < inputLength) {\n // All non-basic code points < n have been handled already. Find the next larger one:\n var m = maxInt;\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue >= n && currentValue < m) {\n m = currentValue;\n }\n }\n\n // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.\n var handledCPCountPlusOne = handledCPCount + 1;\n if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n throw RangeError(OVERFLOW_ERROR);\n }\n\n delta += (m - n) * handledCPCountPlusOne;\n n = m;\n\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue < n && ++delta > maxInt) {\n throw RangeError(OVERFLOW_ERROR);\n }\n if (currentValue == n) {\n // Represent delta as a generalized variable-length integer.\n var q = delta;\n for (var k = base; /* no condition */; k += base) {\n var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n if (q < t) break;\n var qMinusT = q - t;\n var baseMinusT = base - t;\n output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT)));\n q = floor(qMinusT / baseMinusT);\n }\n\n output.push(stringFromCharCode(digitToBasic(q)));\n bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n delta = 0;\n ++handledCPCount;\n }\n }\n\n ++delta;\n ++n;\n }\n return output.join('');\n};\n\nmodule.exports = function (input) {\n var encoded = [];\n var labels = input.toLowerCase().replace(regexSeparators, '\\u002E').split('.');\n var i, label;\n for (i = 0; i < labels.length; i++) {\n label = labels[i];\n encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label);\n }\n return encoded.join('.');\n};\n","var redefine = require('../internals/redefine');\n\nmodule.exports = function (target, src, options) {\n for (var key in src) redefine(target, key, src[key], options);\n return target;\n};\n","var anObject = require('../internals/an-object');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\nmodule.exports = function (it) {\n var iteratorMethod = getIteratorMethod(it);\n if (typeof iteratorMethod != 'function') {\n throw TypeError(String(it) + ' is not iterable');\n } return anObject(iteratorMethod.call(it));\n};\n","'use strict';\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\nrequire('../modules/es.array.iterator');\nvar $ = require('../internals/export');\nvar USE_NATIVE_URL = require('../internals/native-url');\nvar redefine = require('../internals/redefine');\nvar redefineAll = require('../internals/redefine-all');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar InternalStateModule = require('../internals/internal-state');\nvar anInstance = require('../internals/an-instance');\nvar hasOwn = require('../internals/has');\nvar bind = require('../internals/bind-context');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar URL_SEARCH_PARAMS = 'URLSearchParams';\nvar URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);\nvar getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);\n\nvar plus = /\\+/g;\nvar sequences = Array(4);\n\nvar percentSequence = function (bytes) {\n return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\\\da-f]{2}){' + bytes + '})', 'gi'));\n};\n\nvar percentDecode = function (sequence) {\n try {\n return decodeURIComponent(sequence);\n } catch (error) {\n return sequence;\n }\n};\n\nvar deserialize = function (it) {\n var result = it.replace(plus, ' ');\n var bytes = 4;\n try {\n return decodeURIComponent(result);\n } catch (error) {\n while (bytes) {\n result = result.replace(percentSequence(bytes--), percentDecode);\n }\n return result;\n }\n};\n\nvar find = /[!'()~]|%20/g;\n\nvar replace = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+'\n};\n\nvar replacer = function (match) {\n return replace[match];\n};\n\nvar serialize = function (it) {\n return encodeURIComponent(it).replace(find, replacer);\n};\n\nvar parseSearchParams = function (result, query) {\n if (query) {\n var attributes = query.split('&');\n var index = 0;\n var attribute, entry;\n while (index < attributes.length) {\n attribute = attributes[index++];\n if (attribute.length) {\n entry = attribute.split('=');\n result.push({\n key: deserialize(entry.shift()),\n value: deserialize(entry.join('='))\n });\n }\n }\n }\n};\n\nvar updateSearchParams = function (query) {\n this.entries.length = 0;\n parseSearchParams(this.entries, query);\n};\n\nvar validateArgumentsLength = function (passed, required) {\n if (passed < required) throw TypeError('Not enough arguments');\n};\n\nvar URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {\n setInternalState(this, {\n type: URL_SEARCH_PARAMS_ITERATOR,\n iterator: getIterator(getInternalParamsState(params).entries),\n kind: kind\n });\n}, 'Iterator', function next() {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var step = state.iterator.next();\n var entry = step.value;\n if (!step.done) {\n step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];\n } return step;\n});\n\n// `URLSearchParams` constructor\n// https://url.spec.whatwg.org/#interface-urlsearchparams\nvar URLSearchParamsConstructor = function URLSearchParams(/* init */) {\n anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n var init = arguments.length > 0 ? arguments[0] : undefined;\n var that = this;\n var entries = [];\n var iteratorMethod, iterator, step, entryIterator, first, second, key;\n\n setInternalState(that, {\n type: URL_SEARCH_PARAMS,\n entries: entries,\n updateURL: function () { /* empty */ },\n updateSearchParams: updateSearchParams\n });\n\n if (init !== undefined) {\n if (isObject(init)) {\n iteratorMethod = getIteratorMethod(init);\n if (typeof iteratorMethod === 'function') {\n iterator = iteratorMethod.call(init);\n while (!(step = iterator.next()).done) {\n entryIterator = getIterator(anObject(step.value));\n if (\n (first = entryIterator.next()).done ||\n (second = entryIterator.next()).done ||\n !entryIterator.next().done\n ) throw TypeError('Expected sequence with length 2');\n entries.push({ key: first.value + '', value: second.value + '' });\n }\n } else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: init[key] + '' });\n } else {\n parseSearchParams(entries, typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : init + '');\n }\n }\n};\n\nvar URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;\n\nredefineAll(URLSearchParamsPrototype, {\n // `URLSearchParams.prototype.appent` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-append\n append: function append(name, value) {\n validateArgumentsLength(arguments.length, 2);\n var state = getInternalParamsState(this);\n state.entries.push({ key: name + '', value: value + '' });\n state.updateURL();\n },\n // `URLSearchParams.prototype.delete` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-delete\n 'delete': function (name) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var key = name + '';\n var index = 0;\n while (index < entries.length) {\n if (entries[index].key === key) entries.splice(index, 1);\n else index++;\n }\n state.updateURL();\n },\n // `URLSearchParams.prototype.get` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-get\n get: function get(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = name + '';\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) return entries[index].value;\n }\n return null;\n },\n // `URLSearchParams.prototype.getAll` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-getall\n getAll: function getAll(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = name + '';\n var result = [];\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) result.push(entries[index].value);\n }\n return result;\n },\n // `URLSearchParams.prototype.has` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-has\n has: function has(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = name + '';\n var index = 0;\n while (index < entries.length) {\n if (entries[index++].key === key) return true;\n }\n return false;\n },\n // `URLSearchParams.prototype.set` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-set\n set: function set(name, value) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var found = false;\n var key = name + '';\n var val = value + '';\n var index = 0;\n var entry;\n for (; index < entries.length; index++) {\n entry = entries[index];\n if (entry.key === key) {\n if (found) entries.splice(index--, 1);\n else {\n found = true;\n entry.value = val;\n }\n }\n }\n if (!found) entries.push({ key: key, value: val });\n state.updateURL();\n },\n // `URLSearchParams.prototype.sort` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-sort\n sort: function sort() {\n var state = getInternalParamsState(this);\n var entries = state.entries;\n // Array#sort is not stable in some engines\n var slice = entries.slice();\n var entry, entriesIndex, sliceIndex;\n entries.length = 0;\n for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) {\n entry = slice[sliceIndex];\n for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) {\n if (entries[entriesIndex].key > entry.key) {\n entries.splice(entriesIndex, 0, entry);\n break;\n }\n }\n if (entriesIndex === sliceIndex) entries.push(entry);\n }\n state.updateURL();\n },\n // `URLSearchParams.prototype.forEach` method\n forEach: function forEach(callback /* , thisArg */) {\n var entries = getInternalParamsState(this).entries;\n var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3);\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n boundFunction(entry.value, entry.key, this);\n }\n },\n // `URLSearchParams.prototype.keys` method\n keys: function keys() {\n return new URLSearchParamsIterator(this, 'keys');\n },\n // `URLSearchParams.prototype.values` method\n values: function values() {\n return new URLSearchParamsIterator(this, 'values');\n },\n // `URLSearchParams.prototype.entries` method\n entries: function entries() {\n return new URLSearchParamsIterator(this, 'entries');\n }\n}, { enumerable: true });\n\n// `URLSearchParams.prototype[@@iterator]` method\nredefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries);\n\n// `URLSearchParams.prototype.toString` method\n// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior\nredefine(URLSearchParamsPrototype, 'toString', function toString() {\n var entries = getInternalParamsState(this).entries;\n var result = [];\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n result.push(serialize(entry.key) + '=' + serialize(entry.value));\n } return result.join('&');\n}, { enumerable: true });\n\nsetToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n\n$({ global: true, forced: !USE_NATIVE_URL }, {\n URLSearchParams: URLSearchParamsConstructor\n});\n\nmodule.exports = {\n URLSearchParams: URLSearchParamsConstructor,\n getState: getInternalParamsState\n};\n","'use strict';\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\nrequire('../modules/es.string.iterator');\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar USE_NATIVE_URL = require('../internals/native-url');\nvar global = require('../internals/global');\nvar defineProperties = require('../internals/object-define-properties');\nvar redefine = require('../internals/redefine');\nvar anInstance = require('../internals/an-instance');\nvar has = require('../internals/has');\nvar assign = require('../internals/object-assign');\nvar arrayFrom = require('../internals/array-from');\nvar codeAt = require('../internals/string-multibyte').codeAt;\nvar toASCII = require('../internals/punycode-to-ascii');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar URLSearchParamsModule = require('../modules/web.url-search-params');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar NativeURL = global.URL;\nvar URLSearchParams = URLSearchParamsModule.URLSearchParams;\nvar getInternalSearchParamsState = URLSearchParamsModule.getState;\nvar setInternalState = InternalStateModule.set;\nvar getInternalURLState = InternalStateModule.getterFor('URL');\nvar floor = Math.floor;\nvar pow = Math.pow;\n\nvar INVALID_AUTHORITY = 'Invalid authority';\nvar INVALID_SCHEME = 'Invalid scheme';\nvar INVALID_HOST = 'Invalid host';\nvar INVALID_PORT = 'Invalid port';\n\nvar ALPHA = /[A-Za-z]/;\nvar ALPHANUMERIC = /[\\d+\\-.A-Za-z]/;\nvar DIGIT = /\\d/;\nvar HEX_START = /^(0x|0X)/;\nvar OCT = /^[0-7]+$/;\nvar DEC = /^\\d+$/;\nvar HEX = /^[\\dA-Fa-f]+$/;\n// eslint-disable-next-line no-control-regex\nvar FORBIDDEN_HOST_CODE_POINT = /[\\u0000\\u0009\\u000A\\u000D #%/:?@[\\\\]]/;\n// eslint-disable-next-line no-control-regex\nvar FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\\u0000\\u0009\\u000A\\u000D #/:?@[\\\\]]/;\n// eslint-disable-next-line no-control-regex\nvar LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\\u0000-\\u001F ]+|[\\u0000-\\u001F ]+$/g;\n// eslint-disable-next-line no-control-regex\nvar TAB_AND_NEW_LINE = /[\\u0009\\u000A\\u000D]/g;\nvar EOF;\n\nvar parseHost = function (url, input) {\n var result, codePoints, index;\n if (input.charAt(0) == '[') {\n if (input.charAt(input.length - 1) != ']') return INVALID_HOST;\n result = parseIPv6(input.slice(1, -1));\n if (!result) return INVALID_HOST;\n url.host = result;\n // opaque host\n } else if (!isSpecial(url)) {\n if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST;\n result = '';\n codePoints = arrayFrom(input);\n for (index = 0; index < codePoints.length; index++) {\n result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);\n }\n url.host = result;\n } else {\n input = toASCII(input);\n if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST;\n result = parseIPv4(input);\n if (result === null) return INVALID_HOST;\n url.host = result;\n }\n};\n\nvar parseIPv4 = function (input) {\n var parts = input.split('.');\n var partsLength, numbers, index, part, radix, number, ipv4;\n if (parts.length && parts[parts.length - 1] == '') {\n parts.pop();\n }\n partsLength = parts.length;\n if (partsLength > 4) return input;\n numbers = [];\n for (index = 0; index < partsLength; index++) {\n part = parts[index];\n if (part == '') return input;\n radix = 10;\n if (part.length > 1 && part.charAt(0) == '0') {\n radix = HEX_START.test(part) ? 16 : 8;\n part = part.slice(radix == 8 ? 1 : 2);\n }\n if (part === '') {\n number = 0;\n } else {\n if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input;\n number = parseInt(part, radix);\n }\n numbers.push(number);\n }\n for (index = 0; index < partsLength; index++) {\n number = numbers[index];\n if (index == partsLength - 1) {\n if (number >= pow(256, 5 - partsLength)) return null;\n } else if (number > 255) return null;\n }\n ipv4 = numbers.pop();\n for (index = 0; index < numbers.length; index++) {\n ipv4 += numbers[index] * pow(256, 3 - index);\n }\n return ipv4;\n};\n\n// eslint-disable-next-line max-statements\nvar parseIPv6 = function (input) {\n var address = [0, 0, 0, 0, 0, 0, 0, 0];\n var pieceIndex = 0;\n var compress = null;\n var pointer = 0;\n var value, length, numbersSeen, ipv4Piece, number, swaps, swap;\n\n var char = function () {\n return input.charAt(pointer);\n };\n\n if (char() == ':') {\n if (input.charAt(1) != ':') return;\n pointer += 2;\n pieceIndex++;\n compress = pieceIndex;\n }\n while (char()) {\n if (pieceIndex == 8) return;\n if (char() == ':') {\n if (compress !== null) return;\n pointer++;\n pieceIndex++;\n compress = pieceIndex;\n continue;\n }\n value = length = 0;\n while (length < 4 && HEX.test(char())) {\n value = value * 16 + parseInt(char(), 16);\n pointer++;\n length++;\n }\n if (char() == '.') {\n if (length == 0) return;\n pointer -= length;\n if (pieceIndex > 6) return;\n numbersSeen = 0;\n while (char()) {\n ipv4Piece = null;\n if (numbersSeen > 0) {\n if (char() == '.' && numbersSeen < 4) pointer++;\n else return;\n }\n if (!DIGIT.test(char())) return;\n while (DIGIT.test(char())) {\n number = parseInt(char(), 10);\n if (ipv4Piece === null) ipv4Piece = number;\n else if (ipv4Piece == 0) return;\n else ipv4Piece = ipv4Piece * 10 + number;\n if (ipv4Piece > 255) return;\n pointer++;\n }\n address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;\n numbersSeen++;\n if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;\n }\n if (numbersSeen != 4) return;\n break;\n } else if (char() == ':') {\n pointer++;\n if (!char()) return;\n } else if (char()) return;\n address[pieceIndex++] = value;\n }\n if (compress !== null) {\n swaps = pieceIndex - compress;\n pieceIndex = 7;\n while (pieceIndex != 0 && swaps > 0) {\n swap = address[pieceIndex];\n address[pieceIndex--] = address[compress + swaps - 1];\n address[compress + --swaps] = swap;\n }\n } else if (pieceIndex != 8) return;\n return address;\n};\n\nvar findLongestZeroSequence = function (ipv6) {\n var maxIndex = null;\n var maxLength = 1;\n var currStart = null;\n var currLength = 0;\n var index = 0;\n for (; index < 8; index++) {\n if (ipv6[index] !== 0) {\n if (currLength > maxLength) {\n maxIndex = currStart;\n maxLength = currLength;\n }\n currStart = null;\n currLength = 0;\n } else {\n if (currStart === null) currStart = index;\n ++currLength;\n }\n }\n if (currLength > maxLength) {\n maxIndex = currStart;\n maxLength = currLength;\n }\n return maxIndex;\n};\n\nvar serializeHost = function (host) {\n var result, index, compress, ignore0;\n // ipv4\n if (typeof host == 'number') {\n result = [];\n for (index = 0; index < 4; index++) {\n result.unshift(host % 256);\n host = floor(host / 256);\n } return result.join('.');\n // ipv6\n } else if (typeof host == 'object') {\n result = '';\n compress = findLongestZeroSequence(host);\n for (index = 0; index < 8; index++) {\n if (ignore0 && host[index] === 0) continue;\n if (ignore0) ignore0 = false;\n if (compress === index) {\n result += index ? ':' : '::';\n ignore0 = true;\n } else {\n result += host[index].toString(16);\n if (index < 7) result += ':';\n }\n }\n return '[' + result + ']';\n } return host;\n};\n\nvar C0ControlPercentEncodeSet = {};\nvar fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {\n ' ': 1, '\"': 1, '<': 1, '>': 1, '`': 1\n});\nvar pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {\n '#': 1, '?': 1, '{': 1, '}': 1\n});\nvar userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {\n '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\\\': 1, ']': 1, '^': 1, '|': 1\n});\n\nvar percentEncode = function (char, set) {\n var code = codeAt(char, 0);\n return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char);\n};\n\nvar specialSchemes = {\n ftp: 21,\n file: null,\n gopher: 70,\n http: 80,\n https: 443,\n ws: 80,\n wss: 443\n};\n\nvar isSpecial = function (url) {\n return has(specialSchemes, url.scheme);\n};\n\nvar includesCredentials = function (url) {\n return url.username != '' || url.password != '';\n};\n\nvar cannotHaveUsernamePasswordPort = function (url) {\n return !url.host || url.cannotBeABaseURL || url.scheme == 'file';\n};\n\nvar isWindowsDriveLetter = function (string, normalized) {\n var second;\n return string.length == 2 && ALPHA.test(string.charAt(0))\n && ((second = string.charAt(1)) == ':' || (!normalized && second == '|'));\n};\n\nvar startsWithWindowsDriveLetter = function (string) {\n var third;\n return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && (\n string.length == 2 ||\n ((third = string.charAt(2)) === '/' || third === '\\\\' || third === '?' || third === '#')\n );\n};\n\nvar shortenURLsPath = function (url) {\n var path = url.path;\n var pathSize = path.length;\n if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {\n path.pop();\n }\n};\n\nvar isSingleDot = function (segment) {\n return segment === '.' || segment.toLowerCase() === '%2e';\n};\n\nvar isDoubleDot = function (segment) {\n segment = segment.toLowerCase();\n return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';\n};\n\n// States:\nvar SCHEME_START = {};\nvar SCHEME = {};\nvar NO_SCHEME = {};\nvar SPECIAL_RELATIVE_OR_AUTHORITY = {};\nvar PATH_OR_AUTHORITY = {};\nvar RELATIVE = {};\nvar RELATIVE_SLASH = {};\nvar SPECIAL_AUTHORITY_SLASHES = {};\nvar SPECIAL_AUTHORITY_IGNORE_SLASHES = {};\nvar AUTHORITY = {};\nvar HOST = {};\nvar HOSTNAME = {};\nvar PORT = {};\nvar FILE = {};\nvar FILE_SLASH = {};\nvar FILE_HOST = {};\nvar PATH_START = {};\nvar PATH = {};\nvar CANNOT_BE_A_BASE_URL_PATH = {};\nvar QUERY = {};\nvar FRAGMENT = {};\n\n// eslint-disable-next-line max-statements\nvar parseURL = function (url, input, stateOverride, base) {\n var state = stateOverride || SCHEME_START;\n var pointer = 0;\n var buffer = '';\n var seenAt = false;\n var seenBracket = false;\n var seenPasswordToken = false;\n var codePoints, char, bufferCodePoints, failure;\n\n if (!stateOverride) {\n url.scheme = '';\n url.username = '';\n url.password = '';\n url.host = null;\n url.port = null;\n url.path = [];\n url.query = null;\n url.fragment = null;\n url.cannotBeABaseURL = false;\n input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');\n }\n\n input = input.replace(TAB_AND_NEW_LINE, '');\n\n codePoints = arrayFrom(input);\n\n while (pointer <= codePoints.length) {\n char = codePoints[pointer];\n switch (state) {\n case SCHEME_START:\n if (char && ALPHA.test(char)) {\n buffer += char.toLowerCase();\n state = SCHEME;\n } else if (!stateOverride) {\n state = NO_SCHEME;\n continue;\n } else return INVALID_SCHEME;\n break;\n\n case SCHEME:\n if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) {\n buffer += char.toLowerCase();\n } else if (char == ':') {\n if (stateOverride && (\n (isSpecial(url) != has(specialSchemes, buffer)) ||\n (buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||\n (url.scheme == 'file' && !url.host)\n )) return;\n url.scheme = buffer;\n if (stateOverride) {\n if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null;\n return;\n }\n buffer = '';\n if (url.scheme == 'file') {\n state = FILE;\n } else if (isSpecial(url) && base && base.scheme == url.scheme) {\n state = SPECIAL_RELATIVE_OR_AUTHORITY;\n } else if (isSpecial(url)) {\n state = SPECIAL_AUTHORITY_SLASHES;\n } else if (codePoints[pointer + 1] == '/') {\n state = PATH_OR_AUTHORITY;\n pointer++;\n } else {\n url.cannotBeABaseURL = true;\n url.path.push('');\n state = CANNOT_BE_A_BASE_URL_PATH;\n }\n } else if (!stateOverride) {\n buffer = '';\n state = NO_SCHEME;\n pointer = 0;\n continue;\n } else return INVALID_SCHEME;\n break;\n\n case NO_SCHEME:\n if (!base || (base.cannotBeABaseURL && char != '#')) return INVALID_SCHEME;\n if (base.cannotBeABaseURL && char == '#') {\n url.scheme = base.scheme;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n url.cannotBeABaseURL = true;\n state = FRAGMENT;\n break;\n }\n state = base.scheme == 'file' ? FILE : RELATIVE;\n continue;\n\n case SPECIAL_RELATIVE_OR_AUTHORITY:\n if (char == '/' && codePoints[pointer + 1] == '/') {\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n pointer++;\n } else {\n state = RELATIVE;\n continue;\n } break;\n\n case PATH_OR_AUTHORITY:\n if (char == '/') {\n state = AUTHORITY;\n break;\n } else {\n state = PATH;\n continue;\n }\n\n case RELATIVE:\n url.scheme = base.scheme;\n if (char == EOF) {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = base.query;\n } else if (char == '/' || (char == '\\\\' && isSpecial(url))) {\n state = RELATIVE_SLASH;\n } else if (char == '?') {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n state = FRAGMENT;\n } else {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.path.pop();\n state = PATH;\n continue;\n } break;\n\n case RELATIVE_SLASH:\n if (isSpecial(url) && (char == '/' || char == '\\\\')) {\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n } else if (char == '/') {\n state = AUTHORITY;\n } else {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n state = PATH;\n continue;\n } break;\n\n case SPECIAL_AUTHORITY_SLASHES:\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n if (char != '/' || buffer.charAt(pointer + 1) != '/') continue;\n pointer++;\n break;\n\n case SPECIAL_AUTHORITY_IGNORE_SLASHES:\n if (char != '/' && char != '\\\\') {\n state = AUTHORITY;\n continue;\n } break;\n\n case AUTHORITY:\n if (char == '@') {\n if (seenAt) buffer = '%40' + buffer;\n seenAt = true;\n bufferCodePoints = arrayFrom(buffer);\n for (var i = 0; i < bufferCodePoints.length; i++) {\n var codePoint = bufferCodePoints[i];\n if (codePoint == ':' && !seenPasswordToken) {\n seenPasswordToken = true;\n continue;\n }\n var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);\n if (seenPasswordToken) url.password += encodedCodePoints;\n else url.username += encodedCodePoints;\n }\n buffer = '';\n } else if (\n char == EOF || char == '/' || char == '?' || char == '#' ||\n (char == '\\\\' && isSpecial(url))\n ) {\n if (seenAt && buffer == '') return INVALID_AUTHORITY;\n pointer -= arrayFrom(buffer).length + 1;\n buffer = '';\n state = HOST;\n } else buffer += char;\n break;\n\n case HOST:\n case HOSTNAME:\n if (stateOverride && url.scheme == 'file') {\n state = FILE_HOST;\n continue;\n } else if (char == ':' && !seenBracket) {\n if (buffer == '') return INVALID_HOST;\n failure = parseHost(url, buffer);\n if (failure) return failure;\n buffer = '';\n state = PORT;\n if (stateOverride == HOSTNAME) return;\n } else if (\n char == EOF || char == '/' || char == '?' || char == '#' ||\n (char == '\\\\' && isSpecial(url))\n ) {\n if (isSpecial(url) && buffer == '') return INVALID_HOST;\n if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return;\n failure = parseHost(url, buffer);\n if (failure) return failure;\n buffer = '';\n state = PATH_START;\n if (stateOverride) return;\n continue;\n } else {\n if (char == '[') seenBracket = true;\n else if (char == ']') seenBracket = false;\n buffer += char;\n } break;\n\n case PORT:\n if (DIGIT.test(char)) {\n buffer += char;\n } else if (\n char == EOF || char == '/' || char == '?' || char == '#' ||\n (char == '\\\\' && isSpecial(url)) ||\n stateOverride\n ) {\n if (buffer != '') {\n var port = parseInt(buffer, 10);\n if (port > 0xFFFF) return INVALID_PORT;\n url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port;\n buffer = '';\n }\n if (stateOverride) return;\n state = PATH_START;\n continue;\n } else return INVALID_PORT;\n break;\n\n case FILE:\n url.scheme = 'file';\n if (char == '/' || char == '\\\\') state = FILE_SLASH;\n else if (base && base.scheme == 'file') {\n if (char == EOF) {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = base.query;\n } else if (char == '?') {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n state = FRAGMENT;\n } else {\n if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {\n url.host = base.host;\n url.path = base.path.slice();\n shortenURLsPath(url);\n }\n state = PATH;\n continue;\n }\n } else {\n state = PATH;\n continue;\n } break;\n\n case FILE_SLASH:\n if (char == '/' || char == '\\\\') {\n state = FILE_HOST;\n break;\n }\n if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {\n if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]);\n else url.host = base.host;\n }\n state = PATH;\n continue;\n\n case FILE_HOST:\n if (char == EOF || char == '/' || char == '\\\\' || char == '?' || char == '#') {\n if (!stateOverride && isWindowsDriveLetter(buffer)) {\n state = PATH;\n } else if (buffer == '') {\n url.host = '';\n if (stateOverride) return;\n state = PATH_START;\n } else {\n failure = parseHost(url, buffer);\n if (failure) return failure;\n if (url.host == 'localhost') url.host = '';\n if (stateOverride) return;\n buffer = '';\n state = PATH_START;\n } continue;\n } else buffer += char;\n break;\n\n case PATH_START:\n if (isSpecial(url)) {\n state = PATH;\n if (char != '/' && char != '\\\\') continue;\n } else if (!stateOverride && char == '?') {\n url.query = '';\n state = QUERY;\n } else if (!stateOverride && char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (char != EOF) {\n state = PATH;\n if (char != '/') continue;\n } break;\n\n case PATH:\n if (\n char == EOF || char == '/' ||\n (char == '\\\\' && isSpecial(url)) ||\n (!stateOverride && (char == '?' || char == '#'))\n ) {\n if (isDoubleDot(buffer)) {\n shortenURLsPath(url);\n if (char != '/' && !(char == '\\\\' && isSpecial(url))) {\n url.path.push('');\n }\n } else if (isSingleDot(buffer)) {\n if (char != '/' && !(char == '\\\\' && isSpecial(url))) {\n url.path.push('');\n }\n } else {\n if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {\n if (url.host) url.host = '';\n buffer = buffer.charAt(0) + ':'; // normalize windows drive letter\n }\n url.path.push(buffer);\n }\n buffer = '';\n if (url.scheme == 'file' && (char == EOF || char == '?' || char == '#')) {\n while (url.path.length > 1 && url.path[0] === '') {\n url.path.shift();\n }\n }\n if (char == '?') {\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n }\n } else {\n buffer += percentEncode(char, pathPercentEncodeSet);\n } break;\n\n case CANNOT_BE_A_BASE_URL_PATH:\n if (char == '?') {\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (char != EOF) {\n url.path[0] += percentEncode(char, C0ControlPercentEncodeSet);\n } break;\n\n case QUERY:\n if (!stateOverride && char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (char != EOF) {\n if (char == \"'\" && isSpecial(url)) url.query += '%27';\n else if (char == '#') url.query += '%23';\n else url.query += percentEncode(char, C0ControlPercentEncodeSet);\n } break;\n\n case FRAGMENT:\n if (char != EOF) url.fragment += percentEncode(char, fragmentPercentEncodeSet);\n break;\n }\n\n pointer++;\n }\n};\n\n// `URL` constructor\n// https://url.spec.whatwg.org/#url-class\nvar URLConstructor = function URL(url /* , base */) {\n var that = anInstance(this, URLConstructor, 'URL');\n var base = arguments.length > 1 ? arguments[1] : undefined;\n var urlString = String(url);\n var state = setInternalState(that, { type: 'URL' });\n var baseState, failure;\n if (base !== undefined) {\n if (base instanceof URLConstructor) baseState = getInternalURLState(base);\n else {\n failure = parseURL(baseState = {}, String(base));\n if (failure) throw TypeError(failure);\n }\n }\n failure = parseURL(state, urlString, null, baseState);\n if (failure) throw TypeError(failure);\n var searchParams = state.searchParams = new URLSearchParams();\n var searchParamsState = getInternalSearchParamsState(searchParams);\n searchParamsState.updateSearchParams(state.query);\n searchParamsState.updateURL = function () {\n state.query = String(searchParams) || null;\n };\n if (!DESCRIPTORS) {\n that.href = serializeURL.call(that);\n that.origin = getOrigin.call(that);\n that.protocol = getProtocol.call(that);\n that.username = getUsername.call(that);\n that.password = getPassword.call(that);\n that.host = getHost.call(that);\n that.hostname = getHostname.call(that);\n that.port = getPort.call(that);\n that.pathname = getPathname.call(that);\n that.search = getSearch.call(that);\n that.searchParams = getSearchParams.call(that);\n that.hash = getHash.call(that);\n }\n};\n\nvar URLPrototype = URLConstructor.prototype;\n\nvar serializeURL = function () {\n var url = getInternalURLState(this);\n var scheme = url.scheme;\n var username = url.username;\n var password = url.password;\n var host = url.host;\n var port = url.port;\n var path = url.path;\n var query = url.query;\n var fragment = url.fragment;\n var output = scheme + ':';\n if (host !== null) {\n output += '//';\n if (includesCredentials(url)) {\n output += username + (password ? ':' + password : '') + '@';\n }\n output += serializeHost(host);\n if (port !== null) output += ':' + port;\n } else if (scheme == 'file') output += '//';\n output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';\n if (query !== null) output += '?' + query;\n if (fragment !== null) output += '#' + fragment;\n return output;\n};\n\nvar getOrigin = function () {\n var url = getInternalURLState(this);\n var scheme = url.scheme;\n var port = url.port;\n if (scheme == 'blob') try {\n return new URL(scheme.path[0]).origin;\n } catch (error) {\n return 'null';\n }\n if (scheme == 'file' || !isSpecial(url)) return 'null';\n return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : '');\n};\n\nvar getProtocol = function () {\n return getInternalURLState(this).scheme + ':';\n};\n\nvar getUsername = function () {\n return getInternalURLState(this).username;\n};\n\nvar getPassword = function () {\n return getInternalURLState(this).password;\n};\n\nvar getHost = function () {\n var url = getInternalURLState(this);\n var host = url.host;\n var port = url.port;\n return host === null ? ''\n : port === null ? serializeHost(host)\n : serializeHost(host) + ':' + port;\n};\n\nvar getHostname = function () {\n var host = getInternalURLState(this).host;\n return host === null ? '' : serializeHost(host);\n};\n\nvar getPort = function () {\n var port = getInternalURLState(this).port;\n return port === null ? '' : String(port);\n};\n\nvar getPathname = function () {\n var url = getInternalURLState(this);\n var path = url.path;\n return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';\n};\n\nvar getSearch = function () {\n var query = getInternalURLState(this).query;\n return query ? '?' + query : '';\n};\n\nvar getSearchParams = function () {\n return getInternalURLState(this).searchParams;\n};\n\nvar getHash = function () {\n var fragment = getInternalURLState(this).fragment;\n return fragment ? '#' + fragment : '';\n};\n\nvar accessorDescriptor = function (getter, setter) {\n return { get: getter, set: setter, configurable: true, enumerable: true };\n};\n\nif (DESCRIPTORS) {\n defineProperties(URLPrototype, {\n // `URL.prototype.href` accessors pair\n // https://url.spec.whatwg.org/#dom-url-href\n href: accessorDescriptor(serializeURL, function (href) {\n var url = getInternalURLState(this);\n var urlString = String(href);\n var failure = parseURL(url, urlString);\n if (failure) throw TypeError(failure);\n getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);\n }),\n // `URL.prototype.origin` getter\n // https://url.spec.whatwg.org/#dom-url-origin\n origin: accessorDescriptor(getOrigin),\n // `URL.prototype.protocol` accessors pair\n // https://url.spec.whatwg.org/#dom-url-protocol\n protocol: accessorDescriptor(getProtocol, function (protocol) {\n var url = getInternalURLState(this);\n parseURL(url, String(protocol) + ':', SCHEME_START);\n }),\n // `URL.prototype.username` accessors pair\n // https://url.spec.whatwg.org/#dom-url-username\n username: accessorDescriptor(getUsername, function (username) {\n var url = getInternalURLState(this);\n var codePoints = arrayFrom(String(username));\n if (cannotHaveUsernamePasswordPort(url)) return;\n url.username = '';\n for (var i = 0; i < codePoints.length; i++) {\n url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n }\n }),\n // `URL.prototype.password` accessors pair\n // https://url.spec.whatwg.org/#dom-url-password\n password: accessorDescriptor(getPassword, function (password) {\n var url = getInternalURLState(this);\n var codePoints = arrayFrom(String(password));\n if (cannotHaveUsernamePasswordPort(url)) return;\n url.password = '';\n for (var i = 0; i < codePoints.length; i++) {\n url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n }\n }),\n // `URL.prototype.host` accessors pair\n // https://url.spec.whatwg.org/#dom-url-host\n host: accessorDescriptor(getHost, function (host) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n parseURL(url, String(host), HOST);\n }),\n // `URL.prototype.hostname` accessors pair\n // https://url.spec.whatwg.org/#dom-url-hostname\n hostname: accessorDescriptor(getHostname, function (hostname) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n parseURL(url, String(hostname), HOSTNAME);\n }),\n // `URL.prototype.port` accessors pair\n // https://url.spec.whatwg.org/#dom-url-port\n port: accessorDescriptor(getPort, function (port) {\n var url = getInternalURLState(this);\n if (cannotHaveUsernamePasswordPort(url)) return;\n port = String(port);\n if (port == '') url.port = null;\n else parseURL(url, port, PORT);\n }),\n // `URL.prototype.pathname` accessors pair\n // https://url.spec.whatwg.org/#dom-url-pathname\n pathname: accessorDescriptor(getPathname, function (pathname) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n url.path = [];\n parseURL(url, pathname + '', PATH_START);\n }),\n // `URL.prototype.search` accessors pair\n // https://url.spec.whatwg.org/#dom-url-search\n search: accessorDescriptor(getSearch, function (search) {\n var url = getInternalURLState(this);\n search = String(search);\n if (search == '') {\n url.query = null;\n } else {\n if ('?' == search.charAt(0)) search = search.slice(1);\n url.query = '';\n parseURL(url, search, QUERY);\n }\n getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);\n }),\n // `URL.prototype.searchParams` getter\n // https://url.spec.whatwg.org/#dom-url-searchparams\n searchParams: accessorDescriptor(getSearchParams),\n // `URL.prototype.hash` accessors pair\n // https://url.spec.whatwg.org/#dom-url-hash\n hash: accessorDescriptor(getHash, function (hash) {\n var url = getInternalURLState(this);\n hash = String(hash);\n if (hash == '') {\n url.fragment = null;\n return;\n }\n if ('#' == hash.charAt(0)) hash = hash.slice(1);\n url.fragment = '';\n parseURL(url, hash, FRAGMENT);\n })\n });\n}\n\n// `URL.prototype.toJSON` method\n// https://url.spec.whatwg.org/#dom-url-tojson\nredefine(URLPrototype, 'toJSON', function toJSON() {\n return serializeURL.call(this);\n}, { enumerable: true });\n\n// `URL.prototype.toString` method\n// https://url.spec.whatwg.org/#URL-stringification-behavior\nredefine(URLPrototype, 'toString', function toString() {\n return serializeURL.call(this);\n}, { enumerable: true });\n\nif (NativeURL) {\n var nativeCreateObjectURL = NativeURL.createObjectURL;\n var nativeRevokeObjectURL = NativeURL.revokeObjectURL;\n // `URL.createObjectURL` method\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL\n // eslint-disable-next-line no-unused-vars\n if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) {\n return nativeCreateObjectURL.apply(NativeURL, arguments);\n });\n // `URL.revokeObjectURL` method\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL\n // eslint-disable-next-line no-unused-vars\n if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) {\n return nativeRevokeObjectURL.apply(NativeURL, arguments);\n });\n}\n\nsetToStringTag(URLConstructor, 'URL');\n\n$({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {\n URL: URLConstructor\n});\n","(function(global) {\r\n /**\r\n * Polyfill URLSearchParams\r\n *\r\n * Inspired from : https://github.com/WebReflection/url-search-params/blob/master/src/url-search-params.js\r\n */\r\n\r\n var checkIfIteratorIsSupported = function() {\r\n try {\r\n return !!Symbol.iterator;\r\n } catch (error) {\r\n return false;\r\n }\r\n };\r\n\r\n\r\n var iteratorSupported = checkIfIteratorIsSupported();\r\n\r\n var createIterator = function(items) {\r\n var iterator = {\r\n next: function() {\r\n var value = items.shift();\r\n return { done: value === void 0, value: value };\r\n }\r\n };\r\n\r\n if (iteratorSupported) {\r\n iterator[Symbol.iterator] = function() {\r\n return iterator;\r\n };\r\n }\r\n\r\n return iterator;\r\n };\r\n\r\n /**\r\n * Search param name and values should be encoded according to https://url.spec.whatwg.org/#urlencoded-serializing\r\n * encodeURIComponent() produces the same result except encoding spaces as `%20` instead of `+`.\r\n */\r\n var serializeParam = function(value) {\r\n return encodeURIComponent(value).replace(/%20/g, '+');\r\n };\r\n\r\n var deserializeParam = function(value) {\r\n return decodeURIComponent(String(value).replace(/\\+/g, ' '));\r\n };\r\n\r\n var polyfillURLSearchParams = function() {\r\n\r\n var URLSearchParams = function(searchString) {\r\n Object.defineProperty(this, '_entries', { writable: true, value: {} });\r\n var typeofSearchString = typeof searchString;\r\n\r\n if (typeofSearchString === 'undefined') {\r\n // do nothing\r\n } else if (typeofSearchString === 'string') {\r\n if (searchString !== '') {\r\n this._fromString(searchString);\r\n }\r\n } else if (searchString instanceof URLSearchParams) {\r\n var _this = this;\r\n searchString.forEach(function(value, name) {\r\n _this.append(name, value);\r\n });\r\n } else if ((searchString !== null) && (typeofSearchString === 'object')) {\r\n if (Object.prototype.toString.call(searchString) === '[object Array]') {\r\n for (var i = 0; i < searchString.length; i++) {\r\n var entry = searchString[i];\r\n if ((Object.prototype.toString.call(entry) === '[object Array]') || (entry.length !== 2)) {\r\n this.append(entry[0], entry[1]);\r\n } else {\r\n throw new TypeError('Expected [string, any] as entry at index ' + i + ' of URLSearchParams\\'s input');\r\n }\r\n }\r\n } else {\r\n for (var key in searchString) {\r\n if (searchString.hasOwnProperty(key)) {\r\n this.append(key, searchString[key]);\r\n }\r\n }\r\n }\r\n } else {\r\n throw new TypeError('Unsupported input\\'s type for URLSearchParams');\r\n }\r\n };\r\n\r\n var proto = URLSearchParams.prototype;\r\n\r\n proto.append = function(name, value) {\r\n if (name in this._entries) {\r\n this._entries[name].push(String(value));\r\n } else {\r\n this._entries[name] = [String(value)];\r\n }\r\n };\r\n\r\n proto.delete = function(name) {\r\n delete this._entries[name];\r\n };\r\n\r\n proto.get = function(name) {\r\n return (name in this._entries) ? this._entries[name][0] : null;\r\n };\r\n\r\n proto.getAll = function(name) {\r\n return (name in this._entries) ? this._entries[name].slice(0) : [];\r\n };\r\n\r\n proto.has = function(name) {\r\n return (name in this._entries);\r\n };\r\n\r\n proto.set = function(name, value) {\r\n this._entries[name] = [String(value)];\r\n };\r\n\r\n proto.forEach = function(callback, thisArg) {\r\n var entries;\r\n for (var name in this._entries) {\r\n if (this._entries.hasOwnProperty(name)) {\r\n entries = this._entries[name];\r\n for (var i = 0; i < entries.length; i++) {\r\n callback.call(thisArg, entries[i], name, this);\r\n }\r\n }\r\n }\r\n };\r\n\r\n proto.keys = function() {\r\n var items = [];\r\n this.forEach(function(value, name) {\r\n items.push(name);\r\n });\r\n return createIterator(items);\r\n };\r\n\r\n proto.values = function() {\r\n var items = [];\r\n this.forEach(function(value) {\r\n items.push(value);\r\n });\r\n return createIterator(items);\r\n };\r\n\r\n proto.entries = function() {\r\n var items = [];\r\n this.forEach(function(value, name) {\r\n items.push([name, value]);\r\n });\r\n return createIterator(items);\r\n };\r\n\r\n if (iteratorSupported) {\r\n proto[Symbol.iterator] = proto.entries;\r\n }\r\n\r\n proto.toString = function() {\r\n var searchArray = [];\r\n this.forEach(function(value, name) {\r\n searchArray.push(serializeParam(name) + '=' + serializeParam(value));\r\n });\r\n return searchArray.join('&');\r\n };\r\n\r\n\r\n global.URLSearchParams = URLSearchParams;\r\n };\r\n\r\n if (!('URLSearchParams' in global) || (new global.URLSearchParams('?a=1').toString() !== 'a=1')) {\r\n polyfillURLSearchParams();\r\n }\r\n\r\n var proto = global.URLSearchParams.prototype;\r\n\r\n if (typeof proto.sort !== 'function') {\r\n proto.sort = function() {\r\n var _this = this;\r\n var items = [];\r\n this.forEach(function(value, name) {\r\n items.push([name, value]);\r\n if (!_this._entries) {\r\n _this.delete(name);\r\n }\r\n });\r\n items.sort(function(a, b) {\r\n if (a[0] < b[0]) {\r\n return -1;\r\n } else if (a[0] > b[0]) {\r\n return +1;\r\n } else {\r\n return 0;\r\n }\r\n });\r\n if (_this._entries) { // force reset because IE keeps keys index\r\n _this._entries = {};\r\n }\r\n for (var i = 0; i < items.length; i++) {\r\n this.append(items[i][0], items[i][1]);\r\n }\r\n };\r\n }\r\n\r\n if (typeof proto._fromString !== 'function') {\r\n Object.defineProperty(proto, '_fromString', {\r\n enumerable: false,\r\n configurable: false,\r\n writable: false,\r\n value: function(searchString) {\r\n if (this._entries) {\r\n this._entries = {};\r\n } else {\r\n var keys = [];\r\n this.forEach(function(value, name) {\r\n keys.push(name);\r\n });\r\n for (var i = 0; i < keys.length; i++) {\r\n this.delete(keys[i]);\r\n }\r\n }\r\n\r\n searchString = searchString.replace(/^\\?/, '');\r\n var attributes = searchString.split('&');\r\n var attribute;\r\n for (var i = 0; i < attributes.length; i++) {\r\n attribute = attributes[i].split('=');\r\n this.append(\r\n deserializeParam(attribute[0]),\r\n (attribute.length > 1) ? deserializeParam(attribute[1]) : ''\r\n );\r\n }\r\n }\r\n });\r\n }\r\n\r\n // HTMLAnchorElement\r\n\r\n})(\r\n (typeof global !== 'undefined') ? global\r\n : ((typeof window !== 'undefined') ? window\r\n : ((typeof self !== 'undefined') ? self : this))\r\n);\r\n\r\n(function(global) {\r\n /**\r\n * Polyfill URL\r\n *\r\n * Inspired from : https://github.com/arv/DOM-URL-Polyfill/blob/master/src/url.js\r\n */\r\n\r\n var checkIfURLIsSupported = function() {\r\n try {\r\n var u = new global.URL('b', 'http://a');\r\n u.pathname = 'c%20d';\r\n return (u.href === 'http://a/c%20d') && u.searchParams;\r\n } catch (e) {\r\n return false;\r\n }\r\n };\r\n\r\n\r\n var polyfillURL = function() {\r\n var _URL = global.URL;\r\n\r\n var URL = function(url, base) {\r\n if (typeof url !== 'string') url = String(url);\r\n\r\n // Only create another document if the base is different from current location.\r\n var doc = document, baseElement;\r\n if (base && (global.location === void 0 || base !== global.location.href)) {\r\n doc = document.implementation.createHTMLDocument('');\r\n baseElement = doc.createElement('base');\r\n baseElement.href = base;\r\n doc.head.appendChild(baseElement);\r\n try {\r\n if (baseElement.href.indexOf(base) !== 0) throw new Error(baseElement.href);\r\n } catch (err) {\r\n throw new Error('URL unable to set base ' + base + ' due to ' + err);\r\n }\r\n }\r\n\r\n var anchorElement = doc.createElement('a');\r\n anchorElement.href = url;\r\n if (baseElement) {\r\n doc.body.appendChild(anchorElement);\r\n anchorElement.href = anchorElement.href; // force href to refresh\r\n }\r\n\r\n if (anchorElement.protocol === ':' || !/:/.test(anchorElement.href)) {\r\n throw new TypeError('Invalid URL');\r\n }\r\n\r\n Object.defineProperty(this, '_anchorElement', {\r\n value: anchorElement\r\n });\r\n\r\n\r\n // create a linked searchParams which reflect its changes on URL\r\n var searchParams = new global.URLSearchParams(this.search);\r\n var enableSearchUpdate = true;\r\n var enableSearchParamsUpdate = true;\r\n var _this = this;\r\n ['append', 'delete', 'set'].forEach(function(methodName) {\r\n var method = searchParams[methodName];\r\n searchParams[methodName] = function() {\r\n method.apply(searchParams, arguments);\r\n if (enableSearchUpdate) {\r\n enableSearchParamsUpdate = false;\r\n _this.search = searchParams.toString();\r\n enableSearchParamsUpdate = true;\r\n }\r\n };\r\n });\r\n\r\n Object.defineProperty(this, 'searchParams', {\r\n value: searchParams,\r\n enumerable: true\r\n });\r\n\r\n var search = void 0;\r\n Object.defineProperty(this, '_updateSearchParams', {\r\n enumerable: false,\r\n configurable: false,\r\n writable: false,\r\n value: function() {\r\n if (this.search !== search) {\r\n search = this.search;\r\n if (enableSearchParamsUpdate) {\r\n enableSearchUpdate = false;\r\n this.searchParams._fromString(this.search);\r\n enableSearchUpdate = true;\r\n }\r\n }\r\n }\r\n });\r\n };\r\n\r\n var proto = URL.prototype;\r\n\r\n var linkURLWithAnchorAttribute = function(attributeName) {\r\n Object.defineProperty(proto, attributeName, {\r\n get: function() {\r\n return this._anchorElement[attributeName];\r\n },\r\n set: function(value) {\r\n this._anchorElement[attributeName] = value;\r\n },\r\n enumerable: true\r\n });\r\n };\r\n\r\n ['hash', 'host', 'hostname', 'port', 'protocol']\r\n .forEach(function(attributeName) {\r\n linkURLWithAnchorAttribute(attributeName);\r\n });\r\n\r\n Object.defineProperty(proto, 'search', {\r\n get: function() {\r\n return this._anchorElement['search'];\r\n },\r\n set: function(value) {\r\n this._anchorElement['search'] = value;\r\n this._updateSearchParams();\r\n },\r\n enumerable: true\r\n });\r\n\r\n Object.defineProperties(proto, {\r\n\r\n 'toString': {\r\n get: function() {\r\n var _this = this;\r\n return function() {\r\n return _this.href;\r\n };\r\n }\r\n },\r\n\r\n 'href': {\r\n get: function() {\r\n return this._anchorElement.href.replace(/\\?$/, '');\r\n },\r\n set: function(value) {\r\n this._anchorElement.href = value;\r\n this._updateSearchParams();\r\n },\r\n enumerable: true\r\n },\r\n\r\n 'pathname': {\r\n get: function() {\r\n return this._anchorElement.pathname.replace(/(^\\/?)/, '/');\r\n },\r\n set: function(value) {\r\n this._anchorElement.pathname = value;\r\n },\r\n enumerable: true\r\n },\r\n\r\n 'origin': {\r\n get: function() {\r\n // get expected port from protocol\r\n var expectedPort = { 'http:': 80, 'https:': 443, 'ftp:': 21 }[this._anchorElement.protocol];\r\n // add port to origin if, expected port is different than actual port\r\n // and it is not empty f.e http://foo:8080\r\n // 8080 != 80 && 8080 != ''\r\n var addPortToOrigin = this._anchorElement.port != expectedPort &&\r\n this._anchorElement.port !== '';\r\n\r\n return this._anchorElement.protocol +\r\n '//' +\r\n this._anchorElement.hostname +\r\n (addPortToOrigin ? (':' + this._anchorElement.port) : '');\r\n },\r\n enumerable: true\r\n },\r\n\r\n 'password': { // TODO\r\n get: function() {\r\n return '';\r\n },\r\n set: function(value) {\r\n },\r\n enumerable: true\r\n },\r\n\r\n 'username': { // TODO\r\n get: function() {\r\n return '';\r\n },\r\n set: function(value) {\r\n },\r\n enumerable: true\r\n },\r\n });\r\n\r\n URL.createObjectURL = function(blob) {\r\n return _URL.createObjectURL.apply(_URL, arguments);\r\n };\r\n\r\n URL.revokeObjectURL = function(url) {\r\n return _URL.revokeObjectURL.apply(_URL, arguments);\r\n };\r\n\r\n global.URL = URL;\r\n\r\n };\r\n\r\n if (!checkIfURLIsSupported()) {\r\n polyfillURL();\r\n }\r\n\r\n if ((global.location !== void 0) && !('origin' in global.location)) {\r\n var getOrigin = function() {\r\n return global.location.protocol + '//' + global.location.hostname + (global.location.port ? (':' + global.location.port) : '');\r\n };\r\n\r\n try {\r\n Object.defineProperty(global.location, 'origin', {\r\n get: getOrigin,\r\n enumerable: true\r\n });\r\n } catch (e) {\r\n setInterval(function() {\r\n global.location.origin = getOrigin();\r\n }, 100);\r\n }\r\n }\r\n\r\n})(\r\n (typeof global !== 'undefined') ? global\r\n : ((typeof window !== 'undefined') ? window\r\n : ((typeof self !== 'undefined') ? self : this))\r\n);\r\n","'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isArray = require('../internals/is-array');\nvar isObject = require('../internals/is-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';\n\nvar IS_CONCAT_SPREADABLE_SUPPORT = !fails(function () {\n var array = [];\n array[IS_CONCAT_SPREADABLE] = false;\n return array.concat()[0] !== array;\n});\n\nvar SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');\n\nvar isConcatSpreadable = function (O) {\n if (!isObject(O)) return false;\n var spreadable = O[IS_CONCAT_SPREADABLE];\n return spreadable !== undefined ? !!spreadable : isArray(O);\n};\n\nvar FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;\n\n// `Array.prototype.concat` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.concat\n// with adding support of @@isConcatSpreadable and @@species\n$({ target: 'Array', proto: true, forced: FORCED }, {\n concat: function concat(arg) { // eslint-disable-line no-unused-vars\n var O = toObject(this);\n var A = arraySpeciesCreate(O, 0);\n var n = 0;\n var i, k, length, len, E;\n for (i = -1, length = arguments.length; i < length; i++) {\n E = i === -1 ? O : arguments[i];\n if (isConcatSpreadable(E)) {\n len = toLength(E.length);\n if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);\n } else {\n if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n createProperty(A, n++, E);\n }\n }\n A.length = n;\n return A;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $filter = require('../internals/array-iteration').filter;\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\n// `Array.prototype.filter` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.filter\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('filter') }, {\n filter: function filter(callbackfn /* , thisArg */) {\n return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $find = require('../internals/array-iteration').find;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\nvar FIND = 'find';\nvar SKIPS_HOLES = true;\n\n// Shouldn't skip holes\nif (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });\n\n// `Array.prototype.find` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.find\n$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {\n find: function find(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables(FIND);\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line no-throw-literal\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n","var $ = require('../internals/export');\nvar from = require('../internals/array-from');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\n\nvar INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {\n Array.from(iterable);\n});\n\n// `Array.from` method\n// https://tc39.github.io/ecma262/#sec-array.from\n$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {\n from: from\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $includes = require('../internals/array-includes').includes;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// `Array.prototype.includes` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.includes\n$({ target: 'Array', proto: true }, {\n includes: function includes(el /* , fromIndex = 0 */) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('includes');\n","'use strict';\nvar $ = require('../internals/export');\nvar $map = require('../internals/array-iteration').map;\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\n// `Array.prototype.map` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.map\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('map') }, {\n map: function map(callbackfn /* , thisArg */) {\n return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","var isObject = require('../internals/is-object');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\n// makes subclassing work correct for wrapped built-ins\nmodule.exports = function ($this, dummy, Wrapper) {\n var NewTarget, NewTargetPrototype;\n if (\n // it can work only with native `setPrototypeOf`\n setPrototypeOf &&\n // we haven't completely correct pre-ES6 way for getting `new.target`, so use this\n typeof (NewTarget = dummy.constructor) == 'function' &&\n NewTarget !== Wrapper &&\n isObject(NewTargetPrototype = NewTarget.prototype) &&\n NewTargetPrototype !== Wrapper.prototype\n ) setPrototypeOf($this, NewTargetPrototype);\n return $this;\n};\n","// a string of all valid unicode whitespaces\n// eslint-disable-next-line max-len\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n","var requireObjectCoercible = require('../internals/require-object-coercible');\nvar whitespaces = require('../internals/whitespaces');\n\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n return function ($this) {\n var string = String(requireObjectCoercible($this));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n };\n};\n\nmodule.exports = {\n // `String.prototype.{ trimLeft, trimStart }` methods\n // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart\n start: createMethod(1),\n // `String.prototype.{ trimRight, trimEnd }` methods\n // https://tc39.github.io/ecma262/#sec-string.prototype.trimend\n end: createMethod(2),\n // `String.prototype.trim` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.trim\n trim: createMethod(3)\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar redefine = require('../internals/redefine');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof-raw');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar toPrimitive = require('../internals/to-primitive');\nvar fails = require('../internals/fails');\nvar create = require('../internals/object-create');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar trim = require('../internals/string-trim').trim;\n\nvar NUMBER = 'Number';\nvar NativeNumber = global[NUMBER];\nvar NumberPrototype = NativeNumber.prototype;\n\n// Opera ~12 has broken Object#toString\nvar BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER;\n\n// `ToNumber` abstract operation\n// https://tc39.github.io/ecma262/#sec-tonumber\nvar toNumber = function (argument) {\n var it = toPrimitive(argument, false);\n var first, third, radix, maxCode, digits, length, index, code;\n if (typeof it == 'string' && it.length > 2) {\n it = trim(it);\n first = it.charCodeAt(0);\n if (first === 43 || first === 45) {\n third = it.charCodeAt(2);\n if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if (first === 48) {\n switch (it.charCodeAt(1)) {\n case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i\n case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i\n default: return +it;\n }\n digits = it.slice(2);\n length = digits.length;\n for (index = 0; index < length; index++) {\n code = digits.charCodeAt(index);\n // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n if (code < 48 || code > maxCode) return NaN;\n } return parseInt(digits, radix);\n }\n } return +it;\n};\n\n// `Number` constructor\n// https://tc39.github.io/ecma262/#sec-number-constructor\nif (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {\n var NumberWrapper = function Number(value) {\n var it = arguments.length < 1 ? 0 : value;\n var dummy = this;\n return dummy instanceof NumberWrapper\n // check on 1..constructor(foo) case\n && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER)\n ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);\n };\n for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (\n // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +\n // ES2015 (in case, if modules with ES2015 Number statics required before):\n 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +\n 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'\n ).split(','), j = 0, key; keys.length > j; j++) {\n if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) {\n defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));\n }\n }\n NumberWrapper.prototype = NumberPrototype;\n NumberPrototype.constructor = NumberWrapper;\n redefine(global, NUMBER, NumberWrapper);\n}\n","var $ = require('../internals/export');\nvar toObject = require('../internals/to-object');\nvar nativeKeys = require('../internals/object-keys');\nvar fails = require('../internals/fails');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });\n\n// `Object.keys` method\n// https://tc39.github.io/ecma262/#sec-object.keys\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n keys: function keys(it) {\n return nativeKeys(toObject(it));\n }\n});\n","var isRegExp = require('../internals/is-regexp');\n\nmodule.exports = function (it) {\n if (isRegExp(it)) {\n throw TypeError(\"The method doesn't accept regular expressions\");\n } return it;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\nmodule.exports = function (METHOD_NAME) {\n var regexp = /./;\n try {\n '/./'[METHOD_NAME](regexp);\n } catch (e) {\n try {\n regexp[MATCH] = false;\n return '/./'[METHOD_NAME](regexp);\n } catch (f) { /* empty */ }\n } return false;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\n\n// `String.prototype.includes` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.includes\n$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {\n includes: function includes(searchString /* , position = 0 */) {\n return !!~String(requireObjectCoercible(this))\n .indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n return Object.isExtensible(Object.preventExtensions({}));\n});\n","var hiddenKeys = require('../internals/hidden-keys');\nvar isObject = require('../internals/is-object');\nvar has = require('../internals/has');\nvar defineProperty = require('../internals/object-define-property').f;\nvar uid = require('../internals/uid');\nvar FREEZING = require('../internals/freezing');\n\nvar METADATA = uid('meta');\nvar id = 0;\n\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\n\nvar setMetadata = function (it) {\n defineProperty(it, METADATA, { value: {\n objectID: 'O' + ++id, // object ID\n weakData: {} // weak collections IDs\n } });\n};\n\nvar fastKey = function (it, create) {\n // return a primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMetadata(it);\n // return object ID\n } return it[METADATA].objectID;\n};\n\nvar getWeakData = function (it, create) {\n if (!has(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMetadata(it);\n // return the store of weak collections IDs\n } return it[METADATA].weakData;\n};\n\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);\n return it;\n};\n\nvar meta = module.exports = {\n REQUIRED: false,\n fastKey: fastKey,\n getWeakData: getWeakData,\n onFreeze: onFreeze\n};\n\nhiddenKeys[METADATA] = true;\n","var anObject = require('../internals/an-object');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar bind = require('../internals/bind-context');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nvar iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {\n var boundFunction = bind(fn, that, AS_ENTRIES ? 2 : 1);\n var iterator, iterFn, index, length, result, step;\n\n if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (typeof iterFn != 'function') throw TypeError('Target is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = toLength(iterable.length); length > index; index++) {\n result = AS_ENTRIES\n ? boundFunction(anObject(step = iterable[index])[0], step[1])\n : boundFunction(iterable[index]);\n if (result && result instanceof Result) return result;\n } return new Result(false);\n }\n iterator = iterFn.call(iterable);\n }\n\n while (!(step = iterator.next()).done) {\n result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES);\n if (result && result instanceof Result) return result;\n } return new Result(false);\n};\n\niterate.stop = function (result) {\n return new Result(true, result);\n};\n","'use strict';\nvar redefineAll = require('../internals/redefine-all');\nvar getWeakData = require('../internals/internal-metadata').getWeakData;\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar anInstance = require('../internals/an-instance');\nvar iterate = require('../internals/iterate');\nvar ArrayIterationModule = require('../internals/array-iteration');\nvar $has = require('../internals/has');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\nvar find = ArrayIterationModule.find;\nvar findIndex = ArrayIterationModule.findIndex;\nvar id = 0;\n\n// fallback for uncaught frozen keys\nvar uncaughtFrozenStore = function (store) {\n return store.frozen || (store.frozen = new UncaughtFrozenStore());\n};\n\nvar UncaughtFrozenStore = function () {\n this.entries = [];\n};\n\nvar findUncaughtFrozen = function (store, key) {\n return find(store.entries, function (it) {\n return it[0] === key;\n });\n};\n\nUncaughtFrozenStore.prototype = {\n get: function (key) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) return entry[1];\n },\n has: function (key) {\n return !!findUncaughtFrozen(this, key);\n },\n set: function (key, value) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) entry[1] = value;\n else this.entries.push([key, value]);\n },\n 'delete': function (key) {\n var index = findIndex(this.entries, function (it) {\n return it[0] === key;\n });\n if (~index) this.entries.splice(index, 1);\n return !!~index;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, CONSTRUCTOR_NAME);\n setInternalState(that, {\n type: CONSTRUCTOR_NAME,\n id: id++,\n frozen: undefined\n });\n if (iterable != undefined) iterate(iterable, that[ADDER], that, IS_MAP);\n });\n\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n var define = function (that, key, value) {\n var state = getInternalState(that);\n var data = getWeakData(anObject(key), true);\n if (data === true) uncaughtFrozenStore(state).set(key, value);\n else data[state.id] = value;\n return that;\n };\n\n redefineAll(C.prototype, {\n // 23.3.3.2 WeakMap.prototype.delete(key)\n // 23.4.3.3 WeakSet.prototype.delete(value)\n 'delete': function (key) {\n var state = getInternalState(this);\n if (!isObject(key)) return false;\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state)['delete'](key);\n return data && $has(data, state.id) && delete data[state.id];\n },\n // 23.3.3.4 WeakMap.prototype.has(key)\n // 23.4.3.4 WeakSet.prototype.has(value)\n has: function has(key) {\n var state = getInternalState(this);\n if (!isObject(key)) return false;\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state).has(key);\n return data && $has(data, state.id);\n }\n });\n\n redefineAll(C.prototype, IS_MAP ? {\n // 23.3.3.3 WeakMap.prototype.get(key)\n get: function get(key) {\n var state = getInternalState(this);\n if (isObject(key)) {\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state).get(key);\n return data ? data[state.id] : undefined;\n }\n },\n // 23.3.3.5 WeakMap.prototype.set(key, value)\n set: function set(key, value) {\n return define(this, key, value);\n }\n } : {\n // 23.4.3.1 WeakSet.prototype.add(value)\n add: function add(value) {\n return define(this, value, true);\n }\n });\n\n return C;\n }\n};\n","'use strict';\nvar global = require('../internals/global');\nvar redefineAll = require('../internals/redefine-all');\nvar InternalMetadataModule = require('../internals/internal-metadata');\nvar collection = require('../internals/collection');\nvar collectionWeak = require('../internals/collection-weak');\nvar isObject = require('../internals/is-object');\nvar enforceIternalState = require('../internals/internal-state').enforce;\nvar NATIVE_WEAK_MAP = require('../internals/native-weak-map');\n\nvar IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;\nvar isExtensible = Object.isExtensible;\nvar InternalWeakMap;\n\nvar wrapper = function (get) {\n return function WeakMap() {\n return get(this, arguments.length ? arguments[0] : undefined);\n };\n};\n\n// `WeakMap` constructor\n// https://tc39.github.io/ecma262/#sec-weakmap-constructor\nvar $WeakMap = module.exports = collection('WeakMap', wrapper, collectionWeak, true, true);\n\n// IE11 WeakMap frozen keys fix\n// We can't use feature detection because it crash some old IE builds\n// https://github.com/zloirock/core-js/issues/485\nif (NATIVE_WEAK_MAP && IS_IE11) {\n InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true);\n InternalMetadataModule.REQUIRED = true;\n var WeakMapPrototype = $WeakMap.prototype;\n var nativeDelete = WeakMapPrototype['delete'];\n var nativeHas = WeakMapPrototype.has;\n var nativeGet = WeakMapPrototype.get;\n var nativeSet = WeakMapPrototype.set;\n redefineAll(WeakMapPrototype, {\n 'delete': function (key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceIternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeDelete.call(this, key) || state.frozen['delete'](key);\n } return nativeDelete.call(this, key);\n },\n has: function has(key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceIternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeHas.call(this, key) || state.frozen.has(key);\n } return nativeHas.call(this, key);\n },\n get: function get(key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceIternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeHas.call(this, key) ? nativeGet.call(this, key) : state.frozen.get(key);\n } return nativeGet.call(this, key);\n },\n set: function set(key, value) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceIternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n nativeHas.call(this, key) ? nativeSet.call(this, key, value) : state.frozen.set(key, value);\n } else nativeSet.call(this, key, value);\n return this;\n }\n });\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar redefine = require('../internals/redefine');\nvar InternalMetadataModule = require('../internals/internal-metadata');\nvar iterate = require('../internals/iterate');\nvar anInstance = require('../internals/an-instance');\nvar isObject = require('../internals/is-object');\nvar fails = require('../internals/fails');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nmodule.exports = function (CONSTRUCTOR_NAME, wrapper, common, IS_MAP, IS_WEAK) {\n var NativeConstructor = global[CONSTRUCTOR_NAME];\n var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n var Constructor = NativeConstructor;\n var ADDER = IS_MAP ? 'set' : 'add';\n var exported = {};\n\n var fixMethod = function (KEY) {\n var nativeMethod = NativePrototype[KEY];\n redefine(NativePrototype, KEY,\n KEY == 'add' ? function add(a) {\n nativeMethod.call(this, a === 0 ? 0 : a);\n return this;\n } : KEY == 'delete' ? function (a) {\n return IS_WEAK && !isObject(a) ? false : nativeMethod.call(this, a === 0 ? 0 : a);\n } : KEY == 'get' ? function get(a) {\n return IS_WEAK && !isObject(a) ? undefined : nativeMethod.call(this, a === 0 ? 0 : a);\n } : KEY == 'has' ? function has(a) {\n return IS_WEAK && !isObject(a) ? false : nativeMethod.call(this, a === 0 ? 0 : a);\n } : function set(a, b) {\n nativeMethod.call(this, a === 0 ? 0 : a, b);\n return this;\n }\n );\n };\n\n // eslint-disable-next-line max-len\n if (isForced(CONSTRUCTOR_NAME, typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {\n new NativeConstructor().entries().next();\n })))) {\n // create collection constructor\n Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);\n InternalMetadataModule.REQUIRED = true;\n } else if (isForced(CONSTRUCTOR_NAME, true)) {\n var instance = new Constructor();\n // early implementations not supports chaining\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;\n // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n // most early implementations doesn't supports iterables, most modern - not close it correctly\n // eslint-disable-next-line no-new\n var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });\n // for early implementations -0 and +0 not the same\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new NativeConstructor();\n var index = 5;\n while (index--) $instance[ADDER](index, index);\n return !$instance.has(-0);\n });\n\n if (!ACCEPT_ITERABLES) {\n Constructor = wrapper(function (dummy, iterable) {\n anInstance(dummy, Constructor, CONSTRUCTOR_NAME);\n var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);\n if (iterable != undefined) iterate(iterable, that[ADDER], that, IS_MAP);\n return that;\n });\n Constructor.prototype = NativePrototype;\n NativePrototype.constructor = Constructor;\n }\n\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n\n if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n\n // weak collections should not contains .clear method\n if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;\n }\n\n exported[CONSTRUCTOR_NAME] = Constructor;\n $({ global: true, forced: Constructor != NativeConstructor }, exported);\n\n setToStringTag(Constructor, CONSTRUCTOR_NAME);\n\n if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);\n\n return Constructor;\n};\n","var $ = require('../internals/export');\nvar assign = require('../internals/object-assign');\n\n// `Object.assign` method\n// https://tc39.github.io/ecma262/#sec-object.assign\n$({ target: 'Object', stat: true, forced: Object.assign !== assign }, {\n assign: assign\n});\n","var fails = require('../internals/fails');\nvar whitespaces = require('../internals/whitespaces');\n\nvar non = '\\u200B\\u0085\\u180E';\n\n// check that a method works with the correct list\n// of whitespaces and has a correct name\nmodule.exports = function (METHOD_NAME) {\n return fails(function () {\n return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;\n });\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $trim = require('../internals/string-trim').trim;\nvar forcedStringTrimMethod = require('../internals/forced-string-trim-method');\n\n// `String.prototype.trim` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.trim\n$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {\n trim: function trim() {\n return $trim(this);\n }\n});\n","var classof = require('../internals/classof-raw');\n\n// `thisNumberValue` abstract operation\n// https://tc39.github.io/ecma262/#sec-thisnumbervalue\nmodule.exports = function (value) {\n if (typeof value != 'number' && classof(value) != 'Number') {\n throw TypeError('Incorrect invocation');\n }\n return +value;\n};\n","'use strict';\nvar toInteger = require('../internals/to-integer');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `String.prototype.repeat` method implementation\n// https://tc39.github.io/ecma262/#sec-string.prototype.repeat\nmodule.exports = ''.repeat || function repeat(count) {\n var str = String(requireObjectCoercible(this));\n var result = '';\n var n = toInteger(count);\n if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions');\n for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;\n return result;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar toInteger = require('../internals/to-integer');\nvar thisNumberValue = require('../internals/this-number-value');\nvar repeat = require('../internals/string-repeat');\nvar fails = require('../internals/fails');\n\nvar nativeToFixed = 1.0.toFixed;\nvar floor = Math.floor;\n\nvar pow = function (x, n, acc) {\n return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);\n};\n\nvar log = function (x) {\n var n = 0;\n var x2 = x;\n while (x2 >= 4096) {\n n += 12;\n x2 /= 4096;\n }\n while (x2 >= 2) {\n n += 1;\n x2 /= 2;\n } return n;\n};\n\nvar FORCED = nativeToFixed && (\n 0.00008.toFixed(3) !== '0.000' ||\n 0.9.toFixed(0) !== '1' ||\n 1.255.toFixed(2) !== '1.25' ||\n 1000000000000000128.0.toFixed(0) !== '1000000000000000128'\n) || !fails(function () {\n // V8 ~ Android 4.3-\n nativeToFixed.call({});\n});\n\n// `Number.prototype.toFixed` method\n// https://tc39.github.io/ecma262/#sec-number.prototype.tofixed\n$({ target: 'Number', proto: true, forced: FORCED }, {\n // eslint-disable-next-line max-statements\n toFixed: function toFixed(fractionDigits) {\n var number = thisNumberValue(this);\n var fractDigits = toInteger(fractionDigits);\n var data = [0, 0, 0, 0, 0, 0];\n var sign = '';\n var result = '0';\n var e, z, j, k;\n\n var multiply = function (n, c) {\n var index = -1;\n var c2 = c;\n while (++index < 6) {\n c2 += n * data[index];\n data[index] = c2 % 1e7;\n c2 = floor(c2 / 1e7);\n }\n };\n\n var divide = function (n) {\n var index = 6;\n var c = 0;\n while (--index >= 0) {\n c += data[index];\n data[index] = floor(c / n);\n c = (c % n) * 1e7;\n }\n };\n\n var dataToString = function () {\n var index = 6;\n var s = '';\n while (--index >= 0) {\n if (s !== '' || index === 0 || data[index] !== 0) {\n var t = String(data[index]);\n s = s === '' ? t : s + repeat.call('0', 7 - t.length) + t;\n }\n } return s;\n };\n\n if (fractDigits < 0 || fractDigits > 20) throw RangeError('Incorrect fraction digits');\n // eslint-disable-next-line no-self-compare\n if (number != number) return 'NaN';\n if (number <= -1e21 || number >= 1e21) return String(number);\n if (number < 0) {\n sign = '-';\n number = -number;\n }\n if (number > 1e-21) {\n e = log(number * pow(2, 69, 1)) - 69;\n z = e < 0 ? number * pow(2, -e, 1) : number / pow(2, e, 1);\n z *= 0x10000000000000;\n e = 52 - e;\n if (e > 0) {\n multiply(0, z);\n j = fractDigits;\n while (j >= 7) {\n multiply(1e7, 0);\n j -= 7;\n }\n multiply(pow(10, j, 1), 0);\n j = e - 1;\n while (j >= 23) {\n divide(1 << 23);\n j -= 23;\n }\n divide(1 << j);\n multiply(1, 1);\n divide(2);\n result = dataToString();\n } else {\n multiply(0, z);\n multiply(1 << -e, 0);\n result = dataToString() + repeat.call('0', fractDigits);\n }\n }\n if (fractDigits > 0) {\n k = result.length;\n result = sign + (k <= fractDigits\n ? '0.' + repeat.call('0', fractDigits - k) + result\n : result.slice(0, k - fractDigits) + '.' + result.slice(k - fractDigits));\n } else {\n result = sign + result;\n } return result;\n }\n});\n","var DESCRIPTORS = require('../internals/descriptors');\nvar objectKeys = require('../internals/object-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar propertyIsEnumerable = require('../internals/object-property-is-enumerable').f;\n\n// `Object.{ entries, values }` methods implementation\nvar createMethod = function (TO_ENTRIES) {\n return function (it) {\n var O = toIndexedObject(it);\n var keys = objectKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) {\n key = keys[i++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) {\n result.push(TO_ENTRIES ? [key, O[key]] : O[key]);\n }\n }\n return result;\n };\n};\n\nmodule.exports = {\n // `Object.entries` method\n // https://tc39.github.io/ecma262/#sec-object.entries\n entries: createMethod(true),\n // `Object.values` method\n // https://tc39.github.io/ecma262/#sec-object.values\n values: createMethod(false)\n};\n","var $ = require('../internals/export');\nvar $entries = require('../internals/object-to-array').entries;\n\n// `Object.entries` method\n// https://tc39.github.io/ecma262/#sec-object.entries\n$({ target: 'Object', stat: true }, {\n entries: function entries(O) {\n return $entries(O);\n }\n});\n","var $ = require('../internals/export');\nvar $values = require('../internals/object-to-array').values;\n\n// `Object.values` method\n// https://tc39.github.io/ecma262/#sec-object.values\n$({ target: 'Object', stat: true }, {\n values: function values(O) {\n return $values(O);\n }\n});\n","const defaults = {\n addCSS: true, // Add CSS to the element to improve usability (required here or in your CSS!)\n thumbWidth: 15, // The width of the thumb handle\n watch: true, // Watch for new elements that match a string target\n};\n\nexport default defaults;","var $ = require('../internals/export');\n\n// `Number.isNaN` method\n// https://tc39.github.io/ecma262/#sec-number.isnan\n$({ target: 'Number', stat: true }, {\n isNaN: function isNaN(number) {\n // eslint-disable-next-line no-self-compare\n return number != number;\n }\n});\n","// ==========================================================================\n// Type checking utils\n// ==========================================================================\n\nconst getConstructor = input => (input !== null && typeof input !== 'undefined' ? input.constructor : null);\nconst instanceOf = (input, constructor) => Boolean(input && constructor && input instanceof constructor);\n\nconst isNullOrUndefined = input => input === null || typeof input === 'undefined';\nconst isObject = input => getConstructor(input) === Object;\nconst isNumber = input => getConstructor(input) === Number && !Number.isNaN(input);\nconst isString = input => getConstructor(input) === String;\nconst isBoolean = input => getConstructor(input) === Boolean;\nconst isFunction = input => getConstructor(input) === Function;\nconst isArray = input => Array.isArray(input);\nconst isNodeList = input => instanceOf(input, NodeList);\nconst isElement = input => instanceOf(input, Element);\nconst isEvent = input => instanceOf(input, Event);\nconst isEmpty = input =>\n isNullOrUndefined(input) ||\n ((isString(input) || isArray(input) || isNodeList(input)) && !input.length) ||\n (isObject(input) && !Object.keys(input).length);\n\nexport default {\n nullOrUndefined: isNullOrUndefined,\n object: isObject,\n number: isNumber,\n string: isString,\n boolean: isBoolean,\n function: isFunction,\n array: isArray,\n nodeList: isNodeList,\n element: isElement,\n event: isEvent,\n empty: isEmpty,\n};\n","// Get the number of decimal places\nexport function getDecimalPlaces(value) {\n const match = `${value}`.match(/(?:\\.(\\d+))?(?:[eE]([+-]?\\d+))?$/);\n\n if (!match) {\n return 0;\n }\n\n return Math.max(\n 0,\n // Number of digits right of decimal point.\n (match[1] ? match[1].length : 0) -\n // Adjust for scientific notation.\n (match[2] ? +match[2] : 0),\n );\n}\n\n// Round to the nearest step\nexport function round(number, step) {\n if (step < 1) {\n const places = getDecimalPlaces(step);\n return parseFloat(number.toFixed(places));\n }\n return Math.round(number / step) * step;\n}\n\nexport default {};\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar toLength = require('../internals/to-length');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = regexp == undefined ? undefined : regexp[MATCH];\n return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match\n function (regexp) {\n var res = maybeCallNative(nativeMatch, regexp, this);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n\n if (!rx.global) return regExpExec(rx, S);\n\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = String(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\n","var global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\nvar bind = require('../internals/bind-context');\nvar html = require('../internals/html');\nvar createElement = require('../internals/document-create-element');\n\nvar location = global.location;\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\n\nvar run = function (id) {\n // eslint-disable-next-line no-prototype-builtins\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\n\nvar runner = function (id) {\n return function () {\n run(id);\n };\n};\n\nvar listener = function (event) {\n run(event.data);\n};\n\nvar post = function (id) {\n // old engines have not location.origin\n global.postMessage(id + '', location.protocol + '//' + location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n set = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\n (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);\n };\n defer(counter);\n return counter;\n };\n clear = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (classof(process) == 'process') {\n defer = function (id) {\n process.nextTick(runner(id));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(runner(id));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if (MessageChannel) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = bind(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts && !fails(post)) {\n defer = post;\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in createElement('script')) {\n defer = function (id) {\n html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(runner(id), 0);\n };\n }\n}\n\nmodule.exports = {\n set: set,\n clear: clear\n};\n","// ==========================================================================\n// rangetouch.js v2.0.0\n// Making <input type=\"range\"> work on touch devices\n// https://github.com/sampotts/rangetouch\n// License: The MIT License (MIT)\n// ==========================================================================\n\nimport defaults from './config';\nimport { matches } from './utils/css';\nimport { trigger } from './utils/events';\nimport is from './utils/is';\nimport { round } from './utils/numbers';\n\nclass RangeTouch {\n /**\n * Setup a new instance\n * @param {String|Element} target\n * @param {Object} options\n */\n constructor(target, options) {\n if (is.element(target)) {\n // An Element is passed, use it directly\n this.element = target;\n } else if (is.string(target)) {\n // A CSS Selector is passed, fetch it from the DOM\n this.element = document.querySelector(target);\n }\n\n if (!is.element(this.element) || !is.empty(this.element.rangeTouch)) {\n return;\n }\n\n this.config = Object.assign({}, defaults, options);\n\n this.init();\n }\n\n static get enabled() {\n return 'ontouchstart' in document.documentElement;\n }\n\n /**\n * Setup multiple instances\n * @param {String|Element|NodeList|Array} target\n * @param {Object} options\n */\n static setup(target, options = {}) {\n let targets = null;\n\n if (is.empty(target) || is.string(target)) {\n targets = Array.from(document.querySelectorAll(is.string(target) ? target : 'input[type=\"range\"]'));\n } else if (is.element(target)) {\n targets = [target];\n } else if (is.nodeList(target)) {\n targets = Array.from(target);\n } else if (is.array(target)) {\n targets = target.filter(is.element);\n }\n\n if (is.empty(targets)) {\n return null;\n }\n\n const config = Object.assign({}, defaults, options);\n\n if (is.string(target) && config.watch) {\n // Create an observer instance\n const observer = new MutationObserver(mutations => {\n Array.from(mutations).forEach(mutation => {\n Array.from(mutation.addedNodes).forEach(node => {\n if (!is.element(node) || !matches(node, target)) {\n return;\n }\n\n // eslint-disable-next-line no-unused-vars\n const range = new RangeTouch(node, config);\n });\n });\n });\n\n // Pass in the target node, as well as the observer options\n observer.observe(document.body, {\n childList: true,\n subtree: true,\n });\n }\n\n return targets.map(t => new RangeTouch(t, options));\n }\n\n init() {\n // Bail if not a touch enabled device\n if (!RangeTouch.enabled) {\n return;\n }\n\n // Add useful CSS\n if (this.config.addCSS) {\n // TODO: Restore original values on destroy\n this.element.style.userSelect = 'none';\n this.element.style.webKitUserSelect = 'none';\n this.element.style.touchAction = 'manipulation';\n }\n\n this.listeners(true);\n\n this.element.rangeTouch = this;\n }\n\n destroy() {\n // Bail if not a touch enabled device\n if (!RangeTouch.enabled) {\n return;\n }\n\n this.listeners(false);\n\n this.element.rangeTouch = null;\n }\n\n listeners(toggle) {\n const method = toggle ? 'addEventListener' : 'removeEventListener';\n\n // Listen for events\n ['touchstart', 'touchmove', 'touchend'].forEach(type => {\n this.element[method](type, event => this.set(event), false);\n });\n }\n\n /**\n * Get the value based on touch position\n * @param {Event} event\n */\n get(event) {\n if (!RangeTouch.enabled || !is.event(event)) {\n return null;\n }\n\n const input = event.target;\n const touch = event.changedTouches[0];\n const min = parseFloat(input.getAttribute('min')) || 0;\n const max = parseFloat(input.getAttribute('max')) || 100;\n const step = parseFloat(input.getAttribute('step')) || 1;\n const delta = max - min;\n\n // Calculate percentage\n let percent;\n const clientRect = input.getBoundingClientRect();\n const thumbWidth = ((100 / clientRect.width) * (this.config.thumbWidth / 2)) / 100;\n\n // Determine left percentage\n percent = (100 / clientRect.width) * (touch.clientX - clientRect.left);\n\n // Don't allow outside bounds\n if (percent < 0) {\n percent = 0;\n } else if (percent > 100) {\n percent = 100;\n }\n\n // Factor in the thumb offset\n if (percent < 50) {\n percent -= (100 - percent * 2) * thumbWidth;\n } else if (percent > 50) {\n percent += (percent - 50) * 2 * thumbWidth;\n }\n\n // Find the closest step to the mouse position\n return min + round(delta * (percent / 100), step);\n }\n\n /**\n * Update range value based on position\n * @param {Event} event\n */\n set(event) {\n if (!RangeTouch.enabled || !is.event(event) || event.target.disabled) {\n return;\n }\n\n // Prevent text highlight on iOS\n event.preventDefault();\n\n // Set value\n event.target.value = this.get(event);\n\n // Trigger event\n trigger(event.target, event.type === 'touchend' ? 'change' : 'input');\n }\n}\n\nexport default RangeTouch;\n","// Trigger event\nexport function trigger(element, type) {\n if (!element || !type) {\n return;\n }\n\n // Create and dispatch the event\n const event = new Event(type);\n\n // Dispatch the event\n element.dispatchEvent(event);\n}\n\nexport default {};\n","// Element matches a selector\nexport function matches(element, selector) {\n const prototype = { Element };\n\n function match() {\n return Array.from(document.querySelectorAll(selector)).includes(this);\n }\n\n const matches =\n prototype.matches ||\n prototype.webkitMatchesSelector ||\n prototype.mozMatchesSelector ||\n prototype.msMatchesSelector ||\n match;\n\n return matches.call(element, selector);\n}\n\nexport default {};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar definePropertyModule = require('../internals/object-define-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n var defineProperty = definePropertyModule.f;\n\n if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n defineProperty(Constructor, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n }\n};\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar classof = require('../internals/classof-raw');\nvar macrotask = require('../internals/task').set;\nvar userAgent = require('../internals/user-agent');\n\nvar MutationObserver = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar IS_NODE = classof(process) == 'process';\n// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`\nvar queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');\nvar queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;\n\nvar flush, head, last, notify, toggle, node, promise;\n\n// modern engines have queueMicrotask method\nif (!queueMicrotask) {\n flush = function () {\n var parent, fn;\n if (IS_NODE && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (error) {\n if (head) notify();\n else last = undefined;\n throw error;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // Node.js\n if (IS_NODE) {\n notify = function () {\n process.nextTick(flush);\n };\n // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339\n } else if (MutationObserver && !/(iphone|ipod|ipad).*applewebkit/i.test(userAgent)) {\n toggle = true;\n node = document.createTextNode('');\n new MutationObserver(flush).observe(node, { characterData: true }); // eslint-disable-line no-new\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n promise = Promise.resolve(undefined);\n notify = function () {\n promise.then(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n}\n\nmodule.exports = queueMicrotask || function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar global = require('../internals/global');\nvar path = require('../internals/path');\nvar redefineAll = require('../internals/redefine-all');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar setSpecies = require('../internals/set-species');\nvar isObject = require('../internals/is-object');\nvar aFunction = require('../internals/a-function');\nvar anInstance = require('../internals/an-instance');\nvar classof = require('../internals/classof-raw');\nvar iterate = require('../internals/iterate');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar speciesConstructor = require('../internals/species-constructor');\nvar task = require('../internals/task').set;\nvar microtask = require('../internals/microtask');\nvar promiseResolve = require('../internals/promise-resolve');\nvar hostReportErrors = require('../internals/host-report-errors');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar userAgent = require('../internals/user-agent');\nvar InternalStateModule = require('../internals/internal-state');\nvar isForced = require('../internals/is-forced');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\nvar PROMISE = 'Promise';\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar PromiseConstructor = global[PROMISE];\nvar TypeError = global.TypeError;\nvar document = global.document;\nvar process = global.process;\nvar $fetch = global.fetch;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8 || '';\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\nvar IS_NODE = classof(process) == 'process';\nvar DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\nvar Internal, OwnPromiseCapability, PromiseWrapper;\n\nvar FORCED = isForced(PROMISE, function () {\n // correct subclassing with @@species support\n var promise = PromiseConstructor.resolve(1);\n var empty = function () { /* empty */ };\n var FakePromise = (promise.constructor = {})[SPECIES] = function (exec) {\n exec(empty, empty);\n };\n // unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return !((IS_NODE || typeof PromiseRejectionEvent == 'function')\n && (!IS_PURE || promise['finally'])\n && promise.then(empty) instanceof FakePromise\n // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // we can't detect it synchronously, so just check versions\n && v8.indexOf('6.6') !== 0\n && userAgent.indexOf('Chrome/66') === -1);\n});\n\nvar INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {\n PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });\n});\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\n\nvar notify = function (promise, state, isReject) {\n if (state.notified) return;\n state.notified = true;\n var chain = state.reactions;\n microtask(function () {\n var value = state.value;\n var ok = state.state == FULFILLED;\n var index = 0;\n // variable length - can't use forEach\n while (chain.length > index) {\n var reaction = chain[index++];\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (state.rejection === UNHANDLED) onHandleUnhandled(promise, state);\n state.rejection = HANDLED;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // can throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (error) {\n if (domain && !exited) domain.exit();\n reject(error);\n }\n }\n state.reactions = [];\n state.notified = false;\n if (isReject && !state.rejection) onUnhandled(promise, state);\n });\n};\n\nvar dispatchEvent = function (name, promise, reason) {\n var event, handler;\n if (DISPATCH_EVENT) {\n event = document.createEvent('Event');\n event.promise = promise;\n event.reason = reason;\n event.initEvent(name, false, true);\n global.dispatchEvent(event);\n } else event = { promise: promise, reason: reason };\n if (handler = global['on' + name]) handler(event);\n else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n};\n\nvar onUnhandled = function (promise, state) {\n task.call(global, function () {\n var value = state.value;\n var IS_UNHANDLED = isUnhandled(state);\n var result;\n if (IS_UNHANDLED) {\n result = perform(function () {\n if (IS_NODE) {\n process.emit('unhandledRejection', value, promise);\n } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n if (result.error) throw result.value;\n }\n });\n};\n\nvar isUnhandled = function (state) {\n return state.rejection !== HANDLED && !state.parent;\n};\n\nvar onHandleUnhandled = function (promise, state) {\n task.call(global, function () {\n if (IS_NODE) {\n process.emit('rejectionHandled', promise);\n } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n });\n};\n\nvar bind = function (fn, promise, state, unwrap) {\n return function (value) {\n fn(promise, state, value, unwrap);\n };\n};\n\nvar internalReject = function (promise, state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n state.value = value;\n state.state = REJECTED;\n notify(promise, state, true);\n};\n\nvar internalResolve = function (promise, state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n try {\n if (promise === value) throw TypeError(\"Promise can't be resolved itself\");\n var then = isThenable(value);\n if (then) {\n microtask(function () {\n var wrapper = { done: false };\n try {\n then.call(value,\n bind(internalResolve, promise, wrapper, state),\n bind(internalReject, promise, wrapper, state)\n );\n } catch (error) {\n internalReject(promise, wrapper, error, state);\n }\n });\n } else {\n state.value = value;\n state.state = FULFILLED;\n notify(promise, state, false);\n }\n } catch (error) {\n internalReject(promise, { done: false }, error, state);\n }\n};\n\n// constructor polyfill\nif (FORCED) {\n // 25.4.3.1 Promise(executor)\n PromiseConstructor = function Promise(executor) {\n anInstance(this, PromiseConstructor, PROMISE);\n aFunction(executor);\n Internal.call(this);\n var state = getInternalState(this);\n try {\n executor(bind(internalResolve, this, state), bind(internalReject, this, state));\n } catch (error) {\n internalReject(this, state, error);\n }\n };\n // eslint-disable-next-line no-unused-vars\n Internal = function Promise(executor) {\n setInternalState(this, {\n type: PROMISE,\n done: false,\n notified: false,\n parent: false,\n reactions: [],\n rejection: false,\n state: PENDING,\n value: undefined\n });\n };\n Internal.prototype = redefineAll(PromiseConstructor.prototype, {\n // `Promise.prototype.then` method\n // https://tc39.github.io/ecma262/#sec-promise.prototype.then\n then: function then(onFulfilled, onRejected) {\n var state = getInternalPromiseState(this);\n var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = IS_NODE ? process.domain : undefined;\n state.parent = true;\n state.reactions.push(reaction);\n if (state.state != PENDING) notify(this, state, false);\n return reaction.promise;\n },\n // `Promise.prototype.catch` method\n // https://tc39.github.io/ecma262/#sec-promise.prototype.catch\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n var state = getInternalState(promise);\n this.promise = promise;\n this.resolve = bind(internalResolve, promise, state);\n this.reject = bind(internalReject, promise, state);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === PromiseConstructor || C === PromiseWrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n\n // wrap fetch result\n if (!IS_PURE && typeof $fetch == 'function') $({ global: true, enumerable: true, forced: true }, {\n // eslint-disable-next-line no-unused-vars\n fetch: function fetch(input) {\n return promiseResolve(PromiseConstructor, $fetch.apply(global, arguments));\n }\n });\n}\n\n$({ global: true, wrap: true, forced: FORCED }, {\n Promise: PromiseConstructor\n});\n\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n\nPromiseWrapper = path[PROMISE];\n\n// statics\n$({ target: PROMISE, stat: true, forced: FORCED }, {\n // `Promise.reject` method\n // https://tc39.github.io/ecma262/#sec-promise.reject\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n capability.reject.call(undefined, r);\n return capability.promise;\n }\n});\n\n$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {\n // `Promise.resolve` method\n // https://tc39.github.io/ecma262/#sec-promise.resolve\n resolve: function resolve(x) {\n return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);\n }\n});\n\n$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {\n // `Promise.all` method\n // https://tc39.github.io/ecma262/#sec-promise.all\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aFunction(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n $promiseResolve.call(C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n },\n // `Promise.race` method\n // https://tc39.github.io/ecma262/#sec-promise.race\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aFunction(C.resolve);\n iterate(iterable, function (promise) {\n $promiseResolve.call(C, promise).then(capability.resolve, reject);\n });\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","'use strict';\nvar aFunction = require('../internals/a-function');\n\nvar PromiseCapability = function (C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n};\n\n// 25.4.1.5 NewPromiseCapability(C)\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","var anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar newPromiseCapability = require('../internals/new-promise-capability');\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n","module.exports = function (exec) {\n try {\n return { error: false, value: exec() };\n } catch (error) {\n return { error: true, value: error };\n }\n};\n","var global = require('../internals/global');\n\nmodule.exports = function (a, b) {\n var console = global.console;\n if (console && console.error) {\n arguments.length === 1 ? console.error(a) : console.error(a, b);\n }\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar toLength = require('../internals/to-length');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\n\nvar nativeStartsWith = ''.startsWith;\nvar min = Math.min;\n\n// `String.prototype.startsWith` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.startswith\n$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('startsWith') }, {\n startsWith: function startsWith(searchString /* , position = 0 */) {\n var that = String(requireObjectCoercible(this));\n notARegExp(searchString);\n var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));\n var search = String(searchString);\n return nativeStartsWith\n ? nativeStartsWith.call(that, search, index)\n : that.slice(index, index + search.length) === search;\n }\n});\n","// ==========================================================================\n// Type checking utils\n// ==========================================================================\n\nconst getConstructor = input => (input !== null && typeof input !== 'undefined' ? input.constructor : null);\nconst instanceOf = (input, constructor) => Boolean(input && constructor && input instanceof constructor);\nconst isNullOrUndefined = input => input === null || typeof input === 'undefined';\nconst isObject = input => getConstructor(input) === Object;\nconst isNumber = input => getConstructor(input) === Number && !Number.isNaN(input);\nconst isString = input => getConstructor(input) === String;\nconst isBoolean = input => getConstructor(input) === Boolean;\nconst isFunction = input => getConstructor(input) === Function;\nconst isArray = input => Array.isArray(input);\nconst isWeakMap = input => instanceOf(input, WeakMap);\nconst isNodeList = input => instanceOf(input, NodeList);\nconst isElement = input => instanceOf(input, Element);\nconst isTextNode = input => getConstructor(input) === Text;\nconst isEvent = input => instanceOf(input, Event);\nconst isKeyboardEvent = input => instanceOf(input, KeyboardEvent);\nconst isCue = input => instanceOf(input, window.TextTrackCue) || instanceOf(input, window.VTTCue);\nconst isTrack = input => instanceOf(input, TextTrack) || (!isNullOrUndefined(input) && isString(input.kind));\nconst isPromise = input => instanceOf(input, Promise);\n\nconst isEmpty = input =>\n isNullOrUndefined(input) ||\n ((isString(input) || isArray(input) || isNodeList(input)) && !input.length) ||\n (isObject(input) && !Object.keys(input).length);\n\nconst isUrl = input => {\n // Accept a URL object\n if (instanceOf(input, window.URL)) {\n return true;\n }\n\n // Must be string from here\n if (!isString(input)) {\n return false;\n }\n\n // Add the protocol if required\n let string = input;\n if (!input.startsWith('http://') || !input.startsWith('https://')) {\n string = `http://${input}`;\n }\n\n try {\n return !isEmpty(new URL(string).hostname);\n } catch (e) {\n return false;\n }\n};\n\nexport default {\n nullOrUndefined: isNullOrUndefined,\n object: isObject,\n number: isNumber,\n string: isString,\n boolean: isBoolean,\n function: isFunction,\n array: isArray,\n weakMap: isWeakMap,\n nodeList: isNodeList,\n element: isElement,\n textNode: isTextNode,\n event: isEvent,\n keyboardEvent: isKeyboardEvent,\n cue: isCue,\n track: isTrack,\n promise: isPromise,\n url: isUrl,\n empty: isEmpty,\n};\n","// ==========================================================================\n// Animation utils\n// ==========================================================================\n\nimport is from './is';\n\nexport const transitionEndEvent = (() => {\n const element = document.createElement('span');\n\n const events = {\n WebkitTransition: 'webkitTransitionEnd',\n MozTransition: 'transitionend',\n OTransition: 'oTransitionEnd otransitionend',\n transition: 'transitionend',\n };\n\n const type = Object.keys(events).find(event => element.style[event] !== undefined);\n\n return is.string(type) ? events[type] : false;\n})();\n\n// Force repaint of element\nexport function repaint(element, delay) {\n setTimeout(() => {\n try {\n // eslint-disable-next-line no-param-reassign\n element.hidden = true;\n\n // eslint-disable-next-line no-unused-expressions\n element.offsetHeight;\n\n // eslint-disable-next-line no-param-reassign\n element.hidden = false;\n } catch (e) {\n // Do nothing\n }\n }, delay);\n}\n","// ==========================================================================\n// Browser sniffing\n// Unfortunately, due to mixed support, UA sniffing is required\n// ==========================================================================\n\nconst browser = {\n isIE: /* @cc_on!@ */ false || !!document.documentMode,\n isEdge: window.navigator.userAgent.includes('Edge'),\n isWebkit: 'WebkitAppearance' in document.documentElement.style && !/Edge/.test(navigator.userAgent),\n isIPhone: /(iPhone|iPod)/gi.test(navigator.platform),\n isIos: /(iPad|iPhone|iPod)/gi.test(navigator.platform),\n};\n\nexport default browser;\n","// ==========================================================================\n// Event utils\n// ==========================================================================\n\nimport is from './is';\n\n// Check for passive event listener support\n// https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n// https://www.youtube.com/watch?v=NPM6172J22g\nconst supportsPassiveListeners = (() => {\n // Test via a getter in the options object to see if the passive property is accessed\n let supported = false;\n try {\n const options = Object.defineProperty({}, 'passive', {\n get() {\n supported = true;\n return null;\n },\n });\n window.addEventListener('test', null, options);\n window.removeEventListener('test', null, options);\n } catch (e) {\n // Do nothing\n }\n\n return supported;\n})();\n\n// Toggle event listener\nexport function toggleListener(element, event, callback, toggle = false, passive = true, capture = false) {\n // Bail if no element, event, or callback\n if (!element || !('addEventListener' in element) || is.empty(event) || !is.function(callback)) {\n return;\n }\n\n // Allow multiple events\n const events = event.split(' ');\n // Build options\n // Default to just the capture boolean for browsers with no passive listener support\n let options = capture;\n\n // If passive events listeners are supported\n if (supportsPassiveListeners) {\n options = {\n // Whether the listener can be passive (i.e. default never prevented)\n passive,\n // Whether the listener is a capturing listener or not\n capture,\n };\n }\n\n // If a single node is passed, bind the event listener\n events.forEach(type => {\n if (this && this.eventListeners && toggle) {\n // Cache event listener\n this.eventListeners.push({ element, type, callback, options });\n }\n\n element[toggle ? 'addEventListener' : 'removeEventListener'](type, callback, options);\n });\n}\n\n// Bind event handler\nexport function on(element, events = '', callback, passive = true, capture = false) {\n toggleListener.call(this, element, events, callback, true, passive, capture);\n}\n\n// Unbind event handler\nexport function off(element, events = '', callback, passive = true, capture = false) {\n toggleListener.call(this, element, events, callback, false, passive, capture);\n}\n\n// Bind once-only event handler\nexport function once(element, events = '', callback, passive = true, capture = false) {\n const onceCallback = (...args) => {\n off(element, events, onceCallback, passive, capture);\n callback.apply(this, args);\n };\n\n toggleListener.call(this, element, events, onceCallback, true, passive, capture);\n}\n\n// Trigger event\nexport function triggerEvent(element, type = '', bubbles = false, detail = {}) {\n // Bail if no element\n if (!is.element(element) || is.empty(type)) {\n return;\n }\n\n // Create and dispatch the event\n const event = new CustomEvent(type, {\n bubbles,\n detail: Object.assign({}, detail, {\n plyr: this,\n }),\n });\n\n // Dispatch the event\n element.dispatchEvent(event);\n}\n\n// Unbind all cached event listeners\nexport function unbindListeners() {\n if (this && this.eventListeners) {\n this.eventListeners.forEach(item => {\n const { element, type, callback, options } = item;\n element.removeEventListener(type, callback, options);\n });\n\n this.eventListeners = [];\n }\n}\n\n// Run method when / if player is ready\nexport function ready() {\n return new Promise(resolve =>\n this.ready ? setTimeout(resolve, 0) : on.call(this, this.elements.container, 'ready', resolve),\n ).then(() => {});\n}\n","// ==========================================================================\n// Object utils\n// ==========================================================================\n\nimport is from './is';\n\n// Clone nested objects\nexport function cloneDeep(object) {\n return JSON.parse(JSON.stringify(object));\n}\n\n// Get a nested value in an object\nexport function getDeep(object, path) {\n return path.split('.').reduce((obj, key) => obj && obj[key], object);\n}\n\n// Deep extend destination object with N more objects\nexport function extend(target = {}, ...sources) {\n if (!sources.length) {\n return target;\n }\n\n const source = sources.shift();\n\n if (!is.object(source)) {\n return target;\n }\n\n Object.keys(source).forEach(key => {\n if (is.object(source[key])) {\n if (!Object.keys(target).includes(key)) {\n Object.assign(target, { [key]: {} });\n }\n\n extend(target[key], source[key]);\n } else {\n Object.assign(target, { [key]: source[key] });\n }\n });\n\n return extend(target, ...sources);\n}\n","// ==========================================================================\n// Element utils\n// ==========================================================================\n\nimport { toggleListener } from './events';\nimport is from './is';\nimport { extend } from './objects';\n\n// Wrap an element\nexport function wrap(elements, wrapper) {\n // Convert `elements` to an array, if necessary.\n const targets = elements.length ? elements : [elements];\n\n // Loops backwards to prevent having to clone the wrapper on the\n // first element (see `child` below).\n Array.from(targets)\n .reverse()\n .forEach((element, index) => {\n const child = index > 0 ? wrapper.cloneNode(true) : wrapper;\n // Cache the current parent and sibling.\n const parent = element.parentNode;\n const sibling = element.nextSibling;\n\n // Wrap the element (is automatically removed from its current\n // parent).\n child.appendChild(element);\n\n // If the element had a sibling, insert the wrapper before\n // the sibling to maintain the HTML structure; otherwise, just\n // append it to the parent.\n if (sibling) {\n parent.insertBefore(child, sibling);\n } else {\n parent.appendChild(child);\n }\n });\n}\n\n// Set attributes\nexport function setAttributes(element, attributes) {\n if (!is.element(element) || is.empty(attributes)) {\n return;\n }\n\n // Assume null and undefined attributes should be left out,\n // Setting them would otherwise convert them to \"null\" and \"undefined\"\n Object.entries(attributes)\n .filter(([, value]) => !is.nullOrUndefined(value))\n .forEach(([key, value]) => element.setAttribute(key, value));\n}\n\n// Create a DocumentFragment\nexport function createElement(type, attributes, text) {\n // Create a new <element>\n const element = document.createElement(type);\n\n // Set all passed attributes\n if (is.object(attributes)) {\n setAttributes(element, attributes);\n }\n\n // Add text node\n if (is.string(text)) {\n element.innerText = text;\n }\n\n // Return built element\n return element;\n}\n\n// Inaert an element after another\nexport function insertAfter(element, target) {\n if (!is.element(element) || !is.element(target)) {\n return;\n }\n\n target.parentNode.insertBefore(element, target.nextSibling);\n}\n\n// Insert a DocumentFragment\nexport function insertElement(type, parent, attributes, text) {\n if (!is.element(parent)) {\n return;\n }\n\n parent.appendChild(createElement(type, attributes, text));\n}\n\n// Remove element(s)\nexport function removeElement(element) {\n if (is.nodeList(element) || is.array(element)) {\n Array.from(element).forEach(removeElement);\n return;\n }\n\n if (!is.element(element) || !is.element(element.parentNode)) {\n return;\n }\n\n element.parentNode.removeChild(element);\n}\n\n// Remove all child elements\nexport function emptyElement(element) {\n if (!is.element(element)) {\n return;\n }\n\n let { length } = element.childNodes;\n\n while (length > 0) {\n element.removeChild(element.lastChild);\n length -= 1;\n }\n}\n\n// Replace element\nexport function replaceElement(newChild, oldChild) {\n if (!is.element(oldChild) || !is.element(oldChild.parentNode) || !is.element(newChild)) {\n return null;\n }\n\n oldChild.parentNode.replaceChild(newChild, oldChild);\n\n return newChild;\n}\n\n// Get an attribute object from a string selector\nexport function getAttributesFromSelector(sel, existingAttributes) {\n // For example:\n // '.test' to { class: 'test' }\n // '#test' to { id: 'test' }\n // '[data-test=\"test\"]' to { 'data-test': 'test' }\n\n if (!is.string(sel) || is.empty(sel)) {\n return {};\n }\n\n const attributes = {};\n const existing = extend({}, existingAttributes);\n\n sel.split(',').forEach(s => {\n // Remove whitespace\n const selector = s.trim();\n const className = selector.replace('.', '');\n const stripped = selector.replace(/[[\\]]/g, '');\n // Get the parts and value\n const parts = stripped.split('=');\n const [key] = parts;\n const value = parts.length > 1 ? parts[1].replace(/[\"']/g, '') : '';\n // Get the first character\n const start = selector.charAt(0);\n\n switch (start) {\n case '.':\n // Add to existing classname\n if (is.string(existing.class)) {\n attributes.class = `${existing.class} ${className}`;\n } else {\n attributes.class = className;\n }\n break;\n\n case '#':\n // ID selector\n attributes.id = selector.replace('#', '');\n break;\n\n case '[':\n // Attribute selector\n attributes[key] = value;\n\n break;\n\n default:\n break;\n }\n });\n\n return extend(existing, attributes);\n}\n\n// Toggle hidden\nexport function toggleHidden(element, hidden) {\n if (!is.element(element)) {\n return;\n }\n\n let hide = hidden;\n\n if (!is.boolean(hide)) {\n hide = !element.hidden;\n }\n\n // eslint-disable-next-line no-param-reassign\n element.hidden = hide;\n}\n\n// Mirror Element.classList.toggle, with IE compatibility for \"force\" argument\nexport function toggleClass(element, className, force) {\n if (is.nodeList(element)) {\n return Array.from(element).map(e => toggleClass(e, className, force));\n }\n\n if (is.element(element)) {\n let method = 'toggle';\n if (typeof force !== 'undefined') {\n method = force ? 'add' : 'remove';\n }\n\n element.classList[method](className);\n return element.classList.contains(className);\n }\n\n return false;\n}\n\n// Has class name\nexport function hasClass(element, className) {\n return is.element(element) && element.classList.contains(className);\n}\n\n// Element matches selector\nexport function matches(element, selector) {\n const prototype = { Element };\n\n function match() {\n return Array.from(document.querySelectorAll(selector)).includes(this);\n }\n\n const method =\n prototype.matches ||\n prototype.webkitMatchesSelector ||\n prototype.mozMatchesSelector ||\n prototype.msMatchesSelector ||\n match;\n\n return method.call(element, selector);\n}\n\n// Find all elements\nexport function getElements(selector) {\n return this.elements.container.querySelectorAll(selector);\n}\n\n// Find a single element\nexport function getElement(selector) {\n return this.elements.container.querySelector(selector);\n}\n\n// Trap focus inside container\nexport function trapFocus(element = null, toggle = false) {\n if (!is.element(element)) {\n return;\n }\n\n const focusable = getElements.call(this, 'button:not(:disabled), input:not(:disabled), [tabindex]');\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n\n const trap = event => {\n // Bail if not tab key or not fullscreen\n if (event.key !== 'Tab' || event.keyCode !== 9) {\n return;\n }\n\n // Get the current focused element\n const focused = document.activeElement;\n\n if (focused === last && !event.shiftKey) {\n // Move focus to first element that can be tabbed if Shift isn't used\n first.focus();\n event.preventDefault();\n } else if (focused === first && event.shiftKey) {\n // Move focus to last element that can be tabbed if Shift is used\n last.focus();\n event.preventDefault();\n }\n };\n\n toggleListener.call(this, this.elements.container, 'keydown', trap, toggle, false);\n}\n\n// Set focus and tab focus class\nexport function setFocus(element = null, tabFocus = false) {\n if (!is.element(element)) {\n return;\n }\n\n // Set regular focus\n element.focus({ preventScroll: true });\n\n // If we want to mimic keyboard focus via tab\n if (tabFocus) {\n toggleClass(element, this.config.classNames.tabFocus);\n }\n}\n","// ==========================================================================\n// Plyr support checks\n// ==========================================================================\n\nimport { transitionEndEvent } from './utils/animation';\nimport browser from './utils/browser';\nimport { createElement } from './utils/elements';\nimport is from './utils/is';\n\n// Default codecs for checking mimetype support\nconst defaultCodecs = {\n 'audio/ogg': 'vorbis',\n 'audio/wav': '1',\n 'video/webm': 'vp8, vorbis',\n 'video/mp4': 'avc1.42E01E, mp4a.40.2',\n 'video/ogg': 'theora',\n};\n\n// Check for feature support\nconst support = {\n // Basic support\n audio: 'canPlayType' in document.createElement('audio'),\n video: 'canPlayType' in document.createElement('video'),\n\n // Check for support\n // Basic functionality vs full UI\n check(type, provider, playsinline) {\n const canPlayInline = browser.isIPhone && playsinline && support.playsinline;\n const api = support[type] || provider !== 'html5';\n const ui = api && support.rangeInput && (type !== 'video' || !browser.isIPhone || canPlayInline);\n\n return {\n api,\n ui,\n };\n },\n\n // Picture-in-picture support\n // Safari & Chrome only currently\n pip: (() => {\n if (browser.isIPhone) {\n return false;\n }\n\n // Safari\n // https://developer.apple.com/documentation/webkitjs/adding_picture_in_picture_to_your_safari_media_controls\n if (is.function(createElement('video').webkitSetPresentationMode)) {\n return true;\n }\n\n // Chrome\n // https://developers.google.com/web/updates/2018/10/watch-video-using-picture-in-picture\n if (document.pictureInPictureEnabled && !createElement('video').disablePictureInPicture) {\n return true;\n }\n\n return false;\n })(),\n\n // Airplay support\n // Safari only currently\n airplay: is.function(window.WebKitPlaybackTargetAvailabilityEvent),\n\n // Inline playback support\n // https://webkit.org/blog/6784/new-video-policies-for-ios/\n playsinline: 'playsInline' in document.createElement('video'),\n\n // Check for mime type support against a player instance\n // Credits: http://diveintohtml5.info/everything.html\n // Related: http://www.leanbackplayer.com/test/h5mt.html\n mime(input) {\n if (is.empty(input)) {\n return false;\n }\n\n const [mediaType] = input.split('/');\n let type = input;\n\n // Verify we're using HTML5 and there's no media type mismatch\n if (!this.isHTML5 || mediaType !== this.type) {\n return false;\n }\n\n // Add codec if required\n if (Object.keys(defaultCodecs).includes(type)) {\n type += `; codecs=\"${defaultCodecs[input]}\"`;\n }\n\n try {\n return Boolean(type && this.media.canPlayType(type).replace(/no/, ''));\n } catch (e) {\n return false;\n }\n },\n\n // Check for textTracks support\n textTracks: 'textTracks' in document.createElement('video'),\n\n // <input type=\"range\"> Sliders\n rangeInput: (() => {\n const range = document.createElement('input');\n range.type = 'range';\n return range.type === 'range';\n })(),\n\n // Touch\n // NOTE: Remember a device can be mouse + touch enabled so we check on first touch event\n touch: 'ontouchstart' in document.documentElement,\n\n // Detect transitions support\n transitions: transitionEndEvent !== false,\n\n // Reduced motion iOS & MacOS setting\n // https://webkit.org/blog/7551/responsive-design-for-motion/\n reducedMotion: 'matchMedia' in window && window.matchMedia('(prefers-reduced-motion)').matches,\n};\n\nexport default support;\n","// ==========================================================================\n// Style utils\n// ==========================================================================\n\nimport is from './is';\n\nexport function validateRatio(input) {\n if (!is.array(input) && (!is.string(input) || !input.includes(':'))) {\n return false;\n }\n\n const ratio = is.array(input) ? input : input.split(':');\n\n return ratio.map(Number).every(is.number);\n}\n\nexport function reduceAspectRatio(ratio) {\n if (!is.array(ratio) || !ratio.every(is.number)) {\n return null;\n }\n\n const [width, height] = ratio;\n const getDivider = (w, h) => (h === 0 ? w : getDivider(h, w % h));\n const divider = getDivider(width, height);\n\n return [width / divider, height / divider];\n}\n\nexport function getAspectRatio(input) {\n const parse = ratio => (validateRatio(ratio) ? ratio.split(':').map(Number) : null);\n // Try provided ratio\n let ratio = parse(input);\n\n // Get from config\n if (ratio === null) {\n ratio = parse(this.config.ratio);\n }\n\n // Get from embed\n if (ratio === null && !is.empty(this.embed) && is.array(this.embed.ratio)) {\n ({ ratio } = this.embed);\n }\n\n // Get from HTML5 video\n if (ratio === null && this.isHTML5) {\n const { videoWidth, videoHeight } = this.media;\n ratio = reduceAspectRatio([videoWidth, videoHeight]);\n }\n\n return ratio;\n}\n\n// Set aspect ratio for responsive container\nexport function setAspectRatio(input) {\n if (!this.isVideo) {\n return {};\n }\n\n const ratio = getAspectRatio.call(this, input);\n const [w, h] = is.array(ratio) ? ratio : [0, 0];\n const padding = (100 / w) * h;\n\n this.elements.wrapper.style.paddingBottom = `${padding}%`;\n\n // For Vimeo we have an extra <div> to hide the standard controls and UI\n if (this.isVimeo && this.supported.ui) {\n const height = 240;\n const offset = (height - padding) / (height / 50);\n this.media.style.transform = `translateY(-${offset}%)`;\n } else if (this.isHTML5) {\n this.elements.wrapper.classList.toggle(this.config.classNames.videoFixedRatio, ratio !== null);\n }\n\n return { padding, ratio };\n}\n\nexport default { setAspectRatio };\n","// ==========================================================================\n// Plyr HTML5 helpers\n// ==========================================================================\n\nimport support from './support';\nimport { removeElement } from './utils/elements';\nimport { triggerEvent } from './utils/events';\nimport is from './utils/is';\nimport { setAspectRatio } from './utils/style';\n\nconst html5 = {\n getSources() {\n if (!this.isHTML5) {\n return [];\n }\n\n const sources = Array.from(this.media.querySelectorAll('source'));\n\n // Filter out unsupported sources (if type is specified)\n return sources.filter(source => {\n const type = source.getAttribute('type');\n\n if (is.empty(type)) {\n return true;\n }\n\n return support.mime.call(this, type);\n });\n },\n\n // Get quality levels\n getQualityOptions() {\n // Get sizes from <source> elements\n return html5.getSources\n .call(this)\n .map(source => Number(source.getAttribute('size')))\n .filter(Boolean);\n },\n\n extend() {\n if (!this.isHTML5) {\n return;\n }\n\n const player = this;\n\n // Set aspect ratio if fixed\n if (!is.empty(this.config.ratio)) {\n setAspectRatio.call(player);\n }\n\n // Quality\n Object.defineProperty(player.media, 'quality', {\n get() {\n // Get sources\n const sources = html5.getSources.call(player);\n const source = sources.find(s => s.getAttribute('src') === player.source);\n\n // Return size, if match is found\n return source && Number(source.getAttribute('size'));\n },\n set(input) {\n // Get sources\n const sources = html5.getSources.call(player);\n // Get first match for requested size\n const source = sources.find(s => Number(s.getAttribute('size')) === input);\n\n // No matching source found\n if (!source) {\n return;\n }\n\n // Get current state\n const { currentTime, paused, preload, readyState } = player.media;\n\n // Set new source\n player.media.src = source.getAttribute('src');\n\n // Prevent loading if preload=\"none\" and the current source isn't loaded (#1044)\n if (preload !== 'none' || readyState) {\n // Restore time\n player.once('loadedmetadata', () => {\n player.currentTime = currentTime;\n\n // Resume playing\n if (!paused) {\n player.play();\n }\n });\n\n // Load new source\n player.media.load();\n }\n\n // Trigger change event\n triggerEvent.call(player, player.media, 'qualitychange', false, {\n quality: input,\n });\n },\n });\n },\n\n // Cancel current network requests\n // See https://github.com/sampotts/plyr/issues/174\n cancelRequests() {\n if (!this.isHTML5) {\n return;\n }\n\n // Remove child sources\n removeElement(html5.getSources.call(this));\n\n // Set blank video src attribute\n // This is to prevent a MEDIA_ERR_SRC_NOT_SUPPORTED error\n // Info: http://stackoverflow.com/questions/32231579/how-to-properly-dispose-of-an-html5-video-and-close-socket-or-connection\n this.media.setAttribute('src', this.config.blankVideo);\n\n // Load the new empty source\n // This will cancel existing requests\n // See https://github.com/sampotts/plyr/issues/174\n this.media.load();\n\n // Debugging\n this.debug.log('Cancelled network requests');\n },\n};\n\nexport default html5;\n","// ==========================================================================\n// Array utils\n// ==========================================================================\n\nimport is from './is';\n\n// Remove duplicates in an array\nexport function dedupe(array) {\n if (!is.array(array)) {\n return array;\n }\n\n return array.filter((item, index) => array.indexOf(item) === index);\n}\n\n// Get the closest value in an array\nexport function closest(array, value) {\n if (!is.array(array) || !array.length) {\n return null;\n }\n\n return array.reduce((prev, curr) => (Math.abs(curr - value) < Math.abs(prev - value) ? curr : prev));\n}\n","var DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar defineProperty = require('../internals/object-define-property').f;\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar isRegExp = require('../internals/is-regexp');\nvar getFlags = require('../internals/regexp-flags');\nvar redefine = require('../internals/redefine');\nvar fails = require('../internals/fails');\nvar setSpecies = require('../internals/set-species');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\nvar NativeRegExp = global.RegExp;\nvar RegExpPrototype = NativeRegExp.prototype;\nvar re1 = /a/g;\nvar re2 = /a/g;\n\n// \"new\" should create a new object, old webkit bug\nvar CORRECT_NEW = new NativeRegExp(re1) !== re1;\n\nvar FORCED = DESCRIPTORS && isForced('RegExp', (!CORRECT_NEW || fails(function () {\n re2[MATCH] = false;\n // RegExp constructor can alter flags and IsRegExp works correct with @@match\n return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';\n})));\n\n// `RegExp` constructor\n// https://tc39.github.io/ecma262/#sec-regexp-constructor\nif (FORCED) {\n var RegExpWrapper = function RegExp(pattern, flags) {\n var thisIsRegExp = this instanceof RegExpWrapper;\n var patternIsRegExp = isRegExp(pattern);\n var flagsAreUndefined = flags === undefined;\n return !thisIsRegExp && patternIsRegExp && pattern.constructor === RegExpWrapper && flagsAreUndefined ? pattern\n : inheritIfRequired(CORRECT_NEW\n ? new NativeRegExp(patternIsRegExp && !flagsAreUndefined ? pattern.source : pattern, flags)\n : NativeRegExp((patternIsRegExp = pattern instanceof RegExpWrapper)\n ? pattern.source\n : pattern, patternIsRegExp && flagsAreUndefined ? getFlags.call(pattern) : flags)\n , thisIsRegExp ? this : RegExpPrototype, RegExpWrapper);\n };\n var proxy = function (key) {\n key in RegExpWrapper || defineProperty(RegExpWrapper, key, {\n configurable: true,\n get: function () { return NativeRegExp[key]; },\n set: function (it) { NativeRegExp[key] = it; }\n });\n };\n var keys = getOwnPropertyNames(NativeRegExp);\n var index = 0;\n while (keys.length > index) proxy(keys[index++]);\n RegExpPrototype.constructor = RegExpWrapper;\n RegExpWrapper.prototype = RegExpPrototype;\n redefine(global, 'RegExp', RegExpWrapper);\n}\n\n// https://tc39.github.io/ecma262/#sec-get-regexp-@@species\nsetSpecies('RegExp');\n","// ==========================================================================\n// String utils\n// ==========================================================================\n\nimport is from './is';\n\n// Generate a random ID\nexport function generateId(prefix) {\n return `${prefix}-${Math.floor(Math.random() * 10000)}`;\n}\n\n// Format string\nexport function format(input, ...args) {\n if (is.empty(input)) {\n return input;\n }\n\n return input.toString().replace(/{(\\d+)}/g, (match, i) => args[i].toString());\n}\n\n// Get percentage\nexport function getPercentage(current, max) {\n if (current === 0 || max === 0 || Number.isNaN(current) || Number.isNaN(max)) {\n return 0;\n }\n\n return ((current / max) * 100).toFixed(2);\n}\n\n// Replace all occurances of a string in a string\nexport function replaceAll(input = '', find = '', replace = '') {\n return input.replace(\n new RegExp(find.toString().replace(/([.*+?^=!:${}()|[\\]/\\\\])/g, '\\\\$1'), 'g'),\n replace.toString(),\n );\n}\n\n// Convert to title case\nexport function toTitleCase(input = '') {\n return input.toString().replace(/\\w\\S*/g, text => text.charAt(0).toUpperCase() + text.substr(1).toLowerCase());\n}\n\n// Convert string to pascalCase\nexport function toPascalCase(input = '') {\n let string = input.toString();\n\n // Convert kebab case\n string = replaceAll(string, '-', ' ');\n\n // Convert snake case\n string = replaceAll(string, '_', ' ');\n\n // Convert to title case\n string = toTitleCase(string);\n\n // Convert to pascal case\n return replaceAll(string, ' ', '');\n}\n\n// Convert string to pascalCase\nexport function toCamelCase(input = '') {\n let string = input.toString();\n\n // Convert to pascal case\n string = toPascalCase(string);\n\n // Convert first character to lowercase\n return string.charAt(0).toLowerCase() + string.slice(1);\n}\n\n// Remove HTML from a string\nexport function stripHTML(source) {\n const fragment = document.createDocumentFragment();\n const element = document.createElement('div');\n fragment.appendChild(element);\n element.innerHTML = source;\n return fragment.firstChild.innerText;\n}\n\n// Like outerHTML, but also works for DocumentFragment\nexport function getHTML(element) {\n const wrapper = document.createElement('div');\n wrapper.appendChild(element);\n return wrapper.innerHTML;\n}\n","// ==========================================================================\n// Plyr internationalization\n// ==========================================================================\n\nimport is from './is';\nimport { getDeep } from './objects';\nimport { replaceAll } from './strings';\n\n// Skip i18n for abbreviations and brand names\nconst resources = {\n pip: 'PIP',\n airplay: 'AirPlay',\n html5: 'HTML5',\n vimeo: 'Vimeo',\n youtube: 'YouTube',\n};\n\nconst i18n = {\n get(key = '', config = {}) {\n if (is.empty(key) || is.empty(config)) {\n return '';\n }\n\n let string = getDeep(config.i18n, key);\n\n if (is.empty(string)) {\n if (Object.keys(resources).includes(key)) {\n return resources[key];\n }\n\n return '';\n }\n\n const replace = {\n '{seektime}': config.seekTime,\n '{title}': config.title,\n };\n\n Object.entries(replace).forEach(([k, v]) => {\n string = replaceAll(string, k, v);\n });\n\n return string;\n },\n};\n\nexport default i18n;\n","// ==========================================================================\n// Plyr storage\n// ==========================================================================\n\nimport is from './utils/is';\nimport { extend } from './utils/objects';\n\nclass Storage {\n constructor(player) {\n this.enabled = player.config.storage.enabled;\n this.key = player.config.storage.key;\n }\n\n // Check for actual support (see if we can use it)\n static get supported() {\n try {\n if (!('localStorage' in window)) {\n return false;\n }\n\n const test = '___test';\n\n // Try to use it (it might be disabled, e.g. user is in private mode)\n // see: https://github.com/sampotts/plyr/issues/131\n window.localStorage.setItem(test, test);\n window.localStorage.removeItem(test);\n\n return true;\n } catch (e) {\n return false;\n }\n }\n\n get(key) {\n if (!Storage.supported || !this.enabled) {\n return null;\n }\n\n const store = window.localStorage.getItem(this.key);\n\n if (is.empty(store)) {\n return null;\n }\n\n const json = JSON.parse(store);\n\n return is.string(key) && key.length ? json[key] : json;\n }\n\n set(object) {\n // Bail if we don't have localStorage support or it's disabled\n if (!Storage.supported || !this.enabled) {\n return;\n }\n\n // Can only store objectst\n if (!is.object(object)) {\n return;\n }\n\n // Get current storage\n let storage = this.get();\n\n // Default to empty object\n if (is.empty(storage)) {\n storage = {};\n }\n\n // Update the working copy of the values\n extend(storage, object);\n\n // Update storage\n window.localStorage.setItem(this.key, JSON.stringify(storage));\n }\n}\n\nexport default Storage;\n","// ==========================================================================\n// Fetch wrapper\n// Using XHR to avoid issues with older browsers\n// ==========================================================================\n\nexport default function fetch(url, responseType = 'text') {\n return new Promise((resolve, reject) => {\n try {\n const request = new XMLHttpRequest();\n\n // Check for CORS support\n if (!('withCredentials' in request)) {\n return;\n }\n\n request.addEventListener('load', () => {\n if (responseType === 'text') {\n try {\n resolve(JSON.parse(request.responseText));\n } catch (e) {\n resolve(request.responseText);\n }\n } else {\n resolve(request.response);\n }\n });\n\n request.addEventListener('error', () => {\n throw new Error(request.status);\n });\n\n request.open('GET', url, true);\n\n // Set the required response type\n request.responseType = responseType;\n\n request.send();\n } catch (e) {\n reject(e);\n }\n });\n}\n","// ==========================================================================\n// Sprite loader\n// ==========================================================================\n\nimport Storage from '../storage';\nimport fetch from './fetch';\nimport is from './is';\n\n// Load an external SVG sprite\nexport default function loadSprite(url, id) {\n if (!is.string(url)) {\n return;\n }\n\n const prefix = 'cache';\n const hasId = is.string(id);\n let isCached = false;\n const exists = () => document.getElementById(id) !== null;\n\n const update = (container, data) => {\n // eslint-disable-next-line no-param-reassign\n container.innerHTML = data;\n\n // Check again incase of race condition\n if (hasId && exists()) {\n return;\n }\n\n // Inject the SVG to the body\n document.body.insertAdjacentElement('afterbegin', container);\n };\n\n // Only load once if ID set\n if (!hasId || !exists()) {\n const useStorage = Storage.supported;\n // Create container\n const container = document.createElement('div');\n container.setAttribute('hidden', '');\n\n if (hasId) {\n container.setAttribute('id', id);\n }\n\n // Check in cache\n if (useStorage) {\n const cached = window.localStorage.getItem(`${prefix}-${id}`);\n isCached = cached !== null;\n\n if (isCached) {\n const data = JSON.parse(cached);\n update(container, data.content);\n }\n }\n\n // Get the sprite\n fetch(url)\n .then(result => {\n if (is.empty(result)) {\n return;\n }\n\n if (useStorage) {\n window.localStorage.setItem(\n `${prefix}-${id}`,\n JSON.stringify({\n content: result,\n }),\n );\n }\n\n update(container, result);\n })\n .catch(() => {});\n }\n}\n","var $ = require('../internals/export');\n\nvar ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `Math.trunc` method\n// https://tc39.github.io/ecma262/#sec-math.trunc\n$({ target: 'Math', stat: true }, {\n trunc: function trunc(it) {\n return (it > 0 ? floor : ceil)(it);\n }\n});\n","// ==========================================================================\n// Time utils\n// ==========================================================================\n\nimport is from './is';\n\n// Time helpers\nexport const getHours = value => Math.trunc((value / 60 / 60) % 60, 10);\nexport const getMinutes = value => Math.trunc((value / 60) % 60, 10);\nexport const getSeconds = value => Math.trunc(value % 60, 10);\n\n// Format time to UI friendly string\nexport function formatTime(time = 0, displayHours = false, inverted = false) {\n // Bail if the value isn't a number\n if (!is.number(time)) {\n return formatTime(null, displayHours, inverted);\n }\n\n // Format time component to add leading zero\n const format = value => `0${value}`.slice(-2);\n // Breakdown to hours, mins, secs\n let hours = getHours(time);\n const mins = getMinutes(time);\n const secs = getSeconds(time);\n\n // Do we need to display hours?\n if (displayHours || hours > 0) {\n hours = `${hours}:`;\n } else {\n hours = '';\n }\n\n // Render\n return `${inverted && time > 0 ? '-' : ''}${hours}${format(mins)}:${format(secs)}`;\n}\n","// ==========================================================================\n// Plyr controls\n// TODO: This needs to be split into smaller files and cleaned up\n// ==========================================================================\n\nimport RangeTouch from 'rangetouch';\n\nimport captions from './captions';\nimport html5 from './html5';\nimport support from './support';\nimport { repaint, transitionEndEvent } from './utils/animation';\nimport { dedupe } from './utils/arrays';\nimport browser from './utils/browser';\nimport {\n createElement,\n emptyElement,\n getAttributesFromSelector,\n getElement,\n getElements,\n hasClass,\n matches,\n removeElement,\n setAttributes,\n setFocus,\n toggleClass,\n toggleHidden,\n} from './utils/elements';\nimport { off, on } from './utils/events';\nimport i18n from './utils/i18n';\nimport is from './utils/is';\nimport loadSprite from './utils/load-sprite';\nimport { extend } from './utils/objects';\nimport { getPercentage, replaceAll, toCamelCase, toTitleCase } from './utils/strings';\nimport { formatTime, getHours } from './utils/time';\n\n// TODO: Don't export a massive object - break down and create class\nconst controls = {\n // Get icon URL\n getIconUrl() {\n const url = new URL(this.config.iconUrl, window.location);\n const cors = url.host !== window.location.host || (browser.isIE && !window.svg4everybody);\n\n return {\n url: this.config.iconUrl,\n cors,\n };\n },\n\n // Find the UI controls\n findElements() {\n try {\n this.elements.controls = getElement.call(this, this.config.selectors.controls.wrapper);\n\n // Buttons\n this.elements.buttons = {\n play: getElements.call(this, this.config.selectors.buttons.play),\n pause: getElement.call(this, this.config.selectors.buttons.pause),\n restart: getElement.call(this, this.config.selectors.buttons.restart),\n rewind: getElement.call(this, this.config.selectors.buttons.rewind),\n fastForward: getElement.call(this, this.config.selectors.buttons.fastForward),\n mute: getElement.call(this, this.config.selectors.buttons.mute),\n pip: getElement.call(this, this.config.selectors.buttons.pip),\n airplay: getElement.call(this, this.config.selectors.buttons.airplay),\n settings: getElement.call(this, this.config.selectors.buttons.settings),\n captions: getElement.call(this, this.config.selectors.buttons.captions),\n fullscreen: getElement.call(this, this.config.selectors.buttons.fullscreen),\n };\n\n // Progress\n this.elements.progress = getElement.call(this, this.config.selectors.progress);\n\n // Inputs\n this.elements.inputs = {\n seek: getElement.call(this, this.config.selectors.inputs.seek),\n volume: getElement.call(this, this.config.selectors.inputs.volume),\n };\n\n // Display\n this.elements.display = {\n buffer: getElement.call(this, this.config.selectors.display.buffer),\n currentTime: getElement.call(this, this.config.selectors.display.currentTime),\n duration: getElement.call(this, this.config.selectors.display.duration),\n };\n\n // Seek tooltip\n if (is.element(this.elements.progress)) {\n this.elements.display.seekTooltip = this.elements.progress.querySelector(\n `.${this.config.classNames.tooltip}`,\n );\n }\n\n return true;\n } catch (error) {\n // Log it\n this.debug.warn('It looks like there is a problem with your custom controls HTML', error);\n\n // Restore native video controls\n this.toggleNativeControls(true);\n\n return false;\n }\n },\n\n // Create <svg> icon\n createIcon(type, attributes) {\n const namespace = 'http://www.w3.org/2000/svg';\n const iconUrl = controls.getIconUrl.call(this);\n const iconPath = `${!iconUrl.cors ? iconUrl.url : ''}#${this.config.iconPrefix}`;\n // Create <svg>\n const icon = document.createElementNS(namespace, 'svg');\n setAttributes(\n icon,\n extend(attributes, {\n role: 'presentation',\n focusable: 'false',\n }),\n );\n\n // Create the <use> to reference sprite\n const use = document.createElementNS(namespace, 'use');\n const path = `${iconPath}-${type}`;\n\n // Set `href` attributes\n // https://github.com/sampotts/plyr/issues/460\n // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href\n if ('href' in use) {\n use.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);\n }\n\n // Always set the older attribute even though it's \"deprecated\" (it'll be around for ages)\n use.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', path);\n\n // Add <use> to <svg>\n icon.appendChild(use);\n\n return icon;\n },\n\n // Create hidden text label\n createLabel(key, attr = {}) {\n const text = i18n.get(key, this.config);\n\n const attributes = Object.assign({}, attr, {\n class: [attr.class, this.config.classNames.hidden].filter(Boolean).join(' '),\n });\n\n return createElement('span', attributes, text);\n },\n\n // Create a badge\n createBadge(text) {\n if (is.empty(text)) {\n return null;\n }\n\n const badge = createElement('span', {\n class: this.config.classNames.menu.value,\n });\n\n badge.appendChild(\n createElement(\n 'span',\n {\n class: this.config.classNames.menu.badge,\n },\n text,\n ),\n );\n\n return badge;\n },\n\n // Create a <button>\n createButton(buttonType, attr) {\n const attributes = extend({}, attr);\n let type = toCamelCase(buttonType);\n\n const props = {\n element: 'button',\n toggle: false,\n label: null,\n icon: null,\n labelPressed: null,\n iconPressed: null,\n };\n\n ['element', 'icon', 'label'].forEach(key => {\n if (Object.keys(attributes).includes(key)) {\n props[key] = attributes[key];\n delete attributes[key];\n }\n });\n\n // Default to 'button' type to prevent form submission\n if (props.element === 'button' && !Object.keys(attributes).includes('type')) {\n attributes.type = 'button';\n }\n\n // Set class name\n if (Object.keys(attributes).includes('class')) {\n if (!attributes.class.split(' ').some(c => c === this.config.classNames.control)) {\n extend(attributes, {\n class: `${attributes.class} ${this.config.classNames.control}`,\n });\n }\n } else {\n attributes.class = this.config.classNames.control;\n }\n\n // Large play button\n switch (buttonType) {\n case 'play':\n props.toggle = true;\n props.label = 'play';\n props.labelPressed = 'pause';\n props.icon = 'play';\n props.iconPressed = 'pause';\n break;\n\n case 'mute':\n props.toggle = true;\n props.label = 'mute';\n props.labelPressed = 'unmute';\n props.icon = 'volume';\n props.iconPressed = 'muted';\n break;\n\n case 'captions':\n props.toggle = true;\n props.label = 'enableCaptions';\n props.labelPressed = 'disableCaptions';\n props.icon = 'captions-off';\n props.iconPressed = 'captions-on';\n break;\n\n case 'fullscreen':\n props.toggle = true;\n props.label = 'enterFullscreen';\n props.labelPressed = 'exitFullscreen';\n props.icon = 'enter-fullscreen';\n props.iconPressed = 'exit-fullscreen';\n break;\n\n case 'play-large':\n attributes.class += ` ${this.config.classNames.control}--overlaid`;\n type = 'play';\n props.label = 'play';\n props.icon = 'play';\n break;\n\n default:\n if (is.empty(props.label)) {\n props.label = type;\n }\n if (is.empty(props.icon)) {\n props.icon = buttonType;\n }\n }\n\n const button = createElement(props.element);\n\n // Setup toggle icon and labels\n if (props.toggle) {\n // Icon\n button.appendChild(\n controls.createIcon.call(this, props.iconPressed, {\n class: 'icon--pressed',\n }),\n );\n button.appendChild(\n controls.createIcon.call(this, props.icon, {\n class: 'icon--not-pressed',\n }),\n );\n\n // Label/Tooltip\n button.appendChild(\n controls.createLabel.call(this, props.labelPressed, {\n class: 'label--pressed',\n }),\n );\n button.appendChild(\n controls.createLabel.call(this, props.label, {\n class: 'label--not-pressed',\n }),\n );\n } else {\n button.appendChild(controls.createIcon.call(this, props.icon));\n button.appendChild(controls.createLabel.call(this, props.label));\n }\n\n // Merge and set attributes\n extend(attributes, getAttributesFromSelector(this.config.selectors.buttons[type], attributes));\n setAttributes(button, attributes);\n\n // We have multiple play buttons\n if (type === 'play') {\n if (!is.array(this.elements.buttons[type])) {\n this.elements.buttons[type] = [];\n }\n\n this.elements.buttons[type].push(button);\n } else {\n this.elements.buttons[type] = button;\n }\n\n return button;\n },\n\n // Create an <input type='range'>\n createRange(type, attributes) {\n // Seek input\n const input = createElement(\n 'input',\n extend(\n getAttributesFromSelector(this.config.selectors.inputs[type]),\n {\n type: 'range',\n min: 0,\n max: 100,\n step: 0.01,\n value: 0,\n autocomplete: 'off',\n // A11y fixes for https://github.com/sampotts/plyr/issues/905\n role: 'slider',\n 'aria-label': i18n.get(type, this.config),\n 'aria-valuemin': 0,\n 'aria-valuemax': 100,\n 'aria-valuenow': 0,\n },\n attributes,\n ),\n );\n\n this.elements.inputs[type] = input;\n\n // Set the fill for webkit now\n controls.updateRangeFill.call(this, input);\n\n // Improve support on touch devices\n RangeTouch.setup(input);\n\n return input;\n },\n\n // Create a <progress>\n createProgress(type, attributes) {\n const progress = createElement(\n 'progress',\n extend(\n getAttributesFromSelector(this.config.selectors.display[type]),\n {\n min: 0,\n max: 100,\n value: 0,\n role: 'progressbar',\n 'aria-hidden': true,\n },\n attributes,\n ),\n );\n\n // Create the label inside\n if (type !== 'volume') {\n progress.appendChild(createElement('span', null, '0'));\n\n const suffixKey = {\n played: 'played',\n buffer: 'buffered',\n }[type];\n const suffix = suffixKey ? i18n.get(suffixKey, this.config) : '';\n\n progress.innerText = `% ${suffix.toLowerCase()}`;\n }\n\n this.elements.display[type] = progress;\n\n return progress;\n },\n\n // Create time display\n createTime(type, attrs) {\n const attributes = getAttributesFromSelector(this.config.selectors.display[type], attrs);\n\n const container = createElement(\n 'div',\n extend(attributes, {\n class: `${attributes.class ? attributes.class : ''} ${this.config.classNames.display.time} `.trim(),\n 'aria-label': i18n.get(type, this.config),\n }),\n '00:00',\n );\n\n // Reference for updates\n this.elements.display[type] = container;\n\n return container;\n },\n\n // Bind keyboard shortcuts for a menu item\n // We have to bind to keyup otherwise Firefox triggers a click when a keydown event handler shifts focus\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1220143\n bindMenuItemShortcuts(menuItem, type) {\n // Navigate through menus via arrow keys and space\n on(\n menuItem,\n 'keydown keyup',\n event => {\n // We only care about space and ⬆️ ⬇️️ ➡️\n if (![32, 38, 39, 40].includes(event.which)) {\n return;\n }\n\n // Prevent play / seek\n event.preventDefault();\n event.stopPropagation();\n\n // We're just here to prevent the keydown bubbling\n if (event.type === 'keydown') {\n return;\n }\n\n const isRadioButton = matches(menuItem, '[role=\"menuitemradio\"]');\n\n // Show the respective menu\n if (!isRadioButton && [32, 39].includes(event.which)) {\n controls.showMenuPanel.call(this, type, true);\n } else {\n let target;\n\n if (event.which !== 32) {\n if (event.which === 40 || (isRadioButton && event.which === 39)) {\n target = menuItem.nextElementSibling;\n\n if (!is.element(target)) {\n target = menuItem.parentNode.firstElementChild;\n }\n } else {\n target = menuItem.previousElementSibling;\n\n if (!is.element(target)) {\n target = menuItem.parentNode.lastElementChild;\n }\n }\n\n setFocus.call(this, target, true);\n }\n }\n },\n false,\n );\n\n // Enter will fire a `click` event but we still need to manage focus\n // So we bind to keyup which fires after and set focus here\n on(menuItem, 'keyup', event => {\n if (event.which !== 13) {\n return;\n }\n\n controls.focusFirstMenuItem.call(this, null, true);\n });\n },\n\n // Create a settings menu item\n createMenuItem({ value, list, type, title, badge = null, checked = false }) {\n const attributes = getAttributesFromSelector(this.config.selectors.inputs[type]);\n\n const menuItem = createElement(\n 'button',\n extend(attributes, {\n type: 'button',\n role: 'menuitemradio',\n class: `${this.config.classNames.control} ${attributes.class ? attributes.class : ''}`.trim(),\n 'aria-checked': checked,\n value,\n }),\n );\n\n const flex = createElement('span');\n\n // We have to set as HTML incase of special characters\n flex.innerHTML = title;\n\n if (is.element(badge)) {\n flex.appendChild(badge);\n }\n\n menuItem.appendChild(flex);\n\n // Replicate radio button behaviour\n Object.defineProperty(menuItem, 'checked', {\n enumerable: true,\n get() {\n return menuItem.getAttribute('aria-checked') === 'true';\n },\n set(check) {\n // Ensure exclusivity\n if (check) {\n Array.from(menuItem.parentNode.children)\n .filter(node => matches(node, '[role=\"menuitemradio\"]'))\n .forEach(node => node.setAttribute('aria-checked', 'false'));\n }\n\n menuItem.setAttribute('aria-checked', check ? 'true' : 'false');\n },\n });\n\n this.listeners.bind(\n menuItem,\n 'click keyup',\n event => {\n if (is.keyboardEvent(event) && event.which !== 32) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n\n menuItem.checked = true;\n\n switch (type) {\n case 'language':\n this.currentTrack = Number(value);\n break;\n\n case 'quality':\n this.quality = value;\n break;\n\n case 'speed':\n this.speed = parseFloat(value);\n break;\n\n default:\n break;\n }\n\n controls.showMenuPanel.call(this, 'home', is.keyboardEvent(event));\n },\n type,\n false,\n );\n\n controls.bindMenuItemShortcuts.call(this, menuItem, type);\n\n list.appendChild(menuItem);\n },\n\n // Format a time for display\n formatTime(time = 0, inverted = false) {\n // Bail if the value isn't a number\n if (!is.number(time)) {\n return time;\n }\n\n // Always display hours if duration is over an hour\n const forceHours = getHours(this.duration) > 0;\n\n return formatTime(time, forceHours, inverted);\n },\n\n // Update the displayed time\n updateTimeDisplay(target = null, time = 0, inverted = false) {\n // Bail if there's no element to display or the value isn't a number\n if (!is.element(target) || !is.number(time)) {\n return;\n }\n\n // eslint-disable-next-line no-param-reassign\n target.innerText = controls.formatTime(time, inverted);\n },\n\n // Update volume UI and storage\n updateVolume() {\n if (!this.supported.ui) {\n return;\n }\n\n // Update range\n if (is.element(this.elements.inputs.volume)) {\n controls.setRange.call(this, this.elements.inputs.volume, this.muted ? 0 : this.volume);\n }\n\n // Update mute state\n if (is.element(this.elements.buttons.mute)) {\n this.elements.buttons.mute.pressed = this.muted || this.volume === 0;\n }\n },\n\n // Update seek value and lower fill\n setRange(target, value = 0) {\n if (!is.element(target)) {\n return;\n }\n\n // eslint-disable-next-line\n target.value = value;\n\n // Webkit range fill\n controls.updateRangeFill.call(this, target);\n },\n\n // Update <progress> elements\n updateProgress(event) {\n if (!this.supported.ui || !is.event(event)) {\n return;\n }\n\n let value = 0;\n\n const setProgress = (target, input) => {\n const val = is.number(input) ? input : 0;\n const progress = is.element(target) ? target : this.elements.display.buffer;\n\n // Update value and label\n if (is.element(progress)) {\n progress.value = val;\n\n // Update text label inside\n const label = progress.getElementsByTagName('span')[0];\n if (is.element(label)) {\n label.childNodes[0].nodeValue = val;\n }\n }\n };\n\n if (event) {\n switch (event.type) {\n // Video playing\n case 'timeupdate':\n case 'seeking':\n case 'seeked':\n value = getPercentage(this.currentTime, this.duration);\n\n // Set seek range value only if it's a 'natural' time event\n if (event.type === 'timeupdate') {\n controls.setRange.call(this, this.elements.inputs.seek, value);\n }\n\n break;\n\n // Check buffer status\n case 'playing':\n case 'progress':\n setProgress(this.elements.display.buffer, this.buffered * 100);\n\n break;\n\n default:\n break;\n }\n }\n },\n\n // Webkit polyfill for lower fill range\n updateRangeFill(target) {\n // Get range from event if event passed\n const range = is.event(target) ? target.target : target;\n\n // Needs to be a valid <input type='range'>\n if (!is.element(range) || range.getAttribute('type') !== 'range') {\n return;\n }\n\n // Set aria values for https://github.com/sampotts/plyr/issues/905\n if (matches(range, this.config.selectors.inputs.seek)) {\n range.setAttribute('aria-valuenow', this.currentTime);\n const currentTime = controls.formatTime(this.currentTime);\n const duration = controls.formatTime(this.duration);\n const format = i18n.get('seekLabel', this.config);\n range.setAttribute(\n 'aria-valuetext',\n format.replace('{currentTime}', currentTime).replace('{duration}', duration),\n );\n } else if (matches(range, this.config.selectors.inputs.volume)) {\n const percent = range.value * 100;\n range.setAttribute('aria-valuenow', percent);\n range.setAttribute('aria-valuetext', `${percent.toFixed(1)}%`);\n } else {\n range.setAttribute('aria-valuenow', range.value);\n }\n\n // WebKit only\n if (!browser.isWebkit) {\n return;\n }\n\n // Set CSS custom property\n range.style.setProperty('--value', `${(range.value / range.max) * 100}%`);\n },\n\n // Update hover tooltip for seeking\n updateSeekTooltip(event) {\n // Bail if setting not true\n if (\n !this.config.tooltips.seek ||\n !is.element(this.elements.inputs.seek) ||\n !is.element(this.elements.display.seekTooltip) ||\n this.duration === 0\n ) {\n return;\n }\n\n const visible = `${this.config.classNames.tooltip}--visible`;\n const toggle = show => toggleClass(this.elements.display.seekTooltip, visible, show);\n\n // Hide on touch\n if (this.touch) {\n toggle(false);\n return;\n }\n\n // Determine percentage, if already visible\n let percent = 0;\n const clientRect = this.elements.progress.getBoundingClientRect();\n\n if (is.event(event)) {\n percent = (100 / clientRect.width) * (event.pageX - clientRect.left);\n } else if (hasClass(this.elements.display.seekTooltip, visible)) {\n percent = parseFloat(this.elements.display.seekTooltip.style.left, 10);\n } else {\n return;\n }\n\n // Set bounds\n if (percent < 0) {\n percent = 0;\n } else if (percent > 100) {\n percent = 100;\n }\n\n // Display the time a click would seek to\n controls.updateTimeDisplay.call(this, this.elements.display.seekTooltip, (this.duration / 100) * percent);\n\n // Set position\n this.elements.display.seekTooltip.style.left = `${percent}%`;\n\n // Show/hide the tooltip\n // If the event is a moues in/out and percentage is inside bounds\n if (is.event(event) && ['mouseenter', 'mouseleave'].includes(event.type)) {\n toggle(event.type === 'mouseenter');\n }\n },\n\n // Handle time change event\n timeUpdate(event) {\n // Only invert if only one time element is displayed and used for both duration and currentTime\n const invert = !is.element(this.elements.display.duration) && this.config.invertTime;\n\n // Duration\n controls.updateTimeDisplay.call(\n this,\n this.elements.display.currentTime,\n invert ? this.duration - this.currentTime : this.currentTime,\n invert,\n );\n\n // Ignore updates while seeking\n if (event && event.type === 'timeupdate' && this.media.seeking) {\n return;\n }\n\n // Playing progress\n controls.updateProgress.call(this, event);\n },\n\n // Show the duration on metadataloaded or durationchange events\n durationUpdate() {\n // Bail if no UI or durationchange event triggered after playing/seek when invertTime is false\n if (!this.supported.ui || (!this.config.invertTime && this.currentTime)) {\n return;\n }\n\n // If duration is the 2**32 (shaka), Infinity (HLS), DASH-IF (Number.MAX_SAFE_INTEGER || Number.MAX_VALUE) indicating live we hide the currentTime and progressbar.\n // https://github.com/video-dev/hls.js/blob/5820d29d3c4c8a46e8b75f1e3afa3e68c1a9a2db/src/controller/buffer-controller.js#L415\n // https://github.com/google/shaka-player/blob/4d889054631f4e1cf0fbd80ddd2b71887c02e232/lib/media/streaming_engine.js#L1062\n // https://github.com/Dash-Industry-Forum/dash.js/blob/69859f51b969645b234666800d4cb596d89c602d/src/dash/models/DashManifestModel.js#L338\n if (this.duration >= 2 ** 32) {\n toggleHidden(this.elements.display.currentTime, true);\n toggleHidden(this.elements.progress, true);\n return;\n }\n\n // Update ARIA values\n if (is.element(this.elements.inputs.seek)) {\n this.elements.inputs.seek.setAttribute('aria-valuemax', this.duration);\n }\n\n // If there's a spot to display duration\n const hasDuration = is.element(this.elements.display.duration);\n\n // If there's only one time display, display duration there\n if (!hasDuration && this.config.displayDuration && this.paused) {\n controls.updateTimeDisplay.call(this, this.elements.display.currentTime, this.duration);\n }\n\n // If there's a duration element, update content\n if (hasDuration) {\n controls.updateTimeDisplay.call(this, this.elements.display.duration, this.duration);\n }\n\n // Update the tooltip (if visible)\n controls.updateSeekTooltip.call(this);\n },\n\n // Hide/show a tab\n toggleMenuButton(setting, toggle) {\n toggleHidden(this.elements.settings.buttons[setting], !toggle);\n },\n\n // Update the selected setting\n updateSetting(setting, container, input) {\n const pane = this.elements.settings.panels[setting];\n let value = null;\n let list = container;\n\n if (setting === 'captions') {\n value = this.currentTrack;\n } else {\n value = !is.empty(input) ? input : this[setting];\n\n // Get default\n if (is.empty(value)) {\n value = this.config[setting].default;\n }\n\n // Unsupported value\n if (!is.empty(this.options[setting]) && !this.options[setting].includes(value)) {\n this.debug.warn(`Unsupported value of '${value}' for ${setting}`);\n return;\n }\n\n // Disabled value\n if (!this.config[setting].options.includes(value)) {\n this.debug.warn(`Disabled value of '${value}' for ${setting}`);\n return;\n }\n }\n\n // Get the list if we need to\n if (!is.element(list)) {\n list = pane && pane.querySelector('[role=\"menu\"]');\n }\n\n // If there's no list it means it's not been rendered...\n if (!is.element(list)) {\n return;\n }\n\n // Update the label\n const label = this.elements.settings.buttons[setting].querySelector(`.${this.config.classNames.menu.value}`);\n label.innerHTML = controls.getLabel.call(this, setting, value);\n\n // Find the radio option and check it\n const target = list && list.querySelector(`[value=\"${value}\"]`);\n\n if (is.element(target)) {\n target.checked = true;\n }\n },\n\n // Translate a value into a nice label\n getLabel(setting, value) {\n switch (setting) {\n case 'speed':\n return value === 1 ? i18n.get('normal', this.config) : `${value}×`;\n\n case 'quality':\n if (is.number(value)) {\n const label = i18n.get(`qualityLabel.${value}`, this.config);\n\n if (!label.length) {\n return `${value}p`;\n }\n\n return label;\n }\n\n return toTitleCase(value);\n\n case 'captions':\n return captions.getLabel.call(this);\n\n default:\n return null;\n }\n },\n\n // Set the quality menu\n setQualityMenu(options) {\n // Menu required\n if (!is.element(this.elements.settings.panels.quality)) {\n return;\n }\n\n const type = 'quality';\n const list = this.elements.settings.panels.quality.querySelector('[role=\"menu\"]');\n\n // Set options if passed and filter based on uniqueness and config\n if (is.array(options)) {\n this.options.quality = dedupe(options).filter(quality => this.config.quality.options.includes(quality));\n }\n\n // Toggle the pane and tab\n const toggle = !is.empty(this.options.quality) && this.options.quality.length > 1;\n controls.toggleMenuButton.call(this, type, toggle);\n\n // Empty the menu\n emptyElement(list);\n\n // Check if we need to toggle the parent\n controls.checkMenu.call(this);\n\n // If we're hiding, nothing more to do\n if (!toggle) {\n return;\n }\n\n // Get the badge HTML for HD, 4K etc\n const getBadge = quality => {\n const label = i18n.get(`qualityBadge.${quality}`, this.config);\n\n if (!label.length) {\n return null;\n }\n\n return controls.createBadge.call(this, label);\n };\n\n // Sort options by the config and then render options\n this.options.quality\n .sort((a, b) => {\n const sorting = this.config.quality.options;\n return sorting.indexOf(a) > sorting.indexOf(b) ? 1 : -1;\n })\n .forEach(quality => {\n controls.createMenuItem.call(this, {\n value: quality,\n list,\n type,\n title: controls.getLabel.call(this, 'quality', quality),\n badge: getBadge(quality),\n });\n });\n\n controls.updateSetting.call(this, type, list);\n },\n\n // Set the looping options\n /* setLoopMenu() {\n // Menu required\n if (!is.element(this.elements.settings.panels.loop)) {\n return;\n }\n\n const options = ['start', 'end', 'all', 'reset'];\n const list = this.elements.settings.panels.loop.querySelector('[role=\"menu\"]');\n\n // Show the pane and tab\n toggleHidden(this.elements.settings.buttons.loop, false);\n toggleHidden(this.elements.settings.panels.loop, false);\n\n // Toggle the pane and tab\n const toggle = !is.empty(this.loop.options);\n controls.toggleMenuButton.call(this, 'loop', toggle);\n\n // Empty the menu\n emptyElement(list);\n\n options.forEach(option => {\n const item = createElement('li');\n\n const button = createElement(\n 'button',\n extend(getAttributesFromSelector(this.config.selectors.buttons.loop), {\n type: 'button',\n class: this.config.classNames.control,\n 'data-plyr-loop-action': option,\n }),\n i18n.get(option, this.config)\n );\n\n if (['start', 'end'].includes(option)) {\n const badge = controls.createBadge.call(this, '00:00');\n button.appendChild(badge);\n }\n\n item.appendChild(button);\n list.appendChild(item);\n });\n }, */\n\n // Get current selected caption language\n // TODO: rework this to user the getter in the API?\n\n // Set a list of available captions languages\n setCaptionsMenu() {\n // Menu required\n if (!is.element(this.elements.settings.panels.captions)) {\n return;\n }\n\n // TODO: Captions or language? Currently it's mixed\n const type = 'captions';\n const list = this.elements.settings.panels.captions.querySelector('[role=\"menu\"]');\n const tracks = captions.getTracks.call(this);\n const toggle = Boolean(tracks.length);\n\n // Toggle the pane and tab\n controls.toggleMenuButton.call(this, type, toggle);\n\n // Empty the menu\n emptyElement(list);\n\n // Check if we need to toggle the parent\n controls.checkMenu.call(this);\n\n // If there's no captions, bail\n if (!toggle) {\n return;\n }\n\n // Generate options data\n const options = tracks.map((track, value) => ({\n value,\n checked: this.captions.toggled && this.currentTrack === value,\n title: captions.getLabel.call(this, track),\n badge: track.language && controls.createBadge.call(this, track.language.toUpperCase()),\n list,\n type: 'language',\n }));\n\n // Add the \"Disabled\" option to turn off captions\n options.unshift({\n value: -1,\n checked: !this.captions.toggled,\n title: i18n.get('disabled', this.config),\n list,\n type: 'language',\n });\n\n // Generate options\n options.forEach(controls.createMenuItem.bind(this));\n\n controls.updateSetting.call(this, type, list);\n },\n\n // Set a list of available captions languages\n setSpeedMenu(options) {\n // Menu required\n if (!is.element(this.elements.settings.panels.speed)) {\n return;\n }\n\n const type = 'speed';\n const list = this.elements.settings.panels.speed.querySelector('[role=\"menu\"]');\n\n // Set the speed options\n if (is.array(options)) {\n this.options.speed = options;\n } else if (this.isHTML5 || this.isVimeo) {\n this.options.speed = [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2];\n }\n\n // Set options if passed and filter based on config\n this.options.speed = this.options.speed.filter(speed => this.config.speed.options.includes(speed));\n\n // Toggle the pane and tab\n const toggle = !is.empty(this.options.speed) && this.options.speed.length > 1;\n controls.toggleMenuButton.call(this, type, toggle);\n\n // Empty the menu\n emptyElement(list);\n\n // Check if we need to toggle the parent\n controls.checkMenu.call(this);\n\n // If we're hiding, nothing more to do\n if (!toggle) {\n return;\n }\n\n // Create items\n this.options.speed.forEach(speed => {\n controls.createMenuItem.call(this, {\n value: speed,\n list,\n type,\n title: controls.getLabel.call(this, 'speed', speed),\n });\n });\n\n controls.updateSetting.call(this, type, list);\n },\n\n // Check if we need to hide/show the settings menu\n checkMenu() {\n const { buttons } = this.elements.settings;\n const visible = !is.empty(buttons) && Object.values(buttons).some(button => !button.hidden);\n\n toggleHidden(this.elements.settings.menu, !visible);\n },\n\n // Focus the first menu item in a given (or visible) menu\n focusFirstMenuItem(pane, tabFocus = false) {\n if (this.elements.settings.popup.hidden) {\n return;\n }\n\n let target = pane;\n\n if (!is.element(target)) {\n target = Object.values(this.elements.settings.panels).find(p => !p.hidden);\n }\n\n const firstItem = target.querySelector('[role^=\"menuitem\"]');\n\n setFocus.call(this, firstItem, tabFocus);\n },\n\n // Show/hide menu\n toggleMenu(input) {\n const { popup } = this.elements.settings;\n const button = this.elements.buttons.settings;\n\n // Menu and button are required\n if (!is.element(popup) || !is.element(button)) {\n return;\n }\n\n // True toggle by default\n const { hidden } = popup;\n let show = hidden;\n\n if (is.boolean(input)) {\n show = input;\n } else if (is.keyboardEvent(input) && input.which === 27) {\n show = false;\n } else if (is.event(input)) {\n // If Plyr is in a shadowDOM, the event target is set to the component, instead of the\n // Element in the shadowDOM. The path, if available, is complete.\n const target = is.function(input.composedPath) ? input.composedPath()[0] : input.target;\n const isMenuItem = popup.contains(target);\n\n // If the click was inside the menu or if the click\n // wasn't the button or menu item and we're trying to\n // show the menu (a doc click shouldn't show the menu)\n if (isMenuItem || (!isMenuItem && input.target !== button && show)) {\n return;\n }\n }\n\n // Set button attributes\n button.setAttribute('aria-expanded', show);\n\n // Show the actual popup\n toggleHidden(popup, !show);\n\n // Add class hook\n toggleClass(this.elements.container, this.config.classNames.menu.open, show);\n\n // Focus the first item if key interaction\n if (show && is.keyboardEvent(input)) {\n controls.focusFirstMenuItem.call(this, null, true);\n } else if (!show && !hidden) {\n // If closing, re-focus the button\n setFocus.call(this, button, is.keyboardEvent(input));\n }\n },\n\n // Get the natural size of a menu panel\n getMenuSize(tab) {\n const clone = tab.cloneNode(true);\n clone.style.position = 'absolute';\n clone.style.opacity = 0;\n clone.removeAttribute('hidden');\n\n // Append to parent so we get the \"real\" size\n tab.parentNode.appendChild(clone);\n\n // Get the sizes before we remove\n const width = clone.scrollWidth;\n const height = clone.scrollHeight;\n\n // Remove from the DOM\n removeElement(clone);\n\n return {\n width,\n height,\n };\n },\n\n // Show a panel in the menu\n showMenuPanel(type = '', tabFocus = false) {\n const target = this.elements.container.querySelector(`#plyr-settings-${this.id}-${type}`);\n\n // Nothing to show, bail\n if (!is.element(target)) {\n return;\n }\n\n // Hide all other panels\n const container = target.parentNode;\n const current = Array.from(container.children).find(node => !node.hidden);\n\n // If we can do fancy animations, we'll animate the height/width\n if (support.transitions && !support.reducedMotion) {\n // Set the current width as a base\n container.style.width = `${current.scrollWidth}px`;\n container.style.height = `${current.scrollHeight}px`;\n\n // Get potential sizes\n const size = controls.getMenuSize.call(this, target);\n\n // Restore auto height/width\n const restore = event => {\n // We're only bothered about height and width on the container\n if (event.target !== container || !['width', 'height'].includes(event.propertyName)) {\n return;\n }\n\n // Revert back to auto\n container.style.width = '';\n container.style.height = '';\n\n // Only listen once\n off.call(this, container, transitionEndEvent, restore);\n };\n\n // Listen for the transition finishing and restore auto height/width\n on.call(this, container, transitionEndEvent, restore);\n\n // Set dimensions to target\n container.style.width = `${size.width}px`;\n container.style.height = `${size.height}px`;\n }\n\n // Set attributes on current tab\n toggleHidden(current, true);\n\n // Set attributes on target\n toggleHidden(target, false);\n\n // Focus the first item\n controls.focusFirstMenuItem.call(this, target, tabFocus);\n },\n\n // Set the download URL\n setDownloadUrl() {\n const button = this.elements.buttons.download;\n\n // Bail if no button\n if (!is.element(button)) {\n return;\n }\n\n // Set attribute\n button.setAttribute('href', this.download);\n },\n\n // Build the default HTML\n create(data) {\n const {\n bindMenuItemShortcuts,\n createButton,\n createProgress,\n createRange,\n createTime,\n setQualityMenu,\n setSpeedMenu,\n showMenuPanel,\n } = controls;\n this.elements.controls = null;\n\n // Larger overlaid play button\n if (this.config.controls.includes('play-large')) {\n this.elements.container.appendChild(createButton.call(this, 'play-large'));\n }\n\n // Create the container\n const container = createElement('div', getAttributesFromSelector(this.config.selectors.controls.wrapper));\n this.elements.controls = container;\n\n // Default item attributes\n const defaultAttributes = { class: 'plyr__controls__item' };\n\n // Loop through controls in order\n dedupe(this.config.controls).forEach(control => {\n // Restart button\n if (control === 'restart') {\n container.appendChild(createButton.call(this, 'restart', defaultAttributes));\n }\n\n // Rewind button\n if (control === 'rewind') {\n container.appendChild(createButton.call(this, 'rewind', defaultAttributes));\n }\n\n // Play/Pause button\n if (control === 'play') {\n container.appendChild(createButton.call(this, 'play', defaultAttributes));\n }\n\n // Fast forward button\n if (control === 'fast-forward') {\n container.appendChild(createButton.call(this, 'fast-forward', defaultAttributes));\n }\n\n // Progress\n if (control === 'progress') {\n const progressContainer = createElement('div', {\n class: `${defaultAttributes.class} plyr__progress__container`,\n });\n\n const progress = createElement('div', getAttributesFromSelector(this.config.selectors.progress));\n\n // Seek range slider\n progress.appendChild(\n createRange.call(this, 'seek', {\n id: `plyr-seek-${data.id}`,\n }),\n );\n\n // Buffer progress\n progress.appendChild(createProgress.call(this, 'buffer'));\n\n // TODO: Add loop display indicator\n\n // Seek tooltip\n if (this.config.tooltips.seek) {\n const tooltip = createElement(\n 'span',\n {\n class: this.config.classNames.tooltip,\n },\n '00:00',\n );\n\n progress.appendChild(tooltip);\n this.elements.display.seekTooltip = tooltip;\n }\n\n this.elements.progress = progress;\n progressContainer.appendChild(this.elements.progress);\n container.appendChild(progressContainer);\n }\n\n // Media current time display\n if (control === 'current-time') {\n container.appendChild(createTime.call(this, 'currentTime', defaultAttributes));\n }\n\n // Media duration display\n if (control === 'duration') {\n container.appendChild(createTime.call(this, 'duration', defaultAttributes));\n }\n\n // Volume controls\n if (control === 'mute' || control === 'volume') {\n let { volume } = this.elements;\n\n // Create the volume container if needed\n if (!is.element(volume) || !container.contains(volume)) {\n volume = createElement(\n 'div',\n extend({}, defaultAttributes, {\n class: `${defaultAttributes.class} plyr__volume`.trim(),\n }),\n );\n\n this.elements.volume = volume;\n\n container.appendChild(volume);\n }\n\n // Toggle mute button\n if (control === 'mute') {\n volume.appendChild(createButton.call(this, 'mute'));\n }\n\n // Volume range control\n if (control === 'volume') {\n // Set the attributes\n const attributes = {\n max: 1,\n step: 0.05,\n value: this.config.volume,\n };\n\n // Create the volume range slider\n volume.appendChild(\n createRange.call(\n this,\n 'volume',\n extend(attributes, {\n id: `plyr-volume-${data.id}`,\n }),\n ),\n );\n }\n }\n\n // Toggle captions button\n if (control === 'captions') {\n container.appendChild(createButton.call(this, 'captions', defaultAttributes));\n }\n\n // Settings button / menu\n if (control === 'settings' && !is.empty(this.config.settings)) {\n const wrapper = createElement(\n 'div',\n extend({}, defaultAttributes, {\n class: `${defaultAttributes.class} plyr__menu`.trim(),\n hidden: '',\n }),\n );\n\n wrapper.appendChild(\n createButton.call(this, 'settings', {\n 'aria-haspopup': true,\n 'aria-controls': `plyr-settings-${data.id}`,\n 'aria-expanded': false,\n }),\n );\n\n const popup = createElement('div', {\n class: 'plyr__menu__container',\n id: `plyr-settings-${data.id}`,\n hidden: '',\n });\n\n const inner = createElement('div');\n\n const home = createElement('div', {\n id: `plyr-settings-${data.id}-home`,\n });\n\n // Create the menu\n const menu = createElement('div', {\n role: 'menu',\n });\n\n home.appendChild(menu);\n inner.appendChild(home);\n this.elements.settings.panels.home = home;\n\n // Build the menu items\n this.config.settings.forEach(type => {\n // TODO: bundle this with the createMenuItem helper and bindings\n const menuItem = createElement(\n 'button',\n extend(getAttributesFromSelector(this.config.selectors.buttons.settings), {\n type: 'button',\n class: `${this.config.classNames.control} ${this.config.classNames.control}--forward`,\n role: 'menuitem',\n 'aria-haspopup': true,\n hidden: '',\n }),\n );\n\n // Bind menu shortcuts for keyboard users\n bindMenuItemShortcuts.call(this, menuItem, type);\n\n // Show menu on click\n on(menuItem, 'click', () => {\n showMenuPanel.call(this, type, false);\n });\n\n const flex = createElement('span', null, i18n.get(type, this.config));\n\n const value = createElement('span', {\n class: this.config.classNames.menu.value,\n });\n\n // Speed contains HTML entities\n value.innerHTML = data[type];\n\n flex.appendChild(value);\n menuItem.appendChild(flex);\n menu.appendChild(menuItem);\n\n // Build the panes\n const pane = createElement('div', {\n id: `plyr-settings-${data.id}-${type}`,\n hidden: '',\n });\n\n // Back button\n const backButton = createElement('button', {\n type: 'button',\n class: `${this.config.classNames.control} ${this.config.classNames.control}--back`,\n });\n\n // Visible label\n backButton.appendChild(\n createElement(\n 'span',\n {\n 'aria-hidden': true,\n },\n i18n.get(type, this.config),\n ),\n );\n\n // Screen reader label\n backButton.appendChild(\n createElement(\n 'span',\n {\n class: this.config.classNames.hidden,\n },\n i18n.get('menuBack', this.config),\n ),\n );\n\n // Go back via keyboard\n on(\n pane,\n 'keydown',\n event => {\n // We only care about <-\n if (event.which !== 37) {\n return;\n }\n\n // Prevent seek\n event.preventDefault();\n event.stopPropagation();\n\n // Show the respective menu\n showMenuPanel.call(this, 'home', true);\n },\n false,\n );\n\n // Go back via button click\n on(backButton, 'click', () => {\n showMenuPanel.call(this, 'home', false);\n });\n\n // Add to pane\n pane.appendChild(backButton);\n\n // Menu\n pane.appendChild(\n createElement('div', {\n role: 'menu',\n }),\n );\n\n inner.appendChild(pane);\n\n this.elements.settings.buttons[type] = menuItem;\n this.elements.settings.panels[type] = pane;\n });\n\n popup.appendChild(inner);\n wrapper.appendChild(popup);\n container.appendChild(wrapper);\n\n this.elements.settings.popup = popup;\n this.elements.settings.menu = wrapper;\n }\n\n // Picture in picture button\n if (control === 'pip' && support.pip) {\n container.appendChild(createButton.call(this, 'pip', defaultAttributes));\n }\n\n // Airplay button\n if (control === 'airplay' && support.airplay) {\n container.appendChild(createButton.call(this, 'airplay', defaultAttributes));\n }\n\n // Download button\n if (control === 'download') {\n const attributes = extend({}, defaultAttributes, {\n element: 'a',\n href: this.download,\n target: '_blank',\n });\n\n const { download } = this.config.urls;\n\n if (!is.url(download) && this.isEmbed) {\n extend(attributes, {\n icon: `logo-${this.provider}`,\n label: this.provider,\n });\n }\n\n container.appendChild(createButton.call(this, 'download', attributes));\n }\n\n // Toggle fullscreen button\n if (control === 'fullscreen') {\n container.appendChild(createButton.call(this, 'fullscreen', defaultAttributes));\n }\n });\n\n // Set available quality levels\n if (this.isHTML5) {\n setQualityMenu.call(this, html5.getQualityOptions.call(this));\n }\n\n setSpeedMenu.call(this);\n\n return container;\n },\n\n // Insert controls\n inject() {\n // Sprite\n if (this.config.loadSprite) {\n const icon = controls.getIconUrl.call(this);\n\n // Only load external sprite using AJAX\n if (icon.cors) {\n loadSprite(icon.url, 'sprite-plyr');\n }\n }\n\n // Create a unique ID\n this.id = Math.floor(Math.random() * 10000);\n\n // Null by default\n let container = null;\n this.elements.controls = null;\n\n // Set template properties\n const props = {\n id: this.id,\n seektime: this.config.seekTime,\n title: this.config.title,\n };\n let update = true;\n\n // If function, run it and use output\n if (is.function(this.config.controls)) {\n this.config.controls = this.config.controls.call(this, props);\n }\n\n // Convert falsy controls to empty array (primarily for empty strings)\n if (!this.config.controls) {\n this.config.controls = [];\n }\n\n if (is.element(this.config.controls) || is.string(this.config.controls)) {\n // HTMLElement or Non-empty string passed as the option\n container = this.config.controls;\n } else {\n // Create controls\n container = controls.create.call(this, {\n id: this.id,\n seektime: this.config.seekTime,\n speed: this.speed,\n quality: this.quality,\n captions: captions.getLabel.call(this),\n // TODO: Looping\n // loop: 'None',\n });\n update = false;\n }\n\n // Replace props with their value\n const replace = input => {\n let result = input;\n\n Object.entries(props).forEach(([key, value]) => {\n result = replaceAll(result, `{${key}}`, value);\n });\n\n return result;\n };\n\n // Update markup\n if (update) {\n if (is.string(this.config.controls)) {\n container = replace(container);\n } else if (is.element(container)) {\n container.innerHTML = replace(container.innerHTML);\n }\n }\n\n // Controls container\n let target;\n\n // Inject to custom location\n if (is.string(this.config.selectors.controls.container)) {\n target = document.querySelector(this.config.selectors.controls.container);\n }\n\n // Inject into the container by default\n if (!is.element(target)) {\n target = this.elements.container;\n }\n\n // Inject controls HTML (needs to be before captions, hence \"afterbegin\")\n const insertMethod = is.element(container) ? 'insertAdjacentElement' : 'insertAdjacentHTML';\n target[insertMethod]('afterbegin', container);\n\n // Find the elements if need be\n if (!is.element(this.elements.controls)) {\n controls.findElements.call(this);\n }\n\n // Add pressed property to buttons\n if (!is.empty(this.elements.buttons)) {\n const addProperty = button => {\n const className = this.config.classNames.controlPressed;\n Object.defineProperty(button, 'pressed', {\n enumerable: true,\n get() {\n return hasClass(button, className);\n },\n set(pressed = false) {\n toggleClass(button, className, pressed);\n },\n });\n };\n\n // Toggle classname when pressed property is set\n Object.values(this.elements.buttons)\n .filter(Boolean)\n .forEach(button => {\n if (is.array(button) || is.nodeList(button)) {\n Array.from(button)\n .filter(Boolean)\n .forEach(addProperty);\n } else {\n addProperty(button);\n }\n });\n }\n\n // Edge sometimes doesn't finish the paint so force a repaint\n if (browser.isEdge) {\n repaint(target);\n }\n\n // Setup tooltips\n if (this.config.tooltips.controls) {\n const { classNames, selectors } = this.config;\n const selector = `${selectors.controls.wrapper} ${selectors.labels} .${classNames.hidden}`;\n const labels = getElements.call(this, selector);\n\n Array.from(labels).forEach(label => {\n toggleClass(label, this.config.classNames.hidden, false);\n toggleClass(label, this.config.classNames.tooltip, true);\n });\n }\n },\n};\n\nexport default controls;\n","// ==========================================================================\n// URL utils\n// ==========================================================================\n\nimport is from './is';\n\n/**\n * Parse a string to a URL object\n * @param {String} input - the URL to be parsed\n * @param {Boolean} safe - failsafe parsing\n */\nexport function parseUrl(input, safe = true) {\n let url = input;\n\n if (safe) {\n const parser = document.createElement('a');\n parser.href = url;\n url = parser.href;\n }\n\n try {\n return new URL(url);\n } catch (e) {\n return null;\n }\n}\n\n// Convert object to URLSearchParams\nexport function buildUrlParams(input) {\n const params = new URLSearchParams();\n\n if (is.object(input)) {\n Object.entries(input).forEach(([key, value]) => {\n params.set(key, value);\n });\n }\n\n return params;\n}\n","// ==========================================================================\n// Plyr Captions\n// TODO: Create as class\n// ==========================================================================\n\nimport controls from './controls';\nimport support from './support';\nimport { dedupe } from './utils/arrays';\nimport browser from './utils/browser';\nimport {\n createElement,\n emptyElement,\n getAttributesFromSelector,\n insertAfter,\n removeElement,\n toggleClass,\n} from './utils/elements';\nimport { on, triggerEvent } from './utils/events';\nimport fetch from './utils/fetch';\nimport i18n from './utils/i18n';\nimport is from './utils/is';\nimport { getHTML } from './utils/strings';\nimport { parseUrl } from './utils/urls';\n\nconst captions = {\n // Setup captions\n setup() {\n // Requires UI support\n if (!this.supported.ui) {\n return;\n }\n\n // Only Vimeo and HTML5 video supported at this point\n if (!this.isVideo || this.isYouTube || (this.isHTML5 && !support.textTracks)) {\n // Clear menu and hide\n if (\n is.array(this.config.controls) &&\n this.config.controls.includes('settings') &&\n this.config.settings.includes('captions')\n ) {\n controls.setCaptionsMenu.call(this);\n }\n\n return;\n }\n\n // Inject the container\n if (!is.element(this.elements.captions)) {\n this.elements.captions = createElement('div', getAttributesFromSelector(this.config.selectors.captions));\n\n insertAfter(this.elements.captions, this.elements.wrapper);\n }\n\n // Fix IE captions if CORS is used\n // Fetch captions and inject as blobs instead (data URIs not supported!)\n if (browser.isIE && window.URL) {\n const elements = this.media.querySelectorAll('track');\n\n Array.from(elements).forEach(track => {\n const src = track.getAttribute('src');\n const url = parseUrl(src);\n\n if (\n url !== null &&\n url.hostname !== window.location.href.hostname &&\n ['http:', 'https:'].includes(url.protocol)\n ) {\n fetch(src, 'blob')\n .then(blob => {\n track.setAttribute('src', window.URL.createObjectURL(blob));\n })\n .catch(() => {\n removeElement(track);\n });\n }\n });\n }\n\n // Get and set initial data\n // The \"preferred\" options are not realized unless / until the wanted language has a match\n // * languages: Array of user's browser languages.\n // * language: The language preferred by user settings or config\n // * active: The state preferred by user settings or config\n // * toggled: The real captions state\n\n const browserLanguages = navigator.languages || [navigator.language || navigator.userLanguage || 'en'];\n const languages = dedupe(browserLanguages.map(language => language.split('-')[0]));\n let language = (this.storage.get('language') || this.config.captions.language || 'auto').toLowerCase();\n\n // Use first browser language when language is 'auto'\n if (language === 'auto') {\n [language] = languages;\n }\n\n let active = this.storage.get('captions');\n if (!is.boolean(active)) {\n ({ active } = this.config.captions);\n }\n\n Object.assign(this.captions, {\n toggled: false,\n active,\n language,\n languages,\n });\n\n // Watch changes to textTracks and update captions menu\n if (this.isHTML5) {\n const trackEvents = this.config.captions.update ? 'addtrack removetrack' : 'removetrack';\n on.call(this, this.media.textTracks, trackEvents, captions.update.bind(this));\n }\n\n // Update available languages in list next tick (the event must not be triggered before the listeners)\n setTimeout(captions.update.bind(this), 0);\n },\n\n // Update available language options in settings based on tracks\n update() {\n const tracks = captions.getTracks.call(this, true);\n // Get the wanted language\n const { active, language, meta, currentTrackNode } = this.captions;\n const languageExists = Boolean(tracks.find(track => track.language === language));\n\n // Handle tracks (add event listener and \"pseudo\"-default)\n if (this.isHTML5 && this.isVideo) {\n tracks\n .filter(track => !meta.get(track))\n .forEach(track => {\n this.debug.log('Track added', track);\n // Attempt to store if the original dom element was \"default\"\n meta.set(track, {\n default: track.mode === 'showing',\n });\n\n // Turn off native caption rendering to avoid double captions\n // eslint-disable-next-line no-param-reassign\n track.mode = 'hidden';\n\n // Add event listener for cue changes\n on.call(this, track, 'cuechange', () => captions.updateCues.call(this));\n });\n }\n\n // Update language first time it matches, or if the previous matching track was removed\n if ((languageExists && this.language !== language) || !tracks.includes(currentTrackNode)) {\n captions.setLanguage.call(this, language);\n captions.toggle.call(this, active && languageExists);\n }\n\n // Enable or disable captions based on track length\n toggleClass(this.elements.container, this.config.classNames.captions.enabled, !is.empty(tracks));\n\n // Update available languages in list\n if ((this.config.controls || []).includes('settings') && this.config.settings.includes('captions')) {\n controls.setCaptionsMenu.call(this);\n }\n },\n\n // Toggle captions display\n // Used internally for the toggleCaptions method, with the passive option forced to false\n toggle(input, passive = true) {\n // If there's no full support\n if (!this.supported.ui) {\n return;\n }\n\n const { toggled } = this.captions; // Current state\n const activeClass = this.config.classNames.captions.active;\n // Get the next state\n // If the method is called without parameter, toggle based on current value\n const active = is.nullOrUndefined(input) ? !toggled : input;\n\n // Update state and trigger event\n if (active !== toggled) {\n // When passive, don't override user preferences\n if (!passive) {\n this.captions.active = active;\n this.storage.set({ captions: active });\n }\n\n // Force language if the call isn't passive and there is no matching language to toggle to\n if (!this.language && active && !passive) {\n const tracks = captions.getTracks.call(this);\n const track = captions.findTrack.call(this, [this.captions.language, ...this.captions.languages], true);\n\n // Override user preferences to avoid switching languages if a matching track is added\n this.captions.language = track.language;\n\n // Set caption, but don't store in localStorage as user preference\n captions.set.call(this, tracks.indexOf(track));\n return;\n }\n\n // Toggle button if it's enabled\n if (this.elements.buttons.captions) {\n this.elements.buttons.captions.pressed = active;\n }\n\n // Add class hook\n toggleClass(this.elements.container, activeClass, active);\n\n this.captions.toggled = active;\n\n // Update settings menu\n controls.updateSetting.call(this, 'captions');\n\n // Trigger event (not used internally)\n triggerEvent.call(this, this.media, active ? 'captionsenabled' : 'captionsdisabled');\n }\n },\n\n // Set captions by track index\n // Used internally for the currentTrack setter with the passive option forced to false\n set(index, passive = true) {\n const tracks = captions.getTracks.call(this);\n\n // Disable captions if setting to -1\n if (index === -1) {\n captions.toggle.call(this, false, passive);\n return;\n }\n\n if (!is.number(index)) {\n this.debug.warn('Invalid caption argument', index);\n return;\n }\n\n if (!(index in tracks)) {\n this.debug.warn('Track not found', index);\n return;\n }\n\n if (this.captions.currentTrack !== index) {\n this.captions.currentTrack = index;\n const track = tracks[index];\n const { language } = track || {};\n\n // Store reference to node for invalidation on remove\n this.captions.currentTrackNode = track;\n\n // Update settings menu\n controls.updateSetting.call(this, 'captions');\n\n // When passive, don't override user preferences\n if (!passive) {\n this.captions.language = language;\n this.storage.set({ language });\n }\n\n // Handle Vimeo captions\n if (this.isVimeo) {\n this.embed.enableTextTrack(language);\n }\n\n // Trigger event\n triggerEvent.call(this, this.media, 'languagechange');\n }\n\n // Show captions\n captions.toggle.call(this, true, passive);\n\n if (this.isHTML5 && this.isVideo) {\n // If we change the active track while a cue is already displayed we need to update it\n captions.updateCues.call(this);\n }\n },\n\n // Set captions by language\n // Used internally for the language setter with the passive option forced to false\n setLanguage(input, passive = true) {\n if (!is.string(input)) {\n this.debug.warn('Invalid language argument', input);\n return;\n }\n // Normalize\n const language = input.toLowerCase();\n this.captions.language = language;\n\n // Set currentTrack\n const tracks = captions.getTracks.call(this);\n const track = captions.findTrack.call(this, [language]);\n captions.set.call(this, tracks.indexOf(track), passive);\n },\n\n // Get current valid caption tracks\n // If update is false it will also ignore tracks without metadata\n // This is used to \"freeze\" the language options when captions.update is false\n getTracks(update = false) {\n // Handle media or textTracks missing or null\n const tracks = Array.from((this.media || {}).textTracks || []);\n // For HTML5, use cache instead of current tracks when it exists (if captions.update is false)\n // Filter out removed tracks and tracks that aren't captions/subtitles (for example metadata)\n return tracks\n .filter(track => !this.isHTML5 || update || this.captions.meta.has(track))\n .filter(track => ['captions', 'subtitles'].includes(track.kind));\n },\n\n // Match tracks based on languages and get the first\n findTrack(languages, force = false) {\n const tracks = captions.getTracks.call(this);\n const sortIsDefault = track => Number((this.captions.meta.get(track) || {}).default);\n const sorted = Array.from(tracks).sort((a, b) => sortIsDefault(b) - sortIsDefault(a));\n let track;\n\n languages.every(language => {\n track = sorted.find(t => t.language === language);\n return !track; // Break iteration if there is a match\n });\n\n // If no match is found but is required, get first\n return track || (force ? sorted[0] : undefined);\n },\n\n // Get the current track\n getCurrentTrack() {\n return captions.getTracks.call(this)[this.currentTrack];\n },\n\n // Get UI label for track\n getLabel(track) {\n let currentTrack = track;\n\n if (!is.track(currentTrack) && support.textTracks && this.captions.toggled) {\n currentTrack = captions.getCurrentTrack.call(this);\n }\n\n if (is.track(currentTrack)) {\n if (!is.empty(currentTrack.label)) {\n return currentTrack.label;\n }\n\n if (!is.empty(currentTrack.language)) {\n return track.language.toUpperCase();\n }\n\n return i18n.get('enabled', this.config);\n }\n\n return i18n.get('disabled', this.config);\n },\n\n // Update captions using current track's active cues\n // Also optional array argument in case there isn't any track (ex: vimeo)\n updateCues(input) {\n // Requires UI\n if (!this.supported.ui) {\n return;\n }\n\n if (!is.element(this.elements.captions)) {\n this.debug.warn('No captions element to render to');\n return;\n }\n\n // Only accept array or empty input\n if (!is.nullOrUndefined(input) && !Array.isArray(input)) {\n this.debug.warn('updateCues: Invalid input', input);\n return;\n }\n\n let cues = input;\n\n // Get cues from track\n if (!cues) {\n const track = captions.getCurrentTrack.call(this);\n\n cues = Array.from((track || {}).activeCues || [])\n .map(cue => cue.getCueAsHTML())\n .map(getHTML);\n }\n\n // Set new caption text\n const content = cues.map(cueText => cueText.trim()).join('\\n');\n const changed = content !== this.elements.captions.innerHTML;\n\n if (changed) {\n // Empty the container and create a new child element\n emptyElement(this.elements.captions);\n const caption = createElement('span', getAttributesFromSelector(this.config.selectors.caption));\n caption.innerHTML = content;\n this.elements.captions.appendChild(caption);\n\n // Trigger event\n triggerEvent.call(this, this.media, 'cuechange');\n }\n },\n};\n\nexport default captions;\n","// ==========================================================================\n// Plyr default config\n// ==========================================================================\n\nconst defaults = {\n // Disable\n enabled: true,\n\n // Custom media title\n title: '',\n\n // Logging to console\n debug: false,\n\n // Auto play (if supported)\n autoplay: false,\n\n // Only allow one media playing at once (vimeo only)\n autopause: true,\n\n // Allow inline playback on iOS (this effects YouTube/Vimeo - HTML5 requires the attribute present)\n // TODO: Remove iosNative fullscreen option in favour of this (logic needs work)\n playsinline: true,\n\n // Default time to skip when rewind/fast forward\n seekTime: 10,\n\n // Default volume\n volume: 1,\n muted: false,\n\n // Pass a custom duration\n duration: null,\n\n // Display the media duration on load in the current time position\n // If you have opted to display both duration and currentTime, this is ignored\n displayDuration: true,\n\n // Invert the current time to be a countdown\n invertTime: true,\n\n // Clicking the currentTime inverts it's value to show time left rather than elapsed\n toggleInvert: true,\n\n // Force an aspect ratio\n // The format must be `'w:h'` (e.g. `'16:9'`)\n ratio: null,\n\n // Click video container to play/pause\n clickToPlay: true,\n\n // Auto hide the controls\n hideControls: true,\n\n // Reset to start when playback ended\n resetOnEnd: false,\n\n // Disable the standard context menu\n disableContextMenu: true,\n\n // Sprite (for icons)\n loadSprite: true,\n iconPrefix: 'plyr',\n iconUrl: 'https://cdn.plyr.io/3.5.6/plyr.svg',\n\n // Blank video (used to prevent errors on source change)\n blankVideo: 'https://cdn.plyr.io/static/blank.mp4',\n\n // Quality default\n quality: {\n default: 576,\n options: [4320, 2880, 2160, 1440, 1080, 720, 576, 480, 360, 240],\n },\n\n // Set loops\n loop: {\n active: false,\n // start: null,\n // end: null,\n },\n\n // Speed default and options to display\n speed: {\n selected: 1,\n options: [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2],\n },\n\n // Keyboard shortcut settings\n keyboard: {\n focused: true,\n global: false,\n },\n\n // Display tooltips\n tooltips: {\n controls: false,\n seek: true,\n },\n\n // Captions settings\n captions: {\n active: false,\n language: 'auto',\n // Listen to new tracks added after Plyr is initialized.\n // This is needed for streaming captions, but may result in unselectable options\n update: false,\n },\n\n // Fullscreen settings\n fullscreen: {\n enabled: true, // Allow fullscreen?\n fallback: true, // Fallback using full viewport/window\n iosNative: false, // Use the native fullscreen in iOS (disables custom controls)\n },\n\n // Local storage\n storage: {\n enabled: true,\n key: 'plyr',\n },\n\n // Default controls\n controls: [\n 'play-large',\n // 'restart',\n // 'rewind',\n 'play',\n // 'fast-forward',\n 'progress',\n 'current-time',\n // 'duration',\n 'mute',\n 'volume',\n 'captions',\n 'settings',\n 'pip',\n 'airplay',\n // 'download',\n 'fullscreen',\n ],\n settings: ['captions', 'quality', 'speed'],\n\n // Localisation\n i18n: {\n restart: 'Restart',\n rewind: 'Rewind {seektime}s',\n play: 'Play',\n pause: 'Pause',\n fastForward: 'Forward {seektime}s',\n seek: 'Seek',\n seekLabel: '{currentTime} of {duration}',\n played: 'Played',\n buffered: 'Buffered',\n currentTime: 'Current time',\n duration: 'Duration',\n volume: 'Volume',\n mute: 'Mute',\n unmute: 'Unmute',\n enableCaptions: 'Enable captions',\n disableCaptions: 'Disable captions',\n download: 'Download',\n enterFullscreen: 'Enter fullscreen',\n exitFullscreen: 'Exit fullscreen',\n frameTitle: 'Player for {title}',\n captions: 'Captions',\n settings: 'Settings',\n menuBack: 'Go back to previous menu',\n speed: 'Speed',\n normal: 'Normal',\n quality: 'Quality',\n loop: 'Loop',\n start: 'Start',\n end: 'End',\n all: 'All',\n reset: 'Reset',\n disabled: 'Disabled',\n enabled: 'Enabled',\n advertisement: 'Ad',\n qualityBadge: {\n 2160: '4K',\n 1440: 'HD',\n 1080: 'HD',\n 720: 'HD',\n 576: 'SD',\n 480: 'SD',\n },\n },\n\n // URLs\n urls: {\n download: null,\n vimeo: {\n sdk: 'https://player.vimeo.com/api/player.js',\n iframe: 'https://player.vimeo.com/video/{0}?{1}',\n api: 'https://vimeo.com/api/v2/video/{0}.json',\n },\n youtube: {\n sdk: 'https://www.youtube.com/iframe_api',\n api: 'https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}',\n },\n googleIMA: {\n sdk: 'https://imasdk.googleapis.com/js/sdkloader/ima3.js',\n },\n },\n\n // Custom control listeners\n listeners: {\n seek: null,\n play: null,\n pause: null,\n restart: null,\n rewind: null,\n fastForward: null,\n mute: null,\n volume: null,\n captions: null,\n download: null,\n fullscreen: null,\n pip: null,\n airplay: null,\n speed: null,\n quality: null,\n loop: null,\n language: null,\n },\n\n // Events to watch and bubble\n events: [\n // Events to watch on HTML5 media elements and bubble\n // https://developer.mozilla.org/en/docs/Web/Guide/Events/Media_events\n 'ended',\n 'progress',\n 'stalled',\n 'playing',\n 'waiting',\n 'canplay',\n 'canplaythrough',\n 'loadstart',\n 'loadeddata',\n 'loadedmetadata',\n 'timeupdate',\n 'volumechange',\n 'play',\n 'pause',\n 'error',\n 'seeking',\n 'seeked',\n 'emptied',\n 'ratechange',\n 'cuechange',\n\n // Custom events\n 'download',\n 'enterfullscreen',\n 'exitfullscreen',\n 'captionsenabled',\n 'captionsdisabled',\n 'languagechange',\n 'controlshidden',\n 'controlsshown',\n 'ready',\n\n // YouTube\n 'statechange',\n\n // Quality\n 'qualitychange',\n\n // Ads\n 'adsloaded',\n 'adscontentpause',\n 'adscontentresume',\n 'adstarted',\n 'adsmidpoint',\n 'adscomplete',\n 'adsallcomplete',\n 'adsimpression',\n 'adsclick',\n ],\n\n // Selectors\n // Change these to match your template if using custom HTML\n selectors: {\n editable: 'input, textarea, select, [contenteditable]',\n container: '.plyr',\n controls: {\n container: null,\n wrapper: '.plyr__controls',\n },\n labels: '[data-plyr]',\n buttons: {\n play: '[data-plyr=\"play\"]',\n pause: '[data-plyr=\"pause\"]',\n restart: '[data-plyr=\"restart\"]',\n rewind: '[data-plyr=\"rewind\"]',\n fastForward: '[data-plyr=\"fast-forward\"]',\n mute: '[data-plyr=\"mute\"]',\n captions: '[data-plyr=\"captions\"]',\n download: '[data-plyr=\"download\"]',\n fullscreen: '[data-plyr=\"fullscreen\"]',\n pip: '[data-plyr=\"pip\"]',\n airplay: '[data-plyr=\"airplay\"]',\n settings: '[data-plyr=\"settings\"]',\n loop: '[data-plyr=\"loop\"]',\n },\n inputs: {\n seek: '[data-plyr=\"seek\"]',\n volume: '[data-plyr=\"volume\"]',\n speed: '[data-plyr=\"speed\"]',\n language: '[data-plyr=\"language\"]',\n quality: '[data-plyr=\"quality\"]',\n },\n display: {\n currentTime: '.plyr__time--current',\n duration: '.plyr__time--duration',\n buffer: '.plyr__progress__buffer',\n loop: '.plyr__progress__loop', // Used later\n volume: '.plyr__volume--display',\n },\n progress: '.plyr__progress',\n captions: '.plyr__captions',\n caption: '.plyr__caption',\n },\n\n // Class hooks added to the player in different states\n classNames: {\n type: 'plyr--{0}',\n provider: 'plyr--{0}',\n video: 'plyr__video-wrapper',\n embed: 'plyr__video-embed',\n videoFixedRatio: 'plyr__video-wrapper--fixed-ratio',\n embedContainer: 'plyr__video-embed__container',\n poster: 'plyr__poster',\n posterEnabled: 'plyr__poster-enabled',\n ads: 'plyr__ads',\n control: 'plyr__control',\n controlPressed: 'plyr__control--pressed',\n playing: 'plyr--playing',\n paused: 'plyr--paused',\n stopped: 'plyr--stopped',\n loading: 'plyr--loading',\n hover: 'plyr--hover',\n tooltip: 'plyr__tooltip',\n cues: 'plyr__cues',\n hidden: 'plyr__sr-only',\n hideControls: 'plyr--hide-controls',\n isIos: 'plyr--is-ios',\n isTouch: 'plyr--is-touch',\n uiSupported: 'plyr--full-ui',\n noTransition: 'plyr--no-transition',\n display: {\n time: 'plyr__time',\n },\n menu: {\n value: 'plyr__menu__value',\n badge: 'plyr__badge',\n open: 'plyr--menu-open',\n },\n captions: {\n enabled: 'plyr--captions-enabled',\n active: 'plyr--captions-active',\n },\n fullscreen: {\n enabled: 'plyr--fullscreen-enabled',\n fallback: 'plyr--fullscreen-fallback',\n },\n pip: {\n supported: 'plyr--pip-supported',\n active: 'plyr--pip-active',\n },\n airplay: {\n supported: 'plyr--airplay-supported',\n active: 'plyr--airplay-active',\n },\n tabFocus: 'plyr__tab-focus',\n previewThumbnails: {\n // Tooltip thumbs\n thumbContainer: 'plyr__preview-thumb',\n thumbContainerShown: 'plyr__preview-thumb--is-shown',\n imageContainer: 'plyr__preview-thumb__image-container',\n timeContainer: 'plyr__preview-thumb__time-container',\n // Scrubbing\n scrubbingContainer: 'plyr__preview-scrubbing',\n scrubbingContainerShown: 'plyr__preview-scrubbing--is-shown',\n },\n },\n\n // Embed attributes\n attributes: {\n embed: {\n provider: 'data-plyr-provider',\n id: 'data-plyr-embed-id',\n },\n },\n\n // Advertisements plugin\n // Register for an account here: http://vi.ai/publisher-video-monetization/?aid=plyrio\n ads: {\n enabled: false,\n publisherId: '',\n tagUrl: '',\n },\n\n // Preview Thumbnails plugin\n previewThumbnails: {\n enabled: false,\n src: '',\n },\n\n // Vimeo plugin\n vimeo: {\n byline: false,\n portrait: false,\n title: false,\n speed: true,\n transparent: false,\n },\n\n // YouTube plugin\n youtube: {\n noCookie: false, // Whether to use an alternative version of YouTube without cookies\n rel: 0, // No related vids\n showinfo: 0, // Hide info\n iv_load_policy: 3, // Hide annotations\n modestbranding: 1, // Hide logos as much as possible (they still show one in the corner when paused)\n },\n};\n\nexport default defaults;\n","// ==========================================================================\n// Plyr states\n// ==========================================================================\n\nexport const pip = {\n active: 'picture-in-picture',\n inactive: 'inline',\n};\n\nexport default { pip };\n","// ==========================================================================\n// Plyr supported types and providers\n// ==========================================================================\n\nexport const providers = {\n html5: 'html5',\n youtube: 'youtube',\n vimeo: 'vimeo',\n};\n\nexport const types = {\n audio: 'audio',\n video: 'video',\n};\n\n/**\n * Get provider by URL\n * @param {String} url\n */\nexport function getProviderByUrl(url) {\n // YouTube\n if (/^(https?:\\/\\/)?(www\\.)?(youtube\\.com|youtube-nocookie\\.com|youtu\\.?be)\\/.+$/.test(url)) {\n return providers.youtube;\n }\n\n // Vimeo\n if (/^https?:\\/\\/player.vimeo.com\\/video\\/\\d{0,9}(?=\\b|\\/)/.test(url)) {\n return providers.vimeo;\n }\n\n return null;\n}\n\nexport default { providers, types };\n","// ==========================================================================\n// Console wrapper\n// ==========================================================================\n\nconst noop = () => {};\n\nexport default class Console {\n constructor(enabled = false) {\n this.enabled = window.console && enabled;\n\n if (this.enabled) {\n this.log('Debugging enabled');\n }\n }\n\n get log() {\n // eslint-disable-next-line no-console\n return this.enabled ? Function.prototype.bind.call(console.log, console) : noop;\n }\n\n get warn() {\n // eslint-disable-next-line no-console\n return this.enabled ? Function.prototype.bind.call(console.warn, console) : noop;\n }\n\n get error() {\n // eslint-disable-next-line no-console\n return this.enabled ? Function.prototype.bind.call(console.error, console) : noop;\n }\n}\n","// ==========================================================================\n// Fullscreen wrapper\n// https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API#prefixing\n// https://webkit.org/blog/7929/designing-websites-for-iphone-x/\n// ==========================================================================\n\nimport browser from './utils/browser';\nimport { hasClass, toggleClass, trapFocus } from './utils/elements';\nimport { on, triggerEvent } from './utils/events';\nimport is from './utils/is';\n\nfunction onChange() {\n if (!this.enabled) {\n return;\n }\n\n // Update toggle button\n const button = this.player.elements.buttons.fullscreen;\n if (is.element(button)) {\n button.pressed = this.active;\n }\n\n // Trigger an event\n triggerEvent.call(this.player, this.target, this.active ? 'enterfullscreen' : 'exitfullscreen', true);\n\n // Trap focus in container\n if (!browser.isIos) {\n trapFocus.call(this.player, this.target, this.active);\n }\n}\n\nfunction toggleFallback(toggle = false) {\n // Store or restore scroll position\n if (toggle) {\n this.scrollPosition = {\n x: window.scrollX || 0,\n y: window.scrollY || 0,\n };\n } else {\n window.scrollTo(this.scrollPosition.x, this.scrollPosition.y);\n }\n\n // Toggle scroll\n document.body.style.overflow = toggle ? 'hidden' : '';\n\n // Toggle class hook\n toggleClass(this.target, this.player.config.classNames.fullscreen.fallback, toggle);\n\n // Force full viewport on iPhone X+\n if (browser.isIos) {\n let viewport = document.head.querySelector('meta[name=\"viewport\"]');\n const property = 'viewport-fit=cover';\n\n // Inject the viewport meta if required\n if (!viewport) {\n viewport = document.createElement('meta');\n viewport.setAttribute('name', 'viewport');\n }\n\n // Check if the property already exists\n const hasProperty = is.string(viewport.content) && viewport.content.includes(property);\n\n if (toggle) {\n this.cleanupViewport = !hasProperty;\n\n if (!hasProperty) {\n viewport.content += `,${property}`;\n }\n } else if (this.cleanupViewport) {\n viewport.content = viewport.content\n .split(',')\n .filter(part => part.trim() !== property)\n .join(',');\n }\n }\n\n // Toggle button and fire events\n onChange.call(this);\n}\n\nclass Fullscreen {\n constructor(player) {\n // Keep reference to parent\n this.player = player;\n\n // Get prefix\n this.prefix = Fullscreen.prefix;\n this.property = Fullscreen.property;\n\n // Scroll position\n this.scrollPosition = { x: 0, y: 0 };\n\n // Force the use of 'full window/browser' rather than fullscreen\n this.forceFallback = player.config.fullscreen.fallback === 'force';\n\n // Register event listeners\n // Handle event (incase user presses escape etc)\n on.call(\n this.player,\n document,\n this.prefix === 'ms' ? 'MSFullscreenChange' : `${this.prefix}fullscreenchange`,\n () => {\n // TODO: Filter for target??\n onChange.call(this);\n },\n );\n\n // Fullscreen toggle on double click\n on.call(this.player, this.player.elements.container, 'dblclick', event => {\n // Ignore double click in controls\n if (is.element(this.player.elements.controls) && this.player.elements.controls.contains(event.target)) {\n return;\n }\n\n this.toggle();\n });\n\n // Update the UI\n this.update();\n }\n\n // Determine if native supported\n static get native() {\n return !!(\n document.fullscreenEnabled ||\n document.webkitFullscreenEnabled ||\n document.mozFullScreenEnabled ||\n document.msFullscreenEnabled\n );\n }\n\n // If we're actually using native\n get usingNative() {\n return Fullscreen.native && !this.forceFallback;\n }\n\n // Get the prefix for handlers\n static get prefix() {\n // No prefix\n if (is.function(document.exitFullscreen)) {\n return '';\n }\n\n // Check for fullscreen support by vendor prefix\n let value = '';\n const prefixes = ['webkit', 'moz', 'ms'];\n\n prefixes.some(pre => {\n if (is.function(document[`${pre}ExitFullscreen`]) || is.function(document[`${pre}CancelFullScreen`])) {\n value = pre;\n return true;\n }\n\n return false;\n });\n\n return value;\n }\n\n static get property() {\n return this.prefix === 'moz' ? 'FullScreen' : 'Fullscreen';\n }\n\n // Determine if fullscreen is enabled\n get enabled() {\n return (\n (Fullscreen.native || this.player.config.fullscreen.fallback) &&\n this.player.config.fullscreen.enabled &&\n this.player.supported.ui &&\n this.player.isVideo\n );\n }\n\n // Get active state\n get active() {\n if (!this.enabled) {\n return false;\n }\n\n // Fallback using classname\n if (!Fullscreen.native || this.forceFallback) {\n return hasClass(this.target, this.player.config.classNames.fullscreen.fallback);\n }\n\n const element = !this.prefix ? document.fullscreenElement : document[`${this.prefix}${this.property}Element`];\n\n return element === this.target;\n }\n\n // Get target element\n get target() {\n return browser.isIos && this.player.config.fullscreen.iosNative\n ? this.player.media\n : this.player.elements.container;\n }\n\n // Update UI\n update() {\n if (this.enabled) {\n let mode;\n\n if (this.forceFallback) {\n mode = 'Fallback (forced)';\n } else if (Fullscreen.native) {\n mode = 'Native';\n } else {\n mode = 'Fallback';\n }\n\n this.player.debug.log(`${mode} fullscreen enabled`);\n } else {\n this.player.debug.log('Fullscreen not supported and fallback disabled');\n }\n\n // Add styling hook to show button\n toggleClass(this.player.elements.container, this.player.config.classNames.fullscreen.enabled, this.enabled);\n }\n\n // Make an element fullscreen\n enter() {\n if (!this.enabled) {\n return;\n }\n\n // iOS native fullscreen doesn't need the request step\n if (browser.isIos && this.player.config.fullscreen.iosNative) {\n this.target.webkitEnterFullscreen();\n } else if (!Fullscreen.native || this.forceFallback) {\n toggleFallback.call(this, true);\n } else if (!this.prefix) {\n this.target.requestFullscreen();\n } else if (!is.empty(this.prefix)) {\n this.target[`${this.prefix}Request${this.property}`]();\n }\n }\n\n // Bail from fullscreen\n exit() {\n if (!this.enabled) {\n return;\n }\n\n // iOS native fullscreen\n if (browser.isIos && this.player.config.fullscreen.iosNative) {\n this.target.webkitExitFullscreen();\n this.player.play();\n } else if (!Fullscreen.native || this.forceFallback) {\n toggleFallback.call(this, false);\n } else if (!this.prefix) {\n (document.cancelFullScreen || document.exitFullscreen).call(document);\n } else if (!is.empty(this.prefix)) {\n const action = this.prefix === 'moz' ? 'Cancel' : 'Exit';\n document[`${this.prefix}${action}${this.property}`]();\n }\n }\n\n // Toggle state\n toggle() {\n if (!this.active) {\n this.enter();\n } else {\n this.exit();\n }\n }\n}\n\nexport default Fullscreen;\n","// `Math.sign` method implementation\n// https://tc39.github.io/ecma262/#sec-math.sign\nmodule.exports = Math.sign || function sign(x) {\n // eslint-disable-next-line no-self-compare\n return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;\n};\n","// ==========================================================================\n// Load image avoiding xhr/fetch CORS issues\n// Server status can't be obtained this way unfortunately, so this uses \"naturalWidth\" to determine if the image has loaded\n// By default it checks if it is at least 1px, but you can add a second argument to change this\n// ==========================================================================\n\nexport default function loadImage(src, minWidth = 1) {\n return new Promise((resolve, reject) => {\n const image = new Image();\n\n const handler = () => {\n delete image.onload;\n delete image.onerror;\n (image.naturalWidth >= minWidth ? resolve : reject)(image);\n };\n\n Object.assign(image, { onload: handler, onerror: handler, src });\n });\n}\n","var $ = require('../internals/export');\nvar sign = require('../internals/math-sign');\n\n// `Math.sign` method\n// https://tc39.github.io/ecma262/#sec-math.sign\n$({ target: 'Math', stat: true }, {\n sign: sign\n});\n","// ==========================================================================\n// Plyr UI\n// ==========================================================================\n\nimport captions from './captions';\nimport controls from './controls';\nimport support from './support';\nimport browser from './utils/browser';\nimport { getElement, toggleClass } from './utils/elements';\nimport { ready, triggerEvent } from './utils/events';\nimport i18n from './utils/i18n';\nimport is from './utils/is';\nimport loadImage from './utils/load-image';\n\nconst ui = {\n addStyleHook() {\n toggleClass(this.elements.container, this.config.selectors.container.replace('.', ''), true);\n toggleClass(this.elements.container, this.config.classNames.uiSupported, this.supported.ui);\n },\n\n // Toggle native HTML5 media controls\n toggleNativeControls(toggle = false) {\n if (toggle && this.isHTML5) {\n this.media.setAttribute('controls', '');\n } else {\n this.media.removeAttribute('controls');\n }\n },\n\n // Setup the UI\n build() {\n // Re-attach media element listeners\n // TODO: Use event bubbling?\n this.listeners.media();\n\n // Don't setup interface if no support\n if (!this.supported.ui) {\n this.debug.warn(`Basic support only for ${this.provider} ${this.type}`);\n\n // Restore native controls\n ui.toggleNativeControls.call(this, true);\n\n // Bail\n return;\n }\n\n // Inject custom controls if not present\n if (!is.element(this.elements.controls)) {\n // Inject custom controls\n controls.inject.call(this);\n\n // Re-attach control listeners\n this.listeners.controls();\n }\n\n // Remove native controls\n ui.toggleNativeControls.call(this);\n\n // Setup captions for HTML5\n if (this.isHTML5) {\n captions.setup.call(this);\n }\n\n // Reset volume\n this.volume = null;\n\n // Reset mute state\n this.muted = null;\n\n // Reset loop state\n this.loop = null;\n\n // Reset quality setting\n this.quality = null;\n\n // Reset speed\n this.speed = null;\n\n // Reset volume display\n controls.updateVolume.call(this);\n\n // Reset time display\n controls.timeUpdate.call(this);\n\n // Update the UI\n ui.checkPlaying.call(this);\n\n // Check for picture-in-picture support\n toggleClass(\n this.elements.container,\n this.config.classNames.pip.supported,\n support.pip && this.isHTML5 && this.isVideo,\n );\n\n // Check for airplay support\n toggleClass(this.elements.container, this.config.classNames.airplay.supported, support.airplay && this.isHTML5);\n\n // Add iOS class\n toggleClass(this.elements.container, this.config.classNames.isIos, browser.isIos);\n\n // Add touch class\n toggleClass(this.elements.container, this.config.classNames.isTouch, this.touch);\n\n // Ready for API calls\n this.ready = true;\n\n // Ready event at end of execution stack\n setTimeout(() => {\n triggerEvent.call(this, this.media, 'ready');\n }, 0);\n\n // Set the title\n ui.setTitle.call(this);\n\n // Assure the poster image is set, if the property was added before the element was created\n if (this.poster) {\n ui.setPoster.call(this, this.poster, false).catch(() => {});\n }\n\n // Manually set the duration if user has overridden it.\n // The event listeners for it doesn't get called if preload is disabled (#701)\n if (this.config.duration) {\n controls.durationUpdate.call(this);\n }\n },\n\n // Setup aria attribute for play and iframe title\n setTitle() {\n // Find the current text\n let label = i18n.get('play', this.config);\n\n // If there's a media title set, use that for the label\n if (is.string(this.config.title) && !is.empty(this.config.title)) {\n label += `, ${this.config.title}`;\n }\n\n // If there's a play button, set label\n Array.from(this.elements.buttons.play || []).forEach(button => {\n button.setAttribute('aria-label', label);\n });\n\n // Set iframe title\n // https://github.com/sampotts/plyr/issues/124\n if (this.isEmbed) {\n const iframe = getElement.call(this, 'iframe');\n\n if (!is.element(iframe)) {\n return;\n }\n\n // Default to media type\n const title = !is.empty(this.config.title) ? this.config.title : 'video';\n const format = i18n.get('frameTitle', this.config);\n\n iframe.setAttribute('title', format.replace('{title}', title));\n }\n },\n\n // Toggle poster\n togglePoster(enable) {\n toggleClass(this.elements.container, this.config.classNames.posterEnabled, enable);\n },\n\n // Set the poster image (async)\n // Used internally for the poster setter, with the passive option forced to false\n setPoster(poster, passive = true) {\n // Don't override if call is passive\n if (passive && this.poster) {\n return Promise.reject(new Error('Poster already set'));\n }\n\n // Set property synchronously to respect the call order\n this.media.setAttribute('poster', poster);\n\n // Wait until ui is ready\n return (\n ready\n .call(this)\n // Load image\n .then(() => loadImage(poster))\n .catch(err => {\n // Hide poster on error unless it's been set by another call\n if (poster === this.poster) {\n ui.togglePoster.call(this, false);\n }\n // Rethrow\n throw err;\n })\n .then(() => {\n // Prevent race conditions\n if (poster !== this.poster) {\n throw new Error('setPoster cancelled by later call to setPoster');\n }\n })\n .then(() => {\n Object.assign(this.elements.poster.style, {\n backgroundImage: `url('${poster}')`,\n // Reset backgroundSize as well (since it can be set to \"cover\" for padded thumbnails for youtube)\n backgroundSize: '',\n });\n ui.togglePoster.call(this, true);\n return poster;\n })\n );\n },\n\n // Check playing state\n checkPlaying(event) {\n // Class hooks\n toggleClass(this.elements.container, this.config.classNames.playing, this.playing);\n toggleClass(this.elements.container, this.config.classNames.paused, this.paused);\n toggleClass(this.elements.container, this.config.classNames.stopped, this.stopped);\n\n // Set state\n Array.from(this.elements.buttons.play || []).forEach(target => {\n Object.assign(target, { pressed: this.playing });\n });\n\n // Only update controls on non timeupdate events\n if (is.event(event) && event.type === 'timeupdate') {\n return;\n }\n\n // Toggle controls\n ui.toggleControls.call(this);\n },\n\n // Check if media is loading\n checkLoading(event) {\n this.loading = ['stalled', 'waiting'].includes(event.type);\n\n // Clear timer\n clearTimeout(this.timers.loading);\n\n // Timer to prevent flicker when seeking\n this.timers.loading = setTimeout(\n () => {\n // Update progress bar loading class state\n toggleClass(this.elements.container, this.config.classNames.loading, this.loading);\n\n // Update controls visibility\n ui.toggleControls.call(this);\n },\n this.loading ? 250 : 0,\n );\n },\n\n // Toggle controls based on state and `force` argument\n toggleControls(force) {\n const { controls: controlsElement } = this.elements;\n\n if (controlsElement && this.config.hideControls) {\n // Don't hide controls if a touch-device user recently seeked. (Must be limited to touch devices, or it occasionally prevents desktop controls from hiding.)\n const recentTouchSeek = this.touch && this.lastSeekTime + 2000 > Date.now();\n\n // Show controls if force, loading, paused, button interaction, or recent seek, otherwise hide\n this.toggleControls(\n Boolean(\n force ||\n this.loading ||\n this.paused ||\n controlsElement.pressed ||\n controlsElement.hover ||\n recentTouchSeek,\n ),\n );\n }\n },\n};\n\nexport default ui;\n","// ==========================================================================\n// Plyr Event Listeners\n// ==========================================================================\n\nimport controls from './controls';\nimport ui from './ui';\nimport { repaint } from './utils/animation';\nimport browser from './utils/browser';\nimport { getElement, getElements, matches, toggleClass, toggleHidden } from './utils/elements';\nimport { off, on, once, toggleListener, triggerEvent } from './utils/events';\nimport is from './utils/is';\nimport { getAspectRatio, setAspectRatio } from './utils/style';\n\nclass Listeners {\n constructor(player) {\n this.player = player;\n this.lastKey = null;\n this.focusTimer = null;\n this.lastKeyDown = null;\n\n this.handleKey = this.handleKey.bind(this);\n this.toggleMenu = this.toggleMenu.bind(this);\n this.setTabFocus = this.setTabFocus.bind(this);\n this.firstTouch = this.firstTouch.bind(this);\n }\n\n // Handle key presses\n handleKey(event) {\n const { player } = this;\n const { elements } = player;\n const code = event.keyCode ? event.keyCode : event.which;\n const pressed = event.type === 'keydown';\n const repeat = pressed && code === this.lastKey;\n\n // Bail if a modifier key is set\n if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) {\n return;\n }\n\n // If the event is bubbled from the media element\n // Firefox doesn't get the keycode for whatever reason\n if (!is.number(code)) {\n return;\n }\n\n // Seek by the number keys\n const seekByKey = () => {\n // Divide the max duration into 10th's and times by the number value\n player.currentTime = (player.duration / 10) * (code - 48);\n };\n\n // Handle the key on keydown\n // Reset on keyup\n if (pressed) {\n // Check focused element\n // and if the focused element is not editable (e.g. text input)\n // and any that accept key input http://webaim.org/techniques/keyboard/\n const focused = document.activeElement;\n if (is.element(focused)) {\n const { editable } = player.config.selectors;\n const { seek } = elements.inputs;\n\n if (focused !== seek && matches(focused, editable)) {\n return;\n }\n\n if (event.which === 32 && matches(focused, 'button, [role^=\"menuitem\"]')) {\n return;\n }\n }\n\n // Which keycodes should we prevent default\n const preventDefault = [32, 37, 38, 39, 40, 48, 49, 50, 51, 52, 53, 54, 56, 57, 67, 70, 73, 75, 76, 77, 79];\n\n // If the code is found prevent default (e.g. prevent scrolling for arrows)\n if (preventDefault.includes(code)) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n switch (code) {\n case 48:\n case 49:\n case 50:\n case 51:\n case 52:\n case 53:\n case 54:\n case 55:\n case 56:\n case 57:\n // 0-9\n if (!repeat) {\n seekByKey();\n }\n break;\n\n case 32:\n case 75:\n // Space and K key\n if (!repeat) {\n player.togglePlay();\n }\n break;\n\n case 38:\n // Arrow up\n player.increaseVolume(0.1);\n break;\n\n case 40:\n // Arrow down\n player.decreaseVolume(0.1);\n break;\n\n case 77:\n // M key\n if (!repeat) {\n player.muted = !player.muted;\n }\n break;\n\n case 39:\n // Arrow forward\n player.forward();\n break;\n\n case 37:\n // Arrow back\n player.rewind();\n break;\n\n case 70:\n // F key\n player.fullscreen.toggle();\n break;\n\n case 67:\n // C key\n if (!repeat) {\n player.toggleCaptions();\n }\n break;\n\n case 76:\n // L key\n player.loop = !player.loop;\n break;\n\n /* case 73:\n this.setLoop('start');\n break;\n\n case 76:\n this.setLoop();\n break;\n\n case 79:\n this.setLoop('end');\n break; */\n\n default:\n break;\n }\n\n // Escape is handle natively when in full screen\n // So we only need to worry about non native\n if (code === 27 && !player.fullscreen.usingNative && player.fullscreen.active) {\n player.fullscreen.toggle();\n }\n\n // Store last code for next cycle\n this.lastKey = code;\n } else {\n this.lastKey = null;\n }\n }\n\n // Toggle menu\n toggleMenu(event) {\n controls.toggleMenu.call(this.player, event);\n }\n\n // Device is touch enabled\n firstTouch() {\n const { player } = this;\n const { elements } = player;\n\n player.touch = true;\n\n // Add touch class\n toggleClass(elements.container, player.config.classNames.isTouch, true);\n }\n\n setTabFocus(event) {\n const { player } = this;\n const { elements } = player;\n\n clearTimeout(this.focusTimer);\n\n // Ignore any key other than tab\n if (event.type === 'keydown' && event.which !== 9) {\n return;\n }\n\n // Store reference to event timeStamp\n if (event.type === 'keydown') {\n this.lastKeyDown = event.timeStamp;\n }\n\n // Remove current classes\n const removeCurrent = () => {\n const className = player.config.classNames.tabFocus;\n const current = getElements.call(player, `.${className}`);\n toggleClass(current, className, false);\n };\n\n // Determine if a key was pressed to trigger this event\n const wasKeyDown = event.timeStamp - this.lastKeyDown <= 20;\n\n // Ignore focus events if a key was pressed prior\n if (event.type === 'focus' && !wasKeyDown) {\n return;\n }\n\n // Remove all current\n removeCurrent();\n\n // Delay the adding of classname until the focus has changed\n // This event fires before the focusin event\n this.focusTimer = setTimeout(() => {\n const focused = document.activeElement;\n\n // Ignore if current focus element isn't inside the player\n if (!elements.container.contains(focused)) {\n return;\n }\n\n toggleClass(document.activeElement, player.config.classNames.tabFocus, true);\n }, 10);\n }\n\n // Global window & document listeners\n global(toggle = true) {\n const { player } = this;\n\n // Keyboard shortcuts\n if (player.config.keyboard.global) {\n toggleListener.call(player, window, 'keydown keyup', this.handleKey, toggle, false);\n }\n\n // Click anywhere closes menu\n toggleListener.call(player, document.body, 'click', this.toggleMenu, toggle);\n\n // Detect touch by events\n once.call(player, document.body, 'touchstart', this.firstTouch);\n\n // Tab focus detection\n toggleListener.call(player, document.body, 'keydown focus blur', this.setTabFocus, toggle, false, true);\n }\n\n // Container listeners\n container() {\n const { player } = this;\n const { config, elements, timers } = player;\n\n // Keyboard shortcuts\n if (!config.keyboard.global && config.keyboard.focused) {\n on.call(player, elements.container, 'keydown keyup', this.handleKey, false);\n }\n\n // Toggle controls on mouse events and entering fullscreen\n on.call(\n player,\n elements.container,\n 'mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen',\n event => {\n const { controls: controlsElement } = elements;\n\n // Remove button states for fullscreen\n if (controlsElement && event.type === 'enterfullscreen') {\n controlsElement.pressed = false;\n controlsElement.hover = false;\n }\n\n // Show, then hide after a timeout unless another control event occurs\n const show = ['touchstart', 'touchmove', 'mousemove'].includes(event.type);\n let delay = 0;\n\n if (show) {\n ui.toggleControls.call(player, true);\n // Use longer timeout for touch devices\n delay = player.touch ? 3000 : 2000;\n }\n\n // Clear timer\n clearTimeout(timers.controls);\n\n // Set new timer to prevent flicker when seeking\n timers.controls = setTimeout(() => ui.toggleControls.call(player, false), delay);\n },\n );\n\n // Set a gutter for Vimeo\n const setGutter = (ratio, padding, toggle) => {\n if (!player.isVimeo) {\n return;\n }\n\n const target = player.elements.wrapper.firstChild;\n const [, y] = ratio;\n const [videoX, videoY] = getAspectRatio.call(player);\n\n target.style.maxWidth = toggle ? `${(y / videoY) * videoX}px` : null;\n target.style.margin = toggle ? '0 auto' : null;\n };\n\n // Resize on fullscreen change\n const setPlayerSize = measure => {\n // If we don't need to measure the viewport\n if (!measure) {\n return setAspectRatio.call(player);\n }\n\n const rect = elements.container.getBoundingClientRect();\n const { width, height } = rect;\n\n return setAspectRatio.call(player, `${width}:${height}`);\n };\n\n const resized = () => {\n clearTimeout(timers.resized);\n timers.resized = setTimeout(setPlayerSize, 50);\n };\n\n on.call(player, elements.container, 'enterfullscreen exitfullscreen', event => {\n const { target, usingNative } = player.fullscreen;\n\n // Ignore events not from target\n if (target !== elements.container) {\n return;\n }\n\n // If it's not an embed and no ratio specified\n if (!player.isEmbed && is.empty(player.config.ratio)) {\n return;\n }\n\n const isEnter = event.type === 'enterfullscreen';\n // Set the player size when entering fullscreen to viewport size\n const { padding, ratio } = setPlayerSize(isEnter);\n\n // Set Vimeo gutter\n setGutter(ratio, padding, isEnter);\n\n // If not using native fullscreen, we need to check for resizes of viewport\n if (!usingNative) {\n if (isEnter) {\n on.call(player, window, 'resize', resized);\n } else {\n off.call(player, window, 'resize', resized);\n }\n }\n });\n }\n\n // Listen for media events\n media() {\n const { player } = this;\n const { elements } = player;\n\n // Time change on media\n on.call(player, player.media, 'timeupdate seeking seeked', event => controls.timeUpdate.call(player, event));\n\n // Display duration\n on.call(player, player.media, 'durationchange loadeddata loadedmetadata', event =>\n controls.durationUpdate.call(player, event),\n );\n\n // Check for audio tracks on load\n // We can't use `loadedmetadata` as it doesn't seem to have audio tracks at that point\n on.call(player, player.media, 'canplay loadeddata', () => {\n toggleHidden(elements.volume, !player.hasAudio);\n toggleHidden(elements.buttons.mute, !player.hasAudio);\n });\n\n // Handle the media finishing\n on.call(player, player.media, 'ended', () => {\n // Show poster on end\n if (player.isHTML5 && player.isVideo && player.config.resetOnEnd) {\n // Restart\n player.restart();\n }\n });\n\n // Check for buffer progress\n on.call(player, player.media, 'progress playing seeking seeked', event =>\n controls.updateProgress.call(player, event),\n );\n\n // Handle volume changes\n on.call(player, player.media, 'volumechange', event => controls.updateVolume.call(player, event));\n\n // Handle play/pause\n on.call(player, player.media, 'playing play pause ended emptied timeupdate', event =>\n ui.checkPlaying.call(player, event),\n );\n\n // Loading state\n on.call(player, player.media, 'waiting canplay seeked playing', event => ui.checkLoading.call(player, event));\n\n // Click video\n if (player.supported.ui && player.config.clickToPlay && !player.isAudio) {\n // Re-fetch the wrapper\n const wrapper = getElement.call(player, `.${player.config.classNames.video}`);\n\n // Bail if there's no wrapper (this should never happen)\n if (!is.element(wrapper)) {\n return;\n }\n\n // On click play, pause or restart\n on.call(player, elements.container, 'click', event => {\n const targets = [elements.container, wrapper];\n\n // Ignore if click if not container or in video wrapper\n if (!targets.includes(event.target) && !wrapper.contains(event.target)) {\n return;\n }\n\n // Touch devices will just show controls (if hidden)\n if (player.touch && player.config.hideControls) {\n return;\n }\n\n if (player.ended) {\n this.proxy(event, player.restart, 'restart');\n this.proxy(event, player.play, 'play');\n } else {\n this.proxy(event, player.togglePlay, 'play');\n }\n });\n }\n\n // Disable right click\n if (player.supported.ui && player.config.disableContextMenu) {\n on.call(\n player,\n elements.wrapper,\n 'contextmenu',\n event => {\n event.preventDefault();\n },\n false,\n );\n }\n\n // Volume change\n on.call(player, player.media, 'volumechange', () => {\n // Save to storage\n player.storage.set({\n volume: player.volume,\n muted: player.muted,\n });\n });\n\n // Speed change\n on.call(player, player.media, 'ratechange', () => {\n // Update UI\n controls.updateSetting.call(player, 'speed');\n\n // Save to storage\n player.storage.set({ speed: player.speed });\n });\n\n // Quality change\n on.call(player, player.media, 'qualitychange', event => {\n // Update UI\n controls.updateSetting.call(player, 'quality', null, event.detail.quality);\n });\n\n // Update download link when ready and if quality changes\n on.call(player, player.media, 'ready qualitychange', () => {\n controls.setDownloadUrl.call(player);\n });\n\n // Proxy events to container\n // Bubble up key events for Edge\n const proxyEvents = player.config.events.concat(['keyup', 'keydown']).join(' ');\n\n on.call(player, player.media, proxyEvents, event => {\n let { detail = {} } = event;\n\n // Get error details from media\n if (event.type === 'error') {\n detail = player.media.error;\n }\n\n triggerEvent.call(player, elements.container, event.type, true, detail);\n });\n }\n\n // Run default and custom handlers\n proxy(event, defaultHandler, customHandlerKey) {\n const { player } = this;\n const customHandler = player.config.listeners[customHandlerKey];\n const hasCustomHandler = is.function(customHandler);\n let returned = true;\n\n // Execute custom handler\n if (hasCustomHandler) {\n returned = customHandler.call(player, event);\n }\n\n // Only call default handler if not prevented in custom handler\n if (returned && is.function(defaultHandler)) {\n defaultHandler.call(player, event);\n }\n }\n\n // Trigger custom and default handlers\n bind(element, type, defaultHandler, customHandlerKey, passive = true) {\n const { player } = this;\n const customHandler = player.config.listeners[customHandlerKey];\n const hasCustomHandler = is.function(customHandler);\n\n on.call(\n player,\n element,\n type,\n event => this.proxy(event, defaultHandler, customHandlerKey),\n passive && !hasCustomHandler,\n );\n }\n\n // Listen for control events\n controls() {\n const { player } = this;\n const { elements } = player;\n // IE doesn't support input event, so we fallback to change\n const inputEvent = browser.isIE ? 'change' : 'input';\n\n // Play/pause toggle\n if (elements.buttons.play) {\n Array.from(elements.buttons.play).forEach(button => {\n this.bind(button, 'click', player.togglePlay, 'play');\n });\n }\n\n // Pause\n this.bind(elements.buttons.restart, 'click', player.restart, 'restart');\n\n // Rewind\n this.bind(elements.buttons.rewind, 'click', player.rewind, 'rewind');\n\n // Rewind\n this.bind(elements.buttons.fastForward, 'click', player.forward, 'fastForward');\n\n // Mute toggle\n this.bind(\n elements.buttons.mute,\n 'click',\n () => {\n player.muted = !player.muted;\n },\n 'mute',\n );\n\n // Captions toggle\n this.bind(elements.buttons.captions, 'click', () => player.toggleCaptions());\n\n // Download\n this.bind(\n elements.buttons.download,\n 'click',\n () => {\n triggerEvent.call(player, player.media, 'download');\n },\n 'download',\n );\n\n // Fullscreen toggle\n this.bind(\n elements.buttons.fullscreen,\n 'click',\n () => {\n player.fullscreen.toggle();\n },\n 'fullscreen',\n );\n\n // Picture-in-Picture\n this.bind(\n elements.buttons.pip,\n 'click',\n () => {\n player.pip = 'toggle';\n },\n 'pip',\n );\n\n // Airplay\n this.bind(elements.buttons.airplay, 'click', player.airplay, 'airplay');\n\n // Settings menu - click toggle\n this.bind(elements.buttons.settings, 'click', event => {\n // Prevent the document click listener closing the menu\n event.stopPropagation();\n\n controls.toggleMenu.call(player, event);\n });\n\n // Settings menu - keyboard toggle\n // We have to bind to keyup otherwise Firefox triggers a click when a keydown event handler shifts focus\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1220143\n this.bind(\n elements.buttons.settings,\n 'keyup',\n event => {\n const code = event.which;\n\n // We only care about space and return\n if (![13, 32].includes(code)) {\n return;\n }\n\n // Because return triggers a click anyway, all we need to do is set focus\n if (code === 13) {\n controls.focusFirstMenuItem.call(player, null, true);\n return;\n }\n\n // Prevent scroll\n event.preventDefault();\n\n // Prevent playing video (Firefox)\n event.stopPropagation();\n\n // Toggle menu\n controls.toggleMenu.call(player, event);\n },\n null,\n false, // Can't be passive as we're preventing default\n );\n\n // Escape closes menu\n this.bind(elements.settings.menu, 'keydown', event => {\n if (event.which === 27) {\n controls.toggleMenu.call(player, event);\n }\n });\n\n // Set range input alternative \"value\", which matches the tooltip time (#954)\n this.bind(elements.inputs.seek, 'mousedown mousemove', event => {\n const rect = elements.progress.getBoundingClientRect();\n const percent = (100 / rect.width) * (event.pageX - rect.left);\n event.currentTarget.setAttribute('seek-value', percent);\n });\n\n // Pause while seeking\n this.bind(elements.inputs.seek, 'mousedown mouseup keydown keyup touchstart touchend', event => {\n const seek = event.currentTarget;\n const code = event.keyCode ? event.keyCode : event.which;\n const attribute = 'play-on-seeked';\n\n if (is.keyboardEvent(event) && (code !== 39 && code !== 37)) {\n return;\n }\n\n // Record seek time so we can prevent hiding controls for a few seconds after seek\n player.lastSeekTime = Date.now();\n\n // Was playing before?\n const play = seek.hasAttribute(attribute);\n // Done seeking\n const done = ['mouseup', 'touchend', 'keyup'].includes(event.type);\n\n // If we're done seeking and it was playing, resume playback\n if (play && done) {\n seek.removeAttribute(attribute);\n player.play();\n } else if (!done && player.playing) {\n seek.setAttribute(attribute, '');\n player.pause();\n }\n });\n\n // Fix range inputs on iOS\n // Super weird iOS bug where after you interact with an <input type=\"range\">,\n // it takes over further interactions on the page. This is a hack\n if (browser.isIos) {\n const inputs = getElements.call(player, 'input[type=\"range\"]');\n Array.from(inputs).forEach(input => this.bind(input, inputEvent, event => repaint(event.target)));\n }\n\n // Seek\n this.bind(\n elements.inputs.seek,\n inputEvent,\n event => {\n const seek = event.currentTarget;\n // If it exists, use seek-value instead of \"value\" for consistency with tooltip time (#954)\n let seekTo = seek.getAttribute('seek-value');\n\n if (is.empty(seekTo)) {\n seekTo = seek.value;\n }\n\n seek.removeAttribute('seek-value');\n\n player.currentTime = (seekTo / seek.max) * player.duration;\n },\n 'seek',\n );\n\n // Seek tooltip\n this.bind(elements.progress, 'mouseenter mouseleave mousemove', event =>\n controls.updateSeekTooltip.call(player, event),\n );\n\n // Preview thumbnails plugin\n // TODO: Really need to work on some sort of plug-in wide event bus or pub-sub for this\n this.bind(elements.progress, 'mousemove touchmove', event => {\n const { previewThumbnails } = player;\n\n if (previewThumbnails && previewThumbnails.loaded) {\n previewThumbnails.startMove(event);\n }\n });\n\n // Hide thumbnail preview - on mouse click, mouse leave, and video play/seek. All four are required, e.g., for buffering\n this.bind(elements.progress, 'mouseleave click', () => {\n const { previewThumbnails } = player;\n\n if (previewThumbnails && previewThumbnails.loaded) {\n previewThumbnails.endMove(false, true);\n }\n });\n\n // Show scrubbing preview\n this.bind(elements.progress, 'mousedown touchstart', event => {\n const { previewThumbnails } = player;\n\n if (previewThumbnails && previewThumbnails.loaded) {\n previewThumbnails.startScrubbing(event);\n }\n });\n\n this.bind(elements.progress, 'mouseup touchend', event => {\n const { previewThumbnails } = player;\n\n if (previewThumbnails && previewThumbnails.loaded) {\n previewThumbnails.endScrubbing(event);\n }\n });\n\n // Polyfill for lower fill in <input type=\"range\"> for webkit\n if (browser.isWebkit) {\n Array.from(getElements.call(player, 'input[type=\"range\"]')).forEach(element => {\n this.bind(element, 'input', event => controls.updateRangeFill.call(player, event.target));\n });\n }\n\n // Current time invert\n // Only if one time element is used for both currentTime and duration\n if (player.config.toggleInvert && !is.element(elements.display.duration)) {\n this.bind(elements.display.currentTime, 'click', () => {\n // Do nothing if we're at the start\n if (player.currentTime === 0) {\n return;\n }\n\n player.config.invertTime = !player.config.invertTime;\n\n controls.timeUpdate.call(player);\n });\n }\n\n // Volume\n this.bind(\n elements.inputs.volume,\n inputEvent,\n event => {\n player.volume = event.target.value;\n },\n 'volume',\n );\n\n // Update controls.hover state (used for ui.toggleControls to avoid hiding when interacting)\n this.bind(elements.controls, 'mouseenter mouseleave', event => {\n elements.controls.hover = !player.touch && event.type === 'mouseenter';\n });\n\n // Update controls.pressed state (used for ui.toggleControls to avoid hiding when interacting)\n this.bind(elements.controls, 'mousedown mouseup touchstart touchend touchcancel', event => {\n elements.controls.pressed = ['mousedown', 'touchstart'].includes(event.type);\n });\n\n // Show controls when they receive focus (e.g., when using keyboard tab key)\n this.bind(elements.controls, 'focusin', () => {\n const { config, timers } = player;\n\n // Skip transition to prevent focus from scrolling the parent element\n toggleClass(elements.controls, config.classNames.noTransition, true);\n\n // Toggle\n ui.toggleControls.call(player, true);\n\n // Restore transition\n setTimeout(() => {\n toggleClass(elements.controls, config.classNames.noTransition, false);\n }, 0);\n\n // Delay a little more for mouse users\n const delay = this.touch ? 3000 : 4000;\n\n // Clear timer\n clearTimeout(timers.controls);\n\n // Hide again after delay\n timers.controls = setTimeout(() => ui.toggleControls.call(player, false), delay);\n });\n\n // Mouse wheel for volume\n this.bind(\n elements.inputs.volume,\n 'wheel',\n event => {\n // Detect \"natural\" scroll - suppored on OS X Safari only\n // Other browsers on OS X will be inverted until support improves\n const inverted = event.webkitDirectionInvertedFromDevice;\n // Get delta from event. Invert if `inverted` is true\n const [x, y] = [event.deltaX, -event.deltaY].map(value => (inverted ? -value : value));\n // Using the biggest delta, normalize to 1 or -1 (or 0 if no delta)\n const direction = Math.sign(Math.abs(x) > Math.abs(y) ? x : y);\n\n // Change the volume by 2%\n player.increaseVolume(direction / 50);\n\n // Don't break page scrolling at max and min\n const { volume } = player.media;\n if ((direction === 1 && volume < 1) || (direction === -1 && volume > 0)) {\n event.preventDefault();\n }\n },\n 'volume',\n false,\n );\n }\n}\n\nexport default Listeners;\n","var DESCRIPTORS = require('../internals/descriptors');\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar FunctionPrototype = Function.prototype;\nvar FunctionPrototypeToString = FunctionPrototype.toString;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// Function instances `.name` property\n// https://tc39.github.io/ecma262/#sec-function-instances-name\nif (DESCRIPTORS && !(NAME in FunctionPrototype)) {\n defineProperty(FunctionPrototype, NAME, {\n configurable: true,\n get: function () {\n try {\n return FunctionPrototypeToString.call(this).match(nameRE)[1];\n } catch (error) {\n return '';\n }\n }\n });\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toObject = require('../internals/to-object');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar createProperty = require('../internals/create-property');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar max = Math.max;\nvar min = Math.min;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';\n\n// `Array.prototype.splice` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.splice\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('splice') }, {\n splice: function splice(start, deleteCount /* , ...items */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var actualStart = toAbsoluteIndex(start, len);\n var argumentsLength = arguments.length;\n var insertCount, actualDeleteCount, A, k, from, to;\n if (argumentsLength === 0) {\n insertCount = actualDeleteCount = 0;\n } else if (argumentsLength === 1) {\n insertCount = 0;\n actualDeleteCount = len - actualStart;\n } else {\n insertCount = argumentsLength - 2;\n actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);\n }\n if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {\n throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);\n }\n A = arraySpeciesCreate(O, actualDeleteCount);\n for (k = 0; k < actualDeleteCount; k++) {\n from = actualStart + k;\n if (from in O) createProperty(A, k, O[from]);\n }\n A.length = actualDeleteCount;\n if (insertCount < actualDeleteCount) {\n for (k = actualStart; k < len - actualDeleteCount; k++) {\n from = k + actualDeleteCount;\n to = k + insertCount;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];\n } else if (insertCount > actualDeleteCount) {\n for (k = len - actualDeleteCount; k > actualStart; k--) {\n from = k + actualDeleteCount - 1;\n to = k + insertCount - 1;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n }\n for (k = 0; k < insertCount; k++) {\n O[k + actualStart] = arguments[k + 2];\n }\n O.length = len - actualDeleteCount + insertCount;\n return A;\n }\n});\n","(function(root, factory) {\n if (typeof define === 'function' && define.amd) {\n define([], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.loadjs = factory();\n }\n}(this, function() {\n/**\n * Global dependencies.\n * @global {Object} document - DOM\n */\n\nvar devnull = function() {},\n bundleIdCache = {},\n bundleResultCache = {},\n bundleCallbackQueue = {};\n\n\n/**\n * Subscribe to bundle load event.\n * @param {string[]} bundleIds - Bundle ids\n * @param {Function} callbackFn - The callback function\n */\nfunction subscribe(bundleIds, callbackFn) {\n // listify\n bundleIds = bundleIds.push ? bundleIds : [bundleIds];\n\n var depsNotFound = [],\n i = bundleIds.length,\n numWaiting = i,\n fn,\n bundleId,\n r,\n q;\n\n // define callback function\n fn = function (bundleId, pathsNotFound) {\n if (pathsNotFound.length) depsNotFound.push(bundleId);\n\n numWaiting--;\n if (!numWaiting) callbackFn(depsNotFound);\n };\n\n // register callback\n while (i--) {\n bundleId = bundleIds[i];\n\n // execute callback if in result cache\n r = bundleResultCache[bundleId];\n if (r) {\n fn(bundleId, r);\n continue;\n }\n\n // add to callback queue\n q = bundleCallbackQueue[bundleId] = bundleCallbackQueue[bundleId] || [];\n q.push(fn);\n }\n}\n\n\n/**\n * Publish bundle load event.\n * @param {string} bundleId - Bundle id\n * @param {string[]} pathsNotFound - List of files not found\n */\nfunction publish(bundleId, pathsNotFound) {\n // exit if id isn't defined\n if (!bundleId) return;\n\n var q = bundleCallbackQueue[bundleId];\n\n // cache result\n bundleResultCache[bundleId] = pathsNotFound;\n\n // exit if queue is empty\n if (!q) return;\n\n // empty callback queue\n while (q.length) {\n q[0](bundleId, pathsNotFound);\n q.splice(0, 1);\n }\n}\n\n\n/**\n * Execute callbacks.\n * @param {Object or Function} args - The callback args\n * @param {string[]} depsNotFound - List of dependencies not found\n */\nfunction executeCallbacks(args, depsNotFound) {\n // accept function as argument\n if (args.call) args = {success: args};\n\n // success and error callbacks\n if (depsNotFound.length) (args.error || devnull)(depsNotFound);\n else (args.success || devnull)(args);\n}\n\n\n/**\n * Load individual file.\n * @param {string} path - The file path\n * @param {Function} callbackFn - The callback function\n */\nfunction loadFile(path, callbackFn, args, numTries) {\n var doc = document,\n async = args.async,\n maxTries = (args.numRetries || 0) + 1,\n beforeCallbackFn = args.before || devnull,\n pathStripped = path.replace(/^(css|img)!/, ''),\n isLegacyIECss,\n e;\n\n numTries = numTries || 0;\n\n if (/(^css!|\\.css$)/.test(path)) {\n // css\n e = doc.createElement('link');\n e.rel = 'stylesheet';\n e.href = pathStripped;\n\n // tag IE9+\n isLegacyIECss = 'hideFocus' in e;\n\n // use preload in IE Edge (to detect load errors)\n if (isLegacyIECss && e.relList) {\n isLegacyIECss = 0;\n e.rel = 'preload';\n e.as = 'style';\n }\n } else if (/(^img!|\\.(png|gif|jpg|svg)$)/.test(path)) {\n // image\n e = doc.createElement('img');\n e.src = pathStripped; \n } else {\n // javascript\n e = doc.createElement('script');\n e.src = path;\n e.async = async === undefined ? true : async;\n }\n\n e.onload = e.onerror = e.onbeforeload = function (ev) {\n var result = ev.type[0];\n\n // treat empty stylesheets as failures to get around lack of onerror\n // support in IE9-11\n if (isLegacyIECss) {\n try {\n if (!e.sheet.cssText.length) result = 'e';\n } catch (x) {\n // sheets objects created from load errors don't allow access to\n // `cssText` (unless error is Code:18 SecurityError)\n if (x.code != 18) result = 'e';\n }\n }\n\n // handle retries in case of load failure\n if (result == 'e') {\n // increment counter\n numTries += 1;\n\n // exit function and try again\n if (numTries < maxTries) {\n return loadFile(path, callbackFn, args, numTries);\n }\n } else if (e.rel == 'preload' && e.as == 'style') {\n // activate preloaded stylesheets\n return e.rel = 'stylesheet'; // jshint ignore:line\n }\n \n // execute callback\n callbackFn(path, result, ev.defaultPrevented);\n };\n\n // add to document (unless callback returns `false`)\n if (beforeCallbackFn(path, e) !== false) doc.head.appendChild(e);\n}\n\n\n/**\n * Load multiple files.\n * @param {string[]} paths - The file paths\n * @param {Function} callbackFn - The callback function\n */\nfunction loadFiles(paths, callbackFn, args) {\n // listify paths\n paths = paths.push ? paths : [paths];\n\n var numWaiting = paths.length,\n x = numWaiting,\n pathsNotFound = [],\n fn,\n i;\n\n // define callback function\n fn = function(path, result, defaultPrevented) {\n // handle error\n if (result == 'e') pathsNotFound.push(path);\n\n // handle beforeload event. If defaultPrevented then that means the load\n // will be blocked (ex. Ghostery/ABP on Safari)\n if (result == 'b') {\n if (defaultPrevented) pathsNotFound.push(path);\n else return;\n }\n\n numWaiting--;\n if (!numWaiting) callbackFn(pathsNotFound);\n };\n\n // load scripts\n for (i=0; i < x; i++) loadFile(paths[i], fn, args);\n}\n\n\n/**\n * Initiate script load and register bundle.\n * @param {(string|string[])} paths - The file paths\n * @param {(string|Function|Object)} [arg1] - The (1) bundleId or (2) success\n * callback or (3) object literal with success/error arguments, numRetries,\n * etc.\n * @param {(Function|Object)} [arg2] - The (1) success callback or (2) object\n * literal with success/error arguments, numRetries, etc.\n */\nfunction loadjs(paths, arg1, arg2) {\n var bundleId,\n args;\n\n // bundleId (if string)\n if (arg1 && arg1.trim) bundleId = arg1;\n\n // args (default is {})\n args = (bundleId ? arg2 : arg1) || {};\n\n // throw error if bundle is already defined\n if (bundleId) {\n if (bundleId in bundleIdCache) {\n throw \"LoadJS\";\n } else {\n bundleIdCache[bundleId] = true;\n }\n }\n\n function loadFn(resolve, reject) {\n loadFiles(paths, function (pathsNotFound) {\n // execute callbacks\n executeCallbacks(args, pathsNotFound);\n \n // resolve Promise\n if (resolve) {\n executeCallbacks({success: resolve, error: reject}, pathsNotFound);\n }\n\n // publish bundle load event\n publish(bundleId, pathsNotFound);\n }, args);\n }\n \n if (args.returnPromise) return new Promise(loadFn);\n else loadFn();\n}\n\n\n/**\n * Execute callbacks when dependencies have been satisfied.\n * @param {(string|string[])} deps - List of bundle ids\n * @param {Object} args - success/error arguments\n */\nloadjs.ready = function ready(deps, args) {\n // subscribe to bundle load event\n subscribe(deps, function (depsNotFound) {\n // execute callbacks\n executeCallbacks(args, depsNotFound);\n });\n\n return loadjs;\n};\n\n\n/**\n * Manually satisfy bundle dependencies.\n * @param {string} bundleId - The bundle id\n */\nloadjs.done = function done(bundleId) {\n publish(bundleId, []);\n};\n\n\n/**\n * Reset loadjs dependencies statuses\n */\nloadjs.reset = function reset() {\n bundleIdCache = {};\n bundleResultCache = {};\n bundleCallbackQueue = {};\n};\n\n\n/**\n * Determine if bundle has already been defined\n * @param String} bundleId - The bundle id\n */\nloadjs.isDefined = function isDefined(bundleId) {\n return bundleId in bundleIdCache;\n};\n\n\n// export\nreturn loadjs;\n\n}));\n","// ==========================================================================\n// Load an external script\n// ==========================================================================\n\nimport loadjs from 'loadjs';\n\nexport default function loadScript(url) {\n return new Promise((resolve, reject) => {\n loadjs(url, {\n success: resolve,\n error: reject,\n });\n });\n}\n","// ==========================================================================\n// Vimeo plugin\n// ==========================================================================\n\nimport captions from '../captions';\nimport controls from '../controls';\nimport ui from '../ui';\nimport { createElement, replaceElement, toggleClass } from '../utils/elements';\nimport { triggerEvent } from '../utils/events';\nimport fetch from '../utils/fetch';\nimport is from '../utils/is';\nimport loadScript from '../utils/load-script';\nimport { extend } from '../utils/objects';\nimport { format, stripHTML } from '../utils/strings';\nimport { setAspectRatio } from '../utils/style';\nimport { buildUrlParams } from '../utils/urls';\n\n// Parse Vimeo ID from URL\nfunction parseId(url) {\n if (is.empty(url)) {\n return null;\n }\n\n if (is.number(Number(url))) {\n return url;\n }\n\n const regex = /^.*(vimeo.com\\/|video\\/)(\\d+).*/;\n return url.match(regex) ? RegExp.$2 : url;\n}\n\n// Set playback state and trigger change (only on actual change)\nfunction assurePlaybackState(play) {\n if (play && !this.embed.hasPlayed) {\n this.embed.hasPlayed = true;\n }\n if (this.media.paused === play) {\n this.media.paused = !play;\n triggerEvent.call(this, this.media, play ? 'play' : 'pause');\n }\n}\n\nconst vimeo = {\n setup() {\n // Add embed class for responsive\n toggleClass(this.elements.wrapper, this.config.classNames.embed, true);\n\n // Set intial ratio\n setAspectRatio.call(this);\n\n // Load the SDK if not already\n if (!is.object(window.Vimeo)) {\n loadScript(this.config.urls.vimeo.sdk)\n .then(() => {\n vimeo.ready.call(this);\n })\n .catch(error => {\n this.debug.warn('Vimeo SDK (player.js) failed to load', error);\n });\n } else {\n vimeo.ready.call(this);\n }\n },\n\n // API Ready\n ready() {\n const player = this;\n const config = player.config.vimeo;\n\n // Get Vimeo params for the iframe\n const params = buildUrlParams(\n extend(\n {},\n {\n loop: player.config.loop.active,\n autoplay: player.autoplay,\n muted: player.muted,\n gesture: 'media',\n playsinline: !this.config.fullscreen.iosNative,\n },\n config,\n ),\n );\n\n // Get the source URL or ID\n let source = player.media.getAttribute('src');\n\n // Get from <div> if needed\n if (is.empty(source)) {\n source = player.media.getAttribute(player.config.attributes.embed.id);\n }\n\n const id = parseId(source);\n // Build an iframe\n const iframe = createElement('iframe');\n const src = format(player.config.urls.vimeo.iframe, id, params);\n iframe.setAttribute('src', src);\n iframe.setAttribute('allowfullscreen', '');\n iframe.setAttribute('allowtransparency', '');\n iframe.setAttribute('allow', 'autoplay');\n\n // Get poster, if already set\n const { poster } = player;\n // Inject the package\n const wrapper = createElement('div', { poster, class: player.config.classNames.embedContainer });\n wrapper.appendChild(iframe);\n player.media = replaceElement(wrapper, player.media);\n\n // Get poster image\n fetch(format(player.config.urls.vimeo.api, id), 'json').then(response => {\n if (is.empty(response)) {\n return;\n }\n\n // Get the URL for thumbnail\n const url = new URL(response[0].thumbnail_large);\n\n // Get original image\n url.pathname = `${url.pathname.split('_')[0]}.jpg`;\n\n // Set and show poster\n ui.setPoster.call(player, url.href).catch(() => {});\n });\n\n // Setup instance\n // https://github.com/vimeo/player.js\n player.embed = new window.Vimeo.Player(iframe, {\n autopause: player.config.autopause,\n muted: player.muted,\n });\n\n player.media.paused = true;\n player.media.currentTime = 0;\n\n // Disable native text track rendering\n if (player.supported.ui) {\n player.embed.disableTextTrack();\n }\n\n // Create a faux HTML5 API using the Vimeo API\n player.media.play = () => {\n assurePlaybackState.call(player, true);\n return player.embed.play();\n };\n\n player.media.pause = () => {\n assurePlaybackState.call(player, false);\n return player.embed.pause();\n };\n\n player.media.stop = () => {\n player.pause();\n player.currentTime = 0;\n };\n\n // Seeking\n let { currentTime } = player.media;\n Object.defineProperty(player.media, 'currentTime', {\n get() {\n return currentTime;\n },\n set(time) {\n // Vimeo will automatically play on seek if the video hasn't been played before\n\n // Get current paused state and volume etc\n const { embed, media, paused, volume } = player;\n const restorePause = paused && !embed.hasPlayed;\n\n // Set seeking state and trigger event\n media.seeking = true;\n triggerEvent.call(player, media, 'seeking');\n\n // If paused, mute until seek is complete\n Promise.resolve(restorePause && embed.setVolume(0))\n // Seek\n .then(() => embed.setCurrentTime(time))\n // Restore paused\n .then(() => restorePause && embed.pause())\n // Restore volume\n .then(() => restorePause && embed.setVolume(volume))\n .catch(() => {\n // Do nothing\n });\n },\n });\n\n // Playback speed\n let speed = player.config.speed.selected;\n Object.defineProperty(player.media, 'playbackRate', {\n get() {\n return speed;\n },\n set(input) {\n player.embed\n .setPlaybackRate(input)\n .then(() => {\n speed = input;\n triggerEvent.call(player, player.media, 'ratechange');\n })\n .catch(error => {\n // Hide menu item (and menu if empty)\n if (error.name === 'Error') {\n controls.setSpeedMenu.call(player, []);\n }\n });\n },\n });\n\n // Volume\n let { volume } = player.config;\n Object.defineProperty(player.media, 'volume', {\n get() {\n return volume;\n },\n set(input) {\n player.embed.setVolume(input).then(() => {\n volume = input;\n triggerEvent.call(player, player.media, 'volumechange');\n });\n },\n });\n\n // Muted\n let { muted } = player.config;\n Object.defineProperty(player.media, 'muted', {\n get() {\n return muted;\n },\n set(input) {\n const toggle = is.boolean(input) ? input : false;\n\n player.embed.setVolume(toggle ? 0 : player.config.volume).then(() => {\n muted = toggle;\n triggerEvent.call(player, player.media, 'volumechange');\n });\n },\n });\n\n // Loop\n let { loop } = player.config;\n Object.defineProperty(player.media, 'loop', {\n get() {\n return loop;\n },\n set(input) {\n const toggle = is.boolean(input) ? input : player.config.loop.active;\n\n player.embed.setLoop(toggle).then(() => {\n loop = toggle;\n });\n },\n });\n\n // Source\n let currentSrc;\n player.embed\n .getVideoUrl()\n .then(value => {\n currentSrc = value;\n controls.setDownloadUrl.call(player);\n })\n .catch(error => {\n this.debug.warn(error);\n });\n\n Object.defineProperty(player.media, 'currentSrc', {\n get() {\n return currentSrc;\n },\n });\n\n // Ended\n Object.defineProperty(player.media, 'ended', {\n get() {\n return player.currentTime === player.duration;\n },\n });\n\n // Set aspect ratio based on video size\n Promise.all([player.embed.getVideoWidth(), player.embed.getVideoHeight()]).then(dimensions => {\n const [width, height] = dimensions;\n player.embed.ratio = [width, height];\n setAspectRatio.call(this);\n });\n\n // Set autopause\n player.embed.setAutopause(player.config.autopause).then(state => {\n player.config.autopause = state;\n });\n\n // Get title\n player.embed.getVideoTitle().then(title => {\n player.config.title = title;\n ui.setTitle.call(this);\n });\n\n // Get current time\n player.embed.getCurrentTime().then(value => {\n currentTime = value;\n triggerEvent.call(player, player.media, 'timeupdate');\n });\n\n // Get duration\n player.embed.getDuration().then(value => {\n player.media.duration = value;\n triggerEvent.call(player, player.media, 'durationchange');\n });\n\n // Get captions\n player.embed.getTextTracks().then(tracks => {\n player.media.textTracks = tracks;\n captions.setup.call(player);\n });\n\n player.embed.on('cuechange', ({ cues = [] }) => {\n const strippedCues = cues.map(cue => stripHTML(cue.text));\n captions.updateCues.call(player, strippedCues);\n });\n\n player.embed.on('loaded', () => {\n // Assure state and events are updated on autoplay\n player.embed.getPaused().then(paused => {\n assurePlaybackState.call(player, !paused);\n if (!paused) {\n triggerEvent.call(player, player.media, 'playing');\n }\n });\n\n if (is.element(player.embed.element) && player.supported.ui) {\n const frame = player.embed.element;\n\n // Fix keyboard focus issues\n // https://github.com/sampotts/plyr/issues/317\n frame.setAttribute('tabindex', -1);\n }\n });\n\n player.embed.on('play', () => {\n assurePlaybackState.call(player, true);\n triggerEvent.call(player, player.media, 'playing');\n });\n\n player.embed.on('pause', () => {\n assurePlaybackState.call(player, false);\n });\n\n player.embed.on('timeupdate', data => {\n player.media.seeking = false;\n currentTime = data.seconds;\n triggerEvent.call(player, player.media, 'timeupdate');\n });\n\n player.embed.on('progress', data => {\n player.media.buffered = data.percent;\n triggerEvent.call(player, player.media, 'progress');\n\n // Check all loaded\n if (parseInt(data.percent, 10) === 1) {\n triggerEvent.call(player, player.media, 'canplaythrough');\n }\n\n // Get duration as if we do it before load, it gives an incorrect value\n // https://github.com/sampotts/plyr/issues/891\n player.embed.getDuration().then(value => {\n if (value !== player.media.duration) {\n player.media.duration = value;\n triggerEvent.call(player, player.media, 'durationchange');\n }\n });\n });\n\n player.embed.on('seeked', () => {\n player.media.seeking = false;\n triggerEvent.call(player, player.media, 'seeked');\n });\n\n player.embed.on('ended', () => {\n player.media.paused = true;\n triggerEvent.call(player, player.media, 'ended');\n });\n\n player.embed.on('error', detail => {\n player.media.error = detail;\n triggerEvent.call(player, player.media, 'error');\n });\n\n // Rebuild UI\n setTimeout(() => ui.build.call(player), 0);\n },\n};\n\nexport default vimeo;\n","// ==========================================================================\n// YouTube plugin\n// ==========================================================================\n\nimport ui from '../ui';\nimport { createElement, replaceElement, toggleClass } from '../utils/elements';\nimport { triggerEvent } from '../utils/events';\nimport fetch from '../utils/fetch';\nimport is from '../utils/is';\nimport loadImage from '../utils/load-image';\nimport loadScript from '../utils/load-script';\nimport { extend } from '../utils/objects';\nimport { format, generateId } from '../utils/strings';\nimport { setAspectRatio } from '../utils/style';\n\n// Parse YouTube ID from URL\nfunction parseId(url) {\n if (is.empty(url)) {\n return null;\n }\n\n const regex = /^.*(youtu.be\\/|v\\/|u\\/\\w\\/|embed\\/|watch\\?v=|&v=)([^#&?]*).*/;\n return url.match(regex) ? RegExp.$2 : url;\n}\n\n// Set playback state and trigger change (only on actual change)\nfunction assurePlaybackState(play) {\n if (play && !this.embed.hasPlayed) {\n this.embed.hasPlayed = true;\n }\n if (this.media.paused === play) {\n this.media.paused = !play;\n triggerEvent.call(this, this.media, play ? 'play' : 'pause');\n }\n}\n\nfunction getHost(config) {\n if (config.noCookie) {\n return 'https://www.youtube-nocookie.com';\n }\n\n if (window.location.protocol === 'http:') {\n return 'http://www.youtube.com';\n }\n\n // Use YouTube's default\n return undefined;\n}\n\nconst youtube = {\n setup() {\n // Add embed class for responsive\n toggleClass(this.elements.wrapper, this.config.classNames.embed, true);\n\n // Setup API\n if (is.object(window.YT) && is.function(window.YT.Player)) {\n youtube.ready.call(this);\n } else {\n // Reference current global callback\n const callback = window.onYouTubeIframeAPIReady;\n\n // Set callback to process queue\n window.onYouTubeIframeAPIReady = () => {\n // Call global callback if set\n if (is.function(callback)) {\n callback();\n }\n\n youtube.ready.call(this);\n };\n\n // Load the SDK\n loadScript(this.config.urls.youtube.sdk).catch(error => {\n this.debug.warn('YouTube API failed to load', error);\n });\n }\n },\n\n // Get the media title\n getTitle(videoId) {\n const url = format(this.config.urls.youtube.api, videoId);\n\n fetch(url)\n .then(data => {\n if (is.object(data)) {\n const { title, height, width } = data;\n\n // Set title\n this.config.title = title;\n ui.setTitle.call(this);\n\n // Set aspect ratio\n this.embed.ratio = [width, height];\n }\n\n setAspectRatio.call(this);\n })\n .catch(() => {\n // Set aspect ratio\n setAspectRatio.call(this);\n });\n },\n\n // API ready\n ready() {\n const player = this;\n // Ignore already setup (race condition)\n const currentId = player.media && player.media.getAttribute('id');\n if (!is.empty(currentId) && currentId.startsWith('youtube-')) {\n return;\n }\n\n // Get the source URL or ID\n let source = player.media.getAttribute('src');\n\n // Get from <div> if needed\n if (is.empty(source)) {\n source = player.media.getAttribute(this.config.attributes.embed.id);\n }\n\n // Replace the <iframe> with a <div> due to YouTube API issues\n const videoId = parseId(source);\n const id = generateId(player.provider);\n // Get poster, if already set\n const { poster } = player;\n // Replace media element\n const container = createElement('div', { id, poster });\n player.media = replaceElement(container, player.media);\n\n // Id to poster wrapper\n const posterSrc = s => `https://i.ytimg.com/vi/${videoId}/${s}default.jpg`;\n\n // Check thumbnail images in order of quality, but reject fallback thumbnails (120px wide)\n loadImage(posterSrc('maxres'), 121) // Higest quality and unpadded\n .catch(() => loadImage(posterSrc('sd'), 121)) // 480p padded 4:3\n .catch(() => loadImage(posterSrc('hq'))) // 360p padded 4:3. Always exists\n .then(image => ui.setPoster.call(player, image.src))\n .then(src => {\n // If the image is padded, use background-size \"cover\" instead (like youtube does too with their posters)\n if (!src.includes('maxres')) {\n player.elements.poster.style.backgroundSize = 'cover';\n }\n })\n .catch(() => {});\n\n const config = player.config.youtube;\n\n // Setup instance\n // https://developers.google.com/youtube/iframe_api_reference\n player.embed = new window.YT.Player(id, {\n videoId,\n host: getHost(config),\n playerVars: extend(\n {},\n {\n autoplay: player.config.autoplay ? 1 : 0, // Autoplay\n hl: player.config.hl, // iframe interface language\n controls: player.supported.ui ? 0 : 1, // Only show controls if not fully supported\n disablekb: 1, // Disable keyboard as we handle it\n playsinline: !player.config.fullscreen.iosNative ? 1 : 0, // Allow iOS inline playback\n // Captions are flaky on YouTube\n cc_load_policy: player.captions.active ? 1 : 0,\n cc_lang_pref: player.config.captions.language,\n // Tracking for stats\n widget_referrer: window ? window.location.href : null,\n },\n config,\n ),\n events: {\n onError(event) {\n // YouTube may fire onError twice, so only handle it once\n if (!player.media.error) {\n const code = event.data;\n // Messages copied from https://developers.google.com/youtube/iframe_api_reference#onError\n const message =\n {\n 2: 'The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.',\n 5: 'The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.',\n 100: 'The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.',\n 101: 'The owner of the requested video does not allow it to be played in embedded players.',\n 150: 'The owner of the requested video does not allow it to be played in embedded players.',\n }[code] || 'An unknown error occured';\n\n player.media.error = { code, message };\n\n triggerEvent.call(player, player.media, 'error');\n }\n },\n onPlaybackRateChange(event) {\n // Get the instance\n const instance = event.target;\n\n // Get current speed\n player.media.playbackRate = instance.getPlaybackRate();\n\n triggerEvent.call(player, player.media, 'ratechange');\n },\n onReady(event) {\n // Bail if onReady has already been called. See issue #1108\n if (is.function(player.media.play)) {\n return;\n }\n // Get the instance\n const instance = event.target;\n\n // Get the title\n youtube.getTitle.call(player, videoId);\n\n // Create a faux HTML5 API using the YouTube API\n player.media.play = () => {\n assurePlaybackState.call(player, true);\n instance.playVideo();\n };\n\n player.media.pause = () => {\n assurePlaybackState.call(player, false);\n instance.pauseVideo();\n };\n\n player.media.stop = () => {\n instance.stopVideo();\n };\n\n player.media.duration = instance.getDuration();\n player.media.paused = true;\n\n // Seeking\n player.media.currentTime = 0;\n Object.defineProperty(player.media, 'currentTime', {\n get() {\n return Number(instance.getCurrentTime());\n },\n set(time) {\n // If paused and never played, mute audio preventively (YouTube starts playing on seek if the video hasn't been played yet).\n if (player.paused && !player.embed.hasPlayed) {\n player.embed.mute();\n }\n\n // Set seeking state and trigger event\n player.media.seeking = true;\n triggerEvent.call(player, player.media, 'seeking');\n\n // Seek after events sent\n instance.seekTo(time);\n },\n });\n\n // Playback speed\n Object.defineProperty(player.media, 'playbackRate', {\n get() {\n return instance.getPlaybackRate();\n },\n set(input) {\n instance.setPlaybackRate(input);\n },\n });\n\n // Volume\n let { volume } = player.config;\n Object.defineProperty(player.media, 'volume', {\n get() {\n return volume;\n },\n set(input) {\n volume = input;\n instance.setVolume(volume * 100);\n triggerEvent.call(player, player.media, 'volumechange');\n },\n });\n\n // Muted\n let { muted } = player.config;\n Object.defineProperty(player.media, 'muted', {\n get() {\n return muted;\n },\n set(input) {\n const toggle = is.boolean(input) ? input : muted;\n muted = toggle;\n instance[toggle ? 'mute' : 'unMute']();\n triggerEvent.call(player, player.media, 'volumechange');\n },\n });\n\n // Source\n Object.defineProperty(player.media, 'currentSrc', {\n get() {\n return instance.getVideoUrl();\n },\n });\n\n // Ended\n Object.defineProperty(player.media, 'ended', {\n get() {\n return player.currentTime === player.duration;\n },\n });\n\n // Get available speeds\n player.options.speed = instance.getAvailablePlaybackRates();\n\n // Set the tabindex to avoid focus entering iframe\n if (player.supported.ui) {\n player.media.setAttribute('tabindex', -1);\n }\n\n triggerEvent.call(player, player.media, 'timeupdate');\n triggerEvent.call(player, player.media, 'durationchange');\n\n // Reset timer\n clearInterval(player.timers.buffering);\n\n // Setup buffering\n player.timers.buffering = setInterval(() => {\n // Get loaded % from YouTube\n player.media.buffered = instance.getVideoLoadedFraction();\n\n // Trigger progress only when we actually buffer something\n if (player.media.lastBuffered === null || player.media.lastBuffered < player.media.buffered) {\n triggerEvent.call(player, player.media, 'progress');\n }\n\n // Set last buffer point\n player.media.lastBuffered = player.media.buffered;\n\n // Bail if we're at 100%\n if (player.media.buffered === 1) {\n clearInterval(player.timers.buffering);\n\n // Trigger event\n triggerEvent.call(player, player.media, 'canplaythrough');\n }\n }, 200);\n\n // Rebuild UI\n setTimeout(() => ui.build.call(player), 50);\n },\n onStateChange(event) {\n // Get the instance\n const instance = event.target;\n\n // Reset timer\n clearInterval(player.timers.playing);\n\n const seeked = player.media.seeking && [1, 2].includes(event.data);\n\n if (seeked) {\n // Unset seeking and fire seeked event\n player.media.seeking = false;\n triggerEvent.call(player, player.media, 'seeked');\n }\n\n // Handle events\n // -1 Unstarted\n // 0 Ended\n // 1 Playing\n // 2 Paused\n // 3 Buffering\n // 5 Video cued\n switch (event.data) {\n case -1:\n // Update scrubber\n triggerEvent.call(player, player.media, 'timeupdate');\n\n // Get loaded % from YouTube\n player.media.buffered = instance.getVideoLoadedFraction();\n triggerEvent.call(player, player.media, 'progress');\n\n break;\n\n case 0:\n assurePlaybackState.call(player, false);\n\n // YouTube doesn't support loop for a single video, so mimick it.\n if (player.media.loop) {\n // YouTube needs a call to `stopVideo` before playing again\n instance.stopVideo();\n instance.playVideo();\n } else {\n triggerEvent.call(player, player.media, 'ended');\n }\n\n break;\n\n case 1:\n // Restore paused state (YouTube starts playing on seek if the video hasn't been played yet)\n if (!player.config.autoplay && player.media.paused && !player.embed.hasPlayed) {\n player.media.pause();\n } else {\n assurePlaybackState.call(player, true);\n\n triggerEvent.call(player, player.media, 'playing');\n\n // Poll to get playback progress\n player.timers.playing = setInterval(() => {\n triggerEvent.call(player, player.media, 'timeupdate');\n }, 50);\n\n // Check duration again due to YouTube bug\n // https://github.com/sampotts/plyr/issues/374\n // https://code.google.com/p/gdata-issues/issues/detail?id=8690\n if (player.media.duration !== instance.getDuration()) {\n player.media.duration = instance.getDuration();\n triggerEvent.call(player, player.media, 'durationchange');\n }\n }\n\n break;\n\n case 2:\n // Restore audio (YouTube starts playing on seek if the video hasn't been played yet)\n if (!player.muted) {\n player.embed.unMute();\n }\n assurePlaybackState.call(player, false);\n\n break;\n\n default:\n break;\n }\n\n triggerEvent.call(player, player.elements.container, 'statechange', false, {\n code: event.data,\n });\n },\n },\n });\n },\n};\n\nexport default youtube;\n","// ==========================================================================\n// Plyr Media\n// ==========================================================================\n\nimport html5 from './html5';\nimport vimeo from './plugins/vimeo';\nimport youtube from './plugins/youtube';\nimport { createElement, toggleClass, wrap } from './utils/elements';\n\nconst media = {\n // Setup media\n setup() {\n // If there's no media, bail\n if (!this.media) {\n this.debug.warn('No media element found!');\n return;\n }\n\n // Add type class\n toggleClass(this.elements.container, this.config.classNames.type.replace('{0}', this.type), true);\n\n // Add provider class\n toggleClass(this.elements.container, this.config.classNames.provider.replace('{0}', this.provider), true);\n\n // Add video class for embeds\n // This will require changes if audio embeds are added\n if (this.isEmbed) {\n toggleClass(this.elements.container, this.config.classNames.type.replace('{0}', 'video'), true);\n }\n\n // Inject the player wrapper\n if (this.isVideo) {\n // Create the wrapper div\n this.elements.wrapper = createElement('div', {\n class: this.config.classNames.video,\n });\n\n // Wrap the video in a container\n wrap(this.media, this.elements.wrapper);\n\n // Faux poster container\n this.elements.poster = createElement('div', {\n class: this.config.classNames.poster,\n });\n\n this.elements.wrapper.appendChild(this.elements.poster);\n }\n\n if (this.isHTML5) {\n html5.extend.call(this);\n } else if (this.isYouTube) {\n youtube.setup.call(this);\n } else if (this.isVimeo) {\n vimeo.setup.call(this);\n }\n },\n};\n\nexport default media;\n","// ==========================================================================\n// Advertisement plugin using Google IMA HTML5 SDK\n// Create an account with our ad partner, vi here:\n// https://www.vi.ai/publisher-video-monetization/\n// ==========================================================================\n\n/* global google */\n\nimport { createElement } from '../utils/elements';\nimport { triggerEvent } from '../utils/events';\nimport i18n from '../utils/i18n';\nimport is from '../utils/is';\nimport loadScript from '../utils/load-script';\nimport { formatTime } from '../utils/time';\nimport { buildUrlParams } from '../utils/urls';\n\nconst destroy = instance => {\n // Destroy our adsManager\n if (instance.manager) {\n instance.manager.destroy();\n }\n\n // Destroy our adsManager\n if (instance.elements.displayContainer) {\n instance.elements.displayContainer.destroy();\n }\n\n instance.elements.container.remove();\n};\n\nclass Ads {\n /**\n * Ads constructor.\n * @param {Object} player\n * @return {Ads}\n */\n constructor(player) {\n this.player = player;\n this.config = player.config.ads;\n this.playing = false;\n this.initialized = false;\n this.elements = {\n container: null,\n displayContainer: null,\n };\n this.manager = null;\n this.loader = null;\n this.cuePoints = null;\n this.events = {};\n this.safetyTimer = null;\n this.countdownTimer = null;\n\n // Setup a promise to resolve when the IMA manager is ready\n this.managerPromise = new Promise((resolve, reject) => {\n // The ad is loaded and ready\n this.on('loaded', resolve);\n\n // Ads failed\n this.on('error', reject);\n });\n\n this.load();\n }\n\n get enabled() {\n const { config } = this;\n\n return (\n this.player.isHTML5 &&\n this.player.isVideo &&\n config.enabled &&\n (!is.empty(config.publisherId) || is.url(config.tagUrl))\n );\n }\n\n /**\n * Load the IMA SDK\n */\n load() {\n if (!this.enabled) {\n return;\n }\n\n // Check if the Google IMA3 SDK is loaded or load it ourselves\n if (!is.object(window.google) || !is.object(window.google.ima)) {\n loadScript(this.player.config.urls.googleIMA.sdk)\n .then(() => {\n this.ready();\n })\n .catch(() => {\n // Script failed to load or is blocked\n this.trigger('error', new Error('Google IMA SDK failed to load'));\n });\n } else {\n this.ready();\n }\n }\n\n /**\n * Get the ads instance ready\n */\n ready() {\n // Double check we're enabled\n if (!this.enabled) {\n destroy(this);\n }\n\n // Start ticking our safety timer. If the whole advertisement\n // thing doesn't resolve within our set time; we bail\n this.startSafetyTimer(12000, 'ready()');\n\n // Clear the safety timer\n this.managerPromise.then(() => {\n this.clearSafetyTimer('onAdsManagerLoaded()');\n });\n\n // Set listeners on the Plyr instance\n this.listeners();\n\n // Setup the IMA SDK\n this.setupIMA();\n }\n\n // Build the tag URL\n get tagUrl() {\n const { config } = this;\n\n if (is.url(config.tagUrl)) {\n return config.tagUrl;\n }\n\n const params = {\n AV_PUBLISHERID: '58c25bb0073ef448b1087ad6',\n AV_CHANNELID: '5a0458dc28a06145e4519d21',\n AV_URL: window.location.hostname,\n cb: Date.now(),\n AV_WIDTH: 640,\n AV_HEIGHT: 480,\n AV_CDIM2: this.publisherId,\n };\n\n const base = 'https://go.aniview.com/api/adserver6/vast/';\n\n return `${base}?${buildUrlParams(params)}`;\n }\n\n /**\n * In order for the SDK to display ads for our video, we need to tell it where to put them,\n * so here we define our ad container. This div is set up to render on top of the video player.\n * Using the code below, we tell the SDK to render ads within that div. We also provide a\n * handle to the content video player - the SDK will poll the current time of our player to\n * properly place mid-rolls. After we create the ad display container, we initialize it. On\n * mobile devices, this initialization is done as the result of a user action.\n */\n setupIMA() {\n // Create the container for our advertisements\n this.elements.container = createElement('div', {\n class: this.player.config.classNames.ads,\n });\n\n this.player.elements.container.appendChild(this.elements.container);\n\n // So we can run VPAID2\n google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED);\n\n // Set language\n google.ima.settings.setLocale(this.player.config.ads.language);\n\n // Set playback for iOS10+\n google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline);\n\n // We assume the adContainer is the video container of the plyr element that will house the ads\n this.elements.displayContainer = new google.ima.AdDisplayContainer(this.elements.container, this.player.media);\n\n // Request video ads to be pre-loaded\n this.requestAds();\n }\n\n /**\n * Request advertisements\n */\n requestAds() {\n const { container } = this.player.elements;\n\n try {\n // Create ads loader\n this.loader = new google.ima.AdsLoader(this.elements.displayContainer);\n\n // Listen and respond to ads loaded and error events\n this.loader.addEventListener(\n google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,\n event => this.onAdsManagerLoaded(event),\n false,\n );\n this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR, error => this.onAdError(error), false);\n\n // Request video ads\n const request = new google.ima.AdsRequest();\n request.adTagUrl = this.tagUrl;\n\n // Specify the linear and nonlinear slot sizes. This helps the SDK\n // to select the correct creative if multiple are returned\n request.linearAdSlotWidth = container.offsetWidth;\n request.linearAdSlotHeight = container.offsetHeight;\n request.nonLinearAdSlotWidth = container.offsetWidth;\n request.nonLinearAdSlotHeight = container.offsetHeight;\n\n // We only overlay ads as we only support video.\n request.forceNonLinearFullSlot = false;\n\n // Mute based on current state\n request.setAdWillPlayMuted(!this.player.muted);\n\n this.loader.requestAds(request);\n } catch (e) {\n this.onAdError(e);\n }\n }\n\n /**\n * Update the ad countdown\n * @param {Boolean} start\n */\n pollCountdown(start = false) {\n if (!start) {\n clearInterval(this.countdownTimer);\n this.elements.container.removeAttribute('data-badge-text');\n return;\n }\n\n const update = () => {\n const time = formatTime(Math.max(this.manager.getRemainingTime(), 0));\n const label = `${i18n.get('advertisement', this.player.config)} - ${time}`;\n this.elements.container.setAttribute('data-badge-text', label);\n };\n\n this.countdownTimer = setInterval(update, 100);\n }\n\n /**\n * This method is called whenever the ads are ready inside the AdDisplayContainer\n * @param {Event} adsManagerLoadedEvent\n */\n onAdsManagerLoaded(event) {\n // Load could occur after a source change (race condition)\n if (!this.enabled) {\n return;\n }\n\n // Get the ads manager\n const settings = new google.ima.AdsRenderingSettings();\n\n // Tell the SDK to save and restore content video state on our behalf\n settings.restoreCustomPlaybackStateOnAdBreakComplete = true;\n settings.enablePreloading = true;\n\n // The SDK is polling currentTime on the contentPlayback. And needs a duration\n // so it can determine when to start the mid- and post-roll\n this.manager = event.getAdsManager(this.player, settings);\n\n // Get the cue points for any mid-rolls by filtering out the pre- and post-roll\n this.cuePoints = this.manager.getCuePoints();\n\n // Add listeners to the required events\n // Advertisement error events\n this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR, error => this.onAdError(error));\n\n // Advertisement regular events\n Object.keys(google.ima.AdEvent.Type).forEach(type => {\n this.manager.addEventListener(google.ima.AdEvent.Type[type], e => this.onAdEvent(e));\n });\n\n // Resolve our adsManager\n this.trigger('loaded');\n }\n\n addCuePoints() {\n // Add advertisement cue's within the time line if available\n if (!is.empty(this.cuePoints)) {\n this.cuePoints.forEach(cuePoint => {\n if (cuePoint !== 0 && cuePoint !== -1 && cuePoint < this.player.duration) {\n const seekElement = this.player.elements.progress;\n\n if (is.element(seekElement)) {\n const cuePercentage = (100 / this.player.duration) * cuePoint;\n const cue = createElement('span', {\n class: this.player.config.classNames.cues,\n });\n\n cue.style.left = `${cuePercentage.toString()}%`;\n seekElement.appendChild(cue);\n }\n }\n });\n }\n }\n\n /**\n * This is where all the event handling takes place. Retrieve the ad from the event. Some\n * events (e.g. ALL_ADS_COMPLETED) don't have the ad object associated\n * https://developers.google.com/interactive-media-ads/docs/sdks/html5/v3/apis#ima.AdEvent.Type\n * @param {Event} event\n */\n onAdEvent(event) {\n const { container } = this.player.elements;\n // Retrieve the ad from the event. Some events (e.g. ALL_ADS_COMPLETED)\n // don't have ad object associated\n const ad = event.getAd();\n const adData = event.getAdData();\n\n // Proxy event\n const dispatchEvent = type => {\n triggerEvent.call(this.player, this.player.media, `ads${type.replace(/_/g, '').toLowerCase()}`);\n };\n\n // Bubble the event\n dispatchEvent(event.type);\n\n switch (event.type) {\n case google.ima.AdEvent.Type.LOADED:\n // This is the first event sent for an ad - it is possible to determine whether the\n // ad is a video ad or an overlay\n this.trigger('loaded');\n\n // Start countdown\n this.pollCountdown(true);\n\n if (!ad.isLinear()) {\n // Position AdDisplayContainer correctly for overlay\n ad.width = container.offsetWidth;\n ad.height = container.offsetHeight;\n }\n\n // console.info('Ad type: ' + event.getAd().getAdPodInfo().getPodIndex());\n // console.info('Ad time: ' + event.getAd().getAdPodInfo().getTimeOffset());\n\n break;\n\n case google.ima.AdEvent.Type.STARTED:\n // Set volume to match player\n this.manager.setVolume(this.player.volume);\n\n break;\n\n case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:\n // All ads for the current videos are done. We can now request new advertisements\n // in case the video is re-played\n\n // TODO: Example for what happens when a next video in a playlist would be loaded.\n // So here we load a new video when all ads are done.\n // Then we load new ads within a new adsManager. When the video\n // Is started - after - the ads are loaded, then we get ads.\n // You can also easily test cancelling and reloading by running\n // player.ads.cancel() and player.ads.play from the console I guess.\n // this.player.source = {\n // type: 'video',\n // title: 'View From A Blue Moon',\n // sources: [{\n // src:\n // 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.mp4', type:\n // 'video/mp4', }], poster:\n // 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.jpg', tracks:\n // [ { kind: 'captions', label: 'English', srclang: 'en', src:\n // 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.en.vtt',\n // default: true, }, { kind: 'captions', label: 'French', srclang: 'fr', src:\n // 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.fr.vtt', }, ],\n // };\n\n // TODO: So there is still this thing where a video should only be allowed to start\n // playing when the IMA SDK is ready or has failed\n\n this.loadAds();\n\n break;\n\n case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:\n // This event indicates the ad has started - the video player can adjust the UI,\n // for example display a pause button and remaining time. Fired when content should\n // be paused. This usually happens right before an ad is about to cover the content\n\n this.pauseContent();\n\n break;\n\n case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:\n // This event indicates the ad has finished - the video player can perform\n // appropriate UI actions, such as removing the timer for remaining time detection.\n // Fired when content should be resumed. This usually happens when an ad finishes\n // or collapses\n\n this.pollCountdown();\n\n this.resumeContent();\n\n break;\n\n case google.ima.AdEvent.Type.LOG:\n if (adData.adError) {\n this.player.debug.warn(`Non-fatal ad error: ${adData.adError.getMessage()}`);\n }\n\n break;\n\n default:\n break;\n }\n }\n\n /**\n * Any ad error handling comes through here\n * @param {Event} event\n */\n onAdError(event) {\n this.cancel();\n this.player.debug.warn('Ads error', event);\n }\n\n /**\n * Setup hooks for Plyr and window events. This ensures\n * the mid- and post-roll launch at the correct time. And\n * resize the advertisement when the player resizes\n */\n listeners() {\n const { container } = this.player.elements;\n let time;\n\n this.player.on('canplay', () => {\n this.addCuePoints();\n });\n\n this.player.on('ended', () => {\n this.loader.contentComplete();\n });\n\n this.player.on('timeupdate', () => {\n time = this.player.currentTime;\n });\n\n this.player.on('seeked', () => {\n const seekedTime = this.player.currentTime;\n\n if (is.empty(this.cuePoints)) {\n return;\n }\n\n this.cuePoints.forEach((cuePoint, index) => {\n if (time < cuePoint && cuePoint < seekedTime) {\n this.manager.discardAdBreak();\n this.cuePoints.splice(index, 1);\n }\n });\n });\n\n // Listen to the resizing of the window. And resize ad accordingly\n // TODO: eventually implement ResizeObserver\n window.addEventListener('resize', () => {\n if (this.manager) {\n this.manager.resize(container.offsetWidth, container.offsetHeight, google.ima.ViewMode.NORMAL);\n }\n });\n }\n\n /**\n * Initialize the adsManager and start playing advertisements\n */\n play() {\n const { container } = this.player.elements;\n\n if (!this.managerPromise) {\n this.resumeContent();\n }\n\n // Play the requested advertisement whenever the adsManager is ready\n this.managerPromise\n .then(() => {\n // Set volume to match player\n this.manager.setVolume(this.player.volume);\n\n // Initialize the container. Must be done via a user action on mobile devices\n this.elements.displayContainer.initialize();\n\n try {\n if (!this.initialized) {\n // Initialize the ads manager. Ad rules playlist will start at this time\n this.manager.init(container.offsetWidth, container.offsetHeight, google.ima.ViewMode.NORMAL);\n\n // Call play to start showing the ad. Single video and overlay ads will\n // start at this time; the call will be ignored for ad rules\n this.manager.start();\n }\n\n this.initialized = true;\n } catch (adError) {\n // An error may be thrown if there was a problem with the\n // VAST response\n this.onAdError(adError);\n }\n })\n .catch(() => {});\n }\n\n /**\n * Resume our video\n */\n resumeContent() {\n // Hide the advertisement container\n this.elements.container.style.zIndex = '';\n\n // Ad is stopped\n this.playing = false;\n\n // Play video\n this.player.media.play();\n }\n\n /**\n * Pause our video\n */\n pauseContent() {\n // Show the advertisement container\n this.elements.container.style.zIndex = 3;\n\n // Ad is playing\n this.playing = true;\n\n // Pause our video.\n this.player.media.pause();\n }\n\n /**\n * Destroy the adsManager so we can grab new ads after this. If we don't then we're not\n * allowed to call new ads based on google policies, as they interpret this as an accidental\n * video requests. https://developers.google.com/interactive-\n * media-ads/docs/sdks/android/faq#8\n */\n cancel() {\n // Pause our video\n if (this.initialized) {\n this.resumeContent();\n }\n\n // Tell our instance that we're done for now\n this.trigger('error');\n\n // Re-create our adsManager\n this.loadAds();\n }\n\n /**\n * Re-create our adsManager\n */\n loadAds() {\n // Tell our adsManager to go bye bye\n this.managerPromise\n .then(() => {\n // Destroy our adsManager\n if (this.manager) {\n this.manager.destroy();\n }\n\n // Re-set our adsManager promises\n this.managerPromise = new Promise(resolve => {\n this.on('loaded', resolve);\n this.player.debug.log(this.manager);\n });\n\n // Now request some new advertisements\n this.requestAds();\n })\n .catch(() => {});\n }\n\n /**\n * Handles callbacks after an ad event was invoked\n * @param {String} event - Event type\n */\n trigger(event, ...args) {\n const handlers = this.events[event];\n\n if (is.array(handlers)) {\n handlers.forEach(handler => {\n if (is.function(handler)) {\n handler.apply(this, args);\n }\n });\n }\n }\n\n /**\n * Add event listeners\n * @param {String} event - Event type\n * @param {Function} callback - Callback for when event occurs\n * @return {Ads}\n */\n on(event, callback) {\n if (!is.array(this.events[event])) {\n this.events[event] = [];\n }\n\n this.events[event].push(callback);\n\n return this;\n }\n\n /**\n * Setup a safety timer for when the ad network doesn't respond for whatever reason.\n * The advertisement has 12 seconds to get its things together. We stop this timer when the\n * advertisement is playing, or when a user action is required to start, then we clear the\n * timer on ad ready\n * @param {Number} time\n * @param {String} from\n */\n startSafetyTimer(time, from) {\n this.player.debug.log(`Safety timer invoked from: ${from}`);\n\n this.safetyTimer = setTimeout(() => {\n this.cancel();\n this.clearSafetyTimer('startSafetyTimer()');\n }, time);\n }\n\n /**\n * Clear our safety timer(s)\n * @param {String} from\n */\n clearSafetyTimer(from) {\n if (!is.nullOrUndefined(this.safetyTimer)) {\n this.player.debug.log(`Safety timer cleared from: ${from}`);\n\n clearTimeout(this.safetyTimer);\n this.safetyTimer = null;\n }\n }\n}\n\nexport default Ads;\n","'use strict';\nvar $ = require('../internals/export');\nvar $findIndex = require('../internals/array-iteration').findIndex;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\nvar FIND_INDEX = 'findIndex';\nvar SKIPS_HOLES = true;\n\n// Shouldn't skip holes\nif (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; });\n\n// `Array.prototype.findIndex` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.findindex\n$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {\n findIndex: function findIndex(callbackfn /* , that = undefined */) {\n return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables(FIND_INDEX);\n","import { createElement } from '../utils/elements';\nimport { once } from '../utils/events';\nimport fetch from '../utils/fetch';\nimport is from '../utils/is';\nimport { formatTime } from '../utils/time';\n\n// Arg: vttDataString example: \"WEBVTT\\n\\n1\\n00:00:05.000 --> 00:00:10.000\\n1080p-00001.jpg\"\nconst parseVtt = vttDataString => {\n const processedList = [];\n const frames = vttDataString.split(/\\r\\n\\r\\n|\\n\\n|\\r\\r/);\n\n frames.forEach(frame => {\n const result = {};\n const lines = frame.split(/\\r\\n|\\n|\\r/);\n\n lines.forEach(line => {\n if (!is.number(result.startTime)) {\n // The line with start and end times on it is the first line of interest\n const matchTimes = line.match(\n /([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/,\n ); // Note that this currently ignores caption formatting directives that are optionally on the end of this line - fine for non-captions VTT\n\n if (matchTimes) {\n result.startTime =\n Number(matchTimes[1] || 0) * 60 * 60 +\n Number(matchTimes[2]) * 60 +\n Number(matchTimes[3]) +\n Number(`0.${matchTimes[4]}`);\n result.endTime =\n Number(matchTimes[6] || 0) * 60 * 60 +\n Number(matchTimes[7]) * 60 +\n Number(matchTimes[8]) +\n Number(`0.${matchTimes[9]}`);\n }\n } else if (!is.empty(line.trim()) && is.empty(result.text)) {\n // If we already have the startTime, then we're definitely up to the text line(s)\n const lineSplit = line.trim().split('#xywh=');\n [result.text] = lineSplit;\n\n // If there's content in lineSplit[1], then we have sprites. If not, then it's just one frame per image\n if (lineSplit[1]) {\n [result.x, result.y, result.w, result.h] = lineSplit[1].split(',');\n }\n }\n });\n\n if (result.text) {\n processedList.push(result);\n }\n });\n\n return processedList;\n};\n\n/**\n * Preview thumbnails for seek hover and scrubbing\n * Seeking: Hover over the seek bar (desktop only): shows a small preview container above the seek bar\n * Scrubbing: Click and drag the seek bar (desktop and mobile): shows the preview image over the entire video, as if the video is scrubbing at very high speed\n *\n * Notes:\n * - Thumbs are set via JS settings on Plyr init, not HTML5 'track' property. Using the track property would be a bit gross, because it doesn't support custom 'kinds'. kind=metadata might be used for something else, and we want to allow multiple thumbnails tracks. Tracks must have a unique combination of 'kind' and 'label'. We would have to do something like kind=metadata,label=thumbnails1 / kind=metadata,label=thumbnails2. Square peg, round hole\n * - VTT info: the image URL is relative to the VTT, not the current document. But if the url starts with a slash, it will naturally be relative to the current domain. https://support.jwplayer.com/articles/how-to-add-preview-thumbnails\n * - This implementation uses multiple separate img elements. Other implementations use background-image on one element. This would be nice and simple, but Firefox and Safari have flickering issues with replacing backgrounds of larger images. It seems that YouTube perhaps only avoids this because they don't have the option for high-res previews (even the fullscreen ones, when mousedown/seeking). Images appear over the top of each other, and previous ones are discarded once the new ones have been rendered\n */\n\nclass PreviewThumbnails {\n /**\n * PreviewThumbnails constructor.\n * @param {Plyr} player\n * @return {PreviewThumbnails}\n */\n constructor(player) {\n this.player = player;\n this.thumbnails = [];\n this.loaded = false;\n this.lastMouseMoveTime = Date.now();\n this.mouseDown = false;\n this.loadedImages = [];\n\n this.elements = {\n thumb: {},\n scrubbing: {},\n };\n\n this.load();\n }\n\n get enabled() {\n return this.player.isHTML5 && this.player.isVideo && this.player.config.previewThumbnails.enabled;\n }\n\n load() {\n // Togglethe regular seek tooltip\n if (this.player.elements.display.seekTooltip) {\n this.player.elements.display.seekTooltip.hidden = this.enabled;\n }\n\n if (!this.enabled) {\n return;\n }\n\n this.getThumbnails().then(() => {\n if (!this.enabled) {\n return;\n }\n\n // Render DOM elements\n this.render();\n\n // Check to see if thumb container size was specified manually in CSS\n this.determineContainerAutoSizing();\n\n this.loaded = true;\n });\n }\n\n // Download VTT files and parse them\n getThumbnails() {\n return new Promise(resolve => {\n const { src } = this.player.config.previewThumbnails;\n\n if (is.empty(src)) {\n throw new Error('Missing previewThumbnails.src config attribute');\n }\n\n // If string, convert into single-element list\n const urls = is.string(src) ? [src] : src;\n // Loop through each src URL. Download and process the VTT file, storing the resulting data in this.thumbnails\n const promises = urls.map(u => this.getThumbnail(u));\n\n Promise.all(promises).then(() => {\n // Sort smallest to biggest (e.g., [120p, 480p, 1080p])\n this.thumbnails.sort((x, y) => x.height - y.height);\n\n this.player.debug.log('Preview thumbnails', this.thumbnails);\n\n resolve();\n });\n });\n }\n\n // Process individual VTT file\n getThumbnail(url) {\n return new Promise(resolve => {\n fetch(url).then(response => {\n const thumbnail = {\n frames: parseVtt(response),\n height: null,\n urlPrefix: '',\n };\n\n // If the URLs don't start with '/', then we need to set their relative path to be the location of the VTT file\n // If the URLs do start with '/', then they obviously don't need a prefix, so it will remain blank\n // If the thumbnail URLs start with with none of '/', 'http://' or 'https://', then we need to set their relative path to be the location of the VTT file\n if (\n !thumbnail.frames[0].text.startsWith('/') &&\n !thumbnail.frames[0].text.startsWith('http://') &&\n !thumbnail.frames[0].text.startsWith('https://')\n ) {\n thumbnail.urlPrefix = url.substring(0, url.lastIndexOf('/') + 1);\n }\n\n // Download the first frame, so that we can determine/set the height of this thumbnailsDef\n const tempImage = new Image();\n\n tempImage.onload = () => {\n thumbnail.height = tempImage.naturalHeight;\n thumbnail.width = tempImage.naturalWidth;\n\n this.thumbnails.push(thumbnail);\n\n resolve();\n };\n\n tempImage.src = thumbnail.urlPrefix + thumbnail.frames[0].text;\n });\n });\n }\n\n startMove(event) {\n if (!this.loaded) {\n return;\n }\n\n if (!is.event(event) || !['touchmove', 'mousemove'].includes(event.type)) {\n return;\n }\n\n // Wait until media has a duration\n if (!this.player.media.duration) {\n return;\n }\n\n if (event.type === 'touchmove') {\n // Calculate seek hover position as approx video seconds\n this.seekTime = this.player.media.duration * (this.player.elements.inputs.seek.value / 100);\n } else {\n // Calculate seek hover position as approx video seconds\n const clientRect = this.player.elements.progress.getBoundingClientRect();\n const percentage = (100 / clientRect.width) * (event.pageX - clientRect.left);\n this.seekTime = this.player.media.duration * (percentage / 100);\n\n if (this.seekTime < 0) {\n // The mousemove fires for 10+px out to the left\n this.seekTime = 0;\n }\n\n if (this.seekTime > this.player.media.duration - 1) {\n // Took 1 second off the duration for safety, because different players can disagree on the real duration of a video\n this.seekTime = this.player.media.duration - 1;\n }\n\n this.mousePosX = event.pageX;\n\n // Set time text inside image container\n this.elements.thumb.time.innerText = formatTime(this.seekTime);\n }\n\n // Download and show image\n this.showImageAtCurrentTime();\n }\n\n endMove() {\n this.toggleThumbContainer(false, true);\n }\n\n startScrubbing(event) {\n // Only act on left mouse button (0), or touch device (event.button is false)\n if (event.button === false || event.button === 0) {\n this.mouseDown = true;\n\n // Wait until media has a duration\n if (this.player.media.duration) {\n this.toggleScrubbingContainer(true);\n this.toggleThumbContainer(false, true);\n\n // Download and show image\n this.showImageAtCurrentTime();\n }\n }\n }\n\n endScrubbing() {\n this.mouseDown = false;\n\n // Hide scrubbing preview. But wait until the video has successfully seeked before hiding the scrubbing preview\n if (Math.ceil(this.lastTime) === Math.ceil(this.player.media.currentTime)) {\n // The video was already seeked/loaded at the chosen time - hide immediately\n this.toggleScrubbingContainer(false);\n } else {\n // The video hasn't seeked yet. Wait for that\n once.call(this.player, this.player.media, 'timeupdate', () => {\n // Re-check mousedown - we might have already started scrubbing again\n if (!this.mouseDown) {\n this.toggleScrubbingContainer(false);\n }\n });\n }\n }\n\n /**\n * Setup hooks for Plyr and window events\n */\n listeners() {\n // Hide thumbnail preview - on mouse click, mouse leave (in listeners.js for now), and video play/seek. All four are required, e.g., for buffering\n this.player.on('play', () => {\n this.toggleThumbContainer(false, true);\n });\n\n this.player.on('seeked', () => {\n this.toggleThumbContainer(false);\n });\n\n this.player.on('timeupdate', () => {\n this.lastTime = this.player.media.currentTime;\n });\n }\n\n /**\n * Create HTML elements for image containers\n */\n render() {\n // Create HTML element: plyr__preview-thumbnail-container\n this.elements.thumb.container = createElement('div', {\n class: this.player.config.classNames.previewThumbnails.thumbContainer,\n });\n\n // Wrapper for the image for styling\n this.elements.thumb.imageContainer = createElement('div', {\n class: this.player.config.classNames.previewThumbnails.imageContainer,\n });\n this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);\n\n // Create HTML element, parent+span: time text (e.g., 01:32:00)\n const timeContainer = createElement('div', {\n class: this.player.config.classNames.previewThumbnails.timeContainer,\n });\n\n this.elements.thumb.time = createElement('span', {}, '00:00');\n timeContainer.appendChild(this.elements.thumb.time);\n\n this.elements.thumb.container.appendChild(timeContainer);\n\n // Inject the whole thumb\n if (is.element(this.player.elements.progress)) {\n this.player.elements.progress.appendChild(this.elements.thumb.container);\n }\n\n // Create HTML element: plyr__preview-scrubbing-container\n this.elements.scrubbing.container = createElement('div', {\n class: this.player.config.classNames.previewThumbnails.scrubbingContainer,\n });\n\n this.player.elements.wrapper.appendChild(this.elements.scrubbing.container);\n }\n\n showImageAtCurrentTime() {\n if (this.mouseDown) {\n this.setScrubbingContainerSize();\n } else {\n this.setThumbContainerSizeAndPos();\n }\n\n // Find the desired thumbnail index\n // TODO: Handle a video longer than the thumbs where thumbNum is null\n const thumbNum = this.thumbnails[0].frames.findIndex(\n frame => this.seekTime >= frame.startTime && this.seekTime <= frame.endTime,\n );\n const hasThumb = thumbNum >= 0;\n let qualityIndex = 0;\n\n // Show the thumb container if we're not scrubbing\n if (!this.mouseDown) {\n this.toggleThumbContainer(hasThumb);\n }\n\n // No matching thumb found\n if (!hasThumb) {\n return;\n }\n\n // Check to see if we've already downloaded higher quality versions of this image\n this.thumbnails.forEach((thumbnail, index) => {\n if (this.loadedImages.includes(thumbnail.frames[thumbNum].text)) {\n qualityIndex = index;\n }\n });\n\n // Only proceed if either thumbnum or thumbfilename has changed\n if (thumbNum !== this.showingThumb) {\n this.showingThumb = thumbNum;\n this.loadImage(qualityIndex);\n }\n }\n\n // Show the image that's currently specified in this.showingThumb\n loadImage(qualityIndex = 0) {\n const thumbNum = this.showingThumb;\n const thumbnail = this.thumbnails[qualityIndex];\n const { urlPrefix } = thumbnail;\n const frame = thumbnail.frames[thumbNum];\n const thumbFilename = thumbnail.frames[thumbNum].text;\n const thumbUrl = urlPrefix + thumbFilename;\n\n if (!this.currentImageElement || this.currentImageElement.dataset.filename !== thumbFilename) {\n // If we're already loading a previous image, remove its onload handler - we don't want it to load after this one\n // Only do this if not using sprites. Without sprites we really want to show as many images as possible, as a best-effort\n if (this.loadingImage && this.usingSprites) {\n this.loadingImage.onload = null;\n }\n\n // We're building and adding a new image. In other implementations of similar functionality (YouTube), background image\n // is instead used. But this causes issues with larger images in Firefox and Safari - switching between background\n // images causes a flicker. Putting a new image over the top does not\n const previewImage = new Image();\n previewImage.src = thumbUrl;\n previewImage.dataset.index = thumbNum;\n previewImage.dataset.filename = thumbFilename;\n this.showingThumbFilename = thumbFilename;\n\n this.player.debug.log(`Loading image: ${thumbUrl}`);\n\n // For some reason, passing the named function directly causes it to execute immediately. So I've wrapped it in an anonymous function...\n previewImage.onload = () =>\n this.showImage(previewImage, frame, qualityIndex, thumbNum, thumbFilename, true);\n this.loadingImage = previewImage;\n this.removeOldImages(previewImage);\n } else {\n // Update the existing image\n this.showImage(this.currentImageElement, frame, qualityIndex, thumbNum, thumbFilename, false);\n this.currentImageElement.dataset.index = thumbNum;\n this.removeOldImages(this.currentImageElement);\n }\n }\n\n showImage(previewImage, frame, qualityIndex, thumbNum, thumbFilename, newImage = true) {\n this.player.debug.log(\n `Showing thumb: ${thumbFilename}. num: ${thumbNum}. qual: ${qualityIndex}. newimg: ${newImage}`,\n );\n this.setImageSizeAndOffset(previewImage, frame);\n\n if (newImage) {\n this.currentImageContainer.appendChild(previewImage);\n this.currentImageElement = previewImage;\n\n if (!this.loadedImages.includes(thumbFilename)) {\n this.loadedImages.push(thumbFilename);\n }\n }\n\n // Preload images before and after the current one\n // Show higher quality of the same frame\n // Each step here has a short time delay, and only continues if still hovering/seeking the same spot. This is to protect slow connections from overloading\n this.preloadNearby(thumbNum, true)\n .then(this.preloadNearby(thumbNum, false))\n .then(this.getHigherQuality(qualityIndex, previewImage, frame, thumbFilename));\n }\n\n // Remove all preview images that aren't the designated current image\n removeOldImages(currentImage) {\n // Get a list of all images, convert it from a DOM list to an array\n Array.from(this.currentImageContainer.children).forEach(image => {\n if (image.tagName.toLowerCase() !== 'img') {\n return;\n }\n\n const removeDelay = this.usingSprites ? 500 : 1000;\n\n if (image.dataset.index !== currentImage.dataset.index && !image.dataset.deleting) {\n // Wait 200ms, as the new image can take some time to show on certain browsers (even though it was downloaded before showing). This will prevent flicker, and show some generosity towards slower clients\n // First set attribute 'deleting' to prevent multi-handling of this on repeat firing of this function\n // eslint-disable-next-line no-param-reassign\n image.dataset.deleting = true;\n\n // This has to be set before the timeout - to prevent issues switching between hover and scrub\n const { currentImageContainer } = this;\n\n setTimeout(() => {\n currentImageContainer.removeChild(image);\n this.player.debug.log(`Removing thumb: ${image.dataset.filename}`);\n }, removeDelay);\n }\n });\n }\n\n // Preload images before and after the current one. Only if the user is still hovering/seeking the same frame\n // This will only preload the lowest quality\n preloadNearby(thumbNum, forward = true) {\n return new Promise(resolve => {\n setTimeout(() => {\n const oldThumbFilename = this.thumbnails[0].frames[thumbNum].text;\n\n if (this.showingThumbFilename === oldThumbFilename) {\n // Find the nearest thumbs with different filenames. Sometimes it'll be the next index, but in the case of sprites, it might be 100+ away\n let thumbnailsClone;\n if (forward) {\n thumbnailsClone = this.thumbnails[0].frames.slice(thumbNum);\n } else {\n thumbnailsClone = this.thumbnails[0].frames.slice(0, thumbNum).reverse();\n }\n\n let foundOne = false;\n\n thumbnailsClone.forEach(frame => {\n const newThumbFilename = frame.text;\n\n if (newThumbFilename !== oldThumbFilename) {\n // Found one with a different filename. Make sure it hasn't already been loaded on this page visit\n if (!this.loadedImages.includes(newThumbFilename)) {\n foundOne = true;\n this.player.debug.log(`Preloading thumb filename: ${newThumbFilename}`);\n\n const { urlPrefix } = this.thumbnails[0];\n const thumbURL = urlPrefix + newThumbFilename;\n const previewImage = new Image();\n previewImage.src = thumbURL;\n previewImage.onload = () => {\n this.player.debug.log(`Preloaded thumb filename: ${newThumbFilename}`);\n if (!this.loadedImages.includes(newThumbFilename))\n this.loadedImages.push(newThumbFilename);\n\n // We don't resolve until the thumb is loaded\n resolve();\n };\n }\n }\n });\n\n // If there are none to preload then we want to resolve immediately\n if (!foundOne) {\n resolve();\n }\n }\n }, 300);\n });\n }\n\n // If user has been hovering current image for half a second, look for a higher quality one\n getHigherQuality(currentQualityIndex, previewImage, frame, thumbFilename) {\n if (currentQualityIndex < this.thumbnails.length - 1) {\n // Only use the higher quality version if it's going to look any better - if the current thumb is of a lower pixel density than the thumbnail container\n let previewImageHeight = previewImage.naturalHeight;\n\n if (this.usingSprites) {\n previewImageHeight = frame.h;\n }\n\n if (previewImageHeight < this.thumbContainerHeight) {\n // Recurse back to the loadImage function - show a higher quality one, but only if the viewer is on this frame for a while\n setTimeout(() => {\n // Make sure the mouse hasn't already moved on and started hovering at another image\n if (this.showingThumbFilename === thumbFilename) {\n this.player.debug.log(`Showing higher quality thumb for: ${thumbFilename}`);\n this.loadImage(currentQualityIndex + 1);\n }\n }, 300);\n }\n }\n }\n\n get currentImageContainer() {\n if (this.mouseDown) {\n return this.elements.scrubbing.container;\n }\n\n return this.elements.thumb.imageContainer;\n }\n\n get usingSprites() {\n return Object.keys(this.thumbnails[0].frames[0]).includes('w');\n }\n\n get thumbAspectRatio() {\n if (this.usingSprites) {\n return this.thumbnails[0].frames[0].w / this.thumbnails[0].frames[0].h;\n }\n\n return this.thumbnails[0].width / this.thumbnails[0].height;\n }\n\n get thumbContainerHeight() {\n if (this.mouseDown) {\n // Can't use media.clientHeight - HTML5 video goes big and does black bars above and below\n return Math.floor(this.player.media.clientWidth / this.thumbAspectRatio);\n }\n\n return Math.floor(this.player.media.clientWidth / this.thumbAspectRatio / 4);\n }\n\n get currentImageElement() {\n if (this.mouseDown) {\n return this.currentScrubbingImageElement;\n }\n\n return this.currentThumbnailImageElement;\n }\n\n set currentImageElement(element) {\n if (this.mouseDown) {\n this.currentScrubbingImageElement = element;\n } else {\n this.currentThumbnailImageElement = element;\n }\n }\n\n toggleThumbContainer(toggle = false, clearShowing = false) {\n const className = this.player.config.classNames.previewThumbnails.thumbContainerShown;\n this.elements.thumb.container.classList.toggle(className, toggle);\n\n if (!toggle && clearShowing) {\n this.showingThumb = null;\n this.showingThumbFilename = null;\n }\n }\n\n toggleScrubbingContainer(toggle = false) {\n const className = this.player.config.classNames.previewThumbnails.scrubbingContainerShown;\n this.elements.scrubbing.container.classList.toggle(className, toggle);\n\n if (!toggle) {\n this.showingThumb = null;\n this.showingThumbFilename = null;\n }\n }\n\n determineContainerAutoSizing() {\n if (this.elements.thumb.imageContainer.clientHeight > 20) {\n // This will prevent auto sizing in this.setThumbContainerSizeAndPos()\n this.sizeSpecifiedInCSS = true;\n }\n }\n\n // Set the size to be about a quarter of the size of video. Unless option dynamicSize === false, in which case it needs to be set in CSS\n setThumbContainerSizeAndPos() {\n if (!this.sizeSpecifiedInCSS) {\n const thumbWidth = Math.floor(this.thumbContainerHeight * this.thumbAspectRatio);\n this.elements.thumb.imageContainer.style.height = `${this.thumbContainerHeight}px`;\n this.elements.thumb.imageContainer.style.width = `${thumbWidth}px`;\n }\n\n this.setThumbContainerPos();\n }\n\n setThumbContainerPos() {\n const seekbarRect = this.player.elements.progress.getBoundingClientRect();\n const plyrRect = this.player.elements.container.getBoundingClientRect();\n const { container } = this.elements.thumb;\n // Find the lowest and highest desired left-position, so we don't slide out the side of the video container\n const minVal = plyrRect.left - seekbarRect.left + 10;\n const maxVal = plyrRect.right - seekbarRect.left - container.clientWidth - 10;\n // Set preview container position to: mousepos, minus seekbar.left, minus half of previewContainer.clientWidth\n let previewPos = this.mousePosX - seekbarRect.left - container.clientWidth / 2;\n\n if (previewPos < minVal) {\n previewPos = minVal;\n }\n\n if (previewPos > maxVal) {\n previewPos = maxVal;\n }\n\n container.style.left = `${previewPos}px`;\n }\n\n // Can't use 100% width, in case the video is a different aspect ratio to the video container\n setScrubbingContainerSize() {\n this.elements.scrubbing.container.style.width = `${this.player.media.clientWidth}px`;\n // Can't use media.clientHeight - html5 video goes big and does black bars above and below\n this.elements.scrubbing.container.style.height = `${this.player.media.clientWidth / this.thumbAspectRatio}px`;\n }\n\n // Sprites need to be offset to the correct location\n setImageSizeAndOffset(previewImage, frame) {\n if (!this.usingSprites) {\n return;\n }\n\n // Find difference between height and preview container height\n const multiplier = this.thumbContainerHeight / frame.h;\n\n // eslint-disable-next-line no-param-reassign\n previewImage.style.height = `${Math.floor(previewImage.naturalHeight * multiplier)}px`;\n // eslint-disable-next-line no-param-reassign\n previewImage.style.width = `${Math.floor(previewImage.naturalWidth * multiplier)}px`;\n // eslint-disable-next-line no-param-reassign\n previewImage.style.left = `-${frame.x * multiplier}px`;\n // eslint-disable-next-line no-param-reassign\n previewImage.style.top = `-${frame.y * multiplier}px`;\n }\n}\n\nexport default PreviewThumbnails;\n","// ==========================================================================\n// Plyr source update\n// ==========================================================================\n\nimport { providers } from './config/types';\nimport html5 from './html5';\nimport media from './media';\nimport support from './support';\nimport ui from './ui';\nimport { createElement, insertElement, removeElement } from './utils/elements';\nimport is from './utils/is';\nimport { getDeep } from './utils/objects';\n\nconst source = {\n // Add elements to HTML5 media (source, tracks, etc)\n insertElements(type, attributes) {\n if (is.string(attributes)) {\n insertElement(type, this.media, {\n src: attributes,\n });\n } else if (is.array(attributes)) {\n attributes.forEach(attribute => {\n insertElement(type, this.media, attribute);\n });\n }\n },\n\n // Update source\n // Sources are not checked for support so be careful\n change(input) {\n if (!getDeep(input, 'sources.length')) {\n this.debug.warn('Invalid source format');\n return;\n }\n\n // Cancel current network requests\n html5.cancelRequests.call(this);\n\n // Destroy instance and re-setup\n this.destroy.call(\n this,\n () => {\n // Reset quality options\n this.options.quality = [];\n\n // Remove elements\n removeElement(this.media);\n this.media = null;\n\n // Reset class name\n if (is.element(this.elements.container)) {\n this.elements.container.removeAttribute('class');\n }\n\n // Set the type and provider\n const { sources, type } = input;\n const [{ provider = providers.html5, src }] = sources;\n const tagName = provider === 'html5' ? type : 'div';\n const attributes = provider === 'html5' ? {} : { src };\n\n Object.assign(this, {\n provider,\n type,\n // Check for support\n supported: support.check(type, provider, this.config.playsinline),\n // Create new element\n media: createElement(tagName, attributes),\n });\n\n // Inject the new element\n this.elements.container.appendChild(this.media);\n\n // Autoplay the new source?\n if (is.boolean(input.autoplay)) {\n this.config.autoplay = input.autoplay;\n }\n\n // Set attributes for audio and video\n if (this.isHTML5) {\n if (this.config.crossorigin) {\n this.media.setAttribute('crossorigin', '');\n }\n if (this.config.autoplay) {\n this.media.setAttribute('autoplay', '');\n }\n if (!is.empty(input.poster)) {\n this.poster = input.poster;\n }\n if (this.config.loop.active) {\n this.media.setAttribute('loop', '');\n }\n if (this.config.muted) {\n this.media.setAttribute('muted', '');\n }\n if (this.config.playsinline) {\n this.media.setAttribute('playsinline', '');\n }\n }\n\n // Restore class hook\n ui.addStyleHook.call(this);\n\n // Set new sources for html5\n if (this.isHTML5) {\n source.insertElements.call(this, 'source', sources);\n }\n\n // Set video title\n this.config.title = input.title;\n\n // Set up from scratch\n media.setup.call(this);\n\n // HTML5 stuff\n if (this.isHTML5) {\n // Setup captions\n if (Object.keys(input).includes('tracks')) {\n source.insertElements.call(this, 'track', input.tracks);\n }\n }\n\n // If HTML5 or embed but not fully supported, setupInterface and call ready now\n if (this.isHTML5 || (this.isEmbed && !this.supported.ui)) {\n // Setup interface\n ui.build.call(this);\n }\n\n // Load HTML5 sources\n if (this.isHTML5) {\n this.media.load();\n }\n\n // Reload thumbnails\n if (this.previewThumbnails) {\n this.previewThumbnails.load();\n }\n\n // Update the fullscreen support\n this.fullscreen.update();\n },\n true,\n );\n },\n};\n\nexport default source;\n","// ==========================================================================\n// Plyr\n// plyr.js v3.5.6\n// https://github.com/sampotts/plyr\n// License: The MIT License (MIT)\n// ==========================================================================\n\nimport captions from './captions';\nimport defaults from './config/defaults';\nimport { pip } from './config/states';\nimport { getProviderByUrl, providers, types } from './config/types';\nimport Console from './console';\nimport controls from './controls';\nimport Fullscreen from './fullscreen';\nimport Listeners from './listeners';\nimport media from './media';\nimport Ads from './plugins/ads';\nimport PreviewThumbnails from './plugins/preview-thumbnails';\nimport source from './source';\nimport Storage from './storage';\nimport support from './support';\nimport ui from './ui';\nimport { closest } from './utils/arrays';\nimport { createElement, hasClass, removeElement, replaceElement, toggleClass, wrap } from './utils/elements';\nimport { off, on, once, triggerEvent, unbindListeners } from './utils/events';\nimport is from './utils/is';\nimport loadSprite from './utils/load-sprite';\nimport { clamp } from './utils/numbers';\nimport { cloneDeep, extend } from './utils/objects';\nimport { getAspectRatio, reduceAspectRatio, setAspectRatio, validateRatio } from './utils/style';\nimport { parseUrl } from './utils/urls';\n\n// Private properties\n// TODO: Use a WeakMap for private globals\n// const globals = new WeakMap();\n\n// Plyr instance\nclass Plyr {\n constructor(target, options) {\n this.timers = {};\n\n // State\n this.ready = false;\n this.loading = false;\n this.failed = false;\n\n // Touch device\n this.touch = support.touch;\n\n // Set the media element\n this.media = target;\n\n // String selector passed\n if (is.string(this.media)) {\n this.media = document.querySelectorAll(this.media);\n }\n\n // jQuery, NodeList or Array passed, use first element\n if ((window.jQuery && this.media instanceof jQuery) || is.nodeList(this.media) || is.array(this.media)) {\n // eslint-disable-next-line\n this.media = this.media[0];\n }\n\n // Set config\n this.config = extend(\n {},\n defaults,\n Plyr.defaults,\n options || {},\n (() => {\n try {\n return JSON.parse(this.media.getAttribute('data-plyr-config'));\n } catch (e) {\n return {};\n }\n })(),\n );\n\n // Elements cache\n this.elements = {\n container: null,\n captions: null,\n buttons: {},\n display: {},\n progress: {},\n inputs: {},\n settings: {\n popup: null,\n menu: null,\n panels: {},\n buttons: {},\n },\n };\n\n // Captions\n this.captions = {\n active: null,\n currentTrack: -1,\n meta: new WeakMap(),\n };\n\n // Fullscreen\n this.fullscreen = {\n active: false,\n };\n\n // Options\n this.options = {\n speed: [],\n quality: [],\n };\n\n // Debugging\n // TODO: move to globals\n this.debug = new Console(this.config.debug);\n\n // Log config options and support\n this.debug.log('Config', this.config);\n this.debug.log('Support', support);\n\n // We need an element to setup\n if (is.nullOrUndefined(this.media) || !is.element(this.media)) {\n this.debug.error('Setup failed: no suitable element passed');\n return;\n }\n\n // Bail if the element is initialized\n if (this.media.plyr) {\n this.debug.warn('Target already setup');\n return;\n }\n\n // Bail if not enabled\n if (!this.config.enabled) {\n this.debug.error('Setup failed: disabled by config');\n return;\n }\n\n // Bail if disabled or no basic support\n // You may want to disable certain UAs etc\n if (!support.check().api) {\n this.debug.error('Setup failed: no support');\n return;\n }\n\n // Cache original element state for .destroy()\n const clone = this.media.cloneNode(true);\n clone.autoplay = false;\n this.elements.original = clone;\n\n // Set media type based on tag or data attribute\n // Supported: video, audio, vimeo, youtube\n const type = this.media.tagName.toLowerCase();\n // Embed properties\n let iframe = null;\n let url = null;\n\n // Different setup based on type\n switch (type) {\n case 'div':\n // Find the frame\n iframe = this.media.querySelector('iframe');\n\n // <iframe> type\n if (is.element(iframe)) {\n // Detect provider\n url = parseUrl(iframe.getAttribute('src'));\n this.provider = getProviderByUrl(url.toString());\n\n // Rework elements\n this.elements.container = this.media;\n this.media = iframe;\n\n // Reset classname\n this.elements.container.className = '';\n\n // Get attributes from URL and set config\n if (url.search.length) {\n const truthy = ['1', 'true'];\n\n if (truthy.includes(url.searchParams.get('autoplay'))) {\n this.config.autoplay = true;\n }\n if (truthy.includes(url.searchParams.get('loop'))) {\n this.config.loop.active = true;\n }\n\n // TODO: replace fullscreen.iosNative with this playsinline config option\n // YouTube requires the playsinline in the URL\n if (this.isYouTube) {\n this.config.playsinline = truthy.includes(url.searchParams.get('playsinline'));\n this.config.youtube.hl = url.searchParams.get('hl'); // TODO: Should this be setting language?\n } else {\n this.config.playsinline = true;\n }\n }\n } else {\n // <div> with attributes\n this.provider = this.media.getAttribute(this.config.attributes.embed.provider);\n\n // Remove attribute\n this.media.removeAttribute(this.config.attributes.embed.provider);\n }\n\n // Unsupported or missing provider\n if (is.empty(this.provider) || !Object.keys(providers).includes(this.provider)) {\n this.debug.error('Setup failed: Invalid provider');\n return;\n }\n\n // Audio will come later for external providers\n this.type = types.video;\n\n break;\n\n case 'video':\n case 'audio':\n this.type = type;\n this.provider = providers.html5;\n\n // Get config from attributes\n if (this.media.hasAttribute('crossorigin')) {\n this.config.crossorigin = true;\n }\n if (this.media.hasAttribute('autoplay')) {\n this.config.autoplay = true;\n }\n if (this.media.hasAttribute('playsinline') || this.media.hasAttribute('webkit-playsinline')) {\n this.config.playsinline = true;\n }\n if (this.media.hasAttribute('muted')) {\n this.config.muted = true;\n }\n if (this.media.hasAttribute('loop')) {\n this.config.loop.active = true;\n }\n\n break;\n\n default:\n this.debug.error('Setup failed: unsupported type');\n return;\n }\n\n // Check for support again but with type\n this.supported = support.check(this.type, this.provider, this.config.playsinline);\n\n // If no support for even API, bail\n if (!this.supported.api) {\n this.debug.error('Setup failed: no support');\n return;\n }\n\n this.eventListeners = [];\n\n // Create listeners\n this.listeners = new Listeners(this);\n\n // Setup local storage for user settings\n this.storage = new Storage(this);\n\n // Store reference\n this.media.plyr = this;\n\n // Wrap media\n if (!is.element(this.elements.container)) {\n this.elements.container = createElement('div', { tabindex: 0 });\n wrap(this.media, this.elements.container);\n }\n\n // Add style hook\n ui.addStyleHook.call(this);\n\n // Setup media\n media.setup.call(this);\n\n // Listen for events if debugging\n if (this.config.debug) {\n on.call(this, this.elements.container, this.config.events.join(' '), event => {\n this.debug.log(`event: ${event.type}`);\n });\n }\n\n // Setup interface\n // If embed but not fully supported, build interface now to avoid flash of controls\n if (this.isHTML5 || (this.isEmbed && !this.supported.ui)) {\n ui.build.call(this);\n }\n\n // Container listeners\n this.listeners.container();\n\n // Global listeners\n this.listeners.global();\n\n // Setup fullscreen\n this.fullscreen = new Fullscreen(this);\n\n // Setup ads if provided\n if (this.config.ads.enabled) {\n this.ads = new Ads(this);\n }\n\n // Autoplay if required\n if (this.isHTML5 && this.config.autoplay) {\n setTimeout(() => this.play(), 10);\n }\n\n // Seek time will be recorded (in listeners.js) so we can prevent hiding controls for a few seconds after seek\n this.lastSeekTime = 0;\n\n // Setup preview thumbnails if enabled\n if (this.config.previewThumbnails.enabled) {\n this.previewThumbnails = new PreviewThumbnails(this);\n }\n }\n\n // ---------------------------------------\n // API\n // ---------------------------------------\n\n /**\n * Types and provider helpers\n */\n get isHTML5() {\n return this.provider === providers.html5;\n }\n\n get isEmbed() {\n return this.isYouTube || this.isVimeo;\n }\n\n get isYouTube() {\n return this.provider === providers.youtube;\n }\n\n get isVimeo() {\n return this.provider === providers.vimeo;\n }\n\n get isVideo() {\n return this.type === types.video;\n }\n\n get isAudio() {\n return this.type === types.audio;\n }\n\n /**\n * Play the media, or play the advertisement (if they are not blocked)\n */\n play() {\n if (!is.function(this.media.play)) {\n return null;\n }\n\n // Intecept play with ads\n if (this.ads && this.ads.enabled) {\n this.ads.managerPromise.then(() => this.ads.play()).catch(() => this.media.play());\n }\n\n // Return the promise (for HTML5)\n return this.media.play();\n }\n\n /**\n * Pause the media\n */\n pause() {\n if (!this.playing || !is.function(this.media.pause)) {\n return;\n }\n\n this.media.pause();\n }\n\n /**\n * Get playing state\n */\n get playing() {\n return Boolean(this.ready && !this.paused && !this.ended);\n }\n\n /**\n * Get paused state\n */\n get paused() {\n return Boolean(this.media.paused);\n }\n\n /**\n * Get stopped state\n */\n get stopped() {\n return Boolean(this.paused && this.currentTime === 0);\n }\n\n /**\n * Get ended state\n */\n get ended() {\n return Boolean(this.media.ended);\n }\n\n /**\n * Toggle playback based on current status\n * @param {Boolean} input\n */\n togglePlay(input) {\n // Toggle based on current state if nothing passed\n const toggle = is.boolean(input) ? input : !this.playing;\n\n if (toggle) {\n this.play();\n } else {\n this.pause();\n }\n }\n\n /**\n * Stop playback\n */\n stop() {\n if (this.isHTML5) {\n this.pause();\n this.restart();\n } else if (is.function(this.media.stop)) {\n this.media.stop();\n }\n }\n\n /**\n * Restart playback\n */\n restart() {\n this.currentTime = 0;\n }\n\n /**\n * Rewind\n * @param {Number} seekTime - how far to rewind in seconds. Defaults to the config.seekTime\n */\n rewind(seekTime) {\n this.currentTime = this.currentTime - (is.number(seekTime) ? seekTime : this.config.seekTime);\n }\n\n /**\n * Fast forward\n * @param {Number} seekTime - how far to fast forward in seconds. Defaults to the config.seekTime\n */\n forward(seekTime) {\n this.currentTime = this.currentTime + (is.number(seekTime) ? seekTime : this.config.seekTime);\n }\n\n /**\n * Seek to a time\n * @param {Number} input - where to seek to in seconds. Defaults to 0 (the start)\n */\n set currentTime(input) {\n // Bail if media duration isn't available yet\n if (!this.duration) {\n return;\n }\n\n // Validate input\n const inputIsValid = is.number(input) && input > 0;\n\n // Set\n this.media.currentTime = inputIsValid ? Math.min(input, this.duration) : 0;\n\n // Logging\n this.debug.log(`Seeking to ${this.currentTime} seconds`);\n }\n\n /**\n * Get current time\n */\n get currentTime() {\n return Number(this.media.currentTime);\n }\n\n /**\n * Get buffered\n */\n get buffered() {\n const { buffered } = this.media;\n\n // YouTube / Vimeo return a float between 0-1\n if (is.number(buffered)) {\n return buffered;\n }\n\n // HTML5\n // TODO: Handle buffered chunks of the media\n // (i.e. seek to another section buffers only that section)\n if (buffered && buffered.length && this.duration > 0) {\n return buffered.end(0) / this.duration;\n }\n\n return 0;\n }\n\n /**\n * Get seeking status\n */\n get seeking() {\n return Boolean(this.media.seeking);\n }\n\n /**\n * Get the duration of the current media\n */\n get duration() {\n // Faux duration set via config\n const fauxDuration = parseFloat(this.config.duration);\n // Media duration can be NaN or Infinity before the media has loaded\n const realDuration = (this.media || {}).duration;\n const duration = !is.number(realDuration) || realDuration === Infinity ? 0 : realDuration;\n\n // If config duration is funky, use regular duration\n return fauxDuration || duration;\n }\n\n /**\n * Set the player volume\n * @param {Number} value - must be between 0 and 1. Defaults to the value from local storage and config.volume if not set in storage\n */\n set volume(value) {\n let volume = value;\n const max = 1;\n const min = 0;\n\n if (is.string(volume)) {\n volume = Number(volume);\n }\n\n // Load volume from storage if no value specified\n if (!is.number(volume)) {\n volume = this.storage.get('volume');\n }\n\n // Use config if all else fails\n if (!is.number(volume)) {\n ({ volume } = this.config);\n }\n\n // Maximum is volumeMax\n if (volume > max) {\n volume = max;\n }\n // Minimum is volumeMin\n if (volume < min) {\n volume = min;\n }\n\n // Update config\n this.config.volume = volume;\n\n // Set the player volume\n this.media.volume = volume;\n\n // If muted, and we're increasing volume manually, reset muted state\n if (!is.empty(value) && this.muted && volume > 0) {\n this.muted = false;\n }\n }\n\n /**\n * Get the current player volume\n */\n get volume() {\n return Number(this.media.volume);\n }\n\n /**\n * Increase volume\n * @param {Boolean} step - How much to decrease by (between 0 and 1)\n */\n increaseVolume(step) {\n const volume = this.media.muted ? 0 : this.volume;\n this.volume = volume + (is.number(step) ? step : 0);\n }\n\n /**\n * Decrease volume\n * @param {Boolean} step - How much to decrease by (between 0 and 1)\n */\n decreaseVolume(step) {\n this.increaseVolume(-step);\n }\n\n /**\n * Set muted state\n * @param {Boolean} mute\n */\n set muted(mute) {\n let toggle = mute;\n\n // Load muted state from storage\n if (!is.boolean(toggle)) {\n toggle = this.storage.get('muted');\n }\n\n // Use config if all else fails\n if (!is.boolean(toggle)) {\n toggle = this.config.muted;\n }\n\n // Update config\n this.config.muted = toggle;\n\n // Set mute on the player\n this.media.muted = toggle;\n }\n\n /**\n * Get current muted state\n */\n get muted() {\n return Boolean(this.media.muted);\n }\n\n /**\n * Check if the media has audio\n */\n get hasAudio() {\n // Assume yes for all non HTML5 (as we can't tell...)\n if (!this.isHTML5) {\n return true;\n }\n\n if (this.isAudio) {\n return true;\n }\n\n // Get audio tracks\n return (\n Boolean(this.media.mozHasAudio) ||\n Boolean(this.media.webkitAudioDecodedByteCount) ||\n Boolean(this.media.audioTracks && this.media.audioTracks.length)\n );\n }\n\n /**\n * Set playback speed\n * @param {Number} speed - the speed of playback (0.5-2.0)\n */\n set speed(input) {\n let speed = null;\n\n if (is.number(input)) {\n speed = input;\n }\n\n if (!is.number(speed)) {\n speed = this.storage.get('speed');\n }\n\n if (!is.number(speed)) {\n speed = this.config.speed.selected;\n }\n\n // Clamp to min/max\n const { minimumSpeed: min, maximumSpeed: max } = this;\n speed = clamp(speed, min, max);\n\n // Update config\n this.config.speed.selected = speed;\n\n // Set media speed\n setTimeout(() => {\n this.media.playbackRate = speed;\n }, 0);\n }\n\n /**\n * Get current playback speed\n */\n get speed() {\n return Number(this.media.playbackRate);\n }\n\n /**\n * Get the minimum allowed speed\n */\n get minimumSpeed() {\n if (this.isYouTube) {\n // https://developers.google.com/youtube/iframe_api_reference#setPlaybackRate\n return Math.min(...this.options.speed);\n }\n\n if (this.isVimeo) {\n // https://github.com/vimeo/player.js/#setplaybackrateplaybackrate-number-promisenumber-rangeerrorerror\n return 0.5;\n }\n\n // https://stackoverflow.com/a/32320020/1191319\n return 0.0625;\n }\n\n /**\n * Get the maximum allowed speed\n */\n get maximumSpeed() {\n if (this.isYouTube) {\n // https://developers.google.com/youtube/iframe_api_reference#setPlaybackRate\n return Math.max(...this.options.speed);\n }\n\n if (this.isVimeo) {\n // https://github.com/vimeo/player.js/#setplaybackrateplaybackrate-number-promisenumber-rangeerrorerror\n return 2;\n }\n\n // https://stackoverflow.com/a/32320020/1191319\n return 16;\n }\n\n /**\n * Set playback quality\n * Currently HTML5 & YouTube only\n * @param {Number} input - Quality level\n */\n set quality(input) {\n const config = this.config.quality;\n const options = this.options.quality;\n\n if (!options.length) {\n return;\n }\n\n let quality = [\n !is.empty(input) && Number(input),\n this.storage.get('quality'),\n config.selected,\n config.default,\n ].find(is.number);\n\n let updateStorage = true;\n\n if (!options.includes(quality)) {\n const value = closest(options, quality);\n this.debug.warn(`Unsupported quality option: ${quality}, using ${value} instead`);\n quality = value;\n\n // Don't update storage if quality is not supported\n updateStorage = false;\n }\n\n // Update config\n config.selected = quality;\n\n // Set quality\n this.media.quality = quality;\n\n // Save to storage\n if (updateStorage) {\n this.storage.set({ quality });\n }\n }\n\n /**\n * Get current quality level\n */\n get quality() {\n return this.media.quality;\n }\n\n /**\n * Toggle loop\n * TODO: Finish fancy new logic. Set the indicator on load as user may pass loop as config\n * @param {Boolean} input - Whether to loop or not\n */\n set loop(input) {\n const toggle = is.boolean(input) ? input : this.config.loop.active;\n this.config.loop.active = toggle;\n this.media.loop = toggle;\n\n // Set default to be a true toggle\n /* const type = ['start', 'end', 'all', 'none', 'toggle'].includes(input) ? input : 'toggle';\n\n switch (type) {\n case 'start':\n if (this.config.loop.end && this.config.loop.end <= this.currentTime) {\n this.config.loop.end = null;\n }\n this.config.loop.start = this.currentTime;\n // this.config.loop.indicator.start = this.elements.display.played.value;\n break;\n\n case 'end':\n if (this.config.loop.start >= this.currentTime) {\n return this;\n }\n this.config.loop.end = this.currentTime;\n // this.config.loop.indicator.end = this.elements.display.played.value;\n break;\n\n case 'all':\n this.config.loop.start = 0;\n this.config.loop.end = this.duration - 2;\n this.config.loop.indicator.start = 0;\n this.config.loop.indicator.end = 100;\n break;\n\n case 'toggle':\n if (this.config.loop.active) {\n this.config.loop.start = 0;\n this.config.loop.end = null;\n } else {\n this.config.loop.start = 0;\n this.config.loop.end = this.duration - 2;\n }\n break;\n\n default:\n this.config.loop.start = 0;\n this.config.loop.end = null;\n break;\n } */\n }\n\n /**\n * Get current loop state\n */\n get loop() {\n return Boolean(this.media.loop);\n }\n\n /**\n * Set new media source\n * @param {Object} input - The new source object (see docs)\n */\n set source(input) {\n source.change.call(this, input);\n }\n\n /**\n * Get current source\n */\n get source() {\n return this.media.currentSrc;\n }\n\n /**\n * Get a download URL (either source or custom)\n */\n get download() {\n const { download } = this.config.urls;\n\n return is.url(download) ? download : this.source;\n }\n\n /**\n * Set the download URL\n */\n set download(input) {\n if (!is.url(input)) {\n return;\n }\n\n this.config.urls.download = input;\n\n controls.setDownloadUrl.call(this);\n }\n\n /**\n * Set the poster image for a video\n * @param {String} input - the URL for the new poster image\n */\n set poster(input) {\n if (!this.isVideo) {\n this.debug.warn('Poster can only be set for video');\n return;\n }\n\n ui.setPoster.call(this, input, false).catch(() => {});\n }\n\n /**\n * Get the current poster image\n */\n get poster() {\n if (!this.isVideo) {\n return null;\n }\n\n return this.media.getAttribute('poster');\n }\n\n /**\n * Get the current aspect ratio in use\n */\n get ratio() {\n if (!this.isVideo) {\n return null;\n }\n\n const ratio = reduceAspectRatio(getAspectRatio.call(this));\n\n return is.array(ratio) ? ratio.join(':') : ratio;\n }\n\n /**\n * Set video aspect ratio\n */\n set ratio(input) {\n if (!this.isVideo) {\n this.debug.warn('Aspect ratio can only be set for video');\n return;\n }\n\n if (!is.string(input) || !validateRatio(input)) {\n this.debug.error(`Invalid aspect ratio specified (${input})`);\n return;\n }\n\n this.config.ratio = input;\n\n setAspectRatio.call(this);\n }\n\n /**\n * Set the autoplay state\n * @param {Boolean} input - Whether to autoplay or not\n */\n set autoplay(input) {\n const toggle = is.boolean(input) ? input : this.config.autoplay;\n this.config.autoplay = toggle;\n }\n\n /**\n * Get the current autoplay state\n */\n get autoplay() {\n return Boolean(this.config.autoplay);\n }\n\n /**\n * Toggle captions\n * @param {Boolean} input - Whether to enable captions\n */\n toggleCaptions(input) {\n captions.toggle.call(this, input, false);\n }\n\n /**\n * Set the caption track by index\n * @param {Number} - Caption index\n */\n set currentTrack(input) {\n captions.set.call(this, input, false);\n }\n\n /**\n * Get the current caption track index (-1 if disabled)\n */\n get currentTrack() {\n const { toggled, currentTrack } = this.captions;\n return toggled ? currentTrack : -1;\n }\n\n /**\n * Set the wanted language for captions\n * Since tracks can be added later it won't update the actual caption track until there is a matching track\n * @param {String} - Two character ISO language code (e.g. EN, FR, PT, etc)\n */\n set language(input) {\n captions.setLanguage.call(this, input, false);\n }\n\n /**\n * Get the current track's language\n */\n get language() {\n return (captions.getCurrentTrack.call(this) || {}).language;\n }\n\n /**\n * Toggle picture-in-picture playback on WebKit/MacOS\n * TODO: update player with state, support, enabled\n * TODO: detect outside changes\n */\n set pip(input) {\n // Bail if no support\n if (!support.pip) {\n return;\n }\n\n // Toggle based on current state if not passed\n const toggle = is.boolean(input) ? input : !this.pip;\n\n // Toggle based on current state\n // Safari\n if (is.function(this.media.webkitSetPresentationMode)) {\n this.media.webkitSetPresentationMode(toggle ? pip.active : pip.inactive);\n }\n\n // Chrome\n if (is.function(this.media.requestPictureInPicture)) {\n if (!this.pip && toggle) {\n this.media.requestPictureInPicture();\n } else if (this.pip && !toggle) {\n document.exitPictureInPicture();\n }\n }\n }\n\n /**\n * Get the current picture-in-picture state\n */\n get pip() {\n if (!support.pip) {\n return null;\n }\n\n // Safari\n if (!is.empty(this.media.webkitPresentationMode)) {\n return this.media.webkitPresentationMode === pip.active;\n }\n\n // Chrome\n return this.media === document.pictureInPictureElement;\n }\n\n /**\n * Trigger the airplay dialog\n * TODO: update player with state, support, enabled\n */\n airplay() {\n // Show dialog if supported\n if (support.airplay) {\n this.media.webkitShowPlaybackTargetPicker();\n }\n }\n\n /**\n * Toggle the player controls\n * @param {Boolean} [toggle] - Whether to show the controls\n */\n toggleControls(toggle) {\n // Don't toggle if missing UI support or if it's audio\n if (this.supported.ui && !this.isAudio) {\n // Get state before change\n const isHidden = hasClass(this.elements.container, this.config.classNames.hideControls);\n // Negate the argument if not undefined since adding the class to hides the controls\n const force = typeof toggle === 'undefined' ? undefined : !toggle;\n // Apply and get updated state\n const hiding = toggleClass(this.elements.container, this.config.classNames.hideControls, force);\n\n // Close menu\n if (hiding && this.config.controls.includes('settings') && !is.empty(this.config.settings)) {\n controls.toggleMenu.call(this, false);\n }\n\n // Trigger event on change\n if (hiding !== isHidden) {\n const eventName = hiding ? 'controlshidden' : 'controlsshown';\n triggerEvent.call(this, this.media, eventName);\n }\n\n return !hiding;\n }\n\n return false;\n }\n\n /**\n * Add event listeners\n * @param {String} event - Event type\n * @param {Function} callback - Callback for when event occurs\n */\n on(event, callback) {\n on.call(this, this.elements.container, event, callback);\n }\n\n /**\n * Add event listeners once\n * @param {String} event - Event type\n * @param {Function} callback - Callback for when event occurs\n */\n once(event, callback) {\n once.call(this, this.elements.container, event, callback);\n }\n\n /**\n * Remove event listeners\n * @param {String} event - Event type\n * @param {Function} callback - Callback for when event occurs\n */\n off(event, callback) {\n off(this.elements.container, event, callback);\n }\n\n /**\n * Destroy an instance\n * Event listeners are removed when elements are removed\n * http://stackoverflow.com/questions/12528049/if-a-dom-element-is-removed-are-its-listeners-also-removed-from-memory\n * @param {Function} callback - Callback for when destroy is complete\n * @param {Boolean} soft - Whether it's a soft destroy (for source changes etc)\n */\n destroy(callback, soft = false) {\n if (!this.ready) {\n return;\n }\n\n const done = () => {\n // Reset overflow (incase destroyed while in fullscreen)\n document.body.style.overflow = '';\n\n // GC for embed\n this.embed = null;\n\n // If it's a soft destroy, make minimal changes\n if (soft) {\n if (Object.keys(this.elements).length) {\n // Remove elements\n removeElement(this.elements.buttons.play);\n removeElement(this.elements.captions);\n removeElement(this.elements.controls);\n removeElement(this.elements.wrapper);\n\n // Clear for GC\n this.elements.buttons.play = null;\n this.elements.captions = null;\n this.elements.controls = null;\n this.elements.wrapper = null;\n }\n\n // Callback\n if (is.function(callback)) {\n callback();\n }\n } else {\n // Unbind listeners\n unbindListeners.call(this);\n\n // Replace the container with the original element provided\n replaceElement(this.elements.original, this.elements.container);\n\n // Event\n triggerEvent.call(this, this.elements.original, 'destroyed', true);\n\n // Callback\n if (is.function(callback)) {\n callback.call(this.elements.original);\n }\n\n // Reset state\n this.ready = false;\n\n // Clear for garbage collection\n setTimeout(() => {\n this.elements = null;\n this.media = null;\n }, 200);\n }\n };\n\n // Stop playback\n this.stop();\n\n // Clear timeouts\n clearTimeout(this.timers.loading);\n clearTimeout(this.timers.controls);\n clearTimeout(this.timers.resized);\n\n // Provider specific stuff\n if (this.isHTML5) {\n // Restore native video controls\n ui.toggleNativeControls.call(this, true);\n\n // Clean up\n done();\n } else if (this.isYouTube) {\n // Clear timers\n clearInterval(this.timers.buffering);\n clearInterval(this.timers.playing);\n\n // Destroy YouTube API\n if (this.embed !== null && is.function(this.embed.destroy)) {\n this.embed.destroy();\n }\n\n // Clean up\n done();\n } else if (this.isVimeo) {\n // Destroy Vimeo API\n // then clean up (wait, to prevent postmessage errors)\n if (this.embed !== null) {\n this.embed.unload().then(done);\n }\n\n // Vimeo does not always return\n setTimeout(done, 200);\n }\n }\n\n /**\n * Check for support for a mime type (HTML5 only)\n * @param {String} type - Mime type\n */\n supports(type) {\n return support.mime.call(this, type);\n }\n\n /**\n * Check for support\n * @param {String} type - Player type (audio/video)\n * @param {String} provider - Provider (html5/youtube/vimeo)\n * @param {Boolean} inline - Where player has `playsinline` sttribute\n */\n static supported(type, provider, inline) {\n return support.check(type, provider, inline);\n }\n\n /**\n * Load an SVG sprite into the page\n * @param {String} url - URL for the SVG sprite\n * @param {String} [id] - Unique ID\n */\n static loadSprite(url, id) {\n return loadSprite(url, id);\n }\n\n /**\n * Setup multiple instances\n * @param {*} selector\n * @param {Object} options\n */\n static setup(selector, options = {}) {\n let targets = null;\n\n if (is.string(selector)) {\n targets = Array.from(document.querySelectorAll(selector));\n } else if (is.nodeList(selector)) {\n targets = Array.from(selector);\n } else if (is.array(selector)) {\n targets = selector.filter(is.element);\n }\n\n if (is.empty(targets)) {\n return null;\n }\n\n return targets.map(t => new Plyr(t, options));\n }\n}\n\nPlyr.defaults = cloneDeep(defaults);\n\nexport default Plyr;\n","/**\n * Returns a number whose value is limited to the given range.\n *\n * Example: limit the output of this computation to between 0 and 255\n * (x * 255).clamp(0, 255)\n *\n * @param {Number} input\n * @param {Number} min The lower boundary of the output range\n * @param {Number} max The upper boundary of the output range\n * @returns A number in the range [min, max]\n * @type Number\n */\nexport function clamp(input = 0, min = 0, max = 255) {\n return Math.min(Math.max(input, min), max);\n}\n\nexport default { clamp };\n"]}