diff --git a/pr-preview/pr-26/404.html b/pr-preview/pr-26/404.html new file mode 100644 index 0000000..fe23006 --- /dev/null +++ b/pr-preview/pr-26/404.html @@ -0,0 +1,40 @@ + + + + + Single Page Apps for GitHub Pages + + + + + diff --git a/pr-preview/pr-26/assets/blocked-segment-C-5acAOy.css b/pr-preview/pr-26/assets/blocked-segment-C-5acAOy.css new file mode 100644 index 0000000..ad2a48c --- /dev/null +++ b/pr-preview/pr-26/assets/blocked-segment-C-5acAOy.css @@ -0,0 +1 @@ +.pbw-blocked-segment-notification{position:absolute;right:var(--size-5);bottom:var(--size-9);display:flex;align-items:center;height:var(--size-6);color:#fff;background-color:#000000b3;border-radius:var(--radius-3);box-shadow:var(--shadow-3);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);padding-inline:var(--size-2)} diff --git a/pr-preview/pr-26/assets/blocked-segment-DyYe5u7p.js b/pr-preview/pr-26/assets/blocked-segment-DyYe5u7p.js new file mode 100644 index 0000000..e2102b5 --- /dev/null +++ b/pr-preview/pr-26/assets/blocked-segment-DyYe5u7p.js @@ -0,0 +1,2 @@ +var h=(t,o,e)=>{if(!o.has(t))throw TypeError("Cannot "+e)};var n=(t,o,e)=>(h(t,o,"read from private field"),e?e.call(t):o.get(t)),l=(t,o,e)=>{if(o.has(t))throw TypeError("Cannot add the same private member more than once");o instanceof WeakSet?o.add(t):o.set(t,e)},a=(t,o,e,c)=>(h(t,o,"write to private field"),c?c.call(t,e):o.set(t,e),e);var p=(t,o,e)=>(h(t,o,"access private method"),e);import{p as g}from"./core-demo-header-component-76S4-KyJ.js";/* empty css */const f=g.getPlugin("plugin");var i,s,r,u,d,m;class N extends f{constructor(e,c){super(e,c);l(this,r);l(this,d);l(this,i,void 0);l(this,s,void 0);this.player.ready(()=>p(this,r,u).call(this)),this.player.on("loadeddata",()=>p(this,d,m).call(this))}get options(){return this.player.options().plugins.blockedSegmentNotification}}i=new WeakMap,s=new WeakMap,r=new WeakSet,u=function(){a(this,i,k.addChild("component",{className:"pbw-blocked-segment-notification vjs-hidden"}))},d=new WeakSet,m=function(){const e=this.player.textTracks().getTrackById("srgssr-blocked-segments");e==null||e.on("cuechange",()=>{if(!e.activeCues.length)return;clearTimeout(n(this,s));const b=JSON.parse(e.activeCues[0].text).blockReason??"UNKNOWN",y=n(this,i).localize(b);n(this,i).el().textContent=`ⓘ ${y}`,n(this,i).show(),a(this,s,setTimeout(()=>{n(this,i).hide(),a(this,s,void 0)},this.options.delay))})};g.registerPlugin("blockedSegmentNotification",N);const k=g("video-element-id",{fill:!0,plugins:{blockedSegmentNotification:{delay:5e3}}});k.src({src:"urn:rts:video:10894383",type:"srgssr/urn"});document.querySelector("#close-btn").addEventListener("click",()=>{window.close()});window.pillarbox=g; +//# sourceMappingURL=blocked-segment-DyYe5u7p.js.map diff --git a/pr-preview/pr-26/assets/blocked-segment-DyYe5u7p.js.map b/pr-preview/pr-26/assets/blocked-segment-DyYe5u7p.js.map new file mode 100644 index 0000000..805a10a --- /dev/null +++ b/pr-preview/pr-26/assets/blocked-segment-DyYe5u7p.js.map @@ -0,0 +1 @@ +{"version":3,"file":"blocked-segment-DyYe5u7p.js","sources":["../../static/showcases/blocked-segment.html?html-proxy&index=0.js","../../static/showcases/blocked-segment.html?html-proxy&index=1.js"],"sourcesContent":["\n // Import the pillarbox library\n import pillarbox from '@srgssr/pillarbox-web';\n\n const Plugin = pillarbox.getPlugin('plugin');\n\n // A Pillarbox plugin to display a blocked segment notification.\n class BlockedSegmentNotification extends Plugin {\n // Reference to the component used to display the blocked segment notification.\n #component;\n // The id for the timeout function responsible for managing the auto-hide of the notification.\n #timeoutId;\n\n constructor(player, options) {\n super(player, options);\n\n // Attach the DOM element when the player is ready,\n this.player.ready(() => this.#attachComponent());\n // Wait for the 'loadeddata' event to ensure the text tracks are available\n this.player.on('loadeddata', () => this.#handleBlockedSegmentChange());\n }\n\n #attachComponent() {\n this.#component = player.addChild('component', {\n // Set the class for styling and hide the element with 'vjs-hidden'\n className: 'pbw-blocked-segment-notification vjs-hidden'\n });\n }\n\n #handleBlockedSegmentChange() {\n // Get the text track with the ID 'srgssr-blocked-segments'\n const blockedSegments = this.player.textTracks().getTrackById('srgssr-blocked-segments');\n\n // Add a listener for the 'cuechange' event on the blocked segments text track\n blockedSegments?.on('cuechange', () => {\n // Check if there are active cues in the blocked segments text track\n if (!blockedSegments.activeCues.length) return;\n\n // Cancel the previous timeout\n clearTimeout(this.#timeoutId);\n\n // Parse the JSON content of the active cue to get the blocked segment information\n const blockSegment = JSON.parse(blockedSegments.activeCues[0].text);\n const blockReason = blockSegment.blockReason ?? 'UNKNOWN';\n // Block reasons are localized out of the box, alternatively you can make your own\n const message = this.#component.localize(blockReason);\n\n // Update the displayed notification text with the appropriate message\n this.#component.el().textContent = `ⓘ ${message}`;\n\n // Show the blocked segment notification\n this.#component.show();\n\n // Set a timeout to hide the notification after a specified delay\n this.#timeoutId = setTimeout(() => {\n this.#component.hide();\n this.#timeoutId = undefined;\n }, this.options.delay);\n });\n }\n\n // Get the options of this plugin\n get options() {\n return this.player.options().plugins.blockedSegmentNotification;\n }\n }\n\n // Register a plugin to display notifications on blocked segments\n pillarbox.registerPlugin('blockedSegmentNotification', BlockedSegmentNotification);\n\n // Create a pillarbox player instance with the blockedSegmentNotification plugin\n const player = pillarbox(\n 'video-element-id', {\n fill: true,\n plugins: {\n blockedSegmentNotification: {\n delay: 5000, // Delay in milliseconds before hiding the notification\n }\n }\n }\n );\n\n // Load the video source for the player\n player.src({ src: 'urn:rts:video:10894383', type: 'srgssr/urn' });\n","\n import pillarbox from '@srgssr/pillarbox-web';\n import '../../src/layout/header/core-demo-header-component.js';\n\n document.querySelector('#close-btn').addEventListener('click', () => {\n window.close();\n });\n\n window.pillarbox = pillarbox;\n"],"names":["Plugin","pillarbox","BlockedSegmentNotification","player","options","__privateAdd","_attachComponent","_handleBlockedSegmentChange","_component","_timeoutId","__privateMethod","attachComponent_fn","handleBlockedSegmentChange_fn","__privateSet","blockedSegments","__privateG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KAAM,GACN,QAAS,CACP,2BAA4B,CAC1B,MAAO,GACR,CACF,CACF,CACL,EAGEE,EAAO,IAAI,CAAE,IAAK,yBAA0B,KAAM,aAAc,EC/EhE,SAAS,cAAc,YAAY,EAAE,iBAAiB,QAAS,IAAM,CACnE,OAAO,MAAK,CAChB,CAAG,EAED,OAAO,UAAYF"} \ No newline at end of file diff --git a/pr-preview/pr-26/assets/chapters-B-skcyRI.css b/pr-preview/pr-26/assets/chapters-B-skcyRI.css new file mode 100644 index 0000000..4813dd2 --- /dev/null +++ b/pr-preview/pr-26/assets/chapters-B-skcyRI.css @@ -0,0 +1 @@ +.pbw-current-chapter{position:absolute;top:calc(var(--size-8) * -1);left:var(--size-4);display:flex;width:var(--size-15);height:var(--size-9);color:#fff;background-color:#00000080;border-radius:var(--radius-2);box-shadow:var(--shadow-3);-webkit-backdrop-filter:sepia(50%);backdrop-filter:sepia(50%)}.vjs-layout-medium .pbw-current-chapter{width:var(--size-14)}.vjs-layout-tiny .pbw-current-chapter,.vjs-layout-x-small .pbw-current-chapter,.vjs-layout-small .pbw-current-chapter{display:none}.pbw-chapter-title{display:-webkit-box;padding:var(--size-1) var(--size-2);overflow:hidden;font-weight:var(--font-weight-3);text-overflow:ellipsis;-webkit-line-clamp:4;-webkit-box-orient:vertical}.pbw-chapter-thumbnail{border-top-left-radius:var(--radius-2);border-bottom-left-radius:var(--radius-2);box-shadow:var(--inner-shadow-3)} diff --git a/pr-preview/pr-26/assets/chapters-DYtndkWS.js b/pr-preview/pr-26/assets/chapters-DYtndkWS.js new file mode 100644 index 0000000..6f44fef --- /dev/null +++ b/pr-preview/pr-26/assets/chapters-DYtndkWS.js @@ -0,0 +1,2 @@ +var h=(t,r,e)=>{if(!r.has(t))throw TypeError("Cannot "+e)};var s=(t,r,e)=>(h(t,r,"read from private field"),e?e.call(t):r.get(t)),i=(t,r,e)=>{if(r.has(t))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(t):r.set(t,e)},d=(t,r,e,a)=>(h(t,r,"write to private field"),a?a.call(t,e):r.set(t,e),e);var o=(t,r,e)=>(h(t,r,"access private method"),e);import{p}from"./core-demo-header-component-76S4-KyJ.js";/* empty css */const y=p.getPlugin("plugin");var n,c,u,l,m;class b extends y{constructor(e,a){super(e,a);i(this,c);i(this,l);i(this,n,void 0);this.player.ready(()=>o(this,c,u).call(this)),this.player.on("loadeddata",()=>o(this,l,m).call(this))}}n=new WeakMap,c=new WeakSet,u=function(){d(this,n,this.player.getChild("ControlBar").addChild("component",{id:"current-chapter",className:"pbw-current-chapter vjs-hidden"}));const e=document.createElement("img");e.className="pbw-chapter-thumbnail";const a=document.createElement("span");a.className="pbw-chapter-title",s(this,n).el().appendChild(e),s(this,n).el().appendChild(a),s(this,n).updateData=(g,C)=>{a.textContent=C,e.src=g}},l=new WeakSet,m=function(){const e=this.player.textTracks().getTrackById("srgssr-chapters");e==null||e.on("cuechange",()=>{if(!e.activeCues.length){s(this,n).hide();return}const a=JSON.parse(e.activeCues[0].text);s(this,n).updateData(a.imageUrl,a.title),s(this,n).show()})};p.registerPlugin("currentChapter",b);const w=p("video-element-id",{fill:!0,plugins:{currentChapter:!0}});w.src({src:"urn:rts:video:10894383",type:"srgssr/urn"});document.querySelector("#close-btn").addEventListener("click",()=>{window.close()});window.pillarbox=p; +//# sourceMappingURL=chapters-DYtndkWS.js.map diff --git a/pr-preview/pr-26/assets/chapters-DYtndkWS.js.map b/pr-preview/pr-26/assets/chapters-DYtndkWS.js.map new file mode 100644 index 0000000..6a22aef --- /dev/null +++ b/pr-preview/pr-26/assets/chapters-DYtndkWS.js.map @@ -0,0 +1 @@ +{"version":3,"file":"chapters-DYtndkWS.js","sources":["../../static/showcases/chapters.html?html-proxy&index=0.js","../../static/showcases/chapters.html?html-proxy&index=1.js"],"sourcesContent":["\n // Import the pillarbox library\n import pillarbox from '@srgssr/pillarbox-web';\n\n const Plugin = pillarbox.getPlugin('plugin');\n\n // A Pillarbox plugin to display information about the current chapter.\n class CurrentChapterPlugin extends Plugin {\n // Reference to the component used to display the current chapter information.\n #component;\n\n constructor(player, options) {\n super(player, options);\n\n // Attach the DOM element when the player is ready,\n this.player.ready(() => this.#attachComponent());\n // Wait for the 'loadeddata' event to handle the chapter change\n this.player.on('loadeddata', () => this.#handleChapterChange());\n }\n\n #attachComponent() {\n // Create a new component to display the current chapter information\n this.#component = this.player.getChild('ControlBar').addChild('component', {\n id: 'current-chapter',\n // Set the class for styling and hide the element with 'vjs-hidden'\n className: 'pbw-current-chapter vjs-hidden'\n });\n\n // Create an image element for the chapter thumbnail\n const thumbnailImg = document.createElement('img');\n thumbnailImg.className = 'pbw-chapter-thumbnail';\n\n // Create a span element for the chapter title\n const chapterText = document.createElement('span');\n chapterText.className = 'pbw-chapter-title';\n\n // Append the thumbnail and title elements to the component\n this.#component.el().appendChild(thumbnailImg);\n this.#component.el().appendChild(chapterText);\n\n // Add a function to the component to update the chapter information\n this.#component.updateData = (img, text) => {\n chapterText.textContent = text;\n thumbnailImg.src = img;\n };\n }\n\n #handleChapterChange() {\n // Get the text track with the ID 'srgssr-chapters'\n const chapters = this.player.textTracks().getTrackById('srgssr-chapters');\n\n // Add a listener for the 'cuechange' event on the chapters text track\n chapters?.on('cuechange', () => {\n // Check if there are active cues in the chapters text track\n if (!chapters.activeCues.length) {\n // Hide the current chapter component if there are no active cues\n this.#component.hide();\n return;\n }\n\n // Parse the JSON content of the active cue to get the current chapter information\n const currentChapter = JSON.parse(chapters.activeCues[0].text);\n\n // Update the displayed chapter title and thumbnail\n this.#component.updateData(currentChapter.imageUrl, currentChapter.title);\n\n // Show the current chapter component\n this.#component.show();\n });\n }\n }\n\n // Register a plugin to display the currently playing chapter\n pillarbox.registerPlugin('currentChapter', CurrentChapterPlugin);\n\n // Create a pillarbox player instance with the currentChapter plugin\n const player = pillarbox(\n 'video-element-id',\n { fill: true, plugins: { currentChapter: true } }\n );\n\n // Set the video source for the player\n player.src({ src: 'urn:rts:video:10894383', type: 'srgssr/urn' });\n","\n import pillarbox from '@srgssr/pillarbox-web';\n import '../../src/layout/header/core-demo-header-component.js';\n\n document.querySelector('#close-btn').addEventListener('click', () => {\n window.close();\n });\n\n window.pillarbox = pillarbox;\n"],"names":["Plugin","pillarbox","CurrentChapterPlugin","player","options","__privateAdd","_attachComponent","_handleChapterChange","_component","__privateMethod","attachComponent_fn","handleChapterChange_fn","__privateSet","thumbnailImg","chapterText","__privateGet","img","text","chapters","currentChapter"],"mappings":"meAIE,MAAMA,EAASC,EAAU,UAAU,QAAQ,gBAG3C,MAAMC,UAA6BF,CAAO,CAIxC,YAAYG,EAAQC,EAAS,CAC3B,MAAMD,EAAQC,CAAO,EAQvBC,EAAA,KAAAC,GA2BAD,EAAA,KAAAE,GAtCAF,EAAA,KAAAG,EAAA,QAME,KAAK,OAAO,MAAM,IAAMC,EAAA,KAAKH,EAAAI,GAAL,UAAuB,EAE/C,KAAK,OAAO,GAAG,aAAc,IAAMD,EAAA,KAAKF,EAAAI,GAAL,UAA2B,CAC/D,CAoDF,CA7DCH,EAAA,YAWAF,EAAA,YAAAI,EAAgB,UAAG,CAEjBE,EAAA,KAAKJ,EAAa,KAAK,OAAO,SAAS,YAAY,EAAE,SAAS,YAAa,CACzE,GAAI,kBAEJ,UAAW,gCACnB,CAAO,GAGD,MAAMK,EAAe,SAAS,cAAc,KAAK,EACjDA,EAAa,UAAY,wBAGzB,MAAMC,EAAc,SAAS,cAAc,MAAM,EACjDA,EAAY,UAAY,oBAGxBC,EAAA,KAAKP,GAAW,GAAI,EAAC,YAAYK,CAAY,EAC7CE,EAAA,KAAKP,GAAW,GAAI,EAAC,YAAYM,CAAW,EAG5CC,EAAA,KAAKP,GAAW,WAAa,CAACQ,EAAKC,IAAS,CAC1CH,EAAY,YAAcG,EAC1BJ,EAAa,IAAMG,CAC3B,CACK,EAEDT,EAAA,YAAAI,EAAoB,UAAG,CAErB,MAAMO,EAAW,KAAK,OAAO,WAAU,EAAG,aAAa,iBAAiB,EAGxEA,GAAA,MAAAA,EAAU,GAAG,YAAa,IAAM,CAE9B,GAAI,CAACA,EAAS,WAAW,OAAQ,CAE/BH,EAAA,KAAKP,GAAW,OAChB,MACD,CAGD,MAAMW,EAAiB,KAAK,MAAMD,EAAS,WAAW,CAAC,EAAE,IAAI,EAG7DH,EAAA,KAAKP,GAAW,WAAWW,EAAe,SAAUA,EAAe,KAAK,EAGxEJ,EAAA,KAAKP,GAAW,MACxB,EACK,EAIHP,EAAU,eAAe,iBAAkBC,CAAoB,EAG/D,MAAMC,EAASF,EACb,mBACA,CAAE,KAAM,GAAM,QAAS,CAAE,eAAgB,EAAI,CAAI,CACrD,EAGEE,EAAO,IAAI,CAAE,IAAK,yBAA0B,KAAM,aAAc,EC9EhE,SAAS,cAAc,YAAY,EAAE,iBAAiB,QAAS,IAAM,CACnE,OAAO,MAAK,CAChB,CAAG,EAED,OAAO,UAAYF"} \ No newline at end of file diff --git a/pr-preview/pr-26/assets/core-demo-header-component-76S4-KyJ.js b/pr-preview/pr-26/assets/core-demo-header-component-76S4-KyJ.js new file mode 100644 index 0000000..ac7b58f --- /dev/null +++ b/pr-preview/pr-26/assets/core-demo-header-component-76S4-KyJ.js @@ -0,0 +1,267 @@ +var d2=Object.defineProperty;var h2=(s,e,t)=>e in s?d2(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var Se=(s,e,t)=>(h2(s,typeof e!="symbol"?e+"":e,t),t),Po=(s,e,t)=>{if(!e.has(s))throw TypeError("Cannot "+t)};var F=(s,e,t)=>(Po(s,e,"read from private field"),t?t.call(s):e.get(s)),pe=(s,e,t)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,t)},me=(s,e,t,i)=>(Po(s,e,"write to private field"),i?i.call(s,t):e.set(s,t),t);var $e=(s,e,t)=>(Po(s,e,"access private method"),t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const n of r)if(n.type==="childList")for(const a of n.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function t(r){const n={};return r.integrity&&(n.integrity=r.integrity),r.referrerPolicy&&(n.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?n.credentials="include":r.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function i(r){if(r.ep)return;r.ep=!0;const n=t(r);fetch(r.href,n)}})();/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const Gn=globalThis,zu=Gn.ShadowRoot&&(Gn.ShadyCSS===void 0||Gn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Gu=Symbol(),Xc=new WeakMap;let Yh=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==Gu)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(zu&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=Xc.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Xc.set(t,e))}return e}toString(){return this.cssText}};const Ia=s=>new Yh(typeof s=="string"?s:s+"",void 0,Gu),Vk=(s,...e)=>{const t=s.length===1?s[0]:e.reduce((i,r,n)=>i+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+s[n+1],s[0]);return new Yh(t,s,Gu)},f2=(s,e)=>{if(zu)s.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const i=document.createElement("style"),r=Gn.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=t.cssText,s.appendChild(i)}},Yc=zu?s=>s:s=>s instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return Ia(t)})(s):s;/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const{is:p2,defineProperty:m2,getOwnPropertyDescriptor:g2,getOwnPropertyNames:y2,getOwnPropertySymbols:_2,getPrototypeOf:v2}=Object,mi=globalThis,Qc=mi.trustedTypes,T2=Qc?Qc.emptyScript:"",Io=mi.reactiveElementPolyfillSupport,xr=(s,e)=>s,uu={toAttribute(s,e){switch(e){case Boolean:s=s?T2:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,e){let t=s;switch(e){case Boolean:t=s!==null;break;case Number:t=s===null?null:Number(s);break;case Object:case Array:try{t=JSON.parse(s)}catch{t=null}}return t}},Qh=(s,e)=>!p2(s,e),Jc={attribute:!0,type:String,converter:uu,reflect:!1,hasChanged:Qh};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),mi.litPropertyMetadata??(mi.litPropertyMetadata=new WeakMap);class as extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Jc){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(e,i,t);r!==void 0&&m2(this.prototype,e,r)}}static getPropertyDescriptor(e,t,i){const{get:r,set:n}=g2(this.prototype,e)??{get(){return this[t]},set(a){this[t]=a}};return{get(){return r==null?void 0:r.call(this)},set(a){const o=r==null?void 0:r.call(this);n.call(this,a),this.requestUpdate(e,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Jc}static _$Ei(){if(this.hasOwnProperty(xr("elementProperties")))return;const e=v2(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(xr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(xr("properties"))){const t=this.properties,i=[...y2(t),..._2(t)];for(const r of i)this.createProperty(r,t[r])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[i,r]of t)this.elementProperties.set(i,r)}this._$Eh=new Map;for(const[t,i]of this.elementProperties){const r=this._$Eu(t,i);r!==void 0&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const r of i)t.unshift(Yc(r))}else e!==void 0&&t.push(Yc(e));return t}static _$Eu(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return f2(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostConnected)==null?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostDisconnected)==null?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EC(e,t){var n;const i=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,i);if(r!==void 0&&i.reflect===!0){const a=(((n=i.converter)==null?void 0:n.toAttribute)!==void 0?i.converter:uu).toAttribute(t,i.type);this._$Em=e,a==null?this.removeAttribute(r):this.setAttribute(r,a),this._$Em=null}}_$AK(e,t){var n;const i=this.constructor,r=i._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const a=i.getPropertyOptions(r),o=typeof a.converter=="function"?{fromAttribute:a.converter}:((n=a.converter)==null?void 0:n.fromAttribute)!==void 0?a.converter:uu;this._$Em=r,this[r]=o.fromAttribute(t,a.type),this._$Em=null}}requestUpdate(e,t,i){if(e!==void 0){if(i??(i=this.constructor.getPropertyOptions(e)),!(i.hasChanged??Qh)(this[e],t))return;this.P(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,i){this._$AL.has(e)||this._$AL.set(e,t),i.reflect===!0&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,a]of this._$Ep)this[n]=a;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[n,a]of r)a.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.P(n,this[n],a)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach(r=>{var n;return(n=r.hostUpdate)==null?void 0:n.call(r)}),this.update(t)):this._$EU()}catch(r){throw e=!1,this._$EU(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(i=>{var r;return(r=i.hostUpdated)==null?void 0:r.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(t=>this._$EC(t,this[t]))),this._$EU()}updated(e){}firstUpdated(e){}}as.elementStyles=[],as.shadowRootOptions={mode:"open"},as[xr("elementProperties")]=new Map,as[xr("finalized")]=new Map,Io==null||Io({ReactiveElement:as}),(mi.reactiveElementVersions??(mi.reactiveElementVersions=[])).push("2.0.4");/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const Er=globalThis,Jn=Er.trustedTypes,Zc=Jn?Jn.createPolicy("lit-html",{createHTML:s=>s}):void 0,Jh="$lit$",hi=`lit$${(Math.random()+"").slice(9)}$`,Zh="?"+hi,b2=`<${Zh}>`,Hi=document,Lr=()=>Hi.createComment(""),Or=s=>s===null||typeof s!="object"&&typeof s!="function",ef=Array.isArray,S2=s=>ef(s)||typeof(s==null?void 0:s[Symbol.iterator])=="function",Lo=`[ +\f\r]`,sr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ed=/-->/g,td=/>/g,ki=RegExp(`>|${Lo}(?:([^\\s"'>=/]+)(${Lo}*=${Lo}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),id=/'/g,sd=/"/g,tf=/^(?:script|style|textarea|title)$/i,x2=s=>(e,...t)=>({_$litType$:s,strings:e,values:t}),sf=x2(1),zi=Symbol.for("lit-noChange"),Ie=Symbol.for("lit-nothing"),rd=new WeakMap,Ri=Hi.createTreeWalker(Hi,129);function rf(s,e){if(!Array.isArray(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Zc!==void 0?Zc.createHTML(e):e}const E2=(s,e)=>{const t=s.length-1,i=[];let r,n=e===2?"":"",a=sr;for(let o=0;o"?(a=r??sr,y=-1):p[1]===void 0?y=-2:(y=a.lastIndex-p[2].length,d=p[1],a=p[3]===void 0?ki:p[3]==='"'?sd:id):a===sd||a===id?a=ki:a===ed||a===td?a=sr:(a=ki,r=void 0);const b=a===ki&&s[o+1].startsWith("/>")?" ":"";n+=a===sr?l+b2:y>=0?(i.push(d),l.slice(0,y)+Jh+l.slice(y)+hi+b):l+hi+(y===-2?o:b)}return[rf(s,n+(s[t]||"")+(e===2?"":"")),i]};class Rr{constructor({strings:e,_$litType$:t},i){let r;this.parts=[];let n=0,a=0;const o=e.length-1,l=this.parts,[d,p]=E2(e,t);if(this.el=Rr.createElement(d,i),Ri.currentNode=this.el.content,t===2){const y=this.el.content.firstChild;y.replaceWith(...y.childNodes)}for(;(r=Ri.nextNode())!==null&&l.length0){r.textContent=Jn?Jn.emptyScript:"";for(let b=0;b<_;b++)r.append(y[b],Lr()),Ri.nextNode(),l.push({type:2,index:++n});r.append(y[_],Lr())}}}else if(r.nodeType===8)if(r.data===Zh)l.push({type:2,index:n});else{let y=-1;for(;(y=r.data.indexOf(hi,y+1))!==-1;)l.push({type:7,index:n}),y+=hi.length-1}n++}}static createElement(e,t){const i=Hi.createElement("template");return i.innerHTML=e,i}}function xs(s,e,t=s,i){var a,o;if(e===zi)return e;let r=i!==void 0?(a=t._$Co)==null?void 0:a[i]:t._$Cl;const n=Or(e)?void 0:e._$litDirective$;return(r==null?void 0:r.constructor)!==n&&((o=r==null?void 0:r._$AO)==null||o.call(r,!1),n===void 0?r=void 0:(r=new n(s),r._$AT(s,t,i)),i!==void 0?(t._$Co??(t._$Co=[]))[i]=r:t._$Cl=r),r!==void 0&&(e=xs(s,r._$AS(s,e.values),r,i)),e}class C2{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:i}=this._$AD,r=((e==null?void 0:e.creationScope)??Hi).importNode(t,!0);Ri.currentNode=r;let n=Ri.nextNode(),a=0,o=0,l=i[0];for(;l!==void 0;){if(a===l.index){let d;l.type===2?d=new Xr(n,n.nextSibling,this,e):l.type===1?d=new l.ctor(n,l.name,l.strings,this,e):l.type===6&&(d=new k2(n,this,e)),this._$AV.push(d),l=i[++o]}a!==(l==null?void 0:l.index)&&(n=Ri.nextNode(),a++)}return Ri.currentNode=Hi,r}p(e){let t=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}class Xr{get _$AU(){var e;return((e=this._$AM)==null?void 0:e._$AU)??this._$Cv}constructor(e,t,i,r){this.type=2,this._$AH=Ie,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=r,this._$Cv=(r==null?void 0:r.isConnected)??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=xs(this,e,t),Or(e)?e===Ie||e==null||e===""?(this._$AH!==Ie&&this._$AR(),this._$AH=Ie):e!==this._$AH&&e!==zi&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):S2(e)?this.k(e):this._(e)}S(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.S(e))}_(e){this._$AH!==Ie&&Or(this._$AH)?this._$AA.nextSibling.data=e:this.T(Hi.createTextNode(e)),this._$AH=e}$(e){var n;const{values:t,_$litType$:i}=e,r=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=Rr.createElement(rf(i.h,i.h[0]),this.options)),i);if(((n=this._$AH)==null?void 0:n._$AD)===r)this._$AH.p(t);else{const a=new C2(r,this),o=a.u(this.options);a.p(t),this.T(o),this._$AH=a}}_$AC(e){let t=rd.get(e.strings);return t===void 0&&rd.set(e.strings,t=new Rr(e)),t}k(e){ef(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,r=0;for(const n of e)r===t.length?t.push(i=new Xr(this.S(Lr()),this.S(Lr()),this,this.options)):i=t[r],i._$AI(n),r++;r2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Ie}_$AI(e,t=this,i,r){const n=this.strings;let a=!1;if(n===void 0)e=xs(this,e,t,0),a=!Or(e)||e!==this._$AH&&e!==zi,a&&(this._$AH=e);else{const o=e;let l,d;for(e=n[0],l=0;l{const i=(t==null?void 0:t.renderBefore)??e;let r=i._$litPart$;if(r===void 0){const n=(t==null?void 0:t.renderBefore)??null;i._$litPart$=r=new Xr(e.insertBefore(Lr(),n),n,void 0,t??{})}return r._$AI(s),r};/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */class fs extends as{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=P2(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return zi}}var Xh;fs._$litElement$=!0,fs.finalized=!0,(Xh=globalThis.litElementHydrateSupport)==null||Xh.call(globalThis,{LitElement:fs});const Ro=globalThis.litElementPolyfillSupport;Ro==null||Ro({LitElement:fs});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.4");const I2="@font-face{font-family:Material Icons Outlined;font-style:normal;font-weight:400;font-display:block;src:url("+new URL("material-icons-outlined-DZhiGvEA.woff2",import.meta.url).href+') format("woff2"),url('+new URL("material-icons-outlined-BpWbwl2n.woff",import.meta.url).href+') format("woff")}.material-icons-outlined{font-family:Material Icons Outlined;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}a{color:var(--color-4);font-weight:var(--font-weight-6);font-size:var(--size-4);text-decoration:none}a:hover{text-decoration:underline}hr{width:100%;border-color:var(--color-6)}button{color:var(--color-0);font-weight:var(--font-weight-6);font-size:var(--size-3);text-align:center;text-decoration:none;background-color:var(--color-9);border:1px solid var(--color-10);cursor:pointer;transition:background-color .4s,border-color .4s}button.icon-btn{display:flex;align-items:center;justify-content:center;margin:var(--size-1) 0;padding:var(--size-4) var(--size-3);border-radius:var(--radius-2)}button.icon-btn span{margin-right:var(--size-2)}button:hover{background-color:var(--color-8);border-color:var(--color-9)}button:disabled,button:hover:disabled{color:var(--color-9);background-color:var(--color-7);border-color:var(--color-7);cursor:not-allowed}h1{font-size:var(--size-7)}h2{font-size:var(--size-4)}h2.sticky{position:sticky;top:0;margin:0;padding:var(--size-3) 0;background-color:var(--color-11)}h3{font-size:var(--size-3)}input,select{margin:var(--size-1) 0 0 0;padding:var(--size-4) var(--size-3);color:var(--color-2);font-size:var(--size-3);background-color:var(--color-8);border:none;outline:none}select{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}select:required:invalid{color:var(--color-5)}input[type=text]::placeholder{color:var(--color-5)}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{box-shadow:0 0 0 30px var(--color-8) inset!important;-webkit-text-fill-color:var(--color-2)!important}dialog::backdrop{background:#00000080}content-link:first-of-type::part(a){border-radius:var(--radius-3) var(--radius-3) 0 0}content-link:last-of-type::part(a){border-radius:0 0 var(--radius-3) var(--radius-3)}.warning-text{color:var(--red-7)}',L2=":where(html){--animation-fade-in:fade-in .5s var(--ease-3);--animation-fade-in-bloom:fade-in-bloom 2s var(--ease-3);--animation-fade-out:fade-out .5s var(--ease-3);--animation-fade-out-bloom:fade-out-bloom 2s var(--ease-3);--animation-scale-up:scale-up .5s var(--ease-3);--animation-scale-down:scale-down .5s var(--ease-3);--animation-slide-out-up:slide-out-up .5s var(--ease-3);--animation-slide-out-down:slide-out-down .5s var(--ease-3);--animation-slide-out-right:slide-out-right .5s var(--ease-3);--animation-slide-out-left:slide-out-left .5s var(--ease-3);--animation-slide-in-up:slide-in-up .5s var(--ease-3);--animation-slide-in-down:slide-in-down .5s var(--ease-3);--animation-slide-in-right:slide-in-right .5s var(--ease-3);--animation-slide-in-left:slide-in-left .5s var(--ease-3);--animation-shake-x:shake-x .75s var(--ease-out-5);--animation-shake-y:shake-y .75s var(--ease-out-5);--animation-spin:spin 2s linear infinite;--animation-ping:ping 5s var(--ease-out-3) infinite;--animation-blink:blink 1s var(--ease-out-3) infinite;--animation-float:float 3s var(--ease-in-out-3) infinite;--animation-bounce:bounce 2s var(--ease-squish-2) infinite;--animation-pulse:pulse 2s var(--ease-out-3) infinite}@keyframes fade-in{to{opacity:1}}@keyframes fade-in-bloom{0%{filter:brightness(1) blur(20px);opacity:0}10%{filter:brightness(2) blur(10px);opacity:1}to{filter:brightness(1) blur(0);opacity:1}}@keyframes fade-out{to{opacity:0}}@keyframes fade-out-bloom{to{filter:brightness(1) blur(20px);opacity:0}10%{filter:brightness(2) blur(10px);opacity:1}0%{filter:brightness(1) blur(0);opacity:1}}@keyframes scale-up{to{transform:scale(1.25)}}@keyframes scale-down{to{transform:scale(.75)}}@keyframes slide-out-up{to{transform:translateY(-100%)}}@keyframes slide-out-down{to{transform:translateY(100%)}}@keyframes slide-out-right{to{transform:translate(100%)}}@keyframes slide-out-left{to{transform:translate(-100%)}}@keyframes slide-in-up{0%{transform:translateY(100%)}}@keyframes slide-in-down{0%{transform:translateY(-100%)}}@keyframes slide-in-right{0%{transform:translate(-100%)}}@keyframes slide-in-left{0%{transform:translate(100%)}}@keyframes shake-x{0%,to{transform:translate(0)}20%{transform:translate(-5%)}40%{transform:translate(5%)}60%{transform:translate(-5%)}80%{transform:translate(5%)}}@keyframes shake-y{0%,to{transform:translateY(0)}20%{transform:translateY(-5%)}40%{transform:translateY(5%)}60%{transform:translateY(-5%)}80%{transform:translateY(5%)}}@keyframes spin{to{transform:rotate(1turn)}}@keyframes ping{90%,to{opacity:0;transform:scale(2)}}@keyframes blink{0%,to{opacity:1}50%{opacity:.5}}@keyframes float{50%{transform:translateY(-25%)}}@keyframes bounce{25%{transform:translateY(-20%)}40%{transform:translateY(-3%)}0%,60%,to{transform:translateY(0)}}@keyframes pulse{50%{transform:scale(.9)}}@media (prefers-color-scheme:dark){@keyframes fade-in-bloom{0%{filter:brightness(1) blur(20px);opacity:0}10%{filter:brightness(.5) blur(10px);opacity:1}to{filter:brightness(1) blur(0);opacity:1}}}@media (prefers-color-scheme:dark){@keyframes fade-out-bloom{to{filter:brightness(1) blur(20px);opacity:0}10%{filter:brightness(.5) blur(10px);opacity:1}0%{filter:brightness(1) blur(0);opacity:1}}}.fade-in{opacity:0;animation:fade-in .4s var(--ease-elastic-in-3) forwards}.spin,.spin-back{animation:spin .5s var(--ease-out-3) 1}.spin-back{animation-direction:reverse}.slide-up-fade-in{opacity:0;animation:fade-in .4s var(--ease-elastic-in-3) forwards,slide-in-up .4s var(--ease-elastic-in-3) infinite}.fade-in-grow{opacity:0;animation:fade-in .4s var(--ease-elastic-in-3) forwards,grow .4s ease infinite}.fade-out-shrink{opacity:0;animation:fade-in .4s var(--ease-elastic-in-3) forwards,grow .4s ease infinite;animation-direction:reverse}@keyframes grow{0%{max-height:0}to{max-height:var(--size-15)}}",nf=Ia(I2),O2=Ia(L2);var Zn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ri(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function af(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(i){var r=Object.getOwnPropertyDescriptor(s,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:function(){return s[i]}})}),t}var R2=of;function of(s,e,t){s instanceof RegExp&&(s=nd(s,t)),e instanceof RegExp&&(e=nd(e,t));var i=uf(s,e,t);return i&&{start:i[0],end:i[1],pre:t.slice(0,i[0]),body:t.slice(i[0]+s.length,i[1]),post:t.slice(i[1]+e.length)}}function nd(s,e){var t=e.match(s);return t?t[0]:null}of.range=uf;function uf(s,e,t){var i,r,n,a,o,l=t.indexOf(s),d=t.indexOf(e,l+1),p=l;if(l>=0&&d>0){if(s===e)return[l,d];for(i=[],n=t.length;p>=0&&!o;)p==l?(i.push(p),l=t.indexOf(s,p+1)):i.length==1?o=[i.pop(),d]:(r=i.pop(),r=0?l:d;i.length&&(o=[n,a])}return o}var lf=R2,M2=U2,cf="\0SLASH"+Math.random()+"\0",df="\0OPEN"+Math.random()+"\0",Wu="\0CLOSE"+Math.random()+"\0",hf="\0COMMA"+Math.random()+"\0",ff="\0PERIOD"+Math.random()+"\0";function Mo(s){return parseInt(s,10)==s?parseInt(s,10):s.charCodeAt(0)}function N2(s){return s.split("\\\\").join(cf).split("\\{").join(df).split("\\}").join(Wu).split("\\,").join(hf).split("\\.").join(ff)}function B2(s){return s.split(cf).join("\\").split(df).join("{").split(Wu).join("}").split(hf).join(",").split(ff).join(".")}function pf(s){if(!s)return[""];var e=[],t=lf("{","}",s);if(!t)return s.split(",");var i=t.pre,r=t.body,n=t.post,a=i.split(",");a[a.length-1]+="{"+r+"}";var o=pf(n);return n.length&&(a[a.length-1]+=o.shift(),a.push.apply(a,o)),e.push.apply(e,a),e}function U2(s){return s?(s.substr(0,2)==="{}"&&(s="\\{\\}"+s.substr(2)),fr(N2(s),!0).map(B2)):[]}function F2(s){return"{"+s+"}"}function $2(s){return/^-?0\d/.test(s)}function j2(s,e){return s<=e}function q2(s,e){return s>=e}function fr(s,e){var t=[],i=lf("{","}",s);if(!i)return[s];var r=i.pre,n=i.post.length?fr(i.post,!1):[""];if(/\$$/.test(i.pre))for(var a=0;a=0;if(!p&&!y)return i.post.match(/,.*\}/)?(s=i.pre+"{"+i.body+Wu+i.post,fr(s)):[s];var _;if(p)_=i.body.split(/\.\./);else if(_=pf(i.body),_.length===1&&(_=fr(_[0],!1).map(F2),_.length===1))return n.map(function(ue){return i.pre+_[0]+ue});var b;if(p){var v=Mo(_[0]),x=Mo(_[1]),D=Math.max(_[0].length,_[1].length),A=_.length==3?Math.abs(Mo(_[2])):1,k=j2,M=x0){var J=new Array(V+1).join("0");I<0?U="-"+J+U.slice(1):U=J+U}}b.push(U)}}else{b=[];for(var W=0;W<_.length;W++)b.push.apply(b,fr(_[W],!1))}for(var W=0;W{if(typeof s!="string")throw new TypeError("invalid pattern");if(s.length>H2)throw new TypeError("pattern is too long")},z2={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},rr=s=>s.replace(/[[\]\\-]/g,"\\$&"),G2=s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ad=s=>s.join(""),W2=(s,e)=>{const t=e;if(s.charAt(t)!=="[")throw new Error("not in a brace expression");const i=[],r=[];let n=t+1,a=!1,o=!1,l=!1,d=!1,p=t,y="";e:for(;ny?i.push(rr(y)+"-"+rr(x)):x===y&&i.push(rr(x)),y="",n++;continue}if(s.startsWith("-]",n+1)){i.push(rr(x+"-")),n+=2;continue}if(s.startsWith("-",n+1)){y=x,n+=2;continue}i.push(rr(x)),n++}if(pe?s.replace(/\[([^\/\\])\]/g,"$1"):s.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),K2=new Set(["!","?","+","*","@"]),od=s=>K2.has(s),X2="(?!(?:^|/)\\.\\.?(?:$|/))",Rn="(?!\\.)",Y2=new Set(["[","."]),Q2=new Set(["..","."]),J2=new Set("().*{}+?[]^$\\!"),Z2=s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ku="[^/]",ud=Ku+"*?",ld=Ku+"+?";var Oe,Me,Gt,ye,ke,fi,Bi,pi,Wt,Ui,Hr,Aa,mf,bs,Wn,zr,lu,Da,gf;const je=class je{constructor(e,t,i={}){pe(this,Aa);pe(this,zr);Se(this,"type");pe(this,Oe,void 0);pe(this,Me,void 0);pe(this,Gt,!1);pe(this,ye,[]);pe(this,ke,void 0);pe(this,fi,void 0);pe(this,Bi,void 0);pe(this,pi,!1);pe(this,Wt,void 0);pe(this,Ui,void 0);pe(this,Hr,!1);this.type=e,e&&me(this,Me,!0),me(this,ke,t),me(this,Oe,F(this,ke)?F(F(this,ke),Oe):this),me(this,Wt,F(this,Oe)===this?i:F(F(this,Oe),Wt)),me(this,Bi,F(this,Oe)===this?[]:F(F(this,Oe),Bi)),e==="!"&&!F(F(this,Oe),pi)&&F(this,Bi).push(this),me(this,fi,F(this,ke)?F(F(this,ke),ye).length:0)}get hasMagic(){if(F(this,Me)!==void 0)return F(this,Me);for(const e of F(this,ye))if(typeof e!="string"&&(e.type||e.hasMagic))return me(this,Me,!0);return F(this,Me)}toString(){return F(this,Ui)!==void 0?F(this,Ui):this.type?me(this,Ui,this.type+"("+F(this,ye).map(e=>String(e)).join("|")+")"):me(this,Ui,F(this,ye).map(e=>String(e)).join(""))}push(...e){for(const t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof je&&F(t,ke)===this))throw new Error("invalid part: "+t);F(this,ye).push(t)}}toJSON(){var t;const e=this.type===null?F(this,ye).slice().map(i=>typeof i=="string"?i:i.toJSON()):[this.type,...F(this,ye).map(i=>i.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===F(this,Oe)||F(F(this,Oe),pi)&&((t=F(this,ke))==null?void 0:t.type)==="!")&&e.push({}),e}isStart(){var t;if(F(this,Oe)===this)return!0;if(!((t=F(this,ke))!=null&&t.isStart()))return!1;if(F(this,fi)===0)return!0;const e=F(this,ke);for(let i=0;i{var M;const[x,D,A,k]=typeof v=="string"?$e(M=je,Da,gf).call(M,v,F(this,Me),d):v.toRegExpSource(e);return me(this,Me,F(this,Me)||A),me(this,Gt,F(this,Gt)||k),x}).join("");let y="";if(this.isStart()&&typeof F(this,ye)[0]=="string"&&!(F(this,ye).length===1&&Q2.has(F(this,ye)[0]))){const x=Y2,D=t&&x.has(p.charAt(0))||p.startsWith("\\.")&&x.has(p.charAt(2))||p.startsWith("\\.\\.")&&x.has(p.charAt(4)),A=!t&&!e&&x.has(p.charAt(0));y=D?X2:A?Rn:""}let _="";return this.isEnd()&&F(F(this,Oe),pi)&&((l=F(this,ke))==null?void 0:l.type)==="!"&&(_="(?:$|\\/)"),[y+p+_,pr(p),me(this,Me,!!F(this,Me)),F(this,Gt)]}const i=this.type==="*"||this.type==="+",r=this.type==="!"?"(?:(?!(?:":"(?:";let n=$e(this,zr,lu).call(this,t);if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){const d=this.toString();return me(this,ye,[d]),this.type=null,me(this,Me,void 0),[d,pr(this.toString()),!1,!1]}let a=!i||e||t||!Rn?"":$e(this,zr,lu).call(this,!0);a===n&&(a=""),a&&(n=`(?:${n})(?:${a})*?`);let o="";if(this.type==="!"&&F(this,Hr))o=(this.isStart()&&!t?Rn:"")+ld;else{const d=this.type==="!"?"))"+(this.isStart()&&!t&&!e?Rn:"")+ud+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;o=r+n+d}return[o,pr(n),me(this,Me,!!F(this,Me)),F(this,Gt)]}};Oe=new WeakMap,Me=new WeakMap,Gt=new WeakMap,ye=new WeakMap,ke=new WeakMap,fi=new WeakMap,Bi=new WeakMap,pi=new WeakMap,Wt=new WeakMap,Ui=new WeakMap,Hr=new WeakMap,Aa=new WeakSet,mf=function(){if(this!==F(this,Oe))throw new Error("should only call on root");if(F(this,pi))return this;this.toString(),me(this,pi,!0);let e;for(;e=F(this,Bi).pop();){if(e.type!=="!")continue;let t=e,i=F(t,ke);for(;i;){for(let r=F(t,fi)+1;!i.type&&r{if(typeof t=="string")throw new Error("string type in extglob ast??");const[i,r,n,a]=t.toRegExpSource(e);return me(this,Gt,F(this,Gt)||a),i}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")},Da=new WeakSet,gf=function(e,t,i=!1){let r=!1,n="",a=!1;for(let o=0;oe?s.replace(/[?*()[\]]/g,"[$&]"):s.replace(/[?*()[\]\\]/g,"\\$&");var No={};const Je=(s,e,t={})=>(ea(e),!t.nocomment&&e.charAt(0)==="#"?!1:new Yr(e,t).match(s)),t1=/^\*+([^+@!?\*\[\(]*)$/,i1=s=>e=>!e.startsWith(".")&&e.endsWith(s),s1=s=>e=>e.endsWith(s),r1=s=>(s=s.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(s)),n1=s=>(s=s.toLowerCase(),e=>e.toLowerCase().endsWith(s)),a1=/^\*+\.\*+$/,o1=s=>!s.startsWith(".")&&s.includes("."),u1=s=>s!=="."&&s!==".."&&s.includes("."),l1=/^\.\*+$/,c1=s=>s!=="."&&s!==".."&&s.startsWith("."),d1=/^\*+$/,h1=s=>s.length!==0&&!s.startsWith("."),f1=s=>s.length!==0&&s!=="."&&s!=="..",p1=/^\?+([^+@!?\*\[\(]*)?$/,m1=([s,e=""])=>{const t=yf([s]);return e?(e=e.toLowerCase(),i=>t(i)&&i.toLowerCase().endsWith(e)):t},g1=([s,e=""])=>{const t=_f([s]);return e?(e=e.toLowerCase(),i=>t(i)&&i.toLowerCase().endsWith(e)):t},y1=([s,e=""])=>{const t=_f([s]);return e?i=>t(i)&&i.endsWith(e):t},_1=([s,e=""])=>{const t=yf([s]);return e?i=>t(i)&&i.endsWith(e):t},yf=([s])=>{const e=s.length;return t=>t.length===e&&!t.startsWith(".")},_f=([s])=>{const e=s.length;return t=>t.length===e&&t!=="."&&t!==".."},vf=typeof process=="object"&&process?typeof No=="object"&&No&&No.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",cd={win32:{sep:"\\"},posix:{sep:"/"}},v1=vf==="win32"?cd.win32.sep:cd.posix.sep;Je.sep=v1;const gt=Symbol("globstar **");Je.GLOBSTAR=gt;const T1="[^/]",b1=T1+"*?",S1="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",x1="(?:(?!(?:\\/|^)\\.).)*?",E1=(s,e={})=>t=>Je(t,s,e);Je.filter=E1;const pt=(s,e={})=>Object.assign({},s,e),C1=s=>{if(!s||typeof s!="object"||!Object.keys(s).length)return Je;const e=Je;return Object.assign((i,r,n={})=>e(i,r,pt(s,n)),{Minimatch:class extends e.Minimatch{constructor(r,n={}){super(r,pt(s,n))}static defaults(r){return e.defaults(pt(s,r)).Minimatch}},AST:class extends e.AST{constructor(r,n,a={}){super(r,n,pt(s,a))}static fromGlob(r,n={}){return e.AST.fromGlob(r,pt(s,n))}},unescape:(i,r={})=>e.unescape(i,pt(s,r)),escape:(i,r={})=>e.escape(i,pt(s,r)),filter:(i,r={})=>e.filter(i,pt(s,r)),defaults:i=>e.defaults(pt(s,i)),makeRe:(i,r={})=>e.makeRe(i,pt(s,r)),braceExpand:(i,r={})=>e.braceExpand(i,pt(s,r)),match:(i,r,n={})=>e.match(i,r,pt(s,n)),sep:e.sep,GLOBSTAR:gt})};Je.defaults=C1;const Tf=(s,e={})=>(ea(s),e.nobrace||!/\{(?:(?!\{).)*\}/.test(s)?[s]:V2(s));Je.braceExpand=Tf;const w1=(s,e={})=>new Yr(s,e).makeRe();Je.makeRe=w1;const A1=(s,e,t={})=>{const i=new Yr(e,t);return s=s.filter(r=>i.match(r)),i.options.nonull&&!s.length&&s.push(e),s};Je.match=A1;const dd=/[?*]|[+@!]\(.*?\)|\[|\]/,D1=s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class Yr{constructor(e,t={}){Se(this,"options");Se(this,"set");Se(this,"pattern");Se(this,"windowsPathsNoEscape");Se(this,"nonegate");Se(this,"negate");Se(this,"comment");Se(this,"empty");Se(this,"preserveMultipleSlashes");Se(this,"partial");Se(this,"globSet");Se(this,"globParts");Se(this,"nocase");Se(this,"isWindows");Se(this,"platform");Se(this,"windowsNoMagicRoot");Se(this,"regexp");ea(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||vf,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const e of this.set)for(const t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...n)=>console.error(...n)),this.debug(this.pattern,this.globSet);const i=this.globSet.map(n=>this.slashSplit(n));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let r=this.globParts.map((n,a,o)=>{if(this.isWindows&&this.windowsNoMagicRoot){const l=n[0]===""&&n[1]===""&&(n[2]==="?"||!dd.test(n[2]))&&!dd.test(n[3]),d=/^[a-z]:/i.test(n[0]);if(l)return[...n.slice(0,4),...n.slice(4).map(p=>this.parse(p))];if(d)return[n[0],...n.slice(1).map(p=>this.parse(p))]}return n.map(l=>this.parse(l))});if(this.debug(this.pattern,r),this.set=r.filter(n=>n.indexOf(!1)===-1),this.isWindows)for(let n=0;n=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let i=-1;for(;(i=t.indexOf("**",i+1))!==-1;){let r=i;for(;t[r+1]==="**";)r++;r!==i&&t.splice(i,r-i)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((i,r)=>{const n=i[i.length-1];return r==="**"&&n==="**"?i:r===".."&&n&&n!==".."&&n!=="."&&n!=="**"?(i.pop(),i):(i.push(r),i)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let r=1;rr&&i.splice(r+1,a-r);let o=i[r+1];const l=i[r+2],d=i[r+3];if(o!==".."||!l||l==="."||l===".."||!d||d==="."||d==="..")continue;t=!0,i.splice(r,1);const p=i.slice(0);p[r]="**",e.push(p),r--}if(!this.preserveMultipleSlashes){for(let a=1;at.length)}partsMatch(e,t,i=!1){let r=0,n=0,a=[],o="";for(;rM?t=t.slice(O):M>O&&(e=e.slice(M)))}}const{optimizationLevel:n=1}=this.options;n>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var a=0,o=0,l=e.length,d=t.length;a>> no match, partial?`,e,_,t,b),_===l))}let x;if(typeof p=="string"?(x=y===p,this.debug("string match",p,y,x)):(x=p.test(y),this.debug("pattern match",p,y,x)),!x)return!1}if(a===l&&o===d)return!0;if(a===l)return i;if(o===d)return a===l-1&&e[a]==="";throw new Error("wtf?")}braceExpand(){return Tf(this.pattern,this.options)}parse(e){ea(e);const t=this.options;if(e==="**")return gt;if(e==="")return"";let i,r=null;(i=e.match(d1))?r=t.dot?f1:h1:(i=e.match(t1))?r=(t.nocase?t.dot?n1:r1:t.dot?s1:i1)(i[1]):(i=e.match(p1))?r=(t.nocase?t.dot?g1:m1:t.dot?y1:_1)(i):(i=e.match(a1))?r=t.dot?u1:o1:(i=e.match(l1))&&(r=c1);const n=ta.fromGlob(e,this.options).toMMPattern();return r?Object.assign(n,{test:r}):n}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const t=this.options,i=t.noglobstar?b1:t.dot?S1:x1,r=new Set(t.nocase?["i"]:[]);let n=e.map(l=>{const d=l.map(p=>{if(p instanceof RegExp)for(const y of p.flags.split(""))r.add(y);return typeof p=="string"?D1(p):p===gt?gt:p._src});return d.forEach((p,y)=>{const _=d[y+1],b=d[y-1];p!==gt||b===gt||(b===void 0?_!==void 0&&_!==gt?d[y+1]="(?:\\/|"+i+"\\/)?"+_:d[y]=i:_===void 0?d[y-1]=b+"(?:\\/|"+i+")?":_!==gt&&(d[y-1]=b+"(?:\\/|\\/"+i+"\\/)"+_,d[y+1]=gt))}),d.filter(p=>p!==gt).join("/")}).join("|");const[a,o]=e.length>1?["(?:",")"]:["",""];n="^"+a+n+o+"$",this.negate&&(n="^(?!"+n+").+$");try{this.regexp=new RegExp(n,[...r].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;const i=this.options;this.isWindows&&(e=e.split("\\").join("/"));const r=this.slashSplit(e);this.debug(this.pattern,"split",r);const n=this.set;this.debug(this.pattern,"set",n);let a=r[r.length-1];if(!a)for(let o=r.length-2;!a&&o>=0;o--)a=r[o];for(let o=0;o{const t=new URL(window.location.href).searchParams.entries(),i=Object.fromEntries(t);$e(this,Fi,mr).call(this,window.location.pathname,i,!0)})}addRoute(t,i=null,r=()=>{},n=()=>{}){const a=new Yr(t,{matchBase:!0});F(this,Gr).push({path:a,start:r,component:i,destroy:n})}isActiveRoute(t){var i;return F(this,Kt)&&F(this,Kt).path===((i=this.findRoute(t))==null?void 0:i.path)}findRoute(t){return F(this,Gr).find(i=>i.path.match(t))}navigateTo(t,i={}){const r=new URL(window.location.href),n="/"+t.trim().replace(/^\/+/,"");r.pathname=n.startsWith(this.base)?n:this.base+n,r.search=new URLSearchParams(i).toString(),window.history.pushState({},"",r.href),$e(this,Fi,mr).call(this,t,i)}updateState(t,i=[]){const r=Object.fromEntries(Object.entries(F(this,Xt)).filter(([n])=>!i.includes(n)));this.navigateTo(window.location.pathname,{...r,...t})}replaceState(t){this.navigateTo(window.location.pathname,t)}start({defaultPath:t}){const i=new URL(window.location.href),r=i.pathname,n=Object.fromEntries(i.searchParams.entries());me(this,Ss,t),this.base=this.findRoute(r)?r.replace(/\/[^/]+\/?$/,"/"):r,this.base=this.base.replace(/\/+$/,""),$e(this,Fi,mr).call(this,r,n)}get queryParams(){return F(this,Xt)}get currentRoute(){return F(this,Kt)}}Ss=new WeakMap,Kt=new WeakMap,Xt=new WeakMap,Gr=new WeakMap,Fi=new WeakSet,mr=function(t,i={},r=!1){if(this.isActiveRoute(t)){$e(this,ka,bf).call(this,i)||(me(this,Xt,i),this.dispatchEvent(new CustomEvent("queryparams",{detail:{route:F(this,Kt),popstate:r,queryParams:i}})));return}const n=this.findRoute(t);if(n)$e(this,Pa,Sf).call(this,n,i,r);else if(F(this,Ss))$e(this,Fi,mr).call(this,F(this,Ss),i,r);else throw Error(`No route found for '${t}'`)},ka=new WeakSet,bf=function(t){const i=Object.keys(t);return i.length!==Object.keys(F(this,Xt)).length?!1:i.every(r=>F(this,Xt)[r]===t[r])},Pa=new WeakSet,Sf=function(t,i,r=!1){var n;(n=F(this,Kt))==null||n.destroy(),me(this,Kt,t),me(this,Xt,i),t.start(i),this.dispatchEvent(new CustomEvent("routechanged",{detail:{route:t,popstate:r,queryParams:i}}))};const Bo=new k1;var gr;typeof window<"u"?gr=window:typeof Zn<"u"?gr=Zn:typeof self<"u"?gr=self:gr={};var Oa=gr;const C=ri(Oa),P1={},I1=Object.freeze(Object.defineProperty({__proto__:null,default:P1},Symbol.toStringTag,{value:"Module"})),L1=af(I1);var hd=typeof Zn<"u"?Zn:typeof window<"u"?window:{},O1=L1,yr;typeof document<"u"?yr=document:(yr=hd["__GLOBAL_DOCUMENT_CACHE@4"],yr||(yr=hd["__GLOBAL_DOCUMENT_CACHE@4"]=O1));var xf=yr;const $=ri(xf);var cu={exports:{}};(function(s,e){function t(l){if(l&&typeof l=="object"){var d=l.which||l.keyCode||l.charCode;d&&(l=d)}if(typeof l=="number")return a[l];var p=String(l),y=i[p.toLowerCase()];if(y)return y;var y=r[p.toLowerCase()];if(y)return y;if(p.length===1)return p.charCodeAt(0)}t.isEventKey=function(d,p){if(d&&typeof d=="object"){var y=d.which||d.keyCode||d.charCode;if(y==null)return!1;if(typeof p=="string"){var _=i[p.toLowerCase()];if(_)return _===y;var _=r[p.toLowerCase()];if(_)return _===y}else if(typeof p=="number")return p===y;return!1}},e=s.exports=t;var i=e.code=e.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},r=e.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};/*! + * Programatically add the following + */for(n=97;n<123;n++)i[String.fromCharCode(n)]=n-32;for(var n=48;n<58;n++)i[n-48]=n;for(n=1;n<13;n++)i["f"+n]=n+111;for(n=0;n<10;n++)i["numpad "+n]=n+96;var a=e.names=e.title={};for(n in i)a[i[n]]=n;for(var o in r)i[o]=r[o]})(cu,cu.exports);var R1=cu.exports;const X=ri(R1);var M1=N1;function N1(s,e){var t,i=null;try{t=JSON.parse(s,e)}catch(r){i=r}return[i,t]}const B1=ri(M1);var Xu={exports:{}};function yt(){return yt=Object.assign?Object.assign.bind():function(s){for(var e=1;e=400&&r.statusCode<=599){var a=n;if(t)if(V1.TextDecoder){var o=z1(r.headers&&r.headers["content-type"]);try{a=new TextDecoder(o).decode(n)}catch{}}else a=String.fromCharCode.apply(null,new Uint8Array(n));e({cause:a});return}e(null,n)}};function z1(s){return s===void 0&&(s=""),s.toLowerCase().split(";").reduce(function(e,t){var i=t.split("="),r=i[0],n=i[1];return r.trim()==="charset"?n.trim():e},"utf-8")}var G1=H1,Ef=Oa,W1=F1,K1=$1;Mt.httpHandler=G1;/** + * @license + * slighly modified parse-headers 2.0.2 + * Copyright (c) 2014 David Björklund + * Available under the MIT license + * + */var X1=function(e){var t={};return e&&e.trim().split(` +`).forEach(function(i){var r=i.indexOf(":"),n=i.slice(0,r).trim().toLowerCase(),a=i.slice(r+1).trim();typeof t[n]>"u"?t[n]=a:Array.isArray(t[n])?t[n].push(a):t[n]=[t[n],a]}),t};Xu.exports=Mt;Xu.exports.default=Mt;Mt.XMLHttpRequest=Ef.XMLHttpRequest||Z1;Mt.XDomainRequest="withCredentials"in new Mt.XMLHttpRequest?Mt.XMLHttpRequest:Ef.XDomainRequest;Y1(["get","put","post","patch","head","delete"],function(s){Mt[s==="delete"?"del":s]=function(e,t,i){return t=Cf(e,t,i),t.method=s.toUpperCase(),wf(t)}});function Y1(s,e){for(var t=0;t"u")throw new Error("callback argument missing");var e=!1,t=function(M,O,I){e||(e=!0,s.callback(M,O,I))};function i(){o.readyState===4&&setTimeout(a,0)}function r(){var k=void 0;if(o.response?k=o.response:k=o.responseText||J1(o),x)try{k=JSON.parse(k)}catch{}return k}function n(k){return clearTimeout(D),k instanceof Error||(k=new Error(""+(k||"Unknown XMLHttpRequest Error"))),k.statusCode=0,t(k,A)}function a(){if(!d){var k;clearTimeout(D),s.useXDR&&o.status===void 0?k=200:k=o.status===1223?204:o.status;var M=A,O=null;return k!==0?(M={body:r(),statusCode:k,method:y,headers:{},url:p,rawRequest:o},o.getAllResponseHeaders&&(M.headers=X1(o.getAllResponseHeaders()))):O=new Error("Internal XMLHttpRequest Error"),t(O,M,M.body)}}var o=s.xhr||null;o||(s.cors||s.useXDR?o=new Mt.XDomainRequest:o=new Mt.XMLHttpRequest);var l,d,p=o.url=s.uri||s.url,y=o.method=s.method||"GET",_=s.body||s.data,b=o.headers=s.headers||{},v=!!s.sync,x=!1,D,A={body:void 0,headers:{},statusCode:0,method:y,url:p,rawRequest:o};if("json"in s&&s.json!==!1&&(x=!0,b.accept||b.Accept||(b.Accept="application/json"),y!=="GET"&&y!=="HEAD"&&(b["content-type"]||b["Content-Type"]||(b["Content-Type"]="application/json"),_=JSON.stringify(s.json===!0?_:s.json))),o.onreadystatechange=i,o.onload=a,o.onerror=n,o.onprogress=function(){},o.onabort=function(){d=!0},o.ontimeout=n,o.open(y,p,!v,s.username,s.password),v||(o.withCredentials=!!s.withCredentials),!v&&s.timeout>0&&(D=setTimeout(function(){if(!d){d=!0,o.abort("timeout");var k=new Error("XMLHttpRequest timeout");k.code="ETIMEDOUT",n(k)}},s.timeout)),o.setRequestHeader)for(l in b)b.hasOwnProperty(l)&&o.setRequestHeader(l,b[l]);else if(s.headers&&!Q1(s.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in s&&(o.responseType=s.responseType),"beforeSend"in s&&typeof s.beforeSend=="function"&&s.beforeSend(o),o.send(_||null),o}function J1(s){try{if(s.responseType==="document")return s.responseXML;var e=s.responseXML&&s.responseXML.documentElement.nodeName==="parsererror";if(s.responseType===""&&!e)return s.responseXML}catch{}return null}function Z1(){}var eS=Xu.exports;const Af=ri(eS);var Df={exports:{}},fd=xf,Yu=Object.create||function(){function s(){}return function(e){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return s.prototype=e,new s}}();function ct(s,e){this.name="ParsingError",this.code=s.code,this.message=e||s.message}ct.prototype=Yu(Error.prototype);ct.prototype.constructor=ct;ct.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function Qu(s){function e(i,r,n,a){return(i|0)*3600+(r|0)*60+(n|0)+(a|0)/1e3}var t=s.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return t?t[3]?e(t[1],t[2],t[3].replace(":",""),t[4]):t[1]>59?e(t[1],t[2],0,t[4]):e(0,t[1],t[2],t[4]):null}function Cr(){this.values=Yu(null)}Cr.prototype={set:function(s,e){!this.get(s)&&e!==""&&(this.values[s]=e)},get:function(s,e,t){return t?this.has(s)?this.values[s]:e[t]:this.has(s)?this.values[s]:e},has:function(s){return s in this.values},alt:function(s,e,t){for(var i=0;i=0&&e<=100)?(this.set(s,e),!0):!1}};function _r(s,e,t,i){var r=i?s.split(i):[s];for(var n in r)if(typeof r[n]=="string"){var a=r[n].split(t);if(a.length===2){var o=a[0].trim(),l=a[1].trim();e(o,l)}}}function tS(s,e,t){var i=s;function r(){var o=Qu(s);if(o===null)throw new ct(ct.Errors.BadTimeStamp,"Malformed timestamp: "+i);return s=s.replace(/^[^\sa-zA-Z-]+/,""),o}function n(o,l){var d=new Cr;_r(o,function(p,y){switch(p){case"region":for(var _=t.length-1;_>=0;_--)if(t[_].id===y){d.set(p,t[_].region);break}break;case"vertical":d.alt(p,y,["rl","lr"]);break;case"line":var b=y.split(","),v=b[0];d.integer(p,v),d.percent(p,v)&&d.set("snapToLines",!1),d.alt(p,v,["auto"]),b.length===2&&d.alt("lineAlign",b[1],["start","center","end"]);break;case"position":b=y.split(","),d.percent(p,b[0]),b.length===2&&d.alt("positionAlign",b[1],["start","center","end"]);break;case"size":d.percent(p,y);break;case"align":d.alt(p,y,["start","center","end","left","right"]);break}},/:/,/\s/),l.region=d.get("region",null),l.vertical=d.get("vertical","");try{l.line=d.get("line","auto")}catch{}l.lineAlign=d.get("lineAlign","start"),l.snapToLines=d.get("snapToLines",!0),l.size=d.get("size",100);try{l.align=d.get("align","center")}catch{l.align=d.get("align","middle")}try{l.position=d.get("position","auto")}catch{l.position=d.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},l.align)}l.positionAlign=d.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},l.align)}function a(){s=s.replace(/^\s+/,"")}if(a(),e.startTime=r(),a(),s.substr(0,3)!=="-->")throw new ct(ct.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+i);s=s.substr(3),a(),e.endTime=r(),a(),n(s,e)}var Uo=fd.createElement&&fd.createElement("textarea"),iS={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},pd={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},sS={v:"title",lang:"lang"},md={rt:"ruby"};function kf(s,e){function t(){if(!e)return null;function v(D){return e=e.substr(D.length),D}var x=e.match(/^([^<]*)(<[^>]*>?)?/);return v(x[1]?x[1]:x[2])}function i(v){return Uo.innerHTML=v,v=Uo.textContent,Uo.textContent="",v}function r(v,x){return!md[x.localName]||md[x.localName]===v.localName}function n(v,x){var D=iS[v];if(!D)return null;var A=s.document.createElement(D),k=sS[v];return k&&x&&(A[k]=x.trim()),A}for(var a=s.document.createElement("div"),o=a,l,d=[];(l=t())!==null;){if(l[0]==="<"){if(l[1]==="/"){d.length&&d[d.length-1]===l.substr(2).replace(">","")&&(d.pop(),o=o.parentNode);continue}var p=Qu(l.substr(1,l.length-2)),y;if(p){y=s.document.createProcessingInstruction("timestamp",p),o.appendChild(y);continue}var _=l.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!_||(y=n(_[1],_[3]),!y)||!r(o,y))continue;if(_[2]){var b=_[2].split(".");b.forEach(function(v){var x=/^bg_/.test(v),D=x?v.slice(3):v;if(pd.hasOwnProperty(D)){var A=x?"background-color":"color",k=pd[D];y.style[A]=k}}),y.className=b.join(" ")}d.push(_[1]),o.appendChild(y),o=y;continue}o.appendChild(s.document.createTextNode(i(l)))}return a}var gd=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function rS(s){for(var e=0;e=t[0]&&s<=t[1])return!0}return!1}function nS(s){var e=[],t="",i;if(!s||!s.childNodes)return"ltr";function r(o,l){for(var d=l.childNodes.length-1;d>=0;d--)o.push(l.childNodes[d])}function n(o){if(!o||!o.length)return null;var l=o.pop(),d=l.textContent||l.innerText;if(d){var p=d.match(/^.*(\n|\r)/);return p?(o.length=0,p[0]):d}if(l.tagName==="ruby")return n(o);if(l.childNodes)return r(o,l),n(o)}for(r(e,s);t=n(e);)for(var a=0;a=0&&s.line<=100))return s.line;if(!s.track||!s.track.textTrackList||!s.track.textTrackList.mediaElement)return-1;for(var e=s.track,t=e.textTrackList,i=0,r=0;rs.left&&this.tops.top};Ke.prototype.overlapsAny=function(s){for(var e=0;e=s.top&&this.bottom<=s.bottom&&this.left>=s.left&&this.right<=s.right};Ke.prototype.overlapsOppositeAxis=function(s,e){switch(e){case"+x":return this.lefts.right;case"+y":return this.tops.bottom}};Ke.prototype.intersectPercentage=function(s){var e=Math.max(0,Math.min(this.right,s.right)-Math.max(this.left,s.left)),t=Math.max(0,Math.min(this.bottom,s.bottom)-Math.max(this.top,s.top)),i=e*t;return i/(this.height*this.width)};Ke.prototype.toCSSCompatValues=function(s){return{top:this.top-s.top,bottom:s.bottom-this.bottom,left:this.left-s.left,right:s.right-this.right,height:this.height,width:this.width}};Ke.getSimpleBoxPosition=function(s){var e=s.div?s.div.offsetHeight:s.tagName?s.offsetHeight:0,t=s.div?s.div.offsetWidth:s.tagName?s.offsetWidth:0,i=s.div?s.div.offsetTop:s.tagName?s.offsetTop:0;s=s.div?s.div.getBoundingClientRect():s.tagName?s.getBoundingClientRect():s;var r={left:s.left,right:s.right,top:s.top||i,height:s.height||e,bottom:s.bottom||i+(s.height||e),width:s.width||t};return r};function oS(s,e,t,i){function r(D,A){for(var k,M=new Ke(D),O=1,I=0;IU&&(k=new Ke(D),O=U),D=new Ke(M)}return k||M}var n=new Ke(e),a=e.cue,o=aS(a),l=[];if(a.snapToLines){var d;switch(a.vertical){case"":l=["+y","-y"],d="height";break;case"rl":l=["+x","-x"],d="width";break;case"lr":l=["-x","+x"],d="width";break}var p=n.lineHeight,y=p*Math.round(o),_=t[d]+p,b=l[0];Math.abs(y)>_&&(y=y<0?-1:1,y*=Math.ceil(_/p)*p),o<0&&(y+=a.vertical===""?t.height:t.width,l=l.reverse()),n.move(b,y)}else{var v=n.lineHeight/t.height*100;switch(a.lineAlign){case"center":o-=v/2;break;case"end":o-=v;break}switch(a.vertical){case"":e.applyStyles({top:e.formatStyle(o,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(o,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(o,"%")});break}l=["+y","-x","+x","-y"],n=new Ke(e)}var x=r(n,l);e.move(x.toCSSCompatValues(t))}function Bs(){}Bs.StringDecoder=function(){return{decode:function(s){if(!s)return"";if(typeof s!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(s))}}};Bs.convertCueToDOMTree=function(s,e){return!s||!e?null:kf(s,e)};var uS=.05,lS="sans-serif",cS="1.5%";Bs.processCues=function(s,e,t){if(!s||!e||!t)return null;for(;t.firstChild;)t.removeChild(t.firstChild);var i=s.document.createElement("div");i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.margin=cS,t.appendChild(i);function r(p){for(var y=0;y")===-1){e.cue.id=a;continue}case"CUE":try{tS(a,e.cue,e.regionList)}catch(p){e.reportOrThrowError(p),e.cue=null,e.state="BADCUE";continue}e.state="CUETEXT";continue;case"CUETEXT":var d=a.indexOf("-->")!==-1;if(!a||d&&(l=!0)){e.oncue&&e.oncue(e.cue),e.cue=null,e.state="ID";continue}e.cue.text&&(e.cue.text+=` +`),e.cue.text+=a.replace(/\u2028/g,` +`).replace(/u2029/g,` +`);continue;case"BADCUE":a||(e.state="ID");continue}}}catch(p){e.reportOrThrowError(p),e.state==="CUETEXT"&&e.cue&&e.oncue&&e.oncue(e.cue),e.cue=null,e.state=e.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var s=this;try{if(s.buffer+=s.decoder.decode(),(s.cue||s.state==="HEADER")&&(s.buffer+=` + +`,s.parse()),s.state==="INITIAL")throw new ct(ct.Errors.BadSignature)}catch(e){s.reportOrThrowError(e)}return s.onflush&&s.onflush(),this}};var dS=Bs,hS="auto",fS={"":1,lr:1,rl:1},pS={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function mS(s){if(typeof s!="string")return!1;var e=fS[s.toLowerCase()];return e?s.toLowerCase():!1}function Fo(s){if(typeof s!="string")return!1;var e=pS[s.toLowerCase()];return e?s.toLowerCase():!1}function Pf(s,e,t){this.hasBeenReset=!1;var i="",r=!1,n=s,a=e,o=t,l=null,d="",p=!0,y="auto",_="start",b="auto",v="auto",x=100,D="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return i},set:function(A){i=""+A}},pauseOnExit:{enumerable:!0,get:function(){return r},set:function(A){r=!!A}},startTime:{enumerable:!0,get:function(){return n},set:function(A){if(typeof A!="number")throw new TypeError("Start time must be set to a number.");n=A,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(A){if(typeof A!="number")throw new TypeError("End time must be set to a number.");a=A,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(A){o=""+A,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(A){l=A,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return d},set:function(A){var k=mS(A);if(k===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");d=k,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return p},set:function(A){p=!!A,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return y},set:function(A){if(typeof A!="number"&&A!==hS)throw new SyntaxError("Line: an invalid number or illegal string was specified.");y=A,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return _},set:function(A){var k=Fo(A);k?(_=k,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return b},set:function(A){if(A<0||A>100)throw new Error("Position must be between 0 and 100.");b=A,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return v},set:function(A){var k=Fo(A);k?(v=k,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return x},set:function(A){if(A<0||A>100)throw new Error("Size must be between 0 and 100.");x=A,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return D},set:function(A){var k=Fo(A);if(!k)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");D=k,this.hasBeenReset=!0}}}),this.displayState=void 0}Pf.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var gS=Pf,yS={"":!0,up:!0};function _S(s){if(typeof s!="string")return!1;var e=yS[s.toLowerCase()];return e?s.toLowerCase():!1}function nr(s){return typeof s=="number"&&s>=0&&s<=100}function vS(){var s=100,e=3,t=0,i=100,r=0,n=100,a="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return s},set:function(o){if(!nr(o))throw new Error("Width must be between 0 and 100.");s=o}},lines:{enumerable:!0,get:function(){return e},set:function(o){if(typeof o!="number")throw new TypeError("Lines must be set to a number.");e=o}},regionAnchorY:{enumerable:!0,get:function(){return i},set:function(o){if(!nr(o))throw new Error("RegionAnchorX must be between 0 and 100.");i=o}},regionAnchorX:{enumerable:!0,get:function(){return t},set:function(o){if(!nr(o))throw new Error("RegionAnchorY must be between 0 and 100.");t=o}},viewportAnchorY:{enumerable:!0,get:function(){return n},set:function(o){if(!nr(o))throw new Error("ViewportAnchorY must be between 0 and 100.");n=o}},viewportAnchorX:{enumerable:!0,get:function(){return r},set:function(o){if(!nr(o))throw new Error("ViewportAnchorX must be between 0 and 100.");r=o}},scroll:{enumerable:!0,get:function(){return a},set:function(o){var l=_S(o);l===!1?console.warn("Scroll: an invalid or illegal string was specified."):a=l}}})}var TS=vS,ei=Oa,Ki=Df.exports={WebVTT:dS,VTTCue:gS,VTTRegion:TS};ei.vttjs=Ki;ei.WebVTT=Ki.WebVTT;var bS=Ki.VTTCue,SS=Ki.VTTRegion,xS=ei.VTTCue,ES=ei.VTTRegion;Ki.shim=function(){ei.VTTCue=bS,ei.VTTRegion=SS};Ki.restore=function(){ei.VTTCue=xS,ei.VTTRegion=ES};ei.VTTCue||Ki.shim();var CS=Df.exports;const yd=ri(CS);var If={exports:{}};(function(s,e){(function(t){var i=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,r=/^(?=([^\/?#]*))\1([^]*)$/,n=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(l,d,p){if(p=p||{},l=l.trim(),d=d.trim(),!d){if(!p.alwaysNormalize)return l;var y=o.parseURL(l);if(!y)throw new Error("Error trying to parse base URL.");return y.path=o.normalizePath(y.path),o.buildURLFromParts(y)}var _=o.parseURL(d);if(!_)throw new Error("Error trying to parse relative URL.");if(_.scheme)return p.alwaysNormalize?(_.path=o.normalizePath(_.path),o.buildURLFromParts(_)):d;var b=o.parseURL(l);if(!b)throw new Error("Error trying to parse base URL.");if(!b.netLoc&&b.path&&b.path[0]!=="/"){var v=r.exec(b.path);b.netLoc=v[1],b.path=v[2]}b.netLoc&&!b.path&&(b.path="/");var x={scheme:b.scheme,netLoc:_.netLoc,path:null,params:_.params,query:_.query,fragment:_.fragment};if(!_.netLoc&&(x.netLoc=b.netLoc,_.path[0]!=="/"))if(!_.path)x.path=b.path,_.params||(x.params=b.params,_.query||(x.query=b.query));else{var D=b.path,A=D.substring(0,D.lastIndexOf("/")+1)+_.path;x.path=o.normalizePath(A)}return x.path===null&&(x.path=p.alwaysNormalize?o.normalizePath(_.path):_.path),o.buildURLFromParts(x)},parseURL:function(l){var d=i.exec(l);return d?{scheme:d[1]||"",netLoc:d[2]||"",path:d[3]||"",params:d[4]||"",query:d[5]||"",fragment:d[6]||""}:null},normalizePath:function(l){for(l=l.split("").reverse().join("").replace(n,"");l.length!==(l=l.replace(a,"")).length;);return l.split("").reverse().join("")},buildURLFromParts:function(l){return l.scheme+l.netLoc+l.path+l.params+l.query+l.fragment}};s.exports=o})()})(If);var wS=If.exports;const _d=ri(wS);var vd="http://example.com",Ma=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=C.location&&C.location.href||"");var i=typeof C.URL=="function",r=/^\/\//.test(e),n=!C.location&&!/\/\//i.test(e);if(i?e=new C.URL(e,C.location||vd):/\/\//i.test(e)||(e=_d.buildAbsoluteURL(C.location&&C.location.href||"",e)),i){var a=new URL(t,e);return n?a.href.slice(vd.length):r?a.href.slice(a.protocol.length):a.href}return _d.buildAbsoluteURL(e,t)},Ju=function(){function s(){this.listeners={}}var e=s.prototype;return e.on=function(i,r){this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push(r)},e.off=function(i,r){if(!this.listeners[i])return!1;var n=this.listeners[i].indexOf(r);return this.listeners[i]=this.listeners[i].slice(0),this.listeners[i].splice(n,1),n>-1},e.trigger=function(i){var r=this.listeners[i];if(r)if(arguments.length===2)for(var n=r.length,a=0;a-1;t=this.buffer.indexOf(` +`))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const PS=" ",$o=function(s){const e=/([0-9.]*)?@?([0-9.]*)?/.exec(s||""),t={};return e[1]&&(t.length=parseInt(e[1],10)),e[2]&&(t.offset=parseInt(e[2],10)),t},IS=function(){const t="(?:"+"[^=]*"+")=(?:"+'"[^"]*"|[^,]*'+")";return new RegExp("(?:^|,)("+t+")")},ot=function(s){const e={};if(!s)return e;const t=s.split(IS());let i=t.length,r;for(;i--;)t[i]!==""&&(r=/([^=]*)=(.*)/.exec(t[i]).slice(1),r[0]=r[0].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^['"](.*)['"]$/g,"$1"),e[r[0]]=r[1]);return e};class LS extends Ju{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(e=e.trim(),e.length===0)return;if(e[0]!=="#"){this.trigger("data",{type:"uri",uri:e});return}this.tagMappers.reduce((n,a)=>{const o=a(e);return o===e?n:n.concat([o])},[e]).forEach(n=>{for(let a=0;an),this.customParsers.push(n=>{if(e.exec(n))return this.trigger("data",{type:"custom",data:i(n),customType:t,segment:r}),!0})}addTagMapper({expression:e,map:t}){const i=r=>e.test(r)?t(r):r;this.tagMappers.push(i)}}const OS=s=>s.toLowerCase().replace(/-(\w)/g,e=>e[1].toUpperCase()),ui=function(s){const e={};return Object.keys(s).forEach(function(t){e[OS(t)]=s[t]}),e},jo=function(s){const{serverControl:e,targetDuration:t,partTargetDuration:i}=s;if(!e)return;const r="#EXT-X-SERVER-CONTROL",n="holdBack",a="partHoldBack",o=t&&t*3,l=i&&i*2;t&&!e.hasOwnProperty(n)&&(e[n]=o,this.trigger("info",{message:`${r} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&e[n]{i.uri||!i.parts&&!i.preloadHints||(!i.map&&r&&(i.map=r),!i.key&&n&&(i.key=n),!i.timeline&&typeof p=="number"&&(i.timeline=p),this.manifest.preloadSegment=i)}),this.parseStream.on("data",function(v){let x,D;({tag(){({version(){v.version&&(this.manifest.version=v.version)},"allow-cache"(){this.manifest.allowCache=v.allowed,"allowed"in v||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const A={};"length"in v&&(i.byterange=A,A.length=v.length,"offset"in v||(v.offset=y)),"offset"in v&&(i.byterange=A,A.offset=v.offset),y=A.offset+A.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),v.title&&(i.title=v.title),v.duration>0&&(i.duration=v.duration),v.duration===0&&(i.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=t},key(){if(!v.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(v.attributes.METHOD==="NONE"){n=null;return}if(!v.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(v.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:v.attributes};return}if(v.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:v.attributes.URI};return}if(v.attributes.KEYFORMAT===d){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(v.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(v.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),v.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(v.attributes.KEYID&&v.attributes.KEYID.substring(0,2)==="0x")){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:v.attributes.KEYFORMAT,keyId:v.attributes.KEYID.substring(2)},pssh:DS(v.attributes.URI.split(",")[1])};return}v.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),n={method:v.attributes.METHOD||"AES-128",uri:v.attributes.URI},typeof v.attributes.IV<"u"&&(n.iv=v.attributes.IV)},"media-sequence"(){if(!isFinite(v.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+v.number});return}this.manifest.mediaSequence=v.number},"discontinuity-sequence"(){if(!isFinite(v.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+v.number});return}this.manifest.discontinuitySequence=v.number,p=v.number},"playlist-type"(){if(!/VOD|EVENT/.test(v.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+v.playlist});return}this.manifest.playlistType=v.playlistType},map(){r={},v.uri&&(r.uri=v.uri),v.byterange&&(r.byterange=v.byterange),n&&(r.key=n)},"stream-inf"(){if(this.manifest.playlists=t,this.manifest.mediaGroups=this.manifest.mediaGroups||l,!v.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}i.attributes||(i.attributes={}),yt(i.attributes,v.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,!(v.attributes&&v.attributes.TYPE&&v.attributes["GROUP-ID"]&&v.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}const A=this.manifest.mediaGroups[v.attributes.TYPE];A[v.attributes["GROUP-ID"]]=A[v.attributes["GROUP-ID"]]||{},x=A[v.attributes["GROUP-ID"]],D={default:/yes/i.test(v.attributes.DEFAULT)},D.default?D.autoselect=!0:D.autoselect=/yes/i.test(v.attributes.AUTOSELECT),v.attributes.LANGUAGE&&(D.language=v.attributes.LANGUAGE),v.attributes.URI&&(D.uri=v.attributes.URI),v.attributes["INSTREAM-ID"]&&(D.instreamId=v.attributes["INSTREAM-ID"]),v.attributes.CHARACTERISTICS&&(D.characteristics=v.attributes.CHARACTERISTICS),v.attributes.FORCED&&(D.forced=/yes/i.test(v.attributes.FORCED)),x[v.attributes.NAME]=D},discontinuity(){p+=1,i.discontinuity=!0,this.manifest.discontinuityStarts.push(t.length)},"program-date-time"(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=v.dateTimeString,this.manifest.dateTimeObject=v.dateTimeObject),i.dateTimeString=v.dateTimeString,i.dateTimeObject=v.dateTimeObject;const{lastProgramDateTime:A}=this;this.lastProgramDateTime=new Date(v.dateTimeString).getTime(),A===null&&this.manifest.segments.reduceRight((k,M)=>(M.programDateTime=k-M.duration*1e3,M.programDateTime),this.lastProgramDateTime)},targetduration(){if(!isFinite(v.duration)||v.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+v.duration});return}this.manifest.targetDuration=v.duration,jo.call(this,this.manifest)},start(){if(!v.attributes||isNaN(v.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:v.attributes["TIME-OFFSET"],precise:v.attributes.PRECISE}},"cue-out"(){i.cueOut=v.data},"cue-out-cont"(){i.cueOutCont=v.data},"cue-in"(){i.cueIn=v.data},skip(){this.manifest.skip=ui(v.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",v.attributes,["SKIPPED-SEGMENTS"])},part(){a=!0;const A=this.manifest.segments.length,k=ui(v.attributes);i.parts=i.parts||[],i.parts.push(k),k.byterange&&(k.byterange.hasOwnProperty("offset")||(k.byterange.offset=_),_=k.byterange.offset+k.byterange.length);const M=i.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${M} for segment #${A}`,v.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((O,I)=>{O.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${I} lacks required attribute(s): LAST-PART`})})},"server-control"(){const A=this.manifest.serverControl=ui(v.attributes);A.hasOwnProperty("canBlockReload")||(A.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),jo.call(this,this.manifest),A.canSkipDateranges&&!A.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){const A=this.manifest.segments.length,k=ui(v.attributes),M=k.type&&k.type==="PART";i.preloadHints=i.preloadHints||[],i.preloadHints.push(k),k.byterange&&(k.byterange.hasOwnProperty("offset")||(k.byterange.offset=M?_:0,M&&(_=k.byterange.offset+k.byterange.length)));const O=i.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${O} for segment #${A}`,v.attributes,["TYPE","URI"]),!!k.type)for(let I=0;II.id===k.id);this.manifest.dateRanges[O]=yt(this.manifest.dateRanges[O],k),b[k.id]=yt(b[k.id],k),this.manifest.dateRanges.pop()}},"independent-segments"(){this.manifest.independentSegments=!0},"content-steering"(){this.manifest.contentSteering=ui(v.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",v.attributes,["SERVER-URI"])}}[v.tagType]||o).call(e)},uri(){i.uri=v.uri,t.push(i),this.manifest.targetDuration&&!("duration"in i)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),i.duration=this.manifest.targetDuration),n&&(i.key=n),i.timeline=p,r&&(i.map=r),_=0,this.lastProgramDateTime!==null&&(i.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=i.duration*1e3),i={}},comment(){},custom(){v.segment?(i.custom=i.custom||{},i.custom[v.customType]=v.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[v.customType]=v.data)}})[v.type].call(e)})}warnOnMissingAttributes_(e,t,i){const r=[];i.forEach(function(n){t.hasOwnProperty(n)||r.push(n)}),r.length&&this.trigger("warn",{message:`${e} lacks required attribute(s): ${r.join(", ")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(` +`),this.manifest.dateRanges.length&&this.lastProgramDateTime===null&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),this.lastProgramDateTime=null,this.trigger("end")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var $i={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},MS=["video","audio","text"],Td=["Video","Audio","Text"],Lf=function(e){return e&&e.replace(/avc1\.(\d+)\.(\d+)/i,function(t,i,r){var n=("00"+Number(i).toString(16)).slice(-2),a=("00"+Number(r).toString(16)).slice(-2);return"avc1."+n+"00"+a})},Pt=function(e){e===void 0&&(e="");var t=e.split(","),i=[];return t.forEach(function(r){r=r.trim();var n;MS.forEach(function(a){var o=$i[a].exec(r.toLowerCase());if(!(!o||o.length<=1)){n=a;var l=r.substring(0,o[1].length),d=r.replace(l,"");i.push({type:l,details:d,mediaType:a})}}),n||i.push({type:r,details:"",mediaType:"unknown"})}),i},NS=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var r in i){var n=i[r];if(n.default&&n.playlists)return Pt(n.playlists[0].attributes.CODECS)}return null},Of=function(e){return e===void 0&&(e=""),$i.audio.test(e.trim().toLowerCase())},BS=function(e){return e===void 0&&(e=""),$i.text.test(e.trim().toLowerCase())},Mr=function(e){if(!(!e||typeof e!="string")){var t=e.toLowerCase().split(",").map(function(n){return Lf(n.trim())}),i="video";t.length===1&&Of(t[0])?i="audio":t.length===1&&BS(t[0])&&(i="application");var r="mp4";return t.every(function(n){return $i.mp4.test(n)})?r="mp4":t.every(function(n){return $i.webm.test(n)})?r="webm":t.every(function(n){return $i.ogg.test(n)})&&(r="ogg"),i+"/"+r+';codecs="'+e+'"'}},Kn=function(e){return e===void 0&&(e=""),C.MediaSource&&C.MediaSource.isTypeSupported&&C.MediaSource.isTypeSupported(Mr(e))||!1},qo=function(e){return e===void 0&&(e=""),e.toLowerCase().split(",").every(function(t){t=t.trim();for(var i=0;iy&&(p-=y,p-=y,p-=Fe(2))}return Number(p)},zS=function(e,t){var i=t===void 0?{}:t,r=i.le,n=r===void 0?!1:r;(typeof e!="bigint"&&typeof e!="number"||typeof e=="number"&&e!==e)&&(e=0),e=Fe(e);for(var a=qS(e),o=new Uint8Array(new ArrayBuffer(a)),l=0;l=t.length&&d.call(t,function(p,y){var _=l[y]?l[y]&e[a+y]:e[a+y];return p===_})},WS=function(e,t,i){t.forEach(function(r){for(var n in e.mediaGroups[r])for(var a in e.mediaGroups[r][n]){var o=e.mediaGroups[r][n][a];i(o,r,n,a)}})},KS=function(e){return C.atob?C.atob(e):Buffer.from(e,"base64").toString("binary")};function XS(s){for(var e=KS(s),t=new Uint8Array(e.length),i=0;i=0&&s=0){for(var r=e.length-1;i0},lookupPrefix:function(s){for(var e=this;e;){var t=e._nsMap;if(t){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&t[i]===s)return i}e=e.nodeType==Es?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(s){for(var e=this;e;){var t=e._nsMap;if(t&&Object.prototype.hasOwnProperty.call(t,s))return t[s];e=e.nodeType==Es?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(s){var e=this.lookupPrefix(s);return e==null}};function Xf(s){return s=="<"&&"<"||s==">"&&">"||s=="&"&&"&"||s=='"'&&"""||"&#"+s.charCodeAt()+";"}Qr(nt,oe);Qr(nt,oe.prototype);function Br(s,e){if(e(s))return!0;if(s=s.firstChild)do if(Br(s,e))return!0;while(s=s.nextSibling)}function Jr(){this.ownerDocument=this}function rx(s,e,t){s&&s._inc++;var i=t.namespaceURI;i===Nr.XMLNS&&(e._nsMap[t.prefix?t.localName:""]=t.value)}function Yf(s,e,t,i){s&&s._inc++;var r=t.namespaceURI;r===Nr.XMLNS&&delete e._nsMap[t.prefix?t.localName:""]}function tl(s,e,t){if(s&&s._inc){s._inc++;var i=e.childNodes;if(t)i[i.length++]=t;else{for(var r=e.firstChild,n=0;r;)i[n++]=r,r=r.nextSibling;i.length=n,delete i[i.length]}}}function Qf(s,e){var t=e.previousSibling,i=e.nextSibling;return t?t.nextSibling=i:s.firstChild=i,i?i.previousSibling=t:s.lastChild=t,e.parentNode=null,e.previousSibling=null,e.nextSibling=null,tl(s.ownerDocument,s),e}function nx(s){return s&&(s.nodeType===oe.DOCUMENT_NODE||s.nodeType===oe.DOCUMENT_FRAGMENT_NODE||s.nodeType===oe.ELEMENT_NODE)}function ax(s){return s&&(Bt(s)||il(s)||ii(s)||s.nodeType===oe.DOCUMENT_FRAGMENT_NODE||s.nodeType===oe.COMMENT_NODE||s.nodeType===oe.PROCESSING_INSTRUCTION_NODE)}function ii(s){return s&&s.nodeType===oe.DOCUMENT_TYPE_NODE}function Bt(s){return s&&s.nodeType===oe.ELEMENT_NODE}function il(s){return s&&s.nodeType===oe.TEXT_NODE}function wd(s,e){var t=s.childNodes||[];if(Nt(t,Bt)||ii(e))return!1;var i=Nt(t,ii);return!(e&&i&&t.indexOf(i)>t.indexOf(e))}function Ad(s,e){var t=s.childNodes||[];function i(n){return Bt(n)&&n!==e}if(Nt(t,i))return!1;var r=Nt(t,ii);return!(e&&r&&t.indexOf(r)>t.indexOf(e))}function ox(s,e,t){if(!nx(s))throw new Ae(tt,"Unexpected parent node type "+s.nodeType);if(t&&t.parentNode!==s)throw new Ae(Gf,"child not in parent");if(!ax(e)||ii(e)&&s.nodeType!==oe.DOCUMENT_NODE)throw new Ae(tt,"Unexpected node type "+e.nodeType+" for parent node type "+s.nodeType)}function ux(s,e,t){var i=s.childNodes||[],r=e.childNodes||[];if(e.nodeType===oe.DOCUMENT_FRAGMENT_NODE){var n=r.filter(Bt);if(n.length>1||Nt(r,il))throw new Ae(tt,"More than one element or text in fragment");if(n.length===1&&!wd(s,t))throw new Ae(tt,"Element in fragment can not be inserted before doctype")}if(Bt(e)&&!wd(s,t))throw new Ae(tt,"Only one element can be added and only after doctype");if(ii(e)){if(Nt(i,ii))throw new Ae(tt,"Only one doctype is allowed");var a=Nt(i,Bt);if(t&&i.indexOf(a)1||Nt(r,il))throw new Ae(tt,"More than one element or text in fragment");if(n.length===1&&!Ad(s,t))throw new Ae(tt,"Element in fragment can not be inserted before doctype")}if(Bt(e)&&!Ad(s,t))throw new Ae(tt,"Only one element can be added and only after doctype");if(ii(e)){if(Nt(i,function(l){return ii(l)&&l!==t}))throw new Ae(tt,"Only one doctype is allowed");var a=Nt(i,Bt);if(t&&i.indexOf(a)0&&Br(t.documentElement,function(r){if(r!==t&&r.nodeType===Ct){var n=r.getAttribute("class");if(n){var a=s===n;if(!a){var o=Sd(n);a=e.every(tx(o))}a&&i.push(r)}}}),i})},createElement:function(s){var e=new Gi;e.ownerDocument=this,e.nodeName=s,e.tagName=s,e.localName=s,e.childNodes=new Jt;var t=e.attributes=new ra;return t._ownerElement=e,e},createDocumentFragment:function(){var s=new Ba;return s.ownerDocument=this,s.childNodes=new Jt,s},createTextNode:function(s){var e=new sl;return e.ownerDocument=this,e.appendData(s),e},createComment:function(s){var e=new rl;return e.ownerDocument=this,e.appendData(s),e},createCDATASection:function(s){var e=new nl;return e.ownerDocument=this,e.appendData(s),e},createProcessingInstruction:function(s,e){var t=new ol;return t.ownerDocument=this,t.tagName=t.nodeName=t.target=s,t.nodeValue=t.data=e,t},createAttribute:function(s){var e=new aa;return e.ownerDocument=this,e.name=s,e.nodeName=s,e.localName=s,e.specified=!0,e},createEntityReference:function(s){var e=new al;return e.ownerDocument=this,e.nodeName=s,e},createElementNS:function(s,e){var t=new Gi,i=e.split(":"),r=t.attributes=new ra;return t.childNodes=new Jt,t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.namespaceURI=s,i.length==2?(t.prefix=i[0],t.localName=i[1]):t.localName=e,r._ownerElement=t,t},createAttributeNS:function(s,e){var t=new aa,i=e.split(":");return t.ownerDocument=this,t.nodeName=e,t.name=e,t.namespaceURI=s,t.specified=!0,i.length==2?(t.prefix=i[0],t.localName=i[1]):t.localName=e,t}};rt(Jr,oe);function Gi(){this._nsMap={}}Gi.prototype={nodeType:Ct,hasAttribute:function(s){return this.getAttributeNode(s)!=null},getAttribute:function(s){var e=this.getAttributeNode(s);return e&&e.value||""},getAttributeNode:function(s){return this.attributes.getNamedItem(s)},setAttribute:function(s,e){var t=this.ownerDocument.createAttribute(s);t.value=t.nodeValue=""+e,this.setAttributeNode(t)},removeAttribute:function(s){var e=this.getAttributeNode(s);e&&this.removeAttributeNode(e)},appendChild:function(s){return s.nodeType===ti?this.insertBefore(s,null):lx(this,s)},setAttributeNode:function(s){return this.attributes.setNamedItem(s)},setAttributeNodeNS:function(s){return this.attributes.setNamedItemNS(s)},removeAttributeNode:function(s){return this.attributes.removeNamedItem(s.nodeName)},removeAttributeNS:function(s,e){var t=this.getAttributeNodeNS(s,e);t&&this.removeAttributeNode(t)},hasAttributeNS:function(s,e){return this.getAttributeNodeNS(s,e)!=null},getAttributeNS:function(s,e){var t=this.getAttributeNodeNS(s,e);return t&&t.value||""},setAttributeNS:function(s,e,t){var i=this.ownerDocument.createAttributeNS(s,e);i.value=i.nodeValue=""+t,this.setAttributeNode(i)},getAttributeNodeNS:function(s,e){return this.attributes.getNamedItemNS(s,e)},getElementsByTagName:function(s){return new Cs(this,function(e){var t=[];return Br(e,function(i){i!==e&&i.nodeType==Ct&&(s==="*"||i.tagName==s)&&t.push(i)}),t})},getElementsByTagNameNS:function(s,e){return new Cs(this,function(t){var i=[];return Br(t,function(r){r!==t&&r.nodeType===Ct&&(s==="*"||r.namespaceURI===s)&&(e==="*"||r.localName==e)&&i.push(r)}),i})}};Jr.prototype.getElementsByTagName=Gi.prototype.getElementsByTagName;Jr.prototype.getElementsByTagNameNS=Gi.prototype.getElementsByTagNameNS;rt(Gi,oe);function aa(){}aa.prototype.nodeType=Es;rt(aa,oe);function Zr(){}Zr.prototype={data:"",substringData:function(s,e){return this.data.substring(s,s+e)},appendData:function(s){s=this.data+s,this.nodeValue=this.data=s,this.length=s.length},insertData:function(s,e){this.replaceData(s,0,e)},appendChild:function(s){throw new Error(Ue[tt])},deleteData:function(s,e){this.replaceData(s,e,"")},replaceData:function(s,e,t){var i=this.data.substring(0,s),r=this.data.substring(s+e);t=i+t+r,this.nodeValue=this.data=t,this.length=t.length}};rt(Zr,oe);function sl(){}sl.prototype={nodeName:"#text",nodeType:sa,splitText:function(s){var e=this.data,t=e.substring(s);e=e.substring(0,s),this.data=this.nodeValue=e,this.length=e.length;var i=this.ownerDocument.createTextNode(t);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}};rt(sl,Zr);function rl(){}rl.prototype={nodeName:"#comment",nodeType:Vf};rt(rl,Zr);function nl(){}nl.prototype={nodeName:"#cdata-section",nodeType:$f};rt(nl,Zr);function Na(){}Na.prototype.nodeType=zf;rt(Na,oe);function Zf(){}Zf.prototype.nodeType=sx;rt(Zf,oe);function ep(){}ep.prototype.nodeType=ix;rt(ep,oe);function al(){}al.prototype.nodeType=jf;rt(al,oe);function Ba(){}Ba.prototype.nodeName="#document-fragment";Ba.prototype.nodeType=ti;rt(Ba,oe);function ol(){}ol.prototype.nodeType=qf;rt(ol,oe);function tp(){}tp.prototype.serializeToString=function(s,e,t){return ip.call(s,e,t)};oe.prototype.toString=ip;function ip(s,e){var t=[],i=this.nodeType==9&&this.documentElement||this,r=i.prefix,n=i.namespaceURI;if(n&&r==null){var r=i.lookupPrefix(n);if(r==null)var a=[{namespace:n,prefix:null}]}return us(this,t,s,e,a),t.join("")}function Dd(s,e,t){var i=s.prefix||"",r=s.namespaceURI;if(!r||i==="xml"&&r===Nr.XML||r===Nr.XMLNS)return!1;for(var n=t.length;n--;){var a=t[n];if(a.prefix===i)return a.namespace!==r}return!0}function Vo(s,e,t){s.push(" ",e,'="',t.replace(/[<>&"\t\n\r]/g,Xf),'"')}function us(s,e,t,i,r){if(r||(r=[]),i)if(s=i(s),s){if(typeof s=="string"){e.push(s);return}}else return;switch(s.nodeType){case Ct:var n=s.attributes,a=n.length,A=s.firstChild,o=s.tagName;t=Nr.isHTML(s.namespaceURI)||t;var l=o;if(!t&&!s.prefix&&s.namespaceURI){for(var d,p=0;p=0;y--){var _=r[y];if(_.prefix===""&&_.namespace===s.namespaceURI){d=_.namespace;break}}if(d!==s.namespaceURI)for(var y=r.length-1;y>=0;y--){var _=r[y];if(_.namespace===s.namespaceURI){_.prefix&&(l=_.prefix+":"+o);break}}}e.push("<",l);for(var b=0;b"),t&&/^script$/i.test(o))for(;A;)A.data?e.push(A.data):us(A,e,t,i,r.slice()),A=A.nextSibling;else for(;A;)us(A,e,t,i,r.slice()),A=A.nextSibling;e.push("")}else e.push("/>");return;case Hf:case ti:for(var A=s.firstChild;A;)us(A,e,t,i,r.slice()),A=A.nextSibling;return;case Es:return Vo(e,s.name,s.value);case sa:return e.push(s.data.replace(/[<&>]/g,Xf));case $f:return e.push("");case Vf:return e.push("");case zf:var k=s.publicId,M=s.systemId;if(e.push("");else if(M&&M!=".")e.push(" SYSTEM ",M,">");else{var O=s.internalSubset;O&&e.push(" [",O,"]"),e.push(">")}return;case qf:return e.push("");case jf:return e.push("&",s.nodeName,";");default:e.push("??",s.nodeName)}}function sp(s,e,t){var i;switch(e.nodeType){case Ct:i=e.cloneNode(!1),i.ownerDocument=s;case ti:break;case Es:t=!0;break}if(i||(i=e.cloneNode(!1)),i.ownerDocument=s,i.parentNode=null,t)for(var r=e.firstChild;r;)i.appendChild(sp(s,r,t)),r=r.nextSibling;return i}function hu(s,e,t){var i=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=e[r];typeof n!="object"&&n!=i[r]&&(i[r]=n)}switch(e.childNodes&&(i.childNodes=new Jt),i.ownerDocument=s,i.nodeType){case Ct:var a=e.attributes,o=i.attributes=new ra,l=a.length;o._ownerElement=i;for(var d=0;d",lt:"<",quot:'"'}),s.HTML_ENTITIES=e({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:` +`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),s.entityMap=s.HTML_ENTITIES})(np);var ul={},Ur=ni.NAMESPACE,fu=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,kd=new RegExp("[\\-\\.0-9"+fu.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),Pd=new RegExp("^"+fu.source+kd.source+"*(?::"+fu.source+kd.source+"*)?$"),ar=0,li=1,Zi=2,or=3,es=4,ts=5,ur=6,Mn=7;function ws(s,e){this.message=s,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,ws)}ws.prototype=new Error;ws.prototype.name=ws.name;function ap(){}ap.prototype={parse:function(s,e,t){var i=this.domBuilder;i.startDocument(),op(e,e={}),cx(s,e,t,i,this.errorHandler),i.endDocument()}};function cx(s,e,t,i,r){function n(se){if(se>65535){se-=65536;var Ee=55296+(se>>10),qt=56320+(se&1023);return String.fromCharCode(Ee,qt)}else return String.fromCharCode(se)}function a(se){var Ee=se.slice(1,-1);return Object.hasOwnProperty.call(t,Ee)?t[Ee]:Ee.charAt(0)==="#"?n(parseInt(Ee.substr(1).replace("x","0x"))):(r.error("entity not found:"+se),se)}function o(se){if(se>x){var Ee=s.substring(x,se).replace(/&#?\w+;/g,a);_&&l(x),i.characters(Ee,0,se-x),x=se}}function l(se,Ee){for(;se>=p&&(Ee=y.exec(s));)d=Ee.index,p=d+Ee[0].length,_.lineNumber++;_.columnNumber=se-d+1}for(var d=0,p=0,y=/.*(?:\r\n?|\n)|.*$/g,_=i.locator,b=[{currentNSMap:e}],v={},x=0;;){try{var D=s.indexOf("<",x);if(D<0){if(!s.substr(x).match(/^\s*$/)){var A=i.doc,k=A.createTextNode(s.substr(x));A.appendChild(k),i.currentElement=k}return}switch(D>x&&o(D),s.charAt(D+1)){case"/":var te=s.indexOf(">",D+3),M=s.substring(D+2,te).replace(/[ \t\n\r]+$/g,""),O=b.pop();te<0?(M=s.substring(D+2).replace(/[\s<].*/,""),r.error("end tag name: "+M+" is not complete:"+O.tagName),te=D+1+M.length):M.match(/\sx?x=te:o(Math.max(D,x)+1)}}function Id(s,e){return e.lineNumber=s.lineNumber,e.columnNumber=s.columnNumber,e}function dx(s,e,t,i,r,n){function a(_,b,v){t.attributeNames.hasOwnProperty(_)&&n.fatalError("Attribute "+_+" redefined"),t.addValue(_,b.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,r),v)}for(var o,l,d=++e,p=ar;;){var y=s.charAt(d);switch(y){case"=":if(p===li)o=s.slice(e,d),p=or;else if(p===Zi)p=or;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(p===or||p===li)if(p===li&&(n.warning('attribute value must after "="'),o=s.slice(e,d)),e=d+1,d=s.indexOf(y,e),d>0)l=s.slice(e,d),a(o,l,e-1),p=ts;else throw new Error("attribute value no end '"+y+"' match");else if(p==es)l=s.slice(e,d),a(o,l,e),n.warning('attribute "'+o+'" missed start quot('+y+")!!"),e=d+1,p=ts;else throw new Error('attribute value must after "="');break;case"/":switch(p){case ar:t.setTagName(s.slice(e,d));case ts:case ur:case Mn:p=Mn,t.closed=!0;case es:case li:break;case Zi:t.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return n.error("unexpected end of input"),p==ar&&t.setTagName(s.slice(e,d)),d;case">":switch(p){case ar:t.setTagName(s.slice(e,d));case ts:case ur:case Mn:break;case es:case li:l=s.slice(e,d),l.slice(-1)==="/"&&(t.closed=!0,l=l.slice(0,-1));case Zi:p===Zi&&(l=o),p==es?(n.warning('attribute "'+l+'" missed quot(")!'),a(o,l,e)):((!Ur.isHTML(i[""])||!l.match(/^(?:disabled|checked|selected)$/i))&&n.warning('attribute "'+l+'" missed value!! "'+l+'" instead!!'),a(l,l,e));break;case or:throw new Error("attribute value missed!!")}return d;case"€":y=" ";default:if(y<=" ")switch(p){case ar:t.setTagName(s.slice(e,d)),p=ur;break;case li:o=s.slice(e,d),p=Zi;break;case es:var l=s.slice(e,d);n.warning('attribute "'+l+'" missed quot(")!!'),a(o,l,e);case ts:p=ur;break}else switch(p){case Zi:t.tagName,(!Ur.isHTML(i[""])||!o.match(/^(?:disabled|checked|selected)$/i))&&n.warning('attribute "'+o+'" missed value!! "'+o+'" instead2!!'),a(o,o,e),e=d,p=li;break;case ts:n.warning('attribute space is required"'+o+'"!!');case ur:p=li,e=d;break;case or:p=es,e=d;break;case Mn:throw new Error("elements closed character '/' and '>' must be connected to")}}d++}}function Ld(s,e,t){for(var i=s.tagName,r=null,y=s.length;y--;){var n=s[y],a=n.qName,o=n.value,_=a.indexOf(":");if(_>0)var l=n.prefix=a.slice(0,_),d=a.slice(_+1),p=l==="xmlns"&&d;else d=a,l=null,p=a==="xmlns"&&"";n.localName=d,p!==!1&&(r==null&&(r={},op(t,t={})),t[p]=r[p]=o,n.uri=Ur.XMLNS,e.startPrefixMapping(p,o))}for(var y=s.length;y--;){n=s[y];var l=n.prefix;l&&(l==="xml"&&(n.uri=Ur.XML),l!=="xmlns"&&(n.uri=t[l||""]))}var _=i.indexOf(":");_>0?(l=s.prefix=i.slice(0,_),d=s.localName=i.slice(_+1)):(l=null,d=s.localName=i);var b=s.uri=t[l||""];if(e.startElement(b,d,i,s),s.closed){if(e.endElement(b,d,i),r)for(l in r)Object.prototype.hasOwnProperty.call(r,l)&&e.endPrefixMapping(l)}else return s.currentNSMap=t,s.localNSMap=r,!0}function hx(s,e,t,i,r){if(/^(?:script|textarea)$/i.test(t)){var n=s.indexOf("",e),a=s.substring(e+1,n);if(/[&<]/.test(a))return/^script$/i.test(t)?(r.characters(a,0,a.length),n):(a=a.replace(/&#?\w+;/g,i),r.characters(a,0,a.length),n)}return e+1}function fx(s,e,t,i){var r=i[t];return r==null&&(r=s.lastIndexOf(""),r",e+4);return n>e?(t.comment(s,e+4,n-e-4),n+3):(i.error("Unclosed comment"),-1)}else return-1;default:if(s.substr(e+3,6)=="CDATA["){var n=s.indexOf("]]>",e+9);return t.startCDATA(),t.characters(s,e+9,n-e-9),t.endCDATA(),n+3}var a=gx(s,e),o=a.length;if(o>1&&/!doctype/i.test(a[0][0])){var l=a[1][0],d=!1,p=!1;o>3&&(/^public$/i.test(a[2][0])?(d=a[3][0],p=o>4&&a[4][0]):/^system$/i.test(a[2][0])&&(p=a[3][0]));var y=a[o-1];return t.startDTD(l,d,p),t.endDTD(),y.index+y[0].length}}return-1}function mx(s,e,t){var i=s.indexOf("?>",e);if(i){var r=s.substring(e,i).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return r?(r[0].length,t.processingInstruction(r[1],r[2]),i+2):-1}return-1}function up(){this.attributeNames={}}up.prototype={setTagName:function(s){if(!Pd.test(s))throw new Error("invalid tagName:"+s);this.tagName=s},addValue:function(s,e,t){if(!Pd.test(s))throw new Error("invalid attribute:"+s);this.attributeNames[s]=this.length,this[this.length++]={qName:s,value:e,offset:t}},length:0,getLocalName:function(s){return this[s].localName},getLocator:function(s){return this[s].locator},getQName:function(s){return this[s].qName},getURI:function(s){return this[s].uri},getValue:function(s){return this[s].value}};function gx(s,e){var t,i=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(r.lastIndex=e,r.exec(s);t=r.exec(s);)if(i.push(t),t[1])return i}ul.XMLReader=ap;ul.ParseError=ws;var yx=ni,_x=_i,Od=np,lp=ul,vx=_x.DOMImplementation,Rd=yx.NAMESPACE,Tx=lp.ParseError,bx=lp.XMLReader;function cp(s){return s.replace(/\r[\n\u0085]/g,` +`).replace(/[\r\u0085\u2028]/g,` +`)}function dp(s){this.options=s||{locator:{}}}dp.prototype.parseFromString=function(s,e){var t=this.options,i=new bx,r=t.domBuilder||new en,n=t.errorHandler,a=t.locator,o=t.xmlns||{},l=/\/x?html?$/.test(e),d=l?Od.HTML_ENTITIES:Od.XML_ENTITIES;a&&r.setDocumentLocator(a),i.errorHandler=Sx(n,r,a),i.domBuilder=t.domBuilder||r,l&&(o[""]=Rd.HTML),o.xml=o.xml||Rd.XML;var p=t.normalizeLineEndings||cp;return s&&typeof s=="string"?i.parse(p(s),o,d):i.errorHandler.error("invalid doc source"),r.doc};function Sx(s,e,t){if(!s){if(e instanceof en)return e;s=e}var i={},r=s instanceof Function;t=t||{};function n(a){var o=s[a];!o&&r&&(o=s.length==2?function(l){s(a,l)}:s),i[a]=o&&function(l){o("[xmldom "+a+"] "+l+pu(t))}||function(){}}return n("warning"),n("error"),n("fatalError"),i}function en(){this.cdata=!1}function is(s,e){e.lineNumber=s.lineNumber,e.columnNumber=s.columnNumber}en.prototype={startDocument:function(){this.doc=new vx().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(s,e,t,i){var r=this.doc,n=r.createElementNS(s,t||e),a=i.length;Nn(this,n),this.currentElement=n,this.locator&&is(this.locator,n);for(var o=0;o=e+t||e?new java.lang.String(s,e,t)+"":s}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(s){en.prototype[s]=function(){return null}});function Nn(s,e){s.currentElement?s.currentElement.appendChild(e):s.doc.appendChild(e)}Ua.__DOMHandler=en;Ua.normalizeLineEndings=cp;Ua.DOMParser=dp;var xx=Ua.DOMParser;/*! @name mpd-parser @version 1.3.0 @license Apache-2.0 */const Nd=s=>!!s&&typeof s=="object",Be=(...s)=>s.reduce((e,t)=>(typeof t!="object"||Object.keys(t).forEach(i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):Nd(e[i])&&Nd(t[i])?e[i]=Be(e[i],t[i]):e[i]=t[i]}),e),{}),hp=s=>Object.keys(s).map(e=>s[e]),Ex=(s,e)=>{const t=[];for(let i=s;is.reduce((e,t)=>e.concat(t),[]),fp=s=>{if(!s.length)return[];const e=[];for(let t=0;ts.reduce((t,i,r)=>(i[e]&&t.push(r),t),[]),wx=(s,e)=>hp(s.reduce((t,i)=>(i.forEach(r=>{t[e(r)]=r}),t),{}));var Ds={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",INVALID_NUMBER_OF_CONTENT_STEERING:"INVALID_NUMBER_OF_CONTENT_STEERING",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};const Fr=({baseUrl:s="",source:e="",range:t="",indexRange:i=""})=>{const r={uri:e,resolvedUri:Ma(s||"",e)};if(t||i){const a=(t||i).split("-");let o=C.BigInt?C.BigInt(a[0]):parseInt(a[0],10),l=C.BigInt?C.BigInt(a[1]):parseInt(a[1],10);o{let e;return typeof s.offset=="bigint"||typeof s.length=="bigint"?e=C.BigInt(s.offset)+C.BigInt(s.length)-C.BigInt(1):e=s.offset+s.length-1,`${s.offset}-${e}`},Bd=s=>(s&&typeof s!="number"&&(s=parseInt(s,10)),isNaN(s)?null:s),Dx={static(s){const{duration:e,timescale:t=1,sourceDuration:i,periodDuration:r}=s,n=Bd(s.endNumber),a=e/t;return typeof n=="number"?{start:0,end:n}:typeof r=="number"?{start:0,end:r/a}:{start:0,end:i/a}},dynamic(s){const{NOW:e,clientOffset:t,availabilityStartTime:i,timescale:r=1,duration:n,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=s,d=Bd(s.endNumber),p=(e+t)/1e3,y=i+a,b=p+o-y,v=Math.ceil(b*r/n),x=Math.floor((p-y-l)*r/n),D=Math.floor((p-y)*r/n);return{start:Math.max(0,x),end:typeof d=="number"?d:Math.min(v,D)}}},kx=s=>e=>{const{duration:t,timescale:i=1,periodStart:r,startNumber:n=1}=s;return{number:n+e,duration:t/i,timeline:r,time:e*t}},ll=s=>{const{type:e,duration:t,timescale:i=1,periodDuration:r,sourceDuration:n}=s,{start:a,end:o}=Dx[e](s),l=Ex(a,o).map(kx(s));if(e==="static"){const d=l.length-1,p=typeof r=="number"?r:n;l[d].duration=p-t/i*d}return l},pp=s=>{const{baseUrl:e,initialization:t={},sourceDuration:i,indexRange:r="",periodStart:n,presentationTime:a,number:o=0,duration:l}=s;if(!e)throw new Error(Ds.NO_BASE_URL);const d=Fr({baseUrl:e,source:t.sourceURL,range:t.range}),p=Fr({baseUrl:e,source:e,indexRange:r});if(p.map=d,l){const y=ll(s);y.length&&(p.duration=y[0].duration,p.timeline=y[0].timeline)}else i&&(p.duration=i,p.timeline=n);return p.presentationTime=a||n,p.number=o,[p]},cl=(s,e,t)=>{const i=s.sidx.map?s.sidx.map:null,r=s.sidx.duration,n=s.timeline||0,a=s.sidx.byterange,o=a.offset+a.length,l=e.timescale,d=e.references.filter(D=>D.referenceType!==1),p=[],y=s.endList?"static":"dynamic",_=s.sidx.timeline;let b=_,v=s.mediaSequence||0,x;typeof e.firstOffset=="bigint"?x=C.BigInt(o)+e.firstOffset:x=o+e.firstOffset;for(let D=0;Dwx(s,({timeline:e})=>e).sort((e,t)=>e.timeline>t.timeline?1:-1),Lx=(s,e)=>{for(let t=0;t{let e=[];return WS(s,Px,(t,i,r,n)=>{e=e.concat(t.playlists||[])}),e},Fd=({playlist:s,mediaSequence:e})=>{s.mediaSequence=e,s.segments.forEach((t,i)=>{t.number=s.mediaSequence+i})},Ox=({oldPlaylists:s,newPlaylists:e,timelineStarts:t})=>{e.forEach(i=>{i.discontinuitySequence=t.findIndex(function({timeline:l}){return l===i.timeline});const r=Lx(s,i.attributes.NAME);if(!r||i.sidx)return;const n=i.segments[0],a=r.segments.findIndex(function(l){return Math.abs(l.presentationTime-n.presentationTime)r.timeline||r.segments.length&&i.timeline>r.segments[r.segments.length-1].timeline)&&i.discontinuitySequence--;return}r.segments[a].discontinuity&&!n.discontinuity&&(n.discontinuity=!0,i.discontinuityStarts.unshift(0),i.discontinuitySequence--),Fd({playlist:i,mediaSequence:r.segments[a].number})})},Rx=({oldManifest:s,newManifest:e})=>{const t=s.playlists.concat(Ud(s)),i=e.playlists.concat(Ud(e));return e.timelineStarts=mp([s.timelineStarts,e.timelineStarts]),Ox({oldPlaylists:t,newPlaylists:i,timelineStarts:e.timelineStarts}),e},Fa=s=>s&&s.uri+"-"+Ax(s.byterange),Ho=s=>{const e=s.reduce(function(i,r){return i[r.attributes.baseUrl]||(i[r.attributes.baseUrl]=[]),i[r.attributes.baseUrl].push(r),i},{});let t=[];return Object.values(e).forEach(i=>{const r=hp(i.reduce((n,a)=>{const o=a.attributes.id+(a.attributes.lang||"");return n[o]?(a.segments&&(a.segments[0]&&(a.segments[0].discontinuity=!0),n[o].segments.push(...a.segments)),a.attributes.contentProtection&&(n[o].attributes.contentProtection=a.attributes.contentProtection)):(n[o]=a,n[o].attributes.timelineStarts=[]),n[o].attributes.timelineStarts.push({start:a.attributes.periodStart,timeline:a.attributes.periodStart}),n},{}));t=t.concat(r)}),t.map(i=>(i.discontinuityStarts=Cx(i.segments||[],"discontinuity"),i))},dl=(s,e)=>{const t=Fa(s.sidx),i=t&&e[t]&&e[t].sidx;return i&&cl(s,i,s.sidx.resolvedUri),s},Mx=(s,e={})=>{if(!Object.keys(e).length)return s;for(const t in s)s[t]=dl(s[t],e);return s},Nx=({attributes:s,segments:e,sidx:t,mediaSequence:i,discontinuitySequence:r,discontinuityStarts:n},a)=>{const o={attributes:{NAME:s.id,BANDWIDTH:s.bandwidth,CODECS:s.codecs,"PROGRAM-ID":1},uri:"",endList:s.type==="static",timeline:s.periodStart,resolvedUri:s.baseUrl||"",targetDuration:s.duration,discontinuitySequence:r,discontinuityStarts:n,timelineStarts:s.timelineStarts,mediaSequence:i,segments:e};return s.contentProtection&&(o.contentProtection=s.contentProtection),s.serviceLocation&&(o.attributes.serviceLocation=s.serviceLocation),t&&(o.sidx=t),a&&(o.attributes.AUDIO="audio",o.attributes.SUBTITLES="subs"),o},Bx=({attributes:s,segments:e,mediaSequence:t,discontinuityStarts:i,discontinuitySequence:r})=>{typeof e>"u"&&(e=[{uri:s.baseUrl,timeline:s.periodStart,resolvedUri:s.baseUrl||"",duration:s.sourceDuration,number:0}],s.duration=s.sourceDuration);const n={NAME:s.id,BANDWIDTH:s.bandwidth,"PROGRAM-ID":1};s.codecs&&(n.CODECS=s.codecs);const a={attributes:n,uri:"",endList:s.type==="static",timeline:s.periodStart,resolvedUri:s.baseUrl||"",targetDuration:s.duration,timelineStarts:s.timelineStarts,discontinuityStarts:i,discontinuitySequence:r,mediaSequence:t,segments:e};return s.serviceLocation&&(a.attributes.serviceLocation=s.serviceLocation),a},Ux=(s,e={},t=!1)=>{let i;const r=s.reduce((n,a)=>{const o=a.attributes.role&&a.attributes.role.value||"",l=a.attributes.lang||"";let d=a.attributes.label||"main";if(l&&!a.attributes.label){const y=o?` (${o})`:"";d=`${a.attributes.lang}${y}`}n[d]||(n[d]={language:l,autoselect:!0,default:o==="main",playlists:[],uri:""});const p=dl(Nx(a,t),e);return n[d].playlists.push(p),typeof i>"u"&&o==="main"&&(i=a,i.default=!0),n},{});if(!i){const n=Object.keys(r)[0];r[n].default=!0}return r},Fx=(s,e={})=>s.reduce((t,i)=>{const r=i.attributes.label||i.attributes.lang||"text";return t[r]||(t[r]={language:r,default:!1,autoselect:!1,playlists:[],uri:""}),t[r].playlists.push(dl(Bx(i),e)),t},{}),$x=s=>s.reduce((e,t)=>(t&&t.forEach(i=>{const{channel:r,language:n}=i;e[n]={autoselect:!1,default:!1,instreamId:r,language:n},i.hasOwnProperty("aspectRatio")&&(e[n].aspectRatio=i.aspectRatio),i.hasOwnProperty("easyReader")&&(e[n].easyReader=i.easyReader),i.hasOwnProperty("3D")&&(e[n]["3D"]=i["3D"])}),e),{}),jx=({attributes:s,segments:e,sidx:t,discontinuityStarts:i})=>{const r={attributes:{NAME:s.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:s.width,height:s.height},CODECS:s.codecs,BANDWIDTH:s.bandwidth,"PROGRAM-ID":1},uri:"",endList:s.type==="static",timeline:s.periodStart,resolvedUri:s.baseUrl||"",targetDuration:s.duration,discontinuityStarts:i,timelineStarts:s.timelineStarts,segments:e};return s.frameRate&&(r.attributes["FRAME-RATE"]=s.frameRate),s.contentProtection&&(r.contentProtection=s.contentProtection),s.serviceLocation&&(r.attributes.serviceLocation=s.serviceLocation),t&&(r.sidx=t),r},qx=({attributes:s})=>s.mimeType==="video/mp4"||s.mimeType==="video/webm"||s.contentType==="video",Vx=({attributes:s})=>s.mimeType==="audio/mp4"||s.mimeType==="audio/webm"||s.contentType==="audio",Hx=({attributes:s})=>s.mimeType==="text/vtt"||s.contentType==="text",zx=(s,e)=>{s.forEach(t=>{t.mediaSequence=0,t.discontinuitySequence=e.findIndex(function({timeline:i}){return i===t.timeline}),t.segments&&t.segments.forEach((i,r)=>{i.number=r})})},$d=s=>s?Object.keys(s).reduce((e,t)=>{const i=s[t];return e.concat(i.playlists)},[]):[],Gx=({dashPlaylists:s,locations:e,contentSteering:t,sidxMapping:i={},previousManifest:r,eventStream:n})=>{if(!s.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:d}=s[0].attributes,p=Ho(s.filter(qx)).map(jx),y=Ho(s.filter(Vx)),_=Ho(s.filter(Hx)),b=s.map(O=>O.attributes.captionServices).filter(Boolean),v={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:a,playlists:Mx(p,i)};d>=0&&(v.minimumUpdatePeriod=d*1e3),e&&(v.locations=e),t&&(v.contentSteering=t),o==="dynamic"&&(v.suggestedPresentationDelay=l),n&&n.length>0&&(v.eventStream=n);const x=v.playlists.length===0,D=y.length?Ux(y,i,x):null,A=_.length?Fx(_,i):null,k=p.concat($d(D),$d(A)),M=k.map(({timelineStarts:O})=>O);return v.timelineStarts=mp(M),zx(k,v.timelineStarts),D&&(v.mediaGroups.AUDIO.audio=D),A&&(v.mediaGroups.SUBTITLES.subs=A),b.length&&(v.mediaGroups["CLOSED-CAPTIONS"].cc=$x(b)),r?Rx({oldManifest:r,newManifest:v}):v},Wx=(s,e,t)=>{const{NOW:i,clientOffset:r,availabilityStartTime:n,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=s,d=(i+r)/1e3,p=n+o,_=d+l-p;return Math.ceil((_*a-e)/t)},gp=(s,e)=>{const{type:t,minimumUpdatePeriod:i=0,media:r="",sourceDuration:n,timescale:a=1,startNumber:o=1,periodStart:l}=s,d=[];let p=-1;for(let y=0;yp&&(p=x);let D;if(v<0){const M=y+1;M===e.length?t==="dynamic"&&i>0&&r.indexOf("$Number$")>0?D=Wx(s,p,b):D=(n*a-p)/b:D=(e[M].t-p)/b}else D=v+1;const A=o+d.length+D;let k=o+d.length;for(;k(e,t,i,r)=>{if(e==="$$")return"$";if(typeof s[t]>"u")return e;const n=""+s[t];return t==="RepresentationID"||(i?r=parseInt(r,10):r=1,n.length>=r)?n:`${new Array(r-n.length+1).join("0")}${n}`},jd=(s,e)=>s.replace(Kx,Xx(e)),Yx=(s,e)=>!s.duration&&!e?[{number:s.startNumber||1,duration:s.sourceDuration,time:0,timeline:s.periodStart}]:s.duration?ll(s):gp(s,e),Qx=(s,e)=>{const t={RepresentationID:s.id,Bandwidth:s.bandwidth||0},{initialization:i={sourceURL:"",range:""}}=s,r=Fr({baseUrl:s.baseUrl,source:jd(i.sourceURL,t),range:i.range});return Yx(s,e).map(a=>{t.Number=a.number,t.Time=a.time;const o=jd(s.media||"",t),l=s.timescale||1,d=s.presentationTimeOffset||0,p=s.periodStart+(a.time-d)/l;return{uri:o,timeline:a.timeline,duration:a.duration,resolvedUri:Ma(s.baseUrl||"",o),map:r,number:a.number,presentationTime:p}})},Jx=(s,e)=>{const{baseUrl:t,initialization:i={}}=s,r=Fr({baseUrl:t,source:i.sourceURL,range:i.range}),n=Fr({baseUrl:t,source:e.media,range:e.mediaRange});return n.map=r,n},Zx=(s,e)=>{const{duration:t,segmentUrls:i=[],periodStart:r}=s;if(!t&&!e||t&&e)throw new Error(Ds.SEGMENT_TIME_UNSPECIFIED);const n=i.map(l=>Jx(s,l));let a;return t&&(a=ll(s)),e&&(a=gp(s,e)),a.map((l,d)=>{if(n[d]){const p=n[d],y=s.timescale||1,_=s.presentationTimeOffset||0;return p.timeline=l.timeline,p.duration=l.duration,p.number=l.number,p.presentationTime=r+(l.time-_)/y,p}}).filter(l=>l)},eE=({attributes:s,segmentInfo:e})=>{let t,i;e.template?(i=Qx,t=Be(s,e.template)):e.base?(i=pp,t=Be(s,e.base)):e.list&&(i=Zx,t=Be(s,e.list));const r={attributes:s};if(!i)return r;const n=i(t,e.segmentTimeline);if(t.duration){const{duration:a,timescale:o=1}=t;t.duration=a/o}else n.length?t.duration=n.reduce((a,o)=>Math.max(a,Math.ceil(o.duration)),0):t.duration=0;return r.attributes=t,r.segments=n,e.base&&t.indexRange&&(r.sidx=n[0],r.segments=[]),r},tE=s=>s.map(eE),ve=(s,e)=>fp(s.childNodes).filter(({tagName:t})=>t===e),tn=s=>s.textContent.trim(),iE=s=>parseFloat(s.split("/").reduce((e,t)=>e/t)),ss=s=>{const o=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(s);if(!o)return 0;const[l,d,p,y,_,b]=o.slice(1);return parseFloat(l||0)*31536e3+parseFloat(d||0)*2592e3+parseFloat(p||0)*86400+parseFloat(y||0)*3600+parseFloat(_||0)*60+parseFloat(b||0)},sE=s=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(s)&&(s+="Z"),Date.parse(s)),qd={mediaPresentationDuration(s){return ss(s)},availabilityStartTime(s){return sE(s)/1e3},minimumUpdatePeriod(s){return ss(s)},suggestedPresentationDelay(s){return ss(s)},type(s){return s},timeShiftBufferDepth(s){return ss(s)},start(s){return ss(s)},width(s){return parseInt(s,10)},height(s){return parseInt(s,10)},bandwidth(s){return parseInt(s,10)},frameRate(s){return iE(s)},startNumber(s){return parseInt(s,10)},timescale(s){return parseInt(s,10)},presentationTimeOffset(s){return parseInt(s,10)},duration(s){const e=parseInt(s,10);return isNaN(e)?ss(s):e},d(s){return parseInt(s,10)},t(s){return parseInt(s,10)},r(s){return parseInt(s,10)},presentationTime(s){return parseInt(s,10)},DEFAULT(s){return s}},Pe=s=>s&&s.attributes?fp(s.attributes).reduce((e,t)=>{const i=qd[t.name]||qd.DEFAULT;return e[t.name]=i(t.value),e},{}):{},rE={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},$a=(s,e)=>e.length?As(s.map(function(t){return e.map(function(i){const r=tn(i),n=Ma(t.baseUrl,r),a=Be(Pe(i),{baseUrl:n});return n!==r&&!a.serviceLocation&&t.serviceLocation&&(a.serviceLocation=t.serviceLocation),a})})):s,hl=s=>{const e=ve(s,"SegmentTemplate")[0],t=ve(s,"SegmentList")[0],i=t&&ve(t,"SegmentURL").map(y=>Be({tag:"SegmentURL"},Pe(y))),r=ve(s,"SegmentBase")[0],n=t||e,a=n&&ve(n,"SegmentTimeline")[0],o=t||r||e,l=o&&ve(o,"Initialization")[0],d=e&&Pe(e);d&&l?d.initialization=l&&Pe(l):d&&d.initialization&&(d.initialization={sourceURL:d.initialization});const p={template:d,segmentTimeline:a&&ve(a,"S").map(y=>Pe(y)),list:t&&Be(Pe(t),{segmentUrls:i,initialization:Pe(l)}),base:r&&Be(Pe(r),{initialization:Pe(l)})};return Object.keys(p).forEach(y=>{p[y]||delete p[y]}),p},nE=(s,e,t)=>i=>{const r=ve(i,"BaseURL"),n=$a(e,r),a=Be(s,Pe(i)),o=hl(i);return n.map(l=>({segmentInfo:Be(t,o),attributes:Be(a,l)}))},aE=s=>s.reduce((e,t)=>{const i=Pe(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const r=rE[i.schemeIdUri];if(r){e[r]={attributes:i};const n=ve(t,"cenc:pssh")[0];if(n){const a=tn(n);e[r].pssh=a&&XS(a)}}return e},{}),oE=s=>{if(s.schemeIdUri==="urn:scte:dash:cc:cea-608:2015")return(typeof s.value!="string"?[]:s.value.split(";")).map(t=>{let i,r;return r=t,/^CC\d=/.test(t)?[i,r]=t.split("="):/^CC\d$/.test(t)&&(i=t),{channel:i,language:r}});if(s.schemeIdUri==="urn:scte:dash:cc:cea-708:2015")return(typeof s.value!="string"?[]:s.value.split(";")).map(t=>{const i={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(t)){const[r,n=""]=t.split("=");i.channel=r,i.language=t,n.split(",").forEach(a=>{const[o,l]=a.split(":");o==="lang"?i.language=l:o==="er"?i.easyReader=Number(l):o==="war"?i.aspectRatio=Number(l):o==="3D"&&(i["3D"]=Number(l))})}else i.language=t;return i.channel&&(i.channel="SERVICE"+i.channel),i})},uE=s=>As(ve(s.node,"EventStream").map(e=>{const t=Pe(e),i=t.schemeIdUri;return ve(e,"Event").map(r=>{const n=Pe(r),a=n.presentationTime||0,o=t.timescale||1,l=n.duration||0,d=a/o+s.attributes.start;return{schemeIdUri:i,value:t.value,id:n.id,start:d,end:d+l/o,messageData:tn(r)||n.messageData,contentEncoding:t.contentEncoding,presentationTimeOffset:t.presentationTimeOffset||0}})})),lE=(s,e,t)=>i=>{const r=Pe(i),n=$a(e,ve(i,"BaseURL")),a=ve(i,"Role")[0],o={role:Pe(a)};let l=Be(s,r,o);const d=ve(i,"Accessibility")[0],p=oE(Pe(d));p&&(l=Be(l,{captionServices:p}));const y=ve(i,"Label")[0];if(y&&y.childNodes.length){const D=y.childNodes[0].nodeValue.trim();l=Be(l,{label:D})}const _=aE(ve(i,"ContentProtection"));Object.keys(_).length&&(l=Be(l,{contentProtection:_}));const b=hl(i),v=ve(i,"Representation"),x=Be(t,b);return As(v.map(nE(l,n,x)))},cE=(s,e)=>(t,i)=>{const r=$a(e,ve(t.node,"BaseURL")),n=Be(s,{periodStart:t.attributes.start});typeof t.attributes.duration=="number"&&(n.periodDuration=t.attributes.duration);const a=ve(t.node,"AdaptationSet"),o=hl(t.node);return As(a.map(lE(n,r,o)))},dE=(s,e)=>{if(s.length>1&&e({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!s.length)return null;const t=Be({serverURL:tn(s[0])},Pe(s[0]));return t.queryBeforeStart=t.queryBeforeStart==="true",t},hE=({attributes:s,priorPeriodAttributes:e,mpdType:t})=>typeof s.start=="number"?s.start:e&&typeof e.start=="number"&&typeof e.duration=="number"?e.start+e.duration:!e&&t==="static"?0:null,fE=(s,e={})=>{const{manifestUri:t="",NOW:i=Date.now(),clientOffset:r=0,eventHandler:n=function(){}}=e,a=ve(s,"Period");if(!a.length)throw new Error(Ds.INVALID_NUMBER_OF_PERIOD);const o=ve(s,"Location"),l=Pe(s),d=$a([{baseUrl:t}],ve(s,"BaseURL")),p=ve(s,"ContentSteering");l.type=l.type||"static",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=i,l.clientOffset=r,o.length&&(l.locations=o.map(tn));const y=[];return a.forEach((_,b)=>{const v=Pe(_),x=y[b-1];v.start=hE({attributes:v,priorPeriodAttributes:x?x.attributes:null,mpdType:l.type}),y.push({node:_,attributes:v})}),{locations:l.locations,contentSteeringInfo:dE(p,n),representationInfo:As(y.map(cE(l,d))),eventStream:As(y.map(uE))}},yp=s=>{if(s==="")throw new Error(Ds.DASH_EMPTY_MANIFEST);const e=new xx;let t,i;try{t=e.parseFromString(s,"application/xml"),i=t&&t.documentElement.tagName==="MPD"?t.documentElement:null}catch{}if(!i||i&&i.getElementsByTagName("parsererror").length>0)throw new Error(Ds.DASH_INVALID_XML);return i},pE=s=>{const e=ve(s,"UTCTiming")[0];if(!e)return null;const t=Pe(e);switch(t.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":t.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":t.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":t.method="DIRECT",t.value=Date.parse(t.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(Ds.UNSUPPORTED_UTC_TIMING_SCHEME)}return t},mE=(s,e={})=>{const t=fE(yp(s),e),i=tE(t.representationInfo);return Gx({dashPlaylists:i,locations:t.locations,contentSteering:t.contentSteeringInfo,sidxMapping:e.sidxMapping,previousManifest:e.previousManifest,eventStream:t.eventStream})},gE=s=>pE(yp(s));var _p=Math.pow(2,32),yE=function(s){var e=new DataView(s.buffer,s.byteOffset,s.byteLength),t;return e.getBigUint64?(t=e.getBigUint64(0),t0;i+=12,r--)t.references.push({referenceType:(s[i]&128)>>>7,referencedSize:e.getUint32(i)&2147483647,subsegmentDuration:e.getUint32(i+4),startsWithSap:!!(s[i+8]&128),sapType:(s[i+8]&112)>>>4,sapDeltaTime:e.getUint32(i+8)&268435455});return t},TE=vE;const bE=ri(TE);var SE=z([73,68,51]),xE=function(e,t){t===void 0&&(t=0),e=z(e);var i=e[t+5],r=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9],n=(i&16)>>4;return n?r+20:r+10},vr=function s(e,t){return t===void 0&&(t=0),e=z(e),e.length-t<10||!_e(e,SE,{offset:t})?t:(t+=xE(e,t),s(e,t))},Hd=function(e){return typeof e=="string"?Nf(e):e},EE=function(e){return Array.isArray(e)?e.map(function(t){return Hd(t)}):[Hd(e)]},CE=function s(e,t,i){i===void 0&&(i=!1),t=EE(t),e=z(e);var r=[];if(!t.length)return r;for(var n=0;n>>0,o=e.subarray(n+4,n+8);if(a===0)break;var l=n+a;if(l>e.length){if(i)break;l=e.length}var d=e.subarray(n+8,l);_e(o,t[0])&&(t.length===1?r.push(d):r.push.apply(r,s(d,t.slice(1),i))),n=l}return r},Bn={EBML:z([26,69,223,163]),DocType:z([66,130]),Segment:z([24,83,128,103]),SegmentInfo:z([21,73,169,102]),Tracks:z([22,84,174,107]),Track:z([174]),TrackNumber:z([215]),DefaultDuration:z([35,227,131]),TrackEntry:z([174]),TrackType:z([131]),FlagDefault:z([136]),CodecID:z([134]),CodecPrivate:z([99,162]),VideoTrack:z([224]),AudioTrack:z([225]),Cluster:z([31,67,182,117]),Timestamp:z([231]),TimestampScale:z([42,215,177]),BlockGroup:z([160]),BlockDuration:z([155]),Block:z([161]),SimpleBlock:z([163])},mu=[128,64,32,16,8,4,2,1],wE=function(e){for(var t=1,i=0;i=t.length)return t.length;var r=oa(t,i,!1);if(_e(e.bytes,r.bytes))return i;var n=oa(t,i+r.length);return s(e,t,i+n.length+n.value+r.length)},Gd=function s(e,t){t=AE(t),e=z(e);var i=[];if(!t.length)return i;for(var r=0;re.length?e.length:o+a.value,d=e.subarray(o,l);_e(t[0],n.bytes)&&(t.length===1?i.push(d):i=i.concat(s(d,t.slice(1))));var p=n.length+a.length+d.length;r+=p}return i},kE=z([0,0,0,1]),PE=z([0,0,1]),IE=z([0,0,3]),LE=function(e){for(var t=[],i=1;i>1&63),i.indexOf(d)!==-1&&(a=n+l),n+=l+(t==="h264"?1:2)}return e.subarray(0,0)},OE=function(e,t,i){return vp(e,"h264",t,i)},RE=function(e,t,i){return vp(e,"h265",t,i)},Ge={webm:z([119,101,98,109]),matroska:z([109,97,116,114,111,115,107,97]),flac:z([102,76,97,67]),ogg:z([79,103,103,83]),ac3:z([11,119]),riff:z([82,73,70,70]),avi:z([65,86,73]),wav:z([87,65,86,69]),"3gp":z([102,116,121,112,51,103]),mp4:z([102,116,121,112]),fmp4:z([115,116,121,112]),mov:z([102,116,121,112,113,116]),moov:z([109,111,111,118]),moof:z([109,111,111,102])},ks={aac:function(e){var t=vr(e);return _e(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=vr(e);return _e(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=Gd(e,[Bn.EBML,Bn.DocType])[0];return _e(t,Ge.webm)},mkv:function(e){var t=Gd(e,[Bn.EBML,Bn.DocType])[0];return _e(t,Ge.matroska)},mp4:function(e){if(ks["3gp"](e)||ks.mov(e))return!1;if(_e(e,Ge.mp4,{offset:4})||_e(e,Ge.fmp4,{offset:4})||_e(e,Ge.moof,{offset:4})||_e(e,Ge.moov,{offset:4}))return!0},mov:function(e){return _e(e,Ge.mov,{offset:4})},"3gp":function(e){return _e(e,Ge["3gp"],{offset:4})},ac3:function(e){var t=vr(e);return _e(e,Ge.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return e[0]===71;for(var t=0;t+1880},pl=9e4,ml,gl,ja,yl,Tp,bp,Sp;ml=function(s){return s*pl};gl=function(s,e){return s*e};ja=function(s){return s/pl};yl=function(s,e){return s/e};Tp=function(s,e){return ml(yl(s,e))};bp=function(s,e){return gl(ja(s),e)};Sp=function(s,e,t){return ja(t?s:s-e)};var Mi={ONE_SECOND_IN_TS:pl,secondsToVideoTs:ml,secondsToAudioTs:gl,videoTsToSeconds:ja,audioTsToSeconds:yl,audioTsToVideoTs:Tp,videoTsToAudioTs:bp,metadataTsToSeconds:Sp};/** + * @license + * Video.js 8.11.2 + * Copyright Brightcove, Inc. + * Available under Apache License Version 2.0 + * + * + * Includes vtt.js + * Available under Apache License Version 2.0 + * + */var yu="8.11.2";const Yt={},gi=function(s,e){return Yt[s]=Yt[s]||[],e&&(Yt[s]=Yt[s].concat(e)),Yt[s]},BE=function(s,e){gi(s,e)},xp=function(s,e){const t=gi(s).indexOf(e);return t<=-1?!1:(Yt[s]=Yt[s].slice(),Yt[s].splice(t,1),!0)},UE=function(s,e){gi(s,[].concat(e).map(t=>{const i=(...r)=>(xp(s,i),t(...r));return i}))},ua={prefixed:!0},Xn=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],Wd=Xn[0];let Tr;for(let s=0;s(i,r,n)=>{const a=e.levels[r],o=new RegExp(`^(${a})$`);let l=s;if(i!=="log"&&n.unshift(i.toUpperCase()+":"),t&&(l=`%c${s}`,n.unshift(t)),n.unshift(l+":"),et){et.push([].concat(n));const p=et.length-1e3;et.splice(0,p>0?p:0)}if(!C.console)return;let d=C.console[i];!d&&i==="debug"&&(d=C.console.info||C.console.log),!(!d||!a||!o.test(i))&&d[Array.isArray(n)?"apply":"call"](C.console,n)};function _u(s,e=":",t=""){let i="info",r;const n=function(...a){r("log",i,a)};return r=FE(s,n,t),n.createLogger=(a,o,l)=>{const d=o!==void 0?o:e,p=l!==void 0?l:t,y=`${s} ${d} ${a}`;return _u(y,d,p)},n.createNewLogger=(a,o,l)=>_u(a,o,l),n.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:i},n.level=a=>{if(typeof a=="string"){if(!n.levels.hasOwnProperty(a))throw new Error(`"${a}" in not a valid log level`);i=a}return i},n.history=()=>et?[].concat(et):[],n.history.filter=a=>(et||[]).filter(o=>new RegExp(`.*${a}.*`).test(o[0])),n.history.clear=()=>{et&&(et.length=0)},n.history.disable=()=>{et!==null&&(et.length=0,et=null)},n.history.enable=()=>{et===null&&(et=[])},n.error=(...a)=>r("error",i,a),n.warn=(...a)=>r("warn",i,a),n.debug=(...a)=>r("debug",i,a),n}const ee=_u("VIDEOJS"),Ep=ee.createLogger,$E=Object.prototype.toString,Cp=function(s){return Ut(s)?Object.keys(s):[]};function ps(s,e){Cp(s).forEach(t=>e(s[t],t))}function wp(s,e,t=0){return Cp(s).reduce((i,r)=>e(i,s[r],r),t)}function Ut(s){return!!s&&typeof s=="object"}function Ps(s){return Ut(s)&&$E.call(s)==="[object Object]"&&s.constructor===Object}function ce(...s){const e={};return s.forEach(t=>{t&&ps(t,(i,r)=>{if(!Ps(i)){e[r]=i;return}Ps(e[r])||(e[r]={}),e[r]=ce(e[r],i)})}),e}function Ap(s={}){const e=[];for(const t in s)if(s.hasOwnProperty(t)){const i=s[t];e.push(i)}return e}function qa(s,e,t,i=!0){const r=a=>Object.defineProperty(s,e,{value:a,enumerable:!0,writable:!0}),n={configurable:!0,enumerable:!0,get(){const a=t();return r(a),a}};return i&&(n.set=r),Object.defineProperty(s,e,n)}var jE=Object.freeze({__proto__:null,each:ps,reduce:wp,isObject:Ut,isPlain:Ps,merge:ce,values:Ap,defineLazyProperty:qa});let _l=!1,Dp=null,Ft=!1,kp,Pp=!1,ms=!1,gs=!1,$t=!1,vl=null,Va=null,Ip=null,la=!1,Ha=!1,ca=!1,za=!1,vu=!1,Tu=!1;const $r=!!(Us()&&("ontouchstart"in C||C.navigator.maxTouchPoints||C.DocumentTouch&&C.document instanceof C.DocumentTouch)),ci=C.navigator&&C.navigator.userAgentData;ci&&ci.platform&&ci.brands&&(Ft=ci.platform==="Android",ms=!!ci.brands.find(s=>s.brand==="Microsoft Edge"),gs=!!ci.brands.find(s=>s.brand==="Chromium"),$t=!ms&&gs,vl=Va=(ci.brands.find(s=>s.brand==="Chromium")||{}).version||null,Ha=ci.platform==="Windows");if(!gs){const s=C.navigator&&C.navigator.userAgent||"";_l=/iPod/i.test(s),Dp=function(){const e=s.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null}(),Ft=/Android/i.test(s),kp=function(){const e=s.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+"."+e[2]):t||null}(),Pp=/Firefox/i.test(s),ms=/Edg/i.test(s),gs=/Chrome/i.test(s)||/CriOS/i.test(s),$t=!ms&&gs,vl=Va=function(){const e=s.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),Ip=function(){const e=/MSIE\s(\d+)\.\d/.exec(s);let t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(s)&&/rv:11.0/.test(s)&&(t=11),t}(),vu=/Tizen/i.test(s),Tu=/Web0S/i.test(s),la=/Safari/i.test(s)&&!$t&&!Ft&&!ms&&!vu&&!Tu,Ha=/Windows/i.test(s),ca=/iPad/i.test(s)||la&&$r&&!/iPhone/i.test(s),za=/iPhone/i.test(s)&&!ca}const Qe=za||ca||_l,Ga=(la||Qe)&&!$t;var qE=Object.freeze({__proto__:null,get IS_IPOD(){return _l},get IOS_VERSION(){return Dp},get IS_ANDROID(){return Ft},get ANDROID_VERSION(){return kp},get IS_FIREFOX(){return Pp},get IS_EDGE(){return ms},get IS_CHROMIUM(){return gs},get IS_CHROME(){return $t},get CHROMIUM_VERSION(){return vl},get CHROME_VERSION(){return Va},get IE_VERSION(){return Ip},get IS_SAFARI(){return la},get IS_WINDOWS(){return Ha},get IS_IPAD(){return ca},get IS_IPHONE(){return za},get IS_TIZEN(){return vu},get IS_WEBOS(){return Tu},TOUCH_ENABLED:$r,IS_IOS:Qe,IS_ANY_SAFARI:Ga});function Kd(s){return typeof s=="string"&&!!s.trim()}function VE(s){if(s.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function Us(){return $===C.document}function Fs(s){return Ut(s)&&s.nodeType===1}function Lp(){try{return C.parent!==C.self}catch{return!0}}function Op(s){return function(e,t){if(!Kd(e))return $[s](null);Kd(t)&&(t=$.querySelector(t));const i=Fs(t)?t:$;return i[s]&&i[s](e)}}function Q(s="div",e={},t={},i){const r=$.createElement(s);return Object.getOwnPropertyNames(e).forEach(function(n){const a=e[n];n==="textContent"?vi(r,a):(r[n]!==a||n==="tabIndex")&&(r[n]=a)}),Object.getOwnPropertyNames(t).forEach(function(n){r.setAttribute(n,t[n])}),i&&Tl(r,i),r}function vi(s,e){return typeof s.textContent>"u"?s.innerText=e:s.textContent=e,s}function bu(s,e){e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}function wr(s,e){return VE(e),s.classList.contains(e)}function ji(s,...e){return s.classList.add(...e.reduce((t,i)=>t.concat(i.split(/\s+/)),[])),s}function Wa(s,...e){return s?(s.classList.remove(...e.reduce((t,i)=>t.concat(i.split(/\s+/)),[])),s):(ee.warn("removeClass was called with an element that doesn't exist"),null)}function Rp(s,e,t){return typeof t=="function"&&(t=t(s,e)),typeof t!="boolean"&&(t=void 0),e.split(/\s+/).forEach(i=>s.classList.toggle(i,t)),s}function Mp(s,e){Object.getOwnPropertyNames(e).forEach(function(t){const i=e[t];i===null||typeof i>"u"||i===!1?s.removeAttribute(t):s.setAttribute(t,i===!0?"":i)})}function di(s){const e={},t=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(s&&s.attributes&&s.attributes.length>0){const i=s.attributes;for(let r=i.length-1;r>=0;r--){const n=i[r].name;let a=i[r].value;t.includes(n)&&(a=a!==null),e[n]=a}}return e}function Np(s,e){return s.getAttribute(e)}function Is(s,e,t){s.setAttribute(e,t)}function Ka(s,e){s.removeAttribute(e)}function Bp(){$.body.focus(),$.onselectstart=function(){return!1}}function Up(){$.onselectstart=function(){return!0}}function Ls(s){if(s&&s.getBoundingClientRect&&s.parentNode){const e=s.getBoundingClientRect(),t={};return["bottom","height","left","right","top","width"].forEach(i=>{e[i]!==void 0&&(t[i]=e[i])}),t.height||(t.height=parseFloat(Os(s,"height"))),t.width||(t.width=parseFloat(Os(s,"width"))),t}}function jr(s){if(!s||s&&!s.offsetParent)return{left:0,top:0,width:0,height:0};const e=s.offsetWidth,t=s.offsetHeight;let i=0,r=0;for(;s.offsetParent&&s!==$[ua.fullscreenElement];)i+=s.offsetLeft,r+=s.offsetTop,s=s.offsetParent;return{left:i,top:r,width:e,height:t}}function Xa(s,e){const t={x:0,y:0};if(Qe){let p=s;for(;p&&p.nodeName.toLowerCase()!=="html";){const y=Os(p,"transform");if(/^matrix/.test(y)){const _=y.slice(7,-1).split(/,\s/).map(Number);t.x+=_[4],t.y+=_[5]}else if(/^matrix3d/.test(y)){const _=y.slice(9,-1).split(/,\s/).map(Number);t.x+=_[12],t.y+=_[13]}p=p.parentNode}}const i={},r=jr(e.target),n=jr(s),a=n.width,o=n.height;let l=e.offsetY-(n.top-r.top),d=e.offsetX-(n.left-r.left);return e.changedTouches&&(d=e.changedTouches[0].pageX-n.left,l=e.changedTouches[0].pageY+n.top,Qe&&(d-=t.x,l-=t.y)),i.y=1-Math.max(0,Math.min(1,l/o)),i.x=Math.max(0,Math.min(1,d/a)),i}function Fp(s){return Ut(s)&&s.nodeType===3}function Ya(s){for(;s.firstChild;)s.removeChild(s.firstChild);return s}function $p(s){return typeof s=="function"&&(s=s()),(Array.isArray(s)?s:[s]).map(e=>{if(typeof e=="function"&&(e=e()),Fs(e)||Fp(e))return e;if(typeof e=="string"&&/\S/.test(e))return $.createTextNode(e)}).filter(e=>e)}function Tl(s,e){return $p(e).forEach(t=>s.appendChild(t)),s}function jp(s,e){return Tl(Ya(s),e)}function qr(s){return s.button===void 0&&s.buttons===void 0||s.button===0&&s.buttons===void 0||s.type==="mouseup"&&s.button===0&&s.buttons===0?!0:!(s.button!==0||s.buttons!==1)}const yi=Op("querySelector"),qp=Op("querySelectorAll");function Os(s,e){if(!s||!e)return"";if(typeof C.getComputedStyle=="function"){let t;try{t=C.getComputedStyle(s)}catch{return""}return t?t.getPropertyValue(e)||t[e]:""}return""}function Vp(s){[...$.styleSheets].forEach(e=>{try{const t=[...e.cssRules].map(r=>r.cssText).join(""),i=$.createElement("style");i.textContent=t,s.document.head.appendChild(i)}catch{const i=$.createElement("link");i.rel="stylesheet",i.type=e.type,i.media=e.media.mediaText,i.href=e.href,s.document.head.appendChild(i)}})}var Hp=Object.freeze({__proto__:null,isReal:Us,isEl:Fs,isInFrame:Lp,createEl:Q,textContent:vi,prependTo:bu,hasClass:wr,addClass:ji,removeClass:Wa,toggleClass:Rp,setAttributes:Mp,getAttributes:di,getAttribute:Np,setAttribute:Is,removeAttribute:Ka,blockTextSelection:Bp,unblockTextSelection:Up,getBoundingClientRect:Ls,findPosition:jr,getPointerPosition:Xa,isTextNode:Fp,emptyEl:Ya,normalizeContent:$p,appendContent:Tl,insertContent:jp,isSingleLeftClick:qr,$:yi,$$:qp,computedStyle:Os,copyStyleSheetsToWindow:Vp});let zp=!1,Su;const HE=function(){if(Su.options.autoSetup===!1)return;const s=Array.prototype.slice.call($.getElementsByTagName("video")),e=Array.prototype.slice.call($.getElementsByTagName("audio")),t=Array.prototype.slice.call($.getElementsByTagName("video-js")),i=s.concat(e,t);if(i&&i.length>0)for(let r=0,n=i.length;r-1&&(r={passive:!0}),s.addEventListener(e,i.dispatcher,r)}else s.attachEvent&&s.attachEvent("on"+e,i.dispatcher)}function Ve(s,e,t){if(!Xe.has(s))return;const i=Xe.get(s);if(!i.handlers)return;if(Array.isArray(e))return bl(Ve,s,e,t);const r=function(a,o){i.handlers[o]=[],Xd(a,o)};if(e===void 0){for(const a in i.handlers)Object.prototype.hasOwnProperty.call(i.handlers||{},a)&&r(s,a);return}const n=i.handlers[e];if(n){if(!t){r(s,e);return}if(t.guid)for(let a=0;a=e&&(s(...r),t=n)}},Kp=function(s,e,t,i=C){let r;const n=()=>{i.clearTimeout(r),r=null},a=function(){const o=this,l=arguments;let d=function(){r=null,d=null,t||s.apply(o,l)};!r&&t&&s.apply(o,l),i.clearTimeout(r),r=i.setTimeout(d,e)};return a.cancel=n,a};var YE=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:vt,bind_:de,throttle:jt,debounce:Kp});let lr;class Tt{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},ht(this,e,t),this.addEventListener=i}off(e,t){Ve(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Ja(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},Sl(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;typeof e=="string"&&(e={type:t}),e=Qa(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),$s(this,e)}queueTrigger(e){lr||(lr=new Map);const t=e.type||e;let i=lr.get(this);i||(i=new Map,lr.set(this,i));const r=i.get(t);i.delete(t),C.clearTimeout(r);const n=C.setTimeout(()=>{i.delete(t),i.size===0&&(i=null,lr.delete(this)),this.trigger(e)},0);i.set(t,n)}}Tt.prototype.allowedEvents_={};Tt.prototype.addEventListener=Tt.prototype.on;Tt.prototype.removeEventListener=Tt.prototype.off;Tt.prototype.dispatchEvent=Tt.prototype.trigger;const Za=s=>typeof s.name=="function"?s.name():typeof s.name=="string"?s.name:s.name_?s.name_:s.constructor&&s.constructor.name?s.constructor.name:typeof s,Zt=s=>s instanceof Tt||!!s.eventBusEl_&&["on","one","off","trigger"].every(e=>typeof s[e]=="function"),QE=(s,e)=>{Zt(s)?e():(s.eventedCallbacks||(s.eventedCallbacks=[]),s.eventedCallbacks.push(e))},Cu=s=>typeof s=="string"&&/\S/.test(s)||Array.isArray(s)&&!!s.length,da=(s,e,t)=>{if(!s||!s.nodeName&&!Zt(s))throw new Error(`Invalid target for ${Za(e)}#${t}; must be a DOM node or evented object.`)},Xp=(s,e,t)=>{if(!Cu(s))throw new Error(`Invalid event type for ${Za(e)}#${t}; must be a non-empty string or array.`)},Yp=(s,e,t)=>{if(typeof s!="function")throw new Error(`Invalid listener for ${Za(e)}#${t}; must be a function.`)},zo=(s,e,t)=>{const i=e.length<3||e[0]===s||e[0]===s.eventBusEl_;let r,n,a;return i?(r=s.eventBusEl_,e.length>=3&&e.shift(),[n,a]=e):[r,n,a]=e,da(r,s,t),Xp(n,s,t),Yp(a,s,t),a=de(s,a),{isTargetingSelf:i,target:r,type:n,listener:a}},Pi=(s,e,t,i)=>{da(s,s,e),s.nodeName?XE[e](s,t,i):s[e](t,i)},JE={on(...s){const{isTargetingSelf:e,target:t,type:i,listener:r}=zo(this,s,"on");if(Pi(t,"on",i,r),!e){const n=()=>this.off(t,i,r);n.guid=r.guid;const a=()=>this.off("dispose",n);a.guid=r.guid,Pi(this,"on","dispose",n),Pi(t,"on","dispose",a)}},one(...s){const{isTargetingSelf:e,target:t,type:i,listener:r}=zo(this,s,"one");if(e)Pi(t,"one",i,r);else{const n=(...a)=>{this.off(t,i,n),r.apply(null,a)};n.guid=r.guid,Pi(t,"one",i,n)}},any(...s){const{isTargetingSelf:e,target:t,type:i,listener:r}=zo(this,s,"any");if(e)Pi(t,"any",i,r);else{const n=(...a)=>{this.off(t,i,n),r.apply(null,a)};n.guid=r.guid,Pi(t,"any",i,n)}},off(s,e,t){if(!s||Cu(s))Ve(this.eventBusEl_,s,e);else{const i=s,r=e;da(i,this,"off"),Xp(r,this,"off"),Yp(t,this,"off"),t=de(this,t),this.off("dispose",t),i.nodeName?(Ve(i,r,t),Ve(i,"dispose",t)):Zt(i)&&(i.off(r,t),i.off("dispose",t))}},trigger(s,e){da(this.eventBusEl_,this,"trigger");const t=s&&typeof s!="string"?s.type:s;if(!Cu(t))throw new Error(`Invalid event type for ${Za(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return $s(this.eventBusEl_,s,e)}};function xl(s,e={}){const{eventBusKey:t}=e;if(t){if(!s[t].nodeName)throw new Error(`The eventBusKey "${t}" does not refer to an element.`);s.eventBusEl_=s[t]}else s.eventBusEl_=Q("span",{className:"vjs-event-bus"});return Object.assign(s,JE),s.eventedCallbacks&&s.eventedCallbacks.forEach(i=>{i()}),s.on("dispose",()=>{s.off(),[s,s.el_,s.eventBusEl_].forEach(function(i){i&&Xe.has(i)&&Xe.delete(i)}),C.setTimeout(()=>{s.eventBusEl_=null},0)}),s}const ZE={state:{},setState(s){typeof s=="function"&&(s=s());let e;return ps(s,(t,i)=>{this.state[i]!==t&&(e=e||{},e[i]={from:this.state[i],to:t}),this.state[i]=t}),e&&Zt(this)&&this.trigger({changes:e,type:"statechanged"}),e}};function Qp(s,e){return Object.assign(s,ZE),s.state=Object.assign({},s.state,e),typeof s.handleStateChanged=="function"&&Zt(s)&&s.on("statechanged",s.handleStateChanged),s}const Ar=function(s){return typeof s!="string"?s:s.replace(/./,e=>e.toLowerCase())},xe=function(s){return typeof s!="string"?s:s.replace(/./,e=>e.toUpperCase())},Jp=function(s,e){return xe(s)===xe(e)};var eC=Object.freeze({__proto__:null,toLowerCase:Ar,toTitleCase:xe,titleCaseEquals:Jp});class N{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=ce({},this.options_),t=this.options_=ce(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const r=e&&e.id&&e.id()||"no_player";this.id_=`${r}_component_${At()}`}this.name_=t.name||null,t.el?this.el_=t.el:t.createEl!==!1&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(" ").forEach(r=>this.addClass(r)),["on","off","one","any","trigger"].forEach(r=>{this[r]=void 0}),t.evented!==!1&&(xl(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Qp(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,t.initChildren!==!1&&this.initChildren(),this.ready(i),t.reportTouchActivity!==!1&&this.enableTouchActivity()}on(e,t){}off(e,t){}one(e,t){}any(e,t){}trigger(e,t){}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let t=this.children_.length-1;t>=0;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return!!this.isDisposed_}player(){return this.player_}options(e){return e?(this.options_=ce(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Q(e,t,i)}localize(e,t,i=e){const r=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),a=n&&n[r],o=r&&r.split("-")[0],l=n&&n[o];let d=i;return a&&a[e]?d=a[e]:l&&l[e]&&(d=l[e]),t&&(d=d.replace(/\{(\d+)\}/g,function(p,y){const _=t[y-1];let b=_;return typeof _>"u"&&(b=p),b})),d}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((i,r)=>i.concat(r),[]);let t=this;for(let i=0;i=0;r--)if(this.children_[r]===e){t=!0,this.children_.splice(r,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[xe(e.name())]=null,this.childNameIndex_[Ar(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=a=>{const o=a.name;let l=a.opts;if(t[o]!==void 0&&(l=t[o]),l===!1)return;l===!0&&(l={}),l.playerOptions=this.options_.playerOptions;const d=this.addChild(o,l);d&&(this[o]=d)};let r;const n=N.getComponent("Tech");Array.isArray(e)?r=e:r=Object.keys(e),r.concat(Object.keys(this.options_).filter(function(a){return!r.some(function(o){return typeof o=="string"?a===o:a===o.name})})).map(a=>{let o,l;return typeof a=="string"?(o=a,l=e[o]||this.options_[o]||{}):(o=a.name,l=a),{name:o,opts:l}}).filter(a=>{const o=N.getComponent(a.opts.componentClass||xe(a.name));return o&&!n.isTech(o)}).forEach(i)}}buildCSSClass(){return""}ready(e,t=!1){if(e){if(!this.isReady_){this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(e);return}t?e.call(this):this.setTimeout(e,1)}}triggerReady(){this.isReady_=!0,this.setTimeout(function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(t){t.call(this)},this),this.trigger("ready")},1)}$(e,t){return yi(e,t||this.contentEl())}$$(e,t){return qp(e,t||this.contentEl())}hasClass(e){return wr(this.el_,e)}addClass(...e){ji(this.el_,...e)}removeClass(...e){Wa(this.el_,...e)}toggleClass(e,t){Rp(this.el_,e,t)}show(){this.removeClass("vjs-hidden")}hide(){this.addClass("vjs-hidden")}lockShowing(){this.addClass("vjs-lock-showing")}unlockShowing(){this.removeClass("vjs-lock-showing")}getAttribute(e){return Np(this.el_,e)}setAttribute(e,t){Is(this.el_,e,t)}removeAttribute(e){Ka(this.el_,e)}width(e,t){return this.dimension("width",e,t)}height(e,t){return this.dimension("height",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(t!==void 0){(t===null||t!==t)&&(t=0),(""+t).indexOf("%")!==-1||(""+t).indexOf("px")!==-1?this.el_.style[e]=t:t==="auto"?this.el_.style[e]="":this.el_.style[e]=t+"px",i||this.trigger("componentresize");return}if(!this.el_)return 0;const r=this.el_.style[e],n=r.indexOf("px");return parseInt(n!==-1?r.slice(0,n):this.el_["offset"+xe(e)],10)}currentDimension(e){let t=0;if(e!=="width"&&e!=="height")throw new Error("currentDimension only accepts width or height value");if(t=Os(this.el_,e),t=parseFloat(t),t===0||isNaN(t)){const i=`offset${xe(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}currentWidth(){return this.currentDimension("width")}currentHeight(){return this.currentDimension("height")}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(X.isEventKey(e,"Tab")||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;const i=10,r=200;let n;this.on("touchstart",function(o){o.touches.length===1&&(t={pageX:o.touches[0].pageX,pageY:o.touches[0].pageY},e=C.performance.now(),n=!0)}),this.on("touchmove",function(o){if(o.touches.length>1)n=!1;else if(t){const l=o.touches[0].pageX-t.pageX,d=o.touches[0].pageY-t.pageY;Math.sqrt(l*l+d*d)>i&&(n=!1)}});const a=function(){n=!1};this.on("touchleave",a),this.on("touchcancel",a),this.on("touchend",function(o){t=null,n===!0&&C.performance.now()-e{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()},t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),C.clearTimeout(e)),e}setInterval(e,t){e=de(this,e),this.clearTimersOnDispose_();const i=C.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),C.clearInterval(e)),e}requestAnimationFrame(e){this.clearTimersOnDispose_();var t;return e=de(this,e),t=C.requestAnimationFrame(()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()}),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){if(this.namedRafs_.has(e))return;this.clearTimersOnDispose_(),t=de(this,t);const i=this.requestAnimationFrame(()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),C.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(([e,t])=>{this[e].forEach((i,r)=>this[t](r))}),this.clearingTimersOnDispose_=!1}))}static registerComponent(e,t){if(typeof e!="string"||!e)throw new Error(`Illegal component name, "${e}"; must be a non-empty string.`);const i=N.getComponent("Tech"),r=i&&i.isTech(t),n=N===t||N.prototype.isPrototypeOf(t.prototype);if(r||!n){let o;throw r?o="techs must be registered using Tech.registerTech()":o="must be a Component subclass",new Error(`Illegal component, "${e}"; ${o}.`)}e=xe(e),N.components_||(N.components_={});const a=N.getComponent("Player");if(e==="Player"&&a&&a.players){const o=a.players,l=Object.keys(o);if(o&&l.length>0&&l.map(d=>o[d]).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return N.components_[e]=t,N.components_[Ar(e)]=t,t}static getComponent(e){if(!(!e||!N.components_))return N.components_[e]}}N.registerComponent("Component",N);function tC(s,e,t){if(typeof e!="number"||e<0||e>t)throw new Error(`Failed to execute '${s}' on 'TimeRanges': The index provided (${e}) is non-numeric or out of bounds (0-${t}).`)}function Yd(s,e,t,i){return tC(s,i,t.length-1),t[i][e]}function Go(s){let e;return s===void 0||s.length===0?e={length:0,start(){throw new Error("This TimeRanges object is empty")},end(){throw new Error("This TimeRanges object is empty")}}:e={length:s.length,start:Yd.bind(null,"start",0,s),end:Yd.bind(null,"end",1,s)},C.Symbol&&C.Symbol.iterator&&(e[C.Symbol.iterator]=()=>(s||[]).values()),e}function wt(s,e){return Array.isArray(s)?Go(s):s===void 0||e===void 0?Go():Go([[s,e]])}const Zp=function(s,e){s=s<0?0:s;let t=Math.floor(s%60),i=Math.floor(s/60%60),r=Math.floor(s/3600);const n=Math.floor(e/60%60),a=Math.floor(e/3600);return(isNaN(s)||s===1/0)&&(r=i=t="-"),r=r>0||a>0?r+":":"",i=((r||n>=10)&&i<10?"0"+i:i)+":",t=t<10?"0"+t:t,r+i+t};let El=Zp;function em(s){El=s}function tm(){El=Zp}function Wi(s,e=s){return El(s,e)}var iC=Object.freeze({__proto__:null,createTimeRanges:wt,createTimeRange:wt,setFormatTime:em,resetFormatTime:tm,formatTime:Wi});function im(s,e){let t=0,i,r;if(!e)return 0;(!s||!s.length)&&(s=wt(0,0));for(let n=0;ne&&(r=e),t+=r-i;return t/e}function be(s){if(s instanceof be)return s;typeof s=="number"?this.code=s:typeof s=="string"?this.message=s:Ut(s)&&(typeof s.code=="number"&&(this.code=s.code),Object.assign(this,s)),this.message||(this.message=be.defaultMessages[this.code]||"")}be.prototype.code=0;be.prototype.message="";be.prototype.status=null;be.prototype.metadata=null;be.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];be.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};be.MEDIA_ERR_CUSTOM=0;be.prototype.MEDIA_ERR_CUSTOM=0;be.MEDIA_ERR_ABORTED=1;be.prototype.MEDIA_ERR_ABORTED=1;be.MEDIA_ERR_NETWORK=2;be.prototype.MEDIA_ERR_NETWORK=2;be.MEDIA_ERR_DECODE=3;be.prototype.MEDIA_ERR_DECODE=3;be.MEDIA_ERR_SRC_NOT_SUPPORTED=4;be.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4;be.MEDIA_ERR_ENCRYPTED=5;be.prototype.MEDIA_ERR_ENCRYPTED=5;function Dr(s){return s!=null&&typeof s.then=="function"}function Lt(s){Dr(s)&&s.then(null,e=>{})}const wu=function(s){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((t,i,r)=>(s[i]&&(t[i]=s[i]),t),{cues:s.cues&&Array.prototype.map.call(s.cues,function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}})})},sC=function(s){const e=s.$$("track"),t=Array.prototype.map.call(e,r=>r.track);return Array.prototype.map.call(e,function(r){const n=wu(r.track);return r.src&&(n.src=r.src),n}).concat(Array.prototype.filter.call(s.textTracks(),function(r){return t.indexOf(r)===-1}).map(wu))},rC=function(s,e){return s.forEach(function(t){const i=e.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach(r=>i.addCue(r))}),e.textTracks()};var Qd={textTracksToJson:sC,jsonToTextTracks:rC,trackToJson_:wu};const Wo="vjs-modal-dialog";class js extends N{constructor(e,t){super(e,t),this.handleKeyDown_=i=>this.handleKeyDown(i),this.close_=i=>this.close(i),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Q("div",{className:`${Wo}-content`},{role:"document"}),this.descEl_=Q("p",{className:`${Wo}-description vjs-control-text`,id:this.el().getAttribute("aria-describedby")}),vi(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":`${this.id()}_description`,"aria-hidden":"true","aria-label":this.label(),role:"dialog","aria-live":"polite"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Wo} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||"Modal Window")}description(){let e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e}open(){if(this.opened_){this.options_.fillAlways&&this.fill();return}const e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}opened(e){return typeof e=="boolean"&&this[e?"open":"close"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(typeof e=="boolean"){const t=this.closeable_=!!e;let i=this.getChild("closeButton");if(t&&!i){const r=this.contentEl_;this.contentEl_=this.el_,i=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,this.on(i,"close",this.close_)}!t&&i&&(this.off(i,"close",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,r=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),jp(t,e),this.trigger("modalfill"),r?i.insertBefore(t,r):i.appendChild(t);const n=this.getChild("closeButton");n&&i.appendChild(n.el_)}empty(){this.trigger("beforemodalempty"),Ya(this.contentEl()),this.trigger("modalempty")}content(e){return typeof e<"u"&&(this.content_=e),this.content_}conditionalFocus_(){const e=$.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(e.stopPropagation(),X.isEventKey(e,"Escape")&&this.closeable()){e.preventDefault(),this.close();return}if(!X.isEventKey(e,"Tab"))return;const t=this.focusableEls_(),i=this.el_.querySelector(":focus");let r;for(let n=0;n(t instanceof C.HTMLAnchorElement||t instanceof C.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof C.HTMLInputElement||t instanceof C.HTMLSelectElement||t instanceof C.HTMLTextAreaElement||t instanceof C.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof C.HTMLIFrameElement||t instanceof C.HTMLObjectElement||t instanceof C.HTMLEmbedElement||t.hasAttribute("tabindex")&&t.getAttribute("tabindex")!==-1||t.hasAttribute("contenteditable"))}}js.prototype.options_={pauseOnOpen:!0,temporary:!0};N.registerComponent("ModalDialog",js);class Rs extends Tt{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,"length",{get(){return this.tracks_.length}});for(let t=0;t{this.trigger({track:e,type:"labelchange",target:this})},Zt(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let t;for(let i=0,r=this.length;i=0;t--)if(e[t].enabled){Ko(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Ko(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Ko(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}}const Xo=function(s,e){for(let t=0;t=0;t--)if(e[t].selected){Xo(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let t=0;t{this.changing_||(this.changing_=!0,Xo(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)}}class sm extends Rs{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),e.addEventListener("modechange",this.queueChange_),["metadata","chapters"].indexOf(e.kind)===-1&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))}}class oC{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t0&&(C.console&&C.console.groupCollapsed&&C.console.groupCollapsed(`Text Track parsing errors for ${e.src}`),i.forEach(r=>ee.error(r)),C.console&&C.console.groupEnd&&C.console.groupEnd()),t.flush()},eh=function(s,e){const t={uri:s},i=eo(s);i&&(t.cors=i);const r=e.tech_.crossOrigin()==="use-credentials";r&&(t.withCredentials=r),Af(t,de(this,function(n,a,o){if(n)return ee.error(n,a);e.loaded_=!0,typeof C.WebVTT!="function"?e.tech_&&e.tech_.any(["vttjsloaded","vttjserror"],l=>{if(l.type==="vttjserror"){ee.error(`vttjs failed to load, stopping trying to process ${e.src}`);return}return Zd(o,e)}):Zd(o,e)}))};class sn extends Cl{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const t=ce(e,{kind:cC[e.kind]||"subtitles",language:e.language||e.srclang||""});let i=Jd[t.mode]||"disabled";const r=t.default;(t.kind==="metadata"||t.kind==="chapters")&&(i="hidden"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=this.tech_.preloadTextTracks!==!1;const n=new ha(this.cues_),a=new ha(this.activeCues_);let o=!1;this.timeupdateHandler=de(this,function(d={}){if(!this.tech_.isDisposed()){if(!this.tech_.isReady_){d.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,o&&(this.trigger("cuechange"),o=!1),d.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}});const l=()=>{this.stopTracking()};this.tech_.one("dispose",l),i!=="disabled"&&this.startTracking(),Object.defineProperties(this,{default:{get(){return r},set(){}},mode:{get(){return i},set(d){Jd[d]&&i!==d&&(i=d,!this.preload_&&i!=="disabled"&&this.cues.length===0&&eh(this.src,this),this.stopTracking(),i!=="disabled"&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?n:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(this.cues.length===0)return a;const d=this.tech_.currentTime(),p=[];for(let y=0,_=this.cues.length;y<_;y++){const b=this.cues[y];b.startTime<=d&&b.endTime>=d&&p.push(b)}if(o=!1,p.length!==this.activeCues_.length)o=!0;else for(let y=0;y{t=si.LOADED,this.trigger({type:"load",target:this})})}}si.prototype.allowedEvents_={load:"load"};si.NONE=0;si.LOADING=1;si.LOADED=2;si.ERROR=3;const _t={audio:{ListClass:nC,TrackClass:nm,capitalName:"Audio"},video:{ListClass:aC,TrackClass:am,capitalName:"Video"},text:{ListClass:sm,TrackClass:sn,capitalName:"Text"}};Object.keys(_t).forEach(function(s){_t[s].getterName=`${s}Tracks`,_t[s].privateName=`${s}Tracks_`});const Ms={remoteText:{ListClass:sm,TrackClass:sn,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:oC,TrackClass:si,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},We=Object.assign({},_t,Ms);Ms.names=Object.keys(Ms);_t.names=Object.keys(_t);We.names=[].concat(Ms.names).concat(_t.names);function hC(s,e,t,i,r={}){const n=s.textTracks();r.kind=e,t&&(r.label=t),i&&(r.language=i),r.tech=s;const a=new We.text.TrackClass(r);return n.addTrack(a),a}class Y extends N{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=i=>this.onDurationChange(i),this.trackProgress_=i=>this.trackProgress(i),this.trackCurrentTime_=i=>this.trackCurrentTime(i),this.stopTrackingCurrentTime_=i=>this.stopTrackingCurrentTime(i),this.disposeSourceHandler_=i=>this.disposeSourceHandler(i),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",function(){this.hasStarted_=!0}),this.on("loadstart",function(){this.hasStarted_=!1}),We.names.forEach(i=>{const r=We[i];e&&e[r.getterName]&&(this[r.privateName]=e[r.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(i=>{e[`native${i}Tracks`]===!1&&(this[`featuresNative${i}Tracks`]=!1)}),e.nativeCaptions===!1||e.nativeTextTracks===!1?this.featuresNativeTextTracks=!1:(e.nativeCaptions===!0||e.nativeTextTracks===!0)&&(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=e.preloadTextTracks!==!1,this.autoRemoteTextTracks_=new We.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(de(this,function(){const t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),this.bufferedPercent_=t,t===1&&this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return wt(0,0)}bufferedPercent(){return im(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(_t.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){e=[].concat(e),e.forEach(t=>{const i=this[`${t}Tracks`]()||[];let r=i.length;for(;r--;){const n=i[r];t==="text"&&this.removeRemoteTextTrack(n),i.removeTrack(n)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return e!==void 0&&(this.error_=new be(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?wt(0,0):wt()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){_t.names.forEach(e=>{const t=_t[e],i=()=>{this.trigger(`${e}trackchange`)},r=this[t.getterName]();r.addEventListener("removetrack",i),r.addEventListener("addtrack",i),this.on("dispose",()=>{r.removeEventListener("removetrack",i),r.removeEventListener("addtrack",i)})})}addWebVttScript_(){if(!C.WebVTT)if($.body.contains(this.el())){if(!this.options_["vtt.js"]&&Ps(yd)&&Object.keys(yd).length>0){this.trigger("vttjsloaded");return}const e=$.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=()=>{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",()=>{e.onload=null,e.onerror=null}),C.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=o=>e.addTrack(o.track),r=o=>e.removeTrack(o.track);t.on("addtrack",i),t.on("removetrack",r),this.addWebVttScript_();const n=()=>this.trigger("texttrackchange"),a=()=>{n();for(let o=0;othis.autoRemoteTextTracks_.addTrack(i.track)),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=At();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one("playing",()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())})):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return""}static canPlayType(e){return""}static canPlaySource(e,t){return Y.canPlayType(e.type)}static isTech(e){return e.prototype instanceof Y||e instanceof Y||e===Y}static registerTech(e,t){if(Y.techs_||(Y.techs_={}),!Y.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!Y.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!Y.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=xe(e),Y.techs_[e]=t,Y.techs_[Ar(e)]=t,e!=="Tech"&&Y.defaultTechOrder_.push(e),t}static getTech(e){if(e){if(Y.techs_&&Y.techs_[e])return Y.techs_[e];if(e=xe(e),C&&C.videojs&&C.videojs[e])return ee.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),C.videojs[e]}}}We.names.forEach(function(s){const e=We[s];Y.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}});Y.prototype.featuresVolumeControl=!0;Y.prototype.featuresMuteControl=!0;Y.prototype.featuresFullscreenResize=!1;Y.prototype.featuresPlaybackRate=!1;Y.prototype.featuresProgressEvents=!1;Y.prototype.featuresSourceset=!1;Y.prototype.featuresTimeupdateEvents=!1;Y.prototype.featuresNativeTextTracks=!1;Y.prototype.featuresVideoFrameCallback=!1;Y.withSourceHandlers=function(s){s.registerSourceHandler=function(t,i){let r=s.sourceHandlers;r||(r=s.sourceHandlers=[]),i===void 0&&(i=r.length),r.splice(i,0,t)},s.canPlayType=function(t){const i=s.sourceHandlers||[];let r;for(let n=0;nIi(e,qi[e.type],t,s),1)}function mC(s,e){s.forEach(t=>t.setTech&&t.setTech(e))}function gC(s,e,t){return s.reduceRight(Dl(t),e[t]())}function yC(s,e,t,i){return e[t](s.reduce(Dl(t),i))}function th(s,e,t,i=null){const r="call"+xe(t),n=s.reduce(Dl(r),i),a=n===fa,o=a?null:e[t](n);return TC(s,t,o,a),o}const _C={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},vC={setCurrentTime:1,setMuted:1,setVolume:1},ih={play:1,pause:1};function Dl(s){return(e,t)=>e===fa?fa:t[s]?t[s](e):e}function TC(s,e,t,i){for(let r=s.length-1;r>=0;r--){const n=s[r];n[e]&&n[e](i,t)}}function bC(s){Au[s.id()]=null}function SC(s,e){const t=Au[s.id()];let i=null;if(t==null)return i=e(s),Au[s.id()]=[[e,i]],i;for(let r=0;r{if(!e)return"";if(s.cache_.source.src===e&&s.cache_.source.type)return s.cache_.source.type;const t=s.cache_.sources.filter(r=>r.src===e);if(t.length)return t[0].type;const i=s.$$("source");for(let r=0;r + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +`;class wC extends N{constructor(e,t,i){const r=ce({createEl:!1},t);if(super(e,r,i),!t.playerOptions.sources||t.playerOptions.sources.length===0)for(let n=0,a=t.playerOptions.techOrder;nthis.handleMouseOver(i),this.handleMouseOut_=i=>this.handleMouseOut(i),this.handleClick_=i=>this.handleClick(i),this.handleKeyDown_=i=>this.handleKeyDown(i),this.emitTapEvents(),this.enable()}createEl(e="div",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),e==="button"&&ee.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:"button"},i),this.tabIndex_=t.tabIndex;const r=Q(e,t,i);return this.player_.options_.experimentalSvgIcons||r.appendChild(Q("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(r),r}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Q("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(e===void 0)return this.controlText_||"Need Text";const i=this.localize(e);this.controlText_=e,vi(this.controlTextEl_,i),!this.nonIconControl&&!this.player_.options_.noUITitleAttributes&&t.setAttribute("title",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),typeof this.tabIndex_<"u"&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),typeof this.tabIndex_<"u"&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){X.isEventKey(e,"Space")||X.isEventKey(e,"Enter")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}N.registerComponent("ClickableComponent",to);class Du extends to{constructor(e,t){super(e,t),this.update(),this.update_=i=>this.update(i),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return Q("div",{className:"vjs-poster"})}crossOrigin(e){if(typeof e>"u")return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){this.player_.log.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`);return}this.$("img")&&(this.$("img").crossOrigin=e)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){if(!e){this.el_.textContent="";return}this.$("img")||this.el_.appendChild(Q("picture",{className:"vjs-poster",tabIndex:-1},{},Q("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=e}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Lt(this.player_.play()):this.player_.pause())}}Du.prototype.crossorigin=Du.prototype.crossOrigin;N.registerComponent("PosterImage",Du);const mt="#222",rh="#ccc",AC={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Yo(s,e){let t;if(s.length===4)t=s[1]+s[1]+s[2]+s[2]+s[3]+s[3];else if(s.length===7)t=s.slice(1);else throw new Error("Invalid color code provided, "+s+"; must be formatted as e.g. #f0e or #f604e2.");return"rgba("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+","+e+")"}function cr(s,e,t){try{s.style[e]=t}catch{return}}function nh(s){return s?`${s}px`:""}class DC extends N{constructor(e,t,i){super(e,t,i);const r=a=>this.updateDisplay(a),n=a=>{this.updateDisplayOverlay(),this.updateDisplay(a)};e.on("loadstart",a=>this.toggleDisplay(a)),e.on("texttrackchange",r),e.on("loadedmetadata",a=>{this.updateDisplayOverlay(),this.preselectTrack(a)}),e.ready(de(this,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks){this.hide();return}e.on("fullscreenchange",n),e.on("playerresize",n);const a=C.screen.orientation||C,o=C.screen.orientation?"change":"orientationchange";a.addEventListener(o,n),e.on("dispose",()=>a.removeEventListener(o,n));const l=this.options_.playerOptions.tracks||[];for(let d=0;d.1&&(i>r?n=Math.round((e-t*r)/2):a=Math.round((t-e/r)/2)),cr(this.el_,"insetInline",nh(n)),cr(this.el_,"insetBlock",nh(a))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let r=i.length;for(;r--;){const n=i[r];if(!n)continue;const a=n.displayState;if(t.color&&(a.firstChild.style.color=t.color),t.textOpacity&&cr(a.firstChild,"color",Yo(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(a.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&cr(a.firstChild,"backgroundColor",Yo(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?cr(a,"backgroundColor",Yo(t.windowColor,t.windowOpacity)):a.style.backgroundColor=t.windowColor),t.edgeStyle&&(t.edgeStyle==="dropshadow"?a.firstChild.style.textShadow=`2px 2px 3px ${mt}, 2px 2px 4px ${mt}, 2px 2px 5px ${mt}`:t.edgeStyle==="raised"?a.firstChild.style.textShadow=`1px 1px ${mt}, 2px 2px ${mt}, 3px 3px ${mt}`:t.edgeStyle==="depressed"?a.firstChild.style.textShadow=`1px 1px ${rh}, 0 1px ${rh}, -1px -1px ${mt}, 0 -1px ${mt}`:t.edgeStyle==="uniform"&&(a.firstChild.style.textShadow=`0 0 4px ${mt}, 0 0 4px ${mt}, 0 0 4px ${mt}, 0 0 4px ${mt}`)),t.fontPercent&&t.fontPercent!==1){const o=C.parseFloat(a.style.fontSize);a.style.fontSize=o*t.fontPercent+"px",a.style.height="auto",a.style.top="auto"}t.fontFamily&&t.fontFamily!=="default"&&(t.fontFamily==="small-caps"?a.firstChild.style.fontVariant="small-caps":a.firstChild.style.fontFamily=AC[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),typeof C.WebVTT!="function"||e.every(i=>!i.activeCues))return;const t=[];for(let i=0;ithis.handleMouseDown(i))}buildCSSClass(){return"vjs-big-play-button"}handleClick(e){const t=this.player_.play();if(this.mouseused_&&"clientX"in e&&"clientY"in e){Lt(t),this.player_.tech(!0)&&this.player_.tech(!0).focus();return}const i=this.player_.getChild("controlBar"),r=i&&i.getChild("playToggle");if(!r){this.player_.tech(!0).focus();return}const n=()=>r.focus();Dr(t)?t.then(n,()=>{}):this.setTimeout(n,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}um.prototype.controlText_="Play Video";N.registerComponent("BigPlayButton",um);class PC extends dt{constructor(e,t){super(e,t),this.setIcon("cancel"),this.controlText(t&&t.controlText||this.localize("Close"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:"close",bubbles:!1})}handleKeyDown(e){X.isEventKey(e,"Esc")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}N.registerComponent("CloseButton",PC);class lm extends dt{constructor(e,t={}){super(e,t),t.replay=t.replay===void 0||t.replay,this.setIcon("play"),this.on(e,"play",i=>this.handlePlay(i)),this.on(e,"pause",i=>this.handlePause(i)),t.replay&&this.on(e,"ended",i=>this.handleEnded(i))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Lt(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause")}handlePause(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play")}handleEnded(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",t=>this.handleSeeked(t))}}lm.prototype.controlText_="Play";N.registerComponent("PlayToggle",lm);class qs extends N{constructor(e,t){super(e,t),this.on(e,["timeupdate","ended","seeking"],i=>this.update(i)),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl("div",{className:`${e} vjs-time-control vjs-control`}),i=Q("span",{className:"vjs-control-text",textContent:`${this.localize(this.labelText_)} `},{role:"presentation"});return t.appendChild(i),this.contentEl_=Q("span",{className:`${e}-display`},{role:"presentation"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){!this.player_.options_.enableSmoothSeeking&&e.type==="seeking"||this.updateContent(e)}updateTextNode_(e=0){e=Wi(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",()=>{if(!this.contentEl_)return;let t=this.textNode_;t&&this.contentEl_.firstChild!==t&&(t=null,ee.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=$.createTextNode(this.formattedTime_),this.textNode_&&(t?this.contentEl_.replaceChild(this.textNode_,t):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}}qs.prototype.labelText_="Time";qs.prototype.controlText_="Time";N.registerComponent("TimeDisplay",qs);class kl extends qs{buildCSSClass(){return"vjs-current-time"}updateContent(e){let t;this.player_.ended()?t=this.player_.duration():t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}kl.prototype.labelText_="Current Time";kl.prototype.controlText_="Current Time";N.registerComponent("CurrentTimeDisplay",kl);class Pl extends qs{constructor(e,t){super(e,t);const i=r=>this.updateContent(r);this.on(e,"durationchange",i),this.on(e,"loadstart",i),this.on(e,"loadedmetadata",i)}buildCSSClass(){return"vjs-duration"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}Pl.prototype.labelText_="Duration";Pl.prototype.controlText_="Duration";N.registerComponent("DurationDisplay",Pl);class IC extends N{createEl(){const e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),t=super.createEl("div"),i=super.createEl("span",{textContent:"/"});return t.appendChild(i),e.appendChild(t),e}}N.registerComponent("TimeDivider",IC);class Il extends qs{constructor(e,t){super(e,t),this.on(e,"durationchange",i=>this.updateContent(i))}buildCSSClass(){return"vjs-remaining-time"}createEl(){const e=super.createEl();return this.options_.displayNegative!==!1&&e.insertBefore(Q("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e}updateContent(e){if(typeof this.player_.duration()!="number")return;let t;this.player_.ended()?t=0:this.player_.remainingTimeDisplay?t=this.player_.remainingTimeDisplay():t=this.player_.remainingTime(),this.updateTextNode_(t)}}Il.prototype.labelText_="Remaining Time";Il.prototype.controlText_="Remaining Time";N.registerComponent("RemainingTimeDisplay",Il);class LC extends N{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),"durationchange",i=>this.updateShowing(i))}createEl(){const e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Q("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Q("span",{className:"vjs-control-text",textContent:`${this.localize("Stream Type")} `})),this.contentEl_.appendChild($.createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}}N.registerComponent("LiveDisplay",LC);class cm extends dt{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=i=>this.updateLiveEdgeStatus(i),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",e),this.textEl_=Q("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}cm.prototype.controlText_="Seek to live, currently playing live";N.registerComponent("SeekToLive",cm);function rn(s,e,t){return s=Number(s),Math.min(t,Math.max(e,isNaN(s)?e:s))}var OC=Object.freeze({__proto__:null,clamp:rn});class Ll extends N{constructor(e,t){super(e,t),this.handleMouseDown_=i=>this.handleMouseDown(i),this.handleMouseUp_=i=>this.handleMouseUp(i),this.handleKeyDown_=i=>this.handleKeyDown(i),this.handleClick_=i=>this.handleClick(i),this.handleMouseMove_=i=>this.handleMouseMove(i),this.update_=i=>this.update(i),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+" vjs-slider",t=Object.assign({tabIndex:0},t),i=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;e.type==="mousedown"&&e.preventDefault(),e.type==="touchstart"&&!$t&&e.preventDefault(),Bp(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove_),this.on(t,"mouseup",this.handleMouseUp_),this.on(t,"touchmove",this.handleMouseMove_),this.on(t,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;Up(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove_),this.off(t,"mouseup",this.handleMouseUp_),this.off(t,"touchmove",this.handleMouseMove_),this.off(t,"touchend",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",()=>{const t=this.vertical()?"height":"width";this.bar.el().style[t]=(e*100).toFixed(2)+"%"})),e}getProgress(){return Number(rn(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=Xa(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){X.isEventKey(e,"Left")||X.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepBack()):X.isEventKey(e,"Right")||X.isEventKey(e,"Up")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(e===void 0)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}}N.registerComponent("Slider",Ll);const Qo=(s,e)=>rn(s/e*100,0,100).toFixed(2)+"%";class RC extends N{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,"progress",i=>this.update(i))}createEl(){const e=super.createEl("div",{className:"vjs-load-progress"}),t=Q("span",{className:"vjs-control-text"}),i=Q("span",{textContent:this.localize("Loaded")}),r=$.createTextNode(": ");return this.percentageEl_=Q("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(t),t.appendChild(i),t.appendChild(r),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",()=>{const t=this.player_.liveTracker,i=this.player_.buffered(),r=t&&t.isLive()?t.seekableEnd():this.player_.duration(),n=this.player_.bufferedEnd(),a=this.partEls_,o=Qo(n,r);this.percent_!==o&&(this.el_.style.width=o,vi(this.percentageEl_,o),this.percent_=o);for(let l=0;li.length;l--)this.el_.removeChild(a[l-1]);a.length=i.length})}}N.registerComponent("LoadProgressBar",RC);class MC extends N{constructor(e,t){super(e,t),this.update=jt(de(this,this.update),vt)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(e,t,i){const r=jr(this.el_),n=Ls(this.player_.el()),a=e.width*t;if(!n||!r)return;const o=e.left-n.left+a,l=e.width-a+(n.right-e.right);let d=r.width/2;or.width&&(d=r.width),d=Math.round(d),this.el_.style.right=`-${d}px`,this.write(i)}write(e){vi(this.el_,e)}updateTime(e,t,i,r){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let n;const a=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const o=this.player_.liveTracker.liveWindow(),l=o-t*o;n=(l<1?"":"-")+Wi(l,o)}else n=Wi(i,a);this.update(e,t,n),r&&r()})}}N.registerComponent("TimeTooltip",MC);class Ol extends N{constructor(e,t){super(e,t),this.setIcon("circle"),this.update=jt(de(this,this.update),vt)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,t){const i=this.getChild("timeTooltip");if(!i)return;const r=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(e,t,r)}}Ol.prototype.options_={children:[]};!Qe&&!Ft&&Ol.prototype.options_.children.push("timeTooltip");N.registerComponent("PlayProgressBar",Ol);class dm extends N{constructor(e,t){super(e,t),this.update=jt(de(this,this.update),vt)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t){const i=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,i,()=>{this.el_.style.left=`${e.width*t}px`})}}dm.prototype.options_={children:["timeTooltip"]};N.registerComponent("MouseTimeDisplay",dm);const Fn=5,ah=12;class Rl extends Ll{constructor(e,t){super(e,t),this.setEventHandlers_()}setEventHandlers_(){this.update_=de(this,this.update),this.update=jt(this.update_,vt),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in $&&"visibilityState"in $&&this.on($,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){$.visibilityState==="hidden"?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(!this.player_.ended()&&!this.player_.paused()&&this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,vt))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&e.type!=="ended"||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(e){if($.visibilityState==="hidden")return;const t=super.update();return this.requestNamedAnimationFrame("SeekBar#update",()=>{const i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),r=this.player_.liveTracker;let n=this.player_.duration();r&&r.isLive()&&(n=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute("aria-valuenow",(t*100).toFixed(2)),this.percent_=t),(this.currentTime_!==i||this.duration_!==n)&&(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Wi(i,n),Wi(n,n)],"{1} of {2}")),this.currentTime_=i,this.duration_=n),this.bar&&this.bar.update(Ls(this.el()),this.getProgress())}),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}getPercent(){const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){qr(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!qr(e)||isNaN(this.player_.duration()))return;!t&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);let i;const r=this.calculateDistance(e),n=this.player_.liveTracker;if(!n||!n.isLive())i=r*this.player_.duration(),i===this.player_.duration()&&(i=i-.1);else{if(r>=.99){n.seekToLiveEdge();return}const a=n.seekableStart(),o=n.liveCurrentTime();if(i=a+r*n.liveWindow(),i>=o&&(i=o),i<=a&&(i=a+.1),i===1/0)return}this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild("mouseTimeDisplay");e&&e.show()}disable(){super.disable();const e=this.getChild("mouseTimeDisplay");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Lt(this.player_.play()):this.update_()}stepForward(){this.userSeek_(this.player_.currentTime()+Fn)}stepBack(){this.userSeek_(this.player_.currentTime()-Fn)}handleAction(e){this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(X.isEventKey(e,"Space")||X.isEventKey(e,"Enter"))e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(X.isEventKey(e,"Home"))e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(X.isEventKey(e,"End"))e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(X(e))){e.preventDefault(),e.stopPropagation();const i=(X.codes[X(e)]-X.codes[0])*10/100;t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else X.isEventKey(e,"PgDn")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-Fn*ah)):X.isEventKey(e,"PgUp")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+Fn*ah)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in $&&"visibilityState"in $&&this.off($,"visibilitychange",this.toggleVisibility_),super.dispose()}}Rl.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"};!Qe&&!Ft&&Rl.prototype.options_.children.splice(1,0,"mouseTimeDisplay");N.registerComponent("SeekBar",Rl);class hm extends N{constructor(e,t){super(e,t),this.handleMouseMove=jt(de(this,this.handleMouseMove),vt),this.throttledHandleMouseSeek=jt(de(this,this.handleMouseSeek),vt),this.handleMouseUpHandler_=i=>this.handleMouseUp(i),this.handleMouseDownHandler_=i=>this.handleMouseDown(i),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(e){const t=this.getChild("seekBar");if(!t)return;const i=t.getChild("playProgressBar"),r=t.getChild("mouseTimeDisplay");if(!i&&!r)return;const n=t.el(),a=jr(n);let o=Xa(n,e).x;o=rn(o,0,1),r&&r.update(a,o),i&&i.update(a,t.getProgress())}handleMouseSeek(e){const t=this.getChild("seekBar");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach(e=>e.disable&&e.disable()),!!this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&Lt(this.player_.play())}}enable(){this.children().forEach(e=>e.enable&&e.enable()),!this.enabled()&&(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}hm.prototype.options_={children:["seekBar"]};N.registerComponent("ProgressControl",hm);class fm extends dt{constructor(e,t){super(e,t),this.setIcon("picture-in-picture-enter"),this.on(e,["enterpictureinpicture","leavepictureinpicture"],i=>this.handlePictureInPictureChange(i)),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],i=>this.handlePictureInPictureEnabledChange(i)),this.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){if(!(this.player_.currentType().substring(0,5)==="audio"||this.player_.audioPosterMode()||this.player_.audioOnlyMode())){this.show();return}this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()}handlePictureInPictureEnabledChange(){$.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===!1||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in C?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){typeof $.exitPictureInPicture=="function"&&super.show()}}fm.prototype.controlText_="Picture-in-Picture";N.registerComponent("PictureInPictureToggle",fm);class pm extends dt{constructor(e,t){super(e,t),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",i=>this.handleFullscreenChange(i)),$[e.fsApi_.fullscreenEnabled]===!1&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}pm.prototype.controlText_="Fullscreen";N.registerComponent("FullscreenToggle",pm);const NC=function(s,e){e.tech_&&!e.tech_.featuresVolumeControl&&s.addClass("vjs-hidden"),s.on(e,"loadstart",function(){e.tech_.featuresVolumeControl?s.removeClass("vjs-hidden"):s.addClass("vjs-hidden")})};class BC extends N{createEl(){const e=super.createEl("div",{className:"vjs-volume-level"});return this.setIcon("circle",e),e.appendChild(super.createEl("span",{className:"vjs-control-text"})),e}}N.registerComponent("VolumeLevel",BC);class UC extends N{constructor(e,t){super(e,t),this.update=jt(de(this,this.update),vt)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(e,t,i,r){if(!i){const n=Ls(this.el_),a=Ls(this.player_.el()),o=e.width*t;if(!a||!n)return;const l=e.left-a.left+o,d=e.width-o+(a.right-e.right);let p=n.width/2;ln.width&&(p=n.width),this.el_.style.right=`-${p}px`}this.write(`${r}%`)}write(e){vi(this.el_,e)}updateVolume(e,t,i,r,n){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(e,t,i,r.toFixed(0)),n&&n()})}}N.registerComponent("VolumeLevelTooltip",UC);class mm extends N{constructor(e,t){super(e,t),this.update=jt(de(this,this.update),vt)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t,i){const r=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,i,r,()=>{i?this.el_.style.bottom=`${e.height*t}px`:this.el_.style.left=`${e.width*t}px`})}}mm.prototype.options_={children:["volumeLevelTooltip"]};N.registerComponent("MouseVolumeLevelDisplay",mm);class io extends Ll{constructor(e,t){super(e,t),this.on("slideractive",i=>this.updateLastVolume_(i)),this.on(e,"volumechange",i=>this.updateARIAAttributes(i)),e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(e){qr(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild("mouseVolumeLevelDisplay");if(t){const i=this.el(),r=Ls(i),n=this.vertical();let a=Xa(i,e);a=n?a.y:a.x,a=rn(a,0,1),t.update(r,a,n)}qr(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")}volumeAsPercentage_(){return Math.round(this.player_.volume()*100)}updateLastVolume_(){const e=this.player_.volume();this.one("sliderinactive",()=>{this.player_.volume()===0&&this.player_.lastVolume_(e)})}}io.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};!Qe&&!Ft&&io.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay");io.prototype.playerEvent="volumechange";N.registerComponent("VolumeBar",io);class gm extends N{constructor(e,t={}){t.vertical=t.vertical||!1,(typeof t.volumeBar>"u"||Ps(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),NC(this,e),this.throttledHandleMouseMove=jt(de(this,this.handleMouseMove),vt),this.handleMouseUpHandler_=i=>this.handleMouseUp(i),this.on("mousedown",i=>this.handleMouseDown(i)),this.on("touchstart",i=>this.handleMouseDown(i)),this.on("mousemove",i=>this.handleMouseMove(i)),this.on(this.volumeBar,["focus","slideractive"],()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")}),this.on(this.volumeBar,["blur","sliderinactive"],()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")})}createEl(){let e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),super.createEl("div",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}gm.prototype.options_={children:["volumeBar"]};N.registerComponent("VolumeControl",gm);const FC=function(s,e){e.tech_&&!e.tech_.featuresMuteControl&&s.addClass("vjs-hidden"),s.on(e,"loadstart",function(){e.tech_.featuresMuteControl?s.removeClass("vjs-hidden"):s.addClass("vjs-hidden")})};class ym extends dt{constructor(e,t){super(e,t),FC(this,e),this.on(e,["loadstart","volumechange"],i=>this.update(i))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(t===0){const r=i<.1?.1:i;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon("volume-high"),Qe&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),e===0||this.player_.muted()?(this.setIcon("volume-mute"),t=0):e<.33?(this.setIcon("volume-low"),t=1):e<.67&&(this.setIcon("volume-medium"),t=2),Wa(this.el_,[0,1,2,3].reduce((i,r)=>i+`${r?" ":""}vjs-vol-${r}`,"")),ji(this.el_,`vjs-vol-${t}`)}updateControlText_(){const t=this.player_.muted()||this.player_.volume()===0?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)}}ym.prototype.controlText_="Mute";N.registerComponent("MuteToggle",ym);class _m extends N{constructor(e,t={}){typeof t.inline<"u"?t.inline=t.inline:t.inline=!0,(typeof t.volumeControl>"u"||Ps(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=i=>this.handleKeyPress(i),this.on(e,["loadstart"],i=>this.volumePanelState_(i)),this.on(this.muteToggle,"keyup",i=>this.handleKeyPress(i)),this.on(this.volumeControl,"keyup",i=>this.handleVolumeControlKeyUp(i)),this.on("keydown",i=>this.handleKeyPress(i)),this.on("mouseover",i=>this.handleMouseOver(i)),this.on("mouseout",i=>this.handleMouseOut(i)),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}createEl(){let e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),super.createEl("div",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){X.isEventKey(e,"Esc")&&this.muteToggle.focus()}handleMouseOver(e){this.addClass("vjs-hover"),ht($,"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),Ve($,"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){X.isEventKey(e,"Esc")&&this.handleMouseOut()}}_m.prototype.options_={children:["muteToggle","volumeControl"]};N.registerComponent("VolumePanel",_m);class vm extends dt{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,r=i&&i.isLive()?i.seekableEnd():this.player_.duration();let n;t+this.skipTime<=r?n=t+this.skipTime:n=r,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}vm.prototype.controlText_="Skip Forward";N.registerComponent("SkipForward",vm);class Tm extends dt{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,r=i&&i.isLive()&&i.seekableStart();let n;r&&t-this.skipTime<=r?n=r:t>=this.skipTime?n=t-this.skipTime:n=0,this.player_.currentTime(n)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}Tm.prototype.controlText_="Skip Backward";N.registerComponent("SkipBackward",Tm);class bm extends N{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on("keydown",i=>this.handleKeyDown(i)),this.boundHandleBlur_=i=>this.handleBlur(i),this.boundHandleTapClick_=i=>this.handleTapClick(i)}addEventListenerForItem(e){e instanceof N&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof N&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))}removeChild(e){typeof e=="string"&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||"ul";this.contentEl_=Q(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");const t=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return t.appendChild(this.contentEl_),ht(t,"click",function(i){i.preventDefault(),i.stopImmediatePropagation()}),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||$.activeElement;if(!this.children().some(i=>i.el()===t)){const i=this.menuButton_;i&&i.buttonPressed_&&t!==i.el().firstChild&&i.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter(r=>r.el()===e.target)[0];if(!i)return;i.name()!=="CaptionSettingsMenuItem"&&this.menuButton_.focus()}}handleKeyDown(e){X.isEventKey(e,"Left")||X.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(X.isEventKey(e,"Right")||X.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}N.registerComponent("Menu",bm);class Ml extends N{constructor(e,t={}){super(e,t),this.menuButton_=new dt(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const i=dt.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+i,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const r=n=>this.handleClick(n);this.handleMenuKeyUp_=n=>this.handleMenuKeyUp(n),this.on(this.menuButton_,"tap",r),this.on(this.menuButton_,"click",r),this.on(this.menuButton_,"keydown",n=>this.handleKeyDown(n)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),ht($,"keyup",this.handleMenuKeyUp_)}),this.on("mouseleave",n=>this.handleMouseLeave(n)),this.on("keydown",n=>this.handleSubmenuKeyDown(n))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}createMenu(){const e=new bm(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Q("li",{className:"vjs-menu-title",textContent:xe(this.options_.title),tabIndex:-1}),i=new N(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;tX.isEventKey(e,t))||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))}}N.registerComponent("MenuItem",nn);class an extends nn{constructor(e,t){const i=t.track,r=e.textTracks();t.label=i.label||i.language||"Unknown",t.selected=i.mode==="showing",super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const n=(...o)=>{this.handleTracksChange.apply(this,o)},a=(...o)=>{this.handleSelectedLanguageChange.apply(this,o)};if(e.on(["loadstart","texttrackchange"],n),r.addEventListener("change",n),r.addEventListener("selectedlanguagechange",a),this.on("dispose",function(){e.off(["loadstart","texttrackchange"],n),r.removeEventListener("change",n),r.removeEventListener("selectedlanguagechange",a)}),r.onchange===void 0){let o;this.on(["tap","click"],function(){if(typeof C.Event!="object")try{o=new C.Event("change")}catch{}o||(o=$.createEvent("Event"),o.initEvent("change",!0,!0)),r.dispatchEvent(o)})}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),!!i)for(let r=0;r-1&&a.mode==="showing"){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let r=0,n=t.length;r-1&&a.mode==="showing"){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}N.registerComponent("OffTextTrackMenuItem",Sm);class Vs extends Nl{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=an){let i;this.label_&&(i=`${this.label_} off`),e.push(new Sm(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let n=0;n-1){const o=new t(this.player_,{track:a,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});o.addClass(`vjs-${a.kind}-menu-item`),e.push(o)}}return e}}N.registerComponent("TextTrackButton",Vs);class xm extends nn{constructor(e,t){const i=t.track,r=t.cue,n=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=r.text,t.selected=r.startTime<=n&&n{this.items.forEach(r=>{r.selected(this.track_.activeCues[0]===r.cue)})}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&e.track.kind!=="chapters")return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";const t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(xe(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,r=t.length;i-1&&(this.label_="captions",this.setIcon("captions")),this.menuButton_.controlText(xe(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new $l(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,Em),e}}ql.prototype.kinds_=["captions","subtitles"];ql.prototype.controlText_="Subtitles";N.registerComponent("SubsCapsButton",ql);class Cm extends nn{constructor(e,t){const i=t.track,r=e.audioTracks();t.label=i.label||i.language||"Unknown",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const n=(...a)=>{this.handleTracksChange.apply(this,a)};r.addEventListener("change",n),this.on("dispose",()=>{r.removeEventListener("change",n)})}createEl(e,t,i){const r=super.createEl(e,t,i),n=r.querySelector(".vjs-menu-item-text");return["main-desc","description"].indexOf(this.options_.track.kind)>=0&&(n.appendChild(Q("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),n.appendChild(Q("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),r}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const t=this.player_.audioTracks();for(let i=0;ithis.update(n))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}Vl.prototype.contentElType="button";N.registerComponent("PlaybackRateMenuItem",Vl);class Am extends Ml{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",i=>this.updateVisibility(i)),this.on(e,"ratechange",i=>this.updateLabel(i)),this.on(e,"playbackrateschange",i=>this.handlePlaybackRateschange(i))}createEl(){const e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=Q("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new Vl(this.player(),{rate:e[i]+"x"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}}Am.prototype.controlText_="Playback Rate";N.registerComponent("PlaybackRateMenuButton",Am);class Dm extends N{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e="div",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}N.registerComponent("Spacer",Dm);class jC extends Dm{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:" "})}}N.registerComponent("CustomControlSpacer",jC);class km extends N{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}km.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]};N.registerComponent("ControlBar",km);class Pm extends js{constructor(e,t){super(e,t),this.on(e,"error",i=>{this.open(i)})}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):""}}Pm.prototype.options_=Object.assign({},js.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0});N.registerComponent("ErrorDisplay",Pm);const Jo="vjs-text-track-settings",oh=["#000","Black"],uh=["#00F","Blue"],lh=["#0FF","Cyan"],ch=["#0F0","Green"],dh=["#F0F","Magenta"],hh=["#F00","Red"],fh=["#FFF","White"],ph=["#FF0","Yellow"],Zo=["1","Opaque"],eu=["0.5","Semi-Transparent"],mh=["0","Transparent"],Li={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[oh,fh,hh,ch,uh,ph,dh,lh]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[Zo,eu,mh]},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[fh,oh,hh,ch,uh,ph,dh,lh]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:s=>s==="1.00"?null:Number(s)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[Zo,eu]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[mh,eu,Zo]}};Li.windowColor.options=Li.backgroundColor.options;function Im(s,e){if(e&&(s=e(s)),s&&s!=="none")return s}function qC(s,e){const t=s.options[s.options.selectedIndex].value;return Im(t,e)}function VC(s,e,t){if(e){for(let i=0;i{this.saveSettings(),this.close()}),this.on(this.$(".vjs-default-button"),"click",()=>{this.setDefaults(),this.updateDisplay()}),ps(Li,i=>{this.on(this.$(i.selector),"change",this.updateDisplay)}),this.options_.persistTextTrackSettings&&this.restoreSettings()}dispose(){this.endDialog=null,super.dispose()}createElSelect_(e,t="",i="label"){const r=Li[e],n=r.id.replace("%s",this.id_),a=[t,n].join(" ").trim(),o=`vjs_select_${At()}`;return[`<${i} id="${n}"${i==="label"?` for="${o}" class="vjs-label"`:""}>`,this.localize(r.label),``,`").join("")}createElFgColor_(){const e=`captions-text-legend-${this.id_}`;return['
',``,this.localize("Text"),"",'',this.createElSelect_("color",e),"",'',this.createElSelect_("textOpacity",e),"","
"].join("")}createElBgColor_(){const e=`captions-background-${this.id_}`;return['
',``,this.localize("Text Background"),"",'',this.createElSelect_("backgroundColor",e),"",'',this.createElSelect_("backgroundOpacity",e),"","
"].join("")}createElWinColor_(){const e=`captions-window-${this.id_}`;return['
',``,this.localize("Caption Area Background"),"",'',this.createElSelect_("windowColor",e),"",'',this.createElSelect_("windowOpacity",e),"","
"].join("")}createElColors_(){return Q("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})}createElFont_(){return Q("div",{className:"vjs-track-settings-font",innerHTML:['
',this.createElSelect_("fontPercent","","legend"),"
",'
',this.createElSelect_("edgeStyle","","legend"),"
",'
',this.createElSelect_("fontFamily","","legend"),"
"].join("")})}createElControls_(){const e=this.localize("restore all settings to the default values");return Q("div",{className:"vjs-track-settings-controls",innerHTML:[`",``].join("")})}content(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}getValues(){return wp(Li,(e,t,i)=>{const r=qC(this.$(t.selector),t.parser);return r!==void 0&&(e[i]=r),e},{})}setValues(e){ps(Li,(t,i)=>{VC(this.$(t.selector),e[i],t.parser)})}setDefaults(){ps(Li,e=>{const t=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=t})}restoreSettings(){let e;try{e=JSON.parse(C.localStorage.getItem(Jo))}catch(t){ee.warn(t)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?C.localStorage.setItem(Jo,JSON.stringify(e)):C.localStorage.removeItem(Jo)}catch(t){ee.warn(t)}}updateDisplay(){const e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}conditionalBlur_(){this.previouslyActiveEl_=null;const e=this.player_.controlBar,t=e&&e.subsCapsButton,i=e&&e.captionsButton;t?t.focus():i&&i.focus()}handleLanguagechange(){this.fill()}}N.registerComponent("TextTrackSettings",HC);class zC extends N{constructor(e,t){let i=t.ResizeObserver||C.ResizeObserver;t.ResizeObserver===null&&(i=!1);const r=ce({createEl:!i,reportTouchActivity:!1},t);super(e,r),this.ResizeObserver=t.ResizeObserver||C.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=Kp(()=>{this.resizeHandler()},100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const n=this.debouncedHandler_;let a=this.unloadListener_=function(){Ve(this,"resize",n),Ve(this,"unload",a),a=null};ht(this.el_.contentWindow,"unload",a),ht(this.el_.contentWindow,"resize",n)},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){!this.player_||!this.player_.trigger||this.player_.trigger("playerresize")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}}N.registerComponent("ResizeManager",zC);const GC={trackingThreshold:20,liveTolerance:15};class WC extends N{constructor(e,t){const i=ce(GC,t,{createEl:!1});super(e,i),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=r=>this.handlePlay(r),this.handleFirstTimeupdate_=r=>this.handleFirstTimeupdate(r),this.handleSeeked_=r=>this.handleSeeked(r),this.seekToLiveEdge_=r=>this.seekToLiveEdge(r),this.reset_(),this.on(this.player_,"durationchange",r=>this.handleDurationchange(r)),this.on(this.player_,"canplay",()=>this.toggleTracking())}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(C.performance.now().toFixed(4)),i=this.lastTime_===-1?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const r=this.liveCurrentTime(),n=this.player_.currentTime();let a=this.player_.paused()||this.seekedBehindLive_||Math.abs(r-n)>this.options_.liveTolerance;(!this.timeupdateSeen_||r===1/0)&&(a=!1),a!==this.behindLiveEdge_&&(this.behindLiveEdge_=a,this.trigger("liveedgechange"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,vt),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return this.lastSeekEnd_!==-1&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return typeof this.trackingInterval_=="number"}seekToLiveEdge(){this.seekedBehindLive_=!1,!this.atLiveEdge()&&(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}}N.registerComponent("LiveTracker",WC);class KC extends N{constructor(e,t){super(e,t),this.on("statechanged",i=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:Q("div",{className:"vjs-title-bar-title",id:`vjs-title-bar-title-${At()}`}),description:Q("div",{className:"vjs-title-bar-description",id:`vjs-title-bar-description-${At()}`})},Q("div",{className:"vjs-title-bar"},{},Ap(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(r=>{const n=this.state[r],a=this.els[r],o=i[r];Ya(a),n&&vi(a,n),t&&(t.removeAttribute(o),n&&t.setAttribute(o,a.id))}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute("aria-labelledby"),t.removeAttribute("aria-describedby")),super.dispose(),this.els=null}}N.registerComponent("TitleBar",KC);const ku=s=>{const e=s.el();if(e.hasAttribute("src"))return s.triggerSourceset(e.src),!0;const t=s.$$("source"),i=[];let r="";if(!t.length)return!1;for(let n=0;n{let t={};for(let i=0;iLm([s.el(),C.HTMLMediaElement.prototype,C.Element.prototype,XC],"innerHTML"),gh=function(s){const e=s.el();if(e.resetSourceWatch_)return;const t={},i=YC(s),r=n=>(...a)=>{const o=n.apply(e,a);return ku(s),o};["append","appendChild","insertAdjacentHTML"].forEach(n=>{e[n]&&(t[n]=e[n],e[n]=r(t[n]))}),Object.defineProperty(e,"innerHTML",ce(i,{set:r(i.set)})),e.resetSourceWatch_=()=>{e.resetSourceWatch_=null,Object.keys(t).forEach(n=>{e[n]=t[n]}),Object.defineProperty(e,"innerHTML",i)},s.one("sourceset",e.resetSourceWatch_)},QC=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?rm(C.Element.prototype.getAttribute.call(this,"src")):""},set(s){return C.Element.prototype.setAttribute.call(this,"src",s),s}}),JC=s=>Lm([s.el(),C.HTMLMediaElement.prototype,QC],"src"),ZC=function(s){if(!s.featuresSourceset)return;const e=s.el();if(e.resetSourceset_)return;const t=JC(s),i=e.setAttribute,r=e.load;Object.defineProperty(e,"src",ce(t,{set:n=>{const a=t.set.call(e,n);return s.triggerSourceset(e.src),a}})),e.setAttribute=(n,a)=>{const o=i.call(e,n,a);return/src/i.test(n)&&s.triggerSourceset(e.src),o},e.load=()=>{const n=r.call(e);return ku(s)||(s.triggerSourceset(""),gh(s)),n},e.currentSrc?s.triggerSourceset(e.currentSrc):ku(s)||gh(s),e.resetSourceset_=()=>{e.resetSourceset_=null,e.load=r,e.setAttribute=i,Object.defineProperty(e,"src",t),e.resetSourceWatch_&&e.resetSourceWatch_()}};class q extends Y{constructor(e,t){super(e,t);const i=e.source;let r=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&this.el_.tagName==="VIDEO",i&&(this.el_.currentSrc!==i.src||e.tag&&e.tag.initNetworkState_===3)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const n=this.el_.childNodes;let a=n.length;const o=[];for(;a--;){const l=n[a];l.nodeName.toLowerCase()==="track"&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(l),this.remoteTextTracks().addTrack(l.track),this.textTracks().addTrack(l.track),!r&&!this.el_.hasAttribute("crossorigin")&&eo(l.src)&&(r=!0)):o.push(l))}for(let l=0;l{t=[];for(let n=0;ne.removeEventListener("change",i));const r=()=>{for(let n=0;n{e.removeEventListener("change",i),e.removeEventListener("change",r),e.addEventListener("change",r)}),this.on("webkitendfullscreen",()=>{e.removeEventListener("change",i),e.addEventListener("change",i),e.removeEventListener("change",r)})}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach(r=>{this.el()[`${i}Tracks`].removeEventListener(r,this[`${i}TracksListeners_`][r])}),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(e){const t=_t[e],i=this.el()[t.getterName],r=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const n={change:o=>{const l={type:"change",target:r,currentTarget:r,srcElement:r};r.trigger(l),e==="text"&&this[Ms.remoteText.getterName]().trigger(l)},addtrack(o){r.addTrack(o.track)},removetrack(o){r.removeTrack(o.track)}},a=function(){const o=[];for(let l=0;l{const l=n[o];i.addEventListener(o,l),this.on("dispose",d=>i.removeEventListener(o,l))}),this.on("loadstart",a),this.on("dispose",o=>this.off("loadstart",a))}proxyNativeTracks_(){_t.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let e=this.options_.tag;if(!e||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(e){const i=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(i,e),q.disposeMediaElement(e),e=i}else{e=$.createElement("video");const i=this.options_.tag&&di(this.options_.tag),r=ce({},i);(!$r||this.options_.nativeControlsForTouch!==!0)&&delete r.controls,Mp(e,Object.assign(r,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}typeof this.options_.preload<"u"&&Is(e,"preload",this.options_.preload),this.options_.disablePictureInPicture!==void 0&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=["loop","muted","playsinline","autoplay"];for(let i=0;i=2&&t.push("loadeddata"),e.readyState>=3&&t.push("canplay"),e.readyState>=4&&t.push("canplaythrough"),this.ready(function(){t.forEach(function(i){this.trigger(i)},this)})}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ga?this.el_.fastSeek(e):this.el_.currentTime=e}catch(t){ee(t,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&Ft&&$t&&this.el_.currentTime===0){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;const e=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){"webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",t),this.on("dispose",()=>{this.off("webkitbeginfullscreen",t),this.off("webkitendfullscreen",e)})}supportsFullScreen(){return typeof this.el_.webkitEnterFullScreen=="function"}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Lt(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}},0);else try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}}exitFullScreen(){if(!this.el_.webkitDisplayingFullscreen){this.trigger("fullscreenerror",new Error("The video is not fullscreen"));return}this.el_.webkitExitFullScreen()}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(e===void 0)return this.el_.src;this.setSrc(e)}reset(){q.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=$.createElement("track");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$("track");let i=t.length;for(;i--;)(e===t[i]||e===t[i].track)&&this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if(typeof this.el().getVideoPlaybackQuality=="function")return this.el().getVideoPlaybackQuality();const e={};return typeof this.el().webkitDroppedFrameCount<"u"&&typeof this.el().webkitDecodedFrameCount<"u"&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),C.performance&&(e.creationTime=C.performance.now()),e}}qa(q,"TEST_VID",function(){if(!Us())return;const s=$.createElement("video"),e=$.createElement("track");return e.kind="captions",e.srclang="en",e.label="English",s.appendChild(e),s});q.isSupported=function(){try{q.TEST_VID.volume=.5}catch{return!1}return!!(q.TEST_VID&&q.TEST_VID.canPlayType)};q.canPlayType=function(s){return q.TEST_VID.canPlayType(s)};q.canPlaySource=function(s,e){return q.canPlayType(s.type)};q.canControlVolume=function(){try{const s=q.TEST_VID.volume;q.TEST_VID.volume=s/2+.1;const e=s!==q.TEST_VID.volume;return e&&Qe?(C.setTimeout(()=>{q&&q.prototype&&(q.prototype.featuresVolumeControl=s!==q.TEST_VID.volume)}),!1):e}catch{return!1}};q.canMuteVolume=function(){try{const s=q.TEST_VID.muted;return q.TEST_VID.muted=!s,q.TEST_VID.muted?Is(q.TEST_VID,"muted","muted"):Ka(q.TEST_VID,"muted","muted"),s!==q.TEST_VID.muted}catch{return!1}};q.canControlPlaybackRate=function(){if(Ft&&$t&&Va<58)return!1;try{const s=q.TEST_VID.playbackRate;return q.TEST_VID.playbackRate=s/2+.1,s!==q.TEST_VID.playbackRate}catch{return!1}};q.canOverrideAttributes=function(){try{const s=()=>{};Object.defineProperty($.createElement("video"),"src",{get:s,set:s}),Object.defineProperty($.createElement("audio"),"src",{get:s,set:s}),Object.defineProperty($.createElement("video"),"innerHTML",{get:s,set:s}),Object.defineProperty($.createElement("audio"),"innerHTML",{get:s,set:s})}catch{return!1}return!0};q.supportsNativeTextTracks=function(){return Ga||Qe&&$t};q.supportsNativeVideoTracks=function(){return!!(q.TEST_VID&&q.TEST_VID.videoTracks)};q.supportsNativeAudioTracks=function(){return!!(q.TEST_VID&&q.TEST_VID.audioTracks)};q.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"];[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function([s,e]){qa(q.prototype,s,()=>q[e](),!0)});q.prototype.featuresVolumeControl=q.canControlVolume();q.prototype.movingMediaElementInDOM=!Qe;q.prototype.featuresFullscreenResize=!0;q.prototype.featuresProgressEvents=!0;q.prototype.featuresTimeupdateEvents=!0;q.prototype.featuresVideoFrameCallback=!!(q.TEST_VID&&q.TEST_VID.requestVideoFrameCallback);q.disposeMediaElement=function(s){if(s){for(s.parentNode&&s.parentNode.removeChild(s);s.hasChildNodes();)s.removeChild(s.firstChild);s.removeAttribute("src"),typeof s.load=="function"&&function(){try{s.load()}catch{}}()}};q.resetMediaElement=function(s){if(!s)return;const e=s.querySelectorAll("source");let t=e.length;for(;t--;)s.removeChild(e[t]);s.removeAttribute("src"),typeof s.load=="function"&&function(){try{s.load()}catch{}}()};["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(s){q.prototype[s]=function(){return this.el_[s]||this.el_.hasAttribute(s)}});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(s){q.prototype["set"+xe(s)]=function(e){this.el_[s]=e,e?this.el_.setAttribute(s,s):this.el_.removeAttribute(s)}});["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(s){q.prototype[s]=function(){return this.el_[s]}});["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(s){q.prototype["set"+xe(s)]=function(e){this.el_[s]=e}});["pause","load","play"].forEach(function(s){q.prototype[s]=function(){return this.el_[s]()}});Y.withSourceHandlers(q);q.nativeSourceHandler={};q.nativeSourceHandler.canPlayType=function(s){try{return q.TEST_VID.canPlayType(s)}catch{return""}};q.nativeSourceHandler.canHandleSource=function(s,e){if(s.type)return q.nativeSourceHandler.canPlayType(s.type);if(s.src){const t=Al(s.src);return q.nativeSourceHandler.canPlayType(`video/${t}`)}return""};q.nativeSourceHandler.handleSource=function(s,e,t){e.setSrc(s.src)};q.nativeSourceHandler.dispose=function(){};q.registerSourceHandler(q.nativeSourceHandler);Y.registerTech("Html5",q);const Om=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],tu={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Pu=["tiny","xsmall","small","medium","large","xlarge","huge"],Yn={};Pu.forEach(s=>{const e=s.charAt(0)==="x"?`x-${s.substring(1)}`:s;Yn[s]=`vjs-layout-${e}`});const ew={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};let Re=class os extends N{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${At()}`,t=Object.assign(os.getTagSettings(e),t),t.initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const a=e.closest("[lang]");a&&(t.language=a.getAttribute("lang"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=a=>this.documentFullscreenChange_(a),this.boundFullWindowOnEscKey_=a=>this.fullWindowOnEscKey(a),this.boundUpdateStyleEl_=a=>this.updateStyleEl_(a),this.boundApplyInitTime_=a=>this.applyInitTime_(a),this.boundUpdateCurrentBreakpoint_=a=>this.updateCurrentBreakpoint_(a),this.boundHandleTechClick_=a=>this.handleTechClick_(a),this.boundHandleTechDoubleClick_=a=>this.handleTechDoubleClick_(a),this.boundHandleTechTouchStart_=a=>this.handleTechTouchStart_(a),this.boundHandleTechTouchMove_=a=>this.handleTechTouchMove_(a),this.boundHandleTechTouchEnd_=a=>this.handleTechTouchEnd_(a),this.boundHandleTechTap_=a=>this.handleTechTap_(a),this.isFullscreen_=!1,this.log=Ep(this.id_),this.fsApi_=ua,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=e,this.tagAttributes=e&&di(e),this.language(this.options_.language),t.languages){const a={};Object.getOwnPropertyNames(t.languages).forEach(function(o){a[o.toLowerCase()]=t.languages[o]}),this.languages_=a}else this.languages_=os.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||"",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach(a=>{if(typeof this[a]!="function")throw new Error(`plugin "${a}" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),xl(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(ht($,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const r=ce(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach(a=>{this[a](t.plugins[a])}),t.debug&&this.debug(!0),this.options_.playerOptions=r,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const o=new C.DOMParser().parseFromString(CC,"image/svg+xml");if(o.querySelector("parsererror"))ee.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{const d=o.documentElement;d.style.display="none",this.el_.appendChild(d),this.addClass("vjs-svg-icons-enabled")}}this.initChildren(),this.isAudio(e.nodeName.toLowerCase()==="audio"),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),$r&&this.addClass("vjs-touch-enabled"),Qe||this.addClass("vjs-workinghover"),os.players[this.id_]=this;const n=yu.split(".")[0];this.addClass(`vjs-v${n}`),this.userActive(!0),this.reportUserActivity(),this.one("play",a=>this.listenForUserActivity_(a)),this.on("keydown",a=>this.handleKeyDown(a)),this.on("languagechange",a=>this.handleLanguagechange(a)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){this.trigger("dispose"),this.off("dispose"),Ve($,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),Ve($,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),os.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),bC(this),We.names.forEach(e=>{const t=We[e],i=this[t.getterName]();i&&i.off&&i.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e=this.tag,t,i=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player");const r=this.tag.tagName.toLowerCase()==="video-js";i?t=this.el_=e.parentNode:r||(t=this.el_=super.createEl("div"));const n=di(e);if(r){for(t=this.el_=e,e=this.tag=$.createElement("video");t.children.length;)e.appendChild(t.firstChild);wr(t,"video-js")||ji(t,"video-js"),t.appendChild(e),i=this.playerElIngest_=t,Object.keys(t).forEach(o=>{try{e[o]=t[o]}catch{}})}if(e.setAttribute("tabindex","-1"),n.tabindex="-1",$t&&Ha&&(e.setAttribute("role","application"),n.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in n&&delete n.width,"height"in n&&delete n.height,Object.getOwnPropertyNames(n).forEach(function(o){r&&o==="class"||t.setAttribute(o,n[o]),r&&e.setAttribute(o,n[o])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=t.player=this,this.addClass("vjs-paused"),C.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=Gp("vjs-styles-dimensions");const o=yi(".vjs-styles-defaults"),l=yi("head");l.insertBefore(this.styleEl_,o?o.nextSibling:l.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const a=e.getElementsByTagName("a");for(let o=0;o"u")return this.techGet_("crossOrigin");if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){ee.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`);return}this.techCall_("setCrossOrigin",e),this.posterImage&&this.posterImage.crossOrigin(e)}width(e){return this.dimension("width",e)}height(e){return this.dimension("height",e)}dimension(e,t){const i=e+"_";if(t===void 0)return this[i]||0;if(t===""||t==="auto"){this[i]=void 0,this.updateStyleEl_();return}const r=parseFloat(t);if(isNaN(r)){ee.error(`Improper value "${t}" supplied for for ${e}`);return}this[i]=r,this.updateStyleEl_()}fluid(e){if(e===void 0)return!!this.fluid_;this.fluid_=!!e,Zt(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),QE(this,()=>{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(e){if(e===void 0)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(e){if(e===void 0)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(C.VIDEOJS_NO_DYNAMIC_STYLE===!0){const o=typeof this.width_=="number"?this.width_:this.options_.width,l=typeof this.height_=="number"?this.height_:this.options_.height,d=this.tech_&&this.tech_.el();d&&(o>=0&&(d.width=o),l>=0&&(d.height=l));return}let e,t,i,r;this.aspectRatio_!==void 0&&this.aspectRatio_!=="auto"?i=this.aspectRatio_:this.videoWidth()>0?i=this.videoWidth()+":"+this.videoHeight():i="16:9";const n=i.split(":"),a=n[1]/n[0];this.width_!==void 0?e=this.width_:this.height_!==void 0?e=this.height_/a:e=this.videoWidth()||300,this.height_!==void 0?t=this.height_:t=e*a,/^[^a-zA-Z]/.test(this.id())?r="dimensions-"+this.id():r=this.id()+"-dimensions",this.addClass(r),Wp(this.styleEl_,` + .${r} { + width: ${e}px; + height: ${t}px; + } + + .${r}.vjs-fluid:not(.vjs-audio-only-mode) { + padding-top: ${a*100}%; + } + `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=xe(e),r=e.charAt(0).toLowerCase()+e.slice(1);i!=="Html5"&&this.tag&&(Y.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let n=this.autoplay();(typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay)&&(n=!1);const a={source:t,autoplay:n,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${r}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};We.names.forEach(l=>{const d=We[l];a[d.getterName]=this[d.privateName]}),Object.assign(a,this.options_[i]),Object.assign(a,this.options_[r]),Object.assign(a,this.options_[e.toLowerCase()]),this.tag&&(a.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(a.startTime=this.cache_.currentTime);const o=Y.getTech(e);if(!o)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new o(a),this.tech_.ready(de(this,this.handleTechReady_),!0),Qd.jsonToTextTracks(this.textTracksJson_||[],this.tech_),Om.forEach(l=>{this.on(this.tech_,l,d=>this[`handleTech${xe(l)}_`](d))}),Object.keys(tu).forEach(l=>{this.on(this.tech_,l,d=>{if(this.tech_.playbackRate()===0&&this.tech_.seeking()){this.queuedCallbacks_.push({callback:this[`handleTech${tu[l]}_`].bind(this),event:d});return}this[`handleTech${tu[l]}_`](d)})}),this.on(this.tech_,"loadstart",l=>this.handleTechLoadStart_(l)),this.on(this.tech_,"sourceset",l=>this.handleTechSourceset_(l)),this.on(this.tech_,"waiting",l=>this.handleTechWaiting_(l)),this.on(this.tech_,"ended",l=>this.handleTechEnded_(l)),this.on(this.tech_,"seeking",l=>this.handleTechSeeking_(l)),this.on(this.tech_,"play",l=>this.handleTechPlay_(l)),this.on(this.tech_,"pause",l=>this.handleTechPause_(l)),this.on(this.tech_,"durationchange",l=>this.handleTechDurationChange_(l)),this.on(this.tech_,"fullscreenchange",(l,d)=>this.handleTechFullscreenChange_(l,d)),this.on(this.tech_,"fullscreenerror",(l,d)=>this.handleTechFullscreenError_(l,d)),this.on(this.tech_,"enterpictureinpicture",l=>this.handleTechEnterPictureInPicture_(l)),this.on(this.tech_,"leavepictureinpicture",l=>this.handleTechLeavePictureInPicture_(l)),this.on(this.tech_,"error",l=>this.handleTechError_(l)),this.on(this.tech_,"posterchange",l=>this.handleTechPosterChange_(l)),this.on(this.tech_,"textdata",l=>this.handleTechTextData_(l)),this.on(this.tech_,"ratechange",l=>this.handleTechRateChange_(l)),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&(i!=="Html5"||!this.tag)&&bu(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){We.names.forEach(e=>{const t=We[e];this[t.privateName]=this[t.getterName]()}),this.textTracksJson_=Qd.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(e){return e===void 0&&ee.warn(`Using the tech directly can be dangerous. I hope you know what you're doing. +See https://github.com/videojs/video.js/issues/2617 for more info. +`),this.tech_}version(){return{"video.js":yu}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(this.autoplay()===!0&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(e){if(!this.tech_||typeof e!="string")return;const t=()=>{const r=this.muted();this.muted(!0);const n=()=>{this.muted(r)};this.playTerminatedQueue_.push(n);const a=this.play();if(Dr(a))return a.catch(o=>{throw n(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${o||""}`)})};let i;if(e==="any"&&!this.muted()?(i=this.play(),Dr(i)&&(i=i.catch(t))):e==="muted"&&!this.muted()?i=t():i=this.play(),!!Dr(i))return i.then(()=>{this.trigger({type:"autoplay-success",autoplay:e})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:e})})}updateSourceCaches_(e=""){let t=e,i="";typeof t!="string"&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=EC(this,t)),this.cache_.source=ce({},e,{src:t,type:i});const r=this.cache_.sources.filter(l=>l.src&&l.src===t),n=[],a=this.$$("source"),o=[];for(let l=0;lthis.updateSourceCaches_(n);const i=this.currentSource().src,r=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(r)&&(!this.lastSource_||this.lastSource_.tech!==r&&this.lastSource_.player!==i)&&(t=()=>{}),t(r),e.src||this.tech_.any(["sourceset","loadstart"],n=>{if(n.type==="sourceset")return;const a=this.techGet_("currentSrc");this.lastSource_.tech=a,this.updateSourceCaches_(a)})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})}hasStarted(e){if(e===void 0)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){this.tech_.playbackRate()>0&&this.cache_.lastPlaybackRate===0&&(this.queuedCallbacks_.forEach(e=>e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",t))};this.on("timeupdate",t)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(e){this.controls_&&(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.click===void 0||this.options_.userActions.click!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.click=="function"?this.options_.userActions.click.call(this,e):this.paused()?Lt(this.play()):this.pause())}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),i=>i.contains(e.target))||(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.doubleClick===void 0||this.options_.userActions.doubleClick!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.doubleClick=="function"?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let r=$[this.fsApi_.fullscreenElement]===i;!r&&i.matches&&(r=i.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(r)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",()=>{this.removeClass("vjs-ios-native-fs")})),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger("fullscreenerror",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready(function(){if(e in vC)return yC(this.middleware_,this.tech_,e,t);if(e in ih)return th(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(i){throw ee(i),i}},!0)}techGet_(e){if(!(!this.tech_||!this.tech_.isReady_)){if(e in _C)return gC(this.middleware_,this.tech_,e);if(e in ih)return th(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){throw this.tech_[e]===void 0?(ee(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t):t.name==="TypeError"?(ee(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t):(ee(t),t)}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=Lt){this.playCallbacks_.push(e);const t=!!(!this.changingSrc_&&(this.src()||this.currentSrc())),i=!!(Ga||Qe);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t){this.waitToPlay_=a=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!t&&i&&this.load();return}const r=this.techGet_("play");i&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),r===null?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(r)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(t){t()})}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach(function(i){i(e)})}pause(){this.techCall_("pause")}paused(){return this.techGet_("paused")!==!1}played(){return this.techGet_("played")||wt(0,0)}scrubbing(e){if(typeof e>"u")return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}currentTime(e){if(e===void 0)return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime;if(e<0&&(e=0),!this.isReady_||this.changingSrc_||!this.tech_||!this.tech_.isReady_){this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),this.one("canplay",this.boundApplyInitTime_);return}this.techCall_("setCurrentTime",e),this.cache_.initTime=0,isFinite(e)&&(this.cache_.currentTime=Number(e))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(e===void 0)return this.cache_.duration!==void 0?this.cache_.duration:NaN;e=parseFloat(e),e<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_("buffered");return(!e||!e.length)&&(e=wt(0,0)),e}seekable(){let e=this.techGet_("seekable");return(!e||!e.length)&&(e=wt(0,0)),e}seeking(){return this.techGet_("seeking")}ended(){return this.techGet_("ended")}networkState(){return this.techGet_("networkState")}readyState(){return this.techGet_("readyState")}bufferedPercent(){return im(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;if(e!==void 0){t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_("setVolume",t),t>0&&this.lastVolume_(t);return}return t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t}muted(e){if(e!==void 0){this.techCall_("setMuted",e);return}return this.techGet_("muted")||!1}defaultMuted(e){return e!==void 0&&this.techCall_("setDefaultMuted",e),this.techGet_("defaultMuted")||!1}lastVolume_(e){if(e!==void 0&&e!==0){this.cache_.lastVolume=e;return}return this.cache_.lastVolume}supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1}isFullscreen(e){if(e!==void 0){const t=this.isFullscreen_;this.isFullscreen_=!!e,this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),this.toggleFullscreenClass_();return}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise((i,r)=>{function n(){t.off("fullscreenerror",o),t.off("fullscreenchange",a)}function a(){n(),i()}function o(d,p){n(),r(p)}t.one("fullscreenchange",a),t.one("fullscreenerror",o);const l=t.requestFullscreenHelper_(e);l&&(l.then(n,n),l.then(i,r))})}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},e!==void 0&&(t=e)),this.fsApi_.requestFullscreen){const i=this.el_[this.fsApi_.requestFullscreen](t);return i&&i.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),i}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise((t,i)=>{function r(){e.off("fullscreenerror",a),e.off("fullscreenchange",n)}function n(){r(),t()}function a(l,d){r(),i(d)}e.one("fullscreenchange",n),e.one("fullscreenerror",a);const o=e.exitFullscreenHelper_();o&&(o.then(r,r),o.then(t,i))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=$[this.fsApi_.exitFullscreen]();return e&&Lt(e.then(()=>this.isFullscreen(!1))),e}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=$.documentElement.style.overflow,ht($,"keydown",this.boundFullWindowOnEscKey_),$.documentElement.style.overflow="hidden",ji($.body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(e){X.isEventKey(e,"Esc")&&this.isFullscreen()===!0&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,Ve($,"keydown",this.boundFullWindowOnEscKey_),$.documentElement.style.overflow=this.docOrigOverflow,Wa($.body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(e){if(e===void 0)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(e){if(e!==void 0){this.isInPictureInPicture_=!!e,this.togglePictureInPictureClass_();return}return!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&C.documentPictureInPicture){const e=$.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add("vjs-pip-container"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Q("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),C.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(t=>(Vp(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger("enterpictureinpicture"),t.addEventListener("pagehide",i=>{const r=i.target.querySelector(".video-js");e.parentNode.replaceChild(r,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")}),t))}return"pictureInPictureEnabled"in $&&this.disablePictureInPicture()===!1?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){if(C.documentPictureInPicture&&C.documentPictureInPicture.window)return C.documentPictureInPicture.window.close(),Promise.resolve();if("pictureInPictureEnabled"in $)return $.exitPictureInPicture()}handleKeyDown(e){const{userActions:t}=this.options_;!t||!t.hotkeys||(r=>{const n=r.tagName.toLowerCase();if(r.isContentEditable)return!0;const a=["button","checkbox","hidden","radio","reset","submit"];return n==="input"?a.indexOf(r.type)===-1:["textarea"].indexOf(n)!==-1})(this.el_.ownerDocument.activeElement)||(typeof t.hotkeys=="function"?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=a=>X.isEventKey(a,"f"),muteKey:r=a=>X.isEventKey(a,"m"),playPauseKey:n=a=>X.isEventKey(a,"k")||X.isEventKey(a,"Space")}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const a=N.getComponent("FullscreenToggle");$[this.fsApi_.fullscreenEnabled]!==!1&&a.prototype.handleClick.call(this,e)}else r.call(this,e)?(e.preventDefault(),e.stopPropagation(),N.getComponent("MuteToggle").prototype.handleClick.call(this,e)):n.call(this,e)&&(e.preventDefault(),e.stopPropagation(),N.getComponent("PlayToggle").prototype.handleClick.call(this,e))}canPlayType(e){let t;for(let i=0,r=this.options_.techOrder;i[o,Y.getTech(o)]).filter(([o,l])=>l?l.isSupported():(ee.error(`The "${o}" tech is undefined. Skipped browser support check for that tech.`),!1)),i=function(o,l,d){let p;return o.some(y=>l.some(_=>{if(p=d(y,_),p)return!0})),p};let r;const n=o=>(l,d)=>o(d,l),a=([o,l],d)=>{if(l.canPlaySource(d,this.options_[o.toLowerCase()]))return{source:d,tech:o}};return this.options_.sourceOrder?r=i(e,t,n(a)):r=i(t,e,a),r||!1}handleSrc_(e,t){if(typeof e>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const i=om(e);if(!i.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);return}if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),pC(this,i[0],(r,n)=>{if(this.middleware_=n,t||(this.cache_.sources=i),this.updateSourceCaches_(r),this.src_(r)){if(i.length>1)return this.handleSrc_(i.slice(1));this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),this.triggerReady();return}mC(n,this.tech_)}),i.length>1){const r=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},n=()=>{this.off("error",r)};this.one("error",r),this.one("playing",n),this.resetRetryOnError_=()=>{this.off("error",r),this.off("playing",n)}}}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return t?Jp(t.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1):!0}load(){if(this.tech_&&this.tech_.vhs){this.src(this.currentSource());return}this.techCall_("load")}reset(){if(this.paused())this.doReset_();else{const e=this.play();Lt(e.then(()=>this.doReset_()))}}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),Zt(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:r}=this.controlBar||{},{seekBar:n}=i||{};e&&e.updateContent(),t&&t.updateContent(),r&&r.updateContent(),n&&(n.update(),n.loadProgressBar&&n.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){const e=this.currentSource(),t=[];return Object.keys(e).length!==0&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(e){if(e!==void 0){this.techCall_("setPreload",e),this.options_.preload=e;return}return this.techGet_("preload")}autoplay(e){if(e===void 0)return this.options_.autoplay||!1;let t;typeof e=="string"&&/(any|play|muted)/.test(e)||e===!0&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(typeof e=="string"?e:"play"),t=!1):e?this.options_.autoplay=!0:this.options_.autoplay=!1,t=typeof t>"u"?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)}playsinline(e){return e!==void 0&&(this.techCall_("setPlaysinline",e),this.options_.playsinline=e),this.techGet_("playsinline")}loop(e){if(e!==void 0){this.techCall_("setLoop",e),this.options_.loop=e;return}return this.techGet_("loop")}poster(e){if(e===void 0)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}}controls(e){if(e===void 0)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(e===void 0)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))}error(e){if(e===void 0)return this.error_||null;if(gi("beforeerror").forEach(t=>{const i=t(this,e);if(!(Ut(i)&&!Array.isArray(i)||typeof i=="string"||typeof i=="number"||i===null)){this.log.error("please return a value that MediaError expects in beforeerror hooks");return}e=i}),this.options_.suppressNotSupportedError&&e&&e.code===4){const t=function(){this.error(e)};this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),this.one("loadstart",function(){this.off(["click","touchstart"],t)});return}if(e===null){this.error_=null,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close();return}this.error_=new be(e),this.addClass("vjs-error"),ee.error(`(CODE:${this.error_.code} ${be.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),gi("error").forEach(t=>t(this,this.error_))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(e===void 0)return this.userActive_;if(e=!!e,e!==this.userActive_){if(this.userActive_=e,this.userActive_){this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive");return}this.tech_&&this.tech_.one("mousemove",function(t){t.stopPropagation(),t.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}}listenForUserActivity_(){let e,t,i;const r=de(this,this.reportUserActivity),n=function(y){(y.screenX!==t||y.screenY!==i)&&(t=y.screenX,i=y.screenY,r())},a=function(){r(),this.clearInterval(e),e=this.setInterval(r,250)},o=function(y){r(),this.clearInterval(e)};this.on("mousedown",a),this.on("mousemove",n),this.on("mouseup",o),this.on("mouseleave",o);const l=this.getChild("controlBar");l&&!Qe&&!Ft&&(l.on("mouseenter",function(y){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),l.on("mouseleave",function(y){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",r),this.on("keyup",r);let d;const p=function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(d);const y=this.options_.inactivityTimeout;y<=0||(d=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},y))};this.setInterval(p,250)}playbackRate(e){if(e!==void 0){this.techCall_("setPlaybackRate",e);return}return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1}defaultPlaybackRate(e){return e!==void 0?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(e){if(e!==void 0){this.isAudio_=!!e;return}return!!this.isAudio_}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");const e=this.children(),t=this.getChild("ControlBar"),i=t&&t.currentHeight();e.forEach(r=>{r!==t&&r.el_&&!r.hasClass("vjs-hidden")&&(r.hide(),this.audioOnlyCache_.hiddenChildren.push(r))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.height(i),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.audioOnlyCache_.hiddenChildren.forEach(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(e){if(typeof e!="boolean"||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const t=[];return this.isInPictureInPicture()&&t.push(this.exitPictureInPicture()),this.isFullscreen()&&t.push(this.exitFullscreen()),this.audioPosterMode()&&t.push(this.audioPosterMode(!1)),Promise.all(t).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(e){return typeof e!="boolean"||e===this.audioPosterMode_?this.audioPosterMode_:(this.audioPosterMode_=e,e?this.audioOnlyMode()?this.audioOnlyMode(!1).then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.disablePosterModeUI_()}))}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(e===void 0)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Zt(this)&&this.trigger("languagechange"))}languages(){return ce(os.prototype.options_.languages,this.languages_)}toJSON(){const e=ce(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i{this.removeChild(i)}),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;ithis.addRemoteTextTrack(y,!1)),this.titleBar&&this.titleBar.update({title:p,description:a||r||""}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t=this.currentSources(),i=Array.prototype.map.call(this.remoteTextTracks(),n=>({kind:n.kind,label:n.label,language:n.language,src:n.src})),r={src:t,textTracks:i};return e&&(r.poster=e,r.artwork=[{src:r.poster,type:pa(r.poster)}]),r}return ce(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=di(e),r=i["data-setup"];if(wr(e,"vjs-fill")&&(i.fill=!0),wr(e,"vjs-fluid")&&(i.fluid=!0),r!==null){const[n,a]=B1(r||"{}");n&&ee.error(n),Object.assign(i,a)}if(Object.assign(t,i),e.hasChildNodes()){const n=e.childNodes;for(let a=0,o=n.length;atypeof t=="number")&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}};We.names.forEach(function(s){const e=We[s];Re.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}});Re.prototype.crossorigin=Re.prototype.crossOrigin;Re.players={};const dr=C.navigator;Re.prototype.options_={techOrder:Y.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:dr&&(dr.languages&&dr.languages[0]||dr.userLanguage||dr.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,enableSmoothSeeking:!1};Om.forEach(function(s){Re.prototype[`handleTech${xe(s)}_`]=function(){return this.trigger(s)}});N.registerComponent("Player",Re);const ma="plugin",ys="activePlugins_",ls={},ga=s=>ls.hasOwnProperty(s),Qn=s=>ga(s)?ls[s]:void 0,Rm=(s,e)=>{s[ys]=s[ys]||{},s[ys][e]=!0},ya=(s,e,t)=>{const i=(t?"before":"")+"pluginsetup";s.trigger(i,e),s.trigger(i+":"+e.name,e)},tw=function(s,e){const t=function(){ya(this,{name:s,plugin:e,instance:null},!0);const i=e.apply(this,arguments);return Rm(this,s),ya(this,{name:s,plugin:e,instance:i}),i};return Object.keys(e).forEach(function(i){t[i]=e[i]}),t},yh=(s,e)=>(e.prototype.name=s,function(...t){ya(this,{name:s,plugin:e,instance:null},!0);const i=new e(this,...t);return this[s]=()=>i,ya(this,i.getEventHash()),i});class st{constructor(e){if(this.constructor===st)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),xl(this),delete this.trigger,Qp(this,this.constructor.defaultState),Rm(e,this.name),this.dispose=this.dispose.bind(this),e.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return $s(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[ys][e]=!1,this.player=this.state=null,t[e]=yh(e,ls[e])}static isBasic(e){const t=typeof e=="string"?Qn(e):e;return typeof t=="function"&&!st.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(typeof e!="string")throw new Error(`Illegal plugin name, "${e}", must be a string, was ${typeof e}.`);if(ga(e))ee.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(Re.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, "${e}", cannot share a name with an existing player method!`);if(typeof t!="function")throw new Error(`Illegal plugin for "${e}", must be a function, was ${typeof t}.`);return ls[e]=t,e!==ma&&(st.isBasic(t)?Re.prototype[e]=tw(e,t):Re.prototype[e]=yh(e,t)),t}static deregisterPlugin(e){if(e===ma)throw new Error("Cannot de-register base plugin.");ga(e)&&(delete ls[e],delete Re.prototype[e])}static getPlugins(e=Object.keys(ls)){let t;return e.forEach(i=>{const r=Qn(i);r&&(t=t||{},t[i]=r)}),t}static getPluginVersion(e){const t=Qn(e);return t&&t.VERSION||""}}st.getPlugin=Qn;st.BASE_PLUGIN_NAME=ma;st.registerPlugin(ma,st);Re.prototype.usingPlugin=function(s){return!!this[ys]&&this[ys][s]===!0};Re.prototype.hasPlugin=function(s){return!!ga(s)};function iw(s,e){let t=!1;return function(...i){return t||ee.warn(s),t=!0,e.apply(this,i)}}function Dt(s,e,t,i){return iw(`${e} is deprecated and will be removed in ${s}.0; please use ${t} instead.`,i)}var sw={UnsupportedSidxContainer:"unsupported-sidx-container-error",DashManifestSidxParsingError:"dash-manifest-sidx-parsing-error",HlsPlaylistRequestError:"hls-playlist-request-error",SegmentUnsupportedMediaFormat:"segment-unsupported-media-format-error",UnsupportedMediaInitialization:"unsupported-media-initialization-error",SegmentSwitchError:"segment-switch-error",SegmentExceedsSourceBufferQuota:"segment-exceeds-source-buffer-quota-error",SegmentAppendError:"segment-append-error",VttLoadError:"vtt-load-error",VttCueParsingError:"vtt-cue-parsing-error",EMEKeySessionCreationError:"eme-key-session-creation-error"};const Mm=s=>s.indexOf("#")===0?s.slice(1):s;function L(s,e,t){let i=L.getPlayer(s);if(i)return e&&ee.warn(`Player "${s}" is already initialised. Options will not be applied.`),t&&i.ready(t),i;const r=typeof s=="string"?yi("#"+Mm(s)):s;if(!Fs(r))throw new TypeError("The element or ID supplied is not valid. (videojs)");const a=("getRootNode"in r?r.getRootNode()instanceof C.ShadowRoot:!1)?r.getRootNode():r.ownerDocument.body;(!r.ownerDocument.defaultView||!a.contains(r))&&ee.warn("The element supplied is not included in the DOM"),e=e||{},e.restoreEl===!0&&(e.restoreEl=(r.parentNode&&r.parentNode.hasAttribute("data-vjs-player")?r.parentNode:r).cloneNode(!0)),gi("beforesetup").forEach(l=>{const d=l(r,ce(e));if(!Ut(d)||Array.isArray(d)){ee.error("please return an object in beforesetup hooks");return}e=ce(e,d)});const o=N.getComponent("Player");return i=new o(r,e,t),gi("setup").forEach(l=>l(i)),i}L.hooks_=Yt;L.hooks=gi;L.hook=BE;L.hookOnce=UE;L.removeHook=xp;if(C.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&Us()){let s=yi(".vjs-styles-defaults");if(!s){s=Gp("vjs-styles-defaults");const e=yi("head");e&&e.insertBefore(s,e.firstChild),Wp(s,` + .video-js { + width: 300px; + height: 150px; + } + + .vjs-fluid:not(.vjs-audio-only-mode) { + padding-top: 56.25% + } + `)}}xu(1,L);L.VERSION=yu;L.options=Re.prototype.options_;L.getPlayers=()=>Re.players;L.getPlayer=s=>{const e=Re.players;let t;if(typeof s=="string"){const i=Mm(s),r=e[i];if(r)return r;t=yi("#"+i)}else t=s;if(Fs(t)){const{player:i,playerId:r}=t;if(i||e[r])return i||e[r]}};L.getAllPlayers=()=>Object.keys(Re.players).map(s=>Re.players[s]).filter(Boolean);L.players=Re.players;L.getComponent=N.getComponent;L.registerComponent=(s,e)=>(Y.isTech(e)&&ee.warn(`The ${s} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),N.registerComponent.call(N,s,e));L.getTech=Y.getTech;L.registerTech=Y.registerTech;L.use=fC;Object.defineProperty(L,"middleware",{value:{},writeable:!1,enumerable:!0});Object.defineProperty(L.middleware,"TERMINATOR",{value:fa,writeable:!1,enumerable:!0});L.browser=qE;L.obj=jE;L.mergeOptions=Dt(9,"videojs.mergeOptions","videojs.obj.merge",ce);L.defineLazyProperty=Dt(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",qa);L.bind=Dt(9,"videojs.bind","native Function.prototype.bind",de);L.registerPlugin=st.registerPlugin;L.deregisterPlugin=st.deregisterPlugin;L.plugin=(s,e)=>(ee.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),st.registerPlugin(s,e));L.getPlugins=st.getPlugins;L.getPlugin=st.getPlugin;L.getPluginVersion=st.getPluginVersion;L.addLanguage=function(s,e){return s=(""+s).toLowerCase(),L.options.languages=ce(L.options.languages,{[s]:e}),L.options.languages[s]};L.log=ee;L.createLogger=Ep;L.time=iC;L.createTimeRange=Dt(9,"videojs.createTimeRange","videojs.time.createTimeRanges",wt);L.createTimeRanges=Dt(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",wt);L.formatTime=Dt(9,"videojs.formatTime","videojs.time.formatTime",Wi);L.setFormatTime=Dt(9,"videojs.setFormatTime","videojs.time.setFormatTime",em);L.resetFormatTime=Dt(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",tm);L.parseUrl=Dt(9,"videojs.parseUrl","videojs.url.parseUrl",wl);L.isCrossOrigin=Dt(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",eo);L.EventTarget=Tt;L.any=Sl;L.on=ht;L.one=Ja;L.off=Ve;L.trigger=$s;L.xhr=Af;L.TextTrack=sn;L.AudioTrack=nm;L.VideoTrack=am;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(s=>{L[s]=function(){return ee.warn(`videojs.${s}() is deprecated; use videojs.dom.${s}() instead`),Hp[s].apply(null,arguments)}});L.computedStyle=Dt(9,"videojs.computedStyle","videojs.dom.computedStyle",Os);L.dom=Hp;L.fn=YE;L.num=OC;L.str=eC;L.url=dC;L.Error=sw;/*! @name videojs-contrib-quality-levels @version 4.0.0 @license Apache-2.0 */class rw{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,"enabled",{get(){return t.enabled_()},set(i){t.enabled_(i)}}),t}}class _a extends L.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get(){return e.selectedIndex_}}),Object.defineProperty(e,"length",{get(){return e.levels_.length}}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new rw(e),""+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t}removeQualityLevel(e){let t=null;for(let i=0,r=this.length;ii&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t}getQualityLevelById(e){for(let t=0,i=this.length;ti,s.qualityLevels.VERSION=Nm,i},Bm=function(s){return nw(this,L.obj.merge({},s))};L.registerPlugin("qualityLevels",Bm);Bm.VERSION=Nm;/*! @name @videojs/http-streaming @version 3.11.1 @license Apache-2.0 */const it=Ma,va=(s,e)=>e&&e.responseURL&&s!==e.responseURL?e.responseURL:s,bt=s=>L.log.debug?L.log.debug.bind(L,"VHS:",`${s} >`):function(){};function re(...s){const e=L.obj||L;return(e.merge||e.mergeOptions).apply(e,s)}function qe(...s){const e=L.time||L;return(e.createTimeRanges||e.createTimeRanges).apply(e,s)}const Et=1/30,Ot=Et*3,Um=function(s,e){const t=[];let i;if(s&&s.length)for(i=0;i=e})},$n=function(s,e){return Um(s,function(t){return t-Et>=e})},aw=function(s){if(s.length<2)return qe();const e=[];for(let t=1;t{const e=[];if(!s||!s.length)return"";for(let t=0;t "+s.end(t));return e.join(", ")},uw=function(s,e,t=1){return((s.length?s.end(s.length-1):0)-e)/t},Ni=s=>{const e=[];for(let t=0;tn)){if(e>r&&e<=n){t+=n-e;continue}t+=n-r}}return t},zl=(s,e)=>{if(!e.preload)return e.duration;let t=0;return(e.parts||[]).forEach(function(i){t+=i.duration}),(e.preloadHints||[]).forEach(function(i){i.type==="PART"&&(t+=s.partTargetDuration)}),t},Iu=s=>(s.segments||[]).reduce((e,t,i)=>(t.parts?t.parts.forEach(function(r,n){e.push({duration:r.duration,segmentIndex:i,partIndex:n,part:r,segment:t})}):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e),[]),$m=s=>{const e=s.segments&&s.segments.length&&s.segments[s.segments.length-1];return e&&e.parts||[]},jm=({preloadSegment:s})=>{if(!s)return;const{parts:e,preloadHints:t}=s;let i=(t||[]).reduce((r,n)=>r+(n.type==="PART"?1:0),0);return i+=e&&e.length?e.length:0,i},qm=(s,e)=>{if(e.endList)return 0;if(s&&s.suggestedPresentationDelay)return s.suggestedPresentationDelay;const t=$m(e).length>0;return t&&e.serverControl&&e.serverControl.partHoldBack?e.serverControl.partHoldBack:t&&e.partTargetDuration?e.partTargetDuration*3:e.serverControl&&e.serverControl.holdBack?e.serverControl.holdBack:e.targetDuration?e.targetDuration*3:0},cw=function(s,e){let t=0,i=e-s.mediaSequence,r=s.segments[i];if(r){if(typeof r.start<"u")return{result:r.start,precise:!0};if(typeof r.end<"u")return{result:r.end-r.duration,precise:!0}}for(;i--;){if(r=s.segments[i],typeof r.end<"u")return{result:t+r.end,precise:!0};if(t+=zl(s,r),typeof r.start<"u")return{result:t+r.start,precise:!0}}return{result:t,precise:!1}},dw=function(s,e){let t=0,i,r=e-s.mediaSequence;for(;r"u"&&(e=s.mediaSequence+s.segments.length),e"u"){if(s.totalDuration)return s.totalDuration;if(!s.endList)return C.Infinity}return Vm(s,e,t)},kr=function({defaultDuration:s,durationList:e,startIndex:t,endIndex:i}){let r=0;if(t>i&&([t,i]=[i,t]),t<0){for(let n=t;n0)for(let d=l-1;d>=0;d--){const p=o[d];if(a+=p.duration,n){if(a<0)continue}else if(a+Et<=0)continue;return{partIndex:p.partIndex,segmentIndex:p.segmentIndex,startTime:r-kr({defaultDuration:s.targetDuration,durationList:o,startIndex:l,endIndex:d})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:e}}if(l<0){for(let d=l;d<0;d++)if(a-=s.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:e};l=0}for(let d=l;dEt,_=a===0,b=y&&a+Et>=0;if(!(_||b)){if(n){if(a>0)continue}else if(a-Et>=0)continue;return{partIndex:p.partIndex,segmentIndex:p.segmentIndex,startTime:r+kr({defaultDuration:s.targetDuration,durationList:o,startIndex:l,endIndex:d})}}}return null},Gm=function(s){return s.excludeUntil&&s.excludeUntil>Date.now()},Gl=function(s){return s.excludeUntil&&s.excludeUntil===1/0},so=function(s){const e=Gm(s);return!s.disabled&&!e},pw=function(s){return s.disabled},mw=function(s){for(let e=0;e{if(s.playlists.length===1)return!0;const t=e.attributes.BANDWIDTH||Number.MAX_VALUE;return s.playlists.filter(i=>so(i)?(i.attributes.BANDWIDTH||0)!s&&!e||!s&&e||s&&!e?!1:!!(s===e||s.id&&e.id&&s.id===e.id||s.resolvedUri&&e.resolvedUri&&s.resolvedUri===e.resolvedUri||s.uri&&e.uri&&s.uri===e.uri),vh=function(s,e){const t=s&&s.mediaGroups&&s.mediaGroups.AUDIO||{};let i=!1;for(const r in t){for(const n in t[r])if(i=e(t[r][n]),i)break;if(i)break}return!!i},on=s=>{if(!s||!s.playlists||!s.playlists.length)return vh(s,t=>t.playlists&&t.playlists.length||t.uri);for(let e=0;eOf(n))||vh(s,n=>Wl(t,n))))return!1}return!0};var Ye={liveEdgeDelay:qm,duration:Hm,seekable:hw,getMediaInfoForTime:fw,isEnabled:so,isDisabled:pw,isExcluded:Gm,isIncompatible:Gl,playlistEnd:zm,isAes:mw,hasAttribute:Wm,estimateSegmentRequestTime:gw,isLowestEnabledRendition:Lu,isAudioOnly:on,playlistMatch:Wl,segmentDurationWithParts:zl};const{log:Km}=L,_s=(s,e)=>`${s}-${e}`,Xm=(s,e,t)=>`placeholder-uri-${s}-${e}-${t}`,yw=({onwarn:s,oninfo:e,manifestString:t,customTagParsers:i=[],customTagMappers:r=[],llhls:n})=>{const a=new RS;s&&a.on("warn",s),e&&a.on("info",e),i.forEach(d=>a.addParser(d)),r.forEach(d=>a.addTagMapper(d)),a.push(t),a.end();const o=a.manifest;if(n||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(d){o.hasOwnProperty(d)&&delete o[d]}),o.segments&&o.segments.forEach(function(d){["parts","preloadHints"].forEach(function(p){d.hasOwnProperty(p)&&delete d[p]})})),!o.targetDuration){let d=10;o.segments&&o.segments.length&&(d=o.segments.reduce((p,y)=>Math.max(p,y.duration),0)),s&&s({message:`manifest has no targetDuration defaulting to ${d}`}),o.targetDuration=d}const l=$m(o);if(l.length&&!o.partTargetDuration){const d=l.reduce((p,y)=>Math.max(p,y.duration),0);s&&(s({message:`manifest has no partTargetDuration defaulting to ${d}`}),Km.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),o.partTargetDuration=d}return o},Hs=(s,e)=>{s.mediaGroups&&["AUDIO","SUBTITLES"].forEach(t=>{if(s.mediaGroups[t])for(const i in s.mediaGroups[t])for(const r in s.mediaGroups[t][i]){const n=s.mediaGroups[t][i][r];e(n,t,i,r)}})},Ym=({playlist:s,uri:e,id:t})=>{s.id=t,s.playlistErrors_=0,e&&(s.uri=e),s.attributes=s.attributes||{}},_w=s=>{let e=s.playlists.length;for(;e--;){const t=s.playlists[e];Ym({playlist:t,id:_s(e,t.uri)}),t.resolvedUri=it(s.uri,t.uri),s.playlists[t.id]=t,s.playlists[t.uri]=t,t.attributes.BANDWIDTH||Km.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},vw=s=>{Hs(s,e=>{e.uri&&(e.resolvedUri=it(s.uri,e.uri))})},Tw=(s,e)=>{const t=_s(0,e),i={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:C.location.href,resolvedUri:C.location.href,playlists:[{uri:e,id:t,resolvedUri:e,attributes:{}}]};return i.playlists[t]=i.playlists[0],i.playlists[e]=i.playlists[0],i},Qm=(s,e,t=Xm)=>{s.uri=e;for(let r=0;r{if(!r.playlists||!r.playlists.length){if(i&&n==="AUDIO"&&!r.uri)for(let l=0;l(r.set(n.id,n),r),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(this.offset_===null)return[];const e={},t=[];this.pendingDateRanges_.forEach((i,r)=>{if(!this.processedDateRanges_.has(r)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),!!i.class))if(e[i.class]){const n=e[i.class].push(i);i.classListIndex=n-1}else e[i.class]=[i],i.classListIndex=0});for(const i of t){const r=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&r[i.classListIndex+1]?i.endTime=r[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach((i,r)=>{i.startDate.getTime(){if(e.endList||!e.serverControl)return s;const t={};if(e.serverControl.canBlockReload){const{preloadSegment:i}=e;let r=e.mediaSequence+e.segments.length;if(i){const n=i.parts||[],a=jm(e)-1;a>-1&&a!==n.length-1&&(t._HLS_part=a),(a>-1||n.length)&&r--}t._HLS_msn=r}if(e.serverControl&&e.serverControl.canSkipUntil&&(t._HLS_skip=e.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(t).length){const i=new C.URL(s);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(r){t.hasOwnProperty(r)&&i.searchParams.set(r,t[r])}),s=i.toString()}return s},xw=(s,e)=>{if(!s)return e;const t=re(s,e);if(s.preloadHints&&!e.preloadHints&&delete t.preloadHints,s.parts&&!e.parts)delete t.parts;else if(s.parts&&e.parts)for(let i=0;i{const i=s.slice(),r=e.slice();t=t||0;const n=[];let a;for(let o=0;o{!s.resolvedUri&&s.uri&&(s.resolvedUri=it(e,s.uri)),s.key&&!s.key.resolvedUri&&(s.key.resolvedUri=it(e,s.key.uri)),s.map&&!s.map.resolvedUri&&(s.map.resolvedUri=it(e,s.map.uri)),s.map&&s.map.key&&!s.map.key.resolvedUri&&(s.map.key.resolvedUri=it(e,s.map.key.uri)),s.parts&&s.parts.length&&s.parts.forEach(t=>{t.resolvedUri||(t.resolvedUri=it(e,t.uri))}),s.preloadHints&&s.preloadHints.length&&s.preloadHints.forEach(t=>{t.resolvedUri||(t.resolvedUri=it(e,t.uri))})},Zm=function(s){const e=s.segments||[],t=s.preloadSegment;if(t&&t.parts&&t.parts.length){if(t.preloadHints){for(let i=0;is===e||s.segments&&e.segments&&s.segments.length===e.segments.length&&s.endList===e.endList&&s.mediaSequence===e.mediaSequence&&s.preloadSegment===e.preloadSegment,Ou=(s,e,t=eg)=>{const i=re(s,{}),r=i.playlists[e.id];if(!r||t(r,e))return null;e.segments=Zm(e);const n=re(r,e);if(n.preloadSegment&&!e.preloadSegment&&delete n.preloadSegment,r.segments){if(e.skip){e.segments=e.segments||[];for(let a=0;a{Jm(a,n.resolvedUri)});for(let a=0;a{if(a.playlists)for(let p=0;p{const t=s.segments||[],i=t[t.length-1],r=i&&i.parts&&i.parts[i.parts.length-1],n=r&&r.duration||i&&i.duration;return e&&n?n*1e3:(s.partTargetDuration||s.targetDuration||10)*500};class ds extends bw{constructor(e,t,i={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=bt("PlaylistLoader");const{withCredentials:r=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=r,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const n=t.options_;this.customTagParsers=n&&n.customTagParsers||[],this.customTagMappers=n&&n.customTagMappers||[],this.llhls=n&&n.llhls,this.dateRangesStorage_=new Th,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();!t.length||!this.addDateRangesToTextTrack_||this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(this.state!=="HAVE_METADATA")return;const e=this.media();let t=it(this.main.uri,e.uri);this.llhls&&(t=Sw(t,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:"hls-playlist"},(i,r)=>{if(this.request){if(i)return this.playlistRequestError(this.request,this.media(),"HAVE_METADATA");this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}})}playlistRequestError(e,t,i){const{uri:r,id:n}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[n],status:e.status,message:`HLS playlist request error at URL: ${r}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:{errorType:L.Error.HlsPlaylistRequestError}},this.trigger("error")}parseManifest_({url:e,manifestString:t}){return yw({onwarn:({message:i})=>this.logger_(`m3u8-parser warn for ${e}: ${i}`),oninfo:({message:i})=>this.logger_(`m3u8-parser info for ${e}: ${i}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls})}haveMetadata({playlistString:e,playlistObject:t,url:i,id:r}){this.request=null,this.state="HAVE_METADATA";const n=t||this.parseManifest_({url:i,manifestString:e});n.lastRequest=Date.now(),Ym({playlist:n,uri:i,id:r});const a=Ou(this.main,n);this.targetDuration=n.partTargetDuration||n.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[r]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Ru(this.media(),!!a)),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),C.clearTimeout(this.mediaUpdateTimeout),C.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new Th,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);if(typeof e=="string"){if(!this.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.main.playlists[e]}if(C.clearTimeout(this.finalRenditionTimeout),t){const a=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=C.setTimeout(this.media.bind(this,e,!1),a);return}const i=this.state,r=!this.media_||e.id!==this.media_.id,n=this.main.playlists[e.id];if(n&&n.endList||e.endList&&e.segments.length){this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,r&&(this.trigger("mediachanging"),i==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange"));return}if(this.updateMediaUpdateTimeout_(Ru(e,!0)),!!r){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e,this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},(a,o)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=va(e.resolvedUri,o),a)return this.playlistRequestError(this.request,e,i);this.haveMetadata({playlistString:o.responseText,url:e.uri,id:e.id}),i==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}}pause(){this.mediaUpdateTimeout&&(C.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),this.state==="HAVE_NOTHING"&&(this.started=!1),this.state==="SWITCHING_MEDIA"?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":this.state==="HAVE_CURRENT_METADATA"&&(this.state="HAVE_METADATA")}load(e){this.mediaUpdateTimeout&&(C.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const i=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=C.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},i);return}if(!this.started){this.start();return}t&&!t.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist")}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(C.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),!(!this.media()||this.media().endList)&&(this.mediaUpdateTimeout=C.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(e)},e))}start(){if(this.started=!0,typeof this.src=="object"){this.src.uri||(this.src.uri=C.location.href),this.src.resolvedUri=this.src.uri,setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);return}this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:"hls-playlist"},(e,t)=>{if(!this.request)return;if(this.request=null,e)return this.error={status:t.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:t.responseText,code:2,metadata:{errorType:L.Error.HlsPlaylistRequestError}},this.state==="HAVE_NOTHING"&&(this.started=!1),this.trigger("error");this.src=va(this.src,t);const i=this.parseManifest_({manifestString:t.responseText,url:this.src});this.setupInitialPlaylist(i)})}srcUri(){return typeof this.src=="string"?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state="HAVE_MAIN_MANIFEST",e.playlists){this.main=e,Qm(this.main,this.srcUri()),e.playlists.forEach(i=>{i.segments=Zm(i),i.segments.forEach(r=>{Jm(r,i.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0]);return}const t=this.srcUri()||C.location.href;this.main=Tw(e,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}updateOrDeleteClone(e,t){const i=this.main,r=e.ID;let n=i.playlists.length;for(;n--;){const a=i.playlists[n];if(a.attributes["PATHWAY-ID"]===r){const o=a.resolvedUri,l=a.id;if(t){const d=this.createCloneURI_(a.resolvedUri,e),p=_s(r,d),y=this.createCloneAttributes_(r,a.attributes),_=this.createClonePlaylist_(a,p,e,y);i.playlists[n]=_,i.playlists[p]=_,i.playlists[d]=_}else i.playlists.splice(n,1);delete i.playlists[l],delete i.playlists[o]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,r=e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(n=>{if(!(!i.mediaGroups[n]||!i.mediaGroups[n][r])){for(const a in i.mediaGroups[n])if(a===r){for(const o in i.mediaGroups[n][a])i.mediaGroups[n][a][o].playlists.forEach((d,p)=>{const y=i.playlists[d.id],_=y.id,b=y.resolvedUri;delete i.playlists[_],delete i.playlists[b]});delete i.mediaGroups[n][a]}}}),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,r=i.playlists.length,n=this.createCloneURI_(t.resolvedUri,e),a=_s(e.ID,n),o=this.createCloneAttributes_(e.ID,t.attributes),l=this.createClonePlaylist_(t,a,e,o);i.playlists[r]=l,i.playlists[a]=l,i.playlists[n]=l,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e["BASE-ID"],r=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(n=>{if(!(!r.mediaGroups[n]||r.mediaGroups[n][t]))for(const a in r.mediaGroups[n]){if(a===i)r.mediaGroups[n][t]={};else continue;for(const o in r.mediaGroups[n][a]){const l=r.mediaGroups[n][a][o];r.mediaGroups[n][t][o]=yt({},l);const d=r.mediaGroups[n][t][o],p=this.createCloneURI_(l.resolvedUri,e);d.resolvedUri=p,d.uri=p,d.playlists=[],l.playlists.forEach((y,_)=>{const b=r.playlists[y.id],v=Xm(n,t,o),x=_s(t,v);if(b&&!r.playlists[x]){const D=this.createClonePlaylist_(b,x,e),A=D.resolvedUri;r.playlists[x]=D,r.playlists[A]=D}d.playlists[_]=this.createClonePlaylist_(y,x,e)})}}})}createClonePlaylist_(e,t,i,r){const n=this.createCloneURI_(e.resolvedUri,i),a={resolvedUri:n,uri:n,id:t};return e.segments&&(a.segments=[]),r&&(a.attributes=r),re(e,a)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t["URI-REPLACEMENT"].HOST;const r=t["URI-REPLACEMENT"].PARAMS;for(const n of Object.keys(r))i.searchParams.set(n,r[n]);return i.href}createCloneAttributes_(e,t){const i={"PATHWAY-ID":e};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(r=>{t[r]&&(i[r]=e)}),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const r=e.contentProtection[i].attributes.keyId;r&&t.add(r.toLowerCase())}return t}}}const Mu=function(s,e,t,i){const r=s.responseType==="arraybuffer"?s.response:s.responseText;!e&&r&&(s.responseTime=Date.now(),s.roundTripTime=s.responseTime-s.requestTime,s.bytesReceived=r.byteLength||r.length,s.bandwidth||(s.bandwidth=Math.floor(s.bytesReceived/s.roundTripTime*8*1e3))),t.headers&&(s.responseHeaders=t.headers),e&&e.code==="ETIMEDOUT"&&(s.timedout=!0),!e&&!s.aborted&&t.statusCode!==200&&t.statusCode!==206&&t.statusCode!==0&&(e=new Error("XHR Failed with a response of: "+(s&&(r||s.responseText)))),i(e,s)},Cw=(s,e)=>{if(!s||!s.size)return;let t=e;return s.forEach(i=>{t=i(t)}),t},ww=(s,e,t,i)=>{!s||!s.size||s.forEach(r=>{r(e,t,i)})},tg=function(){const s=function e(t,i){t=re({timeout:45e3},t);const r=e.beforeRequest||L.Vhs.xhr.beforeRequest,n=e._requestCallbackSet||L.Vhs.xhr._requestCallbackSet||new Set,a=e._responseCallbackSet||L.Vhs.xhr._responseCallbackSet;r&&typeof r=="function"&&(L.log.warn("beforeRequest is deprecated, use onRequest instead."),n.add(r));const o=L.Vhs.xhr.original===!0?L.xhr:L.Vhs.xhr,l=Cw(n,t);n.delete(r);const d=o(l||t,function(y,_){return ww(a,d,y,_),Mu(d,y,_,i)}),p=d.abort;return d.abort=function(){return d.aborted=!0,p.apply(d,arguments)},d.uri=t.uri,d.requestTime=Date.now(),d};return s.original=!0,s},Aw=function(s){let e;const t=s.offset;return typeof s.offset=="bigint"||typeof s.length=="bigint"?e=C.BigInt(s.offset)+C.BigInt(s.length)-C.BigInt(1):e=s.offset+s.length-1,"bytes="+t+"-"+e},Nu=function(s){const e={};return s.byterange&&(e.Range=Aw(s.byterange)),e},Dw=function(s,e){return s.start(e)+"-"+s.end(e)},kw=function(s,e){const t=s.toString(16);return"00".substring(0,2-t.length)+t+(e%2?" ":"")},Pw=function(s){return s>=32&&s<126?String.fromCharCode(s):"."},ig=function(s){const e={};return Object.keys(s).forEach(t=>{const i=s[t];Mf(i)?e[t]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}:e[t]=i}),e},Ta=function(s){const e=s.byterange||{length:1/0,offset:0};return[e.length,e.offset,s.resolvedUri].join(",")},sg=function(s){return s.resolvedUri},rg=s=>{const e=Array.prototype.slice.call(s),t=16;let i="",r,n;for(let a=0;arg(s),Lw=s=>{let e="",t;for(t=0;t{if(!e.dateTimeObject)return null;const t=e.videoTimingInfo.transmuxerPrependedSeconds,r=e.videoTimingInfo.transmuxedPresentationStart+t,n=s-r;return new Date(e.dateTimeObject.getTime()+n*1e3)},Mw=s=>s.transmuxedPresentationEnd-s.transmuxedPresentationStart-s.transmuxerPrependedSeconds,Nw=(s,e)=>{let t;try{t=new Date(s)}catch{return null}if(!e||!e.segments||e.segments.length===0)return null;let i=e.segments[0];if(to?null:(t>new Date(n)&&(i=r),{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:Ye.duration(e,e.mediaSequence+e.segments.indexOf(i)),type:i.videoTimingInfo?"accurate":"estimate"})},Bw=(s,e)=>{if(!e||!e.segments||e.segments.length===0)return null;let t=0,i;for(let n=0;nt){if(s>t+r.duration*ng)return null;i=r}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:t-i.duration,type:i.videoTimingInfo?"accurate":"estimate"}},Uw=(s,e)=>{let t,i;try{t=new Date(s),i=new Date(e)}catch{}const r=t.getTime();return(i.getTime()-r)/1e3},Fw=s=>{if(!s.segments||s.segments.length===0)return!1;for(let e=0;e{if(!t)throw new Error("getProgramTime: callback must be provided");if(!s||e===void 0)return t({message:"getProgramTime: playlist and time must be provided"});const i=Bw(e,s);if(!i)return t({message:"valid programTime was not found"});if(i.type==="estimate")return t({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:i.estimatedStart});const r={mediaSeconds:e},n=Rw(e,i.segment);return n&&(r.programDateTime=n.toISOString()),t(null,r)},ag=({programTime:s,playlist:e,retryCount:t=2,seekTo:i,pauseAfterSeek:r=!0,tech:n,callback:a})=>{if(!a)throw new Error("seekToProgramTime: callback must be provided");if(typeof s>"u"||!e||!i)return a({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!e.endList&&!n.hasStarted_)return a({message:"player must be playing a live stream to start buffering"});if(!Fw(e))return a({message:"programDateTime tags must be provided in the manifest "+e.resolvedUri});const o=Nw(s,e);if(!o)return a({message:`${s} was not found in the stream`});const l=o.segment,d=Uw(l.dateTimeObject,s);if(o.type==="estimate"){if(t===0)return a({message:`${s} is not buffered yet. Try again`});i(o.estimatedStart+d),n.one("seeked",()=>{ag({programTime:s,playlist:e,retryCount:t-1,seekTo:i,pauseAfterSeek:r,tech:n,callback:a})});return}const p=l.start+d,y=()=>a(null,n.currentTime());n.one("seeked",y),r&&n.pause(),i(p)},iu=(s,e)=>{if(s.readyState===4)return e()},jw=(s,e,t)=>{let i=[],r,n=!1;const a=function(p,y,_,b){return y.abort(),n=!0,t(p,y,_,b)},o=function(p,y){if(n)return;if(p)return a(p,y,"",i);const _=y.responseText.substring(i&&i.byteLength||0,y.responseText.length);if(i=GS(i,Nf(_,!0)),r=r||vr(i),i.length<10||r&&i.lengtha(p,y,"",i));const b=fl(i);return b==="ts"&&i.length<188?iu(y,()=>a(p,y,"",i)):!b&&i.length<376?iu(y,()=>a(p,y,"",i)):a(null,y,b,i)},d=e({uri:s,beforeSend(p){p.overrideMimeType("text/plain; charset=x-user-defined"),p.addEventListener("progress",function({total:y,loaded:_}){return Mu(p,null,{statusCode:p.status},o)})}},function(p,y){return Mu(d,p,y,o)});return d},{EventTarget:qw}=L,bh=function(s,e){if(!eg(s,e)||s.sidx&&e.sidx&&(s.sidx.offset!==e.sidx.offset||s.sidx.length!==e.sidx.length))return!1;if(!s.sidx&&e.sidx||s.sidx&&!e.sidx||s.segments&&!e.segments||!s.segments&&e.segments)return!1;if(!s.segments&&!e.segments)return!0;for(let t=0;t{const r=i.attributes.NAME||t;return`placeholder-uri-${s}-${e}-${r}`},Hw=({mainXml:s,srcUrl:e,clientOffset:t,sidxMapping:i,previousManifest:r})=>{const n=mE(s,{manifestUri:e,clientOffset:t,sidxMapping:i,previousManifest:r});return Qm(n,e,Vw),n},zw=(s,e)=>{Hs(s,(t,i,r,n)=>{n in e.mediaGroups[i][r]||delete s.mediaGroups[i][r][n]})},Gw=(s,e,t)=>{let i=!0,r=re(s,{duration:e.duration,minimumUpdatePeriod:e.minimumUpdatePeriod,timelineStarts:e.timelineStarts});for(let n=0;n{if(n.playlists&&n.playlists.length){const d=n.playlists[0].id,p=Ou(r,n.playlists[0],bh);p&&(r=p,l in r.mediaGroups[a][o]||(r.mediaGroups[a][o][l]=n),r.mediaGroups[a][o][l].playlists[0]=r.playlists[d],i=!1)}}),zw(r,e),e.minimumUpdatePeriod!==s.minimumUpdatePeriod&&(i=!1),i?null:r},Ww=(s,e)=>(!s.map&&!e.map||!!(s.map&&e.map&&s.map.byterange.offset===e.map.byterange.offset&&s.map.byterange.length===e.map.byterange.length))&&s.uri===e.uri&&s.byterange.offset===e.byterange.offset&&s.byterange.length===e.byterange.length,Sh=(s,e)=>{const t={};for(const i in s){const n=s[i].sidx;if(n){const a=Fa(n);if(!e[a])break;const o=e[a].sidxInfo;Ww(o,n)&&(t[a]=e[a])}}return t},Kw=(s,e)=>{let i=Sh(s.playlists,e);return Hs(s,(r,n,a,o)=>{if(r.playlists&&r.playlists.length){const l=r.playlists;i=re(i,Sh(l,e))}}),i};class Bu extends qw{constructor(e,t,i={},r){super(),this.mainPlaylistLoader_=r||this,r||(this.isMain_=!0);const{withCredentials:n=!1}=i;if(this.vhs_=t,this.withCredentials=n,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",()=>{this.refreshXml_()}),this.on("mediaupdatetimeout",()=>{this.refreshMedia_(this.media().id)}),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=bt("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}requestErrored_(e,t,i){if(!this.request)return!0;if(this.request=null,e)return this.error=typeof e=="object"&&!(e instanceof Error)?e:{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2,metadata:e.metadata},i&&(this.state=i),this.trigger("error"),!0}addSidxSegments_(e,t,i){const r=e.sidx&&Fa(e.sidx);if(!e.sidx||!r||this.mainPlaylistLoader_.sidxMapping_[r]){this.mediaRequest_=C.setTimeout(()=>i(!1),0);return}const n=va(e.sidx.resolvedUri),a=(o,l)=>{if(this.requestErrored_(o,l,t))return;const d=this.mainPlaylistLoader_.sidxMapping_;let p;try{p=bE(z(l.response).subarray(8))}catch(y){y.metadata={errorType:L.Error.DashManifestSidxParsingError},this.requestErrored_(y,l,t);return}return d[r]={sidxInfo:e.sidx,sidx:p},cl(e,p,e.sidx.resolvedUri),i(!0)};this.request=jw(n,this.vhs_.xhr,(o,l,d,p)=>{if(o)return a(o,l);if(!d||d!=="mp4"){const b=d||"unknown";return a({status:l.status,message:`Unsupported ${b} container type for sidx segment at URL: ${n}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2,metadata:{errorType:L.Error.UnsupportedSidxContainer,sidxContainer:b}},l)}const{offset:y,length:_}=e.sidx.byterange;if(p.length>=_+y)return a(o,{response:p.subarray(y,y+_),status:l.status,uri:l.uri});this.request=this.vhs_.xhr({uri:n,responseType:"arraybuffer",headers:Nu({byterange:e.sidx.byterange})},a)})}dispose(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},C.clearTimeout(this.minimumUpdatePeriodTimeout_),C.clearTimeout(this.mediaRequest_),C.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);const t=this.state;if(typeof e=="string"){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList){this.state="HAVE_METADATA",this.media_=e,i&&(this.trigger("mediachanging"),this.trigger("mediachange"));return}i&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,t,r=>{this.haveMetadata({startingState:t,playlist:e})}))}haveMetadata({startingState:e,playlist:t}){this.state="HAVE_METADATA",this.loadedPlaylists_[t.id]=t,this.mediaRequest_=null,this.refreshMedia_(t.id),e==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),C.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(C.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1)}load(e){C.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const i=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=C.setTimeout(()=>this.load(),i);return}if(!this.started){this.start();return}t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist")}start(){if(this.started=!0,!this.isMain_){this.mediaRequest_=C.setTimeout(()=>this.haveMain_(),0);return}this.requestMain_((e,t)=>{this.haveMain_(),!this.hasPendingRequest()&&!this.media_&&this.media(this.mainPlaylistLoader_.main.playlists[0])})}requestMain_(e){this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:"dash-manifest"},(t,i)=>{if(this.requestErrored_(t,i)){this.state==="HAVE_NOTHING"&&(this.started=!1);return}const r=i.responseText!==this.mainPlaylistLoader_.mainXml_;if(this.mainPlaylistLoader_.mainXml_=i.responseText,i.responseHeaders&&i.responseHeaders.date?this.mainLoaded_=Date.parse(i.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=va(this.mainPlaylistLoader_.srcUrl,i),r){this.handleMain_(),this.syncClientServerClock_(()=>e(i,r));return}return e(i,r)})}syncClientServerClock_(e){const t=gE(this.mainPlaylistLoader_.mainXml_);if(t===null)return this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e();if(t.method==="DIRECT")return this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e();this.request=this.vhs_.xhr({uri:it(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},(i,r)=>{if(!this.request)return;if(i)return this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e();let n;t.method==="HEAD"?!r.responseHeaders||!r.responseHeaders.date?n=this.mainLoaded_:n=Date.parse(r.responseHeaders.date):n=Date.parse(r.responseText),this.mainPlaylistLoader_.clientOffset_=n-Date.now(),e()})}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main;let t=Hw({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e});e&&(t=Gw(e,t,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=t||e;const i=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];return i&&i!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=i),(!e||t&&t.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(t),!!t}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(C.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;if(t===0&&(e.media()?t=e.media().targetDuration*1e3:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),typeof t!="number"||t<=0){t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`);return}this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=C.setTimeout(()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=Kw(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,i=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(e){if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const r=()=>{this.media().endList||(this.mediaUpdateTimeout=C.setTimeout(()=>{this.trigger("mediaupdatetimeout"),r()},Ru(this.media(),!!i)))};r()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const t=this.mainPlaylistLoader_.main.eventStream.map(i=>({cueTime:i.start,frames:[{data:i.messageData}]}));this.addMetadataToTextTrack("EventStream",t,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const r=e.contentProtection[i].attributes["cenc:default_KID"];r&&t.add(r.replace(/-/g,"").toLowerCase())}return t}}}var Ne={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const Xw=s=>{const e=new Uint8Array(new ArrayBuffer(s.length));for(let t=0;t-1):!1},this.trigger=function(c){var f,h,m,g;if(f=u[c],!!f)if(arguments.length===2)for(m=f.length,h=0;h"u")){for(u in H)H.hasOwnProperty(u)&&(H[u]=[u.charCodeAt(0),u.charCodeAt(1),u.charCodeAt(2),u.charCodeAt(3)]);ie=new Uint8Array([105,115,111,109]),se=new Uint8Array([97,118,99,49]),at=new Uint8Array([0,0,0,1]),Ee=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),qt=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Ti={video:Ee,audio:qt},xi=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Si=new Uint8Array([0,0,0,0,0,0,0,0]),un=new Uint8Array([0,0,0,0,0,0,0,0]),Jl=un,Zl=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),ec=un,bi=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),o=function(u){var c=[],f=0,h,m,g;for(h=1;h>>1,u.samplingfrequencyindex<<7|u.channelcount<<3,6,1,2]))},p=function(){return o(H.ftyp,ie,at,ie,se)},U=function(u){return o(H.hdlr,Ti[u])},y=function(u){return o(H.mdat,u)},I=function(u){var c=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,u.duration>>>24&255,u.duration>>>16&255,u.duration>>>8&255,u.duration&255,85,196,0,0]);return u.samplerate&&(c[12]=u.samplerate>>>24&255,c[13]=u.samplerate>>>16&255,c[14]=u.samplerate>>>8&255,c[15]=u.samplerate&255),o(H.mdhd,c)},O=function(u){return o(H.mdia,I(u),U(u.type),b(u))},_=function(u){return o(H.mfhd,new Uint8Array([0,0,0,0,(u&4278190080)>>24,(u&16711680)>>16,(u&65280)>>8,u&255]))},b=function(u){return o(H.minf,u.type==="video"?o(H.vmhd,bi):o(H.smhd,Si),l(),J(u))},v=function(u,c){for(var f=[],h=c.length;h--;)f[h]=ue(c[h]);return o.apply(null,[H.moof,_(u)].concat(f))},x=function(u){for(var c=u.length,f=[];c--;)f[c]=k(u[c]);return o.apply(null,[H.moov,A(4294967295)].concat(f).concat(D(u)))},D=function(u){for(var c=u.length,f=[];c--;)f[c]=te(u[c]);return o.apply(null,[H.mvex].concat(f))},A=function(u){var c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(u&4278190080)>>24,(u&16711680)>>16,(u&65280)>>8,u&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return o(H.mvhd,c)},V=function(u){var c=u.samples||[],f=new Uint8Array(4+c.length),h,m;for(m=0;m>>8),g.push(h[S].byteLength&255),g=g.concat(Array.prototype.slice.call(h[S]));for(S=0;S>>8),T.push(m[S].byteLength&255),T=T.concat(Array.prototype.slice.call(m[S]));if(E=[H.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(f.width&65280)>>8,f.width&255,(f.height&65280)>>8,f.height&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o(H.avcC,new Uint8Array([1,f.profileIdc,f.profileCompatibility,f.levelIdc,255].concat([h.length],g,[m.length],T))),o(H.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],f.sarRatio){var w=f.sarRatio[0],P=f.sarRatio[1];E.push(o(H.pasp,new Uint8Array([(w&4278190080)>>24,(w&16711680)>>16,(w&65280)>>8,w&255,(P&4278190080)>>24,(P&16711680)>>16,(P&65280)>>8,P&255])))}return o.apply(null,E)},c=function(f){return o(H.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(f.channelcount&65280)>>8,f.channelcount&255,(f.samplesize&65280)>>8,f.samplesize&255,0,0,0,0,(f.samplerate&65280)>>8,f.samplerate&255,0,0]),d(f))}}(),M=function(u){var c=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(u.id&4278190080)>>24,(u.id&16711680)>>16,(u.id&65280)>>8,u.id&255,0,0,0,0,(u.duration&4278190080)>>24,(u.duration&16711680)>>16,(u.duration&65280)>>8,u.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(u.width&65280)>>8,u.width&255,0,0,(u.height&65280)>>8,u.height&255,0,0]);return o(H.tkhd,c)},ue=function(u){var c,f,h,m,g,T,S;return c=o(H.tfhd,new Uint8Array([0,0,0,58,(u.id&4278190080)>>24,(u.id&16711680)>>16,(u.id&65280)>>8,u.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),T=Math.floor(u.baseMediaDecodeTime/a),S=Math.floor(u.baseMediaDecodeTime%a),f=o(H.tfdt,new Uint8Array([1,0,0,0,T>>>24&255,T>>>16&255,T>>>8&255,T&255,S>>>24&255,S>>>16&255,S>>>8&255,S&255])),g=92,u.type==="audio"?(h=he(u,g),o(H.traf,c,f,h)):(m=V(u),h=he(u,m.length+g),o(H.traf,c,f,h,m))},k=function(u){return u.duration=u.duration||4294967295,o(H.trak,M(u),O(u))},te=function(u){var c=new Uint8Array([0,0,0,0,(u.id&4278190080)>>24,(u.id&16711680)>>16,(u.id&65280)>>8,u.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return u.type!=="video"&&(c[c.length-1]=0),o(H.trex,c)},function(){var u,c,f;f=function(h,m){var g=0,T=0,S=0,E=0;return h.length&&(h[0].duration!==void 0&&(g=1),h[0].size!==void 0&&(T=2),h[0].flags!==void 0&&(S=4),h[0].compositionTimeOffset!==void 0&&(E=8)),[0,0,g|T|S|E,1,(h.length&4278190080)>>>24,(h.length&16711680)>>>16,(h.length&65280)>>>8,h.length&255,(m&4278190080)>>>24,(m&16711680)>>>16,(m&65280)>>>8,m&255]},c=function(h,m){var g,T,S,E,w,P;for(E=h.samples||[],m+=20+16*E.length,S=f(E,m),T=new Uint8Array(S.length+E.length*16),T.set(S),g=S.length,P=0;P>>24,T[g++]=(w.duration&16711680)>>>16,T[g++]=(w.duration&65280)>>>8,T[g++]=w.duration&255,T[g++]=(w.size&4278190080)>>>24,T[g++]=(w.size&16711680)>>>16,T[g++]=(w.size&65280)>>>8,T[g++]=w.size&255,T[g++]=w.flags.isLeading<<2|w.flags.dependsOn,T[g++]=w.flags.isDependedOn<<6|w.flags.hasRedundancy<<4|w.flags.paddingValue<<1|w.flags.isNonSyncSample,T[g++]=w.flags.degradationPriority&61440,T[g++]=w.flags.degradationPriority&15,T[g++]=(w.compositionTimeOffset&4278190080)>>>24,T[g++]=(w.compositionTimeOffset&16711680)>>>16,T[g++]=(w.compositionTimeOffset&65280)>>>8,T[g++]=w.compositionTimeOffset&255;return o(H.trun,T)},u=function(h,m){var g,T,S,E,w,P;for(E=h.samples||[],m+=20+8*E.length,S=f(E,m),g=new Uint8Array(S.length+E.length*8),g.set(S),T=S.length,P=0;P>>24,g[T++]=(w.duration&16711680)>>>16,g[T++]=(w.duration&65280)>>>8,g[T++]=w.duration&255,g[T++]=(w.size&4278190080)>>>24,g[T++]=(w.size&16711680)>>>16,g[T++]=(w.size&65280)>>>8,g[T++]=w.size&255;return o(H.trun,g)},he=function(h,m){return h.type==="audio"?u(h,m):c(h,m)}}();var Jv={ftyp:p,mdat:y,moof:v,moov:x,initSegment:function(u){var c=p(),f=x(u),h;return h=new Uint8Array(c.byteLength+f.byteLength),h.set(c),h.set(f,c.byteLength),h}},Zv=function(u){var c,f,h=[],m=[];for(m.byteLength=0,m.nalCount=0,m.duration=0,h.byteLength=0,c=0;c1&&(c=u.shift(),u.byteLength-=c.byteLength,u.nalCount-=c.nalCount,u[0][0].dts=c.dts,u[0][0].pts=c.pts,u[0][0].duration+=c.duration),u},iT=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},tc=function(u,c){var f=iT();return f.dataOffset=c,f.compositionTimeOffset=u.pts-u.dts,f.duration=u.duration,f.size=4*u.length,f.size+=u.byteLength,u.keyFrame&&(f.flags.dependsOn=2,f.flags.isNonSyncSample=0),f},sT=function(u,c){var f,h,m,g,T,S=c||0,E=[];for(f=0;fcn.ONE_SECOND_IN_TS/2))){for(w=cT()[u.samplerate],w||(w=c[0].data),P=0;P=f?u:(c.minSegmentDts=1/0,u.filter(function(h){return h.dts>=f?(c.minSegmentDts=Math.min(c.minSegmentDts,h.dts),c.minSegmentPts=c.minSegmentDts,!0):!1}))},pT=function(u){var c,f,h=[];for(c=0;c=this.virtualRowCount&&typeof this.beforeRowOverflow=="function"&&this.beforeRowOverflow(u),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Vt.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},Vt.prototype.addText=function(u){this.rows[this.rowIdx]+=u},Vt.prototype.backspace=function(){if(!this.isEmpty()){var u=this.rows[this.rowIdx];this.rows[this.rowIdx]=u.substr(0,u.length-1)}};var fn=function(u,c,f){this.serviceNum=u,this.text="",this.currentWindow=new Vt(-1),this.windows=[],this.stream=f,typeof c=="string"&&this.createTextDecoder(c)};fn.prototype.init=function(u,c){this.startPts=u;for(var f=0;f<8;f++)this.windows[f]=new Vt(f),typeof c=="function"&&(this.windows[f].beforeRowOverflow=c)},fn.prototype.setCurrentWindow=function(u){this.currentWindow=this.windows[u]},fn.prototype.createTextDecoder=function(u){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(u)}catch(c){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+u+" encoding. "+c})}};var le=function(u){u=u||{},le.prototype.init.call(this);var c=this,f=u.captionServices||{},h={},m;Object.keys(f).forEach(g=>{m=f[g],/^SERVICE/.test(g)&&(h[g]=m.encoding)}),this.serviceEncodings=h,this.current708Packet=null,this.services={},this.push=function(g){g.type===3?(c.new708Packet(),c.add708Bytes(g)):(c.current708Packet===null&&c.new708Packet(),c.add708Bytes(g))}};le.prototype=new ho,le.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},le.prototype.add708Bytes=function(u){var c=u.ccData,f=c>>>8,h=c&255;this.current708Packet.ptsVals.push(u.pts),this.current708Packet.data.push(f),this.current708Packet.data.push(h)},le.prototype.push708Packet=function(){var u=this.current708Packet,c=u.data,f=null,h=null,m=0,g=c[m++];for(u.seq=g>>6,u.sizeCode=g&63;m>5,h=g&31,f===7&&h>0&&(g=c[m++],f=g),this.pushServiceBlock(f,m,h),h>0&&(m+=h-1)},le.prototype.pushServiceBlock=function(u,c,f){var h,m=c,g=this.current708Packet.data,T=this.services[u];for(T||(T=this.initService(u,m));m("0"+(G&255).toString(16)).slice(-2)).join("")}if(m?(R=[S,E],u++):R=[S],c.textDecoder_&&!h)P=c.textDecoder_.decode(new Uint8Array(R));else if(m){const B=j(R);P=String.fromCharCode(parseInt(B,16))}else P=DT(T|S);return w.pendingNewLine&&!w.isEmpty()&&w.newLine(this.getPts(u)),w.pendingNewLine=!1,w.addText(P),u},le.prototype.multiByteCharacter=function(u,c){var f=this.current708Packet.data,h=f[u+1],m=f[u+2];return hn(h)&&hn(m)&&(u=this.handleText(++u,c,{isMultiByte:!0})),u},le.prototype.setCurrentWindow=function(u,c){var f=this.current708Packet.data,h=f[u],m=h&7;return c.setCurrentWindow(m),u},le.prototype.defineWindow=function(u,c){var f=this.current708Packet.data,h=f[u],m=h&7;c.setCurrentWindow(m);var g=c.currentWindow;return h=f[++u],g.visible=(h&32)>>5,g.rowLock=(h&16)>>4,g.columnLock=(h&8)>>3,g.priority=h&7,h=f[++u],g.relativePositioning=(h&128)>>7,g.anchorVertical=h&127,h=f[++u],g.anchorHorizontal=h,h=f[++u],g.anchorPoint=(h&240)>>4,g.rowCount=h&15,h=f[++u],g.columnCount=h&63,h=f[++u],g.windowStyle=(h&56)>>3,g.penStyle=h&7,g.virtualRowCount=g.rowCount+1,u},le.prototype.setWindowAttributes=function(u,c){var f=this.current708Packet.data,h=f[u],m=c.currentWindow.winAttr;return h=f[++u],m.fillOpacity=(h&192)>>6,m.fillRed=(h&48)>>4,m.fillGreen=(h&12)>>2,m.fillBlue=h&3,h=f[++u],m.borderType=(h&192)>>6,m.borderRed=(h&48)>>4,m.borderGreen=(h&12)>>2,m.borderBlue=h&3,h=f[++u],m.borderType+=(h&128)>>5,m.wordWrap=(h&64)>>6,m.printDirection=(h&48)>>4,m.scrollDirection=(h&12)>>2,m.justify=h&3,h=f[++u],m.effectSpeed=(h&240)>>4,m.effectDirection=(h&12)>>2,m.displayEffect=h&3,u},le.prototype.flushDisplayed=function(u,c){for(var f=[],h=0;h<8;h++)c.windows[h].visible&&!c.windows[h].isEmpty()&&f.push(c.windows[h].getText());c.endPts=u,c.text=f.join(` + +`),this.pushCaption(c),c.startPts=u},le.prototype.pushCaption=function(u){u.text!==""&&(this.trigger("data",{startPts:u.startPts,endPts:u.endPts,text:u.text,stream:"cc708_"+u.serviceNum}),u.text="",u.startPts=u.endPts)},le.prototype.displayWindows=function(u,c){var f=this.current708Packet.data,h=f[++u],m=this.getPts(u);this.flushDisplayed(m,c);for(var g=0;g<8;g++)h&1<>4,m.offset=(h&12)>>2,m.penSize=h&3,h=f[++u],m.italics=(h&128)>>7,m.underline=(h&64)>>6,m.edgeType=(h&56)>>3,m.fontStyle=h&7,u},le.prototype.setPenColor=function(u,c){var f=this.current708Packet.data,h=f[u],m=c.currentWindow.penColor;return h=f[++u],m.fgOpacity=(h&192)>>6,m.fgRed=(h&48)>>4,m.fgGreen=(h&12)>>2,m.fgBlue=h&3,h=f[++u],m.bgOpacity=(h&192)>>6,m.bgRed=(h&48)>>4,m.bgGreen=(h&12)>>2,m.bgBlue=h&3,h=f[++u],m.edgeRed=(h&48)>>4,m.edgeGreen=(h&12)>>2,m.edgeBlue=h&3,u},le.prototype.setPenLocation=function(u,c){var f=this.current708Packet.data,h=f[u],m=c.currentWindow.penLoc;return c.currentWindow.pendingNewLine=!0,h=f[++u],m.row=h&15,h=f[++u],m.column=h&63,u},le.prototype.reset=function(u,c){var f=this.getPts(u);return this.flushDisplayed(f,c),this.initService(c.serviceNum,u)};var kT={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},pn=function(u){return u===null?"":(u=kT[u]||u,String.fromCharCode(u))},mn=14,PT=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Ei=function(){for(var u=[],c=mn+1;c--;)u.push({text:"",indent:0,offset:0});return u},ge=function(u,c){ge.prototype.init.call(this),this.field_=u||0,this.dataChannel_=c||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(f){var h,m,g,T,S;if(h=f.ccData&32639,h===this.lastControlCode_){this.lastControlCode_=null;return}if((h&61440)===4096?this.lastControlCode_=h:h!==this.PADDING_&&(this.lastControlCode_=null),g=h>>>8,T=h&255,h!==this.PADDING_)if(h===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(h===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(f.pts),this.flushDisplayed(f.pts),m=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=m,this.startPts_=f.pts;else if(h===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(f.pts);else if(h===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(f.pts);else if(h===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(f.pts);else if(h===this.CARRIAGE_RETURN_)this.clearFormatting(f.pts),this.flushDisplayed(f.pts),this.shiftRowsUp_(),this.startPts_=f.pts;else if(h===this.BACKSPACE_)this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(h===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(f.pts),this.displayed_=Ei();else if(h===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Ei();else if(h===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(f.pts),this.displayed_=Ei()),this.mode_="paintOn",this.startPts_=f.pts;else if(this.isSpecialCharacter(g,T))g=(g&3)<<8,S=pn(g|T),this[this.mode_](f.pts,S),this.column_++;else if(this.isExtCharacter(g,T))this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),g=(g&3)<<8,S=pn(g|T),this[this.mode_](f.pts,S),this.column_++;else if(this.isMidRowCode(g,T))this.clearFormatting(f.pts),this[this.mode_](f.pts," "),this.column_++,(T&14)===14&&this.addFormatting(f.pts,["i"]),(T&1)===1&&this.addFormatting(f.pts,["u"]);else if(this.isOffsetControlCode(g,T)){const w=T&3;this.nonDisplayed_[this.row_].offset=w,this.column_+=w}else if(this.isPAC(g,T)){var E=PT.indexOf(h&7968);if(this.mode_==="rollUp"&&(E-this.rollUpRows_+1<0&&(E=this.rollUpRows_-1),this.setRollUp(f.pts,E)),E!==this.row_&&(this.clearFormatting(f.pts),this.row_=E),T&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(f.pts,["u"]),(h&16)===16){const w=(h&14)>>1;this.column_=w*4,this.nonDisplayed_[this.row_].indent+=w}this.isColorPAC(T)&&(T&14)===14&&this.addFormatting(f.pts,["i"])}else this.isNormalChar(g)&&(T===0&&(T=null),S=pn(g),S+=pn(T),this[this.mode_](f.pts,S),this.column_+=S.length)}};ge.prototype=new ho,ge.prototype.flushDisplayed=function(u){const c=h=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+h+"."})},f=[];this.displayed_.forEach((h,m)=>{if(h&&h.text&&h.text.length){try{h.text=h.text.trim()}catch{c(m)}h.text.length&&f.push({text:h.text,line:m+1,position:10+Math.min(70,h.indent*10)+h.offset*2.5})}else h==null&&c(m)}),f.length&&this.trigger("data",{startPts:this.startPts_,endPts:u,content:f,stream:this.name_})},ge.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Ei(),this.nonDisplayed_=Ei(),this.lastControlCode_=null,this.column_=0,this.row_=mn,this.rollUpRows_=2,this.formatting_=[]},ge.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=this.CONTROL_|32,this.END_OF_CAPTION_=this.CONTROL_|47,this.ROLL_UP_2_ROWS_=this.CONTROL_|37,this.ROLL_UP_3_ROWS_=this.CONTROL_|38,this.ROLL_UP_4_ROWS_=this.CONTROL_|39,this.CARRIAGE_RETURN_=this.CONTROL_|45,this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41,this.BACKSPACE_=this.CONTROL_|33,this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44,this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46},ge.prototype.isSpecialCharacter=function(u,c){return u===this.EXT_&&c>=48&&c<=63},ge.prototype.isExtCharacter=function(u,c){return(u===this.EXT_+1||u===this.EXT_+2)&&c>=32&&c<=63},ge.prototype.isMidRowCode=function(u,c){return u===this.EXT_&&c>=32&&c<=47},ge.prototype.isOffsetControlCode=function(u,c){return u===this.OFFSET_&&c>=33&&c<=35},ge.prototype.isPAC=function(u,c){return u>=this.BASE_&&u=64&&c<=127},ge.prototype.isColorPAC=function(u){return u>=64&&u<=79||u>=96&&u<=127},ge.prototype.isNormalChar=function(u){return u>=32&&u<=127},ge.prototype.setRollUp=function(u,c){if(this.mode_!=="rollUp"&&(this.row_=mn,this.mode_="rollUp",this.flushDisplayed(u),this.nonDisplayed_=Ei(),this.displayed_=Ei()),c!==void 0&&c!==this.row_)for(var f=0;f"},"");this[this.mode_](u,f)},ge.prototype.clearFormatting=function(u){if(this.formatting_.length){var c=this.formatting_.reverse().reduce(function(f,h){return f+""},"");this.formatting_=[],this[this.mode_](u,c)}},ge.prototype.popOn=function(u,c){var f=this.nonDisplayed_[this.row_].text;f+=c,this.nonDisplayed_[this.row_].text=f},ge.prototype.rollUp=function(u,c){var f=this.displayed_[this.row_].text;f+=c,this.displayed_[this.row_].text=f},ge.prototype.shiftRowsUp_=function(){var u;for(u=0;uc&&(f=-1);Math.abs(c-u)>OT;)u+=f*LT;return u},po=function(u){var c,f;po.prototype.init.call(this),this.type_=u||uc,this.push=function(h){if(h.type==="metadata"){this.trigger("data",h);return}this.type_!==uc&&h.type!==this.type_||(f===void 0&&(f=h.dts),h.dts=fo(h.dts,f),h.pts=fo(h.pts,f),c=h.dts,this.trigger("data",h))},this.flush=function(){f=c,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){f=void 0,c=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};po.prototype=new IT;var lc={TimestampRolloverStream:po,handleRollover:fo},RT=(u,c,f)=>{if(!u)return-1;for(var h=f;h";u.data[0]===_n.Utf8&&(f=yn(u.data,0,c),!(f<0)&&(u.mimeType=Gs(u.data,c,f),c=f+1,u.pictureType=u.data[c],c++,h=yn(u.data,0,c),!(h<0)&&(u.description=zs(u.data,c,h),c=h+1,u.mimeType===m?u.url=Gs(u.data,c,u.data.length):u.pictureData=u.data.subarray(c,u.data.length))))},"T*":function(u){u.data[0]===_n.Utf8&&(u.value=zs(u.data,1,u.data.length).replace(/\0*$/,""),u.values=u.value.split("\0"))},TXXX:function(u){var c;u.data[0]===_n.Utf8&&(c=yn(u.data,0,1),c!==-1&&(u.description=zs(u.data,1,c),u.value=zs(u.data,c+1,u.data.length).replace(/\0*$/,""),u.data=u.value))},"W*":function(u){u.url=Gs(u.data,0,u.data.length).replace(/\0.*$/,"")},WXXX:function(u){var c;u.data[0]===_n.Utf8&&(c=yn(u.data,0,1),c!==-1&&(u.description=zs(u.data,1,c),u.url=Gs(u.data,c+1,u.data.length).replace(/\0.*$/,"")))},PRIV:function(u){var c;for(c=0;c>>2;G*=4,G+=B[7]&3,P.timeStamp=G,S.pts===void 0&&S.dts===void 0&&(S.pts=P.timeStamp,S.dts=P.timeStamp),this.trigger("timestamp",P)}S.frames.push(P),E+=10,E+=w}while(E>>4>1&&(T+=m[T]+1),g.pid===0)g.type="pat",u(m.subarray(T),g),this.trigger("data",g);else if(g.pid===this.pmtPid)for(g.type="pmt",u(m.subarray(T),g),this.trigger("data",g);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([m,T,g]):this.processPes_(m,T,g)},this.processPes_=function(m,g,T){T.pid===this.programMapTable.video?T.streamType=St.H264_STREAM_TYPE:T.pid===this.programMapTable.audio?T.streamType=St.ADTS_STREAM_TYPE:T.streamType=this.programMapTable["timed-metadata"][T.pid],T.type="pes",T.data=m.subarray(g),this.trigger("data",T)}},Xs.prototype=new mo,Xs.STREAM_TYPES={h264:27,adts:15},bn=function(){var u=this,c=!1,f={data:[],size:0},h={data:[],size:0},m={data:[],size:0},g,T=function(E,w){var P;const R=E[0]<<16|E[1]<<8|E[2];w.data=new Uint8Array,R===1&&(w.packetLength=6+(E[4]<<8|E[5]),w.dataAlignmentIndicator=(E[6]&4)!==0,P=E[7],P&192&&(w.pts=(E[9]&14)<<27|(E[10]&255)<<20|(E[11]&254)<<12|(E[12]&255)<<5|(E[13]&254)>>>3,w.pts*=4,w.pts+=(E[13]&6)>>>1,w.dts=w.pts,P&64&&(w.dts=(E[14]&14)<<27|(E[15]&255)<<20|(E[16]&254)<<12|(E[17]&255)<<5|(E[18]&254)>>>3,w.dts*=4,w.dts+=(E[18]&6)>>>1)),w.data=E.subarray(9+E[8]))},S=function(E,w,P){var R=new Uint8Array(E.size),j={type:w},B=0,G=0,K=!1,Le;if(!(!E.data.length||E.size<9)){for(j.trackId=E.data[0].pid,B=0;B>5,E=((c[m+6]&3)+1)*1024,w=E*VT/fc[(c[m+2]&60)>>>2],c.byteLength-m>>6&3)+1,channelcount:(c[m+2]&1)<<2|(c[m+3]&192)>>>6,samplerate:fc[(c[m+2]&60)>>>2],samplingfrequencyindex:(c[m+2]&60)>>>2,samplesize:16,data:c.subarray(m+7+T,m+g)}),f++,m+=g}typeof P=="number"&&(this.skipWarn_(P,m),P=null),c=c.subarray(m)}},this.flush=function(){f=0,this.trigger("done")},this.reset=function(){c=void 0,this.trigger("reset")},this.endTimeline=function(){c=void 0,this.trigger("endedtimeline")}},Sn.prototype=new qT;var HT=Sn,pc;pc=function(u){var c=u.byteLength,f=0,h=0;this.length=function(){return 8*c},this.bitsAvailable=function(){return 8*c+h},this.loadWord=function(){var m=u.byteLength-c,g=new Uint8Array(4),T=Math.min(4,c);if(T===0)throw new Error("no bytes available");g.set(u.subarray(m,m+T)),f=new DataView(g.buffer).getUint32(0),h=T*8,c-=T},this.skipBits=function(m){var g;h>m?(f<<=m,h-=m):(m-=h,g=Math.floor(m/8),m-=g*8,c-=g,this.loadWord(),f<<=m,h-=m)},this.readBits=function(m){var g=Math.min(h,m),T=f>>>32-g;return h-=g,h>0?f<<=g:c>0&&this.loadWord(),g=m-g,g>0?T<>>m)return f<<=m,h-=m,m;return this.loadWord(),m+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var m=this.skipLeadingZeros();return this.readBits(m+1)-1},this.readExpGolomb=function(){var m=this.readUnsignedExpGolomb();return 1&m?1+m>>>1:-1*(m>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var zT=pc,mc=t,GT=zT,xn,Ys,gc;Ys=function(){var u=0,c,f;Ys.prototype.init.call(this),this.push=function(h){var m;f?(m=new Uint8Array(f.byteLength+h.data.byteLength),m.set(f),m.set(h.data,f.byteLength),f=m):f=h.data;for(var g=f.byteLength;u3&&this.trigger("data",f.subarray(u+3)),f=null,u=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},Ys.prototype=new mc,gc={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},xn=function(){var u=new Ys,c,f,h,m,g,T,S;xn.prototype.init.call(this),c=this,this.push=function(E){E.type==="video"&&(f=E.trackId,h=E.pts,m=E.dts,u.push(E))},u.on("data",function(E){var w={trackId:f,pts:h,dts:m,data:E,nalUnitTypeCode:E[0]&31};switch(w.nalUnitTypeCode){case 5:w.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:w.nalUnitType="sei_rbsp",w.escapedRBSP=g(E.subarray(1));break;case 7:w.nalUnitType="seq_parameter_set_rbsp",w.escapedRBSP=g(E.subarray(1)),w.config=T(w.escapedRBSP);break;case 8:w.nalUnitType="pic_parameter_set_rbsp";break;case 9:w.nalUnitType="access_unit_delimiter_rbsp";break}c.trigger("data",w)}),u.on("done",function(){c.trigger("done")}),u.on("partialdone",function(){c.trigger("partialdone")}),u.on("reset",function(){c.trigger("reset")}),u.on("endedtimeline",function(){c.trigger("endedtimeline")}),this.flush=function(){u.flush()},this.partialFlush=function(){u.partialFlush()},this.reset=function(){u.reset()},this.endTimeline=function(){u.endTimeline()},S=function(E,w){var P=8,R=8,j,B;for(j=0;j>4;return f=f>=0?f:0,m?f+20:f+10},_c=function(u,c){return u.length-c<10||u[c]!==73||u[c+1]!==68||u[c+2]!==51?c:(c+=yc(u,c),_c(u,c))},XT=function(u){var c=_c(u,0);return u.length>=c+2&&(u[c]&255)===255&&(u[c+1]&240)===240&&(u[c+1]&22)===16},vc=function(u){return u[0]<<21|u[1]<<14|u[2]<<7|u[3]},YT=function(u,c,f){var h,m="";for(h=c;h>5,h=u[c+4]<<3,m=u[c+3]&6144;return m|h|f},ZT=function(u,c){return u[c]===73&&u[c+1]===68&&u[c+2]===51?"timed-metadata":u[c]&!0&&(u[c+1]&240)===240?"audio":null},eb=function(u){for(var c=0;c+5>>2]}return null},tb=function(u){var c,f,h,m;c=10,u[5]&64&&(c+=4,c+=vc(u.subarray(10,14)));do{if(f=vc(u.subarray(c+4,c+8)),f<1)return null;if(m=String.fromCharCode(u[c],u[c+1],u[c+2],u[c+3]),m==="PRIV"){h=u.subarray(c+10,c+f+10);for(var g=0;g>>2;return E*=4,E+=S[7]&3,E}break}}c+=10,c+=f}while(c=3;){if(u[m]===73&&u[m+1]===68&&u[m+2]===51){if(u.length-m<10||(h=Tc.parseId3TagSize(u,m),m+h>u.length))break;T={type:"timed-metadata",data:u.subarray(m,m+h)},this.trigger("data",T),m+=h;continue}else if((u[m]&255)===255&&(u[m+1]&240)===240){if(u.length-m<7||(h=Tc.parseAdtsSize(u,m),m+h>u.length))break;S={type:"audio",data:u.subarray(m,m+h),pts:c,dts:c},this.trigger("data",S),m+=h;continue}m++}g=u.length-m,g>0?u=u.subarray(m):u=new Uint8Array},this.reset=function(){u=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){u=new Uint8Array,this.trigger("endedtimeline")}},En.prototype=new ib;var sb=En,rb=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],nb=rb,ab=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],ob=ab,Cn=t,Qs=Jv,Js=oT,wn=gT,xt=bT,Ht=jT,An=fe,bc=HT,ub=WT.H264Stream,lb=sb,cb=vo.isLikelyAacData,db=fe.ONE_SECOND_IN_TS,To=nb,bo=ob,Zs,Yi,Dn,Ci,hb=function(u,c){c.stream=u,this.trigger("log",c)},Sc=function(u,c){for(var f=Object.keys(c),h=0;h=-w&&R<=E&&(!j||P>R)&&(j=G,P=R)));return j?j.gop:null},this.alignGopsAtStart_=function(S){var E,w,P,R,j,B,G,K;for(j=S.byteLength,B=S.nalCount,G=S.duration,E=w=0;EP.pts){E++;continue}w++,j-=R.byteLength,B-=R.nalCount,G-=R.duration}return w===0?S:w===S.length?null:(K=S.slice(w),K.byteLength=j,K.duration=G,K.nalCount=B,K.pts=K[0].pts,K.dts=K[0].dts,K)},this.alignGopsAtEnd_=function(S){var E,w,P,R,j,B;for(E=m.length-1,w=S.length-1,j=null,B=!1;E>=0&&w>=0;){if(P=m[E],R=S[w],P.pts===R.pts){B=!0;break}if(P.pts>R.pts){E--;continue}E===m.length-1&&(j=w),w--}if(!B&&j===null)return null;var G;if(B?G=w:G=j,G===0)return S;var K=S.slice(G),Le=K.reduce(function(ft,Ai){return ft.byteLength+=Ai.byteLength,ft.duration+=Ai.duration,ft.nalCount+=Ai.nalCount,ft},{byteLength:0,duration:0,nalCount:0});return K.byteLength=Le.byteLength,K.duration=Le.duration,K.nalCount=Le.nalCount,K.pts=K[0].pts,K.dts=K[0].dts,K},this.alignGopsWith=function(S){m=S}},Zs.prototype=new Cn,Ci=function(u,c){this.numberOfTracks=0,this.metadataStream=c,u=u||{},typeof u.remux<"u"?this.remuxTracks=!!u.remux:this.remuxTracks=!0,typeof u.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=u.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Ci.prototype.init.call(this),this.push=function(f){if(f.content||f.text)return this.pendingCaptions.push(f);if(f.frames)return this.pendingMetadata.push(f);this.pendingTracks.push(f.track),this.pendingBytes+=f.boxes.byteLength,f.track.type==="video"&&(this.videoTrack=f.track,this.pendingBoxes.push(f.boxes)),f.track.type==="audio"&&(this.audioTrack=f.track,this.pendingBoxes.unshift(f.boxes))}},Ci.prototype=new Cn,Ci.prototype.flush=function(u){var c=0,f={captions:[],captionStreams:{},metadata:[],info:{}},h,m,g,T=0,S;if(this.pendingTracks.length=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0);return}}if(this.videoTrack?(T=this.videoTrack.timelineStartInfo.pts,bo.forEach(function(E){f.info[E]=this.videoTrack[E]},this)):this.audioTrack&&(T=this.audioTrack.timelineStartInfo.pts,To.forEach(function(E){f.info[E]=this.audioTrack[E]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?f.type=this.pendingTracks[0].type:f.type="combined",this.emittedTracks+=this.pendingTracks.length,g=Qs.initSegment(this.pendingTracks),f.initSegment=new Uint8Array(g.byteLength),f.initSegment.set(g),f.data=new Uint8Array(this.pendingBytes),S=0;S=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},Ci.prototype.setRemux=function(u){this.remuxTracks=u},Dn=function(u){var c=this,f=!0,h,m;Dn.prototype.init.call(this),u=u||{},this.baseMediaDecodeTime=u.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var g={};this.transmuxPipeline_=g,g.type="aac",g.metadataStream=new Ht.MetadataStream,g.aacStream=new lb,g.audioTimestampRolloverStream=new Ht.TimestampRolloverStream("audio"),g.timedMetadataTimestampRolloverStream=new Ht.TimestampRolloverStream("timed-metadata"),g.adtsStream=new bc,g.coalesceStream=new Ci(u,g.metadataStream),g.headOfPipeline=g.aacStream,g.aacStream.pipe(g.audioTimestampRolloverStream).pipe(g.adtsStream),g.aacStream.pipe(g.timedMetadataTimestampRolloverStream).pipe(g.metadataStream).pipe(g.coalesceStream),g.metadataStream.on("timestamp",function(T){g.aacStream.setTimestamp(T.timeStamp)}),g.aacStream.on("data",function(T){T.type!=="timed-metadata"&&T.type!=="audio"||g.audioSegmentStream||(m=m||{timelineStartInfo:{baseMediaDecodeTime:c.baseMediaDecodeTime},codec:"adts",type:"audio"},g.coalesceStream.numberOfTracks++,g.audioSegmentStream=new Yi(m,u),g.audioSegmentStream.on("log",c.getLogTrigger_("audioSegmentStream")),g.audioSegmentStream.on("timingInfo",c.trigger.bind(c,"audioTimingInfo")),g.adtsStream.pipe(g.audioSegmentStream).pipe(g.coalesceStream),c.trigger("trackinfo",{hasAudio:!!m,hasVideo:!!h}))}),g.coalesceStream.on("data",this.trigger.bind(this,"data")),g.coalesceStream.on("done",this.trigger.bind(this,"done")),Sc(this,g)},this.setupTsPipeline=function(){var g={};this.transmuxPipeline_=g,g.type="ts",g.metadataStream=new Ht.MetadataStream,g.packetStream=new Ht.TransportPacketStream,g.parseStream=new Ht.TransportParseStream,g.elementaryStream=new Ht.ElementaryStream,g.timestampRolloverStream=new Ht.TimestampRolloverStream,g.adtsStream=new bc,g.h264Stream=new ub,g.captionStream=new Ht.CaptionStream(u),g.coalesceStream=new Ci(u,g.metadataStream),g.headOfPipeline=g.packetStream,g.packetStream.pipe(g.parseStream).pipe(g.elementaryStream).pipe(g.timestampRolloverStream),g.timestampRolloverStream.pipe(g.h264Stream),g.timestampRolloverStream.pipe(g.adtsStream),g.timestampRolloverStream.pipe(g.metadataStream).pipe(g.coalesceStream),g.h264Stream.pipe(g.captionStream).pipe(g.coalesceStream),g.elementaryStream.on("data",function(T){var S;if(T.type==="metadata"){for(S=T.tracks.length;S--;)!h&&T.tracks[S].type==="video"?(h=T.tracks[S],h.timelineStartInfo.baseMediaDecodeTime=c.baseMediaDecodeTime):!m&&T.tracks[S].type==="audio"&&(m=T.tracks[S],m.timelineStartInfo.baseMediaDecodeTime=c.baseMediaDecodeTime);h&&!g.videoSegmentStream&&(g.coalesceStream.numberOfTracks++,g.videoSegmentStream=new Zs(h,u),g.videoSegmentStream.on("log",c.getLogTrigger_("videoSegmentStream")),g.videoSegmentStream.on("timelineStartInfo",function(E){m&&!u.keepOriginalTimestamps&&(m.timelineStartInfo=E,g.audioSegmentStream.setEarliestDts(E.dts-c.baseMediaDecodeTime))}),g.videoSegmentStream.on("processedGopsInfo",c.trigger.bind(c,"gopInfo")),g.videoSegmentStream.on("segmentTimingInfo",c.trigger.bind(c,"videoSegmentTimingInfo")),g.videoSegmentStream.on("baseMediaDecodeTime",function(E){m&&g.audioSegmentStream.setVideoBaseMediaDecodeTime(E)}),g.videoSegmentStream.on("timingInfo",c.trigger.bind(c,"videoTimingInfo")),g.h264Stream.pipe(g.videoSegmentStream).pipe(g.coalesceStream)),m&&!g.audioSegmentStream&&(g.coalesceStream.numberOfTracks++,g.audioSegmentStream=new Yi(m,u),g.audioSegmentStream.on("log",c.getLogTrigger_("audioSegmentStream")),g.audioSegmentStream.on("timingInfo",c.trigger.bind(c,"audioTimingInfo")),g.audioSegmentStream.on("segmentTimingInfo",c.trigger.bind(c,"audioSegmentTimingInfo")),g.adtsStream.pipe(g.audioSegmentStream).pipe(g.coalesceStream)),c.trigger("trackinfo",{hasAudio:!!m,hasVideo:!!h})}}),g.coalesceStream.on("data",this.trigger.bind(this,"data")),g.coalesceStream.on("id3Frame",function(T){T.dispatchType=g.metadataStream.dispatchType,c.trigger("id3Frame",T)}),g.coalesceStream.on("caption",this.trigger.bind(this,"caption")),g.coalesceStream.on("done",this.trigger.bind(this,"done")),Sc(this,g)},this.setBaseMediaDecodeTime=function(g){var T=this.transmuxPipeline_;u.keepOriginalTimestamps||(this.baseMediaDecodeTime=g),m&&(m.timelineStartInfo.dts=void 0,m.timelineStartInfo.pts=void 0,xt.clearDtsInfo(m),T.audioTimestampRolloverStream&&T.audioTimestampRolloverStream.discontinuity()),h&&(T.videoSegmentStream&&(T.videoSegmentStream.gopCache_=[]),h.timelineStartInfo.dts=void 0,h.timelineStartInfo.pts=void 0,xt.clearDtsInfo(h),T.captionStream.reset()),T.timestampRolloverStream&&T.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(g){m&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(g)},this.setRemux=function(g){var T=this.transmuxPipeline_;u.remux=g,T&&T.coalesceStream&&T.coalesceStream.setRemux(g)},this.alignGopsWith=function(g){h&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(g)},this.getLogTrigger_=function(g){var T=this;return function(S){S.stream=g,T.trigger("log",S)}},this.push=function(g){if(f){var T=cb(g);T&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!T&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),f=!1}this.transmuxPipeline_.headOfPipeline.push(g)},this.flush=function(){f=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},Dn.prototype=new Cn;var fb={Transmuxer:Dn,VideoSegmentStream:Zs,AudioSegmentStream:Yi,AUDIO_PROPERTIES:To,VIDEO_PROPERTIES:bo,generateSegmentTimingInfo:So},pb=function(u){return u>>>0},mb=function(u){return("00"+u.toString(16)).slice(-2)},kn={toUnsigned:pb,toHexString:mb},gb=function(u){var c="";return c+=String.fromCharCode(u[0]),c+=String.fromCharCode(u[1]),c+=String.fromCharCode(u[2]),c+=String.fromCharCode(u[3]),c},Ec=gb,yb=kn.toUnsigned,_b=Ec,Cc=function(u,c){var f=[],h,m,g,T,S;if(!c.length)return null;for(h=0;h1?h+m:u.byteLength,g===c[0]&&(c.length===1?f.push(u.subarray(h+8,T)):(S=Cc(u.subarray(h+8,T),c.slice(1)),S.length&&(f=f.concat(S)))),h=T;return f},wc=Cc,vb=kn.toUnsigned,Tb=n.getUint64,bb=function(u){var c={version:u[0],flags:new Uint8Array(u.subarray(1,4))};return c.version===1?c.baseMediaDecodeTime=Tb(u.subarray(4)):c.baseMediaDecodeTime=vb(u[4]<<24|u[5]<<16|u[6]<<8|u[7]),c},Ac=bb,Sb=function(u){return{isLeading:(u[0]&12)>>>2,dependsOn:u[0]&3,isDependedOn:(u[1]&192)>>>6,hasRedundancy:(u[1]&48)>>>4,paddingValue:(u[1]&14)>>>1,isNonSyncSample:u[1]&1,degradationPriority:u[2]<<8|u[3]}},xb=Sb,Dc=xb,Eb=function(u){var c={version:u[0],flags:new Uint8Array(u.subarray(1,4)),samples:[]},f=new DataView(u.buffer,u.byteOffset,u.byteLength),h=c.flags[2]&1,m=c.flags[2]&4,g=c.flags[1]&1,T=c.flags[1]&2,S=c.flags[1]&4,E=c.flags[1]&8,w=f.getUint32(4),P=8,R;for(h&&(c.dataOffset=f.getInt32(P),P+=4),m&&w&&(R={flags:Dc(u.subarray(P,P+4))},P+=4,g&&(R.duration=f.getUint32(P),P+=4),T&&(R.size=f.getUint32(P),P+=4),E&&(c.version===1?R.compositionTimeOffset=f.getInt32(P):R.compositionTimeOffset=f.getUint32(P),P+=4),c.samples.push(R),w--);w--;)R={},g&&(R.duration=f.getUint32(P),P+=4),T&&(R.size=f.getUint32(P),P+=4),S&&(R.flags=Dc(u.subarray(P,P+4)),P+=4),E&&(c.version===1?R.compositionTimeOffset=f.getInt32(P):R.compositionTimeOffset=f.getUint32(P),P+=4),c.samples.push(R);return c},kc=Eb,Cb=function(u){var c=new DataView(u.buffer,u.byteOffset,u.byteLength),f={version:u[0],flags:new Uint8Array(u.subarray(1,4)),trackId:c.getUint32(4)},h=f.flags[2]&1,m=f.flags[2]&2,g=f.flags[2]&8,T=f.flags[2]&16,S=f.flags[2]&32,E=f.flags[0]&65536,w=f.flags[0]&131072,P;return P=8,h&&(P+=4,f.baseDataOffset=c.getUint32(12),P+=4),m&&(f.sampleDescriptionIndex=c.getUint32(P),P+=4),g&&(f.defaultSampleDuration=c.getUint32(P),P+=4),T&&(f.defaultSampleSize=c.getUint32(P),P+=4),S&&(f.defaultSampleFlags=c.getUint32(P)),E&&(f.durationIsEmpty=!0),!h&&w&&(f.baseDataOffsetIsMoof=!0),f},Pc=Cb,er;typeof window<"u"?er=window:typeof s<"u"?er=s:typeof self<"u"?er=self:er={};var Ic=er,wb=ac.discardEmulationPreventionBytes,Ab=oc.CaptionStream,tr=wc,Db=Ac,kb=kc,Pb=Pc,Lc=Ic,Ib=function(u,c){for(var f=u,h=0;h0?Db(j[0]).baseMediaDecodeTime:0,G=tr(E,["trun"]),K,Le;c===R&&G.length>0&&(K=Ob(G,B,P),Le=Lb(S,K,R),m[R]||(m[R]={seiNals:[],logs:[]}),m[R].seiNals=m[R].seiNals.concat(Le.seiNals),m[R].logs=m[R].logs.concat(Le.logs))}),m},Mb=function(u,c,f){var h;if(c===null)return null;h=Rb(u,c);var m=h[c]||{};return{seiNals:m.seiNals,logs:m.logs,timescale:f}},Nb=function(){var u=!1,c,f,h,m,g,T;this.isInitialized=function(){return u},this.init=function(S){c=new Ab,u=!0,T=S?S.isPartial:!1,c.on("data",function(E){E.startTime=E.startPts/m,E.endTime=E.endPts/m,g.captions.push(E),g.captionStreams[E.stream]=!0}),c.on("log",function(E){g.logs.push(E)})},this.isNewInit=function(S,E){return S&&S.length===0||E&&typeof E=="object"&&Object.keys(E).length===0?!1:h!==S[0]||m!==E[h]},this.parse=function(S,E,w){var P;if(this.isInitialized()){if(!E||!w)return null;if(this.isNewInit(E,w))h=E[0],m=w[h];else if(h===null||!m)return f.push(S),null}else return null;for(;f.length>0;){var R=f.shift();this.parse(R,E,w)}return P=Mb(S,h,m),P&&P.logs&&(g.logs=g.logs.concat(P.logs)),P===null||!P.seiNals?g.logs.length?{logs:g.logs,captions:[],captionStreams:[]}:null:(this.pushNals(P.seiNals),this.flushStream(),g)},this.pushNals=function(S){if(!this.isInitialized()||!S||S.length===0)return null;S.forEach(function(E){c.push(E)})},this.flushStream=function(){if(!this.isInitialized())return null;T?c.partialFlush():c.flush()},this.clearParsedCaptions=function(){g.captions=[],g.captionStreams={},g.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;c.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){f=[],h=null,m=null,g?this.clearParsedCaptions():g={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},Bb=Nb,Ub=function(u){for(var c=0,f=String.fromCharCode(u[c]),h="";f!=="\0";)h+=f,c++,f=String.fromCharCode(u[c]);return h+=f,h},Fb={uint8ToCString:Ub},Pn=Fb.uint8ToCString,$b=n.getUint64,jb=function(u){var c=4,f=u[0],h,m,g,T,S,E,w,P;if(f===0){h=Pn(u.subarray(c)),c+=h.length,m=Pn(u.subarray(c)),c+=m.length;var R=new DataView(u.buffer);g=R.getUint32(c),c+=4,S=R.getUint32(c),c+=4,E=R.getUint32(c),c+=4,w=R.getUint32(c),c+=4}else if(f===1){var R=new DataView(u.buffer);g=R.getUint32(c),c+=4,T=$b(u.subarray(c)),c+=8,E=R.getUint32(c),c+=4,w=R.getUint32(c),c+=4,h=Pn(u.subarray(c)),c+=h.length,m=Pn(u.subarray(c)),c+=m.length}P=new Uint8Array(u.subarray(c,u.byteLength));var j={scheme_id_uri:h,value:m,timescale:g||1,presentation_time:T,presentation_time_delta:S,event_duration:E,id:w,message_data:P};return Vb(f,j)?j:void 0},qb=function(u,c,f,h){return u||u===0?u/c:h+f/c},Vb=function(u,c){var f=c.scheme_id_uri!=="\0",h=u===0&&Oc(c.presentation_time_delta)&&f,m=u===1&&Oc(c.presentation_time)&&f;return!(u>1)&&h||m},Oc=function(u){return u!==void 0||u!==null},Hb={parseEmsgBox:jb,scaleTime:qb},In=kn.toUnsigned,ir=kn.toHexString,Ce=wc,Qi=Ec,xo=Hb,zb=Pc,Gb=kc,Wb=Ac,Kb=n.getUint64,Rc,Mc,Nc,Bc,Uc,Eo,Fc,Co=Ic,Xb=dc.parseId3Frames;Rc=function(u){var c={},f=Ce(u,["moov","trak"]);return f.reduce(function(h,m){var g,T,S,E,w;return g=Ce(m,["tkhd"])[0],!g||(T=g[0],S=T===0?12:20,E=In(g[S]<<24|g[S+1]<<16|g[S+2]<<8|g[S+3]),w=Ce(m,["mdia","mdhd"])[0],!w)?null:(T=w[0],S=T===0?12:20,h[E]=In(w[S]<<24|w[S+1]<<16|w[S+2]<<8|w[S+3]),h)},c)},Mc=function(u,c){var f;f=Ce(c,["moof","traf"]);var h=f.reduce(function(m,g){var T=Ce(g,["tfhd"])[0],S=In(T[4]<<24|T[5]<<16|T[6]<<8|T[7]),E=u[S]||9e4,w=Ce(g,["tfdt"])[0],P=new DataView(w.buffer,w.byteOffset,w.byteLength),R;w[0]===1?R=Kb(w.subarray(4,12)):R=P.getUint32(4);let j;return typeof R=="bigint"?j=R/Co.BigInt(E):typeof R=="number"&&!isNaN(R)&&(j=R/E),j11?(m.codec+=".",m.codec+=ir(B[9]),m.codec+=ir(B[10]),m.codec+=ir(B[11])):m.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(m.codec)?(B=j.subarray(28),G=Qi(B.subarray(4,8)),G==="esds"&&B.length>20&&B[19]!==0?(m.codec+="."+ir(B[19]),m.codec+="."+ir(B[20]>>>2&63).replace(/^0/,"")):m.codec="mp4a.40.2"):m.codec=m.codec.toLowerCase())}var K=Ce(h,["mdia","mdhd"])[0];K&&(m.timescale=Eo(K)),f.push(m)}),f},Fc=function(u,c=0){var f=Ce(u,["emsg"]);return f.map(h=>{var m=xo.parseEmsgBox(new Uint8Array(h)),g=Xb(m.message_data);return{cueTime:xo.scaleTime(m.presentation_time,m.timescale,m.presentation_time_delta,c),duration:xo.scaleTime(m.event_duration,m.timescale),frames:g}})};var wo={findBox:Ce,parseType:Qi,timescale:Rc,startTime:Mc,compositionStartTime:Nc,videoTrackIds:Bc,tracks:Uc,getTimescaleFromMediaHeader:Eo,getEmsgID3:Fc},Ao=gn,$c=function(u){var c=u[1]&31;return c<<=8,c|=u[2],c},Ln=function(u){return!!(u[1]&64)},On=function(u){var c=0;return(u[3]&48)>>>4>1&&(c+=u[4]+1),c},Yb=function(u,c){var f=$c(u);return f===0?"pat":f===c?"pmt":c?"pes":null},Qb=function(u){var c=Ln(u),f=4+On(u);return c&&(f+=u[f]+1),(u[f+10]&31)<<8|u[f+11]},Jb=function(u){var c={},f=Ln(u),h=4+On(u);if(f&&(h+=u[h]+1),!!(u[h+5]&1)){var m,g,T;m=(u[h+1]&15)<<8|u[h+2],g=3+m-4,T=(u[h+10]&15)<<8|u[h+11];for(var S=12+T;S=u.byteLength)return null;var h=null,m;return m=u[f+7],m&192&&(h={},h.pts=(u[f+9]&14)<<27|(u[f+10]&255)<<20|(u[f+11]&254)<<12|(u[f+12]&255)<<5|(u[f+13]&254)>>>3,h.pts*=4,h.pts+=(u[f+13]&6)>>>1,h.dts=h.pts,m&64&&(h.dts=(u[f+14]&14)<<27|(u[f+15]&255)<<20|(u[f+16]&254)<<12|(u[f+17]&255)<<5|(u[f+18]&254)>>>3,h.dts*=4,h.dts+=(u[f+18]&6)>>>1)),h},Do=function(u){switch(u){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},t2=function(u){for(var c=4+On(u),f=u.subarray(c),h=0,m=0,g=!1,T;m3&&(T=Do(f[m+3]&31),T==="slice_layer_without_partitioning_rbsp_idr"&&(g=!0)),g},i2={parseType:Yb,parsePat:Qb,parsePmt:Jb,parsePayloadUnitStartIndicator:Ln,parsePesType:Zb,parsePesTime:e2,videoPacketContainsKeyFrame:t2},jc=gn,Ji=lc.handleRollover,ae={};ae.ts=i2,ae.aac=vo;var wi=fe.ONE_SECOND_IN_TS,ze=188,kt=71,s2=function(u,c){for(var f=0,h=ze,m,g;h=0;){if(u[h]===kt&&(u[m]===kt||m===u.byteLength)){switch(g=u.subarray(h,m),T=ae.ts.parseType(g,c.pid),T){case"pes":S=ae.ts.parsePesType(g,c.table),E=ae.ts.parsePayloadUnitStartIndicator(g),S==="audio"&&E&&(w=ae.ts.parsePesTime(g),w&&(w.type="audio",f.audio.push(w),P=!0));break}if(P)break;h-=ze,m-=ze;continue}h--,m--}},r2=function(u,c,f){for(var h=0,m=ze,g,T,S,E,w,P,R,j,B=!1,G={data:[],size:0};m=0;){if(u[h]===kt&&u[m]===kt){switch(g=u.subarray(h,m),T=ae.ts.parseType(g,c.pid),T){case"pes":S=ae.ts.parsePesType(g,c.table),E=ae.ts.parsePayloadUnitStartIndicator(g),S==="video"&&E&&(w=ae.ts.parsePesTime(g),w&&(w.type="video",f.video.push(w),B=!0));break}if(B)break;h-=ze,m-=ze;continue}h--,m--}},n2=function(u,c){if(u.audio&&u.audio.length){var f=c;(typeof f>"u"||isNaN(f))&&(f=u.audio[0].dts),u.audio.forEach(function(g){g.dts=Ji(g.dts,f),g.pts=Ji(g.pts,f),g.dtsTime=g.dts/wi,g.ptsTime=g.pts/wi})}if(u.video&&u.video.length){var h=c;if((typeof h>"u"||isNaN(h))&&(h=u.video[0].dts),u.video.forEach(function(g){g.dts=Ji(g.dts,h),g.pts=Ji(g.pts,h),g.dtsTime=g.dts/wi,g.ptsTime=g.pts/wi}),u.firstKeyFrame){var m=u.firstKeyFrame;m.dts=Ji(m.dts,h),m.pts=Ji(m.pts,h),m.dtsTime=m.dts/wi,m.ptsTime=m.pts/wi}}},a2=function(u){for(var c=!1,f=0,h=null,m=null,g=0,T=0,S;u.length-T>=3;){var E=ae.aac.parseType(u,T);switch(E){case"timed-metadata":if(u.length-T<10){c=!0;break}if(g=ae.aac.parseId3TagSize(u,T),g>u.length){c=!0;break}m===null&&(S=u.subarray(T,T+g),m=ae.aac.parseAacTimestamp(S)),T+=g;break;case"audio":if(u.length-T<7){c=!0;break}if(g=ae.aac.parseAdtsSize(u,T),g>u.length){c=!0;break}h===null&&(S=u.subarray(T,T+g),h=ae.aac.parseSampleRate(S)),f++,T+=g;break;default:T++;break}if(c)return null}if(h===null||m===null)return null;var w=wi/h,P={audio:[{type:"audio",dts:m,pts:m},{type:"audio",dts:m+f*1024*w,pts:m+f*1024*w}]};return P},o2=function(u){var c={pid:null,table:null},f={};s2(u,c);for(var h in c.table)if(c.table.hasOwnProperty(h)){var m=c.table[h];switch(m){case jc.H264_STREAM_TYPE:f.video=[],r2(u,c,f),f.video.length===0&&delete f.video;break;case jc.ADTS_STREAM_TYPE:f.audio=[],qc(u,c,f),f.audio.length===0&&delete f.audio;break}}return f},u2=function(u,c){var f=ae.aac.isLikelyAacData(u),h;return f?h=a2(u):h=o2(u),!h||!h.audio&&!h.video?null:(n2(h,c),h)},l2={inspect:u2,parseAudioPes_:qc};const c2=function(u,c){c.on("data",function(f){const h=f.initSegment;f.initSegment={data:h.buffer,byteOffset:h.byteOffset,byteLength:h.byteLength};const m=f.data;f.data=m.buffer,u.postMessage({action:"data",segment:f,byteOffset:m.byteOffset,byteLength:m.byteLength},[f.data])}),c.on("done",function(f){u.postMessage({action:"done"})}),c.on("gopInfo",function(f){u.postMessage({action:"gopInfo",gopInfo:f})}),c.on("videoSegmentTimingInfo",function(f){const h={start:{decode:fe.videoTsToSeconds(f.start.dts),presentation:fe.videoTsToSeconds(f.start.pts)},end:{decode:fe.videoTsToSeconds(f.end.dts),presentation:fe.videoTsToSeconds(f.end.pts)},baseMediaDecodeTime:fe.videoTsToSeconds(f.baseMediaDecodeTime)};f.prependedContentDuration&&(h.prependedContentDuration=fe.videoTsToSeconds(f.prependedContentDuration)),u.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:h})}),c.on("audioSegmentTimingInfo",function(f){const h={start:{decode:fe.videoTsToSeconds(f.start.dts),presentation:fe.videoTsToSeconds(f.start.pts)},end:{decode:fe.videoTsToSeconds(f.end.dts),presentation:fe.videoTsToSeconds(f.end.pts)},baseMediaDecodeTime:fe.videoTsToSeconds(f.baseMediaDecodeTime)};f.prependedContentDuration&&(h.prependedContentDuration=fe.videoTsToSeconds(f.prependedContentDuration)),u.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:h})}),c.on("id3Frame",function(f){u.postMessage({action:"id3Frame",id3Frame:f})}),c.on("caption",function(f){u.postMessage({action:"caption",caption:f})}),c.on("trackinfo",function(f){u.postMessage({action:"trackinfo",trackInfo:f})}),c.on("audioTimingInfo",function(f){u.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:fe.videoTsToSeconds(f.start),end:fe.videoTsToSeconds(f.end)}})}),c.on("videoTimingInfo",function(f){u.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:fe.videoTsToSeconds(f.start),end:fe.videoTsToSeconds(f.end)}})}),c.on("log",function(f){u.postMessage({action:"log",log:f})})};class Vc{constructor(c,f){this.options=f||{},this.self=c,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new fb.Transmuxer(this.options),c2(this.self,this.transmuxer)}pushMp4Captions(c){this.captionParser||(this.captionParser=new Bb,this.captionParser.init());const f=new Uint8Array(c.data,c.byteOffset,c.byteLength),h=this.captionParser.parse(f,c.trackIds,c.timescales);this.self.postMessage({action:"mp4Captions",captions:h&&h.captions||[],logs:h&&h.logs||[],data:f.buffer},[f.buffer])}probeMp4StartTime({timescales:c,data:f}){const h=wo.startTime(c,f);this.self.postMessage({action:"probeMp4StartTime",startTime:h,data:f},[f.buffer])}probeMp4Tracks({data:c}){const f=wo.tracks(c);this.self.postMessage({action:"probeMp4Tracks",tracks:f,data:c},[c.buffer])}probeEmsgID3({data:c,offset:f}){const h=wo.getEmsgID3(c,f);this.self.postMessage({action:"probeEmsgID3",id3Frames:h,emsgData:c},[c.buffer])}probeTs({data:c,baseStartTime:f}){const h=typeof f=="number"&&!isNaN(f)?f*fe.ONE_SECOND_IN_TS:void 0,m=l2.inspect(c,h);let g=null;m&&(g={hasVideo:m.video&&m.video.length===2||!1,hasAudio:m.audio&&m.audio.length===2||!1},g.hasVideo&&(g.videoStart=m.video[0].ptsTime),g.hasAudio&&(g.audioStart=m.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:g,data:c},[c.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(c){const f=new Uint8Array(c.data,c.byteOffset,c.byteLength);this.transmuxer.push(f)}reset(){this.transmuxer.reset()}setTimestampOffset(c){const f=c.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(fe.secondsToVideoTs(f)))}setAudioAppendStart(c){this.transmuxer.setAudioAppendStart(Math.ceil(fe.secondsToVideoTs(c.appendStart)))}setRemux(c){this.transmuxer.setRemux(c.remux)}flush(c){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(c){this.transmuxer.alignGopsWith(c.gopsToAlignWith.slice())}}self.onmessage=function(u){if(u.data.action==="init"&&u.data.options){this.messageHandlers=new Vc(self,u.data.options);return}this.messageHandlers||(this.messageHandlers=new Vc(self)),u.data&&u.data.action&&u.data.action!=="init"&&this.messageHandlers[u.data.action]&&this.messageHandlers[u.data.action](u.data)}}));var Jw=ug(Qw);const Zw=(s,e,t)=>{const{type:i,initSegment:r,captions:n,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:d}=s.data.segment;e.buffer.push({captions:n,captionStreams:a,metadata:o});const p=s.data.segment.boxes||{data:s.data.segment.data},y={type:i,data:new Uint8Array(p.data,p.data.byteOffset,p.data.byteLength),initSegment:new Uint8Array(r.data,r.byteOffset,r.byteLength)};typeof l<"u"&&(y.videoFrameDtsTime=l),typeof d<"u"&&(y.videoFramePtsTime=d),t(y)},eA=({transmuxedData:s,callback:e})=>{s.buffer=[],e(s)},tA=(s,e)=>{e.gopInfo=s.data.gopInfo},dg=s=>{const{transmuxer:e,bytes:t,audioAppendStart:i,gopsToAlignWith:r,remux:n,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:d,onVideoSegmentTimingInfo:p,onAudioSegmentTimingInfo:y,onId3:_,onCaptions:b,onDone:v,onEndedTimeline:x,onTransmuxerLog:D,isEndOfTimeline:A}=s,k={buffer:[]};let M=A;const O=I=>{e.currentTransmux===s&&(I.data.action==="data"&&Zw(I,k,a),I.data.action==="trackinfo"&&o(I.data.trackInfo),I.data.action==="gopInfo"&&tA(I,k),I.data.action==="audioTimingInfo"&&l(I.data.audioTimingInfo),I.data.action==="videoTimingInfo"&&d(I.data.videoTimingInfo),I.data.action==="videoSegmentTimingInfo"&&p(I.data.videoSegmentTimingInfo),I.data.action==="audioSegmentTimingInfo"&&y(I.data.audioSegmentTimingInfo),I.data.action==="id3Frame"&&_([I.data.id3Frame],I.data.id3Frame.dispatchType),I.data.action==="caption"&&b(I.data.caption),I.data.action==="endedtimeline"&&(M=!1,x()),I.data.action==="log"&&D(I.data.log),I.data.type==="transmuxed"&&(M||(e.onmessage=null,eA({transmuxedData:k,callback:v}),hg(e))))};if(e.onmessage=O,i&&e.postMessage({action:"setAudioAppendStart",appendStart:i}),Array.isArray(r)&&e.postMessage({action:"alignGopsWith",gopsToAlignWith:r}),typeof n<"u"&&e.postMessage({action:"setRemux",remux:n}),t.byteLength){const I=t instanceof ArrayBuffer?t:t.buffer,U=t instanceof ArrayBuffer?0:t.byteOffset;e.postMessage({action:"push",data:I,byteOffset:U,byteLength:t.byteLength},[I])}A&&e.postMessage({action:"endTimeline"}),e.postMessage({action:"flush"})},hg=s=>{s.currentTransmux=null,s.transmuxQueue.length&&(s.currentTransmux=s.transmuxQueue.shift(),typeof s.currentTransmux=="function"?s.currentTransmux():dg(s.currentTransmux))},xh=(s,e)=>{s.postMessage({action:e}),hg(s)},fg=(s,e)=>{if(!e.currentTransmux){e.currentTransmux=s,xh(e,s);return}e.transmuxQueue.push(xh.bind(null,e,s))},iA=s=>{fg("reset",s)},sA=s=>{fg("endTimeline",s)},pg=s=>{if(!s.transmuxer.currentTransmux){s.transmuxer.currentTransmux=s,dg(s);return}s.transmuxer.transmuxQueue.push(s)},rA=s=>{const e=new Jw;e.currentTransmux=null,e.transmuxQueue=[];const t=e.terminate;return e.terminate=()=>(e.currentTransmux=null,e.transmuxQueue.length=0,t.call(e)),e.postMessage({action:"init",options:s}),e};var su={reset:iA,endTimeline:sA,transmux:pg,createTransmuxer:rA};const Pr=function(s){const e=s.transmuxer,t=s.endAction||s.action,i=s.callback,r=yt({},s,{endAction:null,transmuxer:null,callback:null}),n=a=>{a.data.action===t&&(e.removeEventListener("message",n),a.data.data&&(a.data.data=new Uint8Array(a.data.data,s.byteOffset||0,s.byteLength||a.data.data.byteLength),s.data&&(s.data=a.data.data)),i(a.data))};if(e.addEventListener("message",n),s.data){const a=s.data instanceof ArrayBuffer;r.byteOffset=a?0:s.data.byteOffset,r.byteLength=s.data.byteLength;const o=[a?s.data:s.data.buffer];e.postMessage(r,o)}else e.postMessage(r)},Rt={FAILURE:2,TIMEOUT:-101,ABORTED:-102},Uu=s=>{s.forEach(e=>{e.abort()})},nA=s=>({bandwidth:s.bandwidth,bytesReceived:s.bytesReceived||0,roundTripTime:s.roundTripTime||0}),aA=s=>{const e=s.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-e.requestTime||0};return i.bytesReceived=s.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i},Kl=(s,e)=>e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:Rt.TIMEOUT,xhr:e}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:Rt.ABORTED,xhr:e}:s?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:Rt.FAILURE,xhr:e}:e.responseType==="arraybuffer"&&e.response.byteLength===0?{status:e.status,message:"Empty HLS response at URL: "+e.uri,code:Rt.FAILURE,xhr:e}:null,Eh=(s,e,t)=>(i,r)=>{const n=r.response,a=Kl(i,r);if(a)return t(a,s);if(n.byteLength!==16)return t({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:Rt.FAILURE,xhr:r},s);const o=new DataView(n),l=new Uint32Array([o.getUint32(0),o.getUint32(4),o.getUint32(8),o.getUint32(12)]);for(let d=0;d{const t=fl(s.map.bytes);if(t!=="mp4"){const i=s.map.resolvedUri||s.map.uri,r=t||"unknown";return e({internal:!0,message:`Found unsupported ${r} container for initialization segment at URL: ${i}`,code:Rt.FAILURE,metadata:{errorType:L.Error.UnsupportedMediaInitialization,mediaType:r}})}Pr({action:"probeMp4Tracks",data:s.map.bytes,transmuxer:s.transmuxer,callback:({tracks:i,data:r})=>(s.map.bytes=r,i.forEach(function(n){s.map.tracks=s.map.tracks||{},!s.map.tracks[n.type]&&(s.map.tracks[n.type]=n,typeof n.id=="number"&&n.timescale&&(s.map.timescales=s.map.timescales||{},s.map.timescales[n.id]=n.timescale))}),e(null))})},oA=({segment:s,finishProcessingFn:e})=>(t,i)=>{const r=Kl(t,i);if(r)return e(r,s);const n=new Uint8Array(i.response);if(s.map.key)return s.map.encryptedBytes=n,e(null,s);s.map.bytes=n,mg(s,function(a){if(a)return a.xhr=i,a.status=i.status,e(a,s);e(null,s)})},uA=({segment:s,finishProcessingFn:e,responseType:t})=>(i,r)=>{const n=Kl(i,r);if(n)return e(n,s);const a=t==="arraybuffer"||!r.responseText?r.response:Xw(r.responseText.substring(s.lastReachedChar||0));return s.stats=nA(r),s.key?s.encryptedBytes=new Uint8Array(a):s.bytes=new Uint8Array(a),e(null,s)},lA=({segment:s,bytes:e,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:p,doneFn:y,onTransmuxerLog:_})=>{const b=s.map&&s.map.tracks||{},v=!!(b.audio&&b.video);let x=i.bind(null,s,"audio","start");const D=i.bind(null,s,"audio","end");let A=i.bind(null,s,"video","start");const k=i.bind(null,s,"video","end"),M=()=>pg({bytes:e,transmuxer:s.transmuxer,audioAppendStart:s.audioAppendStart,gopsToAlignWith:s.gopsToAlignWith,remux:v,onData:O=>{O.type=O.type==="combined"?"video":O.type,p(s,O)},onTrackInfo:O=>{t&&(v&&(O.isMuxed=!0),t(s,O))},onAudioTimingInfo:O=>{x&&typeof O.start<"u"&&(x(O.start),x=null),D&&typeof O.end<"u"&&D(O.end)},onVideoTimingInfo:O=>{A&&typeof O.start<"u"&&(A(O.start),A=null),k&&typeof O.end<"u"&&k(O.end)},onVideoSegmentTimingInfo:O=>{r(O)},onAudioSegmentTimingInfo:O=>{n(O)},onId3:(O,I)=>{a(s,O,I)},onCaptions:O=>{o(s,[O])},isEndOfTimeline:l,onEndedTimeline:()=>{d()},onTransmuxerLog:_,onDone:O=>{y&&(O.type=O.type==="combined"?"video":O.type,y(null,s,O))}});Pr({action:"probeTs",transmuxer:s.transmuxer,data:e,baseStartTime:s.baseStartTime,callback:O=>{s.bytes=e=O.data;const I=O.result;I&&(t(s,{hasAudio:I.hasAudio,hasVideo:I.hasVideo,isMuxed:v}),t=null),M()}})},gg=({segment:s,bytes:e,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:p,doneFn:y,onTransmuxerLog:_})=>{let b=new Uint8Array(e);if(NE(b)){s.isFmp4=!0;const{tracks:v}=s.map,x={isFmp4:!0,hasVideo:!!v.video,hasAudio:!!v.audio};v.audio&&v.audio.codec&&v.audio.codec!=="enca"&&(x.audioCodec=v.audio.codec),v.video&&v.video.codec&&v.video.codec!=="encv"&&(x.videoCodec=v.video.codec),v.video&&v.audio&&(x.isMuxed=!0),t(s,x);const D=(A,k)=>{p(s,{data:b,type:x.hasAudio&&!x.isMuxed?"audio":"video"}),k&&k.length&&a(s,k),A&&A.length&&o(s,A),y(null,s,{})};Pr({action:"probeMp4StartTime",timescales:s.map.timescales,data:b,transmuxer:s.transmuxer,callback:({data:A,startTime:k})=>{e=A.buffer,s.bytes=b=A,x.hasAudio&&!x.isMuxed&&i(s,"audio","start",k),x.hasVideo&&i(s,"video","start",k),Pr({action:"probeEmsgID3",data:b,transmuxer:s.transmuxer,offset:k,callback:({emsgData:M,id3Frames:O})=>{if(e=M.buffer,s.bytes=b=M,!v.video||!M.byteLength||!s.transmuxer){D(void 0,O);return}Pr({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:s.transmuxer,data:b,timescales:s.map.timescales,trackIds:[v.video.id],callback:I=>{e=I.data.buffer,s.bytes=b=I.data,I.logs.forEach(function(U){_(re(U,{stream:"mp4CaptionParser"}))}),D(I.captions,O)}})}})}});return}if(!s.transmuxer){y(null,s,{});return}if(typeof s.container>"u"&&(s.container=fl(b)),s.container!=="ts"&&s.container!=="aac"){t(s,{hasAudio:!1,hasVideo:!1}),y(null,s,{});return}lA({segment:s,bytes:e,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:p,doneFn:y,onTransmuxerLog:_})},yg=function({id:s,key:e,encryptedBytes:t,decryptionWorker:i},r){const n=o=>{if(o.data.source===s){i.removeEventListener("message",n);const l=o.data.decrypted;r(new Uint8Array(l.bytes,l.byteOffset,l.byteLength))}};i.addEventListener("message",n);let a;e.bytes.slice?a=e.bytes.slice():a=new Uint32Array(Array.prototype.slice.call(e.bytes)),i.postMessage(ig({source:s,encrypted:t,key:a,iv:e.iv}),[t.buffer,a.buffer])},cA=({decryptionWorker:s,segment:e,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:p,doneFn:y,onTransmuxerLog:_})=>{yg({id:e.requestId,key:e.key,encryptedBytes:e.encryptedBytes,decryptionWorker:s},b=>{e.bytes=b,gg({segment:e,bytes:e.bytes,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:p,doneFn:y,onTransmuxerLog:_})})},dA=({activeXhrs:s,decryptionWorker:e,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:p,doneFn:y,onTransmuxerLog:_})=>{let b=0,v=!1;return(x,D)=>{if(!v){if(x)return v=!0,Uu(s),y(x,D);if(b+=1,b===s.length){const A=function(){if(D.encryptedBytes)return cA({decryptionWorker:e,segment:D,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:p,doneFn:y,onTransmuxerLog:_});gg({segment:D,bytes:D.bytes,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:p,doneFn:y,onTransmuxerLog:_})};if(D.endOfAllRequests=Date.now(),D.map&&D.map.encryptedBytes&&!D.map.bytes)return yg({decryptionWorker:e,id:D.requestId+"-init",encryptedBytes:D.map.encryptedBytes,key:D.map.key},k=>{D.map.bytes=k,mg(D,M=>{if(M)return Uu(s),y(M,D);A()})});A()}}}},hA=({loadendState:s,abortFn:e})=>t=>{t.target.aborted&&e&&!s.calledAbortFn&&(e(),s.calledAbortFn=!0)},fA=({segment:s,progressFn:e,trackInfoFn:t,timingInfoFn:i,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:p})=>y=>{if(!y.target.aborted)return s.stats=re(s.stats,aA(y)),!s.stats.firstBytesReceivedAt&&s.stats.bytesReceived&&(s.stats.firstBytesReceivedAt=Date.now()),e(y,s)},pA=({xhr:s,xhrOptions:e,decryptionWorker:t,segment:i,abortFn:r,progressFn:n,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:d,id3Fn:p,captionsFn:y,isEndOfTimeline:_,endedTimelineFn:b,dataFn:v,doneFn:x,onTransmuxerLog:D})=>{const A=[],k=dA({activeXhrs:A,decryptionWorker:t,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:d,id3Fn:p,captionsFn:y,isEndOfTimeline:_,endedTimelineFn:b,dataFn:v,doneFn:x,onTransmuxerLog:D});if(i.key&&!i.key.bytes){const V=[i.key];i.map&&!i.map.bytes&&i.map.key&&i.map.key.resolvedUri===i.key.resolvedUri&&V.push(i.map.key);const J=re(e,{uri:i.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),W=Eh(i,V,k),ue=s(J,W);A.push(ue)}if(i.map&&!i.map.bytes){if(i.map.key&&(!i.key||i.key.resolvedUri!==i.map.key.resolvedUri)){const te=re(e,{uri:i.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),he=Eh(i,[i.map.key],k),H=s(te,he);A.push(H)}const J=re(e,{uri:i.map.resolvedUri,responseType:"arraybuffer",headers:Nu(i.map),requestType:"segment-media-initialization"}),W=oA({segment:i,finishProcessingFn:k}),ue=s(J,W);A.push(ue)}const M=re(e,{uri:i.part&&i.part.resolvedUri||i.resolvedUri,responseType:"arraybuffer",headers:Nu(i),requestType:"segment"}),O=uA({segment:i,finishProcessingFn:k,responseType:M.responseType}),I=s(M,O);I.addEventListener("progress",fA({segment:i,progressFn:n,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:d,id3Fn:p,captionsFn:y,isEndOfTimeline:_,endedTimelineFn:b,dataFn:v})),A.push(I);const U={};return A.forEach(V=>{V.addEventListener("loadend",hA({loadendState:U,abortFn:r}))}),()=>Uu(A)},mA=bt("CodecUtils"),gA=function(s){const e=s.attributes||{};if(e.CODECS)return Pt(e.CODECS)},_g=(s,e)=>{const t=e.attributes||{};return s&&s.mediaGroups&&s.mediaGroups.AUDIO&&t.AUDIO&&s.mediaGroups.AUDIO[t.AUDIO]},yA=(s,e)=>{if(!_g(s,e))return!0;const t=e.attributes||{},i=s.mediaGroups.AUDIO[t.AUDIO];for(const r in i)if(!i[r].uri&&!i[r].playlists)return!0;return!1},ba=function(s){const e={};return s.forEach(({mediaType:t,type:i,details:r})=>{e[t]=e[t]||[],e[t].push(Lf(`${i}${r}`))}),Object.keys(e).forEach(function(t){if(e[t].length>1){mA(`multiple ${t} codecs found as attributes: ${e[t].join(", ")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),e[t]=null;return}e[t]=e[t][0]}),e},Ch=function(s){let e=0;return s.audio&&e++,s.video&&e++,e},Ir=function(s,e){const t=e.attributes||{},i=ba(gA(e)||[]);if(_g(s,e)&&!i.audio&&!yA(s,e)){const r=ba(NS(s,t.AUDIO)||[]);r.audio&&(i.audio=r.audio)}return i},jn=bt("PlaylistSelector"),wh=function(s){if(!s||!s.playlist)return;const e=s.playlist;return JSON.stringify({id:e.id,bandwidth:s.bandwidth,width:s.width,height:s.height,codecs:e.attributes&&e.attributes.CODECS||""})},Sa=function(s,e){if(!s)return"";const t=C.getComputedStyle(s);return t?t[e]:""},vs=function(s,e){const t=s.slice();s.sort(function(i,r){const n=e(i,r);return n===0?t.indexOf(i)-t.indexOf(r):n})},Xl=function(s,e){let t,i;return s.attributes.BANDWIDTH&&(t=s.attributes.BANDWIDTH),t=t||C.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||C.Number.MAX_VALUE,t-i},_A=function(s,e){let t,i;return s.attributes.RESOLUTION&&s.attributes.RESOLUTION.width&&(t=s.attributes.RESOLUTION.width),t=t||C.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||C.Number.MAX_VALUE,t===i&&s.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?s.attributes.BANDWIDTH-e.attributes.BANDWIDTH:t-i};let vg=function(s,e,t,i,r,n){if(!s)return;const a={bandwidth:e,width:t,height:i,limitRenditionByPlayerDimensions:r};let o=s.playlists;Ye.isAudioOnly(s)&&(o=n.getAudioTrackPlaylists_(),a.audioOnly=!0);let l=o.map(I=>{let U;const V=I.attributes&&I.attributes.RESOLUTION&&I.attributes.RESOLUTION.width,J=I.attributes&&I.attributes.RESOLUTION&&I.attributes.RESOLUTION.height;return U=I.attributes&&I.attributes.BANDWIDTH,U=U||C.Number.MAX_VALUE,{bandwidth:U,width:V,height:J,playlist:I}});vs(l,(I,U)=>I.bandwidth-U.bandwidth),l=l.filter(I=>!Ye.isIncompatible(I.playlist));let d=l.filter(I=>Ye.isEnabled(I.playlist));d.length||(d=l.filter(I=>!Ye.isDisabled(I.playlist)));const p=d.filter(I=>I.bandwidth*Ne.BANDWIDTH_VARIANCEI.bandwidth===y.bandwidth)[0];if(r===!1){const I=_||d[0]||l[0];if(I&&I.playlist){let U="sortedPlaylistReps";return _&&(U="bandwidthBestRep"),d[0]&&(U="enabledPlaylistReps"),jn(`choosing ${wh(I)} using ${U} with options`,a),I.playlist}return jn("could not choose a playlist with options",a),null}const b=p.filter(I=>I.width&&I.height);vs(b,(I,U)=>I.width-U.width);const v=b.filter(I=>I.width===t&&I.height===i);y=v[v.length-1];const x=v.filter(I=>I.bandwidth===y.bandwidth)[0];let D,A,k;x||(D=b.filter(I=>I.width>t||I.height>i),A=D.filter(I=>I.width===D[0].width&&I.height===D[0].height),y=A[A.length-1],k=A.filter(I=>I.bandwidth===y.bandwidth)[0]);let M;if(n.leastPixelDiffSelector){const I=b.map(U=>(U.pixelDiff=Math.abs(U.width-t)+Math.abs(U.height-i),U));vs(I,(U,V)=>U.pixelDiff===V.pixelDiff?V.bandwidth-U.bandwidth:U.pixelDiff-V.pixelDiff),M=I[0]}const O=M||k||x||_||d[0]||l[0];if(O&&O.playlist){let I="sortedPlaylistReps";return M?I="leastPixelDiffRep":k?I="resolutionPlusOneRep":x?I="resolutionBestRep":_?I="bandwidthBestRep":d[0]&&(I="enabledPlaylistReps"),jn(`choosing ${wh(O)} using ${I} with options`,a),O.playlist}return jn("could not choose a playlist with options",a),null};const Ah=function(){const s=this.useDevicePixelRatio&&C.devicePixelRatio||1;return vg(this.playlists.main,this.systemBandwidth,parseInt(Sa(this.tech_.el(),"width"),10)*s,parseInt(Sa(this.tech_.el(),"height"),10)*s,this.limitRenditionByPlayerDimensions,this.playlistController_)},vA=function(s){let e=-1,t=-1;if(s<0||s>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){const i=this.useDevicePixelRatio&&C.devicePixelRatio||1;return e<0&&(e=this.systemBandwidth,t=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==t&&(e=s*this.systemBandwidth+(1-s)*e,t=this.systemBandwidth),vg(this.playlists.main,e,parseInt(Sa(this.tech_.el(),"width"),10)*i,parseInt(Sa(this.tech_.el(),"height"),10)*i,this.limitRenditionByPlayerDimensions,this.playlistController_)}},TA=function(s){const{main:e,currentTime:t,bandwidth:i,duration:r,segmentDuration:n,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=s,d=e.playlists.filter(v=>!Ye.isIncompatible(v));let p=d.filter(Ye.isEnabled);p.length||(p=d.filter(v=>!Ye.isDisabled(v)));const _=p.filter(Ye.hasAttribute.bind(null,"BANDWIDTH")).map(v=>{const D=l.getSyncPoint(v,r,o,t)?1:2,k=Ye.estimateSegmentRequestTime(n,i,v)*D-a;return{playlist:v,rebufferingImpact:k}}),b=_.filter(v=>v.rebufferingImpact<=0);return vs(b,(v,x)=>Xl(x.playlist,v.playlist)),b.length?b[0]:(vs(_,(v,x)=>v.rebufferingImpact-x.rebufferingImpact),_[0]||null)},bA=function(){const s=this.playlists.main.playlists.filter(Ye.isEnabled);return vs(s,(t,i)=>Xl(t,i)),s.filter(t=>!!Ir(this.playlists.main,t).video)[0]||null},SA=s=>{let e=0,t;return s.bytes&&(t=new Uint8Array(s.bytes),s.segments.forEach(i=>{t.set(i,e),e+=i.byteLength})),t},xA=function(s,e,t){if(!s[t]){e.trigger({type:"usage",name:"vhs-608"});let i=t;/^cc708_/.test(t)&&(i="SERVICE"+t.split("_")[1]);const r=e.textTracks().getTrackById(i);if(r)s[t]=r;else{const n=e.options_.vhs&&e.options_.vhs.captionServices||{};let a=t,o=t,l=!1;const d=n[i];d&&(a=d.label,o=d.language,l=d.default),s[t]=e.addRemoteTextTrack({kind:"captions",id:i,default:l,label:a,language:o},!1).track}}},EA=function({inbandTextTracks:s,captionArray:e,timestampOffset:t}){if(!e)return;const i=C.WebKitDataCue||C.VTTCue;e.forEach(r=>{const n=r.stream;r.content?r.content.forEach(a=>{const o=new i(r.startTime+t,r.endTime+t,a.text);o.line=a.line,o.align="left",o.position=a.position,o.positionAlign="line-left",s[n].addCue(o)}):s[n].addCue(new i(r.startTime+t,r.endTime+t,r.text))})},CA=function(s){Object.defineProperties(s.frame,{id:{get(){return L.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),s.value.key}},value:{get(){return L.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),s.value.data}},privateData:{get(){return L.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),s.value.data}}})},wA=({inbandTextTracks:s,metadataArray:e,timestampOffset:t,videoDuration:i})=>{if(!e)return;const r=C.WebKitDataCue||C.VTTCue,n=s.metadataTrack_;if(!n||(e.forEach(p=>{const y=p.cueTime+t;typeof y!="number"||C.isNaN(y)||y<0||!(y<1/0)||!p.frames||!p.frames.length||p.frames.forEach(_=>{const b=new r(y,y,_.value||_.url||_.data||"");b.frame=_,b.value=_,CA(b),n.addCue(b)})}),!n.cues||!n.cues.length))return;const a=n.cues,o=[];for(let p=0;p{const _=p[y.startTime]||[];return _.push(y),p[y.startTime]=_,p},{}),d=Object.keys(l).sort((p,y)=>Number(p)-Number(y));d.forEach((p,y)=>{const _=l[p],b=isFinite(i)?i:p,v=Number(d[y+1])||b;_.forEach(x=>{x.endTime=v})})},AA={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},DA=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),kA=({inbandTextTracks:s,dateRanges:e})=>{const t=s.metadataTrack_;if(!t)return;const i=C.WebKitDataCue||C.VTTCue;e.forEach(r=>{for(const n of Object.keys(r)){if(DA.has(n))continue;const a=new i(r.startTime,r.endTime,"");a.id=r.id,a.type="com.apple.quicktime.HLS",a.value={key:AA[n],data:r[n]},(n==="scte35Out"||n==="scte35In")&&(a.value.data=new Uint8Array(a.value.data.match(/[\da-f]{2}/gi)).buffer),t.addCue(a)}r.processDateRange()})},Dh=(s,e,t)=>{s.metadataTrack_||(s.metadataTrack_=t.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,L.browser.IS_ANY_SAFARI||(s.metadataTrack_.inBandMetadataTrackDispatchType=e))},br=function(s,e,t){let i,r;if(t&&t.cues)for(i=t.cues.length;i--;)r=t.cues[i],r.startTime>=s&&r.endTime<=e&&t.removeCue(r)},PA=function(s){const e=s.cues;if(!e)return;const t={};for(let i=e.length-1;i>=0;i--){const r=e[i],n=`${r.startTime}-${r.endTime}-${r.text}`;t[n]?s.removeCue(r):t[n]=r}},IA=(s,e,t)=>{if(typeof e>"u"||e===null||!s.length)return[];const i=Math.ceil((e-t+3)*Mi.ONE_SECOND_IN_TS);let r;for(r=0;ri);r++);return s.slice(r)},LA=(s,e,t)=>{if(!e.length)return s;if(t)return e.slice();const i=e[0].pts;let r=0;for(r;r=i);r++);return s.slice(0,r).concat(e)},OA=(s,e,t,i)=>{const r=Math.ceil((e-i)*Mi.ONE_SECOND_IN_TS),n=Math.ceil((t-i)*Mi.ONE_SECOND_IN_TS),a=s.slice();let o=s.length;for(;o--&&!(s[o].pts<=n););if(o===-1)return a;let l=o+1;for(;l--&&!(s[l].pts<=r););return l=Math.max(l,0),a.splice(l,o-l+1),a},RA=function(s,e){if(!s&&!e||!s&&e||s&&!e)return!1;if(s===e)return!0;const t=Object.keys(s).sort(),i=Object.keys(e).sort();if(t.length!==i.length)return!1;for(let r=0;rt))return n}return i.length===0?0:i[i.length-1]},hr=1,NA=500,kh=s=>typeof s=="number"&&isFinite(s),qn=1/60,BA=(s,e,t)=>s!=="main"||!e||!t?null:!t.hasAudio&&!t.hasVideo?"Neither audio nor video found in segment.":e.hasVideo&&!t.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!e.hasVideo&&t.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null,UA=(s,e,t)=>{let i=e-Ne.BACK_BUFFER_LENGTH;s.length&&(i=Math.max(i,s.start(0)));const r=e-t;return Math.min(r,i)},rs=s=>{const{startOfSegment:e,duration:t,segment:i,part:r,playlist:{mediaSequence:n,id:a,segments:o=[]},mediaIndex:l,partIndex:d,timeline:p}=s,y=o.length-1;let _="mediaIndex/partIndex increment";s.getMediaInfoForTime?_=`getMediaInfoForTime (${s.getMediaInfoForTime})`:s.isSyncRequest&&(_="getSyncSegmentCandidate (isSyncRequest)"),s.independent&&(_+=` with independent ${s.independent}`);const b=typeof d=="number",v=s.segment.uri?"segment":"pre-segment",x=b?jm({preloadSegment:i})-1:0;return`${v} [${n+l}/${n+y}]`+(b?` part [${d}/${x}]`:"")+` segment start/end [${i.start} => ${i.end}]`+(b?` part start/end [${r.start} => ${r.end}]`:"")+` startOfSegment [${e}] duration [${t}] timeline [${p}] selected by [${_}] playlist [${a}]`},Ph=s=>`${s}TimingInfo`,FA=({segmentTimeline:s,currentTimeline:e,startOfSegment:t,buffered:i,overrideCheck:r})=>!r&&s===e?null:s{if(e===t)return!1;if(i==="audio"){const n=s.lastTimelineChange({type:"main"});return!n||n.to!==t}if(i==="main"&&r){const n=s.pendingTimelineChange({type:"audio"});return!(n&&n.to===t)}return!1},$A=s=>{let e=0;return["video","audio"].forEach(function(t){const i=s[`${t}TimingInfo`];if(!i)return;const{start:r,end:n}=i;let a;typeof r=="bigint"||typeof n=="bigint"?a=C.BigInt(n)-C.BigInt(r):typeof r=="number"&&typeof n=="number"&&(a=n-r),typeof a<"u"&&a>e&&(e=a)}),typeof e=="bigint"&&es?Math.round(s)>e+Et:!1,jA=(s,e)=>{if(e!=="hls")return null;const t=$A({audioTimingInfo:s.audioTimingInfo,videoTimingInfo:s.videoTimingInfo});if(!t)return null;const i=s.playlist.targetDuration,r=Lh({segmentDuration:t,maxDuration:i*2}),n=Lh({segmentDuration:t,maxDuration:i}),a=`Segment with index ${s.mediaIndex} from playlist ${s.playlist.id} has a duration of ${t} when the reported duration is ${s.duration} and the target duration is ${i}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return r||n?{severity:r?"warn":"info",message:a}:null};class Fu extends L.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError("Initialization settings are required");if(typeof e.currentTime!="function")throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=bt(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(i){i!==this.state_&&(this.logger_(`${this.state_} -> ${i}`),this.state_=i,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",()=>{this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}),this.loaderType_==="main"&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}),this.loaderType_==="audio"&&this.timelineChangeController_.on("timelinechange",()=>{this.hasEnoughInfoToLoad_()&&this.processLoadQueue_(),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()})}createTransmuxer_(){return su.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&C.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(this.state!=="WAITING"){this.pendingSegment_&&(this.pendingSegment_=null);return}this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,C.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return this.state==="APPENDING"&&!this.pendingSegment_?(this.state="READY",!0):!this.pendingSegment_||this.pendingSegment_.requestId!==e}error(e){return typeof e<"u"&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&su.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return qe();if(this.loaderType_==="main"){const{hasAudio:t,hasVideo:i,isMuxed:r}=e;if(i&&t&&!this.audioDisabled_&&!r)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ta(e);let r=this.initSegments_[i];return t&&!r&&e.bytes&&(this.initSegments_[i]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),r||e}segmentKey(e,t=!1){if(!e)return null;const i=sg(e);let r=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!r&&e.bytes&&(this.keyCache_[i]=r={resolvedUri:e.resolvedUri,bytes:e.bytes});const n={resolvedUri:(r||e).resolvedUri};return r&&(n.bytes=r.bytes),n}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),!!this.playlist_){if(this.state==="INIT"&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||this.state!=="READY"&&this.state!=="INIT"||(this.state="READY")}}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;const i=this.playlist_,r=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,this.state==="INIT"&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},this.loaderType_==="main"&&this.syncController_.setDateTimeMappingForStart(e));let n=null;if(i&&(i.id?n=i.id:i.uri&&(n=i.uri)),this.logger_(`playlist update [${n} => ${e.id||e.uri}]`),this.syncController_.updateMediaSequenceMap(e,this.currentTime_(),this.loaderType_),this.trigger("syncinfoupdate"),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){this.mediaIndex!==null&&(!e.endList&&typeof e.partTargetDuration=="number"?this.resetLoader():this.resyncLoader()),this.currentMediaInfo_=void 0,this.trigger("playlistupdate");return}const a=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${a}]`),this.mediaIndex!==null)if(this.mediaIndex-=a,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const o=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!o.parts||!o.parts.length||!o.parts[this.partIndex])){const l=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=l}}r&&(r.mediaIndex-=a,r.mediaIndex<0?(r.mediaIndex=null,r.partIndex=null):(r.mediaIndex>=0&&(r.segment=e.segments[r.mediaIndex]),r.partIndex>=0&&r.segment.parts&&(r.part=r.segment.parts[r.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(C.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return this.checkBufferTimeout_===null}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}resetLoader(){this.fetchAtBuffer_=!1,this.resyncLoader()}resyncLoader(){this.transmuxer_&&su.reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.shouldForceTimestampOffsetAfterResync_=!0,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}remove(e,t,i=()=>{},r=!1){if(t===1/0&&(t=this.duration_()),t<=e){this.logger_("skipping remove because end ${end} is <= start ${start}");return}if(!this.sourceUpdater_||!this.getMediaInfo_()){this.logger_("skipping remove because no source updater or starting media info");return}let n=1;const a=()=>{n--,n===0&&i()};(r||!this.audioDisabled_)&&(n++,this.sourceUpdater_.removeAudio(e,t,a)),(r||this.loaderType_==="main")&&(this.gopBuffer_=OA(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,a));for(const o in this.inbandTextTracks_)br(e,t,this.inbandTextTracks_[o]);br(e,t,this.segmentMetadataTrack_),a()}monitorBuffer_(){this.checkBufferTimeout_&&C.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=C.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&C.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=C.setTimeout(this.monitorBufferTick_.bind(this),NA)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();e&&(typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const r=typeof e=="number"&&t.segments[e],n=e+1===t.segments.length,a=!r||!r.parts||i+1===r.parts.length;return t.endList&&this.mediaSource_.readyState==="open"&&n&&a}chooseNextRequest_(){const e=this.buffered_(),t=_h(e)||0,i=Hl(e,this.currentTime_()),r=!this.hasPlayed_()&&i>=1,n=i>=this.goalBufferLength_(),a=this.playlist_.segments;if(!a.length||r||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const o={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:!this.syncPoint_};if(o.isSyncRequest)o.mediaIndex=MA(this.currentTimeline_,a,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${o.mediaIndex}`);else if(this.mediaIndex!==null){const _=a[this.mediaIndex],b=typeof this.partIndex=="number"?this.partIndex:-1;o.startOfSegment=_.end?_.end:t,_.parts&&_.parts[b+1]?(o.mediaIndex=this.mediaIndex,o.partIndex=b+1):o.mediaIndex=this.mediaIndex+1}else{let _=Ye.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?t:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});if(!_)return null;if(this.fetchAtBuffer_){const D=a[_.segmentIndex],A=_.startTime+D.duration;if(A>t){const k=A-t,M=2*Et;if(k<=M&&(_=Ye.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:t+k+M,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time}),!_))return null}}const{segmentIndex:b,startTime:v,partIndex:x}=_;o.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${t}`:`currentTime ${this.currentTime_()}`,o.mediaIndex=b,o.startOfSegment=v,o.partIndex=x,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${o.mediaIndex} `)}const l=a[o.mediaIndex];let d=l&&typeof o.partIndex=="number"&&l.parts&&l.parts[o.partIndex];if(!l||typeof o.partIndex=="number"&&!d)return null;typeof o.partIndex!="number"&&l.parts&&(o.partIndex=0,d=l.parts[0]);const p=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&d&&!p&&!d.independent)if(o.partIndex===0){const _=a[o.mediaIndex-1],b=_.parts&&_.parts.length&&_.parts[_.parts.length-1];b&&b.independent&&(o.mediaIndex-=1,o.partIndex=_.parts.length-1,o.independent="previous segment")}else l.parts[o.partIndex-1].independent&&(o.partIndex-=1,o.independent="previous part");const y=this.mediaSource_&&this.mediaSource_.readyState==="ended";return o.mediaIndex>=a.length-1&&y&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,o.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync")),this.generateSegmentInfo_(o))}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:r,startOfSegment:n,isSyncRequest:a,partIndex:o,forceTimestampOffset:l,getMediaInfoForTime:d}=e,p=i.segments[r],y=typeof o=="number"&&p.parts[o],_={requestId:"segment-loader-"+Math.random(),uri:y&&y.resolvedUri||p.resolvedUri,mediaIndex:r,partIndex:y?o:null,isSyncRequest:a,startOfSegment:n,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:p.timeline,duration:y&&y.duration||p.duration,segment:p,part:y,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:d,independent:t},b=typeof l<"u"?l:this.isPendingTimestampOffset_;_.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:p.timeline,currentTimeline:this.currentTimeline_,startOfSegment:n,buffered:this.buffered_(),overrideCheck:b});const v=_h(this.sourceUpdater_.audioBuffered());return typeof v=="number"&&(_.audioAppendStart=v-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(_.gopsToAlignWith=IA(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),_}timestampOffsetForSegment_(e){return FA(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH||Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,r=this.pendingSegment_.duration,n=Ye.estimateSegmentRequestTime(r,i,this.playlist_,e.bytesReceived),a=uw(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(n<=a)return;const o=TA({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:r,timeUntilRebuffer:a,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!o)return;const d=n-a-o.rebufferingImpact;let p=.5;a<=Et&&(p=1),!(!o.playlist||o.playlist.uri===this.playlist_.uri||d{n[a.stream]=n[a.stream]||{startTime:1/0,captions:[],endTime:0};const o=n[a.stream];o.startTime=Math.min(o.startTime,a.startTime+r),o.endTime=Math.max(o.endTime,a.endTime+r),o.captions.push(a)}),Object.keys(n).forEach(a=>{const{startTime:o,endTime:l,captions:d}=n[a],p=this.inbandTextTracks_;this.logger_(`adding cues from ${o} -> ${l} for ${a}`),xA(p,this.vhs_.tech_,a),br(o,l,p[a]),EA({captionArray:d,inbandTextTracks:p,timestampOffset:r})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i));return}this.addMetadataToTextTrack(i,t,this.duration_())}processMetadataQueue_(){this.metadataQueue_.id3.forEach(e=>e()),this.metadataQueue_.caption.forEach(e=>e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach(t=>t())}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach(t=>t())}hasEnoughInfoToLoad_(){if(this.loaderType_!=="audio")return!0;const e=this.pendingSegment_;return e?this.getCurrentMediaInfo_()?!Ih({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}):!0:!1}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready()||this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:r,isMuxed:n}=t;return!(r&&!e.videoTimingInfo||i&&!this.audioDisabled_&&!n&&!e.audioTimingInfo||Ih({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_()){this.callQueue_.push(this.handleData_.bind(this,e,t));return}const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),this.mediaSource_.readyState!=="closed"){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger("fmp4"),i.timingInfo.start=i[Ph(t.type)].start;else{const r=this.getCurrentMediaInfo_(),n=this.loaderType_==="main"&&r&&r.hasVideo;let a;n&&(a=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:n,firstVideoFrameTimeForData:a,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:this.loaderType_==="main"});const r=this.chooseNextRequest_();if(r.mediaIndex!==i.mediaIndex||r.partIndex!==i.partIndex){this.logger_("sync segment was incorrect, not appending");return}this.logger_("sync segment was correct, appending")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){this.loaderType_==="main"&&typeof e.timestampOffset=="number"&&!e.changedTimestampOffset&&(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:r}){if(i){const n=Ta(i);if(this.activeInitSegmentId_===n)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=n}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=r,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},r){const n=this.sourceUpdater_.audioBuffered(),a=this.sourceUpdater_.videoBuffered();n.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+Ni(n).join(", ")),a.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+Ni(a).join(", "));const o=n.length?n.start(0):0,l=n.length?n.end(n.length-1):0,d=a.length?a.start(0):0,p=a.length?a.end(a.length-1):0;if(l-o<=hr&&p-d<=hr){this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Ni(n).join(", ")}, video buffer: ${Ni(a).join(", ")}, `),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0,metadata:{errorType:L.Error.SegmentExceedsSourceBufferQuota}}),this.trigger("error");return}this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const _=this.currentTime_()-hr;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${_}`),this.remove(0,_,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${hr}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=C.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},hr*1e3)},!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},r){if(r){if(r.code===Tg){this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i});return}this.logger_("Received non QUOTA_EXCEEDED_ERR on append",r),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:L.Error.SegmentAppendError}}),this.trigger("appenderror")}}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:r,bytes:n}){if(!n){const a=[r];let o=r.byteLength;i&&(a.unshift(i),o+=i.byteLength),n=SA({bytes:o,segments:a})}this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:n},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:n}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const r=this.pendingSegment_.segment,n=`${e}TimingInfo`;r[n]||(r[n]={}),r[n].transmuxerPrependedSeconds=i.prependedContentDuration||0,r[n].transmuxedPresentationStart=i.start.presentation,r[n].transmuxedDecodeStart=i.start.decode,r[n].transmuxedPresentationEnd=i.end.presentation,r[n].transmuxedDecodeEnd=i.end.decode,r[n].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:r}=t;if(!r||!r.byteLength||i==="audio"&&this.audioDisabled_)return;const n=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:r})}loadSegment_(e){if(this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),typeof e.timestampOffset=="number"&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),!this.hasEnoughInfoToLoad_()){this.loadQueue_.push(()=>{const t=yt({},e,{forceTimestampOffset:!0});yt(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)});return}this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),r=this.mediaIndex!==null,n=e.timeline!==this.currentTimeline_&&e.timeline>0,a=i||r&&n;this.logger_(`Requesting ${rs(e)}`),t.map&&!t.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=pA({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:a,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:o,level:l,stream:d})=>{this.logger_(`${rs(e)} logged from transmuxer stream ${d} as a ${l}: ${o}`)}})}trimBackBuffer_(e){const t=UA(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},n=e.playlist.segments[e.mediaIndex-1];if(n&&n.timeline===t.timeline&&(n.videoTimingInfo?r.baseStartTime=n.videoTimingInfo.transmuxedDecodeEnd:n.audioTimingInfo&&(r.baseStartTime=n.audioTimingInfo.transmuxedDecodeEnd)),t.key){const a=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=a}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e"u"||d.end!==r+n?r:o.start}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t){this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0,metadata:{errorType:L.Error.SegmentUnsupportedMediaFormat}}),this.trigger("error");return}const{hasAudio:i,hasVideo:r,isMuxed:n}=t,a=this.loaderType_==="main"&&r,o=!this.audioDisabled_&&i&&!n;if(e.waitingOnAppends=0,!e.hasAppendedData_){!e.timingInfo&&typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),this.checkAppendsDone_(e);return}a&&e.waitingOnAppends++,o&&e.waitingOnAppends++,a&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),o&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,e.waitingOnAppends===0&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=BA(this.loaderType_,this.getCurrentMediaInfo_(),e);return t?(this.error({message:t,playlistExclusionDuration:1/0,metadata:{errorType:L.Error.SegmentSwitchError}}),this.trigger("error"),!0):!1}updateSourceBufferTimestampOffset_(e){if(e.timestampOffset===null||typeof e.timingInfo.start!="number"||e.changedTimestampOffset||this.loaderType_!=="main")return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&typeof e.transmuxedDecodeStart=="number"?e.transmuxedDecodeStart:t&&typeof t.transmuxedDecodeStart=="number"?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),r=this.loaderType_==="main"&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;r&&(e.timingInfo.end=typeof r.end=="number"?r.end:r.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_){this.state="READY",this.paused()||this.monitorBuffer_();return}const e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:this.loaderType_==="main"});const t=jA(e,this.sourceType_);if(t&&(t.severity==="warn"?L.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest&&(this.trigger("syncinfoupdate"),!e.hasAppendedData_)){this.logger_(`Throwing away un-appended sync request ${rs(e)}`);return}this.logger_(`Appended ${rs(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),this.loaderType_==="main"&&!this.audioDisabled_&&this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");const i=e.segment,r=e.part,n=i.end&&this.currentTime_()-i.end>e.playlist.targetDuration*3,a=r&&r.end&&this.currentTime_()-r.end>e.playlist.partTargetDuration*3;if(n||a){this.logger_(`bad ${n?"segment":"part"} ${rs(e)}`),this.resetEverything();return}this.mediaIndex!==null&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duratione.toUpperCase())},qA=["video","audio"],$u=(s,e)=>{const t=e[`${s}Buffer`];return t&&t.updating||e.queuePending[s]},VA=(s,e)=>{for(let t=0;t{if(e.queue.length===0)return;let t=0,i=e.queue[t];if(i.type==="mediaSource"){!e.updating()&&e.mediaSource.readyState!=="closed"&&(e.queue.shift(),i.action(e),i.doneFn&&i.doneFn(),Ts("audio",e),Ts("video",e));return}if(s!=="mediaSource"&&!(!e.ready()||e.mediaSource.readyState==="closed"||$u(s,e))){if(i.type!==s){if(t=VA(s,e.queue),t===null)return;i=e.queue[t]}if(e.queue.splice(t,1),e.queuePending[s]=i,i.action(s,e),!i.doneFn){e.queuePending[s]=null,Ts(s,e);return}}},Sg=(s,e)=>{const t=e[`${s}Buffer`],i=bg(s);t&&(t.removeEventListener("updateend",e[`on${i}UpdateEnd_`]),t.removeEventListener("error",e[`on${i}Error_`]),e.codecs[s]=null,e[`${s}Buffer`]=null)},It=(s,e)=>s&&e&&Array.prototype.indexOf.call(s.sourceBuffers,e)!==-1,ut={appendBuffer:(s,e,t)=>(i,r)=>{const n=r[`${i}Buffer`];if(It(r.mediaSource,n)){r.logger_(`Appending segment ${e.mediaIndex}'s ${s.length} bytes to ${i}Buffer`);try{n.appendBuffer(s)}catch(a){r.logger_(`Error with code ${a.code} `+(a.code===Tg?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${e.mediaIndex} to ${i}Buffer`),r.queuePending[i]=null,t(a)}}},remove:(s,e)=>(t,i)=>{const r=i[`${t}Buffer`];if(It(i.mediaSource,r)){i.logger_(`Removing ${s} to ${e} from ${t}Buffer`);try{r.remove(s,e)}catch{i.logger_(`Remove ${s} to ${e} from ${t}Buffer failed`)}}},timestampOffset:s=>(e,t)=>{const i=t[`${e}Buffer`];It(t.mediaSource,i)&&(t.logger_(`Setting ${e}timestampOffset to ${s}`),i.timestampOffset=s)},callback:s=>(e,t)=>{s()},endOfStream:s=>e=>{if(e.mediaSource.readyState==="open"){e.logger_(`Calling mediaSource endOfStream(${s||""})`);try{e.mediaSource.endOfStream(s)}catch(t){L.log.warn("Failed to call media source endOfStream",t)}}},duration:s=>e=>{e.logger_(`Setting mediaSource duration to ${s}`);try{e.mediaSource.duration=s}catch(t){L.log.warn("Failed to set media source duration",t)}},abort:()=>(s,e)=>{if(e.mediaSource.readyState!=="open")return;const t=e[`${s}Buffer`];if(It(e.mediaSource,t)){e.logger_(`calling abort on ${s}Buffer`);try{t.abort()}catch(i){L.log.warn(`Failed to abort on ${s}Buffer`,i)}}},addSourceBuffer:(s,e)=>t=>{const i=bg(s),r=Mr(e);t.logger_(`Adding ${s}Buffer with codec ${e} to mediaSource`);const n=t.mediaSource.addSourceBuffer(r);n.addEventListener("updateend",t[`on${i}UpdateEnd_`]),n.addEventListener("error",t[`on${i}Error_`]),t.codecs[s]=e,t[`${s}Buffer`]=n},removeSourceBuffer:s=>e=>{const t=e[`${s}Buffer`];if(Sg(s,e),!!It(e.mediaSource,t)){e.logger_(`Removing ${s}Buffer with codec ${e.codecs[s]} from mediaSource`);try{e.mediaSource.removeSourceBuffer(t)}catch(i){L.log.warn(`Failed to removeSourceBuffer ${s}Buffer`,i)}}},changeType:s=>(e,t)=>{const i=t[`${e}Buffer`],r=Mr(s);if(!It(t.mediaSource,i))return;const n=s.substring(0,s.indexOf(".")),a=t.codecs[e];if(a.substring(0,a.indexOf("."))!==n){t.logger_(`changing ${e}Buffer codec from ${t.codecs[e]} to ${s}`);try{i.changeType(r),t.codecs[e]=s}catch(l){L.log.warn(`Failed to changeType on ${e}Buffer`,l)}}}},lt=({type:s,sourceUpdater:e,action:t,doneFn:i,name:r})=>{e.queue.push({type:s,action:t,doneFn:i,name:r}),Ts(s,e)},Oh=(s,e)=>t=>{if(e.queuePending[s]){const i=e.queuePending[s].doneFn;e.queuePending[s]=null,i&&i(e[`${s}Error_`])}Ts(s,e)};class xg extends L.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Ts("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=bt("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=Oh("video",this),this.onAudioUpdateEnd_=Oh("audio",this),this.onVideoError_=t=>{this.videoError_=t},this.onAudioError_=t=>{this.audioError_=t},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}addSourceBuffer(e,t){lt({type:"mediaSource",sourceUpdater:this,action:ut.addSourceBuffer(e,t),name:"addSourceBuffer"})}abort(e){lt({type:e,sourceUpdater:this,action:ut.abort(e),name:"abort"})}removeSourceBuffer(e){if(!this.canRemoveSourceBuffer()){L.log.error("removeSourceBuffer is not supported!");return}lt({type:"mediaSource",sourceUpdater:this,action:ut.removeSourceBuffer(e),name:"removeSourceBuffer"})}canRemoveSourceBuffer(){return!L.browser.IS_FIREFOX&&C.MediaSource&&C.MediaSource.prototype&&typeof C.MediaSource.prototype.removeSourceBuffer=="function"}static canChangeType(){return C.SourceBuffer&&C.SourceBuffer.prototype&&typeof C.SourceBuffer.prototype.changeType=="function"}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){if(!this.canChangeType()){L.log.error("changeType is not supported!");return}lt({type:e,sourceUpdater:this,action:ut.changeType(t),name:"changeType"})}addOrChangeSourceBuffers(e){if(!e||typeof e!="object"||Object.keys(e).length===0)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach(t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)})}appendBuffer(e,t){const{segmentInfo:i,type:r,bytes:n}=e;if(this.processedAppend_=!0,r==="audio"&&this.videoBuffer&&!this.videoAppendQueued_){this.delayedAudioAppendQueue_.push([e,t]),this.logger_(`delayed audio append of ${n.length} until video append`);return}const a=t;if(lt({type:r,sourceUpdater:this,action:ut.appendBuffer(n,i||{mediaIndex:-1},a),doneFn:t,name:"appendBuffer"}),r==="video"){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const o=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${o.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,o.forEach(l=>{this.appendBuffer.apply(this,l)})}}audioBuffered(){return It(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:qe()}videoBuffered(){return It(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:qe()}buffered(){const e=It(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=It(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():ow(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Qt){lt({type:"mediaSource",sourceUpdater:this,action:ut.duration(e),name:"duration",doneFn:t})}endOfStream(e=null,t=Qt){typeof e!="string"&&(e=void 0),lt({type:"mediaSource",sourceUpdater:this,action:ut.endOfStream(e),name:"endOfStream",doneFn:t})}removeAudio(e,t,i=Qt){if(!this.audioBuffered().length||this.audioBuffered().end(0)===0){i();return}lt({type:"audio",sourceUpdater:this,action:ut.remove(e,t),doneFn:i,name:"remove"})}removeVideo(e,t,i=Qt){if(!this.videoBuffered().length||this.videoBuffered().end(0)===0){i();return}lt({type:"video",sourceUpdater:this,action:ut.remove(e,t),doneFn:i,name:"remove"})}updating(){return!!($u("audio",this)||$u("video",this))}audioTimestampOffset(e){return typeof e<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(lt({type:"audio",sourceUpdater:this,action:ut.timestampOffset(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return typeof e<"u"&&this.videoBuffer&&this.videoTimestampOffset!==e&&(lt({type:"video",sourceUpdater:this,action:ut.timestampOffset(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&<({type:"audio",sourceUpdater:this,action:ut.callback(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&<({type:"video",sourceUpdater:this,action:ut.callback(e),name:"callback"})}dispose(){this.trigger("dispose"),qA.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>Sg(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const Rh=s=>decodeURIComponent(escape(String.fromCharCode.apply(null,s))),HA=s=>{const e=new Uint8Array(s);return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")},Mh=new Uint8Array(` + +`.split("").map(s=>s.charCodeAt(0)));class zA extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class GA extends Fu{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.loaderType_="subtitle",this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}createTransmuxer_(){return null}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return qe();const e=this.subtitlesTrack_.cues,t=e[0].startTime,i=e[e.length-1].startTime;return qe([[t,i]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ta(e);let r=this.initSegments_[i];if(t&&!r&&e.bytes){const n=Mh.byteLength+e.bytes.byteLength,a=new Uint8Array(n);a.set(e.bytes),a.set(Mh,e.bytes.byteLength),this.initSegments_[i]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:a}}return r||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(e){return typeof e>"u"?this.subtitlesTrack_:(this.subtitlesTrack_=e,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)}remove(e,t){br(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(this.syncController_.timestampOffsetForTimeline(e.timeline)===null){const t=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};this.syncController_.one("timestampoffset",t),this.state="WAITING_ON_TIMELINE";return}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_){this.state="READY";return}if(this.saveTransferStats_(t.stats),!this.pendingSegment_){this.state="READY",this.mediaRequestsAborted+=1;return}if(e){e.code===Rt.TIMEOUT&&this.handleTimeout_(),e.code===Rt.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(e);return}const r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");const n=r.segment;if(n.map&&(n.map.bytes=t.map.bytes),r.bytes=t.bytes,typeof C.WebVTT!="function"&&typeof this.loadVttJs=="function"){this.state="WAITING_ON_VTTJS",this.loadVttJs().then(()=>this.segmentRequestFinished_(e,t,i),()=>this.stopForError({message:"Error loading vtt.js",metadata:{errorType:L.Error.VttLoadError}}));return}n.requested=!0;try{this.parseVTTCues_(r)}catch(a){this.stopForError({message:a.message,metadata:{errorType:L.Error.VttCueParsingError}});return}if(this.updateTimeMapping_(r,this.syncController_.timelines[r.timeline],this.playlist_),r.cues.length?r.timingInfo={start:r.cues[0].startTime,end:r.cues[r.cues.length-1].endTime}:r.timingInfo={start:r.startOfSegment,end:r.startOfSegment+r.duration},r.isSyncRequest){this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY";return}r.byteLength=r.bytes.byteLength,this.mediaSecondsLoaded+=n.duration,r.cues.forEach(a=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new C.VTTCue(a.startTime,a.endTime,a.text):a)}),PA(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(){}updateTimingInfoEnd_(){}parseVTTCues_(e){let t,i=!1;if(typeof C.WebVTT!="function")throw new zA;typeof C.TextDecoder=="function"?t=new C.TextDecoder("utf8"):(t=C.WebVTT.StringDecoder(),i=!0);const r=new C.WebVTT.Parser(C,C.vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},r.oncue=e.cues.push.bind(e.cues),r.ontimestampmap=a=>{e.timestampmap=a},r.onparsingerror=a=>{L.log.warn("Error encountered when parsing cues: "+a.message)},e.segment.map){let a=e.segment.map.bytes;i&&(a=Rh(a)),r.parse(a)}let n=e.bytes;i&&(n=Rh(n)),r.parse(n),r.flush()}updateTimeMapping_(e,t,i){const r=e.segment;if(!t)return;if(!e.cues.length){r.empty=!0;return}const{MPEGTS:n,LOCAL:a}=e.timestampmap,l=n/Mi.ONE_SECOND_IN_TS-a+t.mapping;if(e.cues.forEach(d=>{const p=d.endTime-d.startTime,y=n===0?d.startTime+l:this.handleRollover_(d.startTime+l,t.time);d.startTime=Math.max(y,0),d.endTime=Math.max(y+p,0)}),!i.syncInfo){const d=e.cues[0].startTime,p=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(d,p-r.duration)}}}handleRollover_(e,t){if(t===null)return e;let i=e*Mi.ONE_SECOND_IN_TS;const r=t*Mi.ONE_SECOND_IN_TS;let n;for(r4294967296;)i+=n;return i/Mi.ONE_SECOND_IN_TS}}const WA=function(s,e){const t=s.cues;for(let i=0;i=r.adStartTime&&e<=r.adEndTime)return r}return null},KA=function(s,e,t=0){if(!s.segments)return;let i=t,r;for(let n=0;nt!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(s,e,t,i,r,n)=>{if(!n)return null;const a=s.getMediaSequenceMap(n);if(!a||a.size===0||e.mediaSequence===void 0||!Array.isArray(e.segments)||!e.segments.length)return null;let o=e.mediaSequence,l=0;for(const d of e.segments){const p=a.get(o);if(!p)break;if(r>=p.start&&r=v&&r{if(!Object.keys(s.timelineToDatetimeMappings).length)return null;let n=null,a=null;const o=Iu(e);r=r||0;for(let l=0;l{let n=null,a=null;r=r||0;const o=Iu(e);for(let l=0;l=b)&&(a=b,n={time:_,segmentIndex:p.segmentIndex,partIndex:p.partIndex})}}return n}},{name:"Discontinuity",run:(s,e,t,i,r)=>{let n=null;if(r=r||0,e.discontinuityStarts&&e.discontinuityStarts.length){let a=null;for(let o=0;o=y)&&(a=y,n={time:p.time,segmentIndex:l,partIndex:null})}}}return n}},{name:"Playlist",run:(s,e,t,i,r)=>e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence,partIndex:null}:null}];class YA extends L.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={},this.mediaSequenceStorage_=new Map,this.logger_=bt("SyncController")}getMediaSequenceMap(e){return this.mediaSequenceStorage_.get(e)}updateMediaSequenceMap(e,t,i){if(e.mediaSequence===void 0||!Array.isArray(e.segments)||!e.segments.length)return;const r=this.getMediaSequenceMap(i),n=new Map;let a=e.mediaSequence,o;r?r.has(e.mediaSequence)?o=r.get(e.mediaSequence).start:(this.logger_(`MediaSequence sync for ${i} segment loader - received a gap between playlists. +Fallback base time to: ${t}. +Received media sequence: ${a}. +Current map: `,r),o=t):o=0,this.logger_(`MediaSequence sync for ${i} segment loader. +Received media sequence: ${a}. +base time is ${o} +Current map: `,r),e.segments.forEach(l=>{const d=o,p=d+l.duration,y={start:d,end:p};n.set(a,y),a++,o=p}),this.mediaSequenceStorage_.set(i,n)}getSyncPoint(e,t,i,r,n){if(t!==1/0)return ru.find(({name:l})=>l==="VOD").run(this,e,t);const a=this.runStrategies_(e,t,i,r,n);if(!a.length)return null;for(const o of a){const{syncPoint:l,strategy:d}=o,{segmentIndex:p,time:y}=l;if(p<0)continue;const _=e.segments[p],b=y,v=b+_.duration;if(this.logger_(`Strategy: ${d}. Current time: ${r}. selected segment: ${p}. Time: [${b} -> ${v}]}`),r>=b&&r0&&(r.time*=-1),Math.abs(r.time+kr({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:r.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,r,n){const a=[];for(let o=0;oXA){L.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);return}for(let r=i-1;r>=0;r--){const n=e.segments[r];if(n&&typeof n.start<"u"){t.syncInfo={mediaSequence:e.mediaSequence+r,time:n.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),r=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:r.start}));const n=r.dateTimeObject;r.discontinuity&&t&&n&&(this.timelineToDatetimeMappings[r.timeline]=-(n.getTime()/1e3))}timestampOffsetForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].time}mappingForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const r=e.segment,n=e.part;let a=this.timelines[e.timeline],o,l;if(typeof e.timestampOffset=="number")a={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=a,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${a.time}] [mapping: ${a.mapping}]`)),o=e.startOfSegment,l=t.end+a.mapping;else if(a)o=t.start+a.mapping,l=t.end+a.mapping;else return!1;return n&&(n.start=o,n.end=l),(!r.start||ol){let d;o<0?d=i.start-kr({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:n}):d=i.end+kr({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:n}),this.discontinuities[a]={time:d,accuracy:l}}}}dispose(){this.trigger("dispose"),this.off()}}class QA extends L.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:t,to:i}){return typeof t=="number"&&typeof i=="number"&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){return typeof t=="number"&&typeof i=="number"&&(this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e],this.trigger("timelinechange")),this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const JA=lg(cg(function(){var s=function(){function x(){this.listeners={}}var D=x.prototype;return D.on=function(k,M){this.listeners[k]||(this.listeners[k]=[]),this.listeners[k].push(M)},D.off=function(k,M){if(!this.listeners[k])return!1;var O=this.listeners[k].indexOf(M);return this.listeners[k]=this.listeners[k].slice(0),this.listeners[k].splice(O,1),O>-1},D.trigger=function(k){var M=this.listeners[k];if(M)if(arguments.length===2)for(var O=M.length,I=0;I>7)*283)^O]=O;for(I=U=0;!k[I];I^=W||1,U=J[U]||1)for(he=U^U<<1^U<<2^U<<3^U<<4,he=he>>8^he&255^99,k[I]=he,M[he]=I,te=V[ue=V[W=V[I]]],ie=te*16843009^ue*65537^W*257^I*16843008,H=V[he]*257^he*16843008,O=0;O<4;O++)D[O][I]=H=H<<24^H>>>8,A[O][he]=ie=ie<<24^ie>>>8;for(O=0;O<5;O++)D[O]=D[O].slice(0),A[O]=A[O].slice(0);return x};let i=null;class r{constructor(D){i||(i=t()),this._tables=[[i[0][0].slice(),i[0][1].slice(),i[0][2].slice(),i[0][3].slice(),i[0][4].slice()],[i[1][0].slice(),i[1][1].slice(),i[1][2].slice(),i[1][3].slice(),i[1][4].slice()]];let A,k,M;const O=this._tables[0][4],I=this._tables[1],U=D.length;let V=1;if(U!==4&&U!==6&&U!==8)throw new Error("Invalid aes key size");const J=D.slice(0),W=[];for(this._key=[J,W],A=U;A<4*U+28;A++)M=J[A-1],(A%U===0||U===8&&A%U===4)&&(M=O[M>>>24]<<24^O[M>>16&255]<<16^O[M>>8&255]<<8^O[M&255],A%U===0&&(M=M<<8^M>>>24^V<<24,V=V<<1^(V>>7)*283)),J[A]=J[A-U]^M;for(k=0;A;k++,A--)M=J[k&3?A:A-4],A<=4||k<4?W[k]=M:W[k]=I[0][O[M>>>24]]^I[1][O[M>>16&255]]^I[2][O[M>>8&255]]^I[3][O[M&255]]}decrypt(D,A,k,M,O,I){const U=this._key[1];let V=D^U[0],J=M^U[1],W=k^U[2],ue=A^U[3],te,he,H;const ie=U.length/4-2;let at,se=4;const Ee=this._tables[1],qt=Ee[0],Ti=Ee[1],bi=Ee[2],Si=Ee[3],xi=Ee[4];for(at=0;at>>24]^Ti[J>>16&255]^bi[W>>8&255]^Si[ue&255]^U[se],he=qt[J>>>24]^Ti[W>>16&255]^bi[ue>>8&255]^Si[V&255]^U[se+1],H=qt[W>>>24]^Ti[ue>>16&255]^bi[V>>8&255]^Si[J&255]^U[se+2],ue=qt[ue>>>24]^Ti[V>>16&255]^bi[J>>8&255]^Si[W&255]^U[se+3],se+=4,V=te,J=he,W=H;for(at=0;at<4;at++)O[(3&-at)+I]=xi[V>>>24]<<24^xi[J>>16&255]<<16^xi[W>>8&255]<<8^xi[ue&255]^U[se++],te=V,V=J,J=W,W=ue,ue=te}}class n extends s{constructor(){super(s),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(D){this.jobs.push(D),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const a=function(x){return x<<24|(x&65280)<<8|(x&16711680)>>8|x>>>24},o=function(x,D,A){const k=new Int32Array(x.buffer,x.byteOffset,x.byteLength>>2),M=new r(Array.prototype.slice.call(D)),O=new Uint8Array(x.byteLength),I=new Int32Array(O.buffer);let U,V,J,W,ue,te,he,H,ie;for(U=A[0],V=A[1],J=A[2],W=A[3],ie=0;ie{const k=x[A];_(k)?D[A]={bytes:k.buffer,byteOffset:k.byteOffset,byteLength:k.byteLength}:D[A]=k}),D};self.onmessage=function(x){const D=x.data,A=new Uint8Array(D.encrypted.bytes,D.encrypted.byteOffset,D.encrypted.byteLength),k=new Uint32Array(D.key.bytes,D.key.byteOffset,D.key.byteLength/4),M=new Uint32Array(D.iv.bytes,D.iv.byteOffset,D.iv.byteLength/4);new l(A,k,M,function(O,I){self.postMessage(v({source:D.source,decrypted:I}),[I.buffer])})}}));var ZA=ug(JA);const eD=s=>{let e=s.default?"main":"alternative";return s.characteristics&&s.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e},Eg=(s,e)=>{s.abort(),s.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},ju=(s,e)=>{e.activePlaylistLoader=s,s.load()},tD=(s,e)=>()=>{const{segmentLoaders:{[s]:t,main:i},mediaTypes:{[s]:r}}=e,n=r.activeTrack(),a=r.getActiveGroup(),o=r.activePlaylistLoader,l=r.lastGroup_;if(!(a&&l&&a.id===l.id)&&(r.lastGroup_=a,r.lastTrack_=n,Eg(t,r),!(!a||a.isMainPlaylist))){if(!a.playlistLoader){o&&i.resetEverything();return}t.resyncLoader(),ju(a.playlistLoader,r)}},iD=(s,e)=>()=>{const{segmentLoaders:{[s]:t},mediaTypes:{[s]:i}}=e;i.lastGroup_=null,t.abort(),t.pause()},sD=(s,e)=>()=>{const{mainPlaylistLoader:t,segmentLoaders:{[s]:i,main:r},mediaTypes:{[s]:n}}=e,a=n.activeTrack(),o=n.getActiveGroup(),l=n.activePlaylistLoader,d=n.lastTrack_;if(!(d&&a&&d.id===a.id)&&(n.lastGroup_=o,n.lastTrack_=a,Eg(i,n),!!o)){if(o.isMainPlaylist){if(!a||!d||a.id===d.id)return;const p=e.vhs.playlistController_,y=p.selectPlaylist();if(p.media()===y)return;n.logger_(`track change. Switching main audio from ${d.id} to ${a.id}`),t.pause(),r.resetEverything(),p.fastQualityChange_(y);return}if(s==="AUDIO"){if(!o.playlistLoader){r.setAudio(!0),r.resetEverything();return}i.setAudio(!0),r.setAudio(!1)}if(l===o.playlistLoader){ju(o.playlistLoader,n);return}i.track&&i.track(a),i.resetEverything(),ju(o.playlistLoader,n)}},xa={AUDIO:(s,e)=>()=>{const{mediaTypes:{[s]:t},excludePlaylist:i}=e,r=t.activeTrack(),n=t.activeGroup(),a=(n.filter(l=>l.default)[0]||n[0]).id,o=t.tracks[a];if(r===o){i({error:{message:"Problem encountered loading the default audio track."}});return}L.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const l in t.tracks)t.tracks[l].enabled=t.tracks[l]===o;t.onTrackChanged()},SUBTITLES:(s,e)=>()=>{const{mediaTypes:{[s]:t}}=e;L.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const i=t.activeTrack();i&&(i.mode="disabled"),t.onTrackChanged()}},Nh={AUDIO:(s,e,t)=>{if(!e)return;const{tech:i,requestOptions:r,segmentLoaders:{[s]:n}}=t;e.on("loadedmetadata",()=>{const a=e.media();n.playlist(a,r),(!i.paused()||a.endList&&i.preload()!=="none")&&n.load()}),e.on("loadedplaylist",()=>{n.playlist(e.media(),r),i.paused()||n.load()}),e.on("error",xa[s](s,t))},SUBTITLES:(s,e,t)=>{const{tech:i,requestOptions:r,segmentLoaders:{[s]:n},mediaTypes:{[s]:a}}=t;e.on("loadedmetadata",()=>{const o=e.media();n.playlist(o,r),n.track(a.activeTrack()),(!i.paused()||o.endList&&i.preload()!=="none")&&n.load()}),e.on("loadedplaylist",()=>{n.playlist(e.media(),r),i.paused()||n.load()}),e.on("error",xa[s](s,t))}},rD={AUDIO:(s,e)=>{const{vhs:t,sourceType:i,segmentLoaders:{[s]:r},requestOptions:n,main:{mediaGroups:a},mediaTypes:{[s]:{groups:o,tracks:l,logger_:d}},mainPlaylistLoader:p}=e,y=on(p.main);(!a[s]||Object.keys(a[s]).length===0)&&(a[s]={main:{default:{default:!0}}},y&&(a[s].main.default.playlists=p.main.playlists));for(const _ in a[s]){o[_]||(o[_]=[]);for(const b in a[s][_]){let v=a[s][_][b],x;if(y?(d(`AUDIO group '${_}' label '${b}' is a main playlist`),v.isMainPlaylist=!0,x=null):i==="vhs-json"&&v.playlists?x=new ds(v.playlists[0],t,n):v.resolvedUri?x=new ds(v.resolvedUri,t,n):v.playlists&&i==="dash"?x=new Bu(v.playlists[0],t,n,p):x=null,v=re({id:b,playlistLoader:x},v),Nh[s](s,v.playlistLoader,e),o[_].push(v),typeof l[b]>"u"){const D=new L.AudioTrack({id:b,kind:eD(v),enabled:!1,language:v.language,default:v.default,label:b});l[b]=D}}}r.on("error",xa[s](s,e))},SUBTITLES:(s,e)=>{const{tech:t,vhs:i,sourceType:r,segmentLoaders:{[s]:n},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[s]:{groups:l,tracks:d}},mainPlaylistLoader:p}=e;for(const y in o[s]){l[y]||(l[y]=[]);for(const _ in o[s][y]){if(!i.options_.useForcedSubtitles&&o[s][y][_].forced)continue;let b=o[s][y][_],v;if(r==="hls")v=new ds(b.resolvedUri,i,a);else if(r==="dash"){if(!b.playlists.filter(D=>D.excludeUntil!==1/0).length)return;v=new Bu(b.playlists[0],i,a,p)}else r==="vhs-json"&&(v=new ds(b.playlists?b.playlists[0]:b.resolvedUri,i,a));if(b=re({id:_,playlistLoader:v},b),Nh[s](s,b.playlistLoader,e),l[y].push(b),typeof d[_]>"u"){const x=t.addRemoteTextTrack({id:_,kind:"subtitles",default:b.default&&b.autoselect,language:b.language,label:_},!1).track;d[_]=x}}}n.on("error",xa[s](s,e))},"CLOSED-CAPTIONS":(s,e)=>{const{tech:t,main:{mediaGroups:i},mediaTypes:{[s]:{groups:r,tracks:n}}}=e;for(const a in i[s]){r[a]||(r[a]=[]);for(const o in i[s][a]){const l=i[s][a][o];if(!/^(?:CC|SERVICE)/.test(l.instreamId))continue;const d=t.options_.vhs&&t.options_.vhs.captionServices||{};let p={label:o,language:l.language,instreamId:l.instreamId,default:l.default&&l.autoselect};if(d[p.instreamId]&&(p=re(p,d[p.instreamId])),p.default===void 0&&delete p.default,r[a].push(re({id:o},l)),typeof n[o]>"u"){const y=t.addRemoteTextTrack({id:p.instreamId,kind:"captions",default:p.default,language:p.language,label:p.label},!1).track;n[o]=y}}}}},Cg=(s,e)=>{for(let t=0;tt=>{const{mainPlaylistLoader:i,mediaTypes:{[s]:{groups:r}}}=e,n=i.media();if(!n)return null;let a=null;n.attributes[s]&&(a=r[n.attributes[s]]);const o=Object.keys(r);if(!a)if(s==="AUDIO"&&o.length>1&&on(e.main))for(let l=0;l"u"?a:t===null||!a?null:a.filter(l=>l.id===t.id)[0]||null},aD={AUDIO:(s,e)=>()=>{const{mediaTypes:{[s]:{tracks:t}}}=e;for(const i in t)if(t[i].enabled)return t[i];return null},SUBTITLES:(s,e)=>()=>{const{mediaTypes:{[s]:{tracks:t}}}=e;for(const i in t)if(t[i].mode==="showing"||t[i].mode==="hidden")return t[i];return null}},oD=(s,{mediaTypes:e})=>()=>{const t=e[s].activeTrack();return t?e[s].activeGroup(t):null},uD=s=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(d=>{rD[d](d,s)});const{mediaTypes:e,mainPlaylistLoader:t,tech:i,vhs:r,segmentLoaders:{["AUDIO"]:n,main:a}}=s;["AUDIO","SUBTITLES"].forEach(d=>{e[d].activeGroup=nD(d,s),e[d].activeTrack=aD[d](d,s),e[d].onGroupChanged=tD(d,s),e[d].onGroupChanging=iD(d,s),e[d].onTrackChanged=sD(d,s),e[d].getActiveGroup=oD(d,s)});const o=e.AUDIO.activeGroup();if(o){const d=(o.filter(y=>y.default)[0]||o[0]).id;e.AUDIO.tracks[d].enabled=!0,e.AUDIO.onGroupChanged(),e.AUDIO.onTrackChanged(),e.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),n.setAudio(!0)):a.setAudio(!0)}t.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(d=>e[d].onGroupChanged())}),t.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(d=>e[d].onGroupChanging())});const l=()=>{e.AUDIO.onTrackChanged(),i.trigger({type:"usage",name:"vhs-audio-change"})};i.audioTracks().addEventListener("change",l),i.remoteTextTracks().addEventListener("change",e.SUBTITLES.onTrackChanged),r.on("dispose",()=>{i.audioTracks().removeEventListener("change",l),i.remoteTextTracks().removeEventListener("change",e.SUBTITLES.onTrackChanged)}),i.clearTracks("audio");for(const d in e.AUDIO.tracks)i.audioTracks().addTrack(e.AUDIO.tracks[d])},lD=()=>{const s={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{s[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Qt,activeTrack:Qt,getActiveGroup:Qt,onGroupChanged:Qt,onTrackChanged:Qt,lastTrack_:null,logger_:bt(`MediaGroups[${e}]`)}}),s};class Bh{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){e===1&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=it(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(t=>[t.ID,t])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class cD extends L.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Bh,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=bt("Content Steering"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?"HLS":"DASH";const i=t.serverUri||t.serverURL;if(!i){this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),this.trigger("error");return}if(i.startsWith("data:")){this.decodeDataUriManifest_(i.substring(i.indexOf(",")+1));return}this.steeringManifest.reloadUri=it(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering")}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i){this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),this.dispose();return}this.request_=this.xhr_({uri:i,requestType:"content-steering-manifest"},(r,n)=>{if(r){if(n.status===410){this.logger_(`manifest request 410 ${r}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),this.excludedSteeringManifestURLs.add(i);return}if(n.status===429){const o=n.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${r}.`),this.logger_(`content steering will retry in ${o} seconds.`),this.startTTLTimeout_(parseInt(o,10));return}this.logger_(`manifest failed to load ${r}.`),this.startTTLTimeout_();return}const a=JSON.parse(this.request_.responseText);this.assignSteeringProperties_(a),this.startTTLTimeout_()})}setProxyServerUrl_(e){const t=new C.URL(e),i=new C.URL(this.proxyServerUrl_);return i.searchParams.set("url",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(C.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new C.URL(e),i=this.getPathway(),r=this.getBandwidth_();if(i){const n=`_${this.manifestType_}_pathway`;t.searchParams.set(n,i)}if(r){const n=`_${this.manifestType_}_throughput`;t.searchParams.set(n,r)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version){this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),this.trigger("error");return}this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=e["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose());const i=(r=>{for(const n of r)if(this.availablePathways_.has(n))return n;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==i&&(this.currentPathway=i,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=r=>this.excludedSteeringManifestURLs.has(r);if(this.proxyServerUrl_){const r=this.setProxyServerUrl_(e);if(!t(r))return r}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=e*1e3;this.ttlTimeout_=C.setTimeout(()=>{this.requestSteeringManifest()},t)}clearTTLTimeout_(){C.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Bh}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(it(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const dD=10;let zt;const hD=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],fD=function(s){return this.audioSegmentLoader_[s]+this.mainSegmentLoader_[s]},pD=function({currentPlaylist:s,buffered:e,currentTime:t,nextPlaylist:i,bufferLowWaterLine:r,bufferHighWaterLine:n,duration:a,bufferBasedABR:o,log:l}){if(!i)return L.log.warn("We received no playlist to switch to. Please check your stream."),!1;const d=`allowing switch ${s&&s.id||"null"} -> ${i.id}`;if(!s)return l(`${d} as current playlist is not set`),!0;if(i.id===s.id)return!1;const p=!!cs(e,t).length;if(!s.endList)return!p&&typeof s.partTargetDuration=="number"?(l(`not ${d} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(l(`${d} as current playlist is live`),!0);const y=Hl(e,t),_=o?Ne.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Ne.MAX_BUFFER_LOW_WATER_LINE;if(a<_)return l(`${d} as duration < max low water line (${a} < ${_})`),!0;const b=i.attributes.BANDWIDTH,v=s.attributes.BANDWIDTH;if(bv)&&y>=r){let x=`${d} as forwardBuffer >= bufferLowWaterLine (${y} >= ${r})`;return o&&(x+=` and next bandwidth > current bandwidth (${b} > ${v})`),l(x),!0}return l(`not ${d} as no switching criteria met`),!1};class mD extends L.EventTarget{constructor(e){super();const{src:t,withCredentials:i,tech:r,bandwidth:n,externVhs:a,useCueTags:o,playlistExclusionDuration:l,enableLowInitialPlaylist:d,sourceType:p,cacheEncryptionKeys:y,bufferBasedABR:_,leastPixelDiffSelector:b,captionServices:v}=e;if(!t)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:x}=e;(x===null||typeof x>"u")&&(x=1/0),zt=a,this.bufferBasedABR=!!_,this.leastPixelDiffSelector=!!b,this.withCredentials=i,this.tech_=r,this.vhs_=r.vhs,this.sourceType_=p,this.useCueTags_=o,this.playlistExclusionDuration=l,this.maxPlaylistRetries=x,this.enableLowInitialPlaylist=d,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:i,maxPlaylistRetries:x,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=lD(),this.mediaSource=new C.MediaSource,this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.seekable_=qe(),this.hasPlayed_=!1,this.syncController_=new YA(e),this.segmentMetadataTrack_=r.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.decrypter_=new ZA,this.sourceUpdater_=new xg(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new QA,this.keyStatusMap_=new Map;const D={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:v,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:n,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:y,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=this.sourceType_==="dash"?new Bu(t,this.vhs_,re(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new ds(t,this.vhs_,re(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Fu(re(D,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new Fu(re(D,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new GA(re(D,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((M,O)=>{function I(){r.off("vttjserror",U),M()}function U(){r.off("vttjsloaded",I),O()}r.one("vttjsloaded",I),r.one("vttjserror",U),r.addWebVttScript_()})}),e);const A=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new cD(this.vhs_.xhr,A),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),hD.forEach(M=>{this[M+"_"]=fD.bind(this,M)}),this.logger_=bt("pc"),this.triggeredFmp4Usage=!1,this.tech_.preload()==="none"?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const k=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one(k,()=>{const M=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-M,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return e===-1||t===-1?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const r=this.media(),n=r&&(r.id||r.uri),a=e&&(e.id||e.uri);n&&n!==a&&(this.logger_(`switch media ${n} -> ${a} from ${t}`),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${t}`})),this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,r=this.contentSteeringController_.getPathway();if(i&&r){const a=(i.length?i[0].playlists:i.playlists).filter(o=>o.attributes.serviceLocation===r);a.length&&this.mediaTypes_[e].activePlaylistLoader.media(a[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=C.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(C.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,r=Object.keys(i);let n;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{const o=i.main||r.length&&i[r[0]];for(const l in o)if(o[l].default){n={label:l};break}}if(!n)return t;const a=[];for(const o in i)if(i[o][n.label]){const l=i[o][n.label];if(l.playlists&&l.playlists.length)a.push.apply(a,l.playlists);else if(l.uri)a.push(l);else if(e.playlists.length)for(let d=0;d{const e=this.mainPlaylistLoader_.media(),t=e.targetDuration*1.5*1e3;Lu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&this.tech_.preload()!=="none"&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),uD({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_();let t;if(this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t)||(this.initialMedia_=t,this.switchMedia_(this.initialMedia_,"initial"),!(this.sourceType_==="vhs-json"&&this.initialMedia_.segments)))return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)}),this.mainPlaylistLoader_.on("error",()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const e=this.mainPlaylistLoader_.media(),t=e.targetDuration*1.5*1e3;Lu(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,this.sourceType_==="dash"&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const e=this.mainPlaylistLoader_.media();if(e.lastExcludeReason_==="playlist-unchanged")return;this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let r=!0;const n=Object.keys(i.AUDIO);for(const a in i.AUDIO)for(const o in i.AUDIO[a])i.AUDIO[a][o].uri||(r=!1);r&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),zt.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),r=this.bufferLowWaterLine(),n=this.bufferHighWaterLine(),a=this.tech_.buffered();return pD({buffered:a,currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:r,bufferHighWaterLine:n,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{const t=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:t.playlist,error:t})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",t=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:dD}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const t=this.getCodecsOrExclude_();t&&this.sourceUpdater_.addOrChangeSourceBuffers(t)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}fastQualityChange_(e=this.selectPlaylist()){if(e&&e===this.mainPlaylistLoader_.media()){this.logger_("skipping fastQualityChange because new media is same as old");return}this.switchMedia_(e,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(()=>{this.tech_.setCurrentTime(this.tech_.currentTime())})}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime(){})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();!t||t.hasVideo?e=e&&this.audioSegmentLoader_.ended_:e=this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const i=this.syncController_.getExpiredTime(e,this.duration());if(i===null)return!1;const r=zt.Playlist.playlistEnd(e,i),n=this.tech_.currentTime(),a=this.tech_.buffered();if(!a.length)return r-n<=Ot;const o=a.end(a.length-1);return o-n<=Ot&&r-o<=Ot}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e){this.error=t,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}e.playlistErrors_++;const r=this.mainPlaylistLoader_.main.playlists,n=r.filter(so),a=n.length===1&&n[0]===e;if(r.length===1&&i!==1/0)return L.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(a);if(a){if(this.main().contentSteering){const v=this.pathwayAttribute_(e),x=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(v),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(v)},x);return}let b=!1;r.forEach(v=>{if(v===e)return;const x=v.excludeUntil;typeof x<"u"&&x!==1/0&&(b=!0,delete v.excludeUntil)}),b&&(L.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let o;e.playlistErrors_>this.maxPlaylistRetries?o=1/0:o=Date.now()+i*1e3,e.excludeUntil=o,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const l=this.selectPlaylist();if(!l){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}const d=t.internal?this.logger_:L.log.warn,p=t.message?" "+t.message:"";d(`${t.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${p} Switching to playlist ${l.id}.`),l.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),l.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const y=l.targetDuration/2*1e3||5*1e3,_=typeof l.lastRequest=="number"&&Date.now()-l.lastRequest<=y;return this.switchMedia_(l,"exclude",a||_)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],r=e==="all";(r||e==="main")&&i.push(this.mainPlaylistLoader_);const n=[];(r||e==="audio")&&n.push("AUDIO"),(r||e==="subtitle")&&(n.push("CLOSED-CAPTIONS"),n.push("SUBTITLES")),n.forEach(a=>{const o=this.mediaTypes_[a]&&this.mediaTypes_[a].activePlaylistLoader;o&&i.push(o)}),["main","audio","subtitle"].forEach(a=>{const o=this[`${a}SegmentLoader_`];o&&(e===a||e==="all")&&i.push(o)}),i.forEach(a=>t.forEach(o=>{typeof a[o]=="function"&&a[o]()}))}setCurrentTime(e){const t=cs(this.tech_.buffered(),e);if(!(this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media())||!this.mainPlaylistLoader_.media().segments)return 0;if(t&&t.length)return e;this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:zt.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}onSyncInfoUpdate_(){let e;if(!this.mainPlaylistLoader_)return;let t=this.mainPlaylistLoader_.media();if(!t)return;let i=this.syncController_.getExpiredTime(t,this.duration());if(i===null)return;const r=this.mainPlaylistLoader_.main,n=zt.Playlist.seekable(t,i,zt.Playlist.liveEdgeDelay(r,t));if(n.length===0||this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),i=this.syncController_.getExpiredTime(t,this.duration()),i===null||(e=zt.Playlist.seekable(t,i,zt.Playlist.liveEdgeDelay(r,t)),e.length===0)))return;let a,o;this.seekable_&&this.seekable_.length&&(a=this.seekable_.end(0),o=this.seekable_.start(0)),e?e.start(0)>n.end(0)||n.start(0)>e.end(0)?this.seekable_=n:this.seekable_=qe([[e.start(0)>n.start(0)?e.start(0):n.start(0),e.end(0)0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(e=>{const t=this.mediaTypes_[e].groups;for(const i in t)t[i].forEach(r=>{r.playlistLoader&&r.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=e?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=Ir(this.main(),t),r={},n=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(r.video=i.video||e.main.videoCodec||US),e.main.isMuxed&&(r.video+=`,${i.audio||e.main.audioCodec||bd}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||n)&&(r.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||bd,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!r.audio&&!r.video){this.excludePlaylist({playlistToExclude:t,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});return}const a=(d,p)=>d?Kn(p):qo(p),o={};let l;if(["video","audio"].forEach(function(d){if(r.hasOwnProperty(d)&&!a(e[d].isFmp4,r[d])){const p=e[d].isFmp4?"browser":"muxer";o[p]=o[p]||[],o[p].push(r[d]),d==="audio"&&(l=p)}}),n&&l&&t.attributes.AUDIO){const d=t.attributes.AUDIO;this.main().playlists.forEach(p=>{(p.attributes&&p.attributes.AUDIO)===d&&p!==t&&(p.excludeUntil=1/0)}),this.logger_(`excluding audio group ${d} as ${l} does not support codec(s): "${r.audio}"`)}if(Object.keys(o).length){const d=Object.keys(o).reduce((p,y)=>(p&&(p+=", "),p+=`${y} does not support codec(s): "${o[y].join(",")}"`,p),"")+".";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:d},playlistExclusionDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const d=[];if(["video","audio"].forEach(p=>{const y=(Pt(this.sourceUpdater_.codecs[p]||"")[0]||{}).type,_=(Pt(r[p]||"")[0]||{}).type;y&&_&&y.toLowerCase()!==_.toLowerCase()&&d.push(`"${this.sourceUpdater_.codecs[p]}" -> "${r[p]}"`)}),d.length){this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${d.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0});return}}return r}tryToCreateSourceBuffers_(){if(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers()||!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach(i=>{const r=e[i];if(t.indexOf(r.id)!==-1)return;t.push(r.id);const n=Ir(this.main,r),a=[];n.audio&&!qo(n.audio)&&!Kn(n.audio)&&a.push(`audio codec ${n.audio}`),n.video&&!qo(n.video)&&!Kn(n.video)&&a.push(`video codec ${n.video}`),n.text&&n.text==="stpp.ttml.im1t"&&a.push(`text codec ${n.text}`),a.length&&(r.excludeUntil=1/0,this.logger_(`excluding ${r.id} for unsupported: ${a.join(", ")}`))})}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,r=ba(Pt(e)),n=Ch(r),a=r.video&&Pt(r.video)[0]||null,o=r.audio&&Pt(r.audio)[0]||null;Object.keys(i).forEach(l=>{const d=i[l];if(t.indexOf(d.id)!==-1||d.excludeUntil===1/0)return;t.push(d.id);const p=[],y=Ir(this.mainPlaylistLoader_.main,d),_=Ch(y);if(!(!y.audio&&!y.video)){if(_!==n&&p.push(`codec count "${_}" !== "${n}"`),!this.sourceUpdater_.canChangeType()){const b=y.video&&Pt(y.video)[0]||null,v=y.audio&&Pt(y.audio)[0]||null;b&&a&&b.type.toLowerCase()!==a.type.toLowerCase()&&p.push(`video codec "${b.type}" !== "${a.type}"`),v&&o&&v.type.toLowerCase()!==o.type.toLowerCase()&&p.push(`audio codec "${v.type}" !== "${o.type}"`)}p.length&&(d.excludeUntil=1/0,this.logger_(`excluding ${d.id}: ${p.join(" && ")}`))}})}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),KA(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Ne.GOAL_BUFFER_LENGTH,i=Ne.GOAL_BUFFER_LENGTH_RATE,r=Math.max(t,Ne.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,r)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Ne.BUFFER_LOW_WATER_LINE,i=Ne.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(t,Ne.MAX_BUFFER_LOW_WATER_LINE),n=Math.max(t,Ne.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?n:r)}bufferHighWaterLine(){return Ne.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Dh(this.inbandTextTracks_,"com.apple.streaming",this.tech_),kA({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const r=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Dh(this.inbandTextTracks_,e,this.tech_),wA({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:r,videoDuration:i})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));if(this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart){this.contentSteeringController_.requestSteeringManifest(!0);return}this.tech_.one("canplay",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const r=this.contentSteeringController_.getAvailablePathways(),n=[];for(const a of e.playlists){const o=a.attributes.serviceLocation;if(o&&(n.push(o),!r.has(o)))return!0}return!!(!n.length&&r.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const i=this.main().playlists,r=new Set;let n=!1;Object.keys(i).forEach(a=>{const o=i[a],l=this.pathwayAttribute_(o),d=l&&e!==l;o.excludeUntil===1/0&&o.lastExcludeReason_==="content-steering"&&!d&&(delete o.excludeUntil,delete o.lastExcludeReason_,n=!0);const y=!o.excludeUntil&&o.excludeUntil!==1/0;!r.has(o.id)&&d&&y&&(r.add(o.id),o.excludeUntil=1/0,o.lastExcludeReason_="content-steering",this.logger_(`excluding ${o.id} for ${o.lastExcludeReason_}`))}),this.contentSteeringController_.manifestType_==="DASH"&&Object.keys(this.mediaTypes_).forEach(a=>{const o=this.mediaTypes_[a];if(o.activePlaylistLoader){const l=o.activePlaylistLoader.media_;l&&l.attributes.serviceLocation!==e&&(n=!0)}}),n&&this.changeSegmentPathway_()}handlePathwayClones_(){const t=this.main().playlists,i=this.contentSteeringController_.currentPathwayClones,r=this.contentSteeringController_.nextPathwayClones;if(i&&i.size||r&&r.size){for(const[a,o]of i.entries())r.get(a)||(this.mainPlaylistLoader_.updateOrDeleteClone(o),this.contentSteeringController_.excludePathway(a));for(const[a,o]of r.entries()){const l=i.get(a);if(!l){t.filter(p=>p.attributes["PATHWAY-ID"]===o["BASE-ID"]).forEach(p=>{this.mainPlaylistLoader_.addClonePathway(o,p)}),this.contentSteeringController_.addAvailablePathway(a);continue}this.equalPathwayClones_(l,o)||(this.mainPlaylistLoader_.updateOrDeleteClone(o,!0),this.contentSteeringController_.addAvailablePathway(a))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...r])))}}equalPathwayClones_(e,t){if(e["BASE-ID"]!==t["BASE-ID"]||e.ID!==t.ID||e["URI-REPLACEMENT"].HOST!==t["URI-REPLACEMENT"].HOST)return!1;const i=e["URI-REPLACEMENT"].PARAMS,r=t["URI-REPLACEMENT"].PARAMS;for(const n in i)if(i[n]!==r[n])return!1;for(const n in r)if(i[n]!==r[n])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),this.contentSteeringController_.manifestType_==="DASH"&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t="non-usable";this.mainPlaylistLoader_.main.playlists.forEach(i=>{const r=this.mainPlaylistLoader_.getKeyIdSet(i);!r||!r.size||r.forEach(n=>{const a="usable",o=this.keyStatusMap_.has(n)&&this.keyStatusMap_.get(n)===a,l=i.lastExcludeReason_===t&&i.excludeUntil===1/0;o?o&&l&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${n} is ${a}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${n} doesn't exist in the keyStatusMap or is not ${a}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(i=>{const r=i&&i.attributes&&i.attributes.RESOLUTION&&i.attributes.RESOLUTION.height<720,n=i.excludeUntil===1/0&&i.lastExcludeReason_===t;r&&n&&(delete i.excludeUntil,L.log.warn(`enabling non-HD playlist ${i.id} because all playlists were excluded due to ${t} key IDs`))})}addKeyStatus_(e,t){const n=(typeof e=="string"?e:HA(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${n} added to the keyStatusMap`),this.keyStatusMap_.set(n,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}const gD=(s,e,t)=>i=>{const r=s.main.playlists[e],n=Gl(r),a=so(r);return typeof i>"u"?a:(i?delete r.disabled:r.disabled=!0,i!==a&&!n&&(t(),i?s.trigger("renditionenabled"):s.trigger("renditiondisabled")),i)};class yD{constructor(e,t,i){const{playlistController_:r}=e,n=r.fastQualityChange_.bind(r);if(t.attributes){const a=t.attributes.RESOLUTION;this.width=a&&a.width,this.height=a&&a.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]}this.codecs=Ir(r.main(),t),this.playlist=t,this.id=i,this.enabled=gD(e.playlists,t.id,n)}}const _D=function(s){s.representations=()=>{const e=s.playlistController_.main(),t=on(e)?s.playlistController_.getAudioTrackPlaylists_():e.playlists;return t?t.filter(i=>!Gl(i)).map((i,r)=>new yD(s,i,i.id)):[]}},Uh=["seeking","seeked","pause","playing","error"];class vD{constructor(e){this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=bt("PlaybackWatcher"),this.logger_("initialize");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),r=()=>this.techWaiting_(),n=()=>this.resetTimeUpdate_(),a=this.playlistController_,o=["main","subtitle","audio"],l={};o.forEach(p=>{l[p]={reset:()=>this.resetSegmentDownloads_(p),updateend:()=>this.checkSegmentDownloads_(p)},a[`${p}SegmentLoader_`].on("appendsdone",l[p].updateend),a[`${p}SegmentLoader_`].on("playlistupdate",l[p].reset),this.tech_.on(["seeked","seeking"],l[p].reset)});const d=p=>{["main","audio"].forEach(y=>{a[`${y}SegmentLoader_`][p]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),d("off"))},this.clearSeekingAppendCheck_=()=>d("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),d("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",r),this.tech_.on(Uh,n),this.tech_.on("canplay",i),this.tech_.one("play",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",r),this.tech_.off(Uh,n),this.tech_.off("canplay",i),this.tech_.off("play",t),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),o.forEach(p=>{a[`${p}SegmentLoader_`].off("appendsdone",l[p].updateend),a[`${p}SegmentLoader_`].off("playlistupdate",l[p].reset),this.tech_.off(["seeked","seeking"],l[p].reset)}),this.checkCurrentTimeTimeout_&&C.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&C.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=C.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],r=i.buffered_(),n=lw(this[`${e}Buffered_`],r);if(this[`${e}Buffered_`]=r,n){this.resetSegmentDownloads_(e);return}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Ni(r)}),!(this[`${e}StalledDownloads_`]<10)&&(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:`vhs-${e}-download-exclusion`}),e!=="subtitle"&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+Ot>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const t=this.seekable(),i=this.tech_.currentTime(),r=this.afterSeekableWindow_(t,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let n;if(r&&(n=t.end(t.length-1)),this.beforeSeekableWindow_(t,i)){const v=t.start(0);n=v+(v===t.end(0)?0:Ot)}if(typeof n<"u")return this.logger_(`Trying to seek outside of seekable at time ${i} with seekable range ${Fm(t)}. Seeking to ${n}.`),this.tech_.setCurrentTime(n),!0;const a=this.playlistController_.sourceUpdater_,o=this.tech_.buffered(),l=a.audioBuffer?a.audioBuffered():null,d=a.videoBuffer?a.videoBuffered():null,p=this.media(),y=p.partTargetDuration?p.partTargetDuration:(p.targetDuration-Et)*2,_=[l,d];for(let v=0;v<_.length;v++){if(!_[v])continue;if(Hl(_[v],i) ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"});return}}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const o=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${o}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(o),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,r=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const a=$n(r,t);return a.length>0?(this.logger_(`Stopped at ${t} and seeking to ${a.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0):!1}afterSeekableWindow_(e,t,i,r=!1){if(!e.length)return!1;let n=e.end(e.length-1)+Ot;const a=!i.endList,o=typeof i.partTargetDuration=="number";return a&&(o||r)&&(n=e.end(e.length-1)+i.targetDuration*3),t>n}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t2)return{start:n,end:a}}return null}}const TD={errorInterval:30,getSource(s){const t=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return s(t)}},wg=function(s,e){let t=0,i=0;const r=re(TD,e);s.ready(()=>{s.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const n=function(){i&&s.currentTime(i)},a=function(p){p!=null&&(i=s.duration()!==1/0&&s.currentTime()||0,s.one("loadedmetadata",n),s.src(p),s.trigger({type:"usage",name:"vhs-error-reload"}),s.play())},o=function(){if(Date.now()-t{Object.defineProperty(Te,s,{get(){return L.log.warn(`using Vhs.${s} is UNSAFE be sure you know what you are doing`),Ne[s]},set(e){if(L.log.warn(`using Vhs.${s} is UNSAFE be sure you know what you are doing`),typeof e!="number"||e<0){L.log.warn(`value of Vhs.${s} must be greater than or equal to 0`);return}Ne[s]=e}})});const Dg="videojs-vhs",kg=function(s,e){const t=e.media();let i=-1;for(let r=0;r{s.addQualityLevel(t)}),kg(s,e.playlists)};Te.canPlaySource=function(){return L.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const AD=(s,e,t)=>{if(!s)return s;let i={};e&&e.attributes&&e.attributes.CODECS&&(i=ba(Pt(e.attributes.CODECS))),t&&t.attributes&&t.attributes.CODECS&&(i.audio=t.attributes.CODECS);const r=Mr(i.video),n=Mr(i.audio),a={};for(const o in s)a[o]={},n&&(a[o].audioContentType=n),r&&(a[o].videoContentType=r),e.contentProtection&&e.contentProtection[o]&&e.contentProtection[o].pssh&&(a[o].pssh=e.contentProtection[o].pssh),typeof s[o]=="string"&&(a[o].url=s[o]);return re(s,a)},DD=(s,e)=>s.reduce((t,i)=>{if(!i.contentProtection)return t;const r=e.reduce((n,a)=>{const o=i.contentProtection[a];return o&&o.pssh&&(n[a]={pssh:o.pssh}),n},{});return Object.keys(r).length&&t.push(r),t},[]),kD=({player:s,sourceKeySystems:e,audioMedia:t,mainPlaylists:i})=>{if(!s.eme.initializeMediaKeys)return Promise.resolve();const r=t?i.concat([t]):i,n=DD(r,Object.keys(e)),a=[],o=[];return n.forEach(l=>{o.push(new Promise((d,p)=>{s.tech_.one("keysessioncreated",d)})),a.push(new Promise((d,p)=>{s.eme.initializeMediaKeys({keySystems:l},y=>{if(y){p(y);return}d()})}))}),Promise.race([Promise.all(a),Promise.race(o)])},PD=({player:s,sourceKeySystems:e,media:t,audioMedia:i})=>{const r=AD(e,t,i);return r?(s.currentSource().keySystems=r,r&&!s.eme?(L.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},Pg=()=>{if(!C.localStorage)return null;const s=C.localStorage.getItem(Dg);if(!s)return null;try{return JSON.parse(s)}catch{return null}},ID=s=>{if(!C.localStorage)return!1;let e=Pg();e=e?re(e,s):s;try{C.localStorage.setItem(Dg,JSON.stringify(e))}catch{return!1}return e},LD=s=>s.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(s.substring(s.indexOf(",")+1)):s,Ig=(s,e)=>{s._requestCallbackSet||(s._requestCallbackSet=new Set),s._requestCallbackSet.add(e)},Lg=(s,e)=>{s._responseCallbackSet||(s._responseCallbackSet=new Set),s._responseCallbackSet.add(e)},Og=(s,e)=>{s._requestCallbackSet&&(s._requestCallbackSet.delete(e),s._requestCallbackSet.size||delete s._requestCallbackSet)},Rg=(s,e)=>{s._responseCallbackSet&&(s._responseCallbackSet.delete(e),s._responseCallbackSet.size||delete s._responseCallbackSet)};Te.supportsNativeHls=function(){if(!$||!$.createElement)return!1;const s=$.createElement("video");return L.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(t){return/maybe|probably/i.test(s.canPlayType(t))}):!1}();Te.supportsNativeDash=function(){return!$||!$.createElement||!L.getTech("Html5").isSupported()?!1:/maybe|probably/i.test($.createElement("video").canPlayType("application/dash+xml"))}();Te.supportsTypeNatively=s=>s==="hls"?Te.supportsNativeHls:s==="dash"?Te.supportsNativeDash:!1;Te.isSupported=function(){return L.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};Te.xhr.onRequest=function(s){Ig(Te.xhr,s)};Te.xhr.onResponse=function(s){Lg(Te.xhr,s)};Te.xhr.offRequest=function(s){Og(Te.xhr,s)};Te.xhr.offResponse=function(s){Rg(Te.xhr,s)};const OD=L.getComponent("Component");class Mg extends OD{constructor(e,t,i){if(super(t,i.vhs),typeof i.initialBandwidth=="number"&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=bt("VhsHandler"),t.options_&&t.options_.playerId){const r=L.getPlayer(t.options_.playerId);this.player_=r}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on($,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],r=>{const n=$.fullscreenElement||$.webkitFullscreenElement||$.mozFullScreenElement||$.msFullscreenElement;n&&n.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=!1;return}this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,"error",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,"play",this.play)}setOptions_(e={}){if(this.options_=re(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=this.options_.llhls!==!1,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,typeof this.options_.playlistExclusionDuration!="number"&&(this.options_.playlistExclusionDuration=60),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){const t=Pg();t&&t.bandwidth&&(this.options_.bandwidth=t.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),t&&t.throughput&&(this.options_.throughput=t.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=Ne.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Ne.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(t=>{typeof this.source_[t]<"u"&&(this.options_[t]=this.source_[t])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;this.setOptions_(),this.options_.src=LD(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=Te,this.options_.sourceType=Rf(t),this.options_.seekTo=n=>{this.tech_.setCurrentTime(n)},this.playlistController_=new mD(this.options_);const i=re({liveRangeSafeTimeDelta:Ot},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new vD(i),this.playlistController_.on("error",()=>{const n=L.players[this.tech_.options_.playerId];let a=this.playlistController_.error;typeof a=="object"&&!a.code?a.code=3:typeof a=="string"&&(a={message:a,code:3}),n.error(a)});const r=this.options_.bufferBasedABR?Te.movingAverageBandwidthSelector(.55):Te.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):r.bind(this),this.playlistController_.selectInitialPlaylist=Te.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(n){this.playlistController_.selectPlaylist=n.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(n){this.playlistController_.mainSegmentLoader_.throughput.rate=n,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let n=this.playlistController_.mainSegmentLoader_.bandwidth;const a=C.navigator.connection||C.navigator.mozConnection||C.navigator.webkitConnection,o=1e7;if(this.options_.useNetworkInformationApi&&a){const l=a.downlink*1e3*1e3;l>=o&&n>=o?n=Math.max(n,l):n=l}return n},set(n){this.playlistController_.mainSegmentLoader_.bandwidth=n,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const n=1/(this.bandwidth||1);let a;return this.throughput>0?a=1/this.throughput:a=0,Math.floor(1/(n+a))},set(){L.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Ni(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Ni(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&ID({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{_D(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.playlistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=C.URL.createObjectURL(this.playlistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),kD({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(t=>{this.logger_("error while creating EME key session",t),this.player_.error({message:"Failed to initialize media keys for EME",code:3,metadata:{errorType:L.Error.EMEKeySessionCreationError}})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=PD({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});if(this.player_.tech_.on("keystatuschange",i=>{this.playlistController_.updatePlaylistByKeyStatus(i.keyId,i.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),!t){this.playlistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()}setupQualityLevels_(){const e=L.players[this.tech_.options_.playerId];!e||!e.qualityLevels||this.qualityLevels_||(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{wD(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{kg(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":Ag,"mux.js":SD,"mpd-parser":xD,"m3u8-parser":ED,"aes-decrypter":CD}}version(){return this.constructor.version()}canChangeType(){return xg.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&C.URL.revokeObjectURL&&(C.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return $w({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,r=2){return ag({programTime:e,playlist:this.playlistController_.media(),retryCount:r,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{Ig(this.xhr,e)},this.xhr.onResponse=e=>{Lg(this.xhr,e)},this.xhr.offRequest=e=>{Og(this.xhr,e)},this.xhr.offResponse=e=>{Rg(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}}const Ea={name:"videojs-http-streaming",VERSION:Ag,canHandleSource(s,e={}){const t=re(L.options,e);return Ea.canPlayType(s.type,t)},handleSource(s,e,t={}){const i=re(L.options,t);return e.vhs=new Mg(s,e,i),e.vhs.xhr=tg(),e.vhs.setupXhrHooks_(),e.vhs.src(s.src,s.type),e.vhs},canPlayType(s,e){const t=Rf(s);if(!t)return"";const i=Ea.getOverrideNative(e);return!Te.supportsTypeNatively(t)||i?"maybe":""},getOverrideNative(s={}){const{vhs:e={}}=s,t=!(L.browser.IS_ANY_SAFARI||L.browser.IS_IOS),{overrideNative:i=t}=e;return i}},RD=()=>Kn("avc1.4d400d,mp4a.40.2");RD()&&L.getTech("Html5").registerSourceHandler(Ea,0);L.VhsHandler=Mg;L.VhsSourceHandler=Ea;L.Vhs=Te;L.use||L.registerComponent("Vhs",Te);L.options.vhs=L.options.vhs||{};(!L.getPlugin||!L.getPlugin("reloadSourceOnError"))&&L.registerPlugin("reloadSourceOnError",bD);/*! @name videojs-contrib-eme @version 3.11.2 @license Apache-2.0 */function Ca(){return Ca=Object.assign||function(s){for(var e=1;e=400&&r.statusCode<=599){var a=n;t&&(a=String.fromCharCode.apply(null,new Uint8Array(n))),e({cause:a});return}e(null,n)}});var FD=function(e){var t=String.fromCharCode.apply(null,new Uint16Array(e)),i=new C.DOMParser().parseFromString(t,"application/xml"),r=i.getElementsByTagName("HttpHeaders")[0],n={};if(r)for(var a=r.getElementsByTagName("name"),o=r.getElementsByTagName("value"),l=0;l"u"){i.mediaKeysObject=null,i.pendingSessionData=[];var y,_;p=new Promise(function(b,v){if(i.keySystem=a.keySystem,_=$h(a.keySystem,o.keySystems[a.keySystem]),!_.getCertificate){b(a);return}_.getCertificate(o,function(x,D){if(x){v(x);return}y=D,b()})}).then(function(){return a.createMediaKeys()}).then(function(b){return VD({player:t,video:i,certificate:y,createdMediaKeys:b})}).catch(function(b){return b?Promise.reject(b):Promise.reject("Failed to create and initialize a MediaKeys object")})}return p.then(function(){var b=$h(i.keySystem,o.keySystems[i.keySystem]),v=b.getLicense;return qD({player:t,video:i,initDataType:r,initData:n,options:o,getLicense:i.keySystem?GD(v,d):null,removeSession:l,eventBus:d})})},Ql="com.apple.fps.1_0",KD=function(e){var t=e.initData,i=e.id,r=e.cert;typeof i=="string"&&(i=MD(i));var n=0,a=new ArrayBuffer(t.byteLength+4+i.byteLength+4+r.byteLength),o=new DataView(a),l=new Uint8Array(a,n,t.byteLength);l.set(t),n+=t.byteLength,o.setUint32(n,i.byteLength,!0),n+=4;var d=new Uint16Array(a,n,i.length);d.set(i),n+=d.byteLength,o.setUint32(n,r.byteLength,!0),n+=4;var p=new Uint8Array(a,n,r.byteLength);return p.set(r),new Uint8Array(a,0,a.byteLength)},XD=function(e){var t=e.video,i=e.contentId,r=e.initData,n=e.cert,a=e.options,o=e.getLicense,l=e.eventBus;return new Promise(function(d,p){if(!t.webkitKeys)try{t.webkitSetMediaKeys(new C.WebKitMediaKeys(Ql))}catch{p("Could not create MediaKeys");return}var y;try{y=t.webkitKeys.createSession("video/mp4",KD({id:i,initData:r,cert:n}))}catch{p("Could not create key session");return}l.trigger("keysessioncreated"),y.contentId=i,y.addEventListener("webkitkeymessage",function(_){o(a,i,_.message,function(b,v){if(l&&l.trigger("licenserequestattempted"),b){p(b);return}y.update(new Uint8Array(v))})}),y.addEventListener("webkitkeyadded",function(){d()}),y.addEventListener("webkitkeyerror",function(){var _=y.error;p("KeySession error: code "+_.code+", systemCode "+_.systemCode)})})},YD=function(e){return function(t,i){var r=ro(t.emeHeaders,e.certificateHeaders);L.xhr({uri:e.certificateUri,responseType:"arraybuffer",headers:r},Ns(function(n,a){if(n){i(n);return}i(null,new Uint8Array(a))}))}},QD=function(e,t){return BD(ND(t))},JD=function(e){return function(t,i,r,n){var a=ro({"Content-type":"application/octet-stream"},t.emeHeaders,e.licenseHeaders);L.xhr({uri:e.licenseUri,method:"POST",responseType:"arraybuffer",body:r,headers:a},Ns(n,!0))}},ZD=function(e){var t=e.video,i=e.initData,r=e.options,n=e.eventBus,a=r.keySystems[Ql],o=a.getCertificate||YD(a),l=a.getContentId||QD,d=a.getLicense||JD(a);return new Promise(function(p,y){o(r,function(_,b){if(_){y(_);return}p(b)})}).then(function(p){return XD({video:t,cert:p,initData:i,getLicense:d,options:r,contentId:l(r,i),eventBus:n})})},hs="com.microsoft.playready",ek=function(e,t,i,r){var n=e.keySystems[hs];if(typeof n.getKey=="function"){n.getKey(e,i.destinationURL,i.message.buffer,function(o,l){if(o){r.trigger({message:"Unable to get key: "+o,target:t,type:"mskeyerror"});return}t.update(l)});return}typeof n=="string"?n={url:n}:typeof n=="boolean"&&(n={}),n.url||(n.url=i.destinationURL);var a=function(l,d){if(r&&r.trigger("licenserequestattempted"),l){r.trigger({message:"Unable to request key from url: "+n.url,target:t,type:"mskeyerror"});return}t.update(new Uint8Array(d))};n.getLicense?n.getLicense(e,i.message.buffer,a):Ng(n,i.message.buffer,e,a)},tk=function(e,t,i,r){var n=e.msKeys.createSession("video/mp4",t);if(!n)throw new Error("Could not create key session.");r.trigger("keysessioncreated"),n.addEventListener("mskeymessage",function(a){ek(i,n,a,r)}),n.addEventListener("mskeyerror",function(a){r.trigger({message:"Unexpected key error from key session with "+("code: "+n.error.code+" and systemCode: "+n.error.systemCode),target:n,type:"mskeyerror"})}),n.addEventListener("mskeyadded",function(){r.trigger({target:n,type:"mskeyadded"})})},ik=function(s){var e=s.video,t=s.initData,i=s.options,r=s.eventBus;e.msKeys&&delete e.msKeys;try{e.msSetMediaKeys(new C.MSMediaKeys(hs))}catch(n){throw new Error("Unable to create media keys for PlayReady key system. Error: "+n.message)}tk(e,t,i,r)},sk="3.11.2",rk=function(e,t){for(var i=0;ia.enabled);const{kind:i,language:r}=e,n=t.find(a=>a.language===r&&a.kind===i)||t.find(a=>a.language===r);return n&&(n.enabled=!0),n}textTrack(e){const t=Array.from(this.player().textTracks()).filter(a=>!["chapters","metadata"].includes(a.kind));if(!e)return t.find(a=>a.mode==="showing");t.forEach(a=>a.mode="disabled");const{kind:i,language:r}=e;return t.find(a=>(a.language===r&&a.kind===i&&(a.mode="showing"),a.mode==="showing"))||t.find(a=>(a.language===r&&(a.mode="showing"),a.mode==="showing"))}}L.registerComponent("player",dk);const De=L;De.VERSION={pillarbox:lk,videojs:L.VERSION,[L.VhsSourceHandler.name]:L.VhsSourceHandler.VERSION,eme:L.getPlugin("eme").VERSION};De.options.enableSmoothSeeking=!0;De.options.fill=!0;De.options.html5={vhs:{useForcedSubtitles:!0}};De.options.liveTracker={trackingThreshold:120,liveTolerance:15};De.options.liveui=!0;De.options.playsinline=!0;De.options.responsive=!0;De.options.trackers={};class hk{findChapterByUrn(e){if(this.chapterList){const[t]=this.chapterList.filter(i=>i.urn===e);return t}}findMainSegment(){if(!this.segmentUrn)return;const e=this.getMainSegments(),[t]=e.filter(i=>i.urn===this.segmentUrn);return t}findResourceListByUrn(e){const t=this.findChapterByUrn(e);if(t)return t.resourceList||[]}getChapters(){return this.chapterList}getFilteredExternalSubtitles(){const{subtitleList:e}=this.getMainChapter(),[{subtitleInformationList:t}={}]=this.getResourceList().filter(({subtitleInformationList:n})=>n),i=e&&!t;if(!e)return[];const r=e.filter(n=>n.format!=="TTML");return i?r:r.filter(n=>!t.find(o=>o.locale===n.locale&&n.type===o.type))}getMainBlockReason(){const e=this.getMainChapter();if(!e)return;let{blockReason:t}=e;return!t&&new Datee.blockReason)}getMainChapter(){return this.mainChapter||(this.mainChapter=this.findChapterByUrn(this.chapterUrn)),!this.mainChapter&&this.chapterList&&this.chapterList.length>0&&([this.mainChapter]=this.chapterList),this.mainChapter}getMainChapterImageUrl(){const e=this.getMainChapter();if(!(!e||!e.imageUrl))return e.imageUrl}getMainResources(){const e=this.getResourceList();if(!(!e||!e.length))return e.map(t=>({analyticsData:this.getMergedAnalyticsData(t.analyticsData),analyticsMetadata:this.getMergedAnalyticsMetadata(t.analyticsMetadata),blockReason:this.getMainChapter().blockReason,blockedSegments:this.getMainBlockedSegments(),imageUrl:this.getMainChapterImageUrl(),chapters:this.getChapters(),drmList:t.drmList,dvr:t.dvr,eventData:this.getMainChapter().eventData,id:this.getMainChapter().id,imageCopyright:this.getMainChapter().imageCopyright,intervals:this.getMainTimeIntervals(),live:t.live,mediaType:this.getMainChapter().mediaType,mimeType:t.mimeType,presentation:t.presentation,quality:t.quality,streaming:t.streaming,streamOffset:t.streamOffset,subtitles:this.getFilteredExternalSubtitles(),title:this.getMainChapter().title,tokenType:t.tokenType,url:t.url,urn:this.chapterUrn,vendor:this.getMainChapter().vendor}))}getMainSegments(){const e=this.getMainChapter();return!this.mainSegments&&e&&e.segmentList&&(this.mainSegments=e.segmentList),this.mainSegments||[]}getMainTimeIntervals(){const{timeIntervalList:e=[]}=this.getMainChapter()||{};return e}getMainValidFromDate(){const e=this.getMainChapter();if(!e)return new Date(0);const{validFrom:t}=e;if(t)return new Date(t)}getMergedAnalyticsData(e){return{...this.analyticsData,...this.getMainChapter().analyticsData,...e}}getMergedAnalyticsMetadata(e){return{...this.analyticsMetadata,...this.getMainChapter().analyticsMetadata,...e}}getResourceList(){const{resourceList:e}=this.getMainChapter();return e||[]}}class jh{constructor(e="il.srgssr.ch"){this.setIlHost(e)}setIlHost(e){this.baseUrl=`${e}/integrationlayer/2.1/`}async getMediaCompositionByUrn(e,t=!0){const i=`https://${this.baseUrl}mediaComposition/byUrn/${e}?onlyChapters=${t}&vector=portalplay`,r=await fetch(i);if(!r.ok)throw r;const n=await r.json();return{mediaComposition:Object.assign(new hk,n,{onlyChapters:t})}}}const ns={WIDTH_240:"240",WIDTH_320:"320",WIDTH_480:"480",WIDTH_960:"960",WIDTH_1920:"1920"},Hn={JPG:"jpg",WEBP:"webp",PNG:"png"},fk="https://il.srgssr.ch/images/";class pk{static scale({url:e,width:t=ns.WIDTH_960,format:i=Hn.JPG}={},r=fk){if(!e)return;const n=new URL(r);return n.searchParams.set("imageUrl",e),n.searchParams.set("format",i),n.searchParams.set("width",t),decodeURIComponent(n.href)}static get JPG(){return Hn.JPG}static get PNG(){return Hn.PNG}static get WEBP(){return Hn.WEBP}static get WIDTH_240(){return ns.WIDTH_240}static get WIDTH_320(){return ns.WIDTH_320}static get WIDTH_480(){return ns.WIDTH_480}static get WIDTH_960(){return ns.WIDTH_960}static get WIDTH_1920(){return ns.WIDTH_1920}}const mk={WIDEVINE:"com.widevine.alpha",FAIRPLAY:"com.apple.fps.1_0",PLAYREADY:"com.microsoft.playready"};class Vr{static buildKeySystems(e=[]){const t={};return e.forEach(i=>{const r=Vr.vendors[i.type];if(Vr.vendors.FAIRPLAY===r){const{certificateUrl:n,licenseUrl:a}=i;t[r]={certificateUri:n,licenseUri:a}}else t[r]=i.licenseUrl}),{keySystems:t}}static hasDrm(e){return e.some(({drmList:t})=>t&&t.length>0)}static get vendors(){return mk}}const zn={AKAMAI:"AKAMAI",NONE:"NONE"};class Vi{static aclPath(e){const t=e.pathname;return`${t.substring(0,t.lastIndexOf("/")+1)}*`}static get AKAMAI(){return zn.AKAMAI}static hasToken(e){return e.some(t=>Vi.isAkamai(t.tokenType))}static isAkamai(e){return zn.AKAMAI===e}static isNone(e){return zn.NONE===e}static get NONE(){return zn.NONE}static tokenize(e,t){const i=new URL(`${e.url}`),r=Vi.aclPath(i),n=`${t}${encodeURIComponent(r)}`;return fetch(n).then(a=>a.ok?a.json():Promise.reject({status:a.status,statusText:a.statusText})).then(({token:{authparams:a}})=>(new URLSearchParams(a).forEach((l,d)=>i.searchParams.set(d,l)),Object.assign({},e,{url:i.toString()}))).catch(a=>Promise.reject(a))}static tokenizeSources(e,t="https://tp.srgssr.ch/akahd/token?acl="){const i=[];return e.forEach(r=>{const n=Vi.tokenize(r,t);i.push(n)}),Promise.all(i).then(r=>r).catch(r=>Promise.reject(r))}}const qh="emptied",Vh="ended",Hh="loadeddata",zh="loadstart",nu="pause",gk="play",au="playing",Gh="ratechange",Wh="seeking",ou="timeupdate",Kh="waiting";class Oi{constructor(e,{debug:t=!1,environment:i="prod",playerVersion:r="none",tagCommanderScriptURL:n="//colibri-js.akamaized.net/penguin/tc_SRGGD_11.js"}={}){this.isDebugEnabled=t,this.elapsedPlaybackTime=0,this.environment=i,this.hasStarted=!1,this.heartBeatIntervalId=void 0,this.initialized=!1,this.isSeeking=!1,this.isWaiting=!1,this.mediaSession=0,this.pendingQueue=[],this.pendingTagCommanderReload=!1,this.player=e,this.playerVersion=r,this.srcMediaData=void 0,this.startPlaybackSession=0,this.tagCommanderScriptURL=n,this.trackedCurrentTime=0,this.uptimeIntervalId=void 0,this.initScript(),this.initListeners()}beforeunload(){this.notify("stop")}clearTimers(){clearInterval(this.heartBeatIntervalId),clearInterval(this.uptimeIntervalId),clearTimeout(this.uptimeTimeoutId)}currentTime(){return Math.round(this.trackedCurrentTime)}debug(e){if(e===void 0)return this.isDebugEnabled||this.player.debug();this.isDebugEnabled=!!e}destroy(){this.clearTimers(),window.tc_vars||(window.tc_vars={}),this.elapsedPlaybackTime=0,this.hasStarted=!1,this.heartBeatIntervalId=void 0,this.initialized=!1,this.isWaiting=!1,this.mediaSession=0,this.pendingQueue=[],this.srcMediaData=void 0,this.startPlaybackSession=0,this.trackedCurrentTime=0,this.uptimeIntervalId=void 0}dispose(){this.beforeunload(),this.clearTimers(),window.removeEventListener("beforeunload",this.beforeunloadListener),this.player.off(qh,this.emptiedListener),this.player.off(Vh,this.endedListener),this.player.off(zh,this.loadstartListener),this.player.off(Hh,this.loadeddataListener),this.player.off(au,this.playListener),this.player.off(nu,this.pauseListener),this.player.off(Gh,this.rateChangeListener),this.player.off(Wh,this.seekingListener),this.player.off(ou,this.timeUpdateListener),this.player.off(Kh,this.waitingListener)}emptied(){this.player.ended()||this.notify("stop")}ended(){this.notify("eof"),this.mediaSession=0,this.clearTimers()}flush(){this.isTrackerDisabled()||(this.pendingTagCommanderReload&&window.tC&&(window.tC.container.reload(),this.pendingTagCommanderReload=!1),window.tc_events_11&&this.pendingQueue.length>0&&(this.pendingQueue.forEach(e=>{window.tc_events_11(this.player.el(),e.action,e.labels)}),this.pendingQueue=[]))}getCurrentAudioTrack(){const e=Array.from(this.player.audioTracks()).find(i=>i.enabled);let t="und";return e&&e.language&&(t=e.language),e?t.toUpperCase():""}getCurrentTextTrack(){const e=this.player.textTrack();let t="und";return e&&e.language&&(t=e.language),e?t.toUpperCase():""}getDvrWindowPosition(){const{liveTracker:e}=this.player,t=this.currentTime()-e.seekableStart()|0,i=e.liveWindow()-t;return i<0||i===1/0?0:i*1e3}getDvrWindowSize(){const e=this.player.liveTracker.liveWindow()===1/0,t=this.player.liveTracker.liveWindow()*1e3;return e?0:t}getElapsedPlaybackTime(){return this.startPlaybackSession?this.getElapsedPlayingTime():this.elapsedPlaybackTime}getElapsedPlayingTime(){const e=Oi.now()-this.startPlaybackSession|0;return this.elapsedPlaybackTime+e}getEventLabels(e){const t={event_id:e,event_timestamp:Oi.now(),media_dvr_window_length:0,media_dvr_window_offset:0,media_is_dvr:!1,media_is_live:!1,media_mute:this.player.muted()?"1":"0",media_playback_rate:this.player.playbackRate(),media_position:this.currentTime(),media_quality:this.srcMediaData.mediaData.quality,media_subtitles_on:this.isTextTrackEnabled(),media_volume:(this.player.volume()*100).toFixed(0),navigation_environment:this.environment};return this.isAudioTrackEnabled()&&(t.media_audio_track=this.getCurrentAudioTrack()),this.isTextTrackEnabled()&&(t.media_subtitle_selection=this.getCurrentTextTrack()),this.isMediaOnDemand()||(t.media_is_live=!0,t.media_position=this.getElapsedPlaybackTime()),this.isMediaDvr()&&(t.media_dvr_window_offset=this.getDvrWindowPosition()|0,t.media_dvr_window_length=this.getDvrWindowSize()|0,t.media_is_dvr=!0,t.media_timeshift=[gk,nu].includes(e)?this.timeShifted():0),t}getInternalLabels(){const e={media_bu_distributer:this.srcMediaData.mediaData.vendor,media_chromecast_selected:!!this.player.tech(!0).isCasting,media_embedding_url:document.referrer,media_player_display:"default",media_player_name:"pillarbox-web",media_player_version:this.playerVersion,media_url:this.srcMediaData.src},t=this.srcMediaData.mediaData.analyticsMetadata||{};window.tc_vars=Object.assign({},window.tc_vars,e,t)}heartBeat(){this.heartBeatIntervalId=setInterval(()=>{this.player.paused()||this.notify("pos")},3e4)}initCallbacks(){this.beforeunloadListener=this.beforeunload.bind(this),this.emptiedListener=this.emptied.bind(this),this.endedListener=this.ended.bind(this),this.loadstartListener=this.loadstart.bind(this),this.loadeddataListener=this.loadeddata.bind(this),this.playListener=this.play.bind(this),this.pauseListener=this.pause.bind(this),this.rateChangeListener=this.rateChange.bind(this),this.seekingListener=this.seeking.bind(this),this.timeUpdateListener=this.timeUpdate.bind(this),this.waitingListener=this.waiting.bind(this)}initListeners(){this.initCallbacks(),window.addEventListener("beforeunload",this.beforeunloadListener),this.player.on(qh,this.emptiedListener),this.player.on(Vh,this.endedListener),this.player.on(zh,this.loadstartListener),this.player.on(Hh,this.loadeddataListener),this.player.on(au,this.playListener),this.player.on(nu,this.pauseListener),this.player.on(Gh,this.rateChangeListener),this.player.on(Wh,this.seekingListener),this.player.on(ou,this.timeUpdateListener),this.player.on(Kh,this.waitingListener),this.player.one("dispose",this.dispose.bind(this))}initScript(){const e="tc_script__11";if(!document.querySelector(`#${e}`)){const t=document.createElement("script"),i=this.tagCommanderScriptURL;t.defer=!0,t.id=e,t.src=i,t.type="text/javascript",t.onload=r=>{this.flush()},document.body.appendChild(t)}}isAudioTrackEnabled(){return!!this.getCurrentAudioTrack()}isMediaDvr(){const{trackingThreshold:e}=this.player.liveTracker.options();return!this.isMediaOnDemand()&&ethis.player.liveTracker.liveWindow()}isMediaOnDemand(){return Number.isFinite(this.player.duration())}isTextTrackEnabled(){return!!this.getCurrentTextTrack()}isTrackerDisabled(){return!this.srcMediaData||!this.srcMediaData.mediaData?!0:Array.isArray(this.srcMediaData.disableTrackers)?!!this.srcMediaData.disableTrackers.find(e=>e.toLowerCase()===Oi.name.toLowerCase()):!!this.srcMediaData.disableTrackers}loadstart(){this.destroy(),this.updateSrcMediaData(this.player.currentSource()),!this.isTrackerDisabled()&&(this.getInternalLabels(),this.reloadTagCommanderContainer(),this.notify("buffer_start"),this.hasStarted=!1)}loadeddata(){this.notify("init"),this.initialized=!0,this.notify("buffer_stop")}log(e,t,i="log"){this.debug()&&console[i](`SRGAnalytics:${e}`,t,window.tc_vars)}notify(e,t){if(this.isTrackerDisabled())return;try{this.flush()}catch(r){this.log(e,r,"error")}const i=Object.assign({},this.getEventLabels(e),t);this.log(e,i);try{window.tc_events_11?window.tc_events_11(this.player.el(),e,i):this.pendingQueue.push({action:e,labels:i})}catch(r){this.log(e,r,"error")}}static now(){return(Date.now()/1e3).toFixed(0)}play(){this.hasStarted||(this.hasStarted=!0),!this.startPlaybackSession&&!this.isMediaOnDemand()&&(this.startPlaybackSession=Oi.now()),this.mediaSession===0&&(this.mediaSession=Oi.now(),this.heartBeat(),this.uptime()),this.timeUpdate(),this.notify("play"),this.isSeeking&&(this.isSeeking=!1)}pause(){if(this.isMediaOnDemand()||(this.elapsedPlaybackTime=this.getElapsedPlayingTime(),this.startPlaybackSession=0),!this.player.seeking()&&!this.isMediaLive()&&this.player.currentTime(){!this.player.paused()&&!this.isMediaOnDemand()&&this.notify("uptime")};this.uptimeTimeoutId=setTimeout(()=>{e(),this.uptimeIntervalId=setInterval(()=>{e()},6e4)},3e4)}waiting(){if(!this.initialized||this.isWaiting)return;const e=()=>{this.isWaiting=!1,this.notify("buffer_stop")};this.isWaiting=!0,this.notify("buffer_start"),De.browser.IS_ANY_SAFARI?this.player.one(ou,e):this.player.one(au,e)}}var jg="Wiedergabe",qg="Pause",Vg="Erneut abspielen",Hg="Dauer",zg="LIVE",Gg="Geladen",Wg="Status",Kg="Vollbild",Xg="Stumm schalten",Yg="Ton einschalten",Qg="Untertitel",Jg="Untertitel",Zg="Kapitel",e0="Schließen",t0="Beschreibungen",i0="Schrift",s0="Weiß",r0="Schwarz",n0="Rot",a0="Grün",o0="Blau",u0="Gelb",l0="Magenta",c0="Türkis",d0="Hintergrund",h0="Fenster",f0="Durchsichtig",p0="Undurchsichtig",m0="Kein",g0="Erhoben",y0="Gedrückt",_0="Uniform",v0="Zwanglos",T0="Schreibschrift",b0="Zurücksetzen",S0="Fertig",x0="Farbe",E0="Deckkraft",yk={Play:jg,Pause:qg,Replay:Vg,"Current Time":"Aktueller Zeitpunkt",Duration:Hg,"Remaining Time":"Verbleibende Zeit","Stream Type":"Streamtyp",LIVE:zg,Loaded:Gg,Progress:Wg,Fullscreen:Kg,"Exit Fullscreen":"Vollbildmodus beenden",Mute:Xg,Unmute:Yg,"Playback Rate":"Wiedergabegeschwindigkeit",Subtitles:Qg,"subtitles off":"Untertitel aus",Captions:Jg,"captions off":"Untertitel aus",Chapters:Zg,"You aborted the media playback":"Sie haben die Videowiedergabe abgebrochen.","A network error caused the media download to fail part-way.":"Der Videodownload ist aufgrund eines Netzwerkfehlers fehlgeschlagen.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"Das Video konnte nicht geladen werden, da entweder ein Server- oder Netzwerkfehler auftrat oder das Format nicht unterstützt wird.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"Die Videowiedergabe wurde entweder wegen eines Problems mit einem beschädigten Video oder wegen verwendeten Funktionen, die vom Browser nicht unterstützt werden, abgebrochen.","No compatible source was found for this media.":"Für dieses Video wurde keine kompatible Quelle gefunden.","Play Video":"Video abspielen",Close:e0,"Modal Window":"Modales Fenster","This is a modal window":"Dies ist ein modales Fenster","This modal can be closed by pressing the Escape key or activating the close button.":'Durch Drücken der Esc-Taste bzw. Betätigung der Schaltfläche "Schließen" wird dieses modale Fenster geschlossen.',", opens captions settings dialog":", öffnet Einstellungen für Untertitel",", opens subtitles settings dialog":", öffnet Einstellungen für Untertitel",", selected":", ausgewählt","captions settings":"Untertiteleinstellungen","subtitles settings":"Untertiteleinstellungen","descriptions settings":"Einstellungen für Beschreibungen","Close Modal Dialog":"Modales Fenster schließen",Descriptions:t0,"descriptions off":"Beschreibungen aus","The media is encrypted and we do not have the keys to decrypt it.":"Die Entschlüsselungsschlüssel für den verschlüsselten Medieninhalt sind nicht verfügbar.",", opens descriptions settings dialog":", öffnet Einstellungen für Beschreibungen","Audio Track":"Tonspur",Text:i0,White:s0,Black:r0,Red:n0,Green:a0,Blue:o0,Yellow:u0,Magenta:l0,Cyan:c0,Background:d0,Window:h0,Transparent:f0,"Semi-Transparent":"Halbdurchsichtig",Opaque:p0,"Font Size":"Schriftgröße","Text Edge Style":"Textkantenstil",None:m0,Raised:g0,Depressed:y0,Uniform:_0,"Drop shadow":"Schlagschatten","Font Family":"Schriftfamilie","Proportional Sans-Serif":"Proportionale Sans-Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Serif":"Proportionale Serif","Monospace Serif":"Monospace Serif",Casual:v0,Script:T0,"Small Caps":"Small-Caps",Reset:b0,"restore all settings to the default values":"Alle Einstellungen auf die Standardwerte zurücksetzen",Done:S0,"Caption Settings Dialog":"Einstellungsdialog für Untertitel","Beginning of dialog window. Escape will cancel and close the window.":"Anfang des Dialogfensters. Esc bricht ab und schließt das Fenster.","End of dialog window.":"Ende des Dialogfensters.","Audio Player":"Audio-Player","Video Player":"Video-Player","Progress Bar":"Fortschrittsbalken","progress bar timing: currentTime={1} duration={2}":"{1} von {2}","Volume Level":"Lautstärke","{1} is loading.":"{1} wird geladen.","Seek to live, currently behind live":"Zur Live-Übertragung wechseln. Aktuell wird es nicht live abgespielt.","Seek to live, currently playing live":"Zur Live-Übertragung wechseln. Es wird aktuell live abgespielt.","Exit Picture-in-Picture":"Bild-im-Bild-Modus beenden","Picture-in-Picture":"Bild-im-Bild-Modus","No content":"Kein Inhalt",Color:x0,Opacity:E0,"Text Background":"Texthintergrund","Caption Area Background":"Hintergrund des Untertitelbereichs","Playing in Picture-in-Picture":"Wird im Bild-im-Bild-Modus wiedergegeben","Skip forward {1} seconds":"{1} Sekunden vorwärts","Skip backward {1} seconds":"{1} Sekunden zurück"},_k=Object.freeze({__proto__:null,Background:d0,Black:r0,Blue:o0,Captions:Jg,Casual:v0,Chapters:Zg,Close:e0,Color:x0,Cyan:c0,Depressed:y0,Descriptions:t0,Done:S0,Duration:Hg,Fullscreen:Kg,Green:a0,LIVE:zg,Loaded:Gg,Magenta:l0,Mute:Xg,None:m0,Opacity:E0,Opaque:p0,Pause:qg,Play:jg,Progress:Wg,Raised:g0,Red:n0,Replay:Vg,Reset:b0,Script:T0,Subtitles:Qg,Text:i0,Transparent:f0,Uniform:_0,Unmute:Yg,White:s0,Window:h0,Yellow:u0,default:yk}),C0="Aus Gründen des Jugendschutzes steht dieser Inhalt nur zwischen 20:00 und 06:00 Uhr zur Verfügung.",w0="Aus Gründen des Jugendschutzes steht dieser Inhalt nur zwischen 23:00 und 05:00 Uhr zur Verfügung.",A0="Die Werbung wurde übersprungen.",D0="Dieser Inhalt ist nicht mehr verfügbar.",k0="Dieser Inhalt ist ausserhalb der Schweiz nicht verfügbar.",P0="Dieser Inhalt ist aus rechtlichen Gründen nicht verfügbar.",I0="Dieser Inhalt ist noch nicht verfügbar. Bitte probieren Sie es später noch einmal.",L0="Dieser Inhalt ist nicht verfügbar.",vk={AGERATING12:C0,AGERATING18:w0,COMMERCIAL:A0,ENDDATE:D0,GEOBLOCK:k0,LEGAL:P0,STARTDATE:I0,UNKNOWN:L0},Tk=Object.freeze({__proto__:null,AGERATING12:C0,AGERATING18:w0,COMMERCIAL:A0,ENDDATE:D0,GEOBLOCK:k0,LEGAL:P0,STARTDATE:I0,UNKNOWN:L0,default:vk});De.addLanguage("de",{..._k,...Tk});var O0="Play",R0="Pause",M0="Replay",N0="Duration",B0="LIVE",U0="Loaded",F0="Progress",$0="Fullscreen",j0="Mute",q0="Unmute",V0="Subtitles",H0="Captions",z0="Chapters",G0="Descriptions",W0="Close",K0="Text",X0="White",Y0="Black",Q0="Red",J0="Green",Z0="Blue",ey="Yellow",ty="Magenta",iy="Cyan",sy="Background",ry="Window",ny="Transparent",ay="Opaque",oy="None",uy="Raised",ly="Depressed",cy="Uniform",dy="Casual",hy="Script",fy="Reset",py="Done",my="Color",gy="Opacity",bk={"Audio Player":"Audio Player","Video Player":"Video Player",Play:O0,Pause:R0,Replay:M0,"Current Time":"Current Time",Duration:N0,"Remaining Time":"Remaining Time","Stream Type":"Stream Type",LIVE:B0,"Seek to live, currently behind live":"Seek to live, currently behind live","Seek to live, currently playing live":"Seek to live, currently playing live",Loaded:U0,Progress:F0,"Progress Bar":"Progress Bar","progress bar timing: currentTime={1} duration={2}":"{1} of {2}",Fullscreen:$0,"Exit Fullscreen":"Exit Fullscreen",Mute:j0,Unmute:q0,"Playback Rate":"Playback Rate",Subtitles:V0,"subtitles off":"subtitles off",Captions:H0,"captions off":"captions off",Chapters:z0,Descriptions:G0,"descriptions off":"descriptions off","Audio Track":"Audio Track","Volume Level":"Volume Level","You aborted the media playback":"You aborted the media playback","A network error caused the media download to fail part-way.":"A network error caused the media download to fail part-way.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"The media could not be loaded, either because the server or network failed or because the format is not supported.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.","No compatible source was found for this media.":"No compatible source was found for this media.","The media is encrypted and we do not have the keys to decrypt it.":"The media is encrypted and we do not have the keys to decrypt it.","Play Video":"Play Video",Close:W0,"Close Modal Dialog":"Close Modal Dialog","Modal Window":"Modal Window","This is a modal window":"This is a modal window","This modal can be closed by pressing the Escape key or activating the close button.":"This modal can be closed by pressing the Escape key or activating the close button.",", opens captions settings dialog":", opens captions settings dialog",", opens subtitles settings dialog":", opens subtitles settings dialog",", opens descriptions settings dialog":", opens descriptions settings dialog",", selected":", selected","captions settings":"captions settings","subtitles settings":"subtitles settings","descriptions settings":"descriptions settings",Text:K0,White:X0,Black:Y0,Red:Q0,Green:J0,Blue:Z0,Yellow:ey,Magenta:ty,Cyan:iy,Background:sy,Window:ry,Transparent:ny,"Semi-Transparent":"Semi-Transparent",Opaque:ay,"Font Size":"Font Size","Text Edge Style":"Text Edge Style",None:oy,Raised:uy,Depressed:ly,Uniform:cy,"Drop shadow":"Drop shadow","Font Family":"Font Family","Proportional Sans-Serif":"Proportional Sans-Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Serif":"Proportional Serif","Monospace Serif":"Monospace Serif",Casual:dy,Script:hy,"Small Caps":"Small Caps",Reset:fy,"restore all settings to the default values":"restore all settings to the default values",Done:py,"Caption Settings Dialog":"Caption Settings Dialog","Beginning of dialog window. Escape will cancel and close the window.":"Beginning of dialog window. Escape will cancel and close the window.","End of dialog window.":"End of dialog window.","{1} is loading.":"{1} is loading.","Exit Picture-in-Picture":"Exit Picture-in-Picture","Picture-in-Picture":"Picture-in-Picture","No content":"No content",Color:my,Opacity:gy,"Text Background":"Text Background","Caption Area Background":"Caption Area Background","Playing in Picture-in-Picture":"Playing in Picture-in-Picture","Skip backward {1} seconds":"Skip backward {1} seconds","Skip forward {1} seconds":"Skip forward {1} seconds"},Sk=Object.freeze({__proto__:null,Background:sy,Black:Y0,Blue:Z0,Captions:H0,Casual:dy,Chapters:z0,Close:W0,Color:my,Cyan:iy,Depressed:ly,Descriptions:G0,Done:py,Duration:N0,Fullscreen:$0,Green:J0,LIVE:B0,Loaded:U0,Magenta:ty,Mute:j0,None:oy,Opacity:gy,Opaque:ay,Pause:R0,Play:O0,Progress:F0,Raised:uy,Red:Q0,Replay:M0,Reset:fy,Script:hy,Subtitles:V0,Text:K0,Transparent:ny,Uniform:cy,Unmute:q0,White:X0,Window:ry,Yellow:ey,default:bk}),yy="To protect children this content is only available between 8PM and 6AM.",_y="To protect children this content is only available between 10PM and 5AM.",vy="This commercial content is not available.",Ty="This content is not available anymore.",by="This content is not available outside Switzerland.",Sy="This content is not available due to legal restrictions.",xy="This content is not available yet.",Ey="This content is not available.",xk={AGERATING12:yy,AGERATING18:_y,COMMERCIAL:vy,ENDDATE:Ty,GEOBLOCK:by,LEGAL:Sy,STARTDATE:xy,UNKNOWN:Ey},Ek=Object.freeze({__proto__:null,AGERATING12:yy,AGERATING18:_y,COMMERCIAL:vy,ENDDATE:Ty,GEOBLOCK:by,LEGAL:Sy,STARTDATE:xy,UNKNOWN:Ey,default:xk});De.addLanguage("en",{...Sk,...Ek});var Cy="Lecture",wy="Pause",Ay="Revoir",Dy="Durée",ky="EN DIRECT",Py="Chargé",Iy="Progression",Ly="Plein écran",Oy="Mettre en sourdine",Ry="Activer le son",My="Sous-titres",Ny="Sous-titres transcrits",By="Chapitres",Uy="Descriptions",Fy="Fermer",$y="Texte",jy="Blanc",qy="Noir",Vy="Rouge",Hy="Vert",zy="Bleu",Gy="Jaune",Wy="Magenta",Ky="Cyan",Xy="Arrière-plan",Yy="Fenêtre",Qy="Transparent",Jy="Opaque",Zy="Aucun",e_="Élevé",t_="Enfoncé",i_="Uniforme",s_="Manuscrite",r_="Scripte",n_="Réinitialiser",a_="Terminé",o_="Couleur",u_="Opacité",Ck={"Audio Player":"Lecteur audio","Video Player":"Lecteur vidéo",Play:Cy,Pause:wy,Replay:Ay,"Current Time":"Temps actuel",Duration:Dy,"Remaining Time":"Temps restant","Stream Type":"Type de flux",LIVE:ky,"Seek to live, currently behind live":"Rechercher le direct, actuellement après le direct","Seek to live, currently playing live":"Rechercher le direct, le direct actuellement en cours de lecture",Loaded:Py,Progress:Iy,"Progress Bar":"Barre de progression","progress bar timing: currentTime={1} duration={2}":"{1} de {2}",Fullscreen:Ly,"Exit Fullscreen":"Fenêtré",Mute:Oy,Unmute:Ry,"Playback Rate":"Vitesse de lecture",Subtitles:My,"subtitles off":"Sous-titres désactivés",Captions:Ny,"captions off":"Sous-titres transcrits désactivés",Chapters:By,Descriptions:Uy,"descriptions off":"descriptions désactivées","Audio Track":"Piste audio","Volume Level":"Niveau de volume","You aborted the media playback":"Vous avez interrompu la lecture de la vidéo.","A network error caused the media download to fail part-way.":"Une erreur de réseau a interrompu le téléchargement de la vidéo.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"Cette vidéo n'a pas pu être chargée, soit parce que le serveur ou le réseau a échoué ou parce que le format n'est pas reconnu.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"La lecture de la vidéo a été interrompue à cause d'un problème de corruption ou parce que la vidéo utilise des fonctionnalités non prises en charge par votre navigateur.","No compatible source was found for this media.":"Aucune source compatible n'a été trouvée pour cette vidéo.","The media is encrypted and we do not have the keys to decrypt it.":"Le média est chiffré et nous n'avons pas les clés pour le déchiffrer.","Play Video":"Lire la vidéo",Close:Fy,"Close Modal Dialog":"Fermer la boîte de dialogue modale","Modal Window":"Fenêtre modale","This is a modal window":"Ceci est une fenêtre modale","This modal can be closed by pressing the Escape key or activating the close button.":"Ce modal peut être fermé en appuyant sur la touche Échap ou activer le bouton de fermeture.",", opens captions settings dialog":", ouvrir les paramètres des sous-titres transcrits",", opens subtitles settings dialog":", ouvrir les paramètres des sous-titres",", opens descriptions settings dialog":", ouvrir les paramètres des descriptions",", selected":", sélectionné","captions settings":"Paramètres des sous-titres transcrits","subtitles settings":"Paramètres des sous-titres","descriptions settings":"Paramètres des descriptions",Text:$y,White:jy,Black:qy,Red:Vy,Green:Hy,Blue:zy,Yellow:Gy,Magenta:Wy,Cyan:Ky,Background:Xy,Window:Yy,Transparent:Qy,"Semi-Transparent":"Semi-transparent",Opaque:Jy,"Font Size":"Taille des caractères","Text Edge Style":"Style des contours du texte",None:Zy,Raised:e_,Depressed:t_,Uniform:i_,"Drop shadow":"Ombre portée","Font Family":"Famille de polices","Proportional Sans-Serif":"Polices à chasse variable sans empattement (Proportional Sans-Serif)","Monospace Sans-Serif":"Polices à chasse fixe sans empattement (Monospace Sans-Serif)","Proportional Serif":"Polices à chasse variable avec empattement (Proportional Serif)","Monospace Serif":"Polices à chasse fixe avec empattement (Monospace Serif)",Casual:s_,Script:r_,"Small Caps":"Petites capitales",Reset:n_,"restore all settings to the default values":"Restaurer tous les paramètres aux valeurs par défaut",Done:a_,"Caption Settings Dialog":"Boîte de dialogue des paramètres des sous-titres transcrits","Beginning of dialog window. Escape will cancel and close the window.":"Début de la fenêtre de dialogue. La touche d'échappement annulera et fermera la fenêtre.","End of dialog window.":"Fin de la fenêtre de dialogue.","Exit Picture-in-Picture":"Quitter le mode image dans l'image","Picture-in-Picture":"Image dans l'image","{1} is loading.":"{1} en cours de chargement.","No content":"Aucun contenu",Color:o_,Opacity:u_,"Text Background":"Arrière-plan du texte","Caption Area Background":"Arrière-plan de la zone de sous-titre","Skip backward {1} seconds":"Reculer de {1} secondes","Skip forward {1} seconds":"Avancer de {1} secondes"},wk=Object.freeze({__proto__:null,Background:Xy,Black:qy,Blue:zy,Captions:Ny,Casual:s_,Chapters:By,Close:Fy,Color:o_,Cyan:Ky,Depressed:t_,Descriptions:Uy,Done:a_,Duration:Dy,Fullscreen:Ly,Green:Hy,LIVE:ky,Loaded:Py,Magenta:Wy,Mute:Oy,None:Zy,Opacity:u_,Opaque:Jy,Pause:wy,Play:Cy,Progress:Iy,Raised:e_,Red:Vy,Replay:Ay,Reset:n_,Script:r_,Subtitles:My,Text:$y,Transparent:Qy,Uniform:i_,Unmute:Ry,White:jy,Window:Yy,Yellow:Gy,default:Ck}),l_="Pour protéger les enfants, ce contenu est accessible entre 20h et 6h.",c_="Pour protéger les enfants, ce contenu est accessible entre 23h et 5h.",d_="Ce contenu n'est actuellement pas disponible.",h_="Ce contenu n'est plus disponible.",f_="La RTS ne dispose pas des droits de diffusion en dehors de la Suisse.",p_="Pour des raisons juridiques, ce contenu n'est pas disponible.",m_="Ce contenu n'est pas encore disponible. Veuillez réessayer plus tard.",g_="Ce contenu n'est actuellement pas disponible.",Ak={AGERATING12:l_,AGERATING18:c_,COMMERCIAL:d_,ENDDATE:h_,GEOBLOCK:f_,LEGAL:p_,STARTDATE:m_,UNKNOWN:g_},Dk=Object.freeze({__proto__:null,AGERATING12:l_,AGERATING18:c_,COMMERCIAL:d_,ENDDATE:h_,GEOBLOCK:f_,LEGAL:p_,STARTDATE:m_,UNKNOWN:g_,default:Ak});De.addLanguage("fr",{...wk,...Dk});var y_="Play",__="Pausa",v_="Replay",T_="Durata",b_="LIVE",S_="Caricato",x_="Stato",E_="Schermo intero",C_="Disattiva l’audio",w_="Attiva l’audio",A_="Sottotitoli",D_="Sottotitoli non udenti",k_="Capitolo",P_="Descrizioni",I_="Chiudi",L_="Testo",O_="Bianco",R_="Nero",M_="Rosso",N_="Verde",B_="Blu",U_="Giallo",F_="Magenta",$_="Ciano",j_="Sfondo",q_="Finestra",V_="Trasparente",H_="Opaco",z_="Nessuno",G_="Uniforme",W_="Reinizializza",K_="Fatto",X_="Colore",Y_="Opacità",kk={"Audio Player":"Lettore audio","Video Player":"Lettore video",Play:y_,Pause:__,Replay:v_,"Current Time":"Orario attuale",Duration:T_,"Remaining Time":"Tempo rimanente","Stream Type":"Tipo di streaming",LIVE:b_,Loaded:S_,Progress:x_,"Progress Bar":"Barra di avanzamento","progress bar timing: currentTime={1} duration={2}":"{1} di {2}",Fullscreen:E_,"Exit Fullscreen":"Chiudi Schermo intero",Mute:C_,Unmute:w_,"Playback Rate":"Velocità di riproduzione",Subtitles:A_,"subtitles off":"Senza sottotitoli",Captions:D_,"captions off":"Senza sottotitoli non udenti",Chapters:k_,Descriptions:P_,"descriptions off":"Descrizioni disattivate","Audio Track":"Traccia audio","Volume Level":"Livello del volume","You aborted the media playback":"La riproduzione del contenuto multimediale è stata interrotta.","A network error caused the media download to fail part-way.":"Il download del contenuto multimediale è stato interrotto a causa di un problema rete.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"Il contenuto multimediale non può essere caricato a causa di un errore nel server o nella rete o perché il formato non viene supportato.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"La riproduzione del contenuto multimediale è stata interrotta a causa di un file danneggiato o per l’utilizzo di impostazioni non supportate dal browser.","No compatible source was found for this media.":"Non ci sono fonti compatibili per questo contenuto multimediale.","The media is encrypted and we do not have the keys to decrypt it.":"Il contenuto multimediale è criptato e non disponiamo delle chiavi per decifrarlo.","Play Video":"Riproduci il video",Close:I_,"Close Modal Dialog":"Chiudi la finestra di dialogo","Modal Window":"Finestra di dialogo","This is a modal window":"Questa è una finestra di dialogo","This modal can be closed by pressing the Escape key or activating the close button.":"Questa finestra di dialogo può essere chiusa premendo sul tasto Esc o attivando il pulsante di chiusura.",", opens captions settings dialog":", aprire i parametri della trascrizione dei sottotitoli",", opens subtitles settings dialog":", aprire i parametri dei sottotitoli",", opens descriptions settings dialog":", aprire i parametri delle descrizioni",", selected":", selezionato","captions settings":"Parametri sottotitoli non udenti","subtitles settings":"Parametri sottotitoli","descriptions settings":"Parametri descrizioni",Text:L_,White:O_,Black:R_,Red:M_,Green:N_,Blue:B_,Yellow:U_,Magenta:F_,Cyan:$_,Background:j_,Window:q_,Transparent:V_,"Semi-Transparent":"Semi-Trasparente",Opaque:H_,"Font Size":"Dimensione dei caratteri","Text Edge Style":"Stile dei bordi del testo",None:z_,Uniform:G_,"Drop shadow":"Ombra","Font Family":"Carattere","Proportional Sans-Serif":"Sans-Serif proporzionale","Monospace Sans-Serif":"Sans-Serif monospaziato","Proportional Serif":"Serif proporzionale","Monospace Serif":"Serif monospaziato","Small Caps":"Maiuscoletto",Reset:W_,"restore all settings to the default values":"Ripristina i valori predefiniti per tutti i parametri",Done:K_,"Caption Settings Dialog":"Finestra di dialogo dei parametri della trascrizione dei sottotitoli","Beginning of dialog window. Escape will cancel and close the window.":"Inizio della finestra di dialogo. Il tasto Esc annullerà l’operazione e chiuderà la finestra.","End of dialog window.":"Fine della finestra di dialogo.","{1} is loading.":"{1} in fase di caricamento.","Exit Picture-in-Picture":"Esci dalla modalità Picture-in-Picture","Picture-in-Picture":"Picture-in-Picture",Color:X_,Opacity:Y_,"Text Background":"Sfondo testo","Caption Area Background":"Sfondo area sottotitoli","Skip forward {1} seconds":"Avanti {1} secondi","Skip backward {1} seconds":"Indietro {1} secondi"},Pk=Object.freeze({__proto__:null,Background:j_,Black:R_,Blue:B_,Captions:D_,Chapters:k_,Close:I_,Color:X_,Cyan:$_,Descriptions:P_,Done:K_,Duration:T_,Fullscreen:E_,Green:N_,LIVE:b_,Loaded:S_,Magenta:F_,Mute:C_,None:z_,Opacity:Y_,Opaque:H_,Pause:__,Play:y_,Progress:x_,Red:M_,Replay:v_,Reset:W_,Subtitles:A_,Text:L_,Transparent:V_,Uniform:G_,Unmute:w_,White:O_,Window:q_,Yellow:U_,default:kk}),Q_="Per proteggere i bambini, questo media è disponibile solo fra le 20 e le 6.",J_="Per proteggere i bambini, questo media è disponibile solo fra le 23 le 5.",Z_="Questo contenuto commerciale non è disponibile.",ev="Questo media non è più disponibile.",tv="Questo media non è disponibile fuori dalla Svizzera.",iv="Il contenuto non è fruibile a causa di restrizioni legali.",sv="Il contenuto non è ancora disponibile. Per cortesia prova più tardi.",rv="Questo media non è disponibile.",Ik={AGERATING12:Q_,AGERATING18:J_,COMMERCIAL:Z_,ENDDATE:ev,GEOBLOCK:tv,LEGAL:iv,STARTDATE:sv,UNKNOWN:rv},Lk=Object.freeze({__proto__:null,AGERATING12:Q_,AGERATING18:J_,COMMERCIAL:Z_,ENDDATE:ev,GEOBLOCK:tv,LEGAL:iv,STARTDATE:sv,UNKNOWN:rv,default:Ik});De.addLanguage("it",{...Pk,...Lk});var nv="Laschar ir",av="Pausa",ov="Mussar danovamain",uv="Durada",lv="LIVE",cv="Chargià",dv="Progress",hv="Entir visur",fv="Senza tun",pv="Cun tun",mv="Suttitels",gv="Suttitels",yv="Chapitels",_v="Descripziuns",vv="Serrar",Tv="Text",bv="Alv",Sv="Nair",xv="Cotschn",Ev="Verd",Cv="Blau",wv="Mellen",Av="Magenta",Dv="Cyan",kv="Fund",Pv="Fanestra",Iv="Transparent",Lv="Betg transparent",Ov="Nagin",Rv="Auzà",Mv="Sbassà",Nv="Uniform",Bv="Sumbriva",Uv="Casual",Fv="Script",$v="Da nov",jv="Fatg",qv="Per proteger uffants, è quest cuntegn disponibel mo tranter las 20.00 e las 06.00.",Vv="Per proteger uffants, è quest cuntegn disponibel mo tranter las 23.00 e las 05.00.",Hv="Quest medium commerzial n'è betg disponibel.",zv="Quest cuntegn n'è betg pli disponibel.",Gv="Quest cuntegn n'è betg disponibel ordaifer la Svizra.",Wv="Quest cuntegn n'è betg disponibel perquai ch'el è scadì.",Kv="Quest cuntegn n'è betg anc disponibel. Empruvai pli tard.",Xv="Quest cuntegn n'è betg disponibel.",Ok={"Audio Player":"Audio-Player","Video Player":"Video-Player",Play:nv,Pause:av,Replay:ov,"Current Time":"Temp actual",Duration:uv,"Remaining Time":"Temp restant","Stream Type":"Tip dal stream",LIVE:lv,Loaded:cv,Progress:dv,"Progress Bar":"Bar da progessiun","progress bar timing: currentTime={1} duration={2}":"{1} da {2}",Fullscreen:hv,"Non-Fullscreen":"Betg entir visur",Mute:fv,Unmute:pv,"Playback Rate":"Tempo ",Subtitles:mv,"subtitles off":"senza suttitels",Captions:gv,"captions off":"senza suttitels",Chapters:yv,Descriptions:_v,"descriptions off":"senza descripziuns","Audio Track":"Piese audio","Volume Level":"Nivel dal volumen","You aborted the media playback":"Vus avais interrut il vdieo","A network error caused the media download to fail part-way.":"In sbagl en la rait ha impedì il download","The media could not be loaded, either because the server or network failed or because the format is not supported.":"Il video n'è betg chargià - ubain per in sbagl da server / da la rait, ubain ch'il format n'è betg cumpatibel.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"Il video è interrut: Ubain ch'il video è donnegià, ubain che funcziuns n'èn betg cumpatiblas.","No compatible source was found for this media.":"Chattà nagina funtauna cumpatibla per quest video.","The media is encrypted and we do not have the keys to decrypt it.":"Il video è codifitgà da moda nunenconuschenta.","Play Video":"Aviar video",Close:vv,"Close Modal Dialog":"Serrar la fanestra modala","Modal Window":"Fanestra modala","This is a modal window":"Quai è ina fanestra modala","This modal can be closed by pressing the Escape key or activating the close button.":'Questa fanestra modala pudais serrar cun la tasta "Escape" ubain cun il buttun.',", opens captions settings dialog":", avra opziuns per ils suttitels",", opens subtitles settings dialog":", avra opziuns per ils suttitels",", opens descriptions settings dialog":", avra opziuns per la descripziun",", selected":", selecziunà","captions settings":"opziuns per ils suttitels","subtitles settings":"opziuns per ils suttitels","descriptions settings":"opziuns per la descripziun",Text:Tv,White:bv,Black:Sv,Red:xv,Green:Ev,Blue:Cv,Yellow:wv,Magenta:Av,Cyan:Dv,Background:kv,Window:Pv,Transparent:Iv,"Semi-Transparent":"Mez transparent",Opaque:Lv,"Font Size":"Grandezza dal text","Text Edge Style":"Stil dal text",None:Ov,Raised:Rv,Depressed:Mv,Uniform:Nv,Dropshadow:Bv,"Font Family":"Scrittira","Proportional Sans-Serif":"Proportionale Sans-Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Serif":"Proportionale Serif","Monospace Serif":"Monospace Serif",Casual:Uv,Script:Fv,"Small Caps":"Bustabs pitschens",Reset:$v,"restore all settings to the default values":"Enavos tar las opziuns da standard",Done:jv,"Caption Settings Dialog":"Opziuns per suttitels","Beginning of dialog window. Escape will cancel and close the window.":"Entschatta da la fanestra da dialog. Escape stizza e serra la fanestra.","End of dialog window.":"Fin da la fanestra da dialog.",AGERATING12:qv,AGERATING18:Vv,COMMERCIAL:Hv,ENDDATE:zv,GEOBLOCK:Gv,LEGAL:Wv,STARTDATE:Kv,UNKNOWN:Xv},Rk=Object.freeze({__proto__:null,AGERATING12:qv,AGERATING18:Vv,Background:kv,Black:Sv,Blue:Cv,COMMERCIAL:Hv,Captions:gv,Casual:Uv,Chapters:yv,Close:vv,Cyan:Dv,Depressed:Mv,Descriptions:_v,Done:jv,Dropshadow:Bv,Duration:uv,ENDDATE:zv,Fullscreen:hv,GEOBLOCK:Gv,Green:Ev,LEGAL:Wv,LIVE:lv,Loaded:cv,Magenta:Av,Mute:fv,None:Ov,Opaque:Lv,Pause:av,Play:nv,Progress:dv,Raised:Rv,Red:xv,Replay:ov,Reset:$v,STARTDATE:Kv,Script:Fv,Subtitles:mv,Text:Tv,Transparent:Iv,UNKNOWN:Xv,Uniform:Nv,Unmute:pv,White:bv,Window:Pv,Yellow:wv,default:Ok});De.addLanguage("rm",{...Rk});class Z{static addBlockedSegments(e,t=[]){const i="srgssr-blocked-segments",r=e.textTracks().getTrackById(i);if(r&&e.textTracks().removeTrack(r),!Array.isArray(t)||!t.length)return;const n=t.filter(a=>a.blockReason);n.length&&Z.createTextTrack(e,i).then(a=>{n.forEach(o=>{Z.addTextTrackCue(a,o)}),e.textTracks().addTrack(a)})}static addRemoteTextTracks(e,t=[]){Array.isArray(t)&&t.forEach(({type:i,language:r,locale:n,url:a})=>{e.addRemoteTextTrack({kind:i==="SDH"?"captions":"subtitles",label:r,language:n,src:a})})}static addTextTrackCue(e,t){const i=(t.markIn??t.fullLengthMarkIn)/1e3,r=(t.markOut??t.fullLengthMarkOut)/1e3;e.addCue(new VTTCue(i,r,JSON.stringify(t)))}static addTextTracks(e,{mediaData:t}){Z.addRemoteTextTracks(e,t.subtitles),Z.addChapters(e,t.urn,t.chapters),Z.addBlockedSegments(e,t.blockedSegments),Z.addIntervals(e,t.intervals)}static addChapters(e,t,i=[]){const r="srgssr-chapters",n=e.textTracks().getTrackById(r);n&&e.textTracks().removeTrack(n),!(!Array.isArray(i)||!i.length)&&Z.createTextTrack(e,r).then(a=>{i.forEach(o=>{t===o.fullLengthUrn&&Z.addTextTrackCue(a,o)}),e.textTracks().addTrack(a)})}static addIntervals(e,t=[]){const i="srgssr-intervals",r=e.textTracks().getTrackById(i);r&&e.textTracks().removeTrack(r),!(!Array.isArray(t)||!t.length)&&Z.createTextTrack(e,i).then(n=>{t.forEach(a=>{Z.addTextTrackCue(n,a)}),e.textTracks().addTrack(n)})}static blockingReason(e,t){if(!t.mediaData.blockReason)return;const i=e.localize(t.mediaData.blockReason);return Z.error(e,{code:MediaError.MEDIA_ERR_ABORTED,message:i,metadata:{errorType:t.mediaData.blockReason,src:t}}),!0}static async composeAkamaiResources(e=[]){return Vi.hasToken(e)?Vi.tokenizeSources(e):Promise.resolve(e)}static composeKeySystemsResources(e=[]){return Vr.hasDrm(e),e.map(t=>({...t,...Vr.buildKeySystems(t.drmList)}))}static composeMainResources(e){return Z.composeAkamaiResources(Z.composeKeySystemsResources(Z.filterIncompatibleResources(e.getMainResources())))}static composeSrcMediaData({mediaData:e,disableTrackers:t},{url:i,mimeType:r,keySystems:n,...a}){return{src:i,type:r,keySystems:n,disableTrackers:t,mediaData:De.obj.merge(a,e)}}static createTextTrack(e,t){return new Promise(i=>{setTimeout(()=>{i(new De.TextTrack({id:t,kind:"metadata",label:t,tech:e.tech(!0)}))},100)})}static cuechangeEventProxy(e){e.textTracks().on("addtrack",({track:t})=>{["srgssr-chapters","srgssr-intervals"].includes(t.id)&&t.on("cuechange",()=>{const[i]=Array.from(t.activeCues),r=t.id.includes("srgssr-chapters")?"srgssr/chapter":"srgssr/interval";e.trigger({type:r,data:i})})})}static dataProvider(e){if(!e.options().srgOptions.dataProvider){const{dataProviderHost:t}=e.options().srgOptions,i=new jh(t);e.options({srgOptions:{dataProvider:i}})}return e.options().srgOptions.dataProvider}static dataProviderError(e,t){if(t.url&&t.url.includes(Z.dataProvider(e).baseUrl))return Z.error(e,{code:0,message:e.localize("UNKNOWN"),metadata:{errorType:"UNKNOWN",urn:e.src(),status:t.status,statusText:t.statusText,url:t.url}}),!0}static error(e,{code:t,message:i,metadata:r}){e.error(null),e.error({code:t,message:i,metadata:r})}static filterIncompatibleResources(e=[]){return e.filter(t=>!["RTMP","HDS"].includes(t.streaming))}static getBlockedSegment(e){const i=e.textTracks().getTrackById("srgssr-blocked-segments");if(!i)return;const[r]=Array.from(i.activeCues);return r}static getBlockedSegmentByTime(e,t){const i=Z.getBlockedSegment(e);return i&&t>=i.startTime&&tr===t)||e[0]}static async getSrcMediaObj(e,t){const{src:i,...r}=t,{mediaComposition:n}=await Z.getMediaComposition(i,Z.dataProvider(e)),a=await Z.composeMainResources(n),o=Z.getMediaData(a);return Z.composeSrcMediaData(r,o)}static handleCurrentTime(e,t){const i=Z.getBlockedSegmentByTime(e,t);return!i||!Number.isFinite(i.endTime)?t:(e.trigger({type:"srgssr/blocked-segment",data:i}),e.currentTime(i.endTime),i.endTime)}static handleSetCurrentTime(e,t){const{endTime:i}=Z.getBlockedSegmentByTime(e,t)||{};return Number.isFinite(i)?i:t}static async handleSetSource(e,t,i){try{const r=await Z.getSrcMediaObj(e,t);return Z.srgAnalytics(e),Z.updateTitleBar(e,r),Z.updatePoster(e,r),Z.blockingReason(e,r)?void 0:(Z.addTextTracks(e,r),i(null,r))}catch(r){return Z.dataProviderError(e,r)?void 0:i(r)}}static srgAnalytics(e){if(e.options().trackers.srgAnalytics!==!1&&!e.options().trackers.srgAnalytics){const t=new Oi(e,{debug:e.debug(),playerVersion:De.VERSION.pillarbox,tagCommanderScriptURL:e.options().srgOptions.tagCommanderScriptURL});e.options({trackers:{srgAnalytics:t}})}}static updatePoster(e,t,i=pk){e.poster(i.scale({url:t.mediaData.imageUrl}))}static updateTitleBar(e,t){e.titleBar&&e.titleBar.update({title:t.mediaData.vendor,description:t.mediaData.title})}static middleware(e){return Z.cuechangeEventProxy(e),{currentTime:t=>Z.handleCurrentTime(e,t),setCurrentTime:t=>Z.handleSetCurrentTime(e,t),setSource:async(t,i)=>Z.handleSetSource(e,t,i)}}}De.use("srgssr/urn",Z.middleware);De.options.srgOptions={dataProviderHost:void 0,tagCommanderScriptURL:void 0};/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const Mk={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Yv=s=>(...e)=>({_$litDirective$:s,values:e});class Nk{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */class wa extends Nk{constructor(e){if(super(e),this.it=Ie,e.type!==Mk.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===Ie||e==null)return this._t=void 0,this.it=e;if(e===zi)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}wa.directiveName="unsafeHTML",wa.resultType=1;const Gk=Yv(wa);var Wr,Vu,Kr;class qu extends fs{constructor(){super();pe(this,Wr);pe(this,Kr,t=>{t.preventDefault();const i=new URL(`${window.location.origin}/${this.href}`),r=Object.fromEntries(i.searchParams.entries());Bo.navigateTo(i.pathname,r)});Bo.addEventListener("routechanged",()=>{$e(this,Wr,Vu).call(this)})}connectedCallback(){super.connectedCallback(),$e(this,Wr,Vu).call(this),this.addEventListener("click",F(this,Kr))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",F(this,Kr))}render(){return sf` + + + + `}}Wr=new WeakSet,Vu=function(){const t=new URL(`${window.location.origin}/${this.href}`);this.selected=Bo.isActiveRoute(t.pathname)},Kr=new WeakMap,Se(qu,"properties",{href:{type:String},title:{type:String},selected:{type:Boolean,state:!0}}),Se(qu,"styles",[nf,O2]);customElements.define("route-link",qu);const Bk=` + + +`,Uk=""+new URL("srgssr-logo-DTU79MZS.png",import.meta.url).href;/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */class Hu extends wa{}Hu.directiveName="unsafeSVG",Hu.resultType=2;const Fk=Yv(Hu),$k="header{display:flex;align-items:baseline;justify-content:space-between;width:100%;margin:var(--size-4) 0}h1{display:flex;gap:.15em;align-items:center;margin:0}.pbw-logo{height:var(--size-7)}.github-link{display:flex;align-items:center}.github-icon{fill:var(--color-5)}.github-icon:hover{fill:var(--color-2)}.header-end{display:flex;align-items:center}";class Qv extends fs{render(){return sf` +
+

+ + Pillarbox +

+ +
`}}Se(Qv,"styles",[nf,Ia($k)]);customElements.define("core-demo-header",Qv);export{O2 as a,Bo as b,Mk as c,Vk as d,Yv as e,ri as g,Nk as i,Gk as o,De as p,Ia as r,fs as s,nf as t,L as v,zi as w,sf as x}; +//# sourceMappingURL=core-demo-header-component-76S4-KyJ.js.map diff --git a/pr-preview/pr-26/assets/core-demo-header-component-76S4-KyJ.js.map b/pr-preview/pr-26/assets/core-demo-header-component-76S4-KyJ.js.map new file mode 100644 index 0000000..9095dcc --- /dev/null +++ b/pr-preview/pr-26/assets/core-demo-header-component-76S4-KyJ.js.map @@ -0,0 +1 @@ +{"version":3,"file":"core-demo-header-component-76S4-KyJ.js","sources":["../../node_modules/@lit/reactive-element/css-tag.js","../../node_modules/@lit/reactive-element/reactive-element.js","../../node_modules/lit-html/lit-html.js","../../node_modules/lit-element/lit-element.js","../../src/theme/theme.js","../../node_modules/balanced-match/index.js","../../node_modules/brace-expansion/index.js","../../node_modules/minimatch/dist/mjs/assert-valid-pattern.js","../../node_modules/minimatch/dist/mjs/brace-expressions.js","../../node_modules/minimatch/dist/mjs/unescape.js","../../node_modules/minimatch/dist/mjs/ast.js","../../node_modules/minimatch/dist/mjs/escape.js","../../node_modules/minimatch/dist/mjs/index.js","../../src/router/router.js","../../node_modules/global/window.js","../../__vite-browser-external","../../node_modules/global/document.js","../../node_modules/keycode/index.js","../../node_modules/safe-json-parse/tuple.js","../../node_modules/@babel/runtime/helpers/esm/extends.js","../../node_modules/is-function/index.js","../../node_modules/@videojs/xhr/lib/http-handler.js","../../node_modules/@videojs/xhr/lib/index.js","../../node_modules/videojs-vtt.js/lib/vtt.js","../../node_modules/videojs-vtt.js/lib/vttcue.js","../../node_modules/videojs-vtt.js/lib/vttregion.js","../../node_modules/videojs-vtt.js/lib/browser-index.js","../../node_modules/url-toolkit/src/url-toolkit.js","../../node_modules/@videojs/vhs-utils/es/resolve-url.js","../../node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/es/stream.js","../../node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js","../../node_modules/m3u8-parser/dist/m3u8-parser.es.js","../../node_modules/@videojs/vhs-utils/es/codecs.js","../../node_modules/@videojs/vhs-utils/es/media-types.js","../../node_modules/@videojs/vhs-utils/es/byte-helpers.js","../../node_modules/@videojs/vhs-utils/es/media-groups.js","../../node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js","../../node_modules/@xmldom/xmldom/lib/conventions.js","../../node_modules/@xmldom/xmldom/lib/dom.js","../../node_modules/@xmldom/xmldom/lib/entities.js","../../node_modules/@xmldom/xmldom/lib/sax.js","../../node_modules/@xmldom/xmldom/lib/dom-parser.js","../../node_modules/@xmldom/xmldom/lib/index.js","../../node_modules/mpd-parser/dist/mpd-parser.es.js","../../node_modules/mux.js/lib/utils/numbers.js","../../node_modules/mux.js/lib/tools/parse-sidx.js","../../node_modules/@videojs/vhs-utils/es/id3-helpers.js","../../node_modules/@videojs/vhs-utils/es/mp4-helpers.js","../../node_modules/@videojs/vhs-utils/es/ebml-helpers.js","../../node_modules/@videojs/vhs-utils/es/nal-helpers.js","../../node_modules/@videojs/vhs-utils/es/containers.js","../../node_modules/mux.js/lib/utils/clock.js","../../node_modules/video.js/dist/video.es.js","../../node_modules/videojs-contrib-eme/dist/videojs-contrib-eme.es.js","../../node_modules/@srgssr/pillarbox-web/dist/pillarbox.es.js","../../node_modules/lit-html/directive.js","../../node_modules/lit-html/directives/unsafe-html.js","../../src/router/route-link-component.js","../../img/github-logo.svg?raw","../../img/srgssr-logo.png","../../node_modules/lit-html/directives/unsafe-svg.js","../../src/layout/header/core-demo-header-component.js"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,adoptStyles,css,getCompatibleStyle,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:r,getOwnPropertyNames:h,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),y={attribute:!0,type:String,converter:u,reflect:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e(this.prototype,t,r)}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...h(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$EC(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null}}requestUpdate(t,s,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f)(this[t],s))return;this.P(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t)!0!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.P(s,this[s],i)}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EU()}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:\"open\"},b[d(\"elementProperties\")]=new Map,b[d(\"finalized\")]=new Map,p?.({ReactiveElement:b}),(a.reactiveElementVersions??=[]).push(\"2.0.4\");export{b as ReactiveElement,u as defaultConverter,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t.trustedTypes,s=i?i.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,e=\"$lit$\",h=`lit$${(Math.random()+\"\").slice(9)}$`,o=\"?\"+h,n=`<${o}>`,r=document,l=()=>r.createComment(\"\"),c=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,a=Array.isArray,u=t=>a(t)||\"function\"==typeof t?.[Symbol.iterator],d=\"[ \\t\\n\\f\\r]\",f=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\\\s\"'>=/]+)(${d}*=${d}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),p=/'/g,g=/\"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),b=y(2),w=Symbol.for(\"lit-noChange\"),T=Symbol.for(\"lit-nothing\"),A=new WeakMap,E=r.createTreeWalker(r,129);function C(t,i){if(!Array.isArray(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==s?s.createHTML(i):i}const P=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?\"\":\"\",c=f;for(let i=0;i\"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'\"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===f?s+n:d>=0?(o.push(a),s.slice(0,d)+e+s.slice(d)+h+x):s+h+(-2===d?i:x)}return[C(t,l+(t[s]||\"\")+(2===i?\"\":\"\")),o]};class V{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=P(t,s);if(this.el=V.createElement(f,n),E.currentNode=this.el.content,2===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=E.nextNode())&&d.length0){r.textContent=i?i.emptyScript:\"\";for(let i=0;i2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=T}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=N(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==w,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new M(i.insertBefore(l(),t),t,void 0,s??{})}return h._$AI(t),h};export{z as _$LH,x as html,w as noChange,T as nothing,j as render,b as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as i}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class s extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return i}}s._$litElement$=!0,s[(\"finalized\",\"finalized\")]=!0,globalThis.litElementHydrateSupport?.({LitElement:s});const r=globalThis.litElementPolyfillSupport;r?.({LitElement:s});const o={_$AK:(t,e,i)=>{t._$AK(e,i)},_$AL:t=>t._$AL};(globalThis.litElementVersions??=[]).push(\"4.0.4\");export{s as LitElement,o as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","import themeCSS from './theme.scss?inline';\nimport animationsCSS from './animations.scss?inline';\nimport { unsafeCSS } from 'lit';\n\nexport const theme = unsafeCSS(themeCSS);\nexport const animations = unsafeCSS(animationsCSS);\n","'use strict';\nmodule.exports = balanced;\nfunction balanced(a, b, str) {\n if (a instanceof RegExp) a = maybeMatch(a, str);\n if (b instanceof RegExp) b = maybeMatch(b, str);\n\n var r = range(a, b, str);\n\n return r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + a.length, r[1]),\n post: str.slice(r[1] + b.length)\n };\n}\n\nfunction maybeMatch(reg, str) {\n var m = str.match(reg);\n return m ? m[0] : null;\n}\n\nbalanced.range = range;\nfunction range(a, b, str) {\n var begs, beg, left, right, result;\n var ai = str.indexOf(a);\n var bi = str.indexOf(b, ai + 1);\n var i = ai;\n\n if (ai >= 0 && bi > 0) {\n if(a===b) {\n return [ai, bi];\n }\n begs = [];\n left = str.length;\n\n while (i >= 0 && !result) {\n if (i == ai) {\n begs.push(i);\n ai = str.indexOf(a, i + 1);\n } else if (begs.length == 1) {\n result = [ begs.pop(), bi ];\n } else {\n beg = begs.pop();\n if (beg < left) {\n left = beg;\n right = bi;\n }\n\n bi = str.indexOf(b, i + 1);\n }\n\n i = ai < bi && ai >= 0 ? ai : bi;\n }\n\n if (begs.length) {\n result = [ left, right ];\n }\n }\n\n return result;\n}\n","var balanced = require('balanced-match');\n\nmodule.exports = expandTop;\n\nvar escSlash = '\\0SLASH'+Math.random()+'\\0';\nvar escOpen = '\\0OPEN'+Math.random()+'\\0';\nvar escClose = '\\0CLOSE'+Math.random()+'\\0';\nvar escComma = '\\0COMMA'+Math.random()+'\\0';\nvar escPeriod = '\\0PERIOD'+Math.random()+'\\0';\n\nfunction numeric(str) {\n return parseInt(str, 10) == str\n ? parseInt(str, 10)\n : str.charCodeAt(0);\n}\n\nfunction escapeBraces(str) {\n return str.split('\\\\\\\\').join(escSlash)\n .split('\\\\{').join(escOpen)\n .split('\\\\}').join(escClose)\n .split('\\\\,').join(escComma)\n .split('\\\\.').join(escPeriod);\n}\n\nfunction unescapeBraces(str) {\n return str.split(escSlash).join('\\\\')\n .split(escOpen).join('{')\n .split(escClose).join('}')\n .split(escComma).join(',')\n .split(escPeriod).join('.');\n}\n\n\n// Basically just str.split(\",\"), but handling cases\n// where we have nested braced sections, which should be\n// treated as individual members, like {a,{b,c},d}\nfunction parseCommaParts(str) {\n if (!str)\n return [''];\n\n var parts = [];\n var m = balanced('{', '}', str);\n\n if (!m)\n return str.split(',');\n\n var pre = m.pre;\n var body = m.body;\n var post = m.post;\n var p = pre.split(',');\n\n p[p.length-1] += '{' + body + '}';\n var postParts = parseCommaParts(post);\n if (post.length) {\n p[p.length-1] += postParts.shift();\n p.push.apply(p, postParts);\n }\n\n parts.push.apply(parts, p);\n\n return parts;\n}\n\nfunction expandTop(str) {\n if (!str)\n return [];\n\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.substr(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.substr(2);\n }\n\n return expand(escapeBraces(str), true).map(unescapeBraces);\n}\n\nfunction embrace(str) {\n return '{' + str + '}';\n}\nfunction isPadded(el) {\n return /^-?0\\d/.test(el);\n}\n\nfunction lte(i, y) {\n return i <= y;\n}\nfunction gte(i, y) {\n return i >= y;\n}\n\nfunction expand(str, isTop) {\n var expansions = [];\n\n var m = balanced('{', '}', str);\n if (!m) return [str];\n\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n var pre = m.pre;\n var post = m.post.length\n ? expand(m.post, false)\n : [''];\n\n if (/\\$$/.test(m.pre)) { \n for (var k = 0; k < post.length; k++) {\n var expansion = pre+ '{' + m.body + '}' + post[k];\n expansions.push(expansion);\n }\n } else {\n var isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body);\n var isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(m.body);\n var isSequence = isNumericSequence || isAlphaSequence;\n var isOptions = m.body.indexOf(',') >= 0;\n if (!isSequence && !isOptions) {\n // {a},b}\n if (m.post.match(/,.*\\}/)) {\n str = m.pre + '{' + m.body + escClose + m.post;\n return expand(str);\n }\n return [str];\n }\n\n var n;\n if (isSequence) {\n n = m.body.split(/\\.\\./);\n } else {\n n = parseCommaParts(m.body);\n if (n.length === 1) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand(n[0], false).map(embrace);\n if (n.length === 1) {\n return post.map(function(p) {\n return m.pre + n[0] + p;\n });\n }\n }\n }\n\n // at this point, n is the parts, and we know it's not a comma set\n // with a single entry.\n var N;\n\n if (isSequence) {\n var x = numeric(n[0]);\n var y = numeric(n[1]);\n var width = Math.max(n[0].length, n[1].length)\n var incr = n.length == 3\n ? Math.abs(numeric(n[2]))\n : 1;\n var test = lte;\n var reverse = y < x;\n if (reverse) {\n incr *= -1;\n test = gte;\n }\n var pad = n.some(isPadded);\n\n N = [];\n\n for (var i = x; test(i, y); i += incr) {\n var c;\n if (isAlphaSequence) {\n c = String.fromCharCode(i);\n if (c === '\\\\')\n c = '';\n } else {\n c = String(i);\n if (pad) {\n var need = width - c.length;\n if (need > 0) {\n var z = new Array(need + 1).join('0');\n if (i < 0)\n c = '-' + z + c.slice(1);\n else\n c = z + c;\n }\n }\n }\n N.push(c);\n }\n } else {\n N = [];\n\n for (var j = 0; j < n.length; j++) {\n N.push.apply(N, expand(n[j], false));\n }\n }\n\n for (var j = 0; j < N.length; j++) {\n for (var k = 0; k < post.length; k++) {\n var expansion = pre + N[j] + post[k];\n if (!isTop || isSequence || expansion)\n expansions.push(expansion);\n }\n }\n }\n\n return expansions;\n}\n\n","const MAX_PATTERN_LENGTH = 1024 * 64;\nexport const assertValidPattern = (pattern) => {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern');\n }\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long');\n }\n};\n//# sourceMappingURL=assert-valid-pattern.js.map","// translate the various posix character classes into unicode properties\n// this works across all unicode locales\n// { : [, /u flag required, negated]\nconst posixClasses = {\n '[:alnum:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}', true],\n '[:alpha:]': ['\\\\p{L}\\\\p{Nl}', true],\n '[:ascii:]': ['\\\\x' + '00-\\\\x' + '7f', false],\n '[:blank:]': ['\\\\p{Zs}\\\\t', true],\n '[:cntrl:]': ['\\\\p{Cc}', true],\n '[:digit:]': ['\\\\p{Nd}', true],\n '[:graph:]': ['\\\\p{Z}\\\\p{C}', true, true],\n '[:lower:]': ['\\\\p{Ll}', true],\n '[:print:]': ['\\\\p{C}', true],\n '[:punct:]': ['\\\\p{P}', true],\n '[:space:]': ['\\\\p{Z}\\\\t\\\\r\\\\n\\\\v\\\\f', true],\n '[:upper:]': ['\\\\p{Lu}', true],\n '[:word:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}\\\\p{Pc}', true],\n '[:xdigit:]': ['A-Fa-f0-9', false],\n};\n// only need to escape a few things inside of brace expressions\n// escapes: [ \\ ] -\nconst braceEscape = (s) => s.replace(/[[\\]\\\\-]/g, '\\\\$&');\n// escape all regexp magic characters\nconst regexpEscape = (s) => s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n// everything has already been escaped, we just have to join\nconst rangesToString = (ranges) => ranges.join('');\n// takes a glob string at a posix brace expression, and returns\n// an equivalent regular expression source, and boolean indicating\n// whether the /u flag needs to be applied, and the number of chars\n// consumed to parse the character class.\n// This also removes out of order ranges, and returns ($.) if the\n// entire class just no good.\nexport const parseClass = (glob, position) => {\n const pos = position;\n /* c8 ignore start */\n if (glob.charAt(pos) !== '[') {\n throw new Error('not in a brace expression');\n }\n /* c8 ignore stop */\n const ranges = [];\n const negs = [];\n let i = pos + 1;\n let sawStart = false;\n let uflag = false;\n let escaping = false;\n let negate = false;\n let endPos = pos;\n let rangeStart = '';\n WHILE: while (i < glob.length) {\n const c = glob.charAt(i);\n if ((c === '!' || c === '^') && i === pos + 1) {\n negate = true;\n i++;\n continue;\n }\n if (c === ']' && sawStart && !escaping) {\n endPos = i + 1;\n break;\n }\n sawStart = true;\n if (c === '\\\\') {\n if (!escaping) {\n escaping = true;\n i++;\n continue;\n }\n // escaped \\ char, fall through and treat like normal char\n }\n if (c === '[' && !escaping) {\n // either a posix class, a collation equivalent, or just a [\n for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {\n if (glob.startsWith(cls, i)) {\n // invalid, [a-[] is fine, but not [a-[:alpha]]\n if (rangeStart) {\n return ['$.', false, glob.length - pos, true];\n }\n i += cls.length;\n if (neg)\n negs.push(unip);\n else\n ranges.push(unip);\n uflag = uflag || u;\n continue WHILE;\n }\n }\n }\n // now it's just a normal character, effectively\n escaping = false;\n if (rangeStart) {\n // throw this range away if it's not valid, but others\n // can still match.\n if (c > rangeStart) {\n ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c));\n }\n else if (c === rangeStart) {\n ranges.push(braceEscape(c));\n }\n rangeStart = '';\n i++;\n continue;\n }\n // now might be the start of a range.\n // can be either c-d or c-] or c] or c] at this point\n if (glob.startsWith('-]', i + 1)) {\n ranges.push(braceEscape(c + '-'));\n i += 2;\n continue;\n }\n if (glob.startsWith('-', i + 1)) {\n rangeStart = c;\n i += 2;\n continue;\n }\n // not the start of a range, just a single character\n ranges.push(braceEscape(c));\n i++;\n }\n if (endPos < i) {\n // didn't see the end of the class, not a valid class,\n // but might still be valid as a literal match.\n return ['', false, 0, false];\n }\n // if we got no ranges and no negates, then we have a range that\n // cannot possibly match anything, and that poisons the whole glob\n if (!ranges.length && !negs.length) {\n return ['$.', false, glob.length - pos, true];\n }\n // if we got one positive range, and it's a single character, then that's\n // not actually a magic pattern, it's just that one literal character.\n // we should not treat that as \"magic\", we should just return the literal\n // character. [_] is a perfectly valid way to escape glob magic chars.\n if (negs.length === 0 &&\n ranges.length === 1 &&\n /^\\\\?.$/.test(ranges[0]) &&\n !negate) {\n const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];\n return [regexpEscape(r), false, endPos - pos, false];\n }\n const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']';\n const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']';\n const comb = ranges.length && negs.length\n ? '(' + sranges + '|' + snegs + ')'\n : ranges.length\n ? sranges\n : snegs;\n return [comb, uflag, endPos - pos, true];\n};\n//# sourceMappingURL=brace-expressions.js.map","/**\n * Un-escape a string that has been escaped with {@link escape}.\n *\n * If the {@link windowsPathsNoEscape} option is used, then square-brace\n * escapes are removed, but not backslash escapes. For example, it will turn\n * the string `'[*]'` into `*`, but it will not turn `'\\\\*'` into `'*'`,\n * becuase `\\` is a path separator in `windowsPathsNoEscape` mode.\n *\n * When `windowsPathsNoEscape` is not set, then both brace escapes and\n * backslash escapes are removed.\n *\n * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped\n * or unescaped.\n */\nexport const unescape = (s, { windowsPathsNoEscape = false, } = {}) => {\n return windowsPathsNoEscape\n ? s.replace(/\\[([^\\/\\\\])\\]/g, '$1')\n : s.replace(/((?!\\\\).|^)\\[([^\\/\\\\])\\]/g, '$1$2').replace(/\\\\([^\\/])/g, '$1');\n};\n//# sourceMappingURL=unescape.js.map","// parse a single path portion\nimport { parseClass } from './brace-expressions.js';\nimport { unescape } from './unescape.js';\nconst types = new Set(['!', '?', '+', '*', '@']);\nconst isExtglobType = (c) => types.has(c);\n// Patterns that get prepended to bind to the start of either the\n// entire string, or just a single path portion, to prevent dots\n// and/or traversal patterns, when needed.\n// Exts don't need the ^ or / bit, because the root binds that already.\nconst startNoTraversal = '(?!(?:^|/)\\\\.\\\\.?(?:$|/))';\nconst startNoDot = '(?!\\\\.)';\n// characters that indicate a start of pattern needs the \"no dots\" bit,\n// because a dot *might* be matched. ( is not in the list, because in\n// the case of a child extglob, it will handle the prevention itself.\nconst addPatternStart = new Set(['[', '.']);\n// cases where traversal is A-OK, no dot prevention needed\nconst justDots = new Set(['..', '.']);\nconst reSpecials = new Set('().*{}+?[]^$\\\\!');\nconst regExpEscape = (s) => s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n// any single thing other than /\nconst qmark = '[^/]';\n// * => any number of characters\nconst star = qmark + '*?';\n// use + when we need to ensure that *something* matches, because the * is\n// the only thing in the path portion.\nconst starNoEmpty = qmark + '+?';\n// remove the \\ chars that we added if we end up doing a nonmagic compare\n// const deslash = (s: string) => s.replace(/\\\\(.)/g, '$1')\nexport class AST {\n type;\n #root;\n #hasMagic;\n #uflag = false;\n #parts = [];\n #parent;\n #parentIndex;\n #negs;\n #filledNegs = false;\n #options;\n #toString;\n // set to true if it's an extglob with no children\n // (which really means one child of '')\n #emptyExt = false;\n constructor(type, parent, options = {}) {\n this.type = type;\n // extglobs are inherently magical\n if (type)\n this.#hasMagic = true;\n this.#parent = parent;\n this.#root = this.#parent ? this.#parent.#root : this;\n this.#options = this.#root === this ? options : this.#root.#options;\n this.#negs = this.#root === this ? [] : this.#root.#negs;\n if (type === '!' && !this.#root.#filledNegs)\n this.#negs.push(this);\n this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;\n }\n get hasMagic() {\n /* c8 ignore start */\n if (this.#hasMagic !== undefined)\n return this.#hasMagic;\n /* c8 ignore stop */\n for (const p of this.#parts) {\n if (typeof p === 'string')\n continue;\n if (p.type || p.hasMagic)\n return (this.#hasMagic = true);\n }\n // note: will be undefined until we generate the regexp src and find out\n return this.#hasMagic;\n }\n // reconstructs the pattern\n toString() {\n if (this.#toString !== undefined)\n return this.#toString;\n if (!this.type) {\n return (this.#toString = this.#parts.map(p => String(p)).join(''));\n }\n else {\n return (this.#toString =\n this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')');\n }\n }\n #fillNegs() {\n /* c8 ignore start */\n if (this !== this.#root)\n throw new Error('should only call on root');\n if (this.#filledNegs)\n return this;\n /* c8 ignore stop */\n // call toString() once to fill this out\n this.toString();\n this.#filledNegs = true;\n let n;\n while ((n = this.#negs.pop())) {\n if (n.type !== '!')\n continue;\n // walk up the tree, appending everthing that comes AFTER parentIndex\n let p = n;\n let pp = p.#parent;\n while (pp) {\n for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) {\n for (const part of n.#parts) {\n /* c8 ignore start */\n if (typeof part === 'string') {\n throw new Error('string part in extglob AST??');\n }\n /* c8 ignore stop */\n part.copyIn(pp.#parts[i]);\n }\n }\n p = pp;\n pp = p.#parent;\n }\n }\n return this;\n }\n push(...parts) {\n for (const p of parts) {\n if (p === '')\n continue;\n /* c8 ignore start */\n if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) {\n throw new Error('invalid part: ' + p);\n }\n /* c8 ignore stop */\n this.#parts.push(p);\n }\n }\n toJSON() {\n const ret = this.type === null\n ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))\n : [this.type, ...this.#parts.map(p => p.toJSON())];\n if (this.isStart() && !this.type)\n ret.unshift([]);\n if (this.isEnd() &&\n (this === this.#root ||\n (this.#root.#filledNegs && this.#parent?.type === '!'))) {\n ret.push({});\n }\n return ret;\n }\n isStart() {\n if (this.#root === this)\n return true;\n // if (this.type) return !!this.#parent?.isStart()\n if (!this.#parent?.isStart())\n return false;\n if (this.#parentIndex === 0)\n return true;\n // if everything AHEAD of this is a negation, then it's still the \"start\"\n const p = this.#parent;\n for (let i = 0; i < this.#parentIndex; i++) {\n const pp = p.#parts[i];\n if (!(pp instanceof AST && pp.type === '!')) {\n return false;\n }\n }\n return true;\n }\n isEnd() {\n if (this.#root === this)\n return true;\n if (this.#parent?.type === '!')\n return true;\n if (!this.#parent?.isEnd())\n return false;\n if (!this.type)\n return this.#parent?.isEnd();\n // if not root, it'll always have a parent\n /* c8 ignore start */\n const pl = this.#parent ? this.#parent.#parts.length : 0;\n /* c8 ignore stop */\n return this.#parentIndex === pl - 1;\n }\n copyIn(part) {\n if (typeof part === 'string')\n this.push(part);\n else\n this.push(part.clone(this));\n }\n clone(parent) {\n const c = new AST(this.type, parent);\n for (const p of this.#parts) {\n c.copyIn(p);\n }\n return c;\n }\n static #parseAST(str, ast, pos, opt) {\n let escaping = false;\n let inBrace = false;\n let braceStart = -1;\n let braceNeg = false;\n if (ast.type === null) {\n // outside of a extglob, append until we find a start\n let i = pos;\n let acc = '';\n while (i < str.length) {\n const c = str.charAt(i++);\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping;\n acc += c;\n continue;\n }\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true;\n }\n }\n else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false;\n }\n acc += c;\n continue;\n }\n else if (c === '[') {\n inBrace = true;\n braceStart = i;\n braceNeg = false;\n acc += c;\n continue;\n }\n if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {\n ast.push(acc);\n acc = '';\n const ext = new AST(c, ast);\n i = AST.#parseAST(str, ext, i, opt);\n ast.push(ext);\n continue;\n }\n acc += c;\n }\n ast.push(acc);\n return i;\n }\n // some kind of extglob, pos is at the (\n // find the next | or )\n let i = pos + 1;\n let part = new AST(null, ast);\n const parts = [];\n let acc = '';\n while (i < str.length) {\n const c = str.charAt(i++);\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping;\n acc += c;\n continue;\n }\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true;\n }\n }\n else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false;\n }\n acc += c;\n continue;\n }\n else if (c === '[') {\n inBrace = true;\n braceStart = i;\n braceNeg = false;\n acc += c;\n continue;\n }\n if (isExtglobType(c) && str.charAt(i) === '(') {\n part.push(acc);\n acc = '';\n const ext = new AST(c, part);\n part.push(ext);\n i = AST.#parseAST(str, ext, i, opt);\n continue;\n }\n if (c === '|') {\n part.push(acc);\n acc = '';\n parts.push(part);\n part = new AST(null, ast);\n continue;\n }\n if (c === ')') {\n if (acc === '' && ast.#parts.length === 0) {\n ast.#emptyExt = true;\n }\n part.push(acc);\n acc = '';\n ast.push(...parts, part);\n return i;\n }\n acc += c;\n }\n // unfinished extglob\n // if we got here, it was a malformed extglob! not an extglob, but\n // maybe something else in there.\n ast.type = null;\n ast.#hasMagic = undefined;\n ast.#parts = [str.substring(pos - 1)];\n return i;\n }\n static fromGlob(pattern, options = {}) {\n const ast = new AST(null, undefined, options);\n AST.#parseAST(pattern, ast, 0, options);\n return ast;\n }\n // returns the regular expression if there's magic, or the unescaped\n // string if not.\n toMMPattern() {\n // should only be called on root\n /* c8 ignore start */\n if (this !== this.#root)\n return this.#root.toMMPattern();\n /* c8 ignore stop */\n const glob = this.toString();\n const [re, body, hasMagic, uflag] = this.toRegExpSource();\n // if we're in nocase mode, and not nocaseMagicOnly, then we do\n // still need a regular expression if we have to case-insensitively\n // match capital/lowercase characters.\n const anyMagic = hasMagic ||\n this.#hasMagic ||\n (this.#options.nocase &&\n !this.#options.nocaseMagicOnly &&\n glob.toUpperCase() !== glob.toLowerCase());\n if (!anyMagic) {\n return body;\n }\n const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '');\n return Object.assign(new RegExp(`^${re}$`, flags), {\n _src: re,\n _glob: glob,\n });\n }\n // returns the string match, the regexp source, whether there's magic\n // in the regexp (so a regular expression is required) and whether or\n // not the uflag is needed for the regular expression (for posix classes)\n // TODO: instead of injecting the start/end at this point, just return\n // the BODY of the regexp, along with the start/end portions suitable\n // for binding the start/end in either a joined full-path makeRe context\n // (where we bind to (^|/), or a standalone matchPart context (where\n // we bind to ^, and not /). Otherwise slashes get duped!\n //\n // In part-matching mode, the start is:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: ^(?!\\.\\.?$)\n // - if dots allowed or not possible: ^\n // - if dots possible and not allowed: ^(?!\\.)\n // end is:\n // - if not isEnd(): nothing\n // - else: $\n //\n // In full-path matching mode, we put the slash at the START of the\n // pattern, so start is:\n // - if first pattern: same as part-matching mode\n // - if not isStart(): nothing\n // - if traversal possible, but not allowed: /(?!\\.\\.?(?:$|/))\n // - if dots allowed or not possible: /\n // - if dots possible and not allowed: /(?!\\.)\n // end is:\n // - if last pattern, same as part-matching mode\n // - else nothing\n //\n // Always put the (?:$|/) on negated tails, though, because that has to be\n // there to bind the end of the negated pattern portion, and it's easier to\n // just stick it in now rather than try to inject it later in the middle of\n // the pattern.\n //\n // We can just always return the same end, and leave it up to the caller\n // to know whether it's going to be used joined or in parts.\n // And, if the start is adjusted slightly, can do the same there:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: (?:/|^)(?!\\.\\.?$)\n // - if dots allowed or not possible: (?:/|^)\n // - if dots possible and not allowed: (?:/|^)(?!\\.)\n //\n // But it's better to have a simpler binding without a conditional, for\n // performance, so probably better to return both start options.\n //\n // Then the caller just ignores the end if it's not the first pattern,\n // and the start always gets applied.\n //\n // But that's always going to be $ if it's the ending pattern, or nothing,\n // so the caller can just attach $ at the end of the pattern when building.\n //\n // So the todo is:\n // - better detect what kind of start is needed\n // - return both flavors of starting pattern\n // - attach $ at the end of the pattern when creating the actual RegExp\n //\n // Ah, but wait, no, that all only applies to the root when the first pattern\n // is not an extglob. If the first pattern IS an extglob, then we need all\n // that dot prevention biz to live in the extglob portions, because eg\n // +(*|.x*) can match .xy but not .yx.\n //\n // So, return the two flavors if it's #root and the first child is not an\n // AST, otherwise leave it to the child AST to handle it, and there,\n // use the (?:^|/) style of start binding.\n //\n // Even simplified further:\n // - Since the start for a join is eg /(?!\\.) and the start for a part\n // is ^(?!\\.), we can just prepend (?!\\.) to the pattern (either root\n // or start or whatever) and prepend ^ or / at the Regexp construction.\n toRegExpSource(allowDot) {\n const dot = allowDot ?? !!this.#options.dot;\n if (this.#root === this)\n this.#fillNegs();\n if (!this.type) {\n const noEmpty = this.isStart() && this.isEnd();\n const src = this.#parts\n .map(p => {\n const [re, _, hasMagic, uflag] = typeof p === 'string'\n ? AST.#parseGlob(p, this.#hasMagic, noEmpty)\n : p.toRegExpSource(allowDot);\n this.#hasMagic = this.#hasMagic || hasMagic;\n this.#uflag = this.#uflag || uflag;\n return re;\n })\n .join('');\n let start = '';\n if (this.isStart()) {\n if (typeof this.#parts[0] === 'string') {\n // this is the string that will match the start of the pattern,\n // so we need to protect against dots and such.\n // '.' and '..' cannot match unless the pattern is that exactly,\n // even if it starts with . or dot:true is set.\n const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]);\n if (!dotTravAllowed) {\n const aps = addPatternStart;\n // check if we have a possibility of matching . or ..,\n // and prevent that.\n const needNoTrav = \n // dots are allowed, and the pattern starts with [ or .\n (dot && aps.has(src.charAt(0))) ||\n // the pattern starts with \\., and then [ or .\n (src.startsWith('\\\\.') && aps.has(src.charAt(2))) ||\n // the pattern starts with \\.\\., and then [ or .\n (src.startsWith('\\\\.\\\\.') && aps.has(src.charAt(4)));\n // no need to prevent dots if it can't match a dot, or if a\n // sub-pattern will be preventing it anyway.\n const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));\n start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : '';\n }\n }\n }\n // append the \"end of path portion\" pattern to negation tails\n let end = '';\n if (this.isEnd() &&\n this.#root.#filledNegs &&\n this.#parent?.type === '!') {\n end = '(?:$|\\\\/)';\n }\n const final = start + src + end;\n return [\n final,\n unescape(src),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ];\n }\n // We need to calculate the body *twice* if it's a repeat pattern\n // at the start, once in nodot mode, then again in dot mode, so a\n // pattern like *(?) can match 'x.y'\n const repeated = this.type === '*' || this.type === '+';\n // some kind of extglob\n const start = this.type === '!' ? '(?:(?!(?:' : '(?:';\n let body = this.#partsToRegExp(dot);\n if (this.isStart() && this.isEnd() && !body && this.type !== '!') {\n // invalid extglob, has to at least be *something* present, if it's\n // the entire path portion.\n const s = this.toString();\n this.#parts = [s];\n this.type = null;\n this.#hasMagic = undefined;\n return [s, unescape(this.toString()), false, false];\n }\n // XXX abstract out this map method\n let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot\n ? ''\n : this.#partsToRegExp(true);\n if (bodyDotAllowed === body) {\n bodyDotAllowed = '';\n }\n if (bodyDotAllowed) {\n body = `(?:${body})(?:${bodyDotAllowed})*?`;\n }\n // an empty !() is exactly equivalent to a starNoEmpty\n let final = '';\n if (this.type === '!' && this.#emptyExt) {\n final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty;\n }\n else {\n const close = this.type === '!'\n ? // !() must match something,but !(x) can match ''\n '))' +\n (this.isStart() && !dot && !allowDot ? startNoDot : '') +\n star +\n ')'\n : this.type === '@'\n ? ')'\n : this.type === '?'\n ? ')?'\n : this.type === '+' && bodyDotAllowed\n ? ')'\n : this.type === '*' && bodyDotAllowed\n ? `)?`\n : `)${this.type}`;\n final = start + body + close;\n }\n return [\n final,\n unescape(body),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ];\n }\n #partsToRegExp(dot) {\n return this.#parts\n .map(p => {\n // extglob ASTs should only contain parent ASTs\n /* c8 ignore start */\n if (typeof p === 'string') {\n throw new Error('string type in extglob ast??');\n }\n /* c8 ignore stop */\n // can ignore hasMagic, because extglobs are already always magic\n const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot);\n this.#uflag = this.#uflag || uflag;\n return re;\n })\n .filter(p => !(this.isStart() && this.isEnd()) || !!p)\n .join('|');\n }\n static #parseGlob(glob, hasMagic, noEmpty = false) {\n let escaping = false;\n let re = '';\n let uflag = false;\n for (let i = 0; i < glob.length; i++) {\n const c = glob.charAt(i);\n if (escaping) {\n escaping = false;\n re += (reSpecials.has(c) ? '\\\\' : '') + c;\n continue;\n }\n if (c === '\\\\') {\n if (i === glob.length - 1) {\n re += '\\\\\\\\';\n }\n else {\n escaping = true;\n }\n continue;\n }\n if (c === '[') {\n const [src, needUflag, consumed, magic] = parseClass(glob, i);\n if (consumed) {\n re += src;\n uflag = uflag || needUflag;\n i += consumed - 1;\n hasMagic = hasMagic || magic;\n continue;\n }\n }\n if (c === '*') {\n if (noEmpty && glob === '*')\n re += starNoEmpty;\n else\n re += star;\n hasMagic = true;\n continue;\n }\n if (c === '?') {\n re += qmark;\n hasMagic = true;\n continue;\n }\n re += regExpEscape(c);\n }\n return [re, unescape(glob), !!hasMagic, uflag];\n }\n}\n//# sourceMappingURL=ast.js.map","/**\n * Escape all magic characters in a glob pattern.\n *\n * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}\n * option is used, then characters are escaped by wrapping in `[]`, because\n * a magic character wrapped in a character class can only be satisfied by\n * that exact character. In this mode, `\\` is _not_ escaped, because it is\n * not interpreted as a magic character, but instead as a path separator.\n */\nexport const escape = (s, { windowsPathsNoEscape = false, } = {}) => {\n // don't need to escape +@! because we escape the parens\n // that make those magic, and escaping ! as [!] isn't valid,\n // because [!]] is a valid glob class meaning not ']'.\n return windowsPathsNoEscape\n ? s.replace(/[?*()[\\]]/g, '[$&]')\n : s.replace(/[?*()[\\]\\\\]/g, '\\\\$&');\n};\n//# sourceMappingURL=escape.js.map","import expand from 'brace-expansion';\nimport { assertValidPattern } from './assert-valid-pattern.js';\nimport { AST } from './ast.js';\nimport { escape } from './escape.js';\nimport { unescape } from './unescape.js';\nexport const minimatch = (p, pattern, options = {}) => {\n assertValidPattern(pattern);\n // shortcut: comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n return false;\n }\n return new Minimatch(pattern, options).match(p);\n};\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?\\*\\[\\(]*)$/;\nconst starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext);\nconst starDotExtTestDot = (ext) => (f) => f.endsWith(ext);\nconst starDotExtTestNocase = (ext) => {\n ext = ext.toLowerCase();\n return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext);\n};\nconst starDotExtTestNocaseDot = (ext) => {\n ext = ext.toLowerCase();\n return (f) => f.toLowerCase().endsWith(ext);\n};\nconst starDotStarRE = /^\\*+\\.\\*+$/;\nconst starDotStarTest = (f) => !f.startsWith('.') && f.includes('.');\nconst starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.');\nconst dotStarRE = /^\\.\\*+$/;\nconst dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.');\nconst starRE = /^\\*+$/;\nconst starTest = (f) => f.length !== 0 && !f.startsWith('.');\nconst starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..';\nconst qmarksRE = /^\\?+([^+@!?\\*\\[\\(]*)?$/;\nconst qmarksTestNocase = ([$0, ext = '']) => {\n const noext = qmarksTestNoExt([$0]);\n if (!ext)\n return noext;\n ext = ext.toLowerCase();\n return (f) => noext(f) && f.toLowerCase().endsWith(ext);\n};\nconst qmarksTestNocaseDot = ([$0, ext = '']) => {\n const noext = qmarksTestNoExtDot([$0]);\n if (!ext)\n return noext;\n ext = ext.toLowerCase();\n return (f) => noext(f) && f.toLowerCase().endsWith(ext);\n};\nconst qmarksTestDot = ([$0, ext = '']) => {\n const noext = qmarksTestNoExtDot([$0]);\n return !ext ? noext : (f) => noext(f) && f.endsWith(ext);\n};\nconst qmarksTest = ([$0, ext = '']) => {\n const noext = qmarksTestNoExt([$0]);\n return !ext ? noext : (f) => noext(f) && f.endsWith(ext);\n};\nconst qmarksTestNoExt = ([$0]) => {\n const len = $0.length;\n return (f) => f.length === len && !f.startsWith('.');\n};\nconst qmarksTestNoExtDot = ([$0]) => {\n const len = $0.length;\n return (f) => f.length === len && f !== '.' && f !== '..';\n};\n/* c8 ignore start */\nconst defaultPlatform = (typeof process === 'object' && process\n ? (typeof process.env === 'object' &&\n process.env &&\n process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n process.platform\n : 'posix');\nconst path = {\n win32: { sep: '\\\\' },\n posix: { sep: '/' },\n};\n/* c8 ignore stop */\nexport const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep;\nminimatch.sep = sep;\nexport const GLOBSTAR = Symbol('globstar **');\nminimatch.GLOBSTAR = GLOBSTAR;\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]';\n// * => any number of characters\nconst star = qmark + '*?';\n// ** when dots are allowed. Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?';\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?';\nexport const filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);\nminimatch.filter = filter;\nconst ext = (a, b = {}) => Object.assign({}, a, b);\nexport const defaults = (def) => {\n if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n return minimatch;\n }\n const orig = minimatch;\n const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));\n return Object.assign(m, {\n Minimatch: class Minimatch extends orig.Minimatch {\n constructor(pattern, options = {}) {\n super(pattern, ext(def, options));\n }\n static defaults(options) {\n return orig.defaults(ext(def, options)).Minimatch;\n }\n },\n AST: class AST extends orig.AST {\n /* c8 ignore start */\n constructor(type, parent, options = {}) {\n super(type, parent, ext(def, options));\n }\n /* c8 ignore stop */\n static fromGlob(pattern, options = {}) {\n return orig.AST.fromGlob(pattern, ext(def, options));\n }\n },\n unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),\n escape: (s, options = {}) => orig.escape(s, ext(def, options)),\n filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),\n defaults: (options) => orig.defaults(ext(def, options)),\n makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),\n braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),\n match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),\n sep: orig.sep,\n GLOBSTAR: GLOBSTAR,\n });\n};\nminimatch.defaults = defaults;\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nexport const braceExpand = (pattern, options = {}) => {\n assertValidPattern(pattern);\n // Thanks to Yeting Li for\n // improving this regexp to avoid a ReDOS vulnerability.\n if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n // shortcut. no need to expand.\n return [pattern];\n }\n return expand(pattern);\n};\nminimatch.braceExpand = braceExpand;\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion. Otherwise, any series\n// of * is equivalent to a single *. Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\nexport const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();\nminimatch.makeRe = makeRe;\nexport const match = (list, pattern, options = {}) => {\n const mm = new Minimatch(pattern, options);\n list = list.filter(f => mm.match(f));\n if (mm.options.nonull && !list.length) {\n list.push(pattern);\n }\n return list;\n};\nminimatch.match = match;\n// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/;\nconst regExpEscape = (s) => s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\nexport class Minimatch {\n options;\n set;\n pattern;\n windowsPathsNoEscape;\n nonegate;\n negate;\n comment;\n empty;\n preserveMultipleSlashes;\n partial;\n globSet;\n globParts;\n nocase;\n isWindows;\n platform;\n windowsNoMagicRoot;\n regexp;\n constructor(pattern, options = {}) {\n assertValidPattern(pattern);\n options = options || {};\n this.options = options;\n this.pattern = pattern;\n this.platform = options.platform || defaultPlatform;\n this.isWindows = this.platform === 'win32';\n this.windowsPathsNoEscape =\n !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;\n if (this.windowsPathsNoEscape) {\n this.pattern = this.pattern.replace(/\\\\/g, '/');\n }\n this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;\n this.regexp = null;\n this.negate = false;\n this.nonegate = !!options.nonegate;\n this.comment = false;\n this.empty = false;\n this.partial = !!options.partial;\n this.nocase = !!this.options.nocase;\n this.windowsNoMagicRoot =\n options.windowsNoMagicRoot !== undefined\n ? options.windowsNoMagicRoot\n : !!(this.isWindows && this.nocase);\n this.globSet = [];\n this.globParts = [];\n this.set = [];\n // make the set of regexps etc.\n this.make();\n }\n hasMagic() {\n if (this.options.magicalBraces && this.set.length > 1) {\n return true;\n }\n for (const pattern of this.set) {\n for (const part of pattern) {\n if (typeof part !== 'string')\n return true;\n }\n }\n return false;\n }\n debug(..._) { }\n make() {\n const pattern = this.pattern;\n const options = this.options;\n // empty patterns and comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n this.comment = true;\n return;\n }\n if (!pattern) {\n this.empty = true;\n return;\n }\n // step 1: figure out negation, etc.\n this.parseNegate();\n // step 2: expand braces\n this.globSet = [...new Set(this.braceExpand())];\n if (options.debug) {\n this.debug = (...args) => console.error(...args);\n }\n this.debug(this.pattern, this.globSet);\n // step 3: now we have a set, so turn each one into a series of\n // path-portion matching patterns.\n // These will be regexps, except in the case of \"**\", which is\n // set to the GLOBSTAR object for globstar behavior,\n // and will not contain any / characters\n //\n // First, we preprocess to make the glob pattern sets a bit simpler\n // and deduped. There are some perf-killing patterns that can cause\n // problems with a glob walk, but we can simplify them down a bit.\n const rawGlobParts = this.globSet.map(s => this.slashSplit(s));\n this.globParts = this.preprocess(rawGlobParts);\n this.debug(this.pattern, this.globParts);\n // glob --> regexps\n let set = this.globParts.map((s, _, __) => {\n if (this.isWindows && this.windowsNoMagicRoot) {\n // check if it's a drive or unc path.\n const isUNC = s[0] === '' &&\n s[1] === '' &&\n (s[2] === '?' || !globMagic.test(s[2])) &&\n !globMagic.test(s[3]);\n const isDrive = /^[a-z]:/i.test(s[0]);\n if (isUNC) {\n return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))];\n }\n else if (isDrive) {\n return [s[0], ...s.slice(1).map(ss => this.parse(ss))];\n }\n }\n return s.map(ss => this.parse(ss));\n });\n this.debug(this.pattern, set);\n // filter out everything that didn't compile properly.\n this.set = set.filter(s => s.indexOf(false) === -1);\n // do not treat the ? in UNC paths as magic\n if (this.isWindows) {\n for (let i = 0; i < this.set.length; i++) {\n const p = this.set[i];\n if (p[0] === '' &&\n p[1] === '' &&\n this.globParts[i][2] === '?' &&\n typeof p[3] === 'string' &&\n /^[a-z]:$/i.test(p[3])) {\n p[2] = '?';\n }\n }\n }\n this.debug(this.pattern, this.set);\n }\n // various transforms to equivalent pattern sets that are\n // faster to process in a filesystem walk. The goal is to\n // eliminate what we can, and push all ** patterns as far\n // to the right as possible, even if it increases the number\n // of patterns that we have to process.\n preprocess(globParts) {\n // if we're not in globstar mode, then turn all ** into *\n if (this.options.noglobstar) {\n for (let i = 0; i < globParts.length; i++) {\n for (let j = 0; j < globParts[i].length; j++) {\n if (globParts[i][j] === '**') {\n globParts[i][j] = '*';\n }\n }\n }\n }\n const { optimizationLevel = 1 } = this.options;\n if (optimizationLevel >= 2) {\n // aggressive optimization for the purpose of fs walking\n globParts = this.firstPhasePreProcess(globParts);\n globParts = this.secondPhasePreProcess(globParts);\n }\n else if (optimizationLevel >= 1) {\n // just basic optimizations to remove some .. parts\n globParts = this.levelOneOptimize(globParts);\n }\n else {\n globParts = this.adjascentGlobstarOptimize(globParts);\n }\n return globParts;\n }\n // just get rid of adjascent ** portions\n adjascentGlobstarOptimize(globParts) {\n return globParts.map(parts => {\n let gs = -1;\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let i = gs;\n while (parts[i + 1] === '**') {\n i++;\n }\n if (i !== gs) {\n parts.splice(gs, i - gs);\n }\n }\n return parts;\n });\n }\n // get rid of adjascent ** and resolve .. portions\n levelOneOptimize(globParts) {\n return globParts.map(parts => {\n parts = parts.reduce((set, part) => {\n const prev = set[set.length - 1];\n if (part === '**' && prev === '**') {\n return set;\n }\n if (part === '..') {\n if (prev && prev !== '..' && prev !== '.' && prev !== '**') {\n set.pop();\n return set;\n }\n }\n set.push(part);\n return set;\n }, []);\n return parts.length === 0 ? [''] : parts;\n });\n }\n levelTwoFileOptimize(parts) {\n if (!Array.isArray(parts)) {\n parts = this.slashSplit(parts);\n }\n let didSomething = false;\n do {\n didSomething = false;\n //
// -> 
/\n            if (!this.preserveMultipleSlashes) {\n                for (let i = 1; i < parts.length - 1; i++) {\n                    const p = parts[i];\n                    // don't squeeze out UNC patterns\n                    if (i === 1 && p === '' && parts[0] === '')\n                        continue;\n                    if (p === '.' || p === '') {\n                        didSomething = true;\n                        parts.splice(i, 1);\n                        i--;\n                    }\n                }\n                if (parts[0] === '.' &&\n                    parts.length === 2 &&\n                    (parts[1] === '.' || parts[1] === '')) {\n                    didSomething = true;\n                    parts.pop();\n                }\n            }\n            // 
/

/../ ->

/\n            let dd = 0;\n            while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n                const p = parts[dd - 1];\n                if (p && p !== '.' && p !== '..' && p !== '**') {\n                    didSomething = true;\n                    parts.splice(dd - 1, 2);\n                    dd -= 2;\n                }\n            }\n        } while (didSomething);\n        return parts.length === 0 ? [''] : parts;\n    }\n    // First phase: single-pattern processing\n    // 
 is 1 or more portions\n    //  is 1 or more portions\n    // 

is any portion other than ., .., '', or **\n // is . or ''\n //\n // **/.. is *brutal* for filesystem walking performance, because\n // it effectively resets the recursive walk each time it occurs,\n // and ** cannot be reduced out by a .. pattern part like a regexp\n // or most strings (other than .., ., and '') can be.\n //\n //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n //

// -> 
/\n    // 
/

/../ ->

/\n    // **/**/ -> **/\n    //\n    // **/*/ -> */**/ <== not valid because ** doesn't follow\n    // this WOULD be allowed if ** did follow symlinks, or * didn't\n    firstPhasePreProcess(globParts) {\n        let didSomething = false;\n        do {\n            didSomething = false;\n            // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n for (let parts of globParts) {\n let gs = -1;\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss = gs;\n while (parts[gss + 1] === '**') {\n //

/**/**/ -> 
/**/\n                        gss++;\n                    }\n                    // eg, if gs is 2 and gss is 4, that means we have 3 **\n                    // parts, and can remove 2 of them.\n                    if (gss > gs) {\n                        parts.splice(gs + 1, gss - gs);\n                    }\n                    let next = parts[gs + 1];\n                    const p = parts[gs + 2];\n                    const p2 = parts[gs + 3];\n                    if (next !== '..')\n                        continue;\n                    if (!p ||\n                        p === '.' ||\n                        p === '..' ||\n                        !p2 ||\n                        p2 === '.' ||\n                        p2 === '..') {\n                        continue;\n                    }\n                    didSomething = true;\n                    // edit parts in place, and push the new one\n                    parts.splice(gs, 1);\n                    const other = parts.slice(0);\n                    other[gs] = '**';\n                    globParts.push(other);\n                    gs--;\n                }\n                // 
// -> 
/\n                if (!this.preserveMultipleSlashes) {\n                    for (let i = 1; i < parts.length - 1; i++) {\n                        const p = parts[i];\n                        // don't squeeze out UNC patterns\n                        if (i === 1 && p === '' && parts[0] === '')\n                            continue;\n                        if (p === '.' || p === '') {\n                            didSomething = true;\n                            parts.splice(i, 1);\n                            i--;\n                        }\n                    }\n                    if (parts[0] === '.' &&\n                        parts.length === 2 &&\n                        (parts[1] === '.' || parts[1] === '')) {\n                        didSomething = true;\n                        parts.pop();\n                    }\n                }\n                // 
/

/../ ->

/\n                let dd = 0;\n                while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n                    const p = parts[dd - 1];\n                    if (p && p !== '.' && p !== '..' && p !== '**') {\n                        didSomething = true;\n                        const needDot = dd === 1 && parts[dd + 1] === '**';\n                        const splin = needDot ? ['.'] : [];\n                        parts.splice(dd - 1, 2, ...splin);\n                        if (parts.length === 0)\n                            parts.push('');\n                        dd -= 2;\n                    }\n                }\n            }\n        } while (didSomething);\n        return globParts;\n    }\n    // second phase: multi-pattern dedupes\n    // {
/*/,
/

/} ->

/*/\n    // {
/,
/} -> 
/\n    // {
/**/,
/} -> 
/**/\n    //\n    // {
/**/,
/**/

/} ->

/**/\n    // ^-- not valid because ** doens't follow symlinks\n    secondPhasePreProcess(globParts) {\n        for (let i = 0; i < globParts.length - 1; i++) {\n            for (let j = i + 1; j < globParts.length; j++) {\n                const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);\n                if (!matched)\n                    continue;\n                globParts[i] = matched;\n                globParts[j] = [];\n            }\n        }\n        return globParts.filter(gs => gs.length);\n    }\n    partsMatch(a, b, emptyGSMatch = false) {\n        let ai = 0;\n        let bi = 0;\n        let result = [];\n        let which = '';\n        while (ai < a.length && bi < b.length) {\n            if (a[ai] === b[bi]) {\n                result.push(which === 'b' ? b[bi] : a[ai]);\n                ai++;\n                bi++;\n            }\n            else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n                result.push(a[ai]);\n                ai++;\n            }\n            else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n                result.push(b[bi]);\n                bi++;\n            }\n            else if (a[ai] === '*' &&\n                b[bi] &&\n                (this.options.dot || !b[bi].startsWith('.')) &&\n                b[bi] !== '**') {\n                if (which === 'b')\n                    return false;\n                which = 'a';\n                result.push(a[ai]);\n                ai++;\n                bi++;\n            }\n            else if (b[bi] === '*' &&\n                a[ai] &&\n                (this.options.dot || !a[ai].startsWith('.')) &&\n                a[ai] !== '**') {\n                if (which === 'a')\n                    return false;\n                which = 'b';\n                result.push(b[bi]);\n                ai++;\n                bi++;\n            }\n            else {\n                return false;\n            }\n        }\n        // if we fall out of the loop, it means they two are identical\n        // as long as their lengths match\n        return a.length === b.length && result;\n    }\n    parseNegate() {\n        if (this.nonegate)\n            return;\n        const pattern = this.pattern;\n        let negate = false;\n        let negateOffset = 0;\n        for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n            negate = !negate;\n            negateOffset++;\n        }\n        if (negateOffset)\n            this.pattern = pattern.slice(negateOffset);\n        this.negate = negate;\n    }\n    // set partial to true to test if, for example,\n    // \"/a/b\" matches the start of \"/*/b/*/d\"\n    // Partial means, if you run out of file before you run\n    // out of pattern, then that's fine, as long as all\n    // the parts match.\n    matchOne(file, pattern, partial = false) {\n        const options = this.options;\n        // UNC paths like //?/X:/... can match X:/... and vice versa\n        // Drive letters in absolute drive or unc paths are always compared\n        // case-insensitively.\n        if (this.isWindows) {\n            const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]);\n            const fileUNC = !fileDrive &&\n                file[0] === '' &&\n                file[1] === '' &&\n                file[2] === '?' &&\n                /^[a-z]:$/i.test(file[3]);\n            const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]);\n            const patternUNC = !patternDrive &&\n                pattern[0] === '' &&\n                pattern[1] === '' &&\n                pattern[2] === '?' &&\n                typeof pattern[3] === 'string' &&\n                /^[a-z]:$/i.test(pattern[3]);\n            const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined;\n            const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined;\n            if (typeof fdi === 'number' && typeof pdi === 'number') {\n                const [fd, pd] = [file[fdi], pattern[pdi]];\n                if (fd.toLowerCase() === pd.toLowerCase()) {\n                    pattern[pdi] = fd;\n                    if (pdi > fdi) {\n                        pattern = pattern.slice(pdi);\n                    }\n                    else if (fdi > pdi) {\n                        file = file.slice(fdi);\n                    }\n                }\n            }\n        }\n        // resolve and reduce . and .. portions in the file as well.\n        // dont' need to do the second phase, because it's only one string[]\n        const { optimizationLevel = 1 } = this.options;\n        if (optimizationLevel >= 2) {\n            file = this.levelTwoFileOptimize(file);\n        }\n        this.debug('matchOne', this, { file, pattern });\n        this.debug('matchOne', file.length, pattern.length);\n        for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {\n            this.debug('matchOne loop');\n            var p = pattern[pi];\n            var f = file[fi];\n            this.debug(pattern, p, f);\n            // should be impossible.\n            // some invalid regexp stuff in the set.\n            /* c8 ignore start */\n            if (p === false) {\n                return false;\n            }\n            /* c8 ignore stop */\n            if (p === GLOBSTAR) {\n                this.debug('GLOBSTAR', [pattern, p, f]);\n                // \"**\"\n                // a/**/b/**/c would match the following:\n                // a/b/x/y/z/c\n                // a/x/y/z/b/c\n                // a/b/x/b/x/c\n                // a/b/c\n                // To do this, take the rest of the pattern after\n                // the **, and see if it would match the file remainder.\n                // If so, return success.\n                // If not, the ** \"swallows\" a segment, and try again.\n                // This is recursively awful.\n                //\n                // a/**/b/**/c matching a/b/x/y/z/c\n                // - a matches a\n                // - doublestar\n                //   - matchOne(b/x/y/z/c, b/**/c)\n                //     - b matches b\n                //     - doublestar\n                //       - matchOne(x/y/z/c, c) -> no\n                //       - matchOne(y/z/c, c) -> no\n                //       - matchOne(z/c, c) -> no\n                //       - matchOne(c, c) yes, hit\n                var fr = fi;\n                var pr = pi + 1;\n                if (pr === pl) {\n                    this.debug('** at the end');\n                    // a ** at the end will just swallow the rest.\n                    // We have found a match.\n                    // however, it will not swallow /.x, unless\n                    // options.dot is set.\n                    // . and .. are *never* matched by **, for explosively\n                    // exponential reasons.\n                    for (; fi < fl; fi++) {\n                        if (file[fi] === '.' ||\n                            file[fi] === '..' ||\n                            (!options.dot && file[fi].charAt(0) === '.'))\n                            return false;\n                    }\n                    return true;\n                }\n                // ok, let's see if we can swallow whatever we can.\n                while (fr < fl) {\n                    var swallowee = file[fr];\n                    this.debug('\\nglobstar while', file, fr, pattern, pr, swallowee);\n                    // XXX remove this slice.  Just pass the start index.\n                    if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {\n                        this.debug('globstar found match!', fr, fl, swallowee);\n                        // found a match.\n                        return true;\n                    }\n                    else {\n                        // can't swallow \".\" or \"..\" ever.\n                        // can only swallow \".foo\" when explicitly asked.\n                        if (swallowee === '.' ||\n                            swallowee === '..' ||\n                            (!options.dot && swallowee.charAt(0) === '.')) {\n                            this.debug('dot detected!', file, fr, pattern, pr);\n                            break;\n                        }\n                        // ** swallows a segment, and continue.\n                        this.debug('globstar swallow a segment, and continue');\n                        fr++;\n                    }\n                }\n                // no match was found.\n                // However, in partial mode, we can't say this is necessarily over.\n                /* c8 ignore start */\n                if (partial) {\n                    // ran out of file\n                    this.debug('\\n>>> no match, partial?', file, fr, pattern, pr);\n                    if (fr === fl) {\n                        return true;\n                    }\n                }\n                /* c8 ignore stop */\n                return false;\n            }\n            // something other than **\n            // non-magic patterns just have to match exactly\n            // patterns with magic have been turned into regexps.\n            let hit;\n            if (typeof p === 'string') {\n                hit = f === p;\n                this.debug('string match', p, f, hit);\n            }\n            else {\n                hit = p.test(f);\n                this.debug('pattern match', p, f, hit);\n            }\n            if (!hit)\n                return false;\n        }\n        // Note: ending in / means that we'll get a final \"\"\n        // at the end of the pattern.  This can only match a\n        // corresponding \"\" at the end of the file.\n        // If the file ends in /, then it can only match a\n        // a pattern that ends in /, unless the pattern just\n        // doesn't have any more for it. But, a/b/ should *not*\n        // match \"a/b/*\", even though \"\" matches against the\n        // [^/]*? pattern, except in partial mode, where it might\n        // simply not be reached yet.\n        // However, a/b/ should still satisfy a/*\n        // now either we fell off the end of the pattern, or we're done.\n        if (fi === fl && pi === pl) {\n            // ran out of pattern and filename at the same time.\n            // an exact hit!\n            return true;\n        }\n        else if (fi === fl) {\n            // ran out of file, but still had pattern left.\n            // this is ok if we're doing the match as part of\n            // a glob fs traversal.\n            return partial;\n        }\n        else if (pi === pl) {\n            // ran out of pattern, still have file left.\n            // this is only acceptable if we're on the very last\n            // empty segment of a file with a trailing slash.\n            // a/* should match a/b/\n            return fi === fl - 1 && file[fi] === '';\n            /* c8 ignore start */\n        }\n        else {\n            // should be unreachable.\n            throw new Error('wtf?');\n        }\n        /* c8 ignore stop */\n    }\n    braceExpand() {\n        return braceExpand(this.pattern, this.options);\n    }\n    parse(pattern) {\n        assertValidPattern(pattern);\n        const options = this.options;\n        // shortcuts\n        if (pattern === '**')\n            return GLOBSTAR;\n        if (pattern === '')\n            return '';\n        // far and away, the most common glob pattern parts are\n        // *, *.*, and *.  Add a fast check method for those.\n        let m;\n        let fastTest = null;\n        if ((m = pattern.match(starRE))) {\n            fastTest = options.dot ? starTestDot : starTest;\n        }\n        else if ((m = pattern.match(starDotExtRE))) {\n            fastTest = (options.nocase\n                ? options.dot\n                    ? starDotExtTestNocaseDot\n                    : starDotExtTestNocase\n                : options.dot\n                    ? starDotExtTestDot\n                    : starDotExtTest)(m[1]);\n        }\n        else if ((m = pattern.match(qmarksRE))) {\n            fastTest = (options.nocase\n                ? options.dot\n                    ? qmarksTestNocaseDot\n                    : qmarksTestNocase\n                : options.dot\n                    ? qmarksTestDot\n                    : qmarksTest)(m);\n        }\n        else if ((m = pattern.match(starDotStarRE))) {\n            fastTest = options.dot ? starDotStarTestDot : starDotStarTest;\n        }\n        else if ((m = pattern.match(dotStarRE))) {\n            fastTest = dotStarTest;\n        }\n        const re = AST.fromGlob(pattern, this.options).toMMPattern();\n        return fastTest ? Object.assign(re, { test: fastTest }) : re;\n    }\n    makeRe() {\n        if (this.regexp || this.regexp === false)\n            return this.regexp;\n        // at this point, this.set is a 2d array of partial\n        // pattern strings, or \"**\".\n        //\n        // It's better to use .match().  This function shouldn't\n        // be used, really, but it's pretty convenient sometimes,\n        // when you just want to work with a regex.\n        const set = this.set;\n        if (!set.length) {\n            this.regexp = false;\n            return this.regexp;\n        }\n        const options = this.options;\n        const twoStar = options.noglobstar\n            ? star\n            : options.dot\n                ? twoStarDot\n                : twoStarNoDot;\n        const flags = new Set(options.nocase ? ['i'] : []);\n        // regexpify non-globstar patterns\n        // if ** is only item, then we just do one twoStar\n        // if ** is first, and there are more, prepend (\\/|twoStar\\/)? to next\n        // if ** is last, append (\\/twoStar|) to previous\n        // if ** is in the middle, append (\\/|\\/twoStar\\/) to previous\n        // then filter out GLOBSTAR symbols\n        let re = set\n            .map(pattern => {\n            const pp = pattern.map(p => {\n                if (p instanceof RegExp) {\n                    for (const f of p.flags.split(''))\n                        flags.add(f);\n                }\n                return typeof p === 'string'\n                    ? regExpEscape(p)\n                    : p === GLOBSTAR\n                        ? GLOBSTAR\n                        : p._src;\n            });\n            pp.forEach((p, i) => {\n                const next = pp[i + 1];\n                const prev = pp[i - 1];\n                if (p !== GLOBSTAR || prev === GLOBSTAR) {\n                    return;\n                }\n                if (prev === undefined) {\n                    if (next !== undefined && next !== GLOBSTAR) {\n                        pp[i + 1] = '(?:\\\\/|' + twoStar + '\\\\/)?' + next;\n                    }\n                    else {\n                        pp[i] = twoStar;\n                    }\n                }\n                else if (next === undefined) {\n                    pp[i - 1] = prev + '(?:\\\\/|' + twoStar + ')?';\n                }\n                else if (next !== GLOBSTAR) {\n                    pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + '\\\\/)' + next;\n                    pp[i + 1] = GLOBSTAR;\n                }\n            });\n            return pp.filter(p => p !== GLOBSTAR).join('/');\n        })\n            .join('|');\n        // need to wrap in parens if we had more than one thing with |,\n        // otherwise only the first will be anchored to ^ and the last to $\n        const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', ''];\n        // must match entire pattern\n        // ending in a * or ** will make it less strict.\n        re = '^' + open + re + close + '$';\n        // can match anything, as long as it's not this.\n        if (this.negate)\n            re = '^(?!' + re + ').+$';\n        try {\n            this.regexp = new RegExp(re, [...flags].join(''));\n            /* c8 ignore start */\n        }\n        catch (ex) {\n            // should be impossible\n            this.regexp = false;\n        }\n        /* c8 ignore stop */\n        return this.regexp;\n    }\n    slashSplit(p) {\n        // if p starts with // on windows, we preserve that\n        // so that UNC paths aren't broken.  Otherwise, any number of\n        // / characters are coalesced into one, unless\n        // preserveMultipleSlashes is set to true.\n        if (this.preserveMultipleSlashes) {\n            return p.split('/');\n        }\n        else if (this.isWindows && /^\\/\\/[^\\/]+/.test(p)) {\n            // add an extra '' for the one we lose\n            return ['', ...p.split(/\\/+/)];\n        }\n        else {\n            return p.split(/\\/+/);\n        }\n    }\n    match(f, partial = this.partial) {\n        this.debug('match', f, this.pattern);\n        // short-circuit in the case of busted things.\n        // comments, etc.\n        if (this.comment) {\n            return false;\n        }\n        if (this.empty) {\n            return f === '';\n        }\n        if (f === '/' && partial) {\n            return true;\n        }\n        const options = this.options;\n        // windows: need to use /, not \\\n        if (this.isWindows) {\n            f = f.split('\\\\').join('/');\n        }\n        // treat the test path as a set of pathparts.\n        const ff = this.slashSplit(f);\n        this.debug(this.pattern, 'split', ff);\n        // just ONE of the pattern sets in this.set needs to match\n        // in order for it to be valid.  If negating, then just one\n        // match means that we have failed.\n        // Either way, return on the first hit.\n        const set = this.set;\n        this.debug(this.pattern, 'set', set);\n        // Find the basename of the path by looking for the last non-empty segment\n        let filename = ff[ff.length - 1];\n        if (!filename) {\n            for (let i = ff.length - 2; !filename && i >= 0; i--) {\n                filename = ff[i];\n            }\n        }\n        for (let i = 0; i < set.length; i++) {\n            const pattern = set[i];\n            let file = ff;\n            if (options.matchBase && pattern.length === 1) {\n                file = [filename];\n            }\n            const hit = this.matchOne(file, pattern, partial);\n            if (hit) {\n                if (options.flipNegate) {\n                    return true;\n                }\n                return !this.negate;\n            }\n        }\n        // didn't get any hits.  this is success if it's a negative\n        // pattern, failure otherwise.\n        if (options.flipNegate) {\n            return false;\n        }\n        return this.negate;\n    }\n    static defaults(def) {\n        return minimatch.defaults(def).Minimatch;\n    }\n}\n/* c8 ignore start */\nexport { AST } from './ast.js';\nexport { escape } from './escape.js';\nexport { unescape } from './unescape.js';\n/* c8 ignore stop */\nminimatch.AST = AST;\nminimatch.Minimatch = Minimatch;\nminimatch.escape = escape;\nminimatch.unescape = unescape;\n//# sourceMappingURL=index.js.map","import { Minimatch } from 'minimatch';\n\n/**\n * Router class for managing client-side navigation in a Single Page Application (SPA).\n * This class enables the creation of a simple client-side router to handle navigation within an SPA,\n * allowing developers to define routes and associated actions.\n *\n * ## Usage:\n * 1. Import the router in your project:\n *    ```javascript\n *    import router from './path/to/Router';\n *    ```\n * 2. Define routes by using the `addRoute` method:\n *    ```javascript\n *    router.addRoute('/', 'home-component', () => {\n *      // Function to execute when navigating to the root path\n *      console.log('Navigated to the root path');\n *    }, () => {\n *      // Function to execute when navigating away from the root path\n *      console.log('Navigated away from the root path');\n *    });\n *    ```\n * 3. Integrate with an `` tag using the `href` attribute:\n *    ```html\n *    Home\n *    About\n *    ```\n *    Clicking on these links will trigger the router to navigate to the specified paths.\n * 4. Define a route outlet where the component associated with the route will be rendered :\n *    ```html\n *    \n *    ``\n * @class\n */\nclass Router extends EventTarget {\n  /**\n   * The fallback route to be used in case no matching route is found.\n   * @private\n   * @type {string|null}\n   */\n  #defaultPath = null;\n\n  /**\n   * The currently active route.\n   * @private\n   * @type {{ path: Minimatch, start: function, destroy: function }|null}\n   */\n  #currentRoute = null;\n\n  /**\n   * The query parameters associated with the current route.\n   * @private\n   * @type {object}\n   */\n  #currentQueryParams = {};\n\n  /**\n   * An array containing registered route objects with their patterns and associated actions.\n   * @private\n   * @type {Array<{ path: Minimatch, start: function, destroy: function }>}\n   */\n  #routes = [];\n\n  constructor() {\n    super();\n\n    // Event listener for the popstate event\n    window.addEventListener('popstate', () => {\n      const entries = new URL(window.location.href).searchParams.entries();\n      const queryParams = Object.fromEntries(entries);\n\n      this.#handleRouteChange(window.location.pathname, queryParams, true);\n    });\n  }\n\n  /**\n   * Adds a route to the router.\n   *\n   * @param {string} pattern - The path of the route, can be a glob pattern.\n   * @param {string} component - The component to be rendered when the route is navigated to.\n   * @param {function} start - The function to be called when the route is navigated to.\n   * @param {function} destroy - The function to be called when the route is navigated away from.\n   */\n  addRoute(pattern, component = null, start = () => {\n  }, destroy = () => {\n  }) {\n    const path = new Minimatch(pattern, { matchBase: true });\n\n    this.#routes.push({\n      path,\n      start,\n      component,\n      destroy\n    });\n  }\n\n  /**\n   * Checks if the given path is the current active route.\n   *\n   * @param {string} path - The path to check.\n   * @returns {boolean} - True if the given path is the current active route, false otherwise.\n   */\n  isActiveRoute(path) {\n    return this.#currentRoute &&\n      this.#currentRoute.path === this.findRoute(path)?.path;\n  }\n\n  /**\n   * Finds a route based on the given path.\n   *\n   * @param {string} path - The path to find the route for.\n   * @returns {object} - The route object if found, otherwise undefined.\n   */\n  findRoute(path) {\n    return this.#routes.find(r => r.path.match(path));\n  }\n\n  /**\n   * Navigates to the specified path.\n   *\n   * @param {string} path - The path to navigate to.\n   * @param {object} [queryParams={}] - (Optional) query parameters to be associated with the route.\n   */\n  navigateTo(path, queryParams = {}) {\n    const url = new URL(window.location.href);\n    const normalizedPath = '/' + path.trim().replace(/^\\/+/, '');\n\n    url.pathname = normalizedPath.startsWith(this.base)\n      ? normalizedPath\n      : this.base + normalizedPath;\n    url.search = new URLSearchParams(queryParams).toString();\n\n    window.history.pushState({}, '', url.href);\n    this.#handleRouteChange(path, queryParams);\n  }\n\n  /**\n   * Updates the state by navigating to the current path with the provided query parameters.\n   *\n   * @param {Object} queryParams - The new query parameters to be merged with the current ones.\n   */\n  updateState(queryParams, keysToRemove = []) {\n    const filteredParams = Object.fromEntries(\n      Object.entries(this.#currentQueryParams)\n        .filter(([key]) => !keysToRemove.includes(key))\n    );\n\n    this.navigateTo(\n      window.location.pathname,\n      { ...filteredParams, ...queryParams }\n    );\n  }\n\n  /**\n   * Replaces the current state by navigating to the current path with the provided query parameters,\n   * discarding the current query parameters.\n   *\n   * @param {Object} newParams - The new query parameters to replace the current ones.\n   */\n  replaceState(newParams) {\n    this.navigateTo(window.location.pathname, newParams);\n  }\n\n  /**\n   * Handles a change in the route.\n   *\n   * @private\n   * @param {string} path - The path of the new route.\n   * @param {object} [queryParams={}] - (Optional) The query parameters associated with the route.\n   * @param {boolean} [popstate=false] - (Optional) if a popstate is at the origin of this route change.\n   */\n  #handleRouteChange(path, queryParams = {}, popstate = false) {\n    if (this.isActiveRoute(path)) {\n      if (!this.#matchCurrentParams(queryParams)) {\n        this.#currentQueryParams = queryParams;\n        this.dispatchEvent(new CustomEvent('queryparams', {\n          detail: {\n            route: this.#currentRoute,\n            popstate,\n            queryParams\n          }\n        }));\n      }\n\n      return;\n    }\n\n    const route = this.findRoute(path);\n\n    if (route) {\n      this.#updateCurrentRoute(route, queryParams, popstate);\n    } else if (this.#defaultPath) {\n      this.#handleRouteChange(this.#defaultPath, queryParams, popstate);\n    } else {\n      throw Error(`No route found for '${path}'`);\n    }\n  }\n\n  /**\n   * Checks if the given query parameters match the current query parameters.\n   *\n   * @private\n   * @param {object} params - The query parameters to compare.\n   * @returns {boolean} - True if the given parameters match the current query parameters, false otherwise.\n   */\n  #matchCurrentParams(params) {\n    const paramsKeys = Object.keys(params);\n\n    if (paramsKeys.length !== Object.keys(this.#currentQueryParams).length) {\n      return false;\n    }\n\n    return paramsKeys.every(k => this.#currentQueryParams[k] === params[k]);\n  }\n\n  /**\n   * Updates the current route and dispatches the 'routechanged' event.\n   *\n   * @private\n   * @param {object} route - The route object.\n   * @param {object} queryParams - The query parameters associated with the route.\n   * @param {boolean} [popstate=false] - (Optional) if a popstate is at the origin of this route change.\n   */\n  #updateCurrentRoute(route, queryParams, popstate = false) {\n    this.#currentRoute?.destroy();\n    this.#currentRoute = route;\n    this.#currentQueryParams = queryParams;\n    route.start(queryParams);\n    this.dispatchEvent(new CustomEvent('routechanged', {\n      detail: {\n        route,\n        popstate,\n        queryParams\n      }\n    }));\n  }\n\n  /**\n   * Initiates the router based on the current window location.\n   *\n   * @param defaultPath - The fallback path when no path is found during route resolving.\n   */\n  start({ defaultPath }) {\n    const url = new URL(window.location.href);\n    const path = url.pathname;\n    const queryParams = Object.fromEntries(url.searchParams.entries());\n\n    this.#defaultPath = defaultPath;\n    this.base = this.findRoute(path)\n      ? path.replace(/\\/[^/]+\\/?$/, '/')\n      : path;\n\n    this.base = this.base.replace(/\\/+$/, '');\n\n    this.#handleRouteChange(path, queryParams);\n  }\n\n  get queryParams() {\n    return this.#currentQueryParams;\n  }\n\n  get currentRoute() {\n    return this.#currentRoute;\n  }\n}\n\n// Export a singleton instance of the router\nexport default new Router();\n","var win;\n\nif (typeof window !== \"undefined\") {\n    win = window;\n} else if (typeof global !== \"undefined\") {\n    win = global;\n} else if (typeof self !== \"undefined\"){\n    win = self;\n} else {\n    win = {};\n}\n\nmodule.exports = win;\n","export default {}","var topLevel = typeof global !== 'undefined' ? global :\n    typeof window !== 'undefined' ? window : {}\nvar minDoc = require('min-document');\n\nvar doccy;\n\nif (typeof document !== 'undefined') {\n    doccy = document;\n} else {\n    doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];\n\n    if (!doccy) {\n        doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;\n    }\n}\n\nmodule.exports = doccy;\n","// Source: http://jsfiddle.net/vWx8V/\n// http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes\n\n/**\n * Conenience method returns corresponding value for given keyName or keyCode.\n *\n * @param {Mixed} keyCode {Number} or keyName {String}\n * @return {Mixed}\n * @api public\n */\n\nfunction keyCode(searchInput) {\n  // Keyboard Events\n  if (searchInput && 'object' === typeof searchInput) {\n    var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode\n    if (hasKeyCode) searchInput = hasKeyCode\n  }\n\n  // Numbers\n  if ('number' === typeof searchInput) return names[searchInput]\n\n  // Everything else (cast to string)\n  var search = String(searchInput)\n\n  // check codes\n  var foundNamedKey = codes[search.toLowerCase()]\n  if (foundNamedKey) return foundNamedKey\n\n  // check aliases\n  var foundNamedKey = aliases[search.toLowerCase()]\n  if (foundNamedKey) return foundNamedKey\n\n  // weird character?\n  if (search.length === 1) return search.charCodeAt(0)\n\n  return undefined\n}\n\n/**\n * Compares a keyboard event with a given keyCode or keyName.\n *\n * @param {Event} event Keyboard event that should be tested\n * @param {Mixed} keyCode {Number} or keyName {String}\n * @return {Boolean}\n * @api public\n */\nkeyCode.isEventKey = function isEventKey(event, nameOrCode) {\n  if (event && 'object' === typeof event) {\n    var keyCode = event.which || event.keyCode || event.charCode\n    if (keyCode === null || keyCode === undefined) { return false; }\n    if (typeof nameOrCode === 'string') {\n      // check codes\n      var foundNamedKey = codes[nameOrCode.toLowerCase()]\n      if (foundNamedKey) { return foundNamedKey === keyCode; }\n    \n      // check aliases\n      var foundNamedKey = aliases[nameOrCode.toLowerCase()]\n      if (foundNamedKey) { return foundNamedKey === keyCode; }\n    } else if (typeof nameOrCode === 'number') {\n      return nameOrCode === keyCode;\n    }\n    return false;\n  }\n}\n\nexports = module.exports = keyCode;\n\n/**\n * Get by name\n *\n *   exports.code['enter'] // => 13\n */\n\nvar codes = exports.code = exports.codes = {\n  'backspace': 8,\n  'tab': 9,\n  'enter': 13,\n  'shift': 16,\n  'ctrl': 17,\n  'alt': 18,\n  'pause/break': 19,\n  'caps lock': 20,\n  'esc': 27,\n  'space': 32,\n  'page up': 33,\n  'page down': 34,\n  'end': 35,\n  'home': 36,\n  'left': 37,\n  'up': 38,\n  'right': 39,\n  'down': 40,\n  'insert': 45,\n  'delete': 46,\n  'command': 91,\n  'left command': 91,\n  'right command': 93,\n  'numpad *': 106,\n  'numpad +': 107,\n  'numpad -': 109,\n  'numpad .': 110,\n  'numpad /': 111,\n  'num lock': 144,\n  'scroll lock': 145,\n  'my computer': 182,\n  'my calculator': 183,\n  ';': 186,\n  '=': 187,\n  ',': 188,\n  '-': 189,\n  '.': 190,\n  '/': 191,\n  '`': 192,\n  '[': 219,\n  '\\\\': 220,\n  ']': 221,\n  \"'\": 222\n}\n\n// Helper aliases\n\nvar aliases = exports.aliases = {\n  'windows': 91,\n  '⇧': 16,\n  '⌥': 18,\n  '⌃': 17,\n  '⌘': 91,\n  'ctl': 17,\n  'control': 17,\n  'option': 18,\n  'pause': 19,\n  'break': 19,\n  'caps': 20,\n  'return': 13,\n  'escape': 27,\n  'spc': 32,\n  'spacebar': 32,\n  'pgup': 33,\n  'pgdn': 34,\n  'ins': 45,\n  'del': 46,\n  'cmd': 91\n}\n\n/*!\n * Programatically add the following\n */\n\n// lower case chars\nfor (i = 97; i < 123; i++) codes[String.fromCharCode(i)] = i - 32\n\n// numbers\nfor (var i = 48; i < 58; i++) codes[i - 48] = i\n\n// function keys\nfor (i = 1; i < 13; i++) codes['f'+i] = i + 111\n\n// numpad keys\nfor (i = 0; i < 10; i++) codes['numpad '+i] = i + 96\n\n/**\n * Get by code\n *\n *   exports.name[13] // => 'Enter'\n */\n\nvar names = exports.names = exports.title = {} // title for backward compat\n\n// Create reverse mapping\nfor (i in codes) names[codes[i]] = i\n\n// Add aliases\nfor (var alias in aliases) {\n  codes[alias] = aliases[alias]\n}\n","module.exports = SafeParseTuple\n\nfunction SafeParseTuple(obj, reviver) {\n    var json\n    var error = null\n\n    try {\n        json = JSON.parse(obj, reviver)\n    } catch (err) {\n        error = err\n    }\n\n    return [error, json]\n}\n","export default function _extends() {\n  _extends = Object.assign ? Object.assign.bind() : function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n    return target;\n  };\n  return _extends.apply(this, arguments);\n}","module.exports = isFunction\n\nvar toString = Object.prototype.toString\n\nfunction isFunction (fn) {\n  if (!fn) {\n    return false\n  }\n  var string = toString.call(fn)\n  return string === '[object Function]' ||\n    (typeof fn === 'function' && string !== '[object RegExp]') ||\n    (typeof window !== 'undefined' &&\n     // IE8 and below\n     (fn === window.setTimeout ||\n      fn === window.alert ||\n      fn === window.confirm ||\n      fn === window.prompt))\n};\n","\"use strict\";\n\nvar window = require('global/window');\n\nvar httpResponseHandler = function httpResponseHandler(callback, decodeResponseBody) {\n  if (decodeResponseBody === void 0) {\n    decodeResponseBody = false;\n  }\n\n  return function (err, response, responseBody) {\n    // if the XHR failed, return that error\n    if (err) {\n      callback(err);\n      return;\n    } // if the HTTP status code is 4xx or 5xx, the request also failed\n\n\n    if (response.statusCode >= 400 && response.statusCode <= 599) {\n      var cause = responseBody;\n\n      if (decodeResponseBody) {\n        if (window.TextDecoder) {\n          var charset = getCharset(response.headers && response.headers['content-type']);\n\n          try {\n            cause = new TextDecoder(charset).decode(responseBody);\n          } catch (e) {}\n        } else {\n          cause = String.fromCharCode.apply(null, new Uint8Array(responseBody));\n        }\n      }\n\n      callback({\n        cause: cause\n      });\n      return;\n    } // otherwise, request succeeded\n\n\n    callback(null, responseBody);\n  };\n};\n\nfunction getCharset(contentTypeHeader) {\n  if (contentTypeHeader === void 0) {\n    contentTypeHeader = '';\n  }\n\n  return contentTypeHeader.toLowerCase().split(';').reduce(function (charset, contentType) {\n    var _contentType$split = contentType.split('='),\n        type = _contentType$split[0],\n        value = _contentType$split[1];\n\n    if (type.trim() === 'charset') {\n      return value.trim();\n    }\n\n    return charset;\n  }, 'utf-8');\n}\n\nmodule.exports = httpResponseHandler;","\"use strict\";\n\nvar window = require(\"global/window\");\n\nvar _extends = require(\"@babel/runtime/helpers/extends\");\n\nvar isFunction = require('is-function');\n\ncreateXHR.httpHandler = require('./http-handler.js');\n/**\n * @license\n * slighly modified parse-headers 2.0.2 \n * Copyright (c) 2014 David Björklund\n * Available under the MIT license\n * \n */\n\nvar parseHeaders = function parseHeaders(headers) {\n  var result = {};\n\n  if (!headers) {\n    return result;\n  }\n\n  headers.trim().split('\\n').forEach(function (row) {\n    var index = row.indexOf(':');\n    var key = row.slice(0, index).trim().toLowerCase();\n    var value = row.slice(index + 1).trim();\n\n    if (typeof result[key] === 'undefined') {\n      result[key] = value;\n    } else if (Array.isArray(result[key])) {\n      result[key].push(value);\n    } else {\n      result[key] = [result[key], value];\n    }\n  });\n  return result;\n};\n\nmodule.exports = createXHR; // Allow use of default import syntax in TypeScript\n\nmodule.exports.default = createXHR;\ncreateXHR.XMLHttpRequest = window.XMLHttpRequest || noop;\ncreateXHR.XDomainRequest = \"withCredentials\" in new createXHR.XMLHttpRequest() ? createXHR.XMLHttpRequest : window.XDomainRequest;\nforEachArray([\"get\", \"put\", \"post\", \"patch\", \"head\", \"delete\"], function (method) {\n  createXHR[method === \"delete\" ? \"del\" : method] = function (uri, options, callback) {\n    options = initParams(uri, options, callback);\n    options.method = method.toUpperCase();\n    return _createXHR(options);\n  };\n});\n\nfunction forEachArray(array, iterator) {\n  for (var i = 0; i < array.length; i++) {\n    iterator(array[i]);\n  }\n}\n\nfunction isEmpty(obj) {\n  for (var i in obj) {\n    if (obj.hasOwnProperty(i)) return false;\n  }\n\n  return true;\n}\n\nfunction initParams(uri, options, callback) {\n  var params = uri;\n\n  if (isFunction(options)) {\n    callback = options;\n\n    if (typeof uri === \"string\") {\n      params = {\n        uri: uri\n      };\n    }\n  } else {\n    params = _extends({}, options, {\n      uri: uri\n    });\n  }\n\n  params.callback = callback;\n  return params;\n}\n\nfunction createXHR(uri, options, callback) {\n  options = initParams(uri, options, callback);\n  return _createXHR(options);\n}\n\nfunction _createXHR(options) {\n  if (typeof options.callback === \"undefined\") {\n    throw new Error(\"callback argument missing\");\n  }\n\n  var called = false;\n\n  var callback = function cbOnce(err, response, body) {\n    if (!called) {\n      called = true;\n      options.callback(err, response, body);\n    }\n  };\n\n  function readystatechange() {\n    if (xhr.readyState === 4) {\n      setTimeout(loadFunc, 0);\n    }\n  }\n\n  function getBody() {\n    // Chrome with requestType=blob throws errors arround when even testing access to responseText\n    var body = undefined;\n\n    if (xhr.response) {\n      body = xhr.response;\n    } else {\n      body = xhr.responseText || getXml(xhr);\n    }\n\n    if (isJson) {\n      try {\n        body = JSON.parse(body);\n      } catch (e) {}\n    }\n\n    return body;\n  }\n\n  function errorFunc(evt) {\n    clearTimeout(timeoutTimer);\n\n    if (!(evt instanceof Error)) {\n      evt = new Error(\"\" + (evt || \"Unknown XMLHttpRequest Error\"));\n    }\n\n    evt.statusCode = 0;\n    return callback(evt, failureResponse);\n  } // will load the data & process the response in a special response object\n\n\n  function loadFunc() {\n    if (aborted) return;\n    var status;\n    clearTimeout(timeoutTimer);\n\n    if (options.useXDR && xhr.status === undefined) {\n      //IE8 CORS GET successful response doesn't have a status field, but body is fine\n      status = 200;\n    } else {\n      status = xhr.status === 1223 ? 204 : xhr.status;\n    }\n\n    var response = failureResponse;\n    var err = null;\n\n    if (status !== 0) {\n      response = {\n        body: getBody(),\n        statusCode: status,\n        method: method,\n        headers: {},\n        url: uri,\n        rawRequest: xhr\n      };\n\n      if (xhr.getAllResponseHeaders) {\n        //remember xhr can in fact be XDR for CORS in IE\n        response.headers = parseHeaders(xhr.getAllResponseHeaders());\n      }\n    } else {\n      err = new Error(\"Internal XMLHttpRequest Error\");\n    }\n\n    return callback(err, response, response.body);\n  }\n\n  var xhr = options.xhr || null;\n\n  if (!xhr) {\n    if (options.cors || options.useXDR) {\n      xhr = new createXHR.XDomainRequest();\n    } else {\n      xhr = new createXHR.XMLHttpRequest();\n    }\n  }\n\n  var key;\n  var aborted;\n  var uri = xhr.url = options.uri || options.url;\n  var method = xhr.method = options.method || \"GET\";\n  var body = options.body || options.data;\n  var headers = xhr.headers = options.headers || {};\n  var sync = !!options.sync;\n  var isJson = false;\n  var timeoutTimer;\n  var failureResponse = {\n    body: undefined,\n    headers: {},\n    statusCode: 0,\n    method: method,\n    url: uri,\n    rawRequest: xhr\n  };\n\n  if (\"json\" in options && options.json !== false) {\n    isJson = true;\n    headers[\"accept\"] || headers[\"Accept\"] || (headers[\"Accept\"] = \"application/json\"); //Don't override existing accept header declared by user\n\n    if (method !== \"GET\" && method !== \"HEAD\") {\n      headers[\"content-type\"] || headers[\"Content-Type\"] || (headers[\"Content-Type\"] = \"application/json\"); //Don't override existing accept header declared by user\n\n      body = JSON.stringify(options.json === true ? body : options.json);\n    }\n  }\n\n  xhr.onreadystatechange = readystatechange;\n  xhr.onload = loadFunc;\n  xhr.onerror = errorFunc; // IE9 must have onprogress be set to a unique function.\n\n  xhr.onprogress = function () {// IE must die\n  };\n\n  xhr.onabort = function () {\n    aborted = true;\n  };\n\n  xhr.ontimeout = errorFunc;\n  xhr.open(method, uri, !sync, options.username, options.password); //has to be after open\n\n  if (!sync) {\n    xhr.withCredentials = !!options.withCredentials;\n  } // Cannot set timeout with sync request\n  // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly\n  // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent\n\n\n  if (!sync && options.timeout > 0) {\n    timeoutTimer = setTimeout(function () {\n      if (aborted) return;\n      aborted = true; //IE9 may still call readystatechange\n\n      xhr.abort(\"timeout\");\n      var e = new Error(\"XMLHttpRequest timeout\");\n      e.code = \"ETIMEDOUT\";\n      errorFunc(e);\n    }, options.timeout);\n  }\n\n  if (xhr.setRequestHeader) {\n    for (key in headers) {\n      if (headers.hasOwnProperty(key)) {\n        xhr.setRequestHeader(key, headers[key]);\n      }\n    }\n  } else if (options.headers && !isEmpty(options.headers)) {\n    throw new Error(\"Headers cannot be set on an XDomainRequest object\");\n  }\n\n  if (\"responseType\" in options) {\n    xhr.responseType = options.responseType;\n  }\n\n  if (\"beforeSend\" in options && typeof options.beforeSend === \"function\") {\n    options.beforeSend(xhr);\n  } // Microsoft Edge browser sends \"undefined\" when send is called with undefined value.\n  // XMLHttpRequest spec says to pass null as body to indicate no body\n  // See https://github.com/naugtur/xhr/issues/100.\n\n\n  xhr.send(body || null);\n  return xhr;\n}\n\nfunction getXml(xhr) {\n  // xhr.responseXML will throw Exception \"InvalidStateError\" or \"DOMException\"\n  // See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseXML.\n  try {\n    if (xhr.responseType === \"document\") {\n      return xhr.responseXML;\n    }\n\n    var firefoxBugTakenEffect = xhr.responseXML && xhr.responseXML.documentElement.nodeName === \"parsererror\";\n\n    if (xhr.responseType === \"\" && !firefoxBugTakenEffect) {\n      return xhr.responseXML;\n    }\n  } catch (e) {}\n\n  return null;\n}\n\nfunction noop() {}","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */\n/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */\nvar document = require('global/document');\n\nvar _objCreate = Object.create || (function() {\n  function F() {}\n  return function(o) {\n    if (arguments.length !== 1) {\n      throw new Error('Object.create shim only accepts one parameter.');\n    }\n    F.prototype = o;\n    return new F();\n  };\n})();\n\n// Creates a new ParserError object from an errorData object. The errorData\n// object should have default code and message properties. The default message\n// property can be overriden by passing in a message parameter.\n// See ParsingError.Errors below for acceptable errors.\nfunction ParsingError(errorData, message) {\n  this.name = \"ParsingError\";\n  this.code = errorData.code;\n  this.message = message || errorData.message;\n}\nParsingError.prototype = _objCreate(Error.prototype);\nParsingError.prototype.constructor = ParsingError;\n\n// ParsingError metadata for acceptable ParsingErrors.\nParsingError.Errors = {\n  BadSignature: {\n    code: 0,\n    message: \"Malformed WebVTT signature.\"\n  },\n  BadTimeStamp: {\n    code: 1,\n    message: \"Malformed time stamp.\"\n  }\n};\n\n// Try to parse input as a time stamp.\nfunction parseTimeStamp(input) {\n\n  function computeSeconds(h, m, s, f) {\n    return (h | 0) * 3600 + (m | 0) * 60 + (s | 0) + (f | 0) / 1000;\n  }\n\n  var m = input.match(/^(\\d+):(\\d{1,2})(:\\d{1,2})?\\.(\\d{3})/);\n  if (!m) {\n    return null;\n  }\n\n  if (m[3]) {\n    // Timestamp takes the form of [hours]:[minutes]:[seconds].[milliseconds]\n    return computeSeconds(m[1], m[2], m[3].replace(\":\", \"\"), m[4]);\n  } else if (m[1] > 59) {\n    // Timestamp takes the form of [hours]:[minutes].[milliseconds]\n    // First position is hours as it's over 59.\n    return computeSeconds(m[1], m[2], 0,  m[4]);\n  } else {\n    // Timestamp takes the form of [minutes]:[seconds].[milliseconds]\n    return computeSeconds(0, m[1], m[2], m[4]);\n  }\n}\n\n// A settings object holds key/value pairs and will ignore anything but the first\n// assignment to a specific key.\nfunction Settings() {\n  this.values = _objCreate(null);\n}\n\nSettings.prototype = {\n  // Only accept the first assignment to any key.\n  set: function(k, v) {\n    if (!this.get(k) && v !== \"\") {\n      this.values[k] = v;\n    }\n  },\n  // Return the value for a key, or a default value.\n  // If 'defaultKey' is passed then 'dflt' is assumed to be an object with\n  // a number of possible default values as properties where 'defaultKey' is\n  // the key of the property that will be chosen; otherwise it's assumed to be\n  // a single value.\n  get: function(k, dflt, defaultKey) {\n    if (defaultKey) {\n      return this.has(k) ? this.values[k] : dflt[defaultKey];\n    }\n    return this.has(k) ? this.values[k] : dflt;\n  },\n  // Check whether we have a value for a key.\n  has: function(k) {\n    return k in this.values;\n  },\n  // Accept a setting if its one of the given alternatives.\n  alt: function(k, v, a) {\n    for (var n = 0; n < a.length; ++n) {\n      if (v === a[n]) {\n        this.set(k, v);\n        break;\n      }\n    }\n  },\n  // Accept a setting if its a valid (signed) integer.\n  integer: function(k, v) {\n    if (/^-?\\d+$/.test(v)) { // integer\n      this.set(k, parseInt(v, 10));\n    }\n  },\n  // Accept a setting if its a valid percentage.\n  percent: function(k, v) {\n    var m;\n    if ((m = v.match(/^([\\d]{1,3})(\\.[\\d]*)?%$/))) {\n      v = parseFloat(v);\n      if (v >= 0 && v <= 100) {\n        this.set(k, v);\n        return true;\n      }\n    }\n    return false;\n  }\n};\n\n// Helper function to parse input into groups separated by 'groupDelim', and\n// interprete each group as a key/value pair separated by 'keyValueDelim'.\nfunction parseOptions(input, callback, keyValueDelim, groupDelim) {\n  var groups = groupDelim ? input.split(groupDelim) : [input];\n  for (var i in groups) {\n    if (typeof groups[i] !== \"string\") {\n      continue;\n    }\n    var kv = groups[i].split(keyValueDelim);\n    if (kv.length !== 2) {\n      continue;\n    }\n    var k = kv[0].trim();\n    var v = kv[1].trim();\n    callback(k, v);\n  }\n}\n\nfunction parseCue(input, cue, regionList) {\n  // Remember the original input if we need to throw an error.\n  var oInput = input;\n  // 4.1 WebVTT timestamp\n  function consumeTimeStamp() {\n    var ts = parseTimeStamp(input);\n    if (ts === null) {\n      throw new ParsingError(ParsingError.Errors.BadTimeStamp,\n                            \"Malformed timestamp: \" + oInput);\n    }\n    // Remove time stamp from input.\n    input = input.replace(/^[^\\sa-zA-Z-]+/, \"\");\n    return ts;\n  }\n\n  // 4.4.2 WebVTT cue settings\n  function consumeCueSettings(input, cue) {\n    var settings = new Settings();\n\n    parseOptions(input, function (k, v) {\n      switch (k) {\n      case \"region\":\n        // Find the last region we parsed with the same region id.\n        for (var i = regionList.length - 1; i >= 0; i--) {\n          if (regionList[i].id === v) {\n            settings.set(k, regionList[i].region);\n            break;\n          }\n        }\n        break;\n      case \"vertical\":\n        settings.alt(k, v, [\"rl\", \"lr\"]);\n        break;\n      case \"line\":\n        var vals = v.split(\",\"),\n            vals0 = vals[0];\n        settings.integer(k, vals0);\n        settings.percent(k, vals0) ? settings.set(\"snapToLines\", false) : null;\n        settings.alt(k, vals0, [\"auto\"]);\n        if (vals.length === 2) {\n          settings.alt(\"lineAlign\", vals[1], [\"start\", \"center\", \"end\"]);\n        }\n        break;\n      case \"position\":\n        vals = v.split(\",\");\n        settings.percent(k, vals[0]);\n        if (vals.length === 2) {\n          settings.alt(\"positionAlign\", vals[1], [\"start\", \"center\", \"end\"]);\n        }\n        break;\n      case \"size\":\n        settings.percent(k, v);\n        break;\n      case \"align\":\n        settings.alt(k, v, [\"start\", \"center\", \"end\", \"left\", \"right\"]);\n        break;\n      }\n    }, /:/, /\\s/);\n\n    // Apply default values for any missing fields.\n    cue.region = settings.get(\"region\", null);\n    cue.vertical = settings.get(\"vertical\", \"\");\n    try {\n      cue.line = settings.get(\"line\", \"auto\");\n    } catch (e) {}\n    cue.lineAlign = settings.get(\"lineAlign\", \"start\");\n    cue.snapToLines = settings.get(\"snapToLines\", true);\n    cue.size = settings.get(\"size\", 100);\n    // Safari still uses the old middle value and won't accept center\n    try {\n      cue.align = settings.get(\"align\", \"center\");\n    } catch (e) {\n      cue.align = settings.get(\"align\", \"middle\");\n    }\n    try {\n      cue.position = settings.get(\"position\", \"auto\");\n    } catch (e) {\n      cue.position = settings.get(\"position\", {\n        start: 0,\n        left: 0,\n        center: 50,\n        middle: 50,\n        end: 100,\n        right: 100\n      }, cue.align);\n    }\n\n\n    cue.positionAlign = settings.get(\"positionAlign\", {\n      start: \"start\",\n      left: \"start\",\n      center: \"center\",\n      middle: \"center\",\n      end: \"end\",\n      right: \"end\"\n    }, cue.align);\n  }\n\n  function skipWhitespace() {\n    input = input.replace(/^\\s+/, \"\");\n  }\n\n  // 4.1 WebVTT cue timings.\n  skipWhitespace();\n  cue.startTime = consumeTimeStamp();   // (1) collect cue start time\n  skipWhitespace();\n  if (input.substr(0, 3) !== \"-->\") {     // (3) next characters must match \"-->\"\n    throw new ParsingError(ParsingError.Errors.BadTimeStamp,\n                           \"Malformed time stamp (time stamps must be separated by '-->'): \" +\n                           oInput);\n  }\n  input = input.substr(3);\n  skipWhitespace();\n  cue.endTime = consumeTimeStamp();     // (5) collect cue end time\n\n  // 4.1 WebVTT cue settings list.\n  skipWhitespace();\n  consumeCueSettings(input, cue);\n}\n\n// When evaluating this file as part of a Webpack bundle for server\n// side rendering, `document` is an empty object.\nvar TEXTAREA_ELEMENT = document.createElement && document.createElement(\"textarea\");\n\nvar TAG_NAME = {\n  c: \"span\",\n  i: \"i\",\n  b: \"b\",\n  u: \"u\",\n  ruby: \"ruby\",\n  rt: \"rt\",\n  v: \"span\",\n  lang: \"span\"\n};\n\n// 5.1 default text color\n// 5.2 default text background color is equivalent to text color with bg_ prefix\nvar DEFAULT_COLOR_CLASS = {\n  white: 'rgba(255,255,255,1)',\n  lime: 'rgba(0,255,0,1)',\n  cyan: 'rgba(0,255,255,1)',\n  red: 'rgba(255,0,0,1)',\n  yellow: 'rgba(255,255,0,1)',\n  magenta: 'rgba(255,0,255,1)',\n  blue: 'rgba(0,0,255,1)',\n  black: 'rgba(0,0,0,1)'\n};\n\nvar TAG_ANNOTATION = {\n  v: \"title\",\n  lang: \"lang\"\n};\n\nvar NEEDS_PARENT = {\n  rt: \"ruby\"\n};\n\n// Parse content into a document fragment.\nfunction parseContent(window, input) {\n  function nextToken() {\n    // Check for end-of-string.\n    if (!input) {\n      return null;\n    }\n\n    // Consume 'n' characters from the input.\n    function consume(result) {\n      input = input.substr(result.length);\n      return result;\n    }\n\n    var m = input.match(/^([^<]*)(<[^>]*>?)?/);\n    // If there is some text before the next tag, return it, otherwise return\n    // the tag.\n    return consume(m[1] ? m[1] : m[2]);\n  }\n\n  function unescape(s) {\n    TEXTAREA_ELEMENT.innerHTML = s;\n    s = TEXTAREA_ELEMENT.textContent;\n    TEXTAREA_ELEMENT.textContent = \"\";\n    return s;\n  }\n\n  function shouldAdd(current, element) {\n    return !NEEDS_PARENT[element.localName] ||\n           NEEDS_PARENT[element.localName] === current.localName;\n  }\n\n  // Create an element for this tag.\n  function createElement(type, annotation) {\n    var tagName = TAG_NAME[type];\n    if (!tagName) {\n      return null;\n    }\n    var element = window.document.createElement(tagName);\n    var name = TAG_ANNOTATION[type];\n    if (name && annotation) {\n      element[name] = annotation.trim();\n    }\n    return element;\n  }\n\n  var rootDiv = window.document.createElement(\"div\"),\n      current = rootDiv,\n      t,\n      tagStack = [];\n\n  while ((t = nextToken()) !== null) {\n    if (t[0] === '<') {\n      if (t[1] === \"/\") {\n        // If the closing tag matches, move back up to the parent node.\n        if (tagStack.length &&\n            tagStack[tagStack.length - 1] === t.substr(2).replace(\">\", \"\")) {\n          tagStack.pop();\n          current = current.parentNode;\n        }\n        // Otherwise just ignore the end tag.\n        continue;\n      }\n      var ts = parseTimeStamp(t.substr(1, t.length - 2));\n      var node;\n      if (ts) {\n        // Timestamps are lead nodes as well.\n        node = window.document.createProcessingInstruction(\"timestamp\", ts);\n        current.appendChild(node);\n        continue;\n      }\n      var m = t.match(/^<([^.\\s/0-9>]+)(\\.[^\\s\\\\>]+)?([^>\\\\]+)?(\\\\?)>?$/);\n      // If we can't parse the tag, skip to the next tag.\n      if (!m) {\n        continue;\n      }\n      // Try to construct an element, and ignore the tag if we couldn't.\n      node = createElement(m[1], m[3]);\n      if (!node) {\n        continue;\n      }\n      // Determine if the tag should be added based on the context of where it\n      // is placed in the cuetext.\n      if (!shouldAdd(current, node)) {\n        continue;\n      }\n      // Set the class list (as a list of classes, separated by space).\n      if (m[2]) {\n        var classes = m[2].split('.');\n\n        classes.forEach(function(cl) {\n          var bgColor = /^bg_/.test(cl);\n          // slice out `bg_` if it's a background color\n          var colorName = bgColor ? cl.slice(3) : cl;\n\n          if (DEFAULT_COLOR_CLASS.hasOwnProperty(colorName)) {\n            var propName = bgColor ? 'background-color' : 'color';\n            var propValue = DEFAULT_COLOR_CLASS[colorName];\n\n            node.style[propName] = propValue;\n          }\n        });\n\n        node.className = classes.join(' ');\n      }\n      // Append the node to the current node, and enter the scope of the new\n      // node.\n      tagStack.push(m[1]);\n      current.appendChild(node);\n      current = node;\n      continue;\n    }\n\n    // Text nodes are leaf nodes.\n    current.appendChild(window.document.createTextNode(unescape(t)));\n  }\n\n  return rootDiv;\n}\n\n// This is a list of all the Unicode characters that have a strong\n// right-to-left category. What this means is that these characters are\n// written right-to-left for sure. It was generated by pulling all the strong\n// right-to-left characters out of the Unicode data table. That table can\n// found at: http://www.unicode.org/Public/UNIDATA/UnicodeData.txt\nvar strongRTLRanges = [[0x5be, 0x5be], [0x5c0, 0x5c0], [0x5c3, 0x5c3], [0x5c6, 0x5c6],\n [0x5d0, 0x5ea], [0x5f0, 0x5f4], [0x608, 0x608], [0x60b, 0x60b], [0x60d, 0x60d],\n [0x61b, 0x61b], [0x61e, 0x64a], [0x66d, 0x66f], [0x671, 0x6d5], [0x6e5, 0x6e6],\n [0x6ee, 0x6ef], [0x6fa, 0x70d], [0x70f, 0x710], [0x712, 0x72f], [0x74d, 0x7a5],\n [0x7b1, 0x7b1], [0x7c0, 0x7ea], [0x7f4, 0x7f5], [0x7fa, 0x7fa], [0x800, 0x815],\n [0x81a, 0x81a], [0x824, 0x824], [0x828, 0x828], [0x830, 0x83e], [0x840, 0x858],\n [0x85e, 0x85e], [0x8a0, 0x8a0], [0x8a2, 0x8ac], [0x200f, 0x200f],\n [0xfb1d, 0xfb1d], [0xfb1f, 0xfb28], [0xfb2a, 0xfb36], [0xfb38, 0xfb3c],\n [0xfb3e, 0xfb3e], [0xfb40, 0xfb41], [0xfb43, 0xfb44], [0xfb46, 0xfbc1],\n [0xfbd3, 0xfd3d], [0xfd50, 0xfd8f], [0xfd92, 0xfdc7], [0xfdf0, 0xfdfc],\n [0xfe70, 0xfe74], [0xfe76, 0xfefc], [0x10800, 0x10805], [0x10808, 0x10808],\n [0x1080a, 0x10835], [0x10837, 0x10838], [0x1083c, 0x1083c], [0x1083f, 0x10855],\n [0x10857, 0x1085f], [0x10900, 0x1091b], [0x10920, 0x10939], [0x1093f, 0x1093f],\n [0x10980, 0x109b7], [0x109be, 0x109bf], [0x10a00, 0x10a00], [0x10a10, 0x10a13],\n [0x10a15, 0x10a17], [0x10a19, 0x10a33], [0x10a40, 0x10a47], [0x10a50, 0x10a58],\n [0x10a60, 0x10a7f], [0x10b00, 0x10b35], [0x10b40, 0x10b55], [0x10b58, 0x10b72],\n [0x10b78, 0x10b7f], [0x10c00, 0x10c48], [0x1ee00, 0x1ee03], [0x1ee05, 0x1ee1f],\n [0x1ee21, 0x1ee22], [0x1ee24, 0x1ee24], [0x1ee27, 0x1ee27], [0x1ee29, 0x1ee32],\n [0x1ee34, 0x1ee37], [0x1ee39, 0x1ee39], [0x1ee3b, 0x1ee3b], [0x1ee42, 0x1ee42],\n [0x1ee47, 0x1ee47], [0x1ee49, 0x1ee49], [0x1ee4b, 0x1ee4b], [0x1ee4d, 0x1ee4f],\n [0x1ee51, 0x1ee52], [0x1ee54, 0x1ee54], [0x1ee57, 0x1ee57], [0x1ee59, 0x1ee59],\n [0x1ee5b, 0x1ee5b], [0x1ee5d, 0x1ee5d], [0x1ee5f, 0x1ee5f], [0x1ee61, 0x1ee62],\n [0x1ee64, 0x1ee64], [0x1ee67, 0x1ee6a], [0x1ee6c, 0x1ee72], [0x1ee74, 0x1ee77],\n [0x1ee79, 0x1ee7c], [0x1ee7e, 0x1ee7e], [0x1ee80, 0x1ee89], [0x1ee8b, 0x1ee9b],\n [0x1eea1, 0x1eea3], [0x1eea5, 0x1eea9], [0x1eeab, 0x1eebb], [0x10fffd, 0x10fffd]];\n\nfunction isStrongRTLChar(charCode) {\n  for (var i = 0; i < strongRTLRanges.length; i++) {\n    var currentRange = strongRTLRanges[i];\n    if (charCode >= currentRange[0] && charCode <= currentRange[1]) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\nfunction determineBidi(cueDiv) {\n  var nodeStack = [],\n      text = \"\",\n      charCode;\n\n  if (!cueDiv || !cueDiv.childNodes) {\n    return \"ltr\";\n  }\n\n  function pushNodes(nodeStack, node) {\n    for (var i = node.childNodes.length - 1; i >= 0; i--) {\n      nodeStack.push(node.childNodes[i]);\n    }\n  }\n\n  function nextTextNode(nodeStack) {\n    if (!nodeStack || !nodeStack.length) {\n      return null;\n    }\n\n    var node = nodeStack.pop(),\n        text = node.textContent || node.innerText;\n    if (text) {\n      // TODO: This should match all unicode type B characters (paragraph\n      // separator characters). See issue #115.\n      var m = text.match(/^.*(\\n|\\r)/);\n      if (m) {\n        nodeStack.length = 0;\n        return m[0];\n      }\n      return text;\n    }\n    if (node.tagName === \"ruby\") {\n      return nextTextNode(nodeStack);\n    }\n    if (node.childNodes) {\n      pushNodes(nodeStack, node);\n      return nextTextNode(nodeStack);\n    }\n  }\n\n  pushNodes(nodeStack, cueDiv);\n  while ((text = nextTextNode(nodeStack))) {\n    for (var i = 0; i < text.length; i++) {\n      charCode = text.charCodeAt(i);\n      if (isStrongRTLChar(charCode)) {\n        return \"rtl\";\n      }\n    }\n  }\n  return \"ltr\";\n}\n\nfunction computeLinePos(cue) {\n  if (typeof cue.line === \"number\" &&\n      (cue.snapToLines || (cue.line >= 0 && cue.line <= 100))) {\n    return cue.line;\n  }\n  if (!cue.track || !cue.track.textTrackList ||\n      !cue.track.textTrackList.mediaElement) {\n    return -1;\n  }\n  var track = cue.track,\n      trackList = track.textTrackList,\n      count = 0;\n  for (var i = 0; i < trackList.length && trackList[i] !== track; i++) {\n    if (trackList[i].mode === \"showing\") {\n      count++;\n    }\n  }\n  return ++count * -1;\n}\n\nfunction StyleBox() {\n}\n\n// Apply styles to a div. If there is no div passed then it defaults to the\n// div on 'this'.\nStyleBox.prototype.applyStyles = function(styles, div) {\n  div = div || this.div;\n  for (var prop in styles) {\n    if (styles.hasOwnProperty(prop)) {\n      div.style[prop] = styles[prop];\n    }\n  }\n};\n\nStyleBox.prototype.formatStyle = function(val, unit) {\n  return val === 0 ? 0 : val + unit;\n};\n\n// Constructs the computed display state of the cue (a div). Places the div\n// into the overlay which should be a block level element (usually a div).\nfunction CueStyleBox(window, cue, styleOptions) {\n  StyleBox.call(this);\n  this.cue = cue;\n\n  // Parse our cue's text into a DOM tree rooted at 'cueDiv'. This div will\n  // have inline positioning and will function as the cue background box.\n  this.cueDiv = parseContent(window, cue.text);\n  var styles = {\n    color: \"rgba(255, 255, 255, 1)\",\n    backgroundColor:  \"rgba(0, 0, 0, 0.8)\",\n    position: \"relative\",\n    left: 0,\n    right: 0,\n    top: 0,\n    bottom: 0,\n    display: \"inline\",\n    writingMode: cue.vertical === \"\" ? \"horizontal-tb\"\n                                     : cue.vertical === \"lr\" ? \"vertical-lr\"\n                                                             : \"vertical-rl\",\n    unicodeBidi: \"plaintext\"\n  };\n\n  this.applyStyles(styles, this.cueDiv);\n\n  // Create an absolutely positioned div that will be used to position the cue\n  // div. Note, all WebVTT cue-setting alignments are equivalent to the CSS\n  // mirrors of them except middle instead of center on Safari.\n  this.div = window.document.createElement(\"div\");\n  styles = {\n    direction: determineBidi(this.cueDiv),\n    writingMode: cue.vertical === \"\" ? \"horizontal-tb\"\n                                     : cue.vertical === \"lr\" ? \"vertical-lr\"\n                                                             : \"vertical-rl\",\n    unicodeBidi: \"plaintext\",\n    textAlign: cue.align === \"middle\" ? \"center\" : cue.align,\n    font: styleOptions.font,\n    whiteSpace: \"pre-line\",\n    position: \"absolute\"\n  };\n\n  this.applyStyles(styles);\n  this.div.appendChild(this.cueDiv);\n\n  // Calculate the distance from the reference edge of the viewport to the text\n  // position of the cue box. The reference edge will be resolved later when\n  // the box orientation styles are applied.\n  var textPos = 0;\n  switch (cue.positionAlign) {\n  case \"start\":\n  case \"line-left\":\n    textPos = cue.position;\n    break;\n  case \"center\":\n    textPos = cue.position - (cue.size / 2);\n    break;\n  case \"end\":\n  case \"line-right\":\n    textPos = cue.position - cue.size;\n    break;\n  }\n\n  // Horizontal box orientation; textPos is the distance from the left edge of the\n  // area to the left edge of the box and cue.size is the distance extending to\n  // the right from there.\n  if (cue.vertical === \"\") {\n    this.applyStyles({\n      left:  this.formatStyle(textPos, \"%\"),\n      width: this.formatStyle(cue.size, \"%\")\n    });\n  // Vertical box orientation; textPos is the distance from the top edge of the\n  // area to the top edge of the box and cue.size is the height extending\n  // downwards from there.\n  } else {\n    this.applyStyles({\n      top: this.formatStyle(textPos, \"%\"),\n      height: this.formatStyle(cue.size, \"%\")\n    });\n  }\n\n  this.move = function(box) {\n    this.applyStyles({\n      top: this.formatStyle(box.top, \"px\"),\n      bottom: this.formatStyle(box.bottom, \"px\"),\n      left: this.formatStyle(box.left, \"px\"),\n      right: this.formatStyle(box.right, \"px\"),\n      height: this.formatStyle(box.height, \"px\"),\n      width: this.formatStyle(box.width, \"px\")\n    });\n  };\n}\nCueStyleBox.prototype = _objCreate(StyleBox.prototype);\nCueStyleBox.prototype.constructor = CueStyleBox;\n\n// Represents the co-ordinates of an Element in a way that we can easily\n// compute things with such as if it overlaps or intersects with another Element.\n// Can initialize it with either a StyleBox or another BoxPosition.\nfunction BoxPosition(obj) {\n  // Either a BoxPosition was passed in and we need to copy it, or a StyleBox\n  // was passed in and we need to copy the results of 'getBoundingClientRect'\n  // as the object returned is readonly. All co-ordinate values are in reference\n  // to the viewport origin (top left).\n  var lh, height, width, top;\n  if (obj.div) {\n    height = obj.div.offsetHeight;\n    width = obj.div.offsetWidth;\n    top = obj.div.offsetTop;\n\n    var rects = (rects = obj.div.childNodes) && (rects = rects[0]) &&\n                rects.getClientRects && rects.getClientRects();\n    obj = obj.div.getBoundingClientRect();\n    // In certain cases the outter div will be slightly larger then the sum of\n    // the inner div's lines. This could be due to bold text, etc, on some platforms.\n    // In this case we should get the average line height and use that. This will\n    // result in the desired behaviour.\n    lh = rects ? Math.max((rects[0] && rects[0].height) || 0, obj.height / rects.length)\n               : 0;\n\n  }\n  this.left = obj.left;\n  this.right = obj.right;\n  this.top = obj.top || top;\n  this.height = obj.height || height;\n  this.bottom = obj.bottom || (top + (obj.height || height));\n  this.width = obj.width || width;\n  this.lineHeight = lh !== undefined ? lh : obj.lineHeight;\n}\n\n// Move the box along a particular axis. Optionally pass in an amount to move\n// the box. If no amount is passed then the default is the line height of the\n// box.\nBoxPosition.prototype.move = function(axis, toMove) {\n  toMove = toMove !== undefined ? toMove : this.lineHeight;\n  switch (axis) {\n  case \"+x\":\n    this.left += toMove;\n    this.right += toMove;\n    break;\n  case \"-x\":\n    this.left -= toMove;\n    this.right -= toMove;\n    break;\n  case \"+y\":\n    this.top += toMove;\n    this.bottom += toMove;\n    break;\n  case \"-y\":\n    this.top -= toMove;\n    this.bottom -= toMove;\n    break;\n  }\n};\n\n// Check if this box overlaps another box, b2.\nBoxPosition.prototype.overlaps = function(b2) {\n  return this.left < b2.right &&\n         this.right > b2.left &&\n         this.top < b2.bottom &&\n         this.bottom > b2.top;\n};\n\n// Check if this box overlaps any other boxes in boxes.\nBoxPosition.prototype.overlapsAny = function(boxes) {\n  for (var i = 0; i < boxes.length; i++) {\n    if (this.overlaps(boxes[i])) {\n      return true;\n    }\n  }\n  return false;\n};\n\n// Check if this box is within another box.\nBoxPosition.prototype.within = function(container) {\n  return this.top >= container.top &&\n         this.bottom <= container.bottom &&\n         this.left >= container.left &&\n         this.right <= container.right;\n};\n\n// Check if this box is entirely within the container or it is overlapping\n// on the edge opposite of the axis direction passed. For example, if \"+x\" is\n// passed and the box is overlapping on the left edge of the container, then\n// return true.\nBoxPosition.prototype.overlapsOppositeAxis = function(container, axis) {\n  switch (axis) {\n  case \"+x\":\n    return this.left < container.left;\n  case \"-x\":\n    return this.right > container.right;\n  case \"+y\":\n    return this.top < container.top;\n  case \"-y\":\n    return this.bottom > container.bottom;\n  }\n};\n\n// Find the percentage of the area that this box is overlapping with another\n// box.\nBoxPosition.prototype.intersectPercentage = function(b2) {\n  var x = Math.max(0, Math.min(this.right, b2.right) - Math.max(this.left, b2.left)),\n      y = Math.max(0, Math.min(this.bottom, b2.bottom) - Math.max(this.top, b2.top)),\n      intersectArea = x * y;\n  return intersectArea / (this.height * this.width);\n};\n\n// Convert the positions from this box to CSS compatible positions using\n// the reference container's positions. This has to be done because this\n// box's positions are in reference to the viewport origin, whereas, CSS\n// values are in referecne to their respective edges.\nBoxPosition.prototype.toCSSCompatValues = function(reference) {\n  return {\n    top: this.top - reference.top,\n    bottom: reference.bottom - this.bottom,\n    left: this.left - reference.left,\n    right: reference.right - this.right,\n    height: this.height,\n    width: this.width\n  };\n};\n\n// Get an object that represents the box's position without anything extra.\n// Can pass a StyleBox, HTMLElement, or another BoxPositon.\nBoxPosition.getSimpleBoxPosition = function(obj) {\n  var height = obj.div ? obj.div.offsetHeight : obj.tagName ? obj.offsetHeight : 0;\n  var width = obj.div ? obj.div.offsetWidth : obj.tagName ? obj.offsetWidth : 0;\n  var top = obj.div ? obj.div.offsetTop : obj.tagName ? obj.offsetTop : 0;\n\n  obj = obj.div ? obj.div.getBoundingClientRect() :\n                obj.tagName ? obj.getBoundingClientRect() : obj;\n  var ret = {\n    left: obj.left,\n    right: obj.right,\n    top: obj.top || top,\n    height: obj.height || height,\n    bottom: obj.bottom || (top + (obj.height || height)),\n    width: obj.width || width\n  };\n  return ret;\n};\n\n// Move a StyleBox to its specified, or next best, position. The containerBox\n// is the box that contains the StyleBox, such as a div. boxPositions are\n// a list of other boxes that the styleBox can't overlap with.\nfunction moveBoxToLinePosition(window, styleBox, containerBox, boxPositions) {\n\n  // Find the best position for a cue box, b, on the video. The axis parameter\n  // is a list of axis, the order of which, it will move the box along. For example:\n  // Passing [\"+x\", \"-x\"] will move the box first along the x axis in the positive\n  // direction. If it doesn't find a good position for it there it will then move\n  // it along the x axis in the negative direction.\n  function findBestPosition(b, axis) {\n    var bestPosition,\n        specifiedPosition = new BoxPosition(b),\n        percentage = 1; // Highest possible so the first thing we get is better.\n\n    for (var i = 0; i < axis.length; i++) {\n      while (b.overlapsOppositeAxis(containerBox, axis[i]) ||\n             (b.within(containerBox) && b.overlapsAny(boxPositions))) {\n        b.move(axis[i]);\n      }\n      // We found a spot where we aren't overlapping anything. This is our\n      // best position.\n      if (b.within(containerBox)) {\n        return b;\n      }\n      var p = b.intersectPercentage(containerBox);\n      // If we're outside the container box less then we were on our last try\n      // then remember this position as the best position.\n      if (percentage > p) {\n        bestPosition = new BoxPosition(b);\n        percentage = p;\n      }\n      // Reset the box position to the specified position.\n      b = new BoxPosition(specifiedPosition);\n    }\n    return bestPosition || specifiedPosition;\n  }\n\n  var boxPosition = new BoxPosition(styleBox),\n      cue = styleBox.cue,\n      linePos = computeLinePos(cue),\n      axis = [];\n\n  // If we have a line number to align the cue to.\n  if (cue.snapToLines) {\n    var size;\n    switch (cue.vertical) {\n    case \"\":\n      axis = [ \"+y\", \"-y\" ];\n      size = \"height\";\n      break;\n    case \"rl\":\n      axis = [ \"+x\", \"-x\" ];\n      size = \"width\";\n      break;\n    case \"lr\":\n      axis = [ \"-x\", \"+x\" ];\n      size = \"width\";\n      break;\n    }\n\n    var step = boxPosition.lineHeight,\n        position = step * Math.round(linePos),\n        maxPosition = containerBox[size] + step,\n        initialAxis = axis[0];\n\n    // If the specified intial position is greater then the max position then\n    // clamp the box to the amount of steps it would take for the box to\n    // reach the max position.\n    if (Math.abs(position) > maxPosition) {\n      position = position < 0 ? -1 : 1;\n      position *= Math.ceil(maxPosition / step) * step;\n    }\n\n    // If computed line position returns negative then line numbers are\n    // relative to the bottom of the video instead of the top. Therefore, we\n    // need to increase our initial position by the length or width of the\n    // video, depending on the writing direction, and reverse our axis directions.\n    if (linePos < 0) {\n      position += cue.vertical === \"\" ? containerBox.height : containerBox.width;\n      axis = axis.reverse();\n    }\n\n    // Move the box to the specified position. This may not be its best\n    // position.\n    boxPosition.move(initialAxis, position);\n\n  } else {\n    // If we have a percentage line value for the cue.\n    var calculatedPercentage = (boxPosition.lineHeight / containerBox.height) * 100;\n\n    switch (cue.lineAlign) {\n    case \"center\":\n      linePos -= (calculatedPercentage / 2);\n      break;\n    case \"end\":\n      linePos -= calculatedPercentage;\n      break;\n    }\n\n    // Apply initial line position to the cue box.\n    switch (cue.vertical) {\n    case \"\":\n      styleBox.applyStyles({\n        top: styleBox.formatStyle(linePos, \"%\")\n      });\n      break;\n    case \"rl\":\n      styleBox.applyStyles({\n        left: styleBox.formatStyle(linePos, \"%\")\n      });\n      break;\n    case \"lr\":\n      styleBox.applyStyles({\n        right: styleBox.formatStyle(linePos, \"%\")\n      });\n      break;\n    }\n\n    axis = [ \"+y\", \"-x\", \"+x\", \"-y\" ];\n\n    // Get the box position again after we've applied the specified positioning\n    // to it.\n    boxPosition = new BoxPosition(styleBox);\n  }\n\n  var bestPosition = findBestPosition(boxPosition, axis);\n  styleBox.move(bestPosition.toCSSCompatValues(containerBox));\n}\n\nfunction WebVTT() {\n  // Nothing\n}\n\n// Helper to allow strings to be decoded instead of the default binary utf8 data.\nWebVTT.StringDecoder = function() {\n  return {\n    decode: function(data) {\n      if (!data) {\n        return \"\";\n      }\n      if (typeof data !== \"string\") {\n        throw new Error(\"Error - expected string data.\");\n      }\n      return decodeURIComponent(encodeURIComponent(data));\n    }\n  };\n};\n\nWebVTT.convertCueToDOMTree = function(window, cuetext) {\n  if (!window || !cuetext) {\n    return null;\n  }\n  return parseContent(window, cuetext);\n};\n\nvar FONT_SIZE_PERCENT = 0.05;\nvar FONT_STYLE = \"sans-serif\";\nvar CUE_BACKGROUND_PADDING = \"1.5%\";\n\n// Runs the processing model over the cues and regions passed to it.\n// @param overlay A block level element (usually a div) that the computed cues\n//                and regions will be placed into.\nWebVTT.processCues = function(window, cues, overlay) {\n  if (!window || !cues || !overlay) {\n    return null;\n  }\n\n  // Remove all previous children.\n  while (overlay.firstChild) {\n    overlay.removeChild(overlay.firstChild);\n  }\n\n  var paddedOverlay = window.document.createElement(\"div\");\n  paddedOverlay.style.position = \"absolute\";\n  paddedOverlay.style.left = \"0\";\n  paddedOverlay.style.right = \"0\";\n  paddedOverlay.style.top = \"0\";\n  paddedOverlay.style.bottom = \"0\";\n  paddedOverlay.style.margin = CUE_BACKGROUND_PADDING;\n  overlay.appendChild(paddedOverlay);\n\n  // Determine if we need to compute the display states of the cues. This could\n  // be the case if a cue's state has been changed since the last computation or\n  // if it has not been computed yet.\n  function shouldCompute(cues) {\n    for (var i = 0; i < cues.length; i++) {\n      if (cues[i].hasBeenReset || !cues[i].displayState) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  // We don't need to recompute the cues' display states. Just reuse them.\n  if (!shouldCompute(cues)) {\n    for (var i = 0; i < cues.length; i++) {\n      paddedOverlay.appendChild(cues[i].displayState);\n    }\n    return;\n  }\n\n  var boxPositions = [],\n      containerBox = BoxPosition.getSimpleBoxPosition(paddedOverlay),\n      fontSize = Math.round(containerBox.height * FONT_SIZE_PERCENT * 100) / 100;\n  var styleOptions = {\n    font: fontSize + \"px \" + FONT_STYLE\n  };\n\n  (function() {\n    var styleBox, cue;\n\n    for (var i = 0; i < cues.length; i++) {\n      cue = cues[i];\n\n      // Compute the intial position and styles of the cue div.\n      styleBox = new CueStyleBox(window, cue, styleOptions);\n      paddedOverlay.appendChild(styleBox.div);\n\n      // Move the cue div to it's correct line position.\n      moveBoxToLinePosition(window, styleBox, containerBox, boxPositions);\n\n      // Remember the computed div so that we don't have to recompute it later\n      // if we don't have too.\n      cue.displayState = styleBox.div;\n\n      boxPositions.push(BoxPosition.getSimpleBoxPosition(styleBox));\n    }\n  })();\n};\n\nWebVTT.Parser = function(window, vttjs, decoder) {\n  if (!decoder) {\n    decoder = vttjs;\n    vttjs = {};\n  }\n  if (!vttjs) {\n    vttjs = {};\n  }\n\n  this.window = window;\n  this.vttjs = vttjs;\n  this.state = \"INITIAL\";\n  this.buffer = \"\";\n  this.decoder = decoder || new TextDecoder(\"utf8\");\n  this.regionList = [];\n};\n\nWebVTT.Parser.prototype = {\n  // If the error is a ParsingError then report it to the consumer if\n  // possible. If it's not a ParsingError then throw it like normal.\n  reportOrThrowError: function(e) {\n    if (e instanceof ParsingError) {\n      this.onparsingerror && this.onparsingerror(e);\n    } else {\n      throw e;\n    }\n  },\n  parse: function (data) {\n    var self = this;\n\n    // If there is no data then we won't decode it, but will just try to parse\n    // whatever is in buffer already. This may occur in circumstances, for\n    // example when flush() is called.\n    if (data) {\n      // Try to decode the data that we received.\n      self.buffer += self.decoder.decode(data, {stream: true});\n    }\n\n    function collectNextLine() {\n      var buffer = self.buffer;\n      var pos = 0;\n      while (pos < buffer.length && buffer[pos] !== '\\r' && buffer[pos] !== '\\n') {\n        ++pos;\n      }\n      var line = buffer.substr(0, pos);\n      // Advance the buffer early in case we fail below.\n      if (buffer[pos] === '\\r') {\n        ++pos;\n      }\n      if (buffer[pos] === '\\n') {\n        ++pos;\n      }\n      self.buffer = buffer.substr(pos);\n      return line;\n    }\n\n    // 3.4 WebVTT region and WebVTT region settings syntax\n    function parseRegion(input) {\n      var settings = new Settings();\n\n      parseOptions(input, function (k, v) {\n        switch (k) {\n        case \"id\":\n          settings.set(k, v);\n          break;\n        case \"width\":\n          settings.percent(k, v);\n          break;\n        case \"lines\":\n          settings.integer(k, v);\n          break;\n        case \"regionanchor\":\n        case \"viewportanchor\":\n          var xy = v.split(',');\n          if (xy.length !== 2) {\n            break;\n          }\n          // We have to make sure both x and y parse, so use a temporary\n          // settings object here.\n          var anchor = new Settings();\n          anchor.percent(\"x\", xy[0]);\n          anchor.percent(\"y\", xy[1]);\n          if (!anchor.has(\"x\") || !anchor.has(\"y\")) {\n            break;\n          }\n          settings.set(k + \"X\", anchor.get(\"x\"));\n          settings.set(k + \"Y\", anchor.get(\"y\"));\n          break;\n        case \"scroll\":\n          settings.alt(k, v, [\"up\"]);\n          break;\n        }\n      }, /=/, /\\s/);\n\n      // Create the region, using default values for any values that were not\n      // specified.\n      if (settings.has(\"id\")) {\n        var region = new (self.vttjs.VTTRegion || self.window.VTTRegion)();\n        region.width = settings.get(\"width\", 100);\n        region.lines = settings.get(\"lines\", 3);\n        region.regionAnchorX = settings.get(\"regionanchorX\", 0);\n        region.regionAnchorY = settings.get(\"regionanchorY\", 100);\n        region.viewportAnchorX = settings.get(\"viewportanchorX\", 0);\n        region.viewportAnchorY = settings.get(\"viewportanchorY\", 100);\n        region.scroll = settings.get(\"scroll\", \"\");\n        // Register the region.\n        self.onregion && self.onregion(region);\n        // Remember the VTTRegion for later in case we parse any VTTCues that\n        // reference it.\n        self.regionList.push({\n          id: settings.get(\"id\"),\n          region: region\n        });\n      }\n    }\n\n    // draft-pantos-http-live-streaming-20\n    // https://tools.ietf.org/html/draft-pantos-http-live-streaming-20#section-3.5\n    // 3.5 WebVTT\n    function parseTimestampMap(input) {\n      var settings = new Settings();\n\n      parseOptions(input, function(k, v) {\n        switch(k) {\n        case \"MPEGT\":\n          settings.integer(k + 'S', v);\n          break;\n        case \"LOCA\":\n          settings.set(k + 'L', parseTimeStamp(v));\n          break;\n        }\n      }, /[^\\d]:/, /,/);\n\n      self.ontimestampmap && self.ontimestampmap({\n        \"MPEGTS\": settings.get(\"MPEGTS\"),\n        \"LOCAL\": settings.get(\"LOCAL\")\n      });\n    }\n\n    // 3.2 WebVTT metadata header syntax\n    function parseHeader(input) {\n      if (input.match(/X-TIMESTAMP-MAP/)) {\n        // This line contains HLS X-TIMESTAMP-MAP metadata\n        parseOptions(input, function(k, v) {\n          switch(k) {\n          case \"X-TIMESTAMP-MAP\":\n            parseTimestampMap(v);\n            break;\n          }\n        }, /=/);\n      } else {\n        parseOptions(input, function (k, v) {\n          switch (k) {\n          case \"Region\":\n            // 3.3 WebVTT region metadata header syntax\n            parseRegion(v);\n            break;\n          }\n        }, /:/);\n      }\n\n    }\n\n    // 5.1 WebVTT file parsing.\n    try {\n      var line;\n      if (self.state === \"INITIAL\") {\n        // We can't start parsing until we have the first line.\n        if (!/\\r\\n|\\n/.test(self.buffer)) {\n          return this;\n        }\n\n        line = collectNextLine();\n\n        var m = line.match(/^WEBVTT([ \\t].*)?$/);\n        if (!m || !m[0]) {\n          throw new ParsingError(ParsingError.Errors.BadSignature);\n        }\n\n        self.state = \"HEADER\";\n      }\n\n      var alreadyCollectedLine = false;\n      while (self.buffer) {\n        // We can't parse a line until we have the full line.\n        if (!/\\r\\n|\\n/.test(self.buffer)) {\n          return this;\n        }\n\n        if (!alreadyCollectedLine) {\n          line = collectNextLine();\n        } else {\n          alreadyCollectedLine = false;\n        }\n\n        switch (self.state) {\n        case \"HEADER\":\n          // 13-18 - Allow a header (metadata) under the WEBVTT line.\n          if (/:/.test(line)) {\n            parseHeader(line);\n          } else if (!line) {\n            // An empty line terminates the header and starts the body (cues).\n            self.state = \"ID\";\n          }\n          continue;\n        case \"NOTE\":\n          // Ignore NOTE blocks.\n          if (!line) {\n            self.state = \"ID\";\n          }\n          continue;\n        case \"ID\":\n          // Check for the start of NOTE blocks.\n          if (/^NOTE($|[ \\t])/.test(line)) {\n            self.state = \"NOTE\";\n            break;\n          }\n          // 19-29 - Allow any number of line terminators, then initialize new cue values.\n          if (!line) {\n            continue;\n          }\n          self.cue = new (self.vttjs.VTTCue || self.window.VTTCue)(0, 0, \"\");\n          // Safari still uses the old middle value and won't accept center\n          try {\n            self.cue.align = \"center\";\n          } catch (e) {\n            self.cue.align = \"middle\";\n          }\n          self.state = \"CUE\";\n          // 30-39 - Check if self line contains an optional identifier or timing data.\n          if (line.indexOf(\"-->\") === -1) {\n            self.cue.id = line;\n            continue;\n          }\n          // Process line as start of a cue.\n          /*falls through*/\n        case \"CUE\":\n          // 40 - Collect cue timings and settings.\n          try {\n            parseCue(line, self.cue, self.regionList);\n          } catch (e) {\n            self.reportOrThrowError(e);\n            // In case of an error ignore rest of the cue.\n            self.cue = null;\n            self.state = \"BADCUE\";\n            continue;\n          }\n          self.state = \"CUETEXT\";\n          continue;\n        case \"CUETEXT\":\n          var hasSubstring = line.indexOf(\"-->\") !== -1;\n          // 34 - If we have an empty line then report the cue.\n          // 35 - If we have the special substring '-->' then report the cue,\n          // but do not collect the line as we need to process the current\n          // one as a new cue.\n          if (!line || hasSubstring && (alreadyCollectedLine = true)) {\n            // We are done parsing self cue.\n            self.oncue && self.oncue(self.cue);\n            self.cue = null;\n            self.state = \"ID\";\n            continue;\n          }\n          if (self.cue.text) {\n            self.cue.text += \"\\n\";\n          }\n          self.cue.text += line.replace(/\\u2028/g, '\\n').replace(/u2029/g, '\\n');\n          continue;\n        case \"BADCUE\": // BADCUE\n          // 54-62 - Collect and discard the remaining cue.\n          if (!line) {\n            self.state = \"ID\";\n          }\n          continue;\n        }\n      }\n    } catch (e) {\n      self.reportOrThrowError(e);\n\n      // If we are currently parsing a cue, report what we have.\n      if (self.state === \"CUETEXT\" && self.cue && self.oncue) {\n        self.oncue(self.cue);\n      }\n      self.cue = null;\n      // Enter BADWEBVTT state if header was not parsed correctly otherwise\n      // another exception occurred so enter BADCUE state.\n      self.state = self.state === \"INITIAL\" ? \"BADWEBVTT\" : \"BADCUE\";\n    }\n    return this;\n  },\n  flush: function () {\n    var self = this;\n    try {\n      // Finish decoding the stream.\n      self.buffer += self.decoder.decode();\n      // Synthesize the end of the current cue or region.\n      if (self.cue || self.state === \"HEADER\") {\n        self.buffer += \"\\n\\n\";\n        self.parse();\n      }\n      // If we've flushed, parsed, and we're still on the INITIAL state then\n      // that means we don't have enough of the stream to parse the first\n      // line.\n      if (self.state === \"INITIAL\") {\n        throw new ParsingError(ParsingError.Errors.BadSignature);\n      }\n    } catch(e) {\n      self.reportOrThrowError(e);\n    }\n    self.onflush && self.onflush();\n    return this;\n  }\n};\n\nmodule.exports = WebVTT;\n","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar autoKeyword = \"auto\";\nvar directionSetting = {\n  \"\": 1,\n  \"lr\": 1,\n  \"rl\": 1\n};\nvar alignSetting = {\n  \"start\": 1,\n  \"center\": 1,\n  \"end\": 1,\n  \"left\": 1,\n  \"right\": 1,\n  \"auto\": 1,\n  \"line-left\": 1,\n  \"line-right\": 1\n};\n\nfunction findDirectionSetting(value) {\n  if (typeof value !== \"string\") {\n    return false;\n  }\n  var dir = directionSetting[value.toLowerCase()];\n  return dir ? value.toLowerCase() : false;\n}\n\nfunction findAlignSetting(value) {\n  if (typeof value !== \"string\") {\n    return false;\n  }\n  var align = alignSetting[value.toLowerCase()];\n  return align ? value.toLowerCase() : false;\n}\n\nfunction VTTCue(startTime, endTime, text) {\n  /**\n   * Shim implementation specific properties. These properties are not in\n   * the spec.\n   */\n\n  // Lets us know when the VTTCue's data has changed in such a way that we need\n  // to recompute its display state. This lets us compute its display state\n  // lazily.\n  this.hasBeenReset = false;\n\n  /**\n   * VTTCue and TextTrackCue properties\n   * http://dev.w3.org/html5/webvtt/#vttcue-interface\n   */\n\n  var _id = \"\";\n  var _pauseOnExit = false;\n  var _startTime = startTime;\n  var _endTime = endTime;\n  var _text = text;\n  var _region = null;\n  var _vertical = \"\";\n  var _snapToLines = true;\n  var _line = \"auto\";\n  var _lineAlign = \"start\";\n  var _position = \"auto\";\n  var _positionAlign = \"auto\";\n  var _size = 100;\n  var _align = \"center\";\n\n  Object.defineProperties(this, {\n    \"id\": {\n      enumerable: true,\n      get: function() {\n        return _id;\n      },\n      set: function(value) {\n        _id = \"\" + value;\n      }\n    },\n\n    \"pauseOnExit\": {\n      enumerable: true,\n      get: function() {\n        return _pauseOnExit;\n      },\n      set: function(value) {\n        _pauseOnExit = !!value;\n      }\n    },\n\n    \"startTime\": {\n      enumerable: true,\n      get: function() {\n        return _startTime;\n      },\n      set: function(value) {\n        if (typeof value !== \"number\") {\n          throw new TypeError(\"Start time must be set to a number.\");\n        }\n        _startTime = value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"endTime\": {\n      enumerable: true,\n      get: function() {\n        return _endTime;\n      },\n      set: function(value) {\n        if (typeof value !== \"number\") {\n          throw new TypeError(\"End time must be set to a number.\");\n        }\n        _endTime = value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"text\": {\n      enumerable: true,\n      get: function() {\n        return _text;\n      },\n      set: function(value) {\n        _text = \"\" + value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"region\": {\n      enumerable: true,\n      get: function() {\n        return _region;\n      },\n      set: function(value) {\n        _region = value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"vertical\": {\n      enumerable: true,\n      get: function() {\n        return _vertical;\n      },\n      set: function(value) {\n        var setting = findDirectionSetting(value);\n        // Have to check for false because the setting an be an empty string.\n        if (setting === false) {\n          throw new SyntaxError(\"Vertical: an invalid or illegal direction string was specified.\");\n        }\n        _vertical = setting;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"snapToLines\": {\n      enumerable: true,\n      get: function() {\n        return _snapToLines;\n      },\n      set: function(value) {\n        _snapToLines = !!value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"line\": {\n      enumerable: true,\n      get: function() {\n        return _line;\n      },\n      set: function(value) {\n        if (typeof value !== \"number\" && value !== autoKeyword) {\n          throw new SyntaxError(\"Line: an invalid number or illegal string was specified.\");\n        }\n        _line = value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"lineAlign\": {\n      enumerable: true,\n      get: function() {\n        return _lineAlign;\n      },\n      set: function(value) {\n        var setting = findAlignSetting(value);\n        if (!setting) {\n          console.warn(\"lineAlign: an invalid or illegal string was specified.\");\n        } else {\n          _lineAlign = setting;\n          this.hasBeenReset = true;\n        }\n      }\n    },\n\n    \"position\": {\n      enumerable: true,\n      get: function() {\n        return _position;\n      },\n      set: function(value) {\n        if (value < 0 || value > 100) {\n          throw new Error(\"Position must be between 0 and 100.\");\n        }\n        _position = value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"positionAlign\": {\n      enumerable: true,\n      get: function() {\n        return _positionAlign;\n      },\n      set: function(value) {\n        var setting = findAlignSetting(value);\n        if (!setting) {\n          console.warn(\"positionAlign: an invalid or illegal string was specified.\");\n        } else {\n          _positionAlign = setting;\n          this.hasBeenReset = true;\n        }\n      }\n    },\n\n    \"size\": {\n      enumerable: true,\n      get: function() {\n        return _size;\n      },\n      set: function(value) {\n        if (value < 0 || value > 100) {\n          throw new Error(\"Size must be between 0 and 100.\");\n        }\n        _size = value;\n        this.hasBeenReset = true;\n      }\n    },\n\n    \"align\": {\n      enumerable: true,\n      get: function() {\n        return _align;\n      },\n      set: function(value) {\n        var setting = findAlignSetting(value);\n        if (!setting) {\n          throw new SyntaxError(\"align: an invalid or illegal alignment string was specified.\");\n        }\n        _align = setting;\n        this.hasBeenReset = true;\n      }\n    }\n  });\n\n  /**\n   * Other  spec defined properties\n   */\n\n  // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#text-track-cue-display-state\n  this.displayState = undefined;\n}\n\n/**\n * VTTCue methods\n */\n\nVTTCue.prototype.getCueAsHTML = function() {\n  // Assume WebVTT.convertCueToDOMTree is on the global.\n  return WebVTT.convertCueToDOMTree(window, this.text);\n};\n\nmodule.exports = VTTCue;\n","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar scrollSetting = {\n  \"\": true,\n  \"up\": true\n};\n\nfunction findScrollSetting(value) {\n  if (typeof value !== \"string\") {\n    return false;\n  }\n  var scroll = scrollSetting[value.toLowerCase()];\n  return scroll ? value.toLowerCase() : false;\n}\n\nfunction isValidPercentValue(value) {\n  return typeof value === \"number\" && (value >= 0 && value <= 100);\n}\n\n// VTTRegion shim http://dev.w3.org/html5/webvtt/#vttregion-interface\nfunction VTTRegion() {\n  var _width = 100;\n  var _lines = 3;\n  var _regionAnchorX = 0;\n  var _regionAnchorY = 100;\n  var _viewportAnchorX = 0;\n  var _viewportAnchorY = 100;\n  var _scroll = \"\";\n\n  Object.defineProperties(this, {\n    \"width\": {\n      enumerable: true,\n      get: function() {\n        return _width;\n      },\n      set: function(value) {\n        if (!isValidPercentValue(value)) {\n          throw new Error(\"Width must be between 0 and 100.\");\n        }\n        _width = value;\n      }\n    },\n    \"lines\": {\n      enumerable: true,\n      get: function() {\n        return _lines;\n      },\n      set: function(value) {\n        if (typeof value !== \"number\") {\n          throw new TypeError(\"Lines must be set to a number.\");\n        }\n        _lines = value;\n      }\n    },\n    \"regionAnchorY\": {\n      enumerable: true,\n      get: function() {\n        return _regionAnchorY;\n      },\n      set: function(value) {\n        if (!isValidPercentValue(value)) {\n          throw new Error(\"RegionAnchorX must be between 0 and 100.\");\n        }\n        _regionAnchorY = value;\n      }\n    },\n    \"regionAnchorX\": {\n      enumerable: true,\n      get: function() {\n        return _regionAnchorX;\n      },\n      set: function(value) {\n        if(!isValidPercentValue(value)) {\n          throw new Error(\"RegionAnchorY must be between 0 and 100.\");\n        }\n        _regionAnchorX = value;\n      }\n    },\n    \"viewportAnchorY\": {\n      enumerable: true,\n      get: function() {\n        return _viewportAnchorY;\n      },\n      set: function(value) {\n        if (!isValidPercentValue(value)) {\n          throw new Error(\"ViewportAnchorY must be between 0 and 100.\");\n        }\n        _viewportAnchorY = value;\n      }\n    },\n    \"viewportAnchorX\": {\n      enumerable: true,\n      get: function() {\n        return _viewportAnchorX;\n      },\n      set: function(value) {\n        if (!isValidPercentValue(value)) {\n          throw new Error(\"ViewportAnchorX must be between 0 and 100.\");\n        }\n        _viewportAnchorX = value;\n      }\n    },\n    \"scroll\": {\n      enumerable: true,\n      get: function() {\n        return _scroll;\n      },\n      set: function(value) {\n        var setting = findScrollSetting(value);\n        // Have to check for false as an empty string is a legal value.\n        if (setting === false) {\n          console.warn(\"Scroll: an invalid or illegal string was specified.\");\n        } else {\n          _scroll = setting;\n        }\n      }\n    }\n  });\n}\n\nmodule.exports = VTTRegion;\n","/**\n * Copyright 2013 vtt.js Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Default exports for Node. Export the extended versions of VTTCue and\n// VTTRegion in Node since we likely want the capability to convert back and\n// forth between JSON. If we don't then it's not that big of a deal since we're\n// off browser.\n\nvar window = require('global/window');\n\nvar vttjs = module.exports = {\n  WebVTT: require(\"./vtt.js\"),\n  VTTCue: require(\"./vttcue.js\"),\n  VTTRegion: require(\"./vttregion.js\")\n};\n\nwindow.vttjs = vttjs;\nwindow.WebVTT = vttjs.WebVTT;\n\nvar cueShim = vttjs.VTTCue;\nvar regionShim = vttjs.VTTRegion;\nvar nativeVTTCue = window.VTTCue;\nvar nativeVTTRegion = window.VTTRegion;\n\nvttjs.shim = function() {\n  window.VTTCue = cueShim;\n  window.VTTRegion = regionShim;\n};\n\nvttjs.restore = function() {\n  window.VTTCue = nativeVTTCue;\n  window.VTTRegion = nativeVTTRegion;\n};\n\nif (!window.VTTCue) {\n  vttjs.shim();\n}\n","// see https://tools.ietf.org/html/rfc1808\n\n(function (root) {\n  var URL_REGEX =\n    /^(?=((?:[a-zA-Z0-9+\\-.]+:)?))\\1(?=((?:\\/\\/[^\\/?#]*)?))\\2(?=((?:(?:[^?#\\/]*\\/)*[^;?#\\/]*)?))\\3((?:;[^?#]*)?)(\\?[^#]*)?(#[^]*)?$/;\n  var FIRST_SEGMENT_REGEX = /^(?=([^\\/?#]*))\\1([^]*)$/;\n  var SLASH_DOT_REGEX = /(?:\\/|^)\\.(?=\\/)/g;\n  var SLASH_DOT_DOT_REGEX = /(?:\\/|^)\\.\\.\\/(?!\\.\\.\\/)[^\\/]*(?=\\/)/g;\n\n  var URLToolkit = {\n    // If opts.alwaysNormalize is true then the path will always be normalized even when it starts with / or //\n    // E.g\n    // With opts.alwaysNormalize = false (default, spec compliant)\n    // http://a.com/b/cd + /e/f/../g => http://a.com/e/f/../g\n    // With opts.alwaysNormalize = true (not spec compliant)\n    // http://a.com/b/cd + /e/f/../g => http://a.com/e/g\n    buildAbsoluteURL: function (baseURL, relativeURL, opts) {\n      opts = opts || {};\n      // remove any remaining space and CRLF\n      baseURL = baseURL.trim();\n      relativeURL = relativeURL.trim();\n      if (!relativeURL) {\n        // 2a) If the embedded URL is entirely empty, it inherits the\n        // entire base URL (i.e., is set equal to the base URL)\n        // and we are done.\n        if (!opts.alwaysNormalize) {\n          return baseURL;\n        }\n        var basePartsForNormalise = URLToolkit.parseURL(baseURL);\n        if (!basePartsForNormalise) {\n          throw new Error('Error trying to parse base URL.');\n        }\n        basePartsForNormalise.path = URLToolkit.normalizePath(\n          basePartsForNormalise.path\n        );\n        return URLToolkit.buildURLFromParts(basePartsForNormalise);\n      }\n      var relativeParts = URLToolkit.parseURL(relativeURL);\n      if (!relativeParts) {\n        throw new Error('Error trying to parse relative URL.');\n      }\n      if (relativeParts.scheme) {\n        // 2b) If the embedded URL starts with a scheme name, it is\n        // interpreted as an absolute URL and we are done.\n        if (!opts.alwaysNormalize) {\n          return relativeURL;\n        }\n        relativeParts.path = URLToolkit.normalizePath(relativeParts.path);\n        return URLToolkit.buildURLFromParts(relativeParts);\n      }\n      var baseParts = URLToolkit.parseURL(baseURL);\n      if (!baseParts) {\n        throw new Error('Error trying to parse base URL.');\n      }\n      if (!baseParts.netLoc && baseParts.path && baseParts.path[0] !== '/') {\n        // If netLoc missing and path doesn't start with '/', assume everthing before the first '/' is the netLoc\n        // This causes 'example.com/a' to be handled as '//example.com/a' instead of '/example.com/a'\n        var pathParts = FIRST_SEGMENT_REGEX.exec(baseParts.path);\n        baseParts.netLoc = pathParts[1];\n        baseParts.path = pathParts[2];\n      }\n      if (baseParts.netLoc && !baseParts.path) {\n        baseParts.path = '/';\n      }\n      var builtParts = {\n        // 2c) Otherwise, the embedded URL inherits the scheme of\n        // the base URL.\n        scheme: baseParts.scheme,\n        netLoc: relativeParts.netLoc,\n        path: null,\n        params: relativeParts.params,\n        query: relativeParts.query,\n        fragment: relativeParts.fragment,\n      };\n      if (!relativeParts.netLoc) {\n        // 3) If the embedded URL's  is non-empty, we skip to\n        // Step 7.  Otherwise, the embedded URL inherits the \n        // (if any) of the base URL.\n        builtParts.netLoc = baseParts.netLoc;\n        // 4) If the embedded URL path is preceded by a slash \"/\", the\n        // path is not relative and we skip to Step 7.\n        if (relativeParts.path[0] !== '/') {\n          if (!relativeParts.path) {\n            // 5) If the embedded URL path is empty (and not preceded by a\n            // slash), then the embedded URL inherits the base URL path\n            builtParts.path = baseParts.path;\n            // 5a) if the embedded URL's  is non-empty, we skip to\n            // step 7; otherwise, it inherits the  of the base\n            // URL (if any) and\n            if (!relativeParts.params) {\n              builtParts.params = baseParts.params;\n              // 5b) if the embedded URL's  is non-empty, we skip to\n              // step 7; otherwise, it inherits the  of the base\n              // URL (if any) and we skip to step 7.\n              if (!relativeParts.query) {\n                builtParts.query = baseParts.query;\n              }\n            }\n          } else {\n            // 6) The last segment of the base URL's path (anything\n            // following the rightmost slash \"/\", or the entire path if no\n            // slash is present) is removed and the embedded URL's path is\n            // appended in its place.\n            var baseURLPath = baseParts.path;\n            var newPath =\n              baseURLPath.substring(0, baseURLPath.lastIndexOf('/') + 1) +\n              relativeParts.path;\n            builtParts.path = URLToolkit.normalizePath(newPath);\n          }\n        }\n      }\n      if (builtParts.path === null) {\n        builtParts.path = opts.alwaysNormalize\n          ? URLToolkit.normalizePath(relativeParts.path)\n          : relativeParts.path;\n      }\n      return URLToolkit.buildURLFromParts(builtParts);\n    },\n    parseURL: function (url) {\n      var parts = URL_REGEX.exec(url);\n      if (!parts) {\n        return null;\n      }\n      return {\n        scheme: parts[1] || '',\n        netLoc: parts[2] || '',\n        path: parts[3] || '',\n        params: parts[4] || '',\n        query: parts[5] || '',\n        fragment: parts[6] || '',\n      };\n    },\n    normalizePath: function (path) {\n      // The following operations are\n      // then applied, in order, to the new path:\n      // 6a) All occurrences of \"./\", where \".\" is a complete path\n      // segment, are removed.\n      // 6b) If the path ends with \".\" as a complete path segment,\n      // that \".\" is removed.\n      path = path.split('').reverse().join('').replace(SLASH_DOT_REGEX, '');\n      // 6c) All occurrences of \"/../\", where  is a\n      // complete path segment not equal to \"..\", are removed.\n      // Removal of these path segments is performed iteratively,\n      // removing the leftmost matching pattern on each iteration,\n      // until no matching pattern remains.\n      // 6d) If the path ends with \"/..\", where  is a\n      // complete path segment not equal to \"..\", that\n      // \"/..\" is removed.\n      while (\n        path.length !== (path = path.replace(SLASH_DOT_DOT_REGEX, '')).length\n      ) {}\n      return path.split('').reverse().join('');\n    },\n    buildURLFromParts: function (parts) {\n      return (\n        parts.scheme +\n        parts.netLoc +\n        parts.path +\n        parts.params +\n        parts.query +\n        parts.fragment\n      );\n    },\n  };\n\n  if (typeof exports === 'object' && typeof module === 'object')\n    module.exports = URLToolkit;\n  else if (typeof define === 'function' && define.amd)\n    define([], function () {\n      return URLToolkit;\n    });\n  else if (typeof exports === 'object') exports['URLToolkit'] = URLToolkit;\n  else root['URLToolkit'] = URLToolkit;\n})(this);\n","import URLToolkit from 'url-toolkit';\nimport window from 'global/window';\nvar DEFAULT_LOCATION = 'http://example.com';\n\nvar resolveUrl = function resolveUrl(baseUrl, relativeUrl) {\n  // return early if we don't need to resolve\n  if (/^[a-z]+:/i.test(relativeUrl)) {\n    return relativeUrl;\n  } // if baseUrl is a data URI, ignore it and resolve everything relative to window.location\n\n\n  if (/^data:/.test(baseUrl)) {\n    baseUrl = window.location && window.location.href || '';\n  } // IE11 supports URL but not the URL constructor\n  // feature detect the behavior we want\n\n\n  var nativeURL = typeof window.URL === 'function';\n  var protocolLess = /^\\/\\//.test(baseUrl); // remove location if window.location isn't available (i.e. we're in node)\n  // and if baseUrl isn't an absolute url\n\n  var removeLocation = !window.location && !/\\/\\//i.test(baseUrl); // if the base URL is relative then combine with the current location\n\n  if (nativeURL) {\n    baseUrl = new window.URL(baseUrl, window.location || DEFAULT_LOCATION);\n  } else if (!/\\/\\//i.test(baseUrl)) {\n    baseUrl = URLToolkit.buildAbsoluteURL(window.location && window.location.href || '', baseUrl);\n  }\n\n  if (nativeURL) {\n    var newUrl = new URL(relativeUrl, baseUrl); // if we're a protocol-less url, remove the protocol\n    // and if we're location-less, remove the location\n    // otherwise, return the url unmodified\n\n    if (removeLocation) {\n      return newUrl.href.slice(DEFAULT_LOCATION.length);\n    } else if (protocolLess) {\n      return newUrl.href.slice(newUrl.protocol.length);\n    }\n\n    return newUrl.href;\n  }\n\n  return URLToolkit.buildAbsoluteURL(baseUrl, relativeUrl);\n};\n\nexport default resolveUrl;","/**\n * @file stream.js\n */\n\n/**\n * A lightweight readable stream implemention that handles event dispatching.\n *\n * @class Stream\n */\nvar Stream = /*#__PURE__*/function () {\n  function Stream() {\n    this.listeners = {};\n  }\n  /**\n   * Add a listener for a specified event type.\n   *\n   * @param {string} type the event name\n   * @param {Function} listener the callback to be invoked when an event of\n   * the specified type occurs\n   */\n\n\n  var _proto = Stream.prototype;\n\n  _proto.on = function on(type, listener) {\n    if (!this.listeners[type]) {\n      this.listeners[type] = [];\n    }\n\n    this.listeners[type].push(listener);\n  }\n  /**\n   * Remove a listener for a specified event type.\n   *\n   * @param {string} type the event name\n   * @param {Function} listener  a function previously registered for this\n   * type of event through `on`\n   * @return {boolean} if we could turn it off or not\n   */\n  ;\n\n  _proto.off = function off(type, listener) {\n    if (!this.listeners[type]) {\n      return false;\n    }\n\n    var index = this.listeners[type].indexOf(listener); // TODO: which is better?\n    // In Video.js we slice listener functions\n    // on trigger so that it does not mess up the order\n    // while we loop through.\n    //\n    // Here we slice on off so that the loop in trigger\n    // can continue using it's old reference to loop without\n    // messing up the order.\n\n    this.listeners[type] = this.listeners[type].slice(0);\n    this.listeners[type].splice(index, 1);\n    return index > -1;\n  }\n  /**\n   * Trigger an event of the specified type on this stream. Any additional\n   * arguments to this function are passed as parameters to event listeners.\n   *\n   * @param {string} type the event name\n   */\n  ;\n\n  _proto.trigger = function trigger(type) {\n    var callbacks = this.listeners[type];\n\n    if (!callbacks) {\n      return;\n    } // Slicing the arguments on every invocation of this method\n    // can add a significant amount of overhead. Avoid the\n    // intermediate object creation for the common case of a\n    // single callback argument\n\n\n    if (arguments.length === 2) {\n      var length = callbacks.length;\n\n      for (var i = 0; i < length; ++i) {\n        callbacks[i].call(this, arguments[1]);\n      }\n    } else {\n      var args = Array.prototype.slice.call(arguments, 1);\n      var _length = callbacks.length;\n\n      for (var _i = 0; _i < _length; ++_i) {\n        callbacks[_i].apply(this, args);\n      }\n    }\n  }\n  /**\n   * Destroys the stream and cleans up.\n   */\n  ;\n\n  _proto.dispose = function dispose() {\n    this.listeners = {};\n  }\n  /**\n   * Forwards all `data` events on this stream to the destination stream. The\n   * destination stream should provide a method `push` to receive the data\n   * events as they arrive.\n   *\n   * @param {Stream} destination the stream that will receive all `data` events\n   * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n   */\n  ;\n\n  _proto.pipe = function pipe(destination) {\n    this.on('data', function (data) {\n      destination.push(data);\n    });\n  };\n\n  return Stream;\n}();\n\nexport { Stream as default };","import window from 'global/window';\n\nvar atob = function atob(s) {\n  return window.atob ? window.atob(s) : Buffer.from(s, 'base64').toString('binary');\n};\n\nexport default function decodeB64ToUint8Array(b64Text) {\n  var decodedString = atob(b64Text);\n  var array = new Uint8Array(decodedString.length);\n\n  for (var i = 0; i < decodedString.length; i++) {\n    array[i] = decodedString.charCodeAt(i);\n  }\n\n  return array;\n}","/*! @name m3u8-parser @version 7.1.0 @license Apache-2.0 */\nimport Stream from '@videojs/vhs-utils/es/stream.js';\nimport _extends from '@babel/runtime/helpers/extends';\nimport decodeB64ToUint8Array from '@videojs/vhs-utils/es/decode-b64-to-uint8-array.js';\n\n/**\n * @file m3u8/line-stream.js\n */\n/**\n * A stream that buffers string input and generates a `data` event for each\n * line.\n *\n * @class LineStream\n * @extends Stream\n */\n\nclass LineStream extends Stream {\n  constructor() {\n    super();\n    this.buffer = '';\n  }\n  /**\n   * Add new data to be parsed.\n   *\n   * @param {string} data the text to process\n   */\n\n\n  push(data) {\n    let nextNewline;\n    this.buffer += data;\n    nextNewline = this.buffer.indexOf('\\n');\n\n    for (; nextNewline > -1; nextNewline = this.buffer.indexOf('\\n')) {\n      this.trigger('data', this.buffer.substring(0, nextNewline));\n      this.buffer = this.buffer.substring(nextNewline + 1);\n    }\n  }\n\n}\n\nconst TAB = String.fromCharCode(0x09);\n\nconst parseByterange = function (byterangeString) {\n  // optionally match and capture 0+ digits before `@`\n  // optionally match and capture 0+ digits after `@`\n  const match = /([0-9.]*)?@?([0-9.]*)?/.exec(byterangeString || '');\n  const result = {};\n\n  if (match[1]) {\n    result.length = parseInt(match[1], 10);\n  }\n\n  if (match[2]) {\n    result.offset = parseInt(match[2], 10);\n  }\n\n  return result;\n};\n/**\n * \"forgiving\" attribute list psuedo-grammar:\n * attributes -> keyvalue (',' keyvalue)*\n * keyvalue   -> key '=' value\n * key        -> [^=]*\n * value      -> '\"' [^\"]* '\"' | [^,]*\n */\n\n\nconst attributeSeparator = function () {\n  const key = '[^=]*';\n  const value = '\"[^\"]*\"|[^,]*';\n  const keyvalue = '(?:' + key + ')=(?:' + value + ')';\n  return new RegExp('(?:^|,)(' + keyvalue + ')');\n};\n/**\n * Parse attributes from a line given the separator\n *\n * @param {string} attributes the attribute line to parse\n */\n\n\nconst parseAttributes = function (attributes) {\n  const result = {};\n\n  if (!attributes) {\n    return result;\n  } // split the string using attributes as the separator\n\n\n  const attrs = attributes.split(attributeSeparator());\n  let i = attrs.length;\n  let attr;\n\n  while (i--) {\n    // filter out unmatched portions of the string\n    if (attrs[i] === '') {\n      continue;\n    } // split the key and value\n\n\n    attr = /([^=]*)=(.*)/.exec(attrs[i]).slice(1); // trim whitespace and remove optional quotes around the value\n\n    attr[0] = attr[0].replace(/^\\s+|\\s+$/g, '');\n    attr[1] = attr[1].replace(/^\\s+|\\s+$/g, '');\n    attr[1] = attr[1].replace(/^['\"](.*)['\"]$/g, '$1');\n    result[attr[0]] = attr[1];\n  }\n\n  return result;\n};\n/**\n * A line-level M3U8 parser event stream. It expects to receive input one\n * line at a time and performs a context-free parse of its contents. A stream\n * interpretation of a manifest can be useful if the manifest is expected to\n * be too large to fit comfortably into memory or the entirety of the input\n * is not immediately available. Otherwise, it's probably much easier to work\n * with a regular `Parser` object.\n *\n * Produces `data` events with an object that captures the parser's\n * interpretation of the input. That object has a property `tag` that is one\n * of `uri`, `comment`, or `tag`. URIs only have a single additional\n * property, `line`, which captures the entirety of the input without\n * interpretation. Comments similarly have a single additional property\n * `text` which is the input without the leading `#`.\n *\n * Tags always have a property `tagType` which is the lower-cased version of\n * the M3U8 directive without the `#EXT` or `#EXT-X-` prefix. For instance,\n * `#EXT-X-MEDIA-SEQUENCE` becomes `media-sequence` when parsed. Unrecognized\n * tags are given the tag type `unknown` and a single additional property\n * `data` with the remainder of the input.\n *\n * @class ParseStream\n * @extends Stream\n */\n\n\nclass ParseStream extends Stream {\n  constructor() {\n    super();\n    this.customParsers = [];\n    this.tagMappers = [];\n  }\n  /**\n   * Parses an additional line of input.\n   *\n   * @param {string} line a single line of an M3U8 file to parse\n   */\n\n\n  push(line) {\n    let match;\n    let event; // strip whitespace\n\n    line = line.trim();\n\n    if (line.length === 0) {\n      // ignore empty lines\n      return;\n    } // URIs\n\n\n    if (line[0] !== '#') {\n      this.trigger('data', {\n        type: 'uri',\n        uri: line\n      });\n      return;\n    } // map tags\n\n\n    const newLines = this.tagMappers.reduce((acc, mapper) => {\n      const mappedLine = mapper(line); // skip if unchanged\n\n      if (mappedLine === line) {\n        return acc;\n      }\n\n      return acc.concat([mappedLine]);\n    }, [line]);\n    newLines.forEach(newLine => {\n      for (let i = 0; i < this.customParsers.length; i++) {\n        if (this.customParsers[i].call(this, newLine)) {\n          return;\n        }\n      } // Comments\n\n\n      if (newLine.indexOf('#EXT') !== 0) {\n        this.trigger('data', {\n          type: 'comment',\n          text: newLine.slice(1)\n        });\n        return;\n      } // strip off any carriage returns here so the regex matching\n      // doesn't have to account for them.\n\n\n      newLine = newLine.replace('\\r', ''); // Tags\n\n      match = /^#EXTM3U/.exec(newLine);\n\n      if (match) {\n        this.trigger('data', {\n          type: 'tag',\n          tagType: 'm3u'\n        });\n        return;\n      }\n\n      match = /^#EXTINF:([0-9\\.]*)?,?(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'inf'\n        };\n\n        if (match[1]) {\n          event.duration = parseFloat(match[1]);\n        }\n\n        if (match[2]) {\n          event.title = match[2];\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'targetduration'\n        };\n\n        if (match[1]) {\n          event.duration = parseInt(match[1], 10);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-VERSION:([0-9.]*)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'version'\n        };\n\n        if (match[1]) {\n          event.version = parseInt(match[1], 10);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-MEDIA-SEQUENCE:(\\-?[0-9.]*)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'media-sequence'\n        };\n\n        if (match[1]) {\n          event.number = parseInt(match[1], 10);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-DISCONTINUITY-SEQUENCE:(\\-?[0-9.]*)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'discontinuity-sequence'\n        };\n\n        if (match[1]) {\n          event.number = parseInt(match[1], 10);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'playlist-type'\n        };\n\n        if (match[1]) {\n          event.playlistType = match[1];\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-BYTERANGE:(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = _extends(parseByterange(match[1]), {\n          type: 'tag',\n          tagType: 'byterange'\n        });\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'allow-cache'\n        };\n\n        if (match[1]) {\n          event.allowed = !/NO/.test(match[1]);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-MAP:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'map'\n        };\n\n        if (match[1]) {\n          const attributes = parseAttributes(match[1]);\n\n          if (attributes.URI) {\n            event.uri = attributes.URI;\n          }\n\n          if (attributes.BYTERANGE) {\n            event.byterange = parseByterange(attributes.BYTERANGE);\n          }\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-STREAM-INF:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'stream-inf'\n        };\n\n        if (match[1]) {\n          event.attributes = parseAttributes(match[1]);\n\n          if (event.attributes.RESOLUTION) {\n            const split = event.attributes.RESOLUTION.split('x');\n            const resolution = {};\n\n            if (split[0]) {\n              resolution.width = parseInt(split[0], 10);\n            }\n\n            if (split[1]) {\n              resolution.height = parseInt(split[1], 10);\n            }\n\n            event.attributes.RESOLUTION = resolution;\n          }\n\n          if (event.attributes.BANDWIDTH) {\n            event.attributes.BANDWIDTH = parseInt(event.attributes.BANDWIDTH, 10);\n          }\n\n          if (event.attributes['FRAME-RATE']) {\n            event.attributes['FRAME-RATE'] = parseFloat(event.attributes['FRAME-RATE']);\n          }\n\n          if (event.attributes['PROGRAM-ID']) {\n            event.attributes['PROGRAM-ID'] = parseInt(event.attributes['PROGRAM-ID'], 10);\n          }\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-MEDIA:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'media'\n        };\n\n        if (match[1]) {\n          event.attributes = parseAttributes(match[1]);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-ENDLIST/.exec(newLine);\n\n      if (match) {\n        this.trigger('data', {\n          type: 'tag',\n          tagType: 'endlist'\n        });\n        return;\n      }\n\n      match = /^#EXT-X-DISCONTINUITY/.exec(newLine);\n\n      if (match) {\n        this.trigger('data', {\n          type: 'tag',\n          tagType: 'discontinuity'\n        });\n        return;\n      }\n\n      match = /^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'program-date-time'\n        };\n\n        if (match[1]) {\n          event.dateTimeString = match[1];\n          event.dateTimeObject = new Date(match[1]);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-KEY:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'key'\n        };\n\n        if (match[1]) {\n          event.attributes = parseAttributes(match[1]); // parse the IV string into a Uint32Array\n\n          if (event.attributes.IV) {\n            if (event.attributes.IV.substring(0, 2).toLowerCase() === '0x') {\n              event.attributes.IV = event.attributes.IV.substring(2);\n            }\n\n            event.attributes.IV = event.attributes.IV.match(/.{8}/g);\n            event.attributes.IV[0] = parseInt(event.attributes.IV[0], 16);\n            event.attributes.IV[1] = parseInt(event.attributes.IV[1], 16);\n            event.attributes.IV[2] = parseInt(event.attributes.IV[2], 16);\n            event.attributes.IV[3] = parseInt(event.attributes.IV[3], 16);\n            event.attributes.IV = new Uint32Array(event.attributes.IV);\n          }\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-START:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'start'\n        };\n\n        if (match[1]) {\n          event.attributes = parseAttributes(match[1]);\n          event.attributes['TIME-OFFSET'] = parseFloat(event.attributes['TIME-OFFSET']);\n          event.attributes.PRECISE = /YES/.test(event.attributes.PRECISE);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'cue-out-cont'\n        };\n\n        if (match[1]) {\n          event.data = match[1];\n        } else {\n          event.data = '';\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-CUE-OUT:(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'cue-out'\n        };\n\n        if (match[1]) {\n          event.data = match[1];\n        } else {\n          event.data = '';\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-CUE-IN:(.*)?$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'cue-in'\n        };\n\n        if (match[1]) {\n          event.data = match[1];\n        } else {\n          event.data = '';\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-SKIP:(.*)$/.exec(newLine);\n\n      if (match && match[1]) {\n        event = {\n          type: 'tag',\n          tagType: 'skip'\n        };\n        event.attributes = parseAttributes(match[1]);\n\n        if (event.attributes.hasOwnProperty('SKIPPED-SEGMENTS')) {\n          event.attributes['SKIPPED-SEGMENTS'] = parseInt(event.attributes['SKIPPED-SEGMENTS'], 10);\n        }\n\n        if (event.attributes.hasOwnProperty('RECENTLY-REMOVED-DATERANGES')) {\n          event.attributes['RECENTLY-REMOVED-DATERANGES'] = event.attributes['RECENTLY-REMOVED-DATERANGES'].split(TAB);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-PART:(.*)$/.exec(newLine);\n\n      if (match && match[1]) {\n        event = {\n          type: 'tag',\n          tagType: 'part'\n        };\n        event.attributes = parseAttributes(match[1]);\n        ['DURATION'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = parseFloat(event.attributes[key]);\n          }\n        });\n        ['INDEPENDENT', 'GAP'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = /YES/.test(event.attributes[key]);\n          }\n        });\n\n        if (event.attributes.hasOwnProperty('BYTERANGE')) {\n          event.attributes.byterange = parseByterange(event.attributes.BYTERANGE);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-SERVER-CONTROL:(.*)$/.exec(newLine);\n\n      if (match && match[1]) {\n        event = {\n          type: 'tag',\n          tagType: 'server-control'\n        };\n        event.attributes = parseAttributes(match[1]);\n        ['CAN-SKIP-UNTIL', 'PART-HOLD-BACK', 'HOLD-BACK'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = parseFloat(event.attributes[key]);\n          }\n        });\n        ['CAN-SKIP-DATERANGES', 'CAN-BLOCK-RELOAD'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = /YES/.test(event.attributes[key]);\n          }\n        });\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-PART-INF:(.*)$/.exec(newLine);\n\n      if (match && match[1]) {\n        event = {\n          type: 'tag',\n          tagType: 'part-inf'\n        };\n        event.attributes = parseAttributes(match[1]);\n        ['PART-TARGET'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = parseFloat(event.attributes[key]);\n          }\n        });\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-PRELOAD-HINT:(.*)$/.exec(newLine);\n\n      if (match && match[1]) {\n        event = {\n          type: 'tag',\n          tagType: 'preload-hint'\n        };\n        event.attributes = parseAttributes(match[1]);\n        ['BYTERANGE-START', 'BYTERANGE-LENGTH'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = parseInt(event.attributes[key], 10);\n            const subkey = key === 'BYTERANGE-LENGTH' ? 'length' : 'offset';\n            event.attributes.byterange = event.attributes.byterange || {};\n            event.attributes.byterange[subkey] = event.attributes[key]; // only keep the parsed byterange object.\n\n            delete event.attributes[key];\n          }\n        });\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-RENDITION-REPORT:(.*)$/.exec(newLine);\n\n      if (match && match[1]) {\n        event = {\n          type: 'tag',\n          tagType: 'rendition-report'\n        };\n        event.attributes = parseAttributes(match[1]);\n        ['LAST-MSN', 'LAST-PART'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = parseInt(event.attributes[key], 10);\n          }\n        });\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-DATERANGE:(.*)$/.exec(newLine);\n\n      if (match && match[1]) {\n        event = {\n          type: 'tag',\n          tagType: 'daterange'\n        };\n        event.attributes = parseAttributes(match[1]);\n        ['ID', 'CLASS'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = String(event.attributes[key]);\n          }\n        });\n        ['START-DATE', 'END-DATE'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = new Date(event.attributes[key]);\n          }\n        });\n        ['DURATION', 'PLANNED-DURATION'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = parseFloat(event.attributes[key]);\n          }\n        });\n        ['END-ON-NEXT'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = /YES/i.test(event.attributes[key]);\n          }\n        });\n        ['SCTE35-CMD', ' SCTE35-OUT', 'SCTE35-IN'].forEach(function (key) {\n          if (event.attributes.hasOwnProperty(key)) {\n            event.attributes[key] = event.attributes[key].toString(16);\n          }\n        });\n        const clientAttributePattern = /^X-([A-Z]+-)+[A-Z]+$/;\n\n        for (const key in event.attributes) {\n          if (!clientAttributePattern.test(key)) {\n            continue;\n          }\n\n          const isHexaDecimal = /[0-9A-Fa-f]{6}/g.test(event.attributes[key]);\n          const isDecimalFloating = /^\\d+(\\.\\d+)?$/.test(event.attributes[key]);\n          event.attributes[key] = isHexaDecimal ? event.attributes[key].toString(16) : isDecimalFloating ? parseFloat(event.attributes[key]) : String(event.attributes[key]);\n        }\n\n        this.trigger('data', event);\n        return;\n      }\n\n      match = /^#EXT-X-INDEPENDENT-SEGMENTS/.exec(newLine);\n\n      if (match) {\n        this.trigger('data', {\n          type: 'tag',\n          tagType: 'independent-segments'\n        });\n        return;\n      }\n\n      match = /^#EXT-X-CONTENT-STEERING:(.*)$/.exec(newLine);\n\n      if (match) {\n        event = {\n          type: 'tag',\n          tagType: 'content-steering'\n        };\n        event.attributes = parseAttributes(match[1]);\n        this.trigger('data', event);\n        return;\n      } // unknown tag type\n\n\n      this.trigger('data', {\n        type: 'tag',\n        data: newLine.slice(4)\n      });\n    });\n  }\n  /**\n   * Add a parser for custom headers\n   *\n   * @param {Object}   options              a map of options for the added parser\n   * @param {RegExp}   options.expression   a regular expression to match the custom header\n   * @param {string}   options.customType   the custom type to register to the output\n   * @param {Function} [options.dataParser] function to parse the line into an object\n   * @param {boolean}  [options.segment]    should tag data be attached to the segment object\n   */\n\n\n  addParser({\n    expression,\n    customType,\n    dataParser,\n    segment\n  }) {\n    if (typeof dataParser !== 'function') {\n      dataParser = line => line;\n    }\n\n    this.customParsers.push(line => {\n      const match = expression.exec(line);\n\n      if (match) {\n        this.trigger('data', {\n          type: 'custom',\n          data: dataParser(line),\n          customType,\n          segment\n        });\n        return true;\n      }\n    });\n  }\n  /**\n   * Add a custom header mapper\n   *\n   * @param {Object}   options\n   * @param {RegExp}   options.expression   a regular expression to match the custom header\n   * @param {Function} options.map          function to translate tag into a different tag\n   */\n\n\n  addTagMapper({\n    expression,\n    map\n  }) {\n    const mapFn = line => {\n      if (expression.test(line)) {\n        return map(line);\n      }\n\n      return line;\n    };\n\n    this.tagMappers.push(mapFn);\n  }\n\n}\n\nconst camelCase = str => str.toLowerCase().replace(/-(\\w)/g, a => a[1].toUpperCase());\n\nconst camelCaseKeys = function (attributes) {\n  const result = {};\n  Object.keys(attributes).forEach(function (key) {\n    result[camelCase(key)] = attributes[key];\n  });\n  return result;\n}; // set SERVER-CONTROL hold back based upon targetDuration and partTargetDuration\n// we need this helper because defaults are based upon targetDuration and\n// partTargetDuration being set, but they may not be if SERVER-CONTROL appears before\n// target durations are set.\n\n\nconst setHoldBack = function (manifest) {\n  const {\n    serverControl,\n    targetDuration,\n    partTargetDuration\n  } = manifest;\n\n  if (!serverControl) {\n    return;\n  }\n\n  const tag = '#EXT-X-SERVER-CONTROL';\n  const hb = 'holdBack';\n  const phb = 'partHoldBack';\n  const minTargetDuration = targetDuration && targetDuration * 3;\n  const minPartDuration = partTargetDuration && partTargetDuration * 2;\n\n  if (targetDuration && !serverControl.hasOwnProperty(hb)) {\n    serverControl[hb] = minTargetDuration;\n    this.trigger('info', {\n      message: `${tag} defaulting HOLD-BACK to targetDuration * 3 (${minTargetDuration}).`\n    });\n  }\n\n  if (minTargetDuration && serverControl[hb] < minTargetDuration) {\n    this.trigger('warn', {\n      message: `${tag} clamping HOLD-BACK (${serverControl[hb]}) to targetDuration * 3 (${minTargetDuration})`\n    });\n    serverControl[hb] = minTargetDuration;\n  } // default no part hold back to part target duration * 3\n\n\n  if (partTargetDuration && !serverControl.hasOwnProperty(phb)) {\n    serverControl[phb] = partTargetDuration * 3;\n    this.trigger('info', {\n      message: `${tag} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${serverControl[phb]}).`\n    });\n  } // if part hold back is too small default it to part target duration * 2\n\n\n  if (partTargetDuration && serverControl[phb] < minPartDuration) {\n    this.trigger('warn', {\n      message: `${tag} clamping PART-HOLD-BACK (${serverControl[phb]}) to partTargetDuration * 2 (${minPartDuration}).`\n    });\n    serverControl[phb] = minPartDuration;\n  }\n};\n/**\n * A parser for M3U8 files. The current interpretation of the input is\n * exposed as a property `manifest` on parser objects. It's just two lines to\n * create and parse a manifest once you have the contents available as a string:\n *\n * ```js\n * var parser = new m3u8.Parser();\n * parser.push(xhr.responseText);\n * ```\n *\n * New input can later be applied to update the manifest object by calling\n * `push` again.\n *\n * The parser attempts to create a usable manifest object even if the\n * underlying input is somewhat nonsensical. It emits `info` and `warning`\n * events during the parse if it encounters input that seems invalid or\n * requires some property of the manifest object to be defaulted.\n *\n * @class Parser\n * @extends Stream\n */\n\n\nclass Parser extends Stream {\n  constructor() {\n    super();\n    this.lineStream = new LineStream();\n    this.parseStream = new ParseStream();\n    this.lineStream.pipe(this.parseStream);\n    this.lastProgramDateTime = null;\n    /* eslint-disable consistent-this */\n\n    const self = this;\n    /* eslint-enable consistent-this */\n\n    const uris = [];\n    let currentUri = {}; // if specified, the active EXT-X-MAP definition\n\n    let currentMap; // if specified, the active decryption key\n\n    let key;\n    let hasParts = false;\n\n    const noop = function () {};\n\n    const defaultMediaGroups = {\n      'AUDIO': {},\n      'VIDEO': {},\n      'CLOSED-CAPTIONS': {},\n      'SUBTITLES': {}\n    }; // This is the Widevine UUID from DASH IF IOP. The same exact string is\n    // used in MPDs with Widevine encrypted streams.\n\n    const widevineUuid = 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed'; // group segments into numbered timelines delineated by discontinuities\n\n    let currentTimeline = 0; // the manifest is empty until the parse stream begins delivering data\n\n    this.manifest = {\n      allowCache: true,\n      discontinuityStarts: [],\n      dateRanges: [],\n      segments: []\n    }; // keep track of the last seen segment's byte range end, as segments are not required\n    // to provide the offset, in which case it defaults to the next byte after the\n    // previous segment\n\n    let lastByterangeEnd = 0; // keep track of the last seen part's byte range end.\n\n    let lastPartByterangeEnd = 0;\n    const dateRangeTags = {};\n    this.on('end', () => {\n      // only add preloadSegment if we don't yet have a uri for it.\n      // and we actually have parts/preloadHints\n      if (currentUri.uri || !currentUri.parts && !currentUri.preloadHints) {\n        return;\n      }\n\n      if (!currentUri.map && currentMap) {\n        currentUri.map = currentMap;\n      }\n\n      if (!currentUri.key && key) {\n        currentUri.key = key;\n      }\n\n      if (!currentUri.timeline && typeof currentTimeline === 'number') {\n        currentUri.timeline = currentTimeline;\n      }\n\n      this.manifest.preloadSegment = currentUri;\n    }); // update the manifest with the m3u8 entry from the parse stream\n\n    this.parseStream.on('data', function (entry) {\n      let mediaGroup;\n      let rendition;\n      ({\n        tag() {\n          // switch based on the tag type\n          (({\n            version() {\n              if (entry.version) {\n                this.manifest.version = entry.version;\n              }\n            },\n\n            'allow-cache'() {\n              this.manifest.allowCache = entry.allowed;\n\n              if (!('allowed' in entry)) {\n                this.trigger('info', {\n                  message: 'defaulting allowCache to YES'\n                });\n                this.manifest.allowCache = true;\n              }\n            },\n\n            byterange() {\n              const byterange = {};\n\n              if ('length' in entry) {\n                currentUri.byterange = byterange;\n                byterange.length = entry.length;\n\n                if (!('offset' in entry)) {\n                  /*\n                   * From the latest spec (as of this writing):\n                   * https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.2.2\n                   *\n                   * Same text since EXT-X-BYTERANGE's introduction in draft 7:\n                   * https://tools.ietf.org/html/draft-pantos-http-live-streaming-07#section-3.3.1)\n                   *\n                   * \"If o [offset] is not present, the sub-range begins at the next byte\n                   * following the sub-range of the previous media segment.\"\n                   */\n                  entry.offset = lastByterangeEnd;\n                }\n              }\n\n              if ('offset' in entry) {\n                currentUri.byterange = byterange;\n                byterange.offset = entry.offset;\n              }\n\n              lastByterangeEnd = byterange.offset + byterange.length;\n            },\n\n            endlist() {\n              this.manifest.endList = true;\n            },\n\n            inf() {\n              if (!('mediaSequence' in this.manifest)) {\n                this.manifest.mediaSequence = 0;\n                this.trigger('info', {\n                  message: 'defaulting media sequence to zero'\n                });\n              }\n\n              if (!('discontinuitySequence' in this.manifest)) {\n                this.manifest.discontinuitySequence = 0;\n                this.trigger('info', {\n                  message: 'defaulting discontinuity sequence to zero'\n                });\n              }\n\n              if (entry.title) {\n                currentUri.title = entry.title;\n              }\n\n              if (entry.duration > 0) {\n                currentUri.duration = entry.duration;\n              }\n\n              if (entry.duration === 0) {\n                currentUri.duration = 0.01;\n                this.trigger('info', {\n                  message: 'updating zero segment duration to a small value'\n                });\n              }\n\n              this.manifest.segments = uris;\n            },\n\n            key() {\n              if (!entry.attributes) {\n                this.trigger('warn', {\n                  message: 'ignoring key declaration without attribute list'\n                });\n                return;\n              } // clear the active encryption key\n\n\n              if (entry.attributes.METHOD === 'NONE') {\n                key = null;\n                return;\n              }\n\n              if (!entry.attributes.URI) {\n                this.trigger('warn', {\n                  message: 'ignoring key declaration without URI'\n                });\n                return;\n              }\n\n              if (entry.attributes.KEYFORMAT === 'com.apple.streamingkeydelivery') {\n                this.manifest.contentProtection = this.manifest.contentProtection || {}; // TODO: add full support for this.\n\n                this.manifest.contentProtection['com.apple.fps.1_0'] = {\n                  attributes: entry.attributes\n                };\n                return;\n              }\n\n              if (entry.attributes.KEYFORMAT === 'com.microsoft.playready') {\n                this.manifest.contentProtection = this.manifest.contentProtection || {}; // TODO: add full support for this.\n\n                this.manifest.contentProtection['com.microsoft.playready'] = {\n                  uri: entry.attributes.URI\n                };\n                return;\n              } // check if the content is encrypted for Widevine\n              // Widevine/HLS spec: https://storage.googleapis.com/wvdocs/Widevine_DRM_HLS.pdf\n\n\n              if (entry.attributes.KEYFORMAT === widevineUuid) {\n                const VALID_METHODS = ['SAMPLE-AES', 'SAMPLE-AES-CTR', 'SAMPLE-AES-CENC'];\n\n                if (VALID_METHODS.indexOf(entry.attributes.METHOD) === -1) {\n                  this.trigger('warn', {\n                    message: 'invalid key method provided for Widevine'\n                  });\n                  return;\n                }\n\n                if (entry.attributes.METHOD === 'SAMPLE-AES-CENC') {\n                  this.trigger('warn', {\n                    message: 'SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead'\n                  });\n                }\n\n                if (entry.attributes.URI.substring(0, 23) !== 'data:text/plain;base64,') {\n                  this.trigger('warn', {\n                    message: 'invalid key URI provided for Widevine'\n                  });\n                  return;\n                }\n\n                if (!(entry.attributes.KEYID && entry.attributes.KEYID.substring(0, 2) === '0x')) {\n                  this.trigger('warn', {\n                    message: 'invalid key ID provided for Widevine'\n                  });\n                  return;\n                } // if Widevine key attributes are valid, store them as `contentProtection`\n                // on the manifest to emulate Widevine tag structure in a DASH mpd\n\n\n                this.manifest.contentProtection = this.manifest.contentProtection || {};\n                this.manifest.contentProtection['com.widevine.alpha'] = {\n                  attributes: {\n                    schemeIdUri: entry.attributes.KEYFORMAT,\n                    // remove '0x' from the key id string\n                    keyId: entry.attributes.KEYID.substring(2)\n                  },\n                  // decode the base64-encoded PSSH box\n                  pssh: decodeB64ToUint8Array(entry.attributes.URI.split(',')[1])\n                };\n                return;\n              }\n\n              if (!entry.attributes.METHOD) {\n                this.trigger('warn', {\n                  message: 'defaulting key method to AES-128'\n                });\n              } // setup an encryption key for upcoming segments\n\n\n              key = {\n                method: entry.attributes.METHOD || 'AES-128',\n                uri: entry.attributes.URI\n              };\n\n              if (typeof entry.attributes.IV !== 'undefined') {\n                key.iv = entry.attributes.IV;\n              }\n            },\n\n            'media-sequence'() {\n              if (!isFinite(entry.number)) {\n                this.trigger('warn', {\n                  message: 'ignoring invalid media sequence: ' + entry.number\n                });\n                return;\n              }\n\n              this.manifest.mediaSequence = entry.number;\n            },\n\n            'discontinuity-sequence'() {\n              if (!isFinite(entry.number)) {\n                this.trigger('warn', {\n                  message: 'ignoring invalid discontinuity sequence: ' + entry.number\n                });\n                return;\n              }\n\n              this.manifest.discontinuitySequence = entry.number;\n              currentTimeline = entry.number;\n            },\n\n            'playlist-type'() {\n              if (!/VOD|EVENT/.test(entry.playlistType)) {\n                this.trigger('warn', {\n                  message: 'ignoring unknown playlist type: ' + entry.playlist\n                });\n                return;\n              }\n\n              this.manifest.playlistType = entry.playlistType;\n            },\n\n            map() {\n              currentMap = {};\n\n              if (entry.uri) {\n                currentMap.uri = entry.uri;\n              }\n\n              if (entry.byterange) {\n                currentMap.byterange = entry.byterange;\n              }\n\n              if (key) {\n                currentMap.key = key;\n              }\n            },\n\n            'stream-inf'() {\n              this.manifest.playlists = uris;\n              this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\n\n              if (!entry.attributes) {\n                this.trigger('warn', {\n                  message: 'ignoring empty stream-inf attributes'\n                });\n                return;\n              }\n\n              if (!currentUri.attributes) {\n                currentUri.attributes = {};\n              }\n\n              _extends(currentUri.attributes, entry.attributes);\n            },\n\n            media() {\n              this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\n\n              if (!(entry.attributes && entry.attributes.TYPE && entry.attributes['GROUP-ID'] && entry.attributes.NAME)) {\n                this.trigger('warn', {\n                  message: 'ignoring incomplete or missing media group'\n                });\n                return;\n              } // find the media group, creating defaults as necessary\n\n\n              const mediaGroupType = this.manifest.mediaGroups[entry.attributes.TYPE];\n              mediaGroupType[entry.attributes['GROUP-ID']] = mediaGroupType[entry.attributes['GROUP-ID']] || {};\n              mediaGroup = mediaGroupType[entry.attributes['GROUP-ID']]; // collect the rendition metadata\n\n              rendition = {\n                default: /yes/i.test(entry.attributes.DEFAULT)\n              };\n\n              if (rendition.default) {\n                rendition.autoselect = true;\n              } else {\n                rendition.autoselect = /yes/i.test(entry.attributes.AUTOSELECT);\n              }\n\n              if (entry.attributes.LANGUAGE) {\n                rendition.language = entry.attributes.LANGUAGE;\n              }\n\n              if (entry.attributes.URI) {\n                rendition.uri = entry.attributes.URI;\n              }\n\n              if (entry.attributes['INSTREAM-ID']) {\n                rendition.instreamId = entry.attributes['INSTREAM-ID'];\n              }\n\n              if (entry.attributes.CHARACTERISTICS) {\n                rendition.characteristics = entry.attributes.CHARACTERISTICS;\n              }\n\n              if (entry.attributes.FORCED) {\n                rendition.forced = /yes/i.test(entry.attributes.FORCED);\n              } // insert the new rendition\n\n\n              mediaGroup[entry.attributes.NAME] = rendition;\n            },\n\n            discontinuity() {\n              currentTimeline += 1;\n              currentUri.discontinuity = true;\n              this.manifest.discontinuityStarts.push(uris.length);\n            },\n\n            'program-date-time'() {\n              if (typeof this.manifest.dateTimeString === 'undefined') {\n                // PROGRAM-DATE-TIME is a media-segment tag, but for backwards\n                // compatibility, we add the first occurence of the PROGRAM-DATE-TIME tag\n                // to the manifest object\n                // TODO: Consider removing this in future major version\n                this.manifest.dateTimeString = entry.dateTimeString;\n                this.manifest.dateTimeObject = entry.dateTimeObject;\n              }\n\n              currentUri.dateTimeString = entry.dateTimeString;\n              currentUri.dateTimeObject = entry.dateTimeObject;\n              const {\n                lastProgramDateTime\n              } = this;\n              this.lastProgramDateTime = new Date(entry.dateTimeString).getTime(); // We should extrapolate Program Date Time backward only during first program date time occurrence.\n              // Once we have at least one program date time point, we can always extrapolate it forward using lastProgramDateTime reference.\n\n              if (lastProgramDateTime === null) {\n                // Extrapolate Program Date Time backward\n                // Since it is first program date time occurrence we're assuming that\n                // all this.manifest.segments have no program date time info\n                this.manifest.segments.reduceRight((programDateTime, segment) => {\n                  segment.programDateTime = programDateTime - segment.duration * 1000;\n                  return segment.programDateTime;\n                }, this.lastProgramDateTime);\n              }\n            },\n\n            targetduration() {\n              if (!isFinite(entry.duration) || entry.duration < 0) {\n                this.trigger('warn', {\n                  message: 'ignoring invalid target duration: ' + entry.duration\n                });\n                return;\n              }\n\n              this.manifest.targetDuration = entry.duration;\n              setHoldBack.call(this, this.manifest);\n            },\n\n            start() {\n              if (!entry.attributes || isNaN(entry.attributes['TIME-OFFSET'])) {\n                this.trigger('warn', {\n                  message: 'ignoring start declaration without appropriate attribute list'\n                });\n                return;\n              }\n\n              this.manifest.start = {\n                timeOffset: entry.attributes['TIME-OFFSET'],\n                precise: entry.attributes.PRECISE\n              };\n            },\n\n            'cue-out'() {\n              currentUri.cueOut = entry.data;\n            },\n\n            'cue-out-cont'() {\n              currentUri.cueOutCont = entry.data;\n            },\n\n            'cue-in'() {\n              currentUri.cueIn = entry.data;\n            },\n\n            'skip'() {\n              this.manifest.skip = camelCaseKeys(entry.attributes);\n              this.warnOnMissingAttributes_('#EXT-X-SKIP', entry.attributes, ['SKIPPED-SEGMENTS']);\n            },\n\n            'part'() {\n              hasParts = true; // parts are always specifed before a segment\n\n              const segmentIndex = this.manifest.segments.length;\n              const part = camelCaseKeys(entry.attributes);\n              currentUri.parts = currentUri.parts || [];\n              currentUri.parts.push(part);\n\n              if (part.byterange) {\n                if (!part.byterange.hasOwnProperty('offset')) {\n                  part.byterange.offset = lastPartByterangeEnd;\n                }\n\n                lastPartByterangeEnd = part.byterange.offset + part.byterange.length;\n              }\n\n              const partIndex = currentUri.parts.length - 1;\n              this.warnOnMissingAttributes_(`#EXT-X-PART #${partIndex} for segment #${segmentIndex}`, entry.attributes, ['URI', 'DURATION']);\n\n              if (this.manifest.renditionReports) {\n                this.manifest.renditionReports.forEach((r, i) => {\n                  if (!r.hasOwnProperty('lastPart')) {\n                    this.trigger('warn', {\n                      message: `#EXT-X-RENDITION-REPORT #${i} lacks required attribute(s): LAST-PART`\n                    });\n                  }\n                });\n              }\n            },\n\n            'server-control'() {\n              const attrs = this.manifest.serverControl = camelCaseKeys(entry.attributes);\n\n              if (!attrs.hasOwnProperty('canBlockReload')) {\n                attrs.canBlockReload = false;\n                this.trigger('info', {\n                  message: '#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false'\n                });\n              }\n\n              setHoldBack.call(this, this.manifest);\n\n              if (attrs.canSkipDateranges && !attrs.hasOwnProperty('canSkipUntil')) {\n                this.trigger('warn', {\n                  message: '#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set'\n                });\n              }\n            },\n\n            'preload-hint'() {\n              // parts are always specifed before a segment\n              const segmentIndex = this.manifest.segments.length;\n              const hint = camelCaseKeys(entry.attributes);\n              const isPart = hint.type && hint.type === 'PART';\n              currentUri.preloadHints = currentUri.preloadHints || [];\n              currentUri.preloadHints.push(hint);\n\n              if (hint.byterange) {\n                if (!hint.byterange.hasOwnProperty('offset')) {\n                  // use last part byterange end or zero if not a part.\n                  hint.byterange.offset = isPart ? lastPartByterangeEnd : 0;\n\n                  if (isPart) {\n                    lastPartByterangeEnd = hint.byterange.offset + hint.byterange.length;\n                  }\n                }\n              }\n\n              const index = currentUri.preloadHints.length - 1;\n              this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${index} for segment #${segmentIndex}`, entry.attributes, ['TYPE', 'URI']);\n\n              if (!hint.type) {\n                return;\n              } // search through all preload hints except for the current one for\n              // a duplicate type.\n\n\n              for (let i = 0; i < currentUri.preloadHints.length - 1; i++) {\n                const otherHint = currentUri.preloadHints[i];\n\n                if (!otherHint.type) {\n                  continue;\n                }\n\n                if (otherHint.type === hint.type) {\n                  this.trigger('warn', {\n                    message: `#EXT-X-PRELOAD-HINT #${index} for segment #${segmentIndex} has the same TYPE ${hint.type} as preload hint #${i}`\n                  });\n                }\n              }\n            },\n\n            'rendition-report'() {\n              const report = camelCaseKeys(entry.attributes);\n              this.manifest.renditionReports = this.manifest.renditionReports || [];\n              this.manifest.renditionReports.push(report);\n              const index = this.manifest.renditionReports.length - 1;\n              const required = ['LAST-MSN', 'URI'];\n\n              if (hasParts) {\n                required.push('LAST-PART');\n              }\n\n              this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${index}`, entry.attributes, required);\n            },\n\n            'part-inf'() {\n              this.manifest.partInf = camelCaseKeys(entry.attributes);\n              this.warnOnMissingAttributes_('#EXT-X-PART-INF', entry.attributes, ['PART-TARGET']);\n\n              if (this.manifest.partInf.partTarget) {\n                this.manifest.partTargetDuration = this.manifest.partInf.partTarget;\n              }\n\n              setHoldBack.call(this, this.manifest);\n            },\n\n            'daterange'() {\n              this.manifest.dateRanges.push(camelCaseKeys(entry.attributes));\n              const index = this.manifest.dateRanges.length - 1;\n              this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${index}`, entry.attributes, ['ID', 'START-DATE']);\n              const dateRange = this.manifest.dateRanges[index];\n\n              if (dateRange.endDate && dateRange.startDate && new Date(dateRange.endDate) < new Date(dateRange.startDate)) {\n                this.trigger('warn', {\n                  message: 'EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE'\n                });\n              }\n\n              if (dateRange.duration && dateRange.duration < 0) {\n                this.trigger('warn', {\n                  message: 'EXT-X-DATERANGE DURATION must not be negative'\n                });\n              }\n\n              if (dateRange.plannedDuration && dateRange.plannedDuration < 0) {\n                this.trigger('warn', {\n                  message: 'EXT-X-DATERANGE PLANNED-DURATION must not be negative'\n                });\n              }\n\n              const endOnNextYes = !!dateRange.endOnNext;\n\n              if (endOnNextYes && !dateRange.class) {\n                this.trigger('warn', {\n                  message: 'EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute'\n                });\n              }\n\n              if (endOnNextYes && (dateRange.duration || dateRange.endDate)) {\n                this.trigger('warn', {\n                  message: 'EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes'\n                });\n              }\n\n              if (dateRange.duration && dateRange.endDate) {\n                const startDate = dateRange.startDate;\n                const newDateInSeconds = startDate.getTime() + dateRange.duration * 1000;\n                this.manifest.dateRanges[index].endDate = new Date(newDateInSeconds);\n              }\n\n              if (!dateRangeTags[dateRange.id]) {\n                dateRangeTags[dateRange.id] = dateRange;\n              } else {\n                for (const attribute in dateRangeTags[dateRange.id]) {\n                  if (!!dateRange[attribute] && JSON.stringify(dateRangeTags[dateRange.id][attribute]) !== JSON.stringify(dateRange[attribute])) {\n                    this.trigger('warn', {\n                      message: 'EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values'\n                    });\n                    break;\n                  }\n                } // if tags with the same ID do not have conflicting attributes, merge them\n\n\n                const dateRangeWithSameId = this.manifest.dateRanges.findIndex(dateRangeToFind => dateRangeToFind.id === dateRange.id);\n                this.manifest.dateRanges[dateRangeWithSameId] = _extends(this.manifest.dateRanges[dateRangeWithSameId], dateRange);\n                dateRangeTags[dateRange.id] = _extends(dateRangeTags[dateRange.id], dateRange); // after merging, delete the duplicate dateRange that was added last\n\n                this.manifest.dateRanges.pop();\n              }\n            },\n\n            'independent-segments'() {\n              this.manifest.independentSegments = true;\n            },\n\n            'content-steering'() {\n              this.manifest.contentSteering = camelCaseKeys(entry.attributes);\n              this.warnOnMissingAttributes_('#EXT-X-CONTENT-STEERING', entry.attributes, ['SERVER-URI']);\n            }\n\n          })[entry.tagType] || noop).call(self);\n        },\n\n        uri() {\n          currentUri.uri = entry.uri;\n          uris.push(currentUri); // if no explicit duration was declared, use the target duration\n\n          if (this.manifest.targetDuration && !('duration' in currentUri)) {\n            this.trigger('warn', {\n              message: 'defaulting segment duration to the target duration'\n            });\n            currentUri.duration = this.manifest.targetDuration;\n          } // annotate with encryption information, if necessary\n\n\n          if (key) {\n            currentUri.key = key;\n          }\n\n          currentUri.timeline = currentTimeline; // annotate with initialization segment information, if necessary\n\n          if (currentMap) {\n            currentUri.map = currentMap;\n          } // reset the last byterange end as it needs to be 0 between parts\n\n\n          lastPartByterangeEnd = 0; // Once we have at least one program date time we can always extrapolate it forward\n\n          if (this.lastProgramDateTime !== null) {\n            currentUri.programDateTime = this.lastProgramDateTime;\n            this.lastProgramDateTime += currentUri.duration * 1000;\n          } // prepare for the next URI\n\n\n          currentUri = {};\n        },\n\n        comment() {// comments are not important for playback\n        },\n\n        custom() {\n          // if this is segment-level data attach the output to the segment\n          if (entry.segment) {\n            currentUri.custom = currentUri.custom || {};\n            currentUri.custom[entry.customType] = entry.data; // if this is manifest-level data attach to the top level manifest object\n          } else {\n            this.manifest.custom = this.manifest.custom || {};\n            this.manifest.custom[entry.customType] = entry.data;\n          }\n        }\n\n      })[entry.type].call(self);\n    });\n  }\n\n  warnOnMissingAttributes_(identifier, attributes, required) {\n    const missing = [];\n    required.forEach(function (key) {\n      if (!attributes.hasOwnProperty(key)) {\n        missing.push(key);\n      }\n    });\n\n    if (missing.length) {\n      this.trigger('warn', {\n        message: `${identifier} lacks required attribute(s): ${missing.join(', ')}`\n      });\n    }\n  }\n  /**\n   * Parse the input string and update the manifest object.\n   *\n   * @param {string} chunk a potentially incomplete portion of the manifest\n   */\n\n\n  push(chunk) {\n    this.lineStream.push(chunk);\n  }\n  /**\n   * Flush any remaining input. This can be handy if the last line of an M3U8\n   * manifest did not contain a trailing newline but the file has been\n   * completely received.\n   */\n\n\n  end() {\n    // flush any buffered input\n    this.lineStream.push('\\n');\n\n    if (this.manifest.dateRanges.length && this.lastProgramDateTime === null) {\n      this.trigger('warn', {\n        message: 'A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag'\n      });\n    }\n\n    this.lastProgramDateTime = null;\n    this.trigger('end');\n  }\n  /**\n   * Add an additional parser for non-standard tags\n   *\n   * @param {Object}   options              a map of options for the added parser\n   * @param {RegExp}   options.expression   a regular expression to match the custom header\n   * @param {string}   options.customType   the custom type to register to the output\n   * @param {Function} [options.dataParser] function to parse the line into an object\n   * @param {boolean}  [options.segment]    should tag data be attached to the segment object\n   */\n\n\n  addParser(options) {\n    this.parseStream.addParser(options);\n  }\n  /**\n   * Add a custom header mapper\n   *\n   * @param {Object}   options\n   * @param {RegExp}   options.expression   a regular expression to match the custom header\n   * @param {Function} options.map          function to translate tag into a different tag\n   */\n\n\n  addTagMapper(options) {\n    this.parseStream.addTagMapper(options);\n  }\n\n}\n\nexport { LineStream, ParseStream, Parser };\n","import window from 'global/window';\nvar regexs = {\n  // to determine mime types\n  mp4: /^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,\n  webm: /^(vp0?[89]|av0?1|opus|vorbis)/,\n  ogg: /^(vp0?[89]|theora|flac|opus|vorbis)/,\n  // to determine if a codec is audio or video\n  video: /^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,\n  audio: /^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,\n  text: /^(stpp.ttml.im1t)/,\n  // mux.js support regex\n  muxerVideo: /^(avc0?1)/,\n  muxerAudio: /^(mp4a)/,\n  // match nothing as muxer does not support text right now.\n  // there cannot never be a character before the start of a string\n  // so this matches nothing.\n  muxerText: /a^/\n};\nvar mediaTypes = ['video', 'audio', 'text'];\nvar upperMediaTypes = ['Video', 'Audio', 'Text'];\n/**\n * Replace the old apple-style `avc1.
.
` codec string with the standard\n * `avc1.`\n *\n * @param {string} codec\n * Codec string to translate\n * @return {string}\n * The translated codec string\n */\n\nexport var translateLegacyCodec = function translateLegacyCodec(codec) {\n if (!codec) {\n return codec;\n }\n\n return codec.replace(/avc1\\.(\\d+)\\.(\\d+)/i, function (orig, profile, avcLevel) {\n var profileHex = ('00' + Number(profile).toString(16)).slice(-2);\n var avcLevelHex = ('00' + Number(avcLevel).toString(16)).slice(-2);\n return 'avc1.' + profileHex + '00' + avcLevelHex;\n });\n};\n/**\n * Replace the old apple-style `avc1.
.
` codec strings with the standard\n * `avc1.`\n *\n * @param {string[]} codecs\n * An array of codec strings to translate\n * @return {string[]}\n * The translated array of codec strings\n */\n\nexport var translateLegacyCodecs = function translateLegacyCodecs(codecs) {\n return codecs.map(translateLegacyCodec);\n};\n/**\n * Replace codecs in the codec string with the old apple-style `avc1.
.
` to the\n * standard `avc1.`.\n *\n * @param {string} codecString\n * The codec string\n * @return {string}\n * The codec string with old apple-style codecs replaced\n *\n * @private\n */\n\nexport var mapLegacyAvcCodecs = function mapLegacyAvcCodecs(codecString) {\n return codecString.replace(/avc1\\.(\\d+)\\.(\\d+)/i, function (match) {\n return translateLegacyCodecs([match])[0];\n });\n};\n/**\n * @typedef {Object} ParsedCodecInfo\n * @property {number} codecCount\n * Number of codecs parsed\n * @property {string} [videoCodec]\n * Parsed video codec (if found)\n * @property {string} [videoObjectTypeIndicator]\n * Video object type indicator (if found)\n * @property {string|null} audioProfile\n * Audio profile\n */\n\n/**\n * Parses a codec string to retrieve the number of codecs specified, the video codec and\n * object type indicator, and the audio profile.\n *\n * @param {string} [codecString]\n * The codec string to parse\n * @return {ParsedCodecInfo}\n * Parsed codec info\n */\n\nexport var parseCodecs = function parseCodecs(codecString) {\n if (codecString === void 0) {\n codecString = '';\n }\n\n var codecs = codecString.split(',');\n var result = [];\n codecs.forEach(function (codec) {\n codec = codec.trim();\n var codecType;\n mediaTypes.forEach(function (name) {\n var match = regexs[name].exec(codec.toLowerCase());\n\n if (!match || match.length <= 1) {\n return;\n }\n\n codecType = name; // maintain codec case\n\n var type = codec.substring(0, match[1].length);\n var details = codec.replace(type, '');\n result.push({\n type: type,\n details: details,\n mediaType: name\n });\n });\n\n if (!codecType) {\n result.push({\n type: codec,\n details: '',\n mediaType: 'unknown'\n });\n }\n });\n return result;\n};\n/**\n * Returns a ParsedCodecInfo object for the default alternate audio playlist if there is\n * a default alternate audio playlist for the provided audio group.\n *\n * @param {Object} master\n * The master playlist\n * @param {string} audioGroupId\n * ID of the audio group for which to find the default codec info\n * @return {ParsedCodecInfo}\n * Parsed codec info\n */\n\nexport var codecsFromDefault = function codecsFromDefault(master, audioGroupId) {\n if (!master.mediaGroups.AUDIO || !audioGroupId) {\n return null;\n }\n\n var audioGroup = master.mediaGroups.AUDIO[audioGroupId];\n\n if (!audioGroup) {\n return null;\n }\n\n for (var name in audioGroup) {\n var audioType = audioGroup[name];\n\n if (audioType.default && audioType.playlists) {\n // codec should be the same for all playlists within the audio type\n return parseCodecs(audioType.playlists[0].attributes.CODECS);\n }\n }\n\n return null;\n};\nexport var isVideoCodec = function isVideoCodec(codec) {\n if (codec === void 0) {\n codec = '';\n }\n\n return regexs.video.test(codec.trim().toLowerCase());\n};\nexport var isAudioCodec = function isAudioCodec(codec) {\n if (codec === void 0) {\n codec = '';\n }\n\n return regexs.audio.test(codec.trim().toLowerCase());\n};\nexport var isTextCodec = function isTextCodec(codec) {\n if (codec === void 0) {\n codec = '';\n }\n\n return regexs.text.test(codec.trim().toLowerCase());\n};\nexport var getMimeForCodec = function getMimeForCodec(codecString) {\n if (!codecString || typeof codecString !== 'string') {\n return;\n }\n\n var codecs = codecString.toLowerCase().split(',').map(function (c) {\n return translateLegacyCodec(c.trim());\n }); // default to video type\n\n var type = 'video'; // only change to audio type if the only codec we have is\n // audio\n\n if (codecs.length === 1 && isAudioCodec(codecs[0])) {\n type = 'audio';\n } else if (codecs.length === 1 && isTextCodec(codecs[0])) {\n // text uses application/ for now\n type = 'application';\n } // default the container to mp4\n\n\n var container = 'mp4'; // every codec must be able to go into the container\n // for that container to be the correct one\n\n if (codecs.every(function (c) {\n return regexs.mp4.test(c);\n })) {\n container = 'mp4';\n } else if (codecs.every(function (c) {\n return regexs.webm.test(c);\n })) {\n container = 'webm';\n } else if (codecs.every(function (c) {\n return regexs.ogg.test(c);\n })) {\n container = 'ogg';\n }\n\n return type + \"/\" + container + \";codecs=\\\"\" + codecString + \"\\\"\";\n};\nexport var browserSupportsCodec = function browserSupportsCodec(codecString) {\n if (codecString === void 0) {\n codecString = '';\n }\n\n return window.MediaSource && window.MediaSource.isTypeSupported && window.MediaSource.isTypeSupported(getMimeForCodec(codecString)) || false;\n};\nexport var muxerSupportsCodec = function muxerSupportsCodec(codecString) {\n if (codecString === void 0) {\n codecString = '';\n }\n\n return codecString.toLowerCase().split(',').every(function (codec) {\n codec = codec.trim(); // any match is supported.\n\n for (var i = 0; i < upperMediaTypes.length; i++) {\n var type = upperMediaTypes[i];\n\n if (regexs[\"muxer\" + type].test(codec)) {\n return true;\n }\n }\n\n return false;\n });\n};\nexport var DEFAULT_AUDIO_CODEC = 'mp4a.40.2';\nexport var DEFAULT_VIDEO_CODEC = 'avc1.4d400d';","var MPEGURL_REGEX = /^(audio|video|application)\\/(x-|vnd\\.apple\\.)?mpegurl/i;\nvar DASH_REGEX = /^application\\/dash\\+xml/i;\n/**\n * Returns a string that describes the type of source based on a video source object's\n * media type.\n *\n * @see {@link https://dev.w3.org/html5/pf-summary/video.html#dom-source-type|Source Type}\n *\n * @param {string} type\n * Video source object media type\n * @return {('hls'|'dash'|'vhs-json'|null)}\n * VHS source type string\n */\n\nexport var simpleTypeFromSourceType = function simpleTypeFromSourceType(type) {\n if (MPEGURL_REGEX.test(type)) {\n return 'hls';\n }\n\n if (DASH_REGEX.test(type)) {\n return 'dash';\n } // Denotes the special case of a manifest object passed to http-streaming instead of a\n // source URL.\n //\n // See https://en.wikipedia.org/wiki/Media_type for details on specifying media types.\n //\n // In this case, vnd stands for vendor, video.js for the organization, VHS for this\n // project, and the +json suffix identifies the structure of the media type.\n\n\n if (type === 'application/vnd.videojs.vhs+json') {\n return 'vhs-json';\n }\n\n return null;\n};","import window from 'global/window'; // const log2 = Math.log2 ? Math.log2 : (x) => (Math.log(x) / Math.log(2));\n\nvar repeat = function repeat(str, len) {\n var acc = '';\n\n while (len--) {\n acc += str;\n }\n\n return acc;\n}; // count the number of bits it would take to represent a number\n// we used to do this with log2 but BigInt does not support builtin math\n// Math.ceil(log2(x));\n\n\nexport var countBits = function countBits(x) {\n return x.toString(2).length;\n}; // count the number of whole bytes it would take to represent a number\n\nexport var countBytes = function countBytes(x) {\n return Math.ceil(countBits(x) / 8);\n};\nexport var padStart = function padStart(b, len, str) {\n if (str === void 0) {\n str = ' ';\n }\n\n return (repeat(str, len) + b.toString()).slice(-len);\n};\nexport var isArrayBufferView = function isArrayBufferView(obj) {\n if (ArrayBuffer.isView === 'function') {\n return ArrayBuffer.isView(obj);\n }\n\n return obj && obj.buffer instanceof ArrayBuffer;\n};\nexport var isTypedArray = function isTypedArray(obj) {\n return isArrayBufferView(obj);\n};\nexport var toUint8 = function toUint8(bytes) {\n if (bytes instanceof Uint8Array) {\n return bytes;\n }\n\n if (!Array.isArray(bytes) && !isTypedArray(bytes) && !(bytes instanceof ArrayBuffer)) {\n // any non-number or NaN leads to empty uint8array\n // eslint-disable-next-line\n if (typeof bytes !== 'number' || typeof bytes === 'number' && bytes !== bytes) {\n bytes = 0;\n } else {\n bytes = [bytes];\n }\n }\n\n return new Uint8Array(bytes && bytes.buffer || bytes, bytes && bytes.byteOffset || 0, bytes && bytes.byteLength || 0);\n};\nexport var toHexString = function toHexString(bytes) {\n bytes = toUint8(bytes);\n var str = '';\n\n for (var i = 0; i < bytes.length; i++) {\n str += padStart(bytes[i].toString(16), 2, '0');\n }\n\n return str;\n};\nexport var toBinaryString = function toBinaryString(bytes) {\n bytes = toUint8(bytes);\n var str = '';\n\n for (var i = 0; i < bytes.length; i++) {\n str += padStart(bytes[i].toString(2), 8, '0');\n }\n\n return str;\n};\nvar BigInt = window.BigInt || Number;\nvar BYTE_TABLE = [BigInt('0x1'), BigInt('0x100'), BigInt('0x10000'), BigInt('0x1000000'), BigInt('0x100000000'), BigInt('0x10000000000'), BigInt('0x1000000000000'), BigInt('0x100000000000000'), BigInt('0x10000000000000000')];\nexport var ENDIANNESS = function () {\n var a = new Uint16Array([0xFFCC]);\n var b = new Uint8Array(a.buffer, a.byteOffset, a.byteLength);\n\n if (b[0] === 0xFF) {\n return 'big';\n }\n\n if (b[0] === 0xCC) {\n return 'little';\n }\n\n return 'unknown';\n}();\nexport var IS_BIG_ENDIAN = ENDIANNESS === 'big';\nexport var IS_LITTLE_ENDIAN = ENDIANNESS === 'little';\nexport var bytesToNumber = function bytesToNumber(bytes, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$signed = _ref.signed,\n signed = _ref$signed === void 0 ? false : _ref$signed,\n _ref$le = _ref.le,\n le = _ref$le === void 0 ? false : _ref$le;\n\n bytes = toUint8(bytes);\n var fn = le ? 'reduce' : 'reduceRight';\n var obj = bytes[fn] ? bytes[fn] : Array.prototype[fn];\n var number = obj.call(bytes, function (total, byte, i) {\n var exponent = le ? i : Math.abs(i + 1 - bytes.length);\n return total + BigInt(byte) * BYTE_TABLE[exponent];\n }, BigInt(0));\n\n if (signed) {\n var max = BYTE_TABLE[bytes.length] / BigInt(2) - BigInt(1);\n number = BigInt(number);\n\n if (number > max) {\n number -= max;\n number -= max;\n number -= BigInt(2);\n }\n }\n\n return Number(number);\n};\nexport var numberToBytes = function numberToBytes(number, _temp2) {\n var _ref2 = _temp2 === void 0 ? {} : _temp2,\n _ref2$le = _ref2.le,\n le = _ref2$le === void 0 ? false : _ref2$le;\n\n // eslint-disable-next-line\n if (typeof number !== 'bigint' && typeof number !== 'number' || typeof number === 'number' && number !== number) {\n number = 0;\n }\n\n number = BigInt(number);\n var byteCount = countBytes(number);\n var bytes = new Uint8Array(new ArrayBuffer(byteCount));\n\n for (var i = 0; i < byteCount; i++) {\n var byteIndex = le ? i : Math.abs(i + 1 - bytes.length);\n bytes[byteIndex] = Number(number / BYTE_TABLE[i] & BigInt(0xFF));\n\n if (number < 0) {\n bytes[byteIndex] = Math.abs(~bytes[byteIndex]);\n bytes[byteIndex] -= i === 0 ? 1 : 2;\n }\n }\n\n return bytes;\n};\nexport var bytesToString = function bytesToString(bytes) {\n if (!bytes) {\n return '';\n } // TODO: should toUint8 handle cases where we only have 8 bytes\n // but report more since this is a Uint16+ Array?\n\n\n bytes = Array.prototype.slice.call(bytes);\n var string = String.fromCharCode.apply(null, toUint8(bytes));\n\n try {\n return decodeURIComponent(escape(string));\n } catch (e) {// if decodeURIComponent/escape fails, we are dealing with partial\n // or full non string data. Just return the potentially garbled string.\n }\n\n return string;\n};\nexport var stringToBytes = function stringToBytes(string, stringIsBytes) {\n if (typeof string !== 'string' && string && typeof string.toString === 'function') {\n string = string.toString();\n }\n\n if (typeof string !== 'string') {\n return new Uint8Array();\n } // If the string already is bytes, we don't have to do this\n // otherwise we do this so that we split multi length characters\n // into individual bytes\n\n\n if (!stringIsBytes) {\n string = unescape(encodeURIComponent(string));\n }\n\n var view = new Uint8Array(string.length);\n\n for (var i = 0; i < string.length; i++) {\n view[i] = string.charCodeAt(i);\n }\n\n return view;\n};\nexport var concatTypedArrays = function concatTypedArrays() {\n for (var _len = arguments.length, buffers = new Array(_len), _key = 0; _key < _len; _key++) {\n buffers[_key] = arguments[_key];\n }\n\n buffers = buffers.filter(function (b) {\n return b && (b.byteLength || b.length) && typeof b !== 'string';\n });\n\n if (buffers.length <= 1) {\n // for 0 length we will return empty uint8\n // for 1 length we return the first uint8\n return toUint8(buffers[0]);\n }\n\n var totalLen = buffers.reduce(function (total, buf, i) {\n return total + (buf.byteLength || buf.length);\n }, 0);\n var tempBuffer = new Uint8Array(totalLen);\n var offset = 0;\n buffers.forEach(function (buf) {\n buf = toUint8(buf);\n tempBuffer.set(buf, offset);\n offset += buf.byteLength;\n });\n return tempBuffer;\n};\n/**\n * Check if the bytes \"b\" are contained within bytes \"a\".\n *\n * @param {Uint8Array|Array} a\n * Bytes to check in\n *\n * @param {Uint8Array|Array} b\n * Bytes to check for\n *\n * @param {Object} options\n * options\n *\n * @param {Array|Uint8Array} [offset=0]\n * offset to use when looking at bytes in a\n *\n * @param {Array|Uint8Array} [mask=[]]\n * mask to use on bytes before comparison.\n *\n * @return {boolean}\n * If all bytes in b are inside of a, taking into account\n * bit masks.\n */\n\nexport var bytesMatch = function bytesMatch(a, b, _temp3) {\n var _ref3 = _temp3 === void 0 ? {} : _temp3,\n _ref3$offset = _ref3.offset,\n offset = _ref3$offset === void 0 ? 0 : _ref3$offset,\n _ref3$mask = _ref3.mask,\n mask = _ref3$mask === void 0 ? [] : _ref3$mask;\n\n a = toUint8(a);\n b = toUint8(b); // ie 11 does not support uint8 every\n\n var fn = b.every ? b.every : Array.prototype.every;\n return b.length && a.length - offset >= b.length && // ie 11 doesn't support every on uin8\n fn.call(b, function (bByte, i) {\n var aByte = mask[i] ? mask[i] & a[offset + i] : a[offset + i];\n return bByte === aByte;\n });\n};\nexport var sliceBytes = function sliceBytes(src, start, end) {\n if (Uint8Array.prototype.slice) {\n return Uint8Array.prototype.slice.call(src, start, end);\n }\n\n return new Uint8Array(Array.prototype.slice.call(src, start, end));\n};\nexport var reverseBytes = function reverseBytes(src) {\n if (src.reverse) {\n return src.reverse();\n }\n\n return Array.prototype.reverse.call(src);\n};","/**\n * Loops through all supported media groups in master and calls the provided\n * callback for each group\n *\n * @param {Object} master\n * The parsed master manifest object\n * @param {string[]} groups\n * The media groups to call the callback for\n * @param {Function} callback\n * Callback to call for each media group\n */\nexport var forEachMediaGroup = function forEachMediaGroup(master, groups, callback) {\n groups.forEach(function (mediaType) {\n for (var groupKey in master.mediaGroups[mediaType]) {\n for (var labelKey in master.mediaGroups[mediaType][groupKey]) {\n var mediaProperties = master.mediaGroups[mediaType][groupKey][labelKey];\n callback(mediaProperties, mediaType, groupKey, labelKey);\n }\n }\n });\n};","import window from 'global/window';\n\nvar atob = function atob(s) {\n return window.atob ? window.atob(s) : Buffer.from(s, 'base64').toString('binary');\n};\n\nexport default function decodeB64ToUint8Array(b64Text) {\n var decodedString = atob(b64Text);\n var array = new Uint8Array(decodedString.length);\n\n for (var i = 0; i < decodedString.length; i++) {\n array[i] = decodedString.charCodeAt(i);\n }\n\n return array;\n}","'use strict'\n\n/**\n * Ponyfill for `Array.prototype.find` which is only available in ES6 runtimes.\n *\n * Works with anything that has a `length` property and index access properties, including NodeList.\n *\n * @template {unknown} T\n * @param {Array | ({length:number, [number]: T})} list\n * @param {function (item: T, index: number, list:Array | ({length:number, [number]: T})):boolean} predicate\n * @param {Partial>?} ac `Array.prototype` by default,\n * \t\t\t\tallows injecting a custom implementation in tests\n * @returns {T | undefined}\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find\n * @see https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.find\n */\nfunction find(list, predicate, ac) {\n\tif (ac === undefined) {\n\t\tac = Array.prototype;\n\t}\n\tif (list && typeof ac.find === 'function') {\n\t\treturn ac.find.call(list, predicate);\n\t}\n\tfor (var i = 0; i < list.length; i++) {\n\t\tif (Object.prototype.hasOwnProperty.call(list, i)) {\n\t\t\tvar item = list[i];\n\t\t\tif (predicate.call(undefined, item, i, list)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * \"Shallow freezes\" an object to render it immutable.\n * Uses `Object.freeze` if available,\n * otherwise the immutability is only in the type.\n *\n * Is used to create \"enum like\" objects.\n *\n * @template T\n * @param {T} object the object to freeze\n * @param {Pick = Object} oc `Object` by default,\n * \t\t\t\tallows to inject custom object constructor for tests\n * @returns {Readonly}\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze\n */\nfunction freeze(object, oc) {\n\tif (oc === undefined) {\n\t\toc = Object\n\t}\n\treturn oc && typeof oc.freeze === 'function' ? oc.freeze(object) : object\n}\n\n/**\n * Since we can not rely on `Object.assign` we provide a simplified version\n * that is sufficient for our needs.\n *\n * @param {Object} target\n * @param {Object | null | undefined} source\n *\n * @returns {Object} target\n * @throws TypeError if target is not an object\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n * @see https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign\n */\nfunction assign(target, source) {\n\tif (target === null || typeof target !== 'object') {\n\t\tthrow new TypeError('target is not an object')\n\t}\n\tfor (var key in source) {\n\t\tif (Object.prototype.hasOwnProperty.call(source, key)) {\n\t\t\ttarget[key] = source[key]\n\t\t}\n\t}\n\treturn target\n}\n\n/**\n * All mime types that are allowed as input to `DOMParser.parseFromString`\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#Argument02 MDN\n * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#domparsersupportedtype WHATWG HTML Spec\n * @see DOMParser.prototype.parseFromString\n */\nvar MIME_TYPE = freeze({\n\t/**\n\t * `text/html`, the only mime type that triggers treating an XML document as HTML.\n\t *\n\t * @see DOMParser.SupportedType.isHTML\n\t * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration\n\t * @see https://en.wikipedia.org/wiki/HTML Wikipedia\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN\n\t * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring WHATWG HTML Spec\n\t */\n\tHTML: 'text/html',\n\n\t/**\n\t * Helper method to check a mime type if it indicates an HTML document\n\t *\n\t * @param {string} [value]\n\t * @returns {boolean}\n\t *\n\t * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration\n\t * @see https://en.wikipedia.org/wiki/HTML Wikipedia\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN\n\t * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring \t */\n\tisHTML: function (value) {\n\t\treturn value === MIME_TYPE.HTML\n\t},\n\n\t/**\n\t * `application/xml`, the standard mime type for XML documents.\n\t *\n\t * @see https://www.iana.org/assignments/media-types/application/xml IANA MimeType registration\n\t * @see https://tools.ietf.org/html/rfc7303#section-9.1 RFC 7303\n\t * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia\n\t */\n\tXML_APPLICATION: 'application/xml',\n\n\t/**\n\t * `text/html`, an alias for `application/xml`.\n\t *\n\t * @see https://tools.ietf.org/html/rfc7303#section-9.2 RFC 7303\n\t * @see https://www.iana.org/assignments/media-types/text/xml IANA MimeType registration\n\t * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia\n\t */\n\tXML_TEXT: 'text/xml',\n\n\t/**\n\t * `application/xhtml+xml`, indicates an XML document that has the default HTML namespace,\n\t * but is parsed as an XML document.\n\t *\n\t * @see https://www.iana.org/assignments/media-types/application/xhtml+xml IANA MimeType registration\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument WHATWG DOM Spec\n\t * @see https://en.wikipedia.org/wiki/XHTML Wikipedia\n\t */\n\tXML_XHTML_APPLICATION: 'application/xhtml+xml',\n\n\t/**\n\t * `image/svg+xml`,\n\t *\n\t * @see https://www.iana.org/assignments/media-types/image/svg+xml IANA MimeType registration\n\t * @see https://www.w3.org/TR/SVG11/ W3C SVG 1.1\n\t * @see https://en.wikipedia.org/wiki/Scalable_Vector_Graphics Wikipedia\n\t */\n\tXML_SVG_IMAGE: 'image/svg+xml',\n})\n\n/**\n * Namespaces that are used in this code base.\n *\n * @see http://www.w3.org/TR/REC-xml-names\n */\nvar NAMESPACE = freeze({\n\t/**\n\t * The XHTML namespace.\n\t *\n\t * @see http://www.w3.org/1999/xhtml\n\t */\n\tHTML: 'http://www.w3.org/1999/xhtml',\n\n\t/**\n\t * Checks if `uri` equals `NAMESPACE.HTML`.\n\t *\n\t * @param {string} [uri]\n\t *\n\t * @see NAMESPACE.HTML\n\t */\n\tisHTML: function (uri) {\n\t\treturn uri === NAMESPACE.HTML\n\t},\n\n\t/**\n\t * The SVG namespace.\n\t *\n\t * @see http://www.w3.org/2000/svg\n\t */\n\tSVG: 'http://www.w3.org/2000/svg',\n\n\t/**\n\t * The `xml:` namespace.\n\t *\n\t * @see http://www.w3.org/XML/1998/namespace\n\t */\n\tXML: 'http://www.w3.org/XML/1998/namespace',\n\n\t/**\n\t * The `xmlns:` namespace\n\t *\n\t * @see https://www.w3.org/2000/xmlns/\n\t */\n\tXMLNS: 'http://www.w3.org/2000/xmlns/',\n})\n\nexports.assign = assign;\nexports.find = find;\nexports.freeze = freeze;\nexports.MIME_TYPE = MIME_TYPE;\nexports.NAMESPACE = NAMESPACE;\n","var conventions = require(\"./conventions\");\n\nvar find = conventions.find;\nvar NAMESPACE = conventions.NAMESPACE;\n\n/**\n * A prerequisite for `[].filter`, to drop elements that are empty\n * @param {string} input\n * @returns {boolean}\n */\nfunction notEmptyString (input) {\n\treturn input !== ''\n}\n/**\n * @see https://infra.spec.whatwg.org/#split-on-ascii-whitespace\n * @see https://infra.spec.whatwg.org/#ascii-whitespace\n *\n * @param {string} input\n * @returns {string[]} (can be empty)\n */\nfunction splitOnASCIIWhitespace(input) {\n\t// U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, U+0020 SPACE\n\treturn input ? input.split(/[\\t\\n\\f\\r ]+/).filter(notEmptyString) : []\n}\n\n/**\n * Adds element as a key to current if it is not already present.\n *\n * @param {Record} current\n * @param {string} element\n * @returns {Record}\n */\nfunction orderedSetReducer (current, element) {\n\tif (!current.hasOwnProperty(element)) {\n\t\tcurrent[element] = true;\n\t}\n\treturn current;\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#ordered-set\n * @param {string} input\n * @returns {string[]}\n */\nfunction toOrderedSet(input) {\n\tif (!input) return [];\n\tvar list = splitOnASCIIWhitespace(input);\n\treturn Object.keys(list.reduce(orderedSetReducer, {}))\n}\n\n/**\n * Uses `list.indexOf` to implement something like `Array.prototype.includes`,\n * which we can not rely on being available.\n *\n * @param {any[]} list\n * @returns {function(any): boolean}\n */\nfunction arrayIncludes (list) {\n\treturn function(element) {\n\t\treturn list && list.indexOf(element) !== -1;\n\t}\n}\n\nfunction copy(src,dest){\n\tfor(var p in src){\n\t\tif (Object.prototype.hasOwnProperty.call(src, p)) {\n\t\t\tdest[p] = src[p];\n\t\t}\n\t}\n}\n\n/**\n^\\w+\\.prototype\\.([_\\w]+)\\s*=\\s*((?:.*\\{\\s*?[\\r\\n][\\s\\S]*?^})|\\S.*?(?=[;\\r\\n]));?\n^\\w+\\.prototype\\.([_\\w]+)\\s*=\\s*(\\S.*?(?=[;\\r\\n]));?\n */\nfunction _extends(Class,Super){\n\tvar pt = Class.prototype;\n\tif(!(pt instanceof Super)){\n\t\tfunction t(){};\n\t\tt.prototype = Super.prototype;\n\t\tt = new t();\n\t\tcopy(pt,t);\n\t\tClass.prototype = pt = t;\n\t}\n\tif(pt.constructor != Class){\n\t\tif(typeof Class != 'function'){\n\t\t\tconsole.error(\"unknown Class:\"+Class)\n\t\t}\n\t\tpt.constructor = Class\n\t}\n}\n\n// Node Types\nvar NodeType = {}\nvar ELEMENT_NODE = NodeType.ELEMENT_NODE = 1;\nvar ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2;\nvar TEXT_NODE = NodeType.TEXT_NODE = 3;\nvar CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4;\nvar ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5;\nvar ENTITY_NODE = NodeType.ENTITY_NODE = 6;\nvar PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7;\nvar COMMENT_NODE = NodeType.COMMENT_NODE = 8;\nvar DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9;\nvar DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10;\nvar DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11;\nvar NOTATION_NODE = NodeType.NOTATION_NODE = 12;\n\n// ExceptionCode\nvar ExceptionCode = {}\nvar ExceptionMessage = {};\nvar INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]=\"Index size error\"),1);\nvar DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]=\"DOMString size error\"),2);\nvar HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]=\"Hierarchy request error\"),3);\nvar WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]=\"Wrong document\"),4);\nvar INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]=\"Invalid character\"),5);\nvar NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]=\"No data allowed\"),6);\nvar NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]=\"No modification allowed\"),7);\nvar NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]=\"Not found\"),8);\nvar NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]=\"Not supported\"),9);\nvar INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]=\"Attribute in use\"),10);\n//level2\nvar INVALID_STATE_ERR \t= ExceptionCode.INVALID_STATE_ERR \t= ((ExceptionMessage[11]=\"Invalid state\"),11);\nvar SYNTAX_ERR \t= ExceptionCode.SYNTAX_ERR \t= ((ExceptionMessage[12]=\"Syntax error\"),12);\nvar INVALID_MODIFICATION_ERR \t= ExceptionCode.INVALID_MODIFICATION_ERR \t= ((ExceptionMessage[13]=\"Invalid modification\"),13);\nvar NAMESPACE_ERR \t= ExceptionCode.NAMESPACE_ERR \t= ((ExceptionMessage[14]=\"Invalid namespace\"),14);\nvar INVALID_ACCESS_ERR \t= ExceptionCode.INVALID_ACCESS_ERR \t= ((ExceptionMessage[15]=\"Invalid access\"),15);\n\n/**\n * DOM Level 2\n * Object DOMException\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html\n * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html\n */\nfunction DOMException(code, message) {\n\tif(message instanceof Error){\n\t\tvar error = message;\n\t}else{\n\t\terror = this;\n\t\tError.call(this, ExceptionMessage[code]);\n\t\tthis.message = ExceptionMessage[code];\n\t\tif(Error.captureStackTrace) Error.captureStackTrace(this, DOMException);\n\t}\n\terror.code = code;\n\tif(message) this.message = this.message + \": \" + message;\n\treturn error;\n};\nDOMException.prototype = Error.prototype;\ncopy(ExceptionCode,DOMException)\n\n/**\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177\n * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live.\n * The items in the NodeList are accessible via an integral index, starting from 0.\n */\nfunction NodeList() {\n};\nNodeList.prototype = {\n\t/**\n\t * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.\n\t * @standard level1\n\t */\n\tlength:0,\n\t/**\n\t * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.\n\t * @standard level1\n\t * @param index unsigned long\n\t * Index into the collection.\n\t * @return Node\n\t * \tThe node at the indexth position in the NodeList, or null if that is not a valid index.\n\t */\n\titem: function(index) {\n\t\treturn index >= 0 && index < this.length ? this[index] : null;\n\t},\n\ttoString:function(isHTML,nodeFilter){\n\t\tfor(var buf = [], i = 0;i=0){\n\t\tvar lastIndex = list.length-1\n\t\twhile(i0 || key == 'xmlns'){\n//\t\t\treturn null;\n//\t\t}\n\t\t//console.log()\n\t\tvar i = this.length;\n\t\twhile(i--){\n\t\t\tvar attr = this[i];\n\t\t\t//console.log(attr.nodeName,key)\n\t\t\tif(attr.nodeName == key){\n\t\t\t\treturn attr;\n\t\t\t}\n\t\t}\n\t},\n\tsetNamedItem: function(attr) {\n\t\tvar el = attr.ownerElement;\n\t\tif(el && el!=this._ownerElement){\n\t\t\tthrow new DOMException(INUSE_ATTRIBUTE_ERR);\n\t\t}\n\t\tvar oldAttr = this.getNamedItem(attr.nodeName);\n\t\t_addNamedNode(this._ownerElement,this,attr,oldAttr);\n\t\treturn oldAttr;\n\t},\n\t/* returns Node */\n\tsetNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR\n\t\tvar el = attr.ownerElement, oldAttr;\n\t\tif(el && el!=this._ownerElement){\n\t\t\tthrow new DOMException(INUSE_ATTRIBUTE_ERR);\n\t\t}\n\t\toldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName);\n\t\t_addNamedNode(this._ownerElement,this,attr,oldAttr);\n\t\treturn oldAttr;\n\t},\n\n\t/* returns Node */\n\tremoveNamedItem: function(key) {\n\t\tvar attr = this.getNamedItem(key);\n\t\t_removeNamedNode(this._ownerElement,this,attr);\n\t\treturn attr;\n\n\n\t},// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR\n\n\t//for level2\n\tremoveNamedItemNS:function(namespaceURI,localName){\n\t\tvar attr = this.getNamedItemNS(namespaceURI,localName);\n\t\t_removeNamedNode(this._ownerElement,this,attr);\n\t\treturn attr;\n\t},\n\tgetNamedItemNS: function(namespaceURI, localName) {\n\t\tvar i = this.length;\n\t\twhile(i--){\n\t\t\tvar node = this[i];\n\t\t\tif(node.localName == localName && node.namespaceURI == namespaceURI){\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n};\n\n/**\n * The DOMImplementation interface represents an object providing methods\n * which are not dependent on any particular document.\n * Such an object is returned by the `Document.implementation` property.\n *\n * __The individual methods describe the differences compared to the specs.__\n *\n * @constructor\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation MDN\n * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 DOM Level 1 Core (Initial)\n * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-102161490 DOM Level 2 Core\n * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-102161490 DOM Level 3 Core\n * @see https://dom.spec.whatwg.org/#domimplementation DOM Living Standard\n */\nfunction DOMImplementation() {\n}\n\nDOMImplementation.prototype = {\n\t/**\n\t * The DOMImplementation.hasFeature() method returns a Boolean flag indicating if a given feature is supported.\n\t * The different implementations fairly diverged in what kind of features were reported.\n\t * The latest version of the spec settled to force this method to always return true, where the functionality was accurate and in use.\n\t *\n\t * @deprecated It is deprecated and modern browsers return true in all cases.\n\t *\n\t * @param {string} feature\n\t * @param {string} [version]\n\t * @returns {boolean} always true\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/hasFeature MDN\n\t * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-5CED94D7 DOM Level 1 Core\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature DOM Living Standard\n\t */\n\thasFeature: function(feature, version) {\n\t\t\treturn true;\n\t},\n\t/**\n\t * Creates an XML Document object of the specified type with its document element.\n\t *\n\t * __It behaves slightly different from the description in the living standard__:\n\t * - There is no interface/class `XMLDocument`, it returns a `Document` instance.\n\t * - `contentType`, `encoding`, `mode`, `origin`, `url` fields are currently not declared.\n\t * - this implementation is not validating names or qualified names\n\t * (when parsing XML strings, the SAX parser takes care of that)\n\t *\n\t * @param {string|null} namespaceURI\n\t * @param {string} qualifiedName\n\t * @param {DocumentType=null} doctype\n\t * @returns {Document}\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument MDN\n\t * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocument DOM Level 2 Core (initial)\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument DOM Level 2 Core\n\t *\n\t * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract\n\t * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names\n\t * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names\n\t */\n\tcreateDocument: function(namespaceURI, qualifiedName, doctype){\n\t\tvar doc = new Document();\n\t\tdoc.implementation = this;\n\t\tdoc.childNodes = new NodeList();\n\t\tdoc.doctype = doctype || null;\n\t\tif (doctype){\n\t\t\tdoc.appendChild(doctype);\n\t\t}\n\t\tif (qualifiedName){\n\t\t\tvar root = doc.createElementNS(namespaceURI, qualifiedName);\n\t\t\tdoc.appendChild(root);\n\t\t}\n\t\treturn doc;\n\t},\n\t/**\n\t * Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`.\n\t *\n\t * __This behavior is slightly different from the in the specs__:\n\t * - this implementation is not validating names or qualified names\n\t * (when parsing XML strings, the SAX parser takes care of that)\n\t *\n\t * @param {string} qualifiedName\n\t * @param {string} [publicId]\n\t * @param {string} [systemId]\n\t * @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation\n\t * \t\t\t\t or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()`\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocumentType MDN\n\t * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocType DOM Level 2 Core\n\t * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype DOM Living Standard\n\t *\n\t * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract\n\t * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names\n\t * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names\n\t */\n\tcreateDocumentType: function(qualifiedName, publicId, systemId){\n\t\tvar node = new DocumentType();\n\t\tnode.name = qualifiedName;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.publicId = publicId || '';\n\t\tnode.systemId = systemId || '';\n\n\t\treturn node;\n\t}\n};\n\n\n/**\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247\n */\n\nfunction Node() {\n};\n\nNode.prototype = {\n\tfirstChild : null,\n\tlastChild : null,\n\tpreviousSibling : null,\n\tnextSibling : null,\n\tattributes : null,\n\tparentNode : null,\n\tchildNodes : null,\n\townerDocument : null,\n\tnodeValue : null,\n\tnamespaceURI : null,\n\tprefix : null,\n\tlocalName : null,\n\t// Modified in DOM Level 2:\n\tinsertBefore:function(newChild, refChild){//raises\n\t\treturn _insertBefore(this,newChild,refChild);\n\t},\n\treplaceChild:function(newChild, oldChild){//raises\n\t\t_insertBefore(this, newChild,oldChild, assertPreReplacementValidityInDocument);\n\t\tif(oldChild){\n\t\t\tthis.removeChild(oldChild);\n\t\t}\n\t},\n\tremoveChild:function(oldChild){\n\t\treturn _removeChild(this,oldChild);\n\t},\n\tappendChild:function(newChild){\n\t\treturn this.insertBefore(newChild,null);\n\t},\n\thasChildNodes:function(){\n\t\treturn this.firstChild != null;\n\t},\n\tcloneNode:function(deep){\n\t\treturn cloneNode(this.ownerDocument||this,this,deep);\n\t},\n\t// Modified in DOM Level 2:\n\tnormalize:function(){\n\t\tvar child = this.firstChild;\n\t\twhile(child){\n\t\t\tvar next = child.nextSibling;\n\t\t\tif(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){\n\t\t\t\tthis.removeChild(next);\n\t\t\t\tchild.appendData(next.data);\n\t\t\t}else{\n\t\t\t\tchild.normalize();\n\t\t\t\tchild = next;\n\t\t\t}\n\t\t}\n\t},\n \t// Introduced in DOM Level 2:\n\tisSupported:function(feature, version){\n\t\treturn this.ownerDocument.implementation.hasFeature(feature,version);\n\t},\n // Introduced in DOM Level 2:\n hasAttributes:function(){\n \treturn this.attributes.length>0;\n },\n\t/**\n\t * Look up the prefix associated to the given namespace URI, starting from this node.\n\t * **The default namespace declarations are ignored by this method.**\n\t * See Namespace Prefix Lookup for details on the algorithm used by this method.\n\t *\n\t * _Note: The implementation seems to be incomplete when compared to the algorithm described in the specs._\n\t *\n\t * @param {string | null} namespaceURI\n\t * @returns {string | null}\n\t * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix\n\t * @see https://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#lookupNamespacePrefixAlgo\n\t * @see https://dom.spec.whatwg.org/#dom-node-lookupprefix\n\t * @see https://github.com/xmldom/xmldom/issues/322\n\t */\n lookupPrefix:function(namespaceURI){\n \tvar el = this;\n \twhile(el){\n \t\tvar map = el._nsMap;\n \t\t//console.dir(map)\n \t\tif(map){\n \t\t\tfor(var n in map){\n\t\t\t\t\t\tif (Object.prototype.hasOwnProperty.call(map, n) && map[n] === namespaceURI) {\n\t\t\t\t\t\t\treturn n;\n\t\t\t\t\t\t}\n \t\t\t}\n \t\t}\n \t\tel = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;\n \t}\n \treturn null;\n },\n // Introduced in DOM Level 3:\n lookupNamespaceURI:function(prefix){\n \tvar el = this;\n \twhile(el){\n \t\tvar map = el._nsMap;\n \t\t//console.dir(map)\n \t\tif(map){\n \t\t\tif(Object.prototype.hasOwnProperty.call(map, prefix)){\n \t\t\t\treturn map[prefix] ;\n \t\t\t}\n \t\t}\n \t\tel = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;\n \t}\n \treturn null;\n },\n // Introduced in DOM Level 3:\n isDefaultNamespace:function(namespaceURI){\n \tvar prefix = this.lookupPrefix(namespaceURI);\n \treturn prefix == null;\n }\n};\n\n\nfunction _xmlEncoder(c){\n\treturn c == '<' && '<' ||\n c == '>' && '>' ||\n c == '&' && '&' ||\n c == '\"' && '"' ||\n '&#'+c.charCodeAt()+';'\n}\n\n\ncopy(NodeType,Node);\ncopy(NodeType,Node.prototype);\n\n/**\n * @param callback return true for continue,false for break\n * @return boolean true: break visit;\n */\nfunction _visitNode(node,callback){\n\tif(callback(node)){\n\t\treturn true;\n\t}\n\tif(node = node.firstChild){\n\t\tdo{\n\t\t\tif(_visitNode(node,callback)){return true}\n }while(node=node.nextSibling)\n }\n}\n\n\n\nfunction Document(){\n\tthis.ownerDocument = this;\n}\n\nfunction _onAddAttribute(doc,el,newAttr){\n\tdoc && doc._inc++;\n\tvar ns = newAttr.namespaceURI ;\n\tif(ns === NAMESPACE.XMLNS){\n\t\t//update namespace\n\t\tel._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value\n\t}\n}\n\nfunction _onRemoveAttribute(doc,el,newAttr,remove){\n\tdoc && doc._inc++;\n\tvar ns = newAttr.namespaceURI ;\n\tif(ns === NAMESPACE.XMLNS){\n\t\t//update namespace\n\t\tdelete el._nsMap[newAttr.prefix?newAttr.localName:'']\n\t}\n}\n\n/**\n * Updates `el.childNodes`, updating the indexed items and it's `length`.\n * Passing `newChild` means it will be appended.\n * Otherwise it's assumed that an item has been removed,\n * and `el.firstNode` and it's `.nextSibling` are used\n * to walk the current list of child nodes.\n *\n * @param {Document} doc\n * @param {Node} el\n * @param {Node} [newChild]\n * @private\n */\nfunction _onUpdateChild (doc, el, newChild) {\n\tif(doc && doc._inc){\n\t\tdoc._inc++;\n\t\t//update childNodes\n\t\tvar cs = el.childNodes;\n\t\tif (newChild) {\n\t\t\tcs[cs.length++] = newChild;\n\t\t} else {\n\t\t\tvar child = el.firstChild;\n\t\t\tvar i = 0;\n\t\t\twhile (child) {\n\t\t\t\tcs[i++] = child;\n\t\t\t\tchild = child.nextSibling;\n\t\t\t}\n\t\t\tcs.length = i;\n\t\t\tdelete cs[cs.length];\n\t\t}\n\t}\n}\n\n/**\n * Removes the connections between `parentNode` and `child`\n * and any existing `child.previousSibling` or `child.nextSibling`.\n *\n * @see https://github.com/xmldom/xmldom/issues/135\n * @see https://github.com/xmldom/xmldom/issues/145\n *\n * @param {Node} parentNode\n * @param {Node} child\n * @returns {Node} the child that was removed.\n * @private\n */\nfunction _removeChild (parentNode, child) {\n\tvar previous = child.previousSibling;\n\tvar next = child.nextSibling;\n\tif (previous) {\n\t\tprevious.nextSibling = next;\n\t} else {\n\t\tparentNode.firstChild = next;\n\t}\n\tif (next) {\n\t\tnext.previousSibling = previous;\n\t} else {\n\t\tparentNode.lastChild = previous;\n\t}\n\tchild.parentNode = null;\n\tchild.previousSibling = null;\n\tchild.nextSibling = null;\n\t_onUpdateChild(parentNode.ownerDocument, parentNode);\n\treturn child;\n}\n\n/**\n * Returns `true` if `node` can be a parent for insertion.\n * @param {Node} node\n * @returns {boolean}\n */\nfunction hasValidParentNodeType(node) {\n\treturn (\n\t\tnode &&\n\t\t(node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.ELEMENT_NODE)\n\t);\n}\n\n/**\n * Returns `true` if `node` can be inserted according to it's `nodeType`.\n * @param {Node} node\n * @returns {boolean}\n */\nfunction hasInsertableNodeType(node) {\n\treturn (\n\t\tnode &&\n\t\t(isElementNode(node) ||\n\t\t\tisTextNode(node) ||\n\t\t\tisDocTypeNode(node) ||\n\t\t\tnode.nodeType === Node.DOCUMENT_FRAGMENT_NODE ||\n\t\t\tnode.nodeType === Node.COMMENT_NODE ||\n\t\t\tnode.nodeType === Node.PROCESSING_INSTRUCTION_NODE)\n\t);\n}\n\n/**\n * Returns true if `node` is a DOCTYPE node\n * @param {Node} node\n * @returns {boolean}\n */\nfunction isDocTypeNode(node) {\n\treturn node && node.nodeType === Node.DOCUMENT_TYPE_NODE;\n}\n\n/**\n * Returns true if the node is an element\n * @param {Node} node\n * @returns {boolean}\n */\nfunction isElementNode(node) {\n\treturn node && node.nodeType === Node.ELEMENT_NODE;\n}\n/**\n * Returns true if `node` is a text node\n * @param {Node} node\n * @returns {boolean}\n */\nfunction isTextNode(node) {\n\treturn node && node.nodeType === Node.TEXT_NODE;\n}\n\n/**\n * Check if en element node can be inserted before `child`, or at the end if child is falsy,\n * according to the presence and position of a doctype node on the same level.\n *\n * @param {Document} doc The document node\n * @param {Node} child the node that would become the nextSibling if the element would be inserted\n * @returns {boolean} `true` if an element can be inserted before child\n * @private\n * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n */\nfunction isElementInsertionPossible(doc, child) {\n\tvar parentChildNodes = doc.childNodes || [];\n\tif (find(parentChildNodes, isElementNode) || isDocTypeNode(child)) {\n\t\treturn false;\n\t}\n\tvar docTypeNode = find(parentChildNodes, isDocTypeNode);\n\treturn !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child));\n}\n\n/**\n * Check if en element node can be inserted before `child`, or at the end if child is falsy,\n * according to the presence and position of a doctype node on the same level.\n *\n * @param {Node} doc The document node\n * @param {Node} child the node that would become the nextSibling if the element would be inserted\n * @returns {boolean} `true` if an element can be inserted before child\n * @private\n * https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n */\nfunction isElementReplacementPossible(doc, child) {\n\tvar parentChildNodes = doc.childNodes || [];\n\n\tfunction hasElementChildThatIsNotChild(node) {\n\t\treturn isElementNode(node) && node !== child;\n\t}\n\n\tif (find(parentChildNodes, hasElementChildThatIsNotChild)) {\n\t\treturn false;\n\t}\n\tvar docTypeNode = find(parentChildNodes, isDocTypeNode);\n\treturn !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child));\n}\n\n/**\n * @private\n * Steps 1-5 of the checks before inserting and before replacing a child are the same.\n *\n * @param {Node} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node=} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n * @see https://dom.spec.whatwg.org/#concept-node-replace\n */\nfunction assertPreInsertionValidity1to5(parent, node, child) {\n\t// 1. If `parent` is not a Document, DocumentFragment, or Element node, then throw a \"HierarchyRequestError\" DOMException.\n\tif (!hasValidParentNodeType(parent)) {\n\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Unexpected parent node type ' + parent.nodeType);\n\t}\n\t// 2. If `node` is a host-including inclusive ancestor of `parent`, then throw a \"HierarchyRequestError\" DOMException.\n\t// not implemented!\n\t// 3. If `child` is non-null and its parent is not `parent`, then throw a \"NotFoundError\" DOMException.\n\tif (child && child.parentNode !== parent) {\n\t\tthrow new DOMException(NOT_FOUND_ERR, 'child not in parent');\n\t}\n\tif (\n\t\t// 4. If `node` is not a DocumentFragment, DocumentType, Element, or CharacterData node, then throw a \"HierarchyRequestError\" DOMException.\n\t\t!hasInsertableNodeType(node) ||\n\t\t// 5. If either `node` is a Text node and `parent` is a document,\n\t\t// the sax parser currently adds top level text nodes, this will be fixed in 0.9.0\n\t\t// || (node.nodeType === Node.TEXT_NODE && parent.nodeType === Node.DOCUMENT_NODE)\n\t\t// or `node` is a doctype and `parent` is not a document, then throw a \"HierarchyRequestError\" DOMException.\n\t\t(isDocTypeNode(node) && parent.nodeType !== Node.DOCUMENT_NODE)\n\t) {\n\t\tthrow new DOMException(\n\t\t\tHIERARCHY_REQUEST_ERR,\n\t\t\t'Unexpected node type ' + node.nodeType + ' for parent node type ' + parent.nodeType\n\t\t);\n\t}\n}\n\n/**\n * @private\n * Step 6 of the checks before inserting and before replacing a child are different.\n *\n * @param {Document} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node | undefined} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n * @see https://dom.spec.whatwg.org/#concept-node-replace\n */\nfunction assertPreInsertionValidityInDocument(parent, node, child) {\n\tvar parentChildNodes = parent.childNodes || [];\n\tvar nodeChildNodes = node.childNodes || [];\n\n\t// DocumentFragment\n\tif (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n\t\tvar nodeChildElements = nodeChildNodes.filter(isElementNode);\n\t\t// If node has more than one element child or has a Text node child.\n\t\tif (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');\n\t\t}\n\t\t// Otherwise, if `node` has one element child and either `parent` has an element child,\n\t\t// `child` is a doctype, or `child` is non-null and a doctype is following `child`.\n\t\tif (nodeChildElements.length === 1 && !isElementInsertionPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');\n\t\t}\n\t}\n\t// Element\n\tif (isElementNode(node)) {\n\t\t// `parent` has an element child, `child` is a doctype,\n\t\t// or `child` is non-null and a doctype is following `child`.\n\t\tif (!isElementInsertionPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');\n\t\t}\n\t}\n\t// DocumentType\n\tif (isDocTypeNode(node)) {\n\t\t// `parent` has a doctype child,\n\t\tif (find(parentChildNodes, isDocTypeNode)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');\n\t\t}\n\t\tvar parentElementChild = find(parentChildNodes, isElementNode);\n\t\t// `child` is non-null and an element is preceding `child`,\n\t\tif (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');\n\t\t}\n\t\t// or `child` is null and `parent` has an element child.\n\t\tif (!child && parentElementChild) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can not be appended since element is present');\n\t\t}\n\t}\n}\n\n/**\n * @private\n * Step 6 of the checks before inserting and before replacing a child are different.\n *\n * @param {Document} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node | undefined} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n * @see https://dom.spec.whatwg.org/#concept-node-replace\n */\nfunction assertPreReplacementValidityInDocument(parent, node, child) {\n\tvar parentChildNodes = parent.childNodes || [];\n\tvar nodeChildNodes = node.childNodes || [];\n\n\t// DocumentFragment\n\tif (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n\t\tvar nodeChildElements = nodeChildNodes.filter(isElementNode);\n\t\t// If `node` has more than one element child or has a Text node child.\n\t\tif (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'More than one element or text in fragment');\n\t\t}\n\t\t// Otherwise, if `node` has one element child and either `parent` has an element child that is not `child` or a doctype is following `child`.\n\t\tif (nodeChildElements.length === 1 && !isElementReplacementPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Element in fragment can not be inserted before doctype');\n\t\t}\n\t}\n\t// Element\n\tif (isElementNode(node)) {\n\t\t// `parent` has an element child that is not `child` or a doctype is following `child`.\n\t\tif (!isElementReplacementPossible(parent, child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one element can be added and only after doctype');\n\t\t}\n\t}\n\t// DocumentType\n\tif (isDocTypeNode(node)) {\n\t\tfunction hasDoctypeChildThatIsNotChild(node) {\n\t\t\treturn isDocTypeNode(node) && node !== child;\n\t\t}\n\n\t\t// `parent` has a doctype child that is not `child`,\n\t\tif (find(parentChildNodes, hasDoctypeChildThatIsNotChild)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Only one doctype is allowed');\n\t\t}\n\t\tvar parentElementChild = find(parentChildNodes, isElementNode);\n\t\t// or an element is preceding `child`.\n\t\tif (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) {\n\t\t\tthrow new DOMException(HIERARCHY_REQUEST_ERR, 'Doctype can only be inserted before an element');\n\t\t}\n\t}\n}\n\n/**\n * @private\n * @param {Node} parent the parent node to insert `node` into\n * @param {Node} node the node to insert\n * @param {Node=} child the node that should become the `nextSibling` of `node`\n * @returns {Node}\n * @throws DOMException for several node combinations that would create a DOM that is not well-formed.\n * @throws DOMException if `child` is provided but is not a child of `parent`.\n * @see https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity\n */\nfunction _insertBefore(parent, node, child, _inDocumentAssertion) {\n\t// To ensure pre-insertion validity of a node into a parent before a child, run these steps:\n\tassertPreInsertionValidity1to5(parent, node, child);\n\n\t// If parent is a document, and any of the statements below, switched on the interface node implements,\n\t// are true, then throw a \"HierarchyRequestError\" DOMException.\n\tif (parent.nodeType === Node.DOCUMENT_NODE) {\n\t\t(_inDocumentAssertion || assertPreInsertionValidityInDocument)(parent, node, child);\n\t}\n\n\tvar cp = node.parentNode;\n\tif(cp){\n\t\tcp.removeChild(node);//remove and update\n\t}\n\tif(node.nodeType === DOCUMENT_FRAGMENT_NODE){\n\t\tvar newFirst = node.firstChild;\n\t\tif (newFirst == null) {\n\t\t\treturn node;\n\t\t}\n\t\tvar newLast = node.lastChild;\n\t}else{\n\t\tnewFirst = newLast = node;\n\t}\n\tvar pre = child ? child.previousSibling : parent.lastChild;\n\n\tnewFirst.previousSibling = pre;\n\tnewLast.nextSibling = child;\n\n\n\tif(pre){\n\t\tpre.nextSibling = newFirst;\n\t}else{\n\t\tparent.firstChild = newFirst;\n\t}\n\tif(child == null){\n\t\tparent.lastChild = newLast;\n\t}else{\n\t\tchild.previousSibling = newLast;\n\t}\n\tdo{\n\t\tnewFirst.parentNode = parent;\n\t}while(newFirst !== newLast && (newFirst= newFirst.nextSibling))\n\t_onUpdateChild(parent.ownerDocument||parent, parent);\n\t//console.log(parent.lastChild.nextSibling == null)\n\tif (node.nodeType == DOCUMENT_FRAGMENT_NODE) {\n\t\tnode.firstChild = node.lastChild = null;\n\t}\n\treturn node;\n}\n\n/**\n * Appends `newChild` to `parentNode`.\n * If `newChild` is already connected to a `parentNode` it is first removed from it.\n *\n * @see https://github.com/xmldom/xmldom/issues/135\n * @see https://github.com/xmldom/xmldom/issues/145\n * @param {Node} parentNode\n * @param {Node} newChild\n * @returns {Node}\n * @private\n */\nfunction _appendSingleChild (parentNode, newChild) {\n\tif (newChild.parentNode) {\n\t\tnewChild.parentNode.removeChild(newChild);\n\t}\n\tnewChild.parentNode = parentNode;\n\tnewChild.previousSibling = parentNode.lastChild;\n\tnewChild.nextSibling = null;\n\tif (newChild.previousSibling) {\n\t\tnewChild.previousSibling.nextSibling = newChild;\n\t} else {\n\t\tparentNode.firstChild = newChild;\n\t}\n\tparentNode.lastChild = newChild;\n\t_onUpdateChild(parentNode.ownerDocument, parentNode, newChild);\n\treturn newChild;\n}\n\nDocument.prototype = {\n\t//implementation : null,\n\tnodeName : '#document',\n\tnodeType : DOCUMENT_NODE,\n\t/**\n\t * The DocumentType node of the document.\n\t *\n\t * @readonly\n\t * @type DocumentType\n\t */\n\tdoctype : null,\n\tdocumentElement : null,\n\t_inc : 1,\n\n\tinsertBefore : function(newChild, refChild){//raises\n\t\tif(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){\n\t\t\tvar child = newChild.firstChild;\n\t\t\twhile(child){\n\t\t\t\tvar next = child.nextSibling;\n\t\t\t\tthis.insertBefore(child,refChild);\n\t\t\t\tchild = next;\n\t\t\t}\n\t\t\treturn newChild;\n\t\t}\n\t\t_insertBefore(this, newChild, refChild);\n\t\tnewChild.ownerDocument = this;\n\t\tif (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) {\n\t\t\tthis.documentElement = newChild;\n\t\t}\n\n\t\treturn newChild;\n\t},\n\tremoveChild : function(oldChild){\n\t\tif(this.documentElement == oldChild){\n\t\t\tthis.documentElement = null;\n\t\t}\n\t\treturn _removeChild(this,oldChild);\n\t},\n\treplaceChild: function (newChild, oldChild) {\n\t\t//raises\n\t\t_insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument);\n\t\tnewChild.ownerDocument = this;\n\t\tif (oldChild) {\n\t\t\tthis.removeChild(oldChild);\n\t\t}\n\t\tif (isElementNode(newChild)) {\n\t\t\tthis.documentElement = newChild;\n\t\t}\n\t},\n\t// Introduced in DOM Level 2:\n\timportNode : function(importedNode,deep){\n\t\treturn importNode(this,importedNode,deep);\n\t},\n\t// Introduced in DOM Level 2:\n\tgetElementById :\tfunction(id){\n\t\tvar rtv = null;\n\t\t_visitNode(this.documentElement,function(node){\n\t\t\tif(node.nodeType == ELEMENT_NODE){\n\t\t\t\tif(node.getAttribute('id') == id){\n\t\t\t\t\trtv = node;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t\treturn rtv;\n\t},\n\n\t/**\n\t * The `getElementsByClassName` method of `Document` interface returns an array-like object\n\t * of all child elements which have **all** of the given class name(s).\n\t *\n\t * Returns an empty list if `classeNames` is an empty string or only contains HTML white space characters.\n\t *\n\t *\n\t * Warning: This is a live LiveNodeList.\n\t * Changes in the DOM will reflect in the array as the changes occur.\n\t * If an element selected by this array no longer qualifies for the selector,\n\t * it will automatically be removed. Be aware of this for iteration purposes.\n\t *\n\t * @param {string} classNames is a string representing the class name(s) to match; multiple class names are separated by (ASCII-)whitespace\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName\n\t * @see https://dom.spec.whatwg.org/#concept-getelementsbyclassname\n\t */\n\tgetElementsByClassName: function(classNames) {\n\t\tvar classNamesSet = toOrderedSet(classNames)\n\t\treturn new LiveNodeList(this, function(base) {\n\t\t\tvar ls = [];\n\t\t\tif (classNamesSet.length > 0) {\n\t\t\t\t_visitNode(base.documentElement, function(node) {\n\t\t\t\t\tif(node !== base && node.nodeType === ELEMENT_NODE) {\n\t\t\t\t\t\tvar nodeClassNames = node.getAttribute('class')\n\t\t\t\t\t\t// can be null if the attribute does not exist\n\t\t\t\t\t\tif (nodeClassNames) {\n\t\t\t\t\t\t\t// before splitting and iterating just compare them for the most common case\n\t\t\t\t\t\t\tvar matches = classNames === nodeClassNames;\n\t\t\t\t\t\t\tif (!matches) {\n\t\t\t\t\t\t\t\tvar nodeClassNamesSet = toOrderedSet(nodeClassNames)\n\t\t\t\t\t\t\t\tmatches = classNamesSet.every(arrayIncludes(nodeClassNamesSet))\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(matches) {\n\t\t\t\t\t\t\t\tls.push(node);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn ls;\n\t\t});\n\t},\n\n\t//document factory method:\n\tcreateElement :\tfunction(tagName){\n\t\tvar node = new Element();\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = tagName;\n\t\tnode.tagName = tagName;\n\t\tnode.localName = tagName;\n\t\tnode.childNodes = new NodeList();\n\t\tvar attrs\t= node.attributes = new NamedNodeMap();\n\t\tattrs._ownerElement = node;\n\t\treturn node;\n\t},\n\tcreateDocumentFragment :\tfunction(){\n\t\tvar node = new DocumentFragment();\n\t\tnode.ownerDocument = this;\n\t\tnode.childNodes = new NodeList();\n\t\treturn node;\n\t},\n\tcreateTextNode :\tfunction(data){\n\t\tvar node = new Text();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateComment :\tfunction(data){\n\t\tvar node = new Comment();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateCDATASection :\tfunction(data){\n\t\tvar node = new CDATASection();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateProcessingInstruction :\tfunction(target,data){\n\t\tvar node = new ProcessingInstruction();\n\t\tnode.ownerDocument = this;\n\t\tnode.tagName = node.nodeName = node.target = target;\n\t\tnode.nodeValue = node.data = data;\n\t\treturn node;\n\t},\n\tcreateAttribute :\tfunction(name){\n\t\tvar node = new Attr();\n\t\tnode.ownerDocument\t= this;\n\t\tnode.name = name;\n\t\tnode.nodeName\t= name;\n\t\tnode.localName = name;\n\t\tnode.specified = true;\n\t\treturn node;\n\t},\n\tcreateEntityReference :\tfunction(name){\n\t\tvar node = new EntityReference();\n\t\tnode.ownerDocument\t= this;\n\t\tnode.nodeName\t= name;\n\t\treturn node;\n\t},\n\t// Introduced in DOM Level 2:\n\tcreateElementNS :\tfunction(namespaceURI,qualifiedName){\n\t\tvar node = new Element();\n\t\tvar pl = qualifiedName.split(':');\n\t\tvar attrs\t= node.attributes = new NamedNodeMap();\n\t\tnode.childNodes = new NodeList();\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.tagName = qualifiedName;\n\t\tnode.namespaceURI = namespaceURI;\n\t\tif(pl.length == 2){\n\t\t\tnode.prefix = pl[0];\n\t\t\tnode.localName = pl[1];\n\t\t}else{\n\t\t\t//el.prefix = null;\n\t\t\tnode.localName = qualifiedName;\n\t\t}\n\t\tattrs._ownerElement = node;\n\t\treturn node;\n\t},\n\t// Introduced in DOM Level 2:\n\tcreateAttributeNS :\tfunction(namespaceURI,qualifiedName){\n\t\tvar node = new Attr();\n\t\tvar pl = qualifiedName.split(':');\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.name = qualifiedName;\n\t\tnode.namespaceURI = namespaceURI;\n\t\tnode.specified = true;\n\t\tif(pl.length == 2){\n\t\t\tnode.prefix = pl[0];\n\t\t\tnode.localName = pl[1];\n\t\t}else{\n\t\t\t//el.prefix = null;\n\t\t\tnode.localName = qualifiedName;\n\t\t}\n\t\treturn node;\n\t}\n};\n_extends(Document,Node);\n\n\nfunction Element() {\n\tthis._nsMap = {};\n};\nElement.prototype = {\n\tnodeType : ELEMENT_NODE,\n\thasAttribute : function(name){\n\t\treturn this.getAttributeNode(name)!=null;\n\t},\n\tgetAttribute : function(name){\n\t\tvar attr = this.getAttributeNode(name);\n\t\treturn attr && attr.value || '';\n\t},\n\tgetAttributeNode : function(name){\n\t\treturn this.attributes.getNamedItem(name);\n\t},\n\tsetAttribute : function(name, value){\n\t\tvar attr = this.ownerDocument.createAttribute(name);\n\t\tattr.value = attr.nodeValue = \"\" + value;\n\t\tthis.setAttributeNode(attr)\n\t},\n\tremoveAttribute : function(name){\n\t\tvar attr = this.getAttributeNode(name)\n\t\tattr && this.removeAttributeNode(attr);\n\t},\n\n\t//four real opeartion method\n\tappendChild:function(newChild){\n\t\tif(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){\n\t\t\treturn this.insertBefore(newChild,null);\n\t\t}else{\n\t\t\treturn _appendSingleChild(this,newChild);\n\t\t}\n\t},\n\tsetAttributeNode : function(newAttr){\n\t\treturn this.attributes.setNamedItem(newAttr);\n\t},\n\tsetAttributeNodeNS : function(newAttr){\n\t\treturn this.attributes.setNamedItemNS(newAttr);\n\t},\n\tremoveAttributeNode : function(oldAttr){\n\t\t//console.log(this == oldAttr.ownerElement)\n\t\treturn this.attributes.removeNamedItem(oldAttr.nodeName);\n\t},\n\t//get real attribute name,and remove it by removeAttributeNode\n\tremoveAttributeNS : function(namespaceURI, localName){\n\t\tvar old = this.getAttributeNodeNS(namespaceURI, localName);\n\t\told && this.removeAttributeNode(old);\n\t},\n\n\thasAttributeNS : function(namespaceURI, localName){\n\t\treturn this.getAttributeNodeNS(namespaceURI, localName)!=null;\n\t},\n\tgetAttributeNS : function(namespaceURI, localName){\n\t\tvar attr = this.getAttributeNodeNS(namespaceURI, localName);\n\t\treturn attr && attr.value || '';\n\t},\n\tsetAttributeNS : function(namespaceURI, qualifiedName, value){\n\t\tvar attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);\n\t\tattr.value = attr.nodeValue = \"\" + value;\n\t\tthis.setAttributeNode(attr)\n\t},\n\tgetAttributeNodeNS : function(namespaceURI, localName){\n\t\treturn this.attributes.getNamedItemNS(namespaceURI, localName);\n\t},\n\n\tgetElementsByTagName : function(tagName){\n\t\treturn new LiveNodeList(this,function(base){\n\t\t\tvar ls = [];\n\t\t\t_visitNode(base,function(node){\n\t\t\t\tif(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){\n\t\t\t\t\tls.push(node);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn ls;\n\t\t});\n\t},\n\tgetElementsByTagNameNS : function(namespaceURI, localName){\n\t\treturn new LiveNodeList(this,function(base){\n\t\t\tvar ls = [];\n\t\t\t_visitNode(base,function(node){\n\t\t\t\tif(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){\n\t\t\t\t\tls.push(node);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn ls;\n\n\t\t});\n\t}\n};\nDocument.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;\nDocument.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;\n\n\n_extends(Element,Node);\nfunction Attr() {\n};\nAttr.prototype.nodeType = ATTRIBUTE_NODE;\n_extends(Attr,Node);\n\n\nfunction CharacterData() {\n};\nCharacterData.prototype = {\n\tdata : '',\n\tsubstringData : function(offset, count) {\n\t\treturn this.data.substring(offset, offset+count);\n\t},\n\tappendData: function(text) {\n\t\ttext = this.data+text;\n\t\tthis.nodeValue = this.data = text;\n\t\tthis.length = text.length;\n\t},\n\tinsertData: function(offset,text) {\n\t\tthis.replaceData(offset,0,text);\n\n\t},\n\tappendChild:function(newChild){\n\t\tthrow new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR])\n\t},\n\tdeleteData: function(offset, count) {\n\t\tthis.replaceData(offset,count,\"\");\n\t},\n\treplaceData: function(offset, count, text) {\n\t\tvar start = this.data.substring(0,offset);\n\t\tvar end = this.data.substring(offset+count);\n\t\ttext = start + text + end;\n\t\tthis.nodeValue = this.data = text;\n\t\tthis.length = text.length;\n\t}\n}\n_extends(CharacterData,Node);\nfunction Text() {\n};\nText.prototype = {\n\tnodeName : \"#text\",\n\tnodeType : TEXT_NODE,\n\tsplitText : function(offset) {\n\t\tvar text = this.data;\n\t\tvar newText = text.substring(offset);\n\t\ttext = text.substring(0, offset);\n\t\tthis.data = this.nodeValue = text;\n\t\tthis.length = text.length;\n\t\tvar newNode = this.ownerDocument.createTextNode(newText);\n\t\tif(this.parentNode){\n\t\t\tthis.parentNode.insertBefore(newNode, this.nextSibling);\n\t\t}\n\t\treturn newNode;\n\t}\n}\n_extends(Text,CharacterData);\nfunction Comment() {\n};\nComment.prototype = {\n\tnodeName : \"#comment\",\n\tnodeType : COMMENT_NODE\n}\n_extends(Comment,CharacterData);\n\nfunction CDATASection() {\n};\nCDATASection.prototype = {\n\tnodeName : \"#cdata-section\",\n\tnodeType : CDATA_SECTION_NODE\n}\n_extends(CDATASection,CharacterData);\n\n\nfunction DocumentType() {\n};\nDocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;\n_extends(DocumentType,Node);\n\nfunction Notation() {\n};\nNotation.prototype.nodeType = NOTATION_NODE;\n_extends(Notation,Node);\n\nfunction Entity() {\n};\nEntity.prototype.nodeType = ENTITY_NODE;\n_extends(Entity,Node);\n\nfunction EntityReference() {\n};\nEntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;\n_extends(EntityReference,Node);\n\nfunction DocumentFragment() {\n};\nDocumentFragment.prototype.nodeName =\t\"#document-fragment\";\nDocumentFragment.prototype.nodeType =\tDOCUMENT_FRAGMENT_NODE;\n_extends(DocumentFragment,Node);\n\n\nfunction ProcessingInstruction() {\n}\nProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;\n_extends(ProcessingInstruction,Node);\nfunction XMLSerializer(){}\nXMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter){\n\treturn nodeSerializeToString.call(node,isHtml,nodeFilter);\n}\nNode.prototype.toString = nodeSerializeToString;\nfunction nodeSerializeToString(isHtml,nodeFilter){\n\tvar buf = [];\n\tvar refNode = this.nodeType == 9 && this.documentElement || this;\n\tvar prefix = refNode.prefix;\n\tvar uri = refNode.namespaceURI;\n\n\tif(uri && prefix == null){\n\t\t//console.log(prefix)\n\t\tvar prefix = refNode.lookupPrefix(uri);\n\t\tif(prefix == null){\n\t\t\t//isHTML = true;\n\t\t\tvar visibleNamespaces=[\n\t\t\t{namespace:uri,prefix:null}\n\t\t\t//{namespace:uri,prefix:''}\n\t\t\t]\n\t\t}\n\t}\n\tserializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces);\n\t//console.log('###',this.nodeType,uri,prefix,buf.join(''))\n\treturn buf.join('');\n}\n\nfunction needNamespaceDefine(node, isHTML, visibleNamespaces) {\n\tvar prefix = node.prefix || '';\n\tvar uri = node.namespaceURI;\n\t// According to [Namespaces in XML 1.0](https://www.w3.org/TR/REC-xml-names/#ns-using) ,\n\t// and more specifically https://www.w3.org/TR/REC-xml-names/#nsc-NoPrefixUndecl :\n\t// > In a namespace declaration for a prefix [...], the attribute value MUST NOT be empty.\n\t// in a similar manner [Namespaces in XML 1.1](https://www.w3.org/TR/xml-names11/#ns-using)\n\t// and more specifically https://www.w3.org/TR/xml-names11/#nsc-NSDeclared :\n\t// > [...] Furthermore, the attribute value [...] must not be an empty string.\n\t// so serializing empty namespace value like xmlns:ds=\"\" would produce an invalid XML document.\n\tif (!uri) {\n\t\treturn false;\n\t}\n\tif (prefix === \"xml\" && uri === NAMESPACE.XML || uri === NAMESPACE.XMLNS) {\n\t\treturn false;\n\t}\n\n\tvar i = visibleNamespaces.length\n\twhile (i--) {\n\t\tvar ns = visibleNamespaces[i];\n\t\t// get namespace prefix\n\t\tif (ns.prefix === prefix) {\n\t\t\treturn ns.namespace !== uri;\n\t\t}\n\t}\n\treturn true;\n}\n/**\n * Well-formed constraint: No < in Attribute Values\n * > The replacement text of any entity referred to directly or indirectly\n * > in an attribute value must not contain a <.\n * @see https://www.w3.org/TR/xml11/#CleanAttrVals\n * @see https://www.w3.org/TR/xml11/#NT-AttValue\n *\n * Literal whitespace other than space that appear in attribute values\n * are serialized as their entity references, so they will be preserved.\n * (In contrast to whitespace literals in the input which are normalized to spaces)\n * @see https://www.w3.org/TR/xml11/#AVNormalize\n * @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes\n */\nfunction addSerializedAttribute(buf, qualifiedName, value) {\n\tbuf.push(' ', qualifiedName, '=\"', value.replace(/[<>&\"\\t\\n\\r]/g, _xmlEncoder), '\"')\n}\n\nfunction serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){\n\tif (!visibleNamespaces) {\n\t\tvisibleNamespaces = [];\n\t}\n\n\tif(nodeFilter){\n\t\tnode = nodeFilter(node);\n\t\tif(node){\n\t\t\tif(typeof node == 'string'){\n\t\t\t\tbuf.push(node);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}else{\n\t\t\treturn;\n\t\t}\n\t\t//buf.sort.apply(attrs, attributeSorter);\n\t}\n\n\tswitch(node.nodeType){\n\tcase ELEMENT_NODE:\n\t\tvar attrs = node.attributes;\n\t\tvar len = attrs.length;\n\t\tvar child = node.firstChild;\n\t\tvar nodeName = node.tagName;\n\n\t\tisHTML = NAMESPACE.isHTML(node.namespaceURI) || isHTML\n\n\t\tvar prefixedNodeName = nodeName\n\t\tif (!isHTML && !node.prefix && node.namespaceURI) {\n\t\t\tvar defaultNS\n\t\t\t// lookup current default ns from `xmlns` attribute\n\t\t\tfor (var ai = 0; ai < attrs.length; ai++) {\n\t\t\t\tif (attrs.item(ai).name === 'xmlns') {\n\t\t\t\t\tdefaultNS = attrs.item(ai).value\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!defaultNS) {\n\t\t\t\t// lookup current default ns in visibleNamespaces\n\t\t\t\tfor (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {\n\t\t\t\t\tvar namespace = visibleNamespaces[nsi]\n\t\t\t\t\tif (namespace.prefix === '' && namespace.namespace === node.namespaceURI) {\n\t\t\t\t\t\tdefaultNS = namespace.namespace\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (defaultNS !== node.namespaceURI) {\n\t\t\t\tfor (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {\n\t\t\t\t\tvar namespace = visibleNamespaces[nsi]\n\t\t\t\t\tif (namespace.namespace === node.namespaceURI) {\n\t\t\t\t\t\tif (namespace.prefix) {\n\t\t\t\t\t\t\tprefixedNodeName = namespace.prefix + ':' + nodeName\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuf.push('<', prefixedNodeName);\n\n\t\tfor(var i=0;i');\n\t\t\t//if is cdata child node\n\t\t\tif(isHTML && /^script$/i.test(nodeName)){\n\t\t\t\twhile(child){\n\t\t\t\t\tif(child.data){\n\t\t\t\t\t\tbuf.push(child.data);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tserializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n\t\t\t\t\t}\n\t\t\t\t\tchild = child.nextSibling;\n\t\t\t\t}\n\t\t\t}else\n\t\t\t{\n\t\t\t\twhile(child){\n\t\t\t\t\tserializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n\t\t\t\t\tchild = child.nextSibling;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbuf.push('');\n\t\t}else{\n\t\t\tbuf.push('/>');\n\t\t}\n\t\t// remove added visible namespaces\n\t\t//visibleNamespaces.length = startVisibleNamespaces;\n\t\treturn;\n\tcase DOCUMENT_NODE:\n\tcase DOCUMENT_FRAGMENT_NODE:\n\t\tvar child = node.firstChild;\n\t\twhile(child){\n\t\t\tserializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice());\n\t\t\tchild = child.nextSibling;\n\t\t}\n\t\treturn;\n\tcase ATTRIBUTE_NODE:\n\t\treturn addSerializedAttribute(buf, node.name, node.value);\n\tcase TEXT_NODE:\n\t\t/**\n\t\t * The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,\n\t\t * except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section.\n\t\t * If they are needed elsewhere, they must be escaped using either numeric character references or the strings\n\t\t * `&` and `<` respectively.\n\t\t * The right angle bracket (>) may be represented using the string \" > \", and must, for compatibility,\n\t\t * be escaped using either `>` or a character reference when it appears in the string `]]>` in content,\n\t\t * when that string is not marking the end of a CDATA section.\n\t\t *\n\t\t * In the content of elements, character data is any string of characters\n\t\t * which does not contain the start-delimiter of any markup\n\t\t * and does not include the CDATA-section-close delimiter, `]]>`.\n\t\t *\n\t\t * @see https://www.w3.org/TR/xml/#NT-CharData\n\t\t * @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node\n\t\t */\n\t\treturn buf.push(node.data\n\t\t\t.replace(/[<&>]/g,_xmlEncoder)\n\t\t);\n\tcase CDATA_SECTION_NODE:\n\t\treturn buf.push( '');\n\tcase COMMENT_NODE:\n\t\treturn buf.push( \"\");\n\tcase DOCUMENT_TYPE_NODE:\n\t\tvar pubid = node.publicId;\n\t\tvar sysid = node.systemId;\n\t\tbuf.push('');\n\t\t}else if(sysid && sysid!='.'){\n\t\t\tbuf.push(' SYSTEM ', sysid, '>');\n\t\t}else{\n\t\t\tvar sub = node.internalSubset;\n\t\t\tif(sub){\n\t\t\t\tbuf.push(\" [\",sub,\"]\");\n\t\t\t}\n\t\t\tbuf.push(\">\");\n\t\t}\n\t\treturn;\n\tcase PROCESSING_INSTRUCTION_NODE:\n\t\treturn buf.push( \"\");\n\tcase ENTITY_REFERENCE_NODE:\n\t\treturn buf.push( '&',node.nodeName,';');\n\t//case ENTITY_NODE:\n\t//case NOTATION_NODE:\n\tdefault:\n\t\tbuf.push('??',node.nodeName);\n\t}\n}\nfunction importNode(doc,node,deep){\n\tvar node2;\n\tswitch (node.nodeType) {\n\tcase ELEMENT_NODE:\n\t\tnode2 = node.cloneNode(false);\n\t\tnode2.ownerDocument = doc;\n\t\t//var attrs = node2.attributes;\n\t\t//var len = attrs.length;\n\t\t//for(var i=0;i',\n\tlt: '<',\n\tquot: '\"',\n});\n\n/**\n * A map of all entities that are detected in an HTML document.\n * They contain all entries from `XML_ENTITIES`.\n *\n * @see XML_ENTITIES\n * @see DOMParser.parseFromString\n * @see DOMImplementation.prototype.createHTMLDocument\n * @see https://html.spec.whatwg.org/#named-character-references WHATWG HTML(5) Spec\n * @see https://html.spec.whatwg.org/entities.json JSON\n * @see https://www.w3.org/TR/xml-entity-names/ W3C XML Entity Names\n * @see https://www.w3.org/TR/html4/sgml/entities.html W3C HTML4/SGML\n * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_entity_references_in_HTML Wikipedia (HTML)\n * @see https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Entities_representing_special_characters_in_XHTML Wikpedia (XHTML)\n */\nexports.HTML_ENTITIES = freeze({\n\tAacute: '\\u00C1',\n\taacute: '\\u00E1',\n\tAbreve: '\\u0102',\n\tabreve: '\\u0103',\n\tac: '\\u223E',\n\tacd: '\\u223F',\n\tacE: '\\u223E\\u0333',\n\tAcirc: '\\u00C2',\n\tacirc: '\\u00E2',\n\tacute: '\\u00B4',\n\tAcy: '\\u0410',\n\tacy: '\\u0430',\n\tAElig: '\\u00C6',\n\taelig: '\\u00E6',\n\taf: '\\u2061',\n\tAfr: '\\uD835\\uDD04',\n\tafr: '\\uD835\\uDD1E',\n\tAgrave: '\\u00C0',\n\tagrave: '\\u00E0',\n\talefsym: '\\u2135',\n\taleph: '\\u2135',\n\tAlpha: '\\u0391',\n\talpha: '\\u03B1',\n\tAmacr: '\\u0100',\n\tamacr: '\\u0101',\n\tamalg: '\\u2A3F',\n\tAMP: '\\u0026',\n\tamp: '\\u0026',\n\tAnd: '\\u2A53',\n\tand: '\\u2227',\n\tandand: '\\u2A55',\n\tandd: '\\u2A5C',\n\tandslope: '\\u2A58',\n\tandv: '\\u2A5A',\n\tang: '\\u2220',\n\tange: '\\u29A4',\n\tangle: '\\u2220',\n\tangmsd: '\\u2221',\n\tangmsdaa: '\\u29A8',\n\tangmsdab: '\\u29A9',\n\tangmsdac: '\\u29AA',\n\tangmsdad: '\\u29AB',\n\tangmsdae: '\\u29AC',\n\tangmsdaf: '\\u29AD',\n\tangmsdag: '\\u29AE',\n\tangmsdah: '\\u29AF',\n\tangrt: '\\u221F',\n\tangrtvb: '\\u22BE',\n\tangrtvbd: '\\u299D',\n\tangsph: '\\u2222',\n\tangst: '\\u00C5',\n\tangzarr: '\\u237C',\n\tAogon: '\\u0104',\n\taogon: '\\u0105',\n\tAopf: '\\uD835\\uDD38',\n\taopf: '\\uD835\\uDD52',\n\tap: '\\u2248',\n\tapacir: '\\u2A6F',\n\tapE: '\\u2A70',\n\tape: '\\u224A',\n\tapid: '\\u224B',\n\tapos: '\\u0027',\n\tApplyFunction: '\\u2061',\n\tapprox: '\\u2248',\n\tapproxeq: '\\u224A',\n\tAring: '\\u00C5',\n\taring: '\\u00E5',\n\tAscr: '\\uD835\\uDC9C',\n\tascr: '\\uD835\\uDCB6',\n\tAssign: '\\u2254',\n\tast: '\\u002A',\n\tasymp: '\\u2248',\n\tasympeq: '\\u224D',\n\tAtilde: '\\u00C3',\n\tatilde: '\\u00E3',\n\tAuml: '\\u00C4',\n\tauml: '\\u00E4',\n\tawconint: '\\u2233',\n\tawint: '\\u2A11',\n\tbackcong: '\\u224C',\n\tbackepsilon: '\\u03F6',\n\tbackprime: '\\u2035',\n\tbacksim: '\\u223D',\n\tbacksimeq: '\\u22CD',\n\tBackslash: '\\u2216',\n\tBarv: '\\u2AE7',\n\tbarvee: '\\u22BD',\n\tBarwed: '\\u2306',\n\tbarwed: '\\u2305',\n\tbarwedge: '\\u2305',\n\tbbrk: '\\u23B5',\n\tbbrktbrk: '\\u23B6',\n\tbcong: '\\u224C',\n\tBcy: '\\u0411',\n\tbcy: '\\u0431',\n\tbdquo: '\\u201E',\n\tbecaus: '\\u2235',\n\tBecause: '\\u2235',\n\tbecause: '\\u2235',\n\tbemptyv: '\\u29B0',\n\tbepsi: '\\u03F6',\n\tbernou: '\\u212C',\n\tBernoullis: '\\u212C',\n\tBeta: '\\u0392',\n\tbeta: '\\u03B2',\n\tbeth: '\\u2136',\n\tbetween: '\\u226C',\n\tBfr: '\\uD835\\uDD05',\n\tbfr: '\\uD835\\uDD1F',\n\tbigcap: '\\u22C2',\n\tbigcirc: '\\u25EF',\n\tbigcup: '\\u22C3',\n\tbigodot: '\\u2A00',\n\tbigoplus: '\\u2A01',\n\tbigotimes: '\\u2A02',\n\tbigsqcup: '\\u2A06',\n\tbigstar: '\\u2605',\n\tbigtriangledown: '\\u25BD',\n\tbigtriangleup: '\\u25B3',\n\tbiguplus: '\\u2A04',\n\tbigvee: '\\u22C1',\n\tbigwedge: '\\u22C0',\n\tbkarow: '\\u290D',\n\tblacklozenge: '\\u29EB',\n\tblacksquare: '\\u25AA',\n\tblacktriangle: '\\u25B4',\n\tblacktriangledown: '\\u25BE',\n\tblacktriangleleft: '\\u25C2',\n\tblacktriangleright: '\\u25B8',\n\tblank: '\\u2423',\n\tblk12: '\\u2592',\n\tblk14: '\\u2591',\n\tblk34: '\\u2593',\n\tblock: '\\u2588',\n\tbne: '\\u003D\\u20E5',\n\tbnequiv: '\\u2261\\u20E5',\n\tbNot: '\\u2AED',\n\tbnot: '\\u2310',\n\tBopf: '\\uD835\\uDD39',\n\tbopf: '\\uD835\\uDD53',\n\tbot: '\\u22A5',\n\tbottom: '\\u22A5',\n\tbowtie: '\\u22C8',\n\tboxbox: '\\u29C9',\n\tboxDL: '\\u2557',\n\tboxDl: '\\u2556',\n\tboxdL: '\\u2555',\n\tboxdl: '\\u2510',\n\tboxDR: '\\u2554',\n\tboxDr: '\\u2553',\n\tboxdR: '\\u2552',\n\tboxdr: '\\u250C',\n\tboxH: '\\u2550',\n\tboxh: '\\u2500',\n\tboxHD: '\\u2566',\n\tboxHd: '\\u2564',\n\tboxhD: '\\u2565',\n\tboxhd: '\\u252C',\n\tboxHU: '\\u2569',\n\tboxHu: '\\u2567',\n\tboxhU: '\\u2568',\n\tboxhu: '\\u2534',\n\tboxminus: '\\u229F',\n\tboxplus: '\\u229E',\n\tboxtimes: '\\u22A0',\n\tboxUL: '\\u255D',\n\tboxUl: '\\u255C',\n\tboxuL: '\\u255B',\n\tboxul: '\\u2518',\n\tboxUR: '\\u255A',\n\tboxUr: '\\u2559',\n\tboxuR: '\\u2558',\n\tboxur: '\\u2514',\n\tboxV: '\\u2551',\n\tboxv: '\\u2502',\n\tboxVH: '\\u256C',\n\tboxVh: '\\u256B',\n\tboxvH: '\\u256A',\n\tboxvh: '\\u253C',\n\tboxVL: '\\u2563',\n\tboxVl: '\\u2562',\n\tboxvL: '\\u2561',\n\tboxvl: '\\u2524',\n\tboxVR: '\\u2560',\n\tboxVr: '\\u255F',\n\tboxvR: '\\u255E',\n\tboxvr: '\\u251C',\n\tbprime: '\\u2035',\n\tBreve: '\\u02D8',\n\tbreve: '\\u02D8',\n\tbrvbar: '\\u00A6',\n\tBscr: '\\u212C',\n\tbscr: '\\uD835\\uDCB7',\n\tbsemi: '\\u204F',\n\tbsim: '\\u223D',\n\tbsime: '\\u22CD',\n\tbsol: '\\u005C',\n\tbsolb: '\\u29C5',\n\tbsolhsub: '\\u27C8',\n\tbull: '\\u2022',\n\tbullet: '\\u2022',\n\tbump: '\\u224E',\n\tbumpE: '\\u2AAE',\n\tbumpe: '\\u224F',\n\tBumpeq: '\\u224E',\n\tbumpeq: '\\u224F',\n\tCacute: '\\u0106',\n\tcacute: '\\u0107',\n\tCap: '\\u22D2',\n\tcap: '\\u2229',\n\tcapand: '\\u2A44',\n\tcapbrcup: '\\u2A49',\n\tcapcap: '\\u2A4B',\n\tcapcup: '\\u2A47',\n\tcapdot: '\\u2A40',\n\tCapitalDifferentialD: '\\u2145',\n\tcaps: '\\u2229\\uFE00',\n\tcaret: '\\u2041',\n\tcaron: '\\u02C7',\n\tCayleys: '\\u212D',\n\tccaps: '\\u2A4D',\n\tCcaron: '\\u010C',\n\tccaron: '\\u010D',\n\tCcedil: '\\u00C7',\n\tccedil: '\\u00E7',\n\tCcirc: '\\u0108',\n\tccirc: '\\u0109',\n\tCconint: '\\u2230',\n\tccups: '\\u2A4C',\n\tccupssm: '\\u2A50',\n\tCdot: '\\u010A',\n\tcdot: '\\u010B',\n\tcedil: '\\u00B8',\n\tCedilla: '\\u00B8',\n\tcemptyv: '\\u29B2',\n\tcent: '\\u00A2',\n\tCenterDot: '\\u00B7',\n\tcenterdot: '\\u00B7',\n\tCfr: '\\u212D',\n\tcfr: '\\uD835\\uDD20',\n\tCHcy: '\\u0427',\n\tchcy: '\\u0447',\n\tcheck: '\\u2713',\n\tcheckmark: '\\u2713',\n\tChi: '\\u03A7',\n\tchi: '\\u03C7',\n\tcir: '\\u25CB',\n\tcirc: '\\u02C6',\n\tcirceq: '\\u2257',\n\tcirclearrowleft: '\\u21BA',\n\tcirclearrowright: '\\u21BB',\n\tcircledast: '\\u229B',\n\tcircledcirc: '\\u229A',\n\tcircleddash: '\\u229D',\n\tCircleDot: '\\u2299',\n\tcircledR: '\\u00AE',\n\tcircledS: '\\u24C8',\n\tCircleMinus: '\\u2296',\n\tCirclePlus: '\\u2295',\n\tCircleTimes: '\\u2297',\n\tcirE: '\\u29C3',\n\tcire: '\\u2257',\n\tcirfnint: '\\u2A10',\n\tcirmid: '\\u2AEF',\n\tcirscir: '\\u29C2',\n\tClockwiseContourIntegral: '\\u2232',\n\tCloseCurlyDoubleQuote: '\\u201D',\n\tCloseCurlyQuote: '\\u2019',\n\tclubs: '\\u2663',\n\tclubsuit: '\\u2663',\n\tColon: '\\u2237',\n\tcolon: '\\u003A',\n\tColone: '\\u2A74',\n\tcolone: '\\u2254',\n\tcoloneq: '\\u2254',\n\tcomma: '\\u002C',\n\tcommat: '\\u0040',\n\tcomp: '\\u2201',\n\tcompfn: '\\u2218',\n\tcomplement: '\\u2201',\n\tcomplexes: '\\u2102',\n\tcong: '\\u2245',\n\tcongdot: '\\u2A6D',\n\tCongruent: '\\u2261',\n\tConint: '\\u222F',\n\tconint: '\\u222E',\n\tContourIntegral: '\\u222E',\n\tCopf: '\\u2102',\n\tcopf: '\\uD835\\uDD54',\n\tcoprod: '\\u2210',\n\tCoproduct: '\\u2210',\n\tCOPY: '\\u00A9',\n\tcopy: '\\u00A9',\n\tcopysr: '\\u2117',\n\tCounterClockwiseContourIntegral: '\\u2233',\n\tcrarr: '\\u21B5',\n\tCross: '\\u2A2F',\n\tcross: '\\u2717',\n\tCscr: '\\uD835\\uDC9E',\n\tcscr: '\\uD835\\uDCB8',\n\tcsub: '\\u2ACF',\n\tcsube: '\\u2AD1',\n\tcsup: '\\u2AD0',\n\tcsupe: '\\u2AD2',\n\tctdot: '\\u22EF',\n\tcudarrl: '\\u2938',\n\tcudarrr: '\\u2935',\n\tcuepr: '\\u22DE',\n\tcuesc: '\\u22DF',\n\tcularr: '\\u21B6',\n\tcularrp: '\\u293D',\n\tCup: '\\u22D3',\n\tcup: '\\u222A',\n\tcupbrcap: '\\u2A48',\n\tCupCap: '\\u224D',\n\tcupcap: '\\u2A46',\n\tcupcup: '\\u2A4A',\n\tcupdot: '\\u228D',\n\tcupor: '\\u2A45',\n\tcups: '\\u222A\\uFE00',\n\tcurarr: '\\u21B7',\n\tcurarrm: '\\u293C',\n\tcurlyeqprec: '\\u22DE',\n\tcurlyeqsucc: '\\u22DF',\n\tcurlyvee: '\\u22CE',\n\tcurlywedge: '\\u22CF',\n\tcurren: '\\u00A4',\n\tcurvearrowleft: '\\u21B6',\n\tcurvearrowright: '\\u21B7',\n\tcuvee: '\\u22CE',\n\tcuwed: '\\u22CF',\n\tcwconint: '\\u2232',\n\tcwint: '\\u2231',\n\tcylcty: '\\u232D',\n\tDagger: '\\u2021',\n\tdagger: '\\u2020',\n\tdaleth: '\\u2138',\n\tDarr: '\\u21A1',\n\tdArr: '\\u21D3',\n\tdarr: '\\u2193',\n\tdash: '\\u2010',\n\tDashv: '\\u2AE4',\n\tdashv: '\\u22A3',\n\tdbkarow: '\\u290F',\n\tdblac: '\\u02DD',\n\tDcaron: '\\u010E',\n\tdcaron: '\\u010F',\n\tDcy: '\\u0414',\n\tdcy: '\\u0434',\n\tDD: '\\u2145',\n\tdd: '\\u2146',\n\tddagger: '\\u2021',\n\tddarr: '\\u21CA',\n\tDDotrahd: '\\u2911',\n\tddotseq: '\\u2A77',\n\tdeg: '\\u00B0',\n\tDel: '\\u2207',\n\tDelta: '\\u0394',\n\tdelta: '\\u03B4',\n\tdemptyv: '\\u29B1',\n\tdfisht: '\\u297F',\n\tDfr: '\\uD835\\uDD07',\n\tdfr: '\\uD835\\uDD21',\n\tdHar: '\\u2965',\n\tdharl: '\\u21C3',\n\tdharr: '\\u21C2',\n\tDiacriticalAcute: '\\u00B4',\n\tDiacriticalDot: '\\u02D9',\n\tDiacriticalDoubleAcute: '\\u02DD',\n\tDiacriticalGrave: '\\u0060',\n\tDiacriticalTilde: '\\u02DC',\n\tdiam: '\\u22C4',\n\tDiamond: '\\u22C4',\n\tdiamond: '\\u22C4',\n\tdiamondsuit: '\\u2666',\n\tdiams: '\\u2666',\n\tdie: '\\u00A8',\n\tDifferentialD: '\\u2146',\n\tdigamma: '\\u03DD',\n\tdisin: '\\u22F2',\n\tdiv: '\\u00F7',\n\tdivide: '\\u00F7',\n\tdivideontimes: '\\u22C7',\n\tdivonx: '\\u22C7',\n\tDJcy: '\\u0402',\n\tdjcy: '\\u0452',\n\tdlcorn: '\\u231E',\n\tdlcrop: '\\u230D',\n\tdollar: '\\u0024',\n\tDopf: '\\uD835\\uDD3B',\n\tdopf: '\\uD835\\uDD55',\n\tDot: '\\u00A8',\n\tdot: '\\u02D9',\n\tDotDot: '\\u20DC',\n\tdoteq: '\\u2250',\n\tdoteqdot: '\\u2251',\n\tDotEqual: '\\u2250',\n\tdotminus: '\\u2238',\n\tdotplus: '\\u2214',\n\tdotsquare: '\\u22A1',\n\tdoublebarwedge: '\\u2306',\n\tDoubleContourIntegral: '\\u222F',\n\tDoubleDot: '\\u00A8',\n\tDoubleDownArrow: '\\u21D3',\n\tDoubleLeftArrow: '\\u21D0',\n\tDoubleLeftRightArrow: '\\u21D4',\n\tDoubleLeftTee: '\\u2AE4',\n\tDoubleLongLeftArrow: '\\u27F8',\n\tDoubleLongLeftRightArrow: '\\u27FA',\n\tDoubleLongRightArrow: '\\u27F9',\n\tDoubleRightArrow: '\\u21D2',\n\tDoubleRightTee: '\\u22A8',\n\tDoubleUpArrow: '\\u21D1',\n\tDoubleUpDownArrow: '\\u21D5',\n\tDoubleVerticalBar: '\\u2225',\n\tDownArrow: '\\u2193',\n\tDownarrow: '\\u21D3',\n\tdownarrow: '\\u2193',\n\tDownArrowBar: '\\u2913',\n\tDownArrowUpArrow: '\\u21F5',\n\tDownBreve: '\\u0311',\n\tdowndownarrows: '\\u21CA',\n\tdownharpoonleft: '\\u21C3',\n\tdownharpoonright: '\\u21C2',\n\tDownLeftRightVector: '\\u2950',\n\tDownLeftTeeVector: '\\u295E',\n\tDownLeftVector: '\\u21BD',\n\tDownLeftVectorBar: '\\u2956',\n\tDownRightTeeVector: '\\u295F',\n\tDownRightVector: '\\u21C1',\n\tDownRightVectorBar: '\\u2957',\n\tDownTee: '\\u22A4',\n\tDownTeeArrow: '\\u21A7',\n\tdrbkarow: '\\u2910',\n\tdrcorn: '\\u231F',\n\tdrcrop: '\\u230C',\n\tDscr: '\\uD835\\uDC9F',\n\tdscr: '\\uD835\\uDCB9',\n\tDScy: '\\u0405',\n\tdscy: '\\u0455',\n\tdsol: '\\u29F6',\n\tDstrok: '\\u0110',\n\tdstrok: '\\u0111',\n\tdtdot: '\\u22F1',\n\tdtri: '\\u25BF',\n\tdtrif: '\\u25BE',\n\tduarr: '\\u21F5',\n\tduhar: '\\u296F',\n\tdwangle: '\\u29A6',\n\tDZcy: '\\u040F',\n\tdzcy: '\\u045F',\n\tdzigrarr: '\\u27FF',\n\tEacute: '\\u00C9',\n\teacute: '\\u00E9',\n\teaster: '\\u2A6E',\n\tEcaron: '\\u011A',\n\tecaron: '\\u011B',\n\tecir: '\\u2256',\n\tEcirc: '\\u00CA',\n\tecirc: '\\u00EA',\n\tecolon: '\\u2255',\n\tEcy: '\\u042D',\n\tecy: '\\u044D',\n\teDDot: '\\u2A77',\n\tEdot: '\\u0116',\n\teDot: '\\u2251',\n\tedot: '\\u0117',\n\tee: '\\u2147',\n\tefDot: '\\u2252',\n\tEfr: '\\uD835\\uDD08',\n\tefr: '\\uD835\\uDD22',\n\teg: '\\u2A9A',\n\tEgrave: '\\u00C8',\n\tegrave: '\\u00E8',\n\tegs: '\\u2A96',\n\tegsdot: '\\u2A98',\n\tel: '\\u2A99',\n\tElement: '\\u2208',\n\telinters: '\\u23E7',\n\tell: '\\u2113',\n\tels: '\\u2A95',\n\telsdot: '\\u2A97',\n\tEmacr: '\\u0112',\n\temacr: '\\u0113',\n\tempty: '\\u2205',\n\temptyset: '\\u2205',\n\tEmptySmallSquare: '\\u25FB',\n\temptyv: '\\u2205',\n\tEmptyVerySmallSquare: '\\u25AB',\n\temsp: '\\u2003',\n\temsp13: '\\u2004',\n\temsp14: '\\u2005',\n\tENG: '\\u014A',\n\teng: '\\u014B',\n\tensp: '\\u2002',\n\tEogon: '\\u0118',\n\teogon: '\\u0119',\n\tEopf: '\\uD835\\uDD3C',\n\teopf: '\\uD835\\uDD56',\n\tepar: '\\u22D5',\n\teparsl: '\\u29E3',\n\teplus: '\\u2A71',\n\tepsi: '\\u03B5',\n\tEpsilon: '\\u0395',\n\tepsilon: '\\u03B5',\n\tepsiv: '\\u03F5',\n\teqcirc: '\\u2256',\n\teqcolon: '\\u2255',\n\teqsim: '\\u2242',\n\teqslantgtr: '\\u2A96',\n\teqslantless: '\\u2A95',\n\tEqual: '\\u2A75',\n\tequals: '\\u003D',\n\tEqualTilde: '\\u2242',\n\tequest: '\\u225F',\n\tEquilibrium: '\\u21CC',\n\tequiv: '\\u2261',\n\tequivDD: '\\u2A78',\n\teqvparsl: '\\u29E5',\n\terarr: '\\u2971',\n\terDot: '\\u2253',\n\tEscr: '\\u2130',\n\tescr: '\\u212F',\n\tesdot: '\\u2250',\n\tEsim: '\\u2A73',\n\tesim: '\\u2242',\n\tEta: '\\u0397',\n\teta: '\\u03B7',\n\tETH: '\\u00D0',\n\teth: '\\u00F0',\n\tEuml: '\\u00CB',\n\teuml: '\\u00EB',\n\teuro: '\\u20AC',\n\texcl: '\\u0021',\n\texist: '\\u2203',\n\tExists: '\\u2203',\n\texpectation: '\\u2130',\n\tExponentialE: '\\u2147',\n\texponentiale: '\\u2147',\n\tfallingdotseq: '\\u2252',\n\tFcy: '\\u0424',\n\tfcy: '\\u0444',\n\tfemale: '\\u2640',\n\tffilig: '\\uFB03',\n\tfflig: '\\uFB00',\n\tffllig: '\\uFB04',\n\tFfr: '\\uD835\\uDD09',\n\tffr: '\\uD835\\uDD23',\n\tfilig: '\\uFB01',\n\tFilledSmallSquare: '\\u25FC',\n\tFilledVerySmallSquare: '\\u25AA',\n\tfjlig: '\\u0066\\u006A',\n\tflat: '\\u266D',\n\tfllig: '\\uFB02',\n\tfltns: '\\u25B1',\n\tfnof: '\\u0192',\n\tFopf: '\\uD835\\uDD3D',\n\tfopf: '\\uD835\\uDD57',\n\tForAll: '\\u2200',\n\tforall: '\\u2200',\n\tfork: '\\u22D4',\n\tforkv: '\\u2AD9',\n\tFouriertrf: '\\u2131',\n\tfpartint: '\\u2A0D',\n\tfrac12: '\\u00BD',\n\tfrac13: '\\u2153',\n\tfrac14: '\\u00BC',\n\tfrac15: '\\u2155',\n\tfrac16: '\\u2159',\n\tfrac18: '\\u215B',\n\tfrac23: '\\u2154',\n\tfrac25: '\\u2156',\n\tfrac34: '\\u00BE',\n\tfrac35: '\\u2157',\n\tfrac38: '\\u215C',\n\tfrac45: '\\u2158',\n\tfrac56: '\\u215A',\n\tfrac58: '\\u215D',\n\tfrac78: '\\u215E',\n\tfrasl: '\\u2044',\n\tfrown: '\\u2322',\n\tFscr: '\\u2131',\n\tfscr: '\\uD835\\uDCBB',\n\tgacute: '\\u01F5',\n\tGamma: '\\u0393',\n\tgamma: '\\u03B3',\n\tGammad: '\\u03DC',\n\tgammad: '\\u03DD',\n\tgap: '\\u2A86',\n\tGbreve: '\\u011E',\n\tgbreve: '\\u011F',\n\tGcedil: '\\u0122',\n\tGcirc: '\\u011C',\n\tgcirc: '\\u011D',\n\tGcy: '\\u0413',\n\tgcy: '\\u0433',\n\tGdot: '\\u0120',\n\tgdot: '\\u0121',\n\tgE: '\\u2267',\n\tge: '\\u2265',\n\tgEl: '\\u2A8C',\n\tgel: '\\u22DB',\n\tgeq: '\\u2265',\n\tgeqq: '\\u2267',\n\tgeqslant: '\\u2A7E',\n\tges: '\\u2A7E',\n\tgescc: '\\u2AA9',\n\tgesdot: '\\u2A80',\n\tgesdoto: '\\u2A82',\n\tgesdotol: '\\u2A84',\n\tgesl: '\\u22DB\\uFE00',\n\tgesles: '\\u2A94',\n\tGfr: '\\uD835\\uDD0A',\n\tgfr: '\\uD835\\uDD24',\n\tGg: '\\u22D9',\n\tgg: '\\u226B',\n\tggg: '\\u22D9',\n\tgimel: '\\u2137',\n\tGJcy: '\\u0403',\n\tgjcy: '\\u0453',\n\tgl: '\\u2277',\n\tgla: '\\u2AA5',\n\tglE: '\\u2A92',\n\tglj: '\\u2AA4',\n\tgnap: '\\u2A8A',\n\tgnapprox: '\\u2A8A',\n\tgnE: '\\u2269',\n\tgne: '\\u2A88',\n\tgneq: '\\u2A88',\n\tgneqq: '\\u2269',\n\tgnsim: '\\u22E7',\n\tGopf: '\\uD835\\uDD3E',\n\tgopf: '\\uD835\\uDD58',\n\tgrave: '\\u0060',\n\tGreaterEqual: '\\u2265',\n\tGreaterEqualLess: '\\u22DB',\n\tGreaterFullEqual: '\\u2267',\n\tGreaterGreater: '\\u2AA2',\n\tGreaterLess: '\\u2277',\n\tGreaterSlantEqual: '\\u2A7E',\n\tGreaterTilde: '\\u2273',\n\tGscr: '\\uD835\\uDCA2',\n\tgscr: '\\u210A',\n\tgsim: '\\u2273',\n\tgsime: '\\u2A8E',\n\tgsiml: '\\u2A90',\n\tGt: '\\u226B',\n\tGT: '\\u003E',\n\tgt: '\\u003E',\n\tgtcc: '\\u2AA7',\n\tgtcir: '\\u2A7A',\n\tgtdot: '\\u22D7',\n\tgtlPar: '\\u2995',\n\tgtquest: '\\u2A7C',\n\tgtrapprox: '\\u2A86',\n\tgtrarr: '\\u2978',\n\tgtrdot: '\\u22D7',\n\tgtreqless: '\\u22DB',\n\tgtreqqless: '\\u2A8C',\n\tgtrless: '\\u2277',\n\tgtrsim: '\\u2273',\n\tgvertneqq: '\\u2269\\uFE00',\n\tgvnE: '\\u2269\\uFE00',\n\tHacek: '\\u02C7',\n\thairsp: '\\u200A',\n\thalf: '\\u00BD',\n\thamilt: '\\u210B',\n\tHARDcy: '\\u042A',\n\thardcy: '\\u044A',\n\thArr: '\\u21D4',\n\tharr: '\\u2194',\n\tharrcir: '\\u2948',\n\tharrw: '\\u21AD',\n\tHat: '\\u005E',\n\thbar: '\\u210F',\n\tHcirc: '\\u0124',\n\thcirc: '\\u0125',\n\thearts: '\\u2665',\n\theartsuit: '\\u2665',\n\thellip: '\\u2026',\n\thercon: '\\u22B9',\n\tHfr: '\\u210C',\n\thfr: '\\uD835\\uDD25',\n\tHilbertSpace: '\\u210B',\n\thksearow: '\\u2925',\n\thkswarow: '\\u2926',\n\thoarr: '\\u21FF',\n\thomtht: '\\u223B',\n\thookleftarrow: '\\u21A9',\n\thookrightarrow: '\\u21AA',\n\tHopf: '\\u210D',\n\thopf: '\\uD835\\uDD59',\n\thorbar: '\\u2015',\n\tHorizontalLine: '\\u2500',\n\tHscr: '\\u210B',\n\thscr: '\\uD835\\uDCBD',\n\thslash: '\\u210F',\n\tHstrok: '\\u0126',\n\thstrok: '\\u0127',\n\tHumpDownHump: '\\u224E',\n\tHumpEqual: '\\u224F',\n\thybull: '\\u2043',\n\thyphen: '\\u2010',\n\tIacute: '\\u00CD',\n\tiacute: '\\u00ED',\n\tic: '\\u2063',\n\tIcirc: '\\u00CE',\n\ticirc: '\\u00EE',\n\tIcy: '\\u0418',\n\ticy: '\\u0438',\n\tIdot: '\\u0130',\n\tIEcy: '\\u0415',\n\tiecy: '\\u0435',\n\tiexcl: '\\u00A1',\n\tiff: '\\u21D4',\n\tIfr: '\\u2111',\n\tifr: '\\uD835\\uDD26',\n\tIgrave: '\\u00CC',\n\tigrave: '\\u00EC',\n\tii: '\\u2148',\n\tiiiint: '\\u2A0C',\n\tiiint: '\\u222D',\n\tiinfin: '\\u29DC',\n\tiiota: '\\u2129',\n\tIJlig: '\\u0132',\n\tijlig: '\\u0133',\n\tIm: '\\u2111',\n\tImacr: '\\u012A',\n\timacr: '\\u012B',\n\timage: '\\u2111',\n\tImaginaryI: '\\u2148',\n\timagline: '\\u2110',\n\timagpart: '\\u2111',\n\timath: '\\u0131',\n\timof: '\\u22B7',\n\timped: '\\u01B5',\n\tImplies: '\\u21D2',\n\tin: '\\u2208',\n\tincare: '\\u2105',\n\tinfin: '\\u221E',\n\tinfintie: '\\u29DD',\n\tinodot: '\\u0131',\n\tInt: '\\u222C',\n\tint: '\\u222B',\n\tintcal: '\\u22BA',\n\tintegers: '\\u2124',\n\tIntegral: '\\u222B',\n\tintercal: '\\u22BA',\n\tIntersection: '\\u22C2',\n\tintlarhk: '\\u2A17',\n\tintprod: '\\u2A3C',\n\tInvisibleComma: '\\u2063',\n\tInvisibleTimes: '\\u2062',\n\tIOcy: '\\u0401',\n\tiocy: '\\u0451',\n\tIogon: '\\u012E',\n\tiogon: '\\u012F',\n\tIopf: '\\uD835\\uDD40',\n\tiopf: '\\uD835\\uDD5A',\n\tIota: '\\u0399',\n\tiota: '\\u03B9',\n\tiprod: '\\u2A3C',\n\tiquest: '\\u00BF',\n\tIscr: '\\u2110',\n\tiscr: '\\uD835\\uDCBE',\n\tisin: '\\u2208',\n\tisindot: '\\u22F5',\n\tisinE: '\\u22F9',\n\tisins: '\\u22F4',\n\tisinsv: '\\u22F3',\n\tisinv: '\\u2208',\n\tit: '\\u2062',\n\tItilde: '\\u0128',\n\titilde: '\\u0129',\n\tIukcy: '\\u0406',\n\tiukcy: '\\u0456',\n\tIuml: '\\u00CF',\n\tiuml: '\\u00EF',\n\tJcirc: '\\u0134',\n\tjcirc: '\\u0135',\n\tJcy: '\\u0419',\n\tjcy: '\\u0439',\n\tJfr: '\\uD835\\uDD0D',\n\tjfr: '\\uD835\\uDD27',\n\tjmath: '\\u0237',\n\tJopf: '\\uD835\\uDD41',\n\tjopf: '\\uD835\\uDD5B',\n\tJscr: '\\uD835\\uDCA5',\n\tjscr: '\\uD835\\uDCBF',\n\tJsercy: '\\u0408',\n\tjsercy: '\\u0458',\n\tJukcy: '\\u0404',\n\tjukcy: '\\u0454',\n\tKappa: '\\u039A',\n\tkappa: '\\u03BA',\n\tkappav: '\\u03F0',\n\tKcedil: '\\u0136',\n\tkcedil: '\\u0137',\n\tKcy: '\\u041A',\n\tkcy: '\\u043A',\n\tKfr: '\\uD835\\uDD0E',\n\tkfr: '\\uD835\\uDD28',\n\tkgreen: '\\u0138',\n\tKHcy: '\\u0425',\n\tkhcy: '\\u0445',\n\tKJcy: '\\u040C',\n\tkjcy: '\\u045C',\n\tKopf: '\\uD835\\uDD42',\n\tkopf: '\\uD835\\uDD5C',\n\tKscr: '\\uD835\\uDCA6',\n\tkscr: '\\uD835\\uDCC0',\n\tlAarr: '\\u21DA',\n\tLacute: '\\u0139',\n\tlacute: '\\u013A',\n\tlaemptyv: '\\u29B4',\n\tlagran: '\\u2112',\n\tLambda: '\\u039B',\n\tlambda: '\\u03BB',\n\tLang: '\\u27EA',\n\tlang: '\\u27E8',\n\tlangd: '\\u2991',\n\tlangle: '\\u27E8',\n\tlap: '\\u2A85',\n\tLaplacetrf: '\\u2112',\n\tlaquo: '\\u00AB',\n\tLarr: '\\u219E',\n\tlArr: '\\u21D0',\n\tlarr: '\\u2190',\n\tlarrb: '\\u21E4',\n\tlarrbfs: '\\u291F',\n\tlarrfs: '\\u291D',\n\tlarrhk: '\\u21A9',\n\tlarrlp: '\\u21AB',\n\tlarrpl: '\\u2939',\n\tlarrsim: '\\u2973',\n\tlarrtl: '\\u21A2',\n\tlat: '\\u2AAB',\n\tlAtail: '\\u291B',\n\tlatail: '\\u2919',\n\tlate: '\\u2AAD',\n\tlates: '\\u2AAD\\uFE00',\n\tlBarr: '\\u290E',\n\tlbarr: '\\u290C',\n\tlbbrk: '\\u2772',\n\tlbrace: '\\u007B',\n\tlbrack: '\\u005B',\n\tlbrke: '\\u298B',\n\tlbrksld: '\\u298F',\n\tlbrkslu: '\\u298D',\n\tLcaron: '\\u013D',\n\tlcaron: '\\u013E',\n\tLcedil: '\\u013B',\n\tlcedil: '\\u013C',\n\tlceil: '\\u2308',\n\tlcub: '\\u007B',\n\tLcy: '\\u041B',\n\tlcy: '\\u043B',\n\tldca: '\\u2936',\n\tldquo: '\\u201C',\n\tldquor: '\\u201E',\n\tldrdhar: '\\u2967',\n\tldrushar: '\\u294B',\n\tldsh: '\\u21B2',\n\tlE: '\\u2266',\n\tle: '\\u2264',\n\tLeftAngleBracket: '\\u27E8',\n\tLeftArrow: '\\u2190',\n\tLeftarrow: '\\u21D0',\n\tleftarrow: '\\u2190',\n\tLeftArrowBar: '\\u21E4',\n\tLeftArrowRightArrow: '\\u21C6',\n\tleftarrowtail: '\\u21A2',\n\tLeftCeiling: '\\u2308',\n\tLeftDoubleBracket: '\\u27E6',\n\tLeftDownTeeVector: '\\u2961',\n\tLeftDownVector: '\\u21C3',\n\tLeftDownVectorBar: '\\u2959',\n\tLeftFloor: '\\u230A',\n\tleftharpoondown: '\\u21BD',\n\tleftharpoonup: '\\u21BC',\n\tleftleftarrows: '\\u21C7',\n\tLeftRightArrow: '\\u2194',\n\tLeftrightarrow: '\\u21D4',\n\tleftrightarrow: '\\u2194',\n\tleftrightarrows: '\\u21C6',\n\tleftrightharpoons: '\\u21CB',\n\tleftrightsquigarrow: '\\u21AD',\n\tLeftRightVector: '\\u294E',\n\tLeftTee: '\\u22A3',\n\tLeftTeeArrow: '\\u21A4',\n\tLeftTeeVector: '\\u295A',\n\tleftthreetimes: '\\u22CB',\n\tLeftTriangle: '\\u22B2',\n\tLeftTriangleBar: '\\u29CF',\n\tLeftTriangleEqual: '\\u22B4',\n\tLeftUpDownVector: '\\u2951',\n\tLeftUpTeeVector: '\\u2960',\n\tLeftUpVector: '\\u21BF',\n\tLeftUpVectorBar: '\\u2958',\n\tLeftVector: '\\u21BC',\n\tLeftVectorBar: '\\u2952',\n\tlEg: '\\u2A8B',\n\tleg: '\\u22DA',\n\tleq: '\\u2264',\n\tleqq: '\\u2266',\n\tleqslant: '\\u2A7D',\n\tles: '\\u2A7D',\n\tlescc: '\\u2AA8',\n\tlesdot: '\\u2A7F',\n\tlesdoto: '\\u2A81',\n\tlesdotor: '\\u2A83',\n\tlesg: '\\u22DA\\uFE00',\n\tlesges: '\\u2A93',\n\tlessapprox: '\\u2A85',\n\tlessdot: '\\u22D6',\n\tlesseqgtr: '\\u22DA',\n\tlesseqqgtr: '\\u2A8B',\n\tLessEqualGreater: '\\u22DA',\n\tLessFullEqual: '\\u2266',\n\tLessGreater: '\\u2276',\n\tlessgtr: '\\u2276',\n\tLessLess: '\\u2AA1',\n\tlesssim: '\\u2272',\n\tLessSlantEqual: '\\u2A7D',\n\tLessTilde: '\\u2272',\n\tlfisht: '\\u297C',\n\tlfloor: '\\u230A',\n\tLfr: '\\uD835\\uDD0F',\n\tlfr: '\\uD835\\uDD29',\n\tlg: '\\u2276',\n\tlgE: '\\u2A91',\n\tlHar: '\\u2962',\n\tlhard: '\\u21BD',\n\tlharu: '\\u21BC',\n\tlharul: '\\u296A',\n\tlhblk: '\\u2584',\n\tLJcy: '\\u0409',\n\tljcy: '\\u0459',\n\tLl: '\\u22D8',\n\tll: '\\u226A',\n\tllarr: '\\u21C7',\n\tllcorner: '\\u231E',\n\tLleftarrow: '\\u21DA',\n\tllhard: '\\u296B',\n\tlltri: '\\u25FA',\n\tLmidot: '\\u013F',\n\tlmidot: '\\u0140',\n\tlmoust: '\\u23B0',\n\tlmoustache: '\\u23B0',\n\tlnap: '\\u2A89',\n\tlnapprox: '\\u2A89',\n\tlnE: '\\u2268',\n\tlne: '\\u2A87',\n\tlneq: '\\u2A87',\n\tlneqq: '\\u2268',\n\tlnsim: '\\u22E6',\n\tloang: '\\u27EC',\n\tloarr: '\\u21FD',\n\tlobrk: '\\u27E6',\n\tLongLeftArrow: '\\u27F5',\n\tLongleftarrow: '\\u27F8',\n\tlongleftarrow: '\\u27F5',\n\tLongLeftRightArrow: '\\u27F7',\n\tLongleftrightarrow: '\\u27FA',\n\tlongleftrightarrow: '\\u27F7',\n\tlongmapsto: '\\u27FC',\n\tLongRightArrow: '\\u27F6',\n\tLongrightarrow: '\\u27F9',\n\tlongrightarrow: '\\u27F6',\n\tlooparrowleft: '\\u21AB',\n\tlooparrowright: '\\u21AC',\n\tlopar: '\\u2985',\n\tLopf: '\\uD835\\uDD43',\n\tlopf: '\\uD835\\uDD5D',\n\tloplus: '\\u2A2D',\n\tlotimes: '\\u2A34',\n\tlowast: '\\u2217',\n\tlowbar: '\\u005F',\n\tLowerLeftArrow: '\\u2199',\n\tLowerRightArrow: '\\u2198',\n\tloz: '\\u25CA',\n\tlozenge: '\\u25CA',\n\tlozf: '\\u29EB',\n\tlpar: '\\u0028',\n\tlparlt: '\\u2993',\n\tlrarr: '\\u21C6',\n\tlrcorner: '\\u231F',\n\tlrhar: '\\u21CB',\n\tlrhard: '\\u296D',\n\tlrm: '\\u200E',\n\tlrtri: '\\u22BF',\n\tlsaquo: '\\u2039',\n\tLscr: '\\u2112',\n\tlscr: '\\uD835\\uDCC1',\n\tLsh: '\\u21B0',\n\tlsh: '\\u21B0',\n\tlsim: '\\u2272',\n\tlsime: '\\u2A8D',\n\tlsimg: '\\u2A8F',\n\tlsqb: '\\u005B',\n\tlsquo: '\\u2018',\n\tlsquor: '\\u201A',\n\tLstrok: '\\u0141',\n\tlstrok: '\\u0142',\n\tLt: '\\u226A',\n\tLT: '\\u003C',\n\tlt: '\\u003C',\n\tltcc: '\\u2AA6',\n\tltcir: '\\u2A79',\n\tltdot: '\\u22D6',\n\tlthree: '\\u22CB',\n\tltimes: '\\u22C9',\n\tltlarr: '\\u2976',\n\tltquest: '\\u2A7B',\n\tltri: '\\u25C3',\n\tltrie: '\\u22B4',\n\tltrif: '\\u25C2',\n\tltrPar: '\\u2996',\n\tlurdshar: '\\u294A',\n\tluruhar: '\\u2966',\n\tlvertneqq: '\\u2268\\uFE00',\n\tlvnE: '\\u2268\\uFE00',\n\tmacr: '\\u00AF',\n\tmale: '\\u2642',\n\tmalt: '\\u2720',\n\tmaltese: '\\u2720',\n\tMap: '\\u2905',\n\tmap: '\\u21A6',\n\tmapsto: '\\u21A6',\n\tmapstodown: '\\u21A7',\n\tmapstoleft: '\\u21A4',\n\tmapstoup: '\\u21A5',\n\tmarker: '\\u25AE',\n\tmcomma: '\\u2A29',\n\tMcy: '\\u041C',\n\tmcy: '\\u043C',\n\tmdash: '\\u2014',\n\tmDDot: '\\u223A',\n\tmeasuredangle: '\\u2221',\n\tMediumSpace: '\\u205F',\n\tMellintrf: '\\u2133',\n\tMfr: '\\uD835\\uDD10',\n\tmfr: '\\uD835\\uDD2A',\n\tmho: '\\u2127',\n\tmicro: '\\u00B5',\n\tmid: '\\u2223',\n\tmidast: '\\u002A',\n\tmidcir: '\\u2AF0',\n\tmiddot: '\\u00B7',\n\tminus: '\\u2212',\n\tminusb: '\\u229F',\n\tminusd: '\\u2238',\n\tminusdu: '\\u2A2A',\n\tMinusPlus: '\\u2213',\n\tmlcp: '\\u2ADB',\n\tmldr: '\\u2026',\n\tmnplus: '\\u2213',\n\tmodels: '\\u22A7',\n\tMopf: '\\uD835\\uDD44',\n\tmopf: '\\uD835\\uDD5E',\n\tmp: '\\u2213',\n\tMscr: '\\u2133',\n\tmscr: '\\uD835\\uDCC2',\n\tmstpos: '\\u223E',\n\tMu: '\\u039C',\n\tmu: '\\u03BC',\n\tmultimap: '\\u22B8',\n\tmumap: '\\u22B8',\n\tnabla: '\\u2207',\n\tNacute: '\\u0143',\n\tnacute: '\\u0144',\n\tnang: '\\u2220\\u20D2',\n\tnap: '\\u2249',\n\tnapE: '\\u2A70\\u0338',\n\tnapid: '\\u224B\\u0338',\n\tnapos: '\\u0149',\n\tnapprox: '\\u2249',\n\tnatur: '\\u266E',\n\tnatural: '\\u266E',\n\tnaturals: '\\u2115',\n\tnbsp: '\\u00A0',\n\tnbump: '\\u224E\\u0338',\n\tnbumpe: '\\u224F\\u0338',\n\tncap: '\\u2A43',\n\tNcaron: '\\u0147',\n\tncaron: '\\u0148',\n\tNcedil: '\\u0145',\n\tncedil: '\\u0146',\n\tncong: '\\u2247',\n\tncongdot: '\\u2A6D\\u0338',\n\tncup: '\\u2A42',\n\tNcy: '\\u041D',\n\tncy: '\\u043D',\n\tndash: '\\u2013',\n\tne: '\\u2260',\n\tnearhk: '\\u2924',\n\tneArr: '\\u21D7',\n\tnearr: '\\u2197',\n\tnearrow: '\\u2197',\n\tnedot: '\\u2250\\u0338',\n\tNegativeMediumSpace: '\\u200B',\n\tNegativeThickSpace: '\\u200B',\n\tNegativeThinSpace: '\\u200B',\n\tNegativeVeryThinSpace: '\\u200B',\n\tnequiv: '\\u2262',\n\tnesear: '\\u2928',\n\tnesim: '\\u2242\\u0338',\n\tNestedGreaterGreater: '\\u226B',\n\tNestedLessLess: '\\u226A',\n\tNewLine: '\\u000A',\n\tnexist: '\\u2204',\n\tnexists: '\\u2204',\n\tNfr: '\\uD835\\uDD11',\n\tnfr: '\\uD835\\uDD2B',\n\tngE: '\\u2267\\u0338',\n\tnge: '\\u2271',\n\tngeq: '\\u2271',\n\tngeqq: '\\u2267\\u0338',\n\tngeqslant: '\\u2A7E\\u0338',\n\tnges: '\\u2A7E\\u0338',\n\tnGg: '\\u22D9\\u0338',\n\tngsim: '\\u2275',\n\tnGt: '\\u226B\\u20D2',\n\tngt: '\\u226F',\n\tngtr: '\\u226F',\n\tnGtv: '\\u226B\\u0338',\n\tnhArr: '\\u21CE',\n\tnharr: '\\u21AE',\n\tnhpar: '\\u2AF2',\n\tni: '\\u220B',\n\tnis: '\\u22FC',\n\tnisd: '\\u22FA',\n\tniv: '\\u220B',\n\tNJcy: '\\u040A',\n\tnjcy: '\\u045A',\n\tnlArr: '\\u21CD',\n\tnlarr: '\\u219A',\n\tnldr: '\\u2025',\n\tnlE: '\\u2266\\u0338',\n\tnle: '\\u2270',\n\tnLeftarrow: '\\u21CD',\n\tnleftarrow: '\\u219A',\n\tnLeftrightarrow: '\\u21CE',\n\tnleftrightarrow: '\\u21AE',\n\tnleq: '\\u2270',\n\tnleqq: '\\u2266\\u0338',\n\tnleqslant: '\\u2A7D\\u0338',\n\tnles: '\\u2A7D\\u0338',\n\tnless: '\\u226E',\n\tnLl: '\\u22D8\\u0338',\n\tnlsim: '\\u2274',\n\tnLt: '\\u226A\\u20D2',\n\tnlt: '\\u226E',\n\tnltri: '\\u22EA',\n\tnltrie: '\\u22EC',\n\tnLtv: '\\u226A\\u0338',\n\tnmid: '\\u2224',\n\tNoBreak: '\\u2060',\n\tNonBreakingSpace: '\\u00A0',\n\tNopf: '\\u2115',\n\tnopf: '\\uD835\\uDD5F',\n\tNot: '\\u2AEC',\n\tnot: '\\u00AC',\n\tNotCongruent: '\\u2262',\n\tNotCupCap: '\\u226D',\n\tNotDoubleVerticalBar: '\\u2226',\n\tNotElement: '\\u2209',\n\tNotEqual: '\\u2260',\n\tNotEqualTilde: '\\u2242\\u0338',\n\tNotExists: '\\u2204',\n\tNotGreater: '\\u226F',\n\tNotGreaterEqual: '\\u2271',\n\tNotGreaterFullEqual: '\\u2267\\u0338',\n\tNotGreaterGreater: '\\u226B\\u0338',\n\tNotGreaterLess: '\\u2279',\n\tNotGreaterSlantEqual: '\\u2A7E\\u0338',\n\tNotGreaterTilde: '\\u2275',\n\tNotHumpDownHump: '\\u224E\\u0338',\n\tNotHumpEqual: '\\u224F\\u0338',\n\tnotin: '\\u2209',\n\tnotindot: '\\u22F5\\u0338',\n\tnotinE: '\\u22F9\\u0338',\n\tnotinva: '\\u2209',\n\tnotinvb: '\\u22F7',\n\tnotinvc: '\\u22F6',\n\tNotLeftTriangle: '\\u22EA',\n\tNotLeftTriangleBar: '\\u29CF\\u0338',\n\tNotLeftTriangleEqual: '\\u22EC',\n\tNotLess: '\\u226E',\n\tNotLessEqual: '\\u2270',\n\tNotLessGreater: '\\u2278',\n\tNotLessLess: '\\u226A\\u0338',\n\tNotLessSlantEqual: '\\u2A7D\\u0338',\n\tNotLessTilde: '\\u2274',\n\tNotNestedGreaterGreater: '\\u2AA2\\u0338',\n\tNotNestedLessLess: '\\u2AA1\\u0338',\n\tnotni: '\\u220C',\n\tnotniva: '\\u220C',\n\tnotnivb: '\\u22FE',\n\tnotnivc: '\\u22FD',\n\tNotPrecedes: '\\u2280',\n\tNotPrecedesEqual: '\\u2AAF\\u0338',\n\tNotPrecedesSlantEqual: '\\u22E0',\n\tNotReverseElement: '\\u220C',\n\tNotRightTriangle: '\\u22EB',\n\tNotRightTriangleBar: '\\u29D0\\u0338',\n\tNotRightTriangleEqual: '\\u22ED',\n\tNotSquareSubset: '\\u228F\\u0338',\n\tNotSquareSubsetEqual: '\\u22E2',\n\tNotSquareSuperset: '\\u2290\\u0338',\n\tNotSquareSupersetEqual: '\\u22E3',\n\tNotSubset: '\\u2282\\u20D2',\n\tNotSubsetEqual: '\\u2288',\n\tNotSucceeds: '\\u2281',\n\tNotSucceedsEqual: '\\u2AB0\\u0338',\n\tNotSucceedsSlantEqual: '\\u22E1',\n\tNotSucceedsTilde: '\\u227F\\u0338',\n\tNotSuperset: '\\u2283\\u20D2',\n\tNotSupersetEqual: '\\u2289',\n\tNotTilde: '\\u2241',\n\tNotTildeEqual: '\\u2244',\n\tNotTildeFullEqual: '\\u2247',\n\tNotTildeTilde: '\\u2249',\n\tNotVerticalBar: '\\u2224',\n\tnpar: '\\u2226',\n\tnparallel: '\\u2226',\n\tnparsl: '\\u2AFD\\u20E5',\n\tnpart: '\\u2202\\u0338',\n\tnpolint: '\\u2A14',\n\tnpr: '\\u2280',\n\tnprcue: '\\u22E0',\n\tnpre: '\\u2AAF\\u0338',\n\tnprec: '\\u2280',\n\tnpreceq: '\\u2AAF\\u0338',\n\tnrArr: '\\u21CF',\n\tnrarr: '\\u219B',\n\tnrarrc: '\\u2933\\u0338',\n\tnrarrw: '\\u219D\\u0338',\n\tnRightarrow: '\\u21CF',\n\tnrightarrow: '\\u219B',\n\tnrtri: '\\u22EB',\n\tnrtrie: '\\u22ED',\n\tnsc: '\\u2281',\n\tnsccue: '\\u22E1',\n\tnsce: '\\u2AB0\\u0338',\n\tNscr: '\\uD835\\uDCA9',\n\tnscr: '\\uD835\\uDCC3',\n\tnshortmid: '\\u2224',\n\tnshortparallel: '\\u2226',\n\tnsim: '\\u2241',\n\tnsime: '\\u2244',\n\tnsimeq: '\\u2244',\n\tnsmid: '\\u2224',\n\tnspar: '\\u2226',\n\tnsqsube: '\\u22E2',\n\tnsqsupe: '\\u22E3',\n\tnsub: '\\u2284',\n\tnsubE: '\\u2AC5\\u0338',\n\tnsube: '\\u2288',\n\tnsubset: '\\u2282\\u20D2',\n\tnsubseteq: '\\u2288',\n\tnsubseteqq: '\\u2AC5\\u0338',\n\tnsucc: '\\u2281',\n\tnsucceq: '\\u2AB0\\u0338',\n\tnsup: '\\u2285',\n\tnsupE: '\\u2AC6\\u0338',\n\tnsupe: '\\u2289',\n\tnsupset: '\\u2283\\u20D2',\n\tnsupseteq: '\\u2289',\n\tnsupseteqq: '\\u2AC6\\u0338',\n\tntgl: '\\u2279',\n\tNtilde: '\\u00D1',\n\tntilde: '\\u00F1',\n\tntlg: '\\u2278',\n\tntriangleleft: '\\u22EA',\n\tntrianglelefteq: '\\u22EC',\n\tntriangleright: '\\u22EB',\n\tntrianglerighteq: '\\u22ED',\n\tNu: '\\u039D',\n\tnu: '\\u03BD',\n\tnum: '\\u0023',\n\tnumero: '\\u2116',\n\tnumsp: '\\u2007',\n\tnvap: '\\u224D\\u20D2',\n\tnVDash: '\\u22AF',\n\tnVdash: '\\u22AE',\n\tnvDash: '\\u22AD',\n\tnvdash: '\\u22AC',\n\tnvge: '\\u2265\\u20D2',\n\tnvgt: '\\u003E\\u20D2',\n\tnvHarr: '\\u2904',\n\tnvinfin: '\\u29DE',\n\tnvlArr: '\\u2902',\n\tnvle: '\\u2264\\u20D2',\n\tnvlt: '\\u003C\\u20D2',\n\tnvltrie: '\\u22B4\\u20D2',\n\tnvrArr: '\\u2903',\n\tnvrtrie: '\\u22B5\\u20D2',\n\tnvsim: '\\u223C\\u20D2',\n\tnwarhk: '\\u2923',\n\tnwArr: '\\u21D6',\n\tnwarr: '\\u2196',\n\tnwarrow: '\\u2196',\n\tnwnear: '\\u2927',\n\tOacute: '\\u00D3',\n\toacute: '\\u00F3',\n\toast: '\\u229B',\n\tocir: '\\u229A',\n\tOcirc: '\\u00D4',\n\tocirc: '\\u00F4',\n\tOcy: '\\u041E',\n\tocy: '\\u043E',\n\todash: '\\u229D',\n\tOdblac: '\\u0150',\n\todblac: '\\u0151',\n\todiv: '\\u2A38',\n\todot: '\\u2299',\n\todsold: '\\u29BC',\n\tOElig: '\\u0152',\n\toelig: '\\u0153',\n\tofcir: '\\u29BF',\n\tOfr: '\\uD835\\uDD12',\n\tofr: '\\uD835\\uDD2C',\n\togon: '\\u02DB',\n\tOgrave: '\\u00D2',\n\tograve: '\\u00F2',\n\togt: '\\u29C1',\n\tohbar: '\\u29B5',\n\tohm: '\\u03A9',\n\toint: '\\u222E',\n\tolarr: '\\u21BA',\n\tolcir: '\\u29BE',\n\tolcross: '\\u29BB',\n\toline: '\\u203E',\n\tolt: '\\u29C0',\n\tOmacr: '\\u014C',\n\tomacr: '\\u014D',\n\tOmega: '\\u03A9',\n\tomega: '\\u03C9',\n\tOmicron: '\\u039F',\n\tomicron: '\\u03BF',\n\tomid: '\\u29B6',\n\tominus: '\\u2296',\n\tOopf: '\\uD835\\uDD46',\n\toopf: '\\uD835\\uDD60',\n\topar: '\\u29B7',\n\tOpenCurlyDoubleQuote: '\\u201C',\n\tOpenCurlyQuote: '\\u2018',\n\toperp: '\\u29B9',\n\toplus: '\\u2295',\n\tOr: '\\u2A54',\n\tor: '\\u2228',\n\torarr: '\\u21BB',\n\tord: '\\u2A5D',\n\torder: '\\u2134',\n\torderof: '\\u2134',\n\tordf: '\\u00AA',\n\tordm: '\\u00BA',\n\torigof: '\\u22B6',\n\toror: '\\u2A56',\n\torslope: '\\u2A57',\n\torv: '\\u2A5B',\n\toS: '\\u24C8',\n\tOscr: '\\uD835\\uDCAA',\n\toscr: '\\u2134',\n\tOslash: '\\u00D8',\n\toslash: '\\u00F8',\n\tosol: '\\u2298',\n\tOtilde: '\\u00D5',\n\totilde: '\\u00F5',\n\tOtimes: '\\u2A37',\n\totimes: '\\u2297',\n\totimesas: '\\u2A36',\n\tOuml: '\\u00D6',\n\touml: '\\u00F6',\n\tovbar: '\\u233D',\n\tOverBar: '\\u203E',\n\tOverBrace: '\\u23DE',\n\tOverBracket: '\\u23B4',\n\tOverParenthesis: '\\u23DC',\n\tpar: '\\u2225',\n\tpara: '\\u00B6',\n\tparallel: '\\u2225',\n\tparsim: '\\u2AF3',\n\tparsl: '\\u2AFD',\n\tpart: '\\u2202',\n\tPartialD: '\\u2202',\n\tPcy: '\\u041F',\n\tpcy: '\\u043F',\n\tpercnt: '\\u0025',\n\tperiod: '\\u002E',\n\tpermil: '\\u2030',\n\tperp: '\\u22A5',\n\tpertenk: '\\u2031',\n\tPfr: '\\uD835\\uDD13',\n\tpfr: '\\uD835\\uDD2D',\n\tPhi: '\\u03A6',\n\tphi: '\\u03C6',\n\tphiv: '\\u03D5',\n\tphmmat: '\\u2133',\n\tphone: '\\u260E',\n\tPi: '\\u03A0',\n\tpi: '\\u03C0',\n\tpitchfork: '\\u22D4',\n\tpiv: '\\u03D6',\n\tplanck: '\\u210F',\n\tplanckh: '\\u210E',\n\tplankv: '\\u210F',\n\tplus: '\\u002B',\n\tplusacir: '\\u2A23',\n\tplusb: '\\u229E',\n\tpluscir: '\\u2A22',\n\tplusdo: '\\u2214',\n\tplusdu: '\\u2A25',\n\tpluse: '\\u2A72',\n\tPlusMinus: '\\u00B1',\n\tplusmn: '\\u00B1',\n\tplussim: '\\u2A26',\n\tplustwo: '\\u2A27',\n\tpm: '\\u00B1',\n\tPoincareplane: '\\u210C',\n\tpointint: '\\u2A15',\n\tPopf: '\\u2119',\n\tpopf: '\\uD835\\uDD61',\n\tpound: '\\u00A3',\n\tPr: '\\u2ABB',\n\tpr: '\\u227A',\n\tprap: '\\u2AB7',\n\tprcue: '\\u227C',\n\tprE: '\\u2AB3',\n\tpre: '\\u2AAF',\n\tprec: '\\u227A',\n\tprecapprox: '\\u2AB7',\n\tpreccurlyeq: '\\u227C',\n\tPrecedes: '\\u227A',\n\tPrecedesEqual: '\\u2AAF',\n\tPrecedesSlantEqual: '\\u227C',\n\tPrecedesTilde: '\\u227E',\n\tpreceq: '\\u2AAF',\n\tprecnapprox: '\\u2AB9',\n\tprecneqq: '\\u2AB5',\n\tprecnsim: '\\u22E8',\n\tprecsim: '\\u227E',\n\tPrime: '\\u2033',\n\tprime: '\\u2032',\n\tprimes: '\\u2119',\n\tprnap: '\\u2AB9',\n\tprnE: '\\u2AB5',\n\tprnsim: '\\u22E8',\n\tprod: '\\u220F',\n\tProduct: '\\u220F',\n\tprofalar: '\\u232E',\n\tprofline: '\\u2312',\n\tprofsurf: '\\u2313',\n\tprop: '\\u221D',\n\tProportion: '\\u2237',\n\tProportional: '\\u221D',\n\tpropto: '\\u221D',\n\tprsim: '\\u227E',\n\tprurel: '\\u22B0',\n\tPscr: '\\uD835\\uDCAB',\n\tpscr: '\\uD835\\uDCC5',\n\tPsi: '\\u03A8',\n\tpsi: '\\u03C8',\n\tpuncsp: '\\u2008',\n\tQfr: '\\uD835\\uDD14',\n\tqfr: '\\uD835\\uDD2E',\n\tqint: '\\u2A0C',\n\tQopf: '\\u211A',\n\tqopf: '\\uD835\\uDD62',\n\tqprime: '\\u2057',\n\tQscr: '\\uD835\\uDCAC',\n\tqscr: '\\uD835\\uDCC6',\n\tquaternions: '\\u210D',\n\tquatint: '\\u2A16',\n\tquest: '\\u003F',\n\tquesteq: '\\u225F',\n\tQUOT: '\\u0022',\n\tquot: '\\u0022',\n\trAarr: '\\u21DB',\n\trace: '\\u223D\\u0331',\n\tRacute: '\\u0154',\n\tracute: '\\u0155',\n\tradic: '\\u221A',\n\traemptyv: '\\u29B3',\n\tRang: '\\u27EB',\n\trang: '\\u27E9',\n\trangd: '\\u2992',\n\trange: '\\u29A5',\n\trangle: '\\u27E9',\n\traquo: '\\u00BB',\n\tRarr: '\\u21A0',\n\trArr: '\\u21D2',\n\trarr: '\\u2192',\n\trarrap: '\\u2975',\n\trarrb: '\\u21E5',\n\trarrbfs: '\\u2920',\n\trarrc: '\\u2933',\n\trarrfs: '\\u291E',\n\trarrhk: '\\u21AA',\n\trarrlp: '\\u21AC',\n\trarrpl: '\\u2945',\n\trarrsim: '\\u2974',\n\tRarrtl: '\\u2916',\n\trarrtl: '\\u21A3',\n\trarrw: '\\u219D',\n\trAtail: '\\u291C',\n\tratail: '\\u291A',\n\tratio: '\\u2236',\n\trationals: '\\u211A',\n\tRBarr: '\\u2910',\n\trBarr: '\\u290F',\n\trbarr: '\\u290D',\n\trbbrk: '\\u2773',\n\trbrace: '\\u007D',\n\trbrack: '\\u005D',\n\trbrke: '\\u298C',\n\trbrksld: '\\u298E',\n\trbrkslu: '\\u2990',\n\tRcaron: '\\u0158',\n\trcaron: '\\u0159',\n\tRcedil: '\\u0156',\n\trcedil: '\\u0157',\n\trceil: '\\u2309',\n\trcub: '\\u007D',\n\tRcy: '\\u0420',\n\trcy: '\\u0440',\n\trdca: '\\u2937',\n\trdldhar: '\\u2969',\n\trdquo: '\\u201D',\n\trdquor: '\\u201D',\n\trdsh: '\\u21B3',\n\tRe: '\\u211C',\n\treal: '\\u211C',\n\trealine: '\\u211B',\n\trealpart: '\\u211C',\n\treals: '\\u211D',\n\trect: '\\u25AD',\n\tREG: '\\u00AE',\n\treg: '\\u00AE',\n\tReverseElement: '\\u220B',\n\tReverseEquilibrium: '\\u21CB',\n\tReverseUpEquilibrium: '\\u296F',\n\trfisht: '\\u297D',\n\trfloor: '\\u230B',\n\tRfr: '\\u211C',\n\trfr: '\\uD835\\uDD2F',\n\trHar: '\\u2964',\n\trhard: '\\u21C1',\n\trharu: '\\u21C0',\n\trharul: '\\u296C',\n\tRho: '\\u03A1',\n\trho: '\\u03C1',\n\trhov: '\\u03F1',\n\tRightAngleBracket: '\\u27E9',\n\tRightArrow: '\\u2192',\n\tRightarrow: '\\u21D2',\n\trightarrow: '\\u2192',\n\tRightArrowBar: '\\u21E5',\n\tRightArrowLeftArrow: '\\u21C4',\n\trightarrowtail: '\\u21A3',\n\tRightCeiling: '\\u2309',\n\tRightDoubleBracket: '\\u27E7',\n\tRightDownTeeVector: '\\u295D',\n\tRightDownVector: '\\u21C2',\n\tRightDownVectorBar: '\\u2955',\n\tRightFloor: '\\u230B',\n\trightharpoondown: '\\u21C1',\n\trightharpoonup: '\\u21C0',\n\trightleftarrows: '\\u21C4',\n\trightleftharpoons: '\\u21CC',\n\trightrightarrows: '\\u21C9',\n\trightsquigarrow: '\\u219D',\n\tRightTee: '\\u22A2',\n\tRightTeeArrow: '\\u21A6',\n\tRightTeeVector: '\\u295B',\n\trightthreetimes: '\\u22CC',\n\tRightTriangle: '\\u22B3',\n\tRightTriangleBar: '\\u29D0',\n\tRightTriangleEqual: '\\u22B5',\n\tRightUpDownVector: '\\u294F',\n\tRightUpTeeVector: '\\u295C',\n\tRightUpVector: '\\u21BE',\n\tRightUpVectorBar: '\\u2954',\n\tRightVector: '\\u21C0',\n\tRightVectorBar: '\\u2953',\n\tring: '\\u02DA',\n\trisingdotseq: '\\u2253',\n\trlarr: '\\u21C4',\n\trlhar: '\\u21CC',\n\trlm: '\\u200F',\n\trmoust: '\\u23B1',\n\trmoustache: '\\u23B1',\n\trnmid: '\\u2AEE',\n\troang: '\\u27ED',\n\troarr: '\\u21FE',\n\trobrk: '\\u27E7',\n\tropar: '\\u2986',\n\tRopf: '\\u211D',\n\tropf: '\\uD835\\uDD63',\n\troplus: '\\u2A2E',\n\trotimes: '\\u2A35',\n\tRoundImplies: '\\u2970',\n\trpar: '\\u0029',\n\trpargt: '\\u2994',\n\trppolint: '\\u2A12',\n\trrarr: '\\u21C9',\n\tRrightarrow: '\\u21DB',\n\trsaquo: '\\u203A',\n\tRscr: '\\u211B',\n\trscr: '\\uD835\\uDCC7',\n\tRsh: '\\u21B1',\n\trsh: '\\u21B1',\n\trsqb: '\\u005D',\n\trsquo: '\\u2019',\n\trsquor: '\\u2019',\n\trthree: '\\u22CC',\n\trtimes: '\\u22CA',\n\trtri: '\\u25B9',\n\trtrie: '\\u22B5',\n\trtrif: '\\u25B8',\n\trtriltri: '\\u29CE',\n\tRuleDelayed: '\\u29F4',\n\truluhar: '\\u2968',\n\trx: '\\u211E',\n\tSacute: '\\u015A',\n\tsacute: '\\u015B',\n\tsbquo: '\\u201A',\n\tSc: '\\u2ABC',\n\tsc: '\\u227B',\n\tscap: '\\u2AB8',\n\tScaron: '\\u0160',\n\tscaron: '\\u0161',\n\tsccue: '\\u227D',\n\tscE: '\\u2AB4',\n\tsce: '\\u2AB0',\n\tScedil: '\\u015E',\n\tscedil: '\\u015F',\n\tScirc: '\\u015C',\n\tscirc: '\\u015D',\n\tscnap: '\\u2ABA',\n\tscnE: '\\u2AB6',\n\tscnsim: '\\u22E9',\n\tscpolint: '\\u2A13',\n\tscsim: '\\u227F',\n\tScy: '\\u0421',\n\tscy: '\\u0441',\n\tsdot: '\\u22C5',\n\tsdotb: '\\u22A1',\n\tsdote: '\\u2A66',\n\tsearhk: '\\u2925',\n\tseArr: '\\u21D8',\n\tsearr: '\\u2198',\n\tsearrow: '\\u2198',\n\tsect: '\\u00A7',\n\tsemi: '\\u003B',\n\tseswar: '\\u2929',\n\tsetminus: '\\u2216',\n\tsetmn: '\\u2216',\n\tsext: '\\u2736',\n\tSfr: '\\uD835\\uDD16',\n\tsfr: '\\uD835\\uDD30',\n\tsfrown: '\\u2322',\n\tsharp: '\\u266F',\n\tSHCHcy: '\\u0429',\n\tshchcy: '\\u0449',\n\tSHcy: '\\u0428',\n\tshcy: '\\u0448',\n\tShortDownArrow: '\\u2193',\n\tShortLeftArrow: '\\u2190',\n\tshortmid: '\\u2223',\n\tshortparallel: '\\u2225',\n\tShortRightArrow: '\\u2192',\n\tShortUpArrow: '\\u2191',\n\tshy: '\\u00AD',\n\tSigma: '\\u03A3',\n\tsigma: '\\u03C3',\n\tsigmaf: '\\u03C2',\n\tsigmav: '\\u03C2',\n\tsim: '\\u223C',\n\tsimdot: '\\u2A6A',\n\tsime: '\\u2243',\n\tsimeq: '\\u2243',\n\tsimg: '\\u2A9E',\n\tsimgE: '\\u2AA0',\n\tsiml: '\\u2A9D',\n\tsimlE: '\\u2A9F',\n\tsimne: '\\u2246',\n\tsimplus: '\\u2A24',\n\tsimrarr: '\\u2972',\n\tslarr: '\\u2190',\n\tSmallCircle: '\\u2218',\n\tsmallsetminus: '\\u2216',\n\tsmashp: '\\u2A33',\n\tsmeparsl: '\\u29E4',\n\tsmid: '\\u2223',\n\tsmile: '\\u2323',\n\tsmt: '\\u2AAA',\n\tsmte: '\\u2AAC',\n\tsmtes: '\\u2AAC\\uFE00',\n\tSOFTcy: '\\u042C',\n\tsoftcy: '\\u044C',\n\tsol: '\\u002F',\n\tsolb: '\\u29C4',\n\tsolbar: '\\u233F',\n\tSopf: '\\uD835\\uDD4A',\n\tsopf: '\\uD835\\uDD64',\n\tspades: '\\u2660',\n\tspadesuit: '\\u2660',\n\tspar: '\\u2225',\n\tsqcap: '\\u2293',\n\tsqcaps: '\\u2293\\uFE00',\n\tsqcup: '\\u2294',\n\tsqcups: '\\u2294\\uFE00',\n\tSqrt: '\\u221A',\n\tsqsub: '\\u228F',\n\tsqsube: '\\u2291',\n\tsqsubset: '\\u228F',\n\tsqsubseteq: '\\u2291',\n\tsqsup: '\\u2290',\n\tsqsupe: '\\u2292',\n\tsqsupset: '\\u2290',\n\tsqsupseteq: '\\u2292',\n\tsqu: '\\u25A1',\n\tSquare: '\\u25A1',\n\tsquare: '\\u25A1',\n\tSquareIntersection: '\\u2293',\n\tSquareSubset: '\\u228F',\n\tSquareSubsetEqual: '\\u2291',\n\tSquareSuperset: '\\u2290',\n\tSquareSupersetEqual: '\\u2292',\n\tSquareUnion: '\\u2294',\n\tsquarf: '\\u25AA',\n\tsquf: '\\u25AA',\n\tsrarr: '\\u2192',\n\tSscr: '\\uD835\\uDCAE',\n\tsscr: '\\uD835\\uDCC8',\n\tssetmn: '\\u2216',\n\tssmile: '\\u2323',\n\tsstarf: '\\u22C6',\n\tStar: '\\u22C6',\n\tstar: '\\u2606',\n\tstarf: '\\u2605',\n\tstraightepsilon: '\\u03F5',\n\tstraightphi: '\\u03D5',\n\tstrns: '\\u00AF',\n\tSub: '\\u22D0',\n\tsub: '\\u2282',\n\tsubdot: '\\u2ABD',\n\tsubE: '\\u2AC5',\n\tsube: '\\u2286',\n\tsubedot: '\\u2AC3',\n\tsubmult: '\\u2AC1',\n\tsubnE: '\\u2ACB',\n\tsubne: '\\u228A',\n\tsubplus: '\\u2ABF',\n\tsubrarr: '\\u2979',\n\tSubset: '\\u22D0',\n\tsubset: '\\u2282',\n\tsubseteq: '\\u2286',\n\tsubseteqq: '\\u2AC5',\n\tSubsetEqual: '\\u2286',\n\tsubsetneq: '\\u228A',\n\tsubsetneqq: '\\u2ACB',\n\tsubsim: '\\u2AC7',\n\tsubsub: '\\u2AD5',\n\tsubsup: '\\u2AD3',\n\tsucc: '\\u227B',\n\tsuccapprox: '\\u2AB8',\n\tsucccurlyeq: '\\u227D',\n\tSucceeds: '\\u227B',\n\tSucceedsEqual: '\\u2AB0',\n\tSucceedsSlantEqual: '\\u227D',\n\tSucceedsTilde: '\\u227F',\n\tsucceq: '\\u2AB0',\n\tsuccnapprox: '\\u2ABA',\n\tsuccneqq: '\\u2AB6',\n\tsuccnsim: '\\u22E9',\n\tsuccsim: '\\u227F',\n\tSuchThat: '\\u220B',\n\tSum: '\\u2211',\n\tsum: '\\u2211',\n\tsung: '\\u266A',\n\tSup: '\\u22D1',\n\tsup: '\\u2283',\n\tsup1: '\\u00B9',\n\tsup2: '\\u00B2',\n\tsup3: '\\u00B3',\n\tsupdot: '\\u2ABE',\n\tsupdsub: '\\u2AD8',\n\tsupE: '\\u2AC6',\n\tsupe: '\\u2287',\n\tsupedot: '\\u2AC4',\n\tSuperset: '\\u2283',\n\tSupersetEqual: '\\u2287',\n\tsuphsol: '\\u27C9',\n\tsuphsub: '\\u2AD7',\n\tsuplarr: '\\u297B',\n\tsupmult: '\\u2AC2',\n\tsupnE: '\\u2ACC',\n\tsupne: '\\u228B',\n\tsupplus: '\\u2AC0',\n\tSupset: '\\u22D1',\n\tsupset: '\\u2283',\n\tsupseteq: '\\u2287',\n\tsupseteqq: '\\u2AC6',\n\tsupsetneq: '\\u228B',\n\tsupsetneqq: '\\u2ACC',\n\tsupsim: '\\u2AC8',\n\tsupsub: '\\u2AD4',\n\tsupsup: '\\u2AD6',\n\tswarhk: '\\u2926',\n\tswArr: '\\u21D9',\n\tswarr: '\\u2199',\n\tswarrow: '\\u2199',\n\tswnwar: '\\u292A',\n\tszlig: '\\u00DF',\n\tTab: '\\u0009',\n\ttarget: '\\u2316',\n\tTau: '\\u03A4',\n\ttau: '\\u03C4',\n\ttbrk: '\\u23B4',\n\tTcaron: '\\u0164',\n\ttcaron: '\\u0165',\n\tTcedil: '\\u0162',\n\ttcedil: '\\u0163',\n\tTcy: '\\u0422',\n\ttcy: '\\u0442',\n\ttdot: '\\u20DB',\n\ttelrec: '\\u2315',\n\tTfr: '\\uD835\\uDD17',\n\ttfr: '\\uD835\\uDD31',\n\tthere4: '\\u2234',\n\tTherefore: '\\u2234',\n\ttherefore: '\\u2234',\n\tTheta: '\\u0398',\n\ttheta: '\\u03B8',\n\tthetasym: '\\u03D1',\n\tthetav: '\\u03D1',\n\tthickapprox: '\\u2248',\n\tthicksim: '\\u223C',\n\tThickSpace: '\\u205F\\u200A',\n\tthinsp: '\\u2009',\n\tThinSpace: '\\u2009',\n\tthkap: '\\u2248',\n\tthksim: '\\u223C',\n\tTHORN: '\\u00DE',\n\tthorn: '\\u00FE',\n\tTilde: '\\u223C',\n\ttilde: '\\u02DC',\n\tTildeEqual: '\\u2243',\n\tTildeFullEqual: '\\u2245',\n\tTildeTilde: '\\u2248',\n\ttimes: '\\u00D7',\n\ttimesb: '\\u22A0',\n\ttimesbar: '\\u2A31',\n\ttimesd: '\\u2A30',\n\ttint: '\\u222D',\n\ttoea: '\\u2928',\n\ttop: '\\u22A4',\n\ttopbot: '\\u2336',\n\ttopcir: '\\u2AF1',\n\tTopf: '\\uD835\\uDD4B',\n\ttopf: '\\uD835\\uDD65',\n\ttopfork: '\\u2ADA',\n\ttosa: '\\u2929',\n\ttprime: '\\u2034',\n\tTRADE: '\\u2122',\n\ttrade: '\\u2122',\n\ttriangle: '\\u25B5',\n\ttriangledown: '\\u25BF',\n\ttriangleleft: '\\u25C3',\n\ttrianglelefteq: '\\u22B4',\n\ttriangleq: '\\u225C',\n\ttriangleright: '\\u25B9',\n\ttrianglerighteq: '\\u22B5',\n\ttridot: '\\u25EC',\n\ttrie: '\\u225C',\n\ttriminus: '\\u2A3A',\n\tTripleDot: '\\u20DB',\n\ttriplus: '\\u2A39',\n\ttrisb: '\\u29CD',\n\ttritime: '\\u2A3B',\n\ttrpezium: '\\u23E2',\n\tTscr: '\\uD835\\uDCAF',\n\ttscr: '\\uD835\\uDCC9',\n\tTScy: '\\u0426',\n\ttscy: '\\u0446',\n\tTSHcy: '\\u040B',\n\ttshcy: '\\u045B',\n\tTstrok: '\\u0166',\n\ttstrok: '\\u0167',\n\ttwixt: '\\u226C',\n\ttwoheadleftarrow: '\\u219E',\n\ttwoheadrightarrow: '\\u21A0',\n\tUacute: '\\u00DA',\n\tuacute: '\\u00FA',\n\tUarr: '\\u219F',\n\tuArr: '\\u21D1',\n\tuarr: '\\u2191',\n\tUarrocir: '\\u2949',\n\tUbrcy: '\\u040E',\n\tubrcy: '\\u045E',\n\tUbreve: '\\u016C',\n\tubreve: '\\u016D',\n\tUcirc: '\\u00DB',\n\tucirc: '\\u00FB',\n\tUcy: '\\u0423',\n\tucy: '\\u0443',\n\tudarr: '\\u21C5',\n\tUdblac: '\\u0170',\n\tudblac: '\\u0171',\n\tudhar: '\\u296E',\n\tufisht: '\\u297E',\n\tUfr: '\\uD835\\uDD18',\n\tufr: '\\uD835\\uDD32',\n\tUgrave: '\\u00D9',\n\tugrave: '\\u00F9',\n\tuHar: '\\u2963',\n\tuharl: '\\u21BF',\n\tuharr: '\\u21BE',\n\tuhblk: '\\u2580',\n\tulcorn: '\\u231C',\n\tulcorner: '\\u231C',\n\tulcrop: '\\u230F',\n\tultri: '\\u25F8',\n\tUmacr: '\\u016A',\n\tumacr: '\\u016B',\n\tuml: '\\u00A8',\n\tUnderBar: '\\u005F',\n\tUnderBrace: '\\u23DF',\n\tUnderBracket: '\\u23B5',\n\tUnderParenthesis: '\\u23DD',\n\tUnion: '\\u22C3',\n\tUnionPlus: '\\u228E',\n\tUogon: '\\u0172',\n\tuogon: '\\u0173',\n\tUopf: '\\uD835\\uDD4C',\n\tuopf: '\\uD835\\uDD66',\n\tUpArrow: '\\u2191',\n\tUparrow: '\\u21D1',\n\tuparrow: '\\u2191',\n\tUpArrowBar: '\\u2912',\n\tUpArrowDownArrow: '\\u21C5',\n\tUpDownArrow: '\\u2195',\n\tUpdownarrow: '\\u21D5',\n\tupdownarrow: '\\u2195',\n\tUpEquilibrium: '\\u296E',\n\tupharpoonleft: '\\u21BF',\n\tupharpoonright: '\\u21BE',\n\tuplus: '\\u228E',\n\tUpperLeftArrow: '\\u2196',\n\tUpperRightArrow: '\\u2197',\n\tUpsi: '\\u03D2',\n\tupsi: '\\u03C5',\n\tupsih: '\\u03D2',\n\tUpsilon: '\\u03A5',\n\tupsilon: '\\u03C5',\n\tUpTee: '\\u22A5',\n\tUpTeeArrow: '\\u21A5',\n\tupuparrows: '\\u21C8',\n\turcorn: '\\u231D',\n\turcorner: '\\u231D',\n\turcrop: '\\u230E',\n\tUring: '\\u016E',\n\turing: '\\u016F',\n\turtri: '\\u25F9',\n\tUscr: '\\uD835\\uDCB0',\n\tuscr: '\\uD835\\uDCCA',\n\tutdot: '\\u22F0',\n\tUtilde: '\\u0168',\n\tutilde: '\\u0169',\n\tutri: '\\u25B5',\n\tutrif: '\\u25B4',\n\tuuarr: '\\u21C8',\n\tUuml: '\\u00DC',\n\tuuml: '\\u00FC',\n\tuwangle: '\\u29A7',\n\tvangrt: '\\u299C',\n\tvarepsilon: '\\u03F5',\n\tvarkappa: '\\u03F0',\n\tvarnothing: '\\u2205',\n\tvarphi: '\\u03D5',\n\tvarpi: '\\u03D6',\n\tvarpropto: '\\u221D',\n\tvArr: '\\u21D5',\n\tvarr: '\\u2195',\n\tvarrho: '\\u03F1',\n\tvarsigma: '\\u03C2',\n\tvarsubsetneq: '\\u228A\\uFE00',\n\tvarsubsetneqq: '\\u2ACB\\uFE00',\n\tvarsupsetneq: '\\u228B\\uFE00',\n\tvarsupsetneqq: '\\u2ACC\\uFE00',\n\tvartheta: '\\u03D1',\n\tvartriangleleft: '\\u22B2',\n\tvartriangleright: '\\u22B3',\n\tVbar: '\\u2AEB',\n\tvBar: '\\u2AE8',\n\tvBarv: '\\u2AE9',\n\tVcy: '\\u0412',\n\tvcy: '\\u0432',\n\tVDash: '\\u22AB',\n\tVdash: '\\u22A9',\n\tvDash: '\\u22A8',\n\tvdash: '\\u22A2',\n\tVdashl: '\\u2AE6',\n\tVee: '\\u22C1',\n\tvee: '\\u2228',\n\tveebar: '\\u22BB',\n\tveeeq: '\\u225A',\n\tvellip: '\\u22EE',\n\tVerbar: '\\u2016',\n\tverbar: '\\u007C',\n\tVert: '\\u2016',\n\tvert: '\\u007C',\n\tVerticalBar: '\\u2223',\n\tVerticalLine: '\\u007C',\n\tVerticalSeparator: '\\u2758',\n\tVerticalTilde: '\\u2240',\n\tVeryThinSpace: '\\u200A',\n\tVfr: '\\uD835\\uDD19',\n\tvfr: '\\uD835\\uDD33',\n\tvltri: '\\u22B2',\n\tvnsub: '\\u2282\\u20D2',\n\tvnsup: '\\u2283\\u20D2',\n\tVopf: '\\uD835\\uDD4D',\n\tvopf: '\\uD835\\uDD67',\n\tvprop: '\\u221D',\n\tvrtri: '\\u22B3',\n\tVscr: '\\uD835\\uDCB1',\n\tvscr: '\\uD835\\uDCCB',\n\tvsubnE: '\\u2ACB\\uFE00',\n\tvsubne: '\\u228A\\uFE00',\n\tvsupnE: '\\u2ACC\\uFE00',\n\tvsupne: '\\u228B\\uFE00',\n\tVvdash: '\\u22AA',\n\tvzigzag: '\\u299A',\n\tWcirc: '\\u0174',\n\twcirc: '\\u0175',\n\twedbar: '\\u2A5F',\n\tWedge: '\\u22C0',\n\twedge: '\\u2227',\n\twedgeq: '\\u2259',\n\tweierp: '\\u2118',\n\tWfr: '\\uD835\\uDD1A',\n\twfr: '\\uD835\\uDD34',\n\tWopf: '\\uD835\\uDD4E',\n\twopf: '\\uD835\\uDD68',\n\twp: '\\u2118',\n\twr: '\\u2240',\n\twreath: '\\u2240',\n\tWscr: '\\uD835\\uDCB2',\n\twscr: '\\uD835\\uDCCC',\n\txcap: '\\u22C2',\n\txcirc: '\\u25EF',\n\txcup: '\\u22C3',\n\txdtri: '\\u25BD',\n\tXfr: '\\uD835\\uDD1B',\n\txfr: '\\uD835\\uDD35',\n\txhArr: '\\u27FA',\n\txharr: '\\u27F7',\n\tXi: '\\u039E',\n\txi: '\\u03BE',\n\txlArr: '\\u27F8',\n\txlarr: '\\u27F5',\n\txmap: '\\u27FC',\n\txnis: '\\u22FB',\n\txodot: '\\u2A00',\n\tXopf: '\\uD835\\uDD4F',\n\txopf: '\\uD835\\uDD69',\n\txoplus: '\\u2A01',\n\txotime: '\\u2A02',\n\txrArr: '\\u27F9',\n\txrarr: '\\u27F6',\n\tXscr: '\\uD835\\uDCB3',\n\txscr: '\\uD835\\uDCCD',\n\txsqcup: '\\u2A06',\n\txuplus: '\\u2A04',\n\txutri: '\\u25B3',\n\txvee: '\\u22C1',\n\txwedge: '\\u22C0',\n\tYacute: '\\u00DD',\n\tyacute: '\\u00FD',\n\tYAcy: '\\u042F',\n\tyacy: '\\u044F',\n\tYcirc: '\\u0176',\n\tycirc: '\\u0177',\n\tYcy: '\\u042B',\n\tycy: '\\u044B',\n\tyen: '\\u00A5',\n\tYfr: '\\uD835\\uDD1C',\n\tyfr: '\\uD835\\uDD36',\n\tYIcy: '\\u0407',\n\tyicy: '\\u0457',\n\tYopf: '\\uD835\\uDD50',\n\tyopf: '\\uD835\\uDD6A',\n\tYscr: '\\uD835\\uDCB4',\n\tyscr: '\\uD835\\uDCCE',\n\tYUcy: '\\u042E',\n\tyucy: '\\u044E',\n\tYuml: '\\u0178',\n\tyuml: '\\u00FF',\n\tZacute: '\\u0179',\n\tzacute: '\\u017A',\n\tZcaron: '\\u017D',\n\tzcaron: '\\u017E',\n\tZcy: '\\u0417',\n\tzcy: '\\u0437',\n\tZdot: '\\u017B',\n\tzdot: '\\u017C',\n\tzeetrf: '\\u2128',\n\tZeroWidthSpace: '\\u200B',\n\tZeta: '\\u0396',\n\tzeta: '\\u03B6',\n\tZfr: '\\u2128',\n\tzfr: '\\uD835\\uDD37',\n\tZHcy: '\\u0416',\n\tzhcy: '\\u0436',\n\tzigrarr: '\\u21DD',\n\tZopf: '\\u2124',\n\tzopf: '\\uD835\\uDD6B',\n\tZscr: '\\uD835\\uDCB5',\n\tzscr: '\\uD835\\uDCCF',\n\tzwj: '\\u200D',\n\tzwnj: '\\u200C',\n});\n\n/**\n * @deprecated use `HTML_ENTITIES` instead\n * @see HTML_ENTITIES\n */\nexports.entityMap = exports.HTML_ENTITIES;\n","var NAMESPACE = require(\"./conventions\").NAMESPACE;\n\n//[4] \tNameStartChar\t ::= \t\":\" | [A-Z] | \"_\" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]\n//[4a] \tNameChar\t ::= \tNameStartChar | \"-\" | \".\" | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]\n//[5] \tName\t ::= \tNameStartChar (NameChar)*\nvar nameStartChar = /[A-Z_a-z\\xC0-\\xD6\\xD8-\\xF6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]///\\u10000-\\uEFFFF\nvar nameChar = new RegExp(\"[\\\\-\\\\.0-9\"+nameStartChar.source.slice(1,-1)+\"\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]\");\nvar tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\\:'+nameStartChar.source+nameChar.source+'*)?$');\n//var tagNamePattern = /^[a-zA-Z_][\\w\\-\\.]*(?:\\:[a-zA-Z_][\\w\\-\\.]*)?$/\n//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')\n\n//S_TAG,\tS_ATTR,\tS_EQ,\tS_ATTR_NOQUOT_VALUE\n//S_ATTR_SPACE,\tS_ATTR_END,\tS_TAG_SPACE, S_TAG_CLOSE\nvar S_TAG = 0;//tag name offerring\nvar S_ATTR = 1;//attr name offerring\nvar S_ATTR_SPACE=2;//attr name end and space offer\nvar S_EQ = 3;//=space?\nvar S_ATTR_NOQUOT_VALUE = 4;//attr value(no quot value only)\nvar S_ATTR_END = 5;//attr value end and no space(quot end)\nvar S_TAG_SPACE = 6;//(attr value end || tag end ) && (space offer)\nvar S_TAG_CLOSE = 7;//closed el\n\n/**\n * Creates an error that will not be caught by XMLReader aka the SAX parser.\n *\n * @param {string} message\n * @param {any?} locator Optional, can provide details about the location in the source\n * @constructor\n */\nfunction ParseError(message, locator) {\n\tthis.message = message\n\tthis.locator = locator\n\tif(Error.captureStackTrace) Error.captureStackTrace(this, ParseError);\n}\nParseError.prototype = new Error();\nParseError.prototype.name = ParseError.name\n\nfunction XMLReader(){\n\n}\n\nXMLReader.prototype = {\n\tparse:function(source,defaultNSMap,entityMap){\n\t\tvar domBuilder = this.domBuilder;\n\t\tdomBuilder.startDocument();\n\t\t_copy(defaultNSMap ,defaultNSMap = {})\n\t\tparse(source,defaultNSMap,entityMap,\n\t\t\t\tdomBuilder,this.errorHandler);\n\t\tdomBuilder.endDocument();\n\t}\n}\nfunction parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){\n\tfunction fixedFromCharCode(code) {\n\t\t// String.prototype.fromCharCode does not supports\n\t\t// > 2 bytes unicode chars directly\n\t\tif (code > 0xffff) {\n\t\t\tcode -= 0x10000;\n\t\t\tvar surrogate1 = 0xd800 + (code >> 10)\n\t\t\t\t, surrogate2 = 0xdc00 + (code & 0x3ff);\n\n\t\t\treturn String.fromCharCode(surrogate1, surrogate2);\n\t\t} else {\n\t\t\treturn String.fromCharCode(code);\n\t\t}\n\t}\n\tfunction entityReplacer(a){\n\t\tvar k = a.slice(1,-1);\n\t\tif (Object.hasOwnProperty.call(entityMap, k)) {\n\t\t\treturn entityMap[k];\n\t\t}else if(k.charAt(0) === '#'){\n\t\t\treturn fixedFromCharCode(parseInt(k.substr(1).replace('x','0x')))\n\t\t}else{\n\t\t\terrorHandler.error('entity not found:'+a);\n\t\t\treturn a;\n\t\t}\n\t}\n\tfunction appendText(end){//has some bugs\n\t\tif(end>start){\n\t\t\tvar xt = source.substring(start,end).replace(/&#?\\w+;/g,entityReplacer);\n\t\t\tlocator&&position(start);\n\t\t\tdomBuilder.characters(xt,0,end-start);\n\t\t\tstart = end\n\t\t}\n\t}\n\tfunction position(p,m){\n\t\twhile(p>=lineEnd && (m = linePattern.exec(source))){\n\t\t\tlineStart = m.index;\n\t\t\tlineEnd = lineStart + m[0].length;\n\t\t\tlocator.lineNumber++;\n\t\t\t//console.log('line++:',locator,startPos,endPos)\n\t\t}\n\t\tlocator.columnNumber = p-lineStart+1;\n\t}\n\tvar lineStart = 0;\n\tvar lineEnd = 0;\n\tvar linePattern = /.*(?:\\r\\n?|\\n)|.*$/g\n\tvar locator = domBuilder.locator;\n\n\tvar parseStack = [{currentNSMap:defaultNSMapCopy}]\n\tvar closeMap = {};\n\tvar start = 0;\n\twhile(true){\n\t\ttry{\n\t\t\tvar tagStart = source.indexOf('<',start);\n\t\t\tif(tagStart<0){\n\t\t\t\tif(!source.substr(start).match(/^\\s*$/)){\n\t\t\t\t\tvar doc = domBuilder.doc;\n\t \t\t\tvar text = doc.createTextNode(source.substr(start));\n\t \t\t\tdoc.appendChild(text);\n\t \t\t\tdomBuilder.currentElement = text;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(tagStart>start){\n\t\t\t\tappendText(tagStart);\n\t\t\t}\n\t\t\tswitch(source.charAt(tagStart+1)){\n\t\t\tcase '/':\n\t\t\t\tvar end = source.indexOf('>',tagStart+3);\n\t\t\t\tvar tagName = source.substring(tagStart + 2, end).replace(/[ \\t\\n\\r]+$/g, '');\n\t\t\t\tvar config = parseStack.pop();\n\t\t\t\tif(end<0){\n\n\t \t\ttagName = source.substring(tagStart+2).replace(/[\\s<].*/,'');\n\t \t\terrorHandler.error(\"end tag name: \"+tagName+' is not complete:'+config.tagName);\n\t \t\tend = tagStart+1+tagName.length;\n\t \t}else if(tagName.match(/\\s\n\t\t\t\tlocator&&position(tagStart);\n\t\t\t\tend = parseInstruction(source,tagStart,domBuilder);\n\t\t\t\tbreak;\n\t\t\tcase '!':// start){\n\t\t\tstart = end;\n\t\t}else{\n\t\t\t//TODO: 这里有可能sax回退,有位置错误风险\n\t\t\tappendText(Math.max(tagStart,start)+1);\n\t\t}\n\t}\n}\nfunction copyLocator(f,t){\n\tt.lineNumber = f.lineNumber;\n\tt.columnNumber = f.columnNumber;\n\treturn t;\n}\n\n/**\n * @see #appendElement(source,elStartEnd,el,selfClosed,entityReplacer,domBuilder,parseStack);\n * @return end of the elementStartPart(end of elementEndPart for selfClosed el)\n */\nfunction parseElementStartPart(source,start,el,currentNSMap,entityReplacer,errorHandler){\n\n\t/**\n\t * @param {string} qname\n\t * @param {string} value\n\t * @param {number} startIndex\n\t */\n\tfunction addAttribute(qname, value, startIndex) {\n\t\tif (el.attributeNames.hasOwnProperty(qname)) {\n\t\t\terrorHandler.fatalError('Attribute ' + qname + ' redefined')\n\t\t}\n\t\tel.addValue(\n\t\t\tqname,\n\t\t\t// @see https://www.w3.org/TR/xml/#AVNormalize\n\t\t\t// since the xmldom sax parser does not \"interpret\" DTD the following is not implemented:\n\t\t\t// - recursive replacement of (DTD) entity references\n\t\t\t// - trimming and collapsing multiple spaces into a single one for attributes that are not of type CDATA\n\t\t\tvalue.replace(/[\\t\\n\\r]/g, ' ').replace(/&#?\\w+;/g, entityReplacer),\n\t\t\tstartIndex\n\t\t)\n\t}\n\tvar attrName;\n\tvar value;\n\tvar p = ++start;\n\tvar s = S_TAG;//status\n\twhile(true){\n\t\tvar c = source.charAt(p);\n\t\tswitch(c){\n\t\tcase '=':\n\t\t\tif(s === S_ATTR){//attrName\n\t\t\t\tattrName = source.slice(start,p);\n\t\t\t\ts = S_EQ;\n\t\t\t}else if(s === S_ATTR_SPACE){\n\t\t\t\ts = S_EQ;\n\t\t\t}else{\n\t\t\t\t//fatalError: equal must after attrName or space after attrName\n\t\t\t\tthrow new Error('attribute equal must after attrName'); // No known test case\n\t\t\t}\n\t\t\tbreak;\n\t\tcase '\\'':\n\t\tcase '\"':\n\t\t\tif(s === S_EQ || s === S_ATTR //|| s == S_ATTR_SPACE\n\t\t\t\t){//equal\n\t\t\t\tif(s === S_ATTR){\n\t\t\t\t\terrorHandler.warning('attribute value must after \"=\"')\n\t\t\t\t\tattrName = source.slice(start,p)\n\t\t\t\t}\n\t\t\t\tstart = p+1;\n\t\t\t\tp = source.indexOf(c,start)\n\t\t\t\tif(p>0){\n\t\t\t\t\tvalue = source.slice(start, p);\n\t\t\t\t\taddAttribute(attrName, value, start-1);\n\t\t\t\t\ts = S_ATTR_END;\n\t\t\t\t}else{\n\t\t\t\t\t//fatalError: no end quot match\n\t\t\t\t\tthrow new Error('attribute value no end \\''+c+'\\' match');\n\t\t\t\t}\n\t\t\t}else if(s == S_ATTR_NOQUOT_VALUE){\n\t\t\t\tvalue = source.slice(start, p);\n\t\t\t\taddAttribute(attrName, value, start);\n\t\t\t\terrorHandler.warning('attribute \"'+attrName+'\" missed start quot('+c+')!!');\n\t\t\t\tstart = p+1;\n\t\t\t\ts = S_ATTR_END\n\t\t\t}else{\n\t\t\t\t//fatalError: no equal before\n\t\t\t\tthrow new Error('attribute value must after \"=\"'); // No known test case\n\t\t\t}\n\t\t\tbreak;\n\t\tcase '/':\n\t\t\tswitch(s){\n\t\t\tcase S_TAG:\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\tcase S_ATTR_END:\n\t\t\tcase S_TAG_SPACE:\n\t\t\tcase S_TAG_CLOSE:\n\t\t\t\ts =S_TAG_CLOSE;\n\t\t\t\tel.closed = true;\n\t\t\tcase S_ATTR_NOQUOT_VALUE:\n\t\t\tcase S_ATTR:\n\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR_SPACE:\n\t\t\t\t\tel.closed = true;\n\t\t\t\tbreak;\n\t\t\t//case S_EQ:\n\t\t\tdefault:\n\t\t\t\tthrow new Error(\"attribute invalid close char('/')\") // No known test case\n\t\t\t}\n\t\t\tbreak;\n\t\tcase ''://end document\n\t\t\terrorHandler.error('unexpected end of input');\n\t\t\tif(s == S_TAG){\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\t}\n\t\t\treturn p;\n\t\tcase '>':\n\t\t\tswitch(s){\n\t\t\tcase S_TAG:\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\tcase S_ATTR_END:\n\t\t\tcase S_TAG_SPACE:\n\t\t\tcase S_TAG_CLOSE:\n\t\t\t\tbreak;//normal\n\t\t\tcase S_ATTR_NOQUOT_VALUE://Compatible state\n\t\t\tcase S_ATTR:\n\t\t\t\tvalue = source.slice(start,p);\n\t\t\t\tif(value.slice(-1) === '/'){\n\t\t\t\t\tel.closed = true;\n\t\t\t\t\tvalue = value.slice(0,-1)\n\t\t\t\t}\n\t\t\tcase S_ATTR_SPACE:\n\t\t\t\tif(s === S_ATTR_SPACE){\n\t\t\t\t\tvalue = attrName;\n\t\t\t\t}\n\t\t\t\tif(s == S_ATTR_NOQUOT_VALUE){\n\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed quot(\")!');\n\t\t\t\t\taddAttribute(attrName, value, start)\n\t\t\t\t}else{\n\t\t\t\t\tif(!NAMESPACE.isHTML(currentNSMap['']) || !value.match(/^(?:disabled|checked|selected)$/i)){\n\t\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed value!! \"'+value+'\" instead!!')\n\t\t\t\t\t}\n\t\t\t\t\taddAttribute(value, value, start)\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase S_EQ:\n\t\t\t\tthrow new Error('attribute value missed!!');\n\t\t\t}\n//\t\t\tconsole.log(tagName,tagNamePattern,tagNamePattern.test(tagName))\n\t\t\treturn p;\n\t\t/*xml space '\\x20' | #x9 | #xD | #xA; */\n\t\tcase '\\u0080':\n\t\t\tc = ' ';\n\t\tdefault:\n\t\t\tif(c<= ' '){//space\n\t\t\t\tswitch(s){\n\t\t\t\tcase S_TAG:\n\t\t\t\t\tel.setTagName(source.slice(start,p));//tagName\n\t\t\t\t\ts = S_TAG_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR:\n\t\t\t\t\tattrName = source.slice(start,p)\n\t\t\t\t\ts = S_ATTR_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR_NOQUOT_VALUE:\n\t\t\t\t\tvar value = source.slice(start, p);\n\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed quot(\")!!');\n\t\t\t\t\taddAttribute(attrName, value, start)\n\t\t\t\tcase S_ATTR_END:\n\t\t\t\t\ts = S_TAG_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\t//case S_TAG_SPACE:\n\t\t\t\t//case S_EQ:\n\t\t\t\t//case S_ATTR_SPACE:\n\t\t\t\t//\tvoid();break;\n\t\t\t\t//case S_TAG_CLOSE:\n\t\t\t\t\t//ignore warning\n\t\t\t\t}\n\t\t\t}else{//not space\n//S_TAG,\tS_ATTR,\tS_EQ,\tS_ATTR_NOQUOT_VALUE\n//S_ATTR_SPACE,\tS_ATTR_END,\tS_TAG_SPACE, S_TAG_CLOSE\n\t\t\t\tswitch(s){\n\t\t\t\t//case S_TAG:void();break;\n\t\t\t\t//case S_ATTR:void();break;\n\t\t\t\t//case S_ATTR_NOQUOT_VALUE:void();break;\n\t\t\t\tcase S_ATTR_SPACE:\n\t\t\t\t\tvar tagName = el.tagName;\n\t\t\t\t\tif (!NAMESPACE.isHTML(currentNSMap['']) || !attrName.match(/^(?:disabled|checked|selected)$/i)) {\n\t\t\t\t\t\terrorHandler.warning('attribute \"'+attrName+'\" missed value!! \"'+attrName+'\" instead2!!')\n\t\t\t\t\t}\n\t\t\t\t\taddAttribute(attrName, attrName, start);\n\t\t\t\t\tstart = p;\n\t\t\t\t\ts = S_ATTR;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR_END:\n\t\t\t\t\terrorHandler.warning('attribute space is required\"'+attrName+'\"!!')\n\t\t\t\tcase S_TAG_SPACE:\n\t\t\t\t\ts = S_ATTR;\n\t\t\t\t\tstart = p;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_EQ:\n\t\t\t\t\ts = S_ATTR_NOQUOT_VALUE;\n\t\t\t\t\tstart = p;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_TAG_CLOSE:\n\t\t\t\t\tthrow new Error(\"elements closed character '/' and '>' must be connected to\");\n\t\t\t\t}\n\t\t\t}\n\t\t}//end outer switch\n\t\t//console.log('p++',p)\n\t\tp++;\n\t}\n}\n/**\n * @return true if has new namespace define\n */\nfunction appendElement(el,domBuilder,currentNSMap){\n\tvar tagName = el.tagName;\n\tvar localNSMap = null;\n\t//var currentNSMap = parseStack[parseStack.length-1].currentNSMap;\n\tvar i = el.length;\n\twhile(i--){\n\t\tvar a = el[i];\n\t\tvar qName = a.qName;\n\t\tvar value = a.value;\n\t\tvar nsp = qName.indexOf(':');\n\t\tif(nsp>0){\n\t\t\tvar prefix = a.prefix = qName.slice(0,nsp);\n\t\t\tvar localName = qName.slice(nsp+1);\n\t\t\tvar nsPrefix = prefix === 'xmlns' && localName\n\t\t}else{\n\t\t\tlocalName = qName;\n\t\t\tprefix = null\n\t\t\tnsPrefix = qName === 'xmlns' && ''\n\t\t}\n\t\t//can not set prefix,because prefix !== ''\n\t\ta.localName = localName ;\n\t\t//prefix == null for no ns prefix attribute\n\t\tif(nsPrefix !== false){//hack!!\n\t\t\tif(localNSMap == null){\n\t\t\t\tlocalNSMap = {}\n\t\t\t\t//console.log(currentNSMap,0)\n\t\t\t\t_copy(currentNSMap,currentNSMap={})\n\t\t\t\t//console.log(currentNSMap,1)\n\t\t\t}\n\t\t\tcurrentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;\n\t\t\ta.uri = NAMESPACE.XMLNS\n\t\t\tdomBuilder.startPrefixMapping(nsPrefix, value)\n\t\t}\n\t}\n\tvar i = el.length;\n\twhile(i--){\n\t\ta = el[i];\n\t\tvar prefix = a.prefix;\n\t\tif(prefix){//no prefix attribute has no namespace\n\t\t\tif(prefix === 'xml'){\n\t\t\t\ta.uri = NAMESPACE.XML;\n\t\t\t}if(prefix !== 'xmlns'){\n\t\t\t\ta.uri = currentNSMap[prefix || '']\n\n\t\t\t\t//{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)}\n\t\t\t}\n\t\t}\n\t}\n\tvar nsp = tagName.indexOf(':');\n\tif(nsp>0){\n\t\tprefix = el.prefix = tagName.slice(0,nsp);\n\t\tlocalName = el.localName = tagName.slice(nsp+1);\n\t}else{\n\t\tprefix = null;//important!!\n\t\tlocalName = el.localName = tagName;\n\t}\n\t//no prefix element has default namespace\n\tvar ns = el.uri = currentNSMap[prefix || ''];\n\tdomBuilder.startElement(ns,localName,tagName,el);\n\t//endPrefixMapping and startPrefixMapping have not any help for dom builder\n\t//localNSMap = null\n\tif(el.closed){\n\t\tdomBuilder.endElement(ns,localName,tagName);\n\t\tif(localNSMap){\n\t\t\tfor (prefix in localNSMap) {\n\t\t\t\tif (Object.prototype.hasOwnProperty.call(localNSMap, prefix)) {\n\t\t\t\t\tdomBuilder.endPrefixMapping(prefix);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}else{\n\t\tel.currentNSMap = currentNSMap;\n\t\tel.localNSMap = localNSMap;\n\t\t//parseStack.push(el);\n\t\treturn true;\n\t}\n}\nfunction parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){\n\tif(/^(?:script|textarea)$/i.test(tagName)){\n\t\tvar elEndStart = source.indexOf('',elStartEnd);\n\t\tvar text = source.substring(elStartEnd+1,elEndStart);\n\t\tif(/[&<]/.test(text)){\n\t\t\tif(/^script$/i.test(tagName)){\n\t\t\t\t//if(!/\\]\\]>/.test(text)){\n\t\t\t\t\t//lexHandler.startCDATA();\n\t\t\t\t\tdomBuilder.characters(text,0,text.length);\n\t\t\t\t\t//lexHandler.endCDATA();\n\t\t\t\t\treturn elEndStart;\n\t\t\t\t//}\n\t\t\t}//}else{//text area\n\t\t\t\ttext = text.replace(/&#?\\w+;/g,entityReplacer);\n\t\t\t\tdomBuilder.characters(text,0,text.length);\n\t\t\t\treturn elEndStart;\n\t\t\t//}\n\n\t\t}\n\t}\n\treturn elStartEnd+1;\n}\nfunction fixSelfClosed(source,elStartEnd,tagName,closeMap){\n\t//if(tagName in closeMap){\n\tvar pos = closeMap[tagName];\n\tif(pos == null){\n\t\t//console.log(tagName)\n\t\tpos = source.lastIndexOf('')\n\t\tif(pos',start+4);\n\t\t\t//append comment source.substring(4,end)//';\n if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n // ignore frames with unrecognized character encodings\n return;\n } // parsing fields [ID3v2.4.0 section 4.14.]\n\n mimeTypeEndIndex = typedArrayIndexOf(frame.data, 0, i);\n if (mimeTypeEndIndex < 0) {\n // malformed frame\n return;\n } // parsing Mime type field (terminated with \\0)\n\n frame.mimeType = parseIso88591$1(frame.data, i, mimeTypeEndIndex);\n i = mimeTypeEndIndex + 1; // parsing 1-byte Picture Type field\n\n frame.pictureType = frame.data[i];\n i++;\n descriptionEndIndex = typedArrayIndexOf(frame.data, 0, i);\n if (descriptionEndIndex < 0) {\n // malformed frame\n return;\n } // parsing Description field (terminated with \\0)\n\n frame.description = parseUtf8(frame.data, i, descriptionEndIndex);\n i = descriptionEndIndex + 1;\n if (frame.mimeType === LINK_MIME_TYPE) {\n // parsing Picture Data field as URL (always represented as ISO-8859-1 [ID3v2.4.0 section 4.])\n frame.url = parseIso88591$1(frame.data, i, frame.data.length);\n } else {\n // parsing Picture Data field as binary data\n frame.pictureData = frame.data.subarray(i, frame.data.length);\n }\n },\n 'T*': function (frame) {\n if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n // ignore frames with unrecognized character encodings\n return;\n } // parse text field, do not include null terminator in the frame value\n // frames that allow different types of encoding contain terminated text [ID3v2.4.0 section 4.]\n\n frame.value = parseUtf8(frame.data, 1, frame.data.length).replace(/\\0*$/, ''); // text information frames supports multiple strings, stored as a terminator separated list [ID3v2.4.0 section 4.2.]\n\n frame.values = frame.value.split('\\0');\n },\n 'TXXX': function (frame) {\n var descriptionEndIndex;\n if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n // ignore frames with unrecognized character encodings\n return;\n }\n descriptionEndIndex = typedArrayIndexOf(frame.data, 0, 1);\n if (descriptionEndIndex === -1) {\n return;\n } // parse the text fields\n\n frame.description = parseUtf8(frame.data, 1, descriptionEndIndex); // do not include the null terminator in the tag value\n // frames that allow different types of encoding contain terminated text\n // [ID3v2.4.0 section 4.]\n\n frame.value = parseUtf8(frame.data, descriptionEndIndex + 1, frame.data.length).replace(/\\0*$/, '');\n frame.data = frame.value;\n },\n 'W*': function (frame) {\n // parse URL field; URL fields are always represented as ISO-8859-1 [ID3v2.4.0 section 4.]\n // if the value is followed by a string termination all the following information should be ignored [ID3v2.4.0 section 4.3]\n frame.url = parseIso88591$1(frame.data, 0, frame.data.length).replace(/\\0.*$/, '');\n },\n 'WXXX': function (frame) {\n var descriptionEndIndex;\n if (frame.data[0] !== textEncodingDescriptionByte.Utf8) {\n // ignore frames with unrecognized character encodings\n return;\n }\n descriptionEndIndex = typedArrayIndexOf(frame.data, 0, 1);\n if (descriptionEndIndex === -1) {\n return;\n } // parse the description and URL fields\n\n frame.description = parseUtf8(frame.data, 1, descriptionEndIndex); // URL fields are always represented as ISO-8859-1 [ID3v2.4.0 section 4.]\n // if the value is followed by a string termination all the following information\n // should be ignored [ID3v2.4.0 section 4.3]\n\n frame.url = parseIso88591$1(frame.data, descriptionEndIndex + 1, frame.data.length).replace(/\\0.*$/, '');\n },\n 'PRIV': function (frame) {\n var i;\n for (i = 0; i < frame.data.length; i++) {\n if (frame.data[i] === 0) {\n // parse the description and URL fields\n frame.owner = parseIso88591$1(frame.data, 0, i);\n break;\n }\n }\n frame.privateData = frame.data.subarray(i + 1);\n frame.data = frame.privateData;\n }\n };\n var parseId3Frames$1 = function (data) {\n var frameSize,\n frameHeader,\n frameStart = 10,\n tagSize = 0,\n frames = []; // If we don't have enough data for a header, 10 bytes, \n // or 'ID3' in the first 3 bytes this is not a valid ID3 tag.\n\n if (data.length < 10 || data[0] !== 'I'.charCodeAt(0) || data[1] !== 'D'.charCodeAt(0) || data[2] !== '3'.charCodeAt(0)) {\n return;\n } // the frame size is transmitted as a 28-bit integer in the\n // last four bytes of the ID3 header.\n // The most significant bit of each byte is dropped and the\n // results concatenated to recover the actual value.\n\n tagSize = parseSyncSafeInteger$1(data.subarray(6, 10)); // ID3 reports the tag size excluding the header but it's more\n // convenient for our comparisons to include it\n\n tagSize += 10; // check bit 6 of byte 5 for the extended header flag.\n\n var hasExtendedHeader = data[5] & 0x40;\n if (hasExtendedHeader) {\n // advance the frame start past the extended header\n frameStart += 4; // header size field\n\n frameStart += parseSyncSafeInteger$1(data.subarray(10, 14));\n tagSize -= parseSyncSafeInteger$1(data.subarray(16, 20)); // clip any padding off the end\n } // parse one or more ID3 frames\n // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n do {\n // determine the number of bytes in this frame\n frameSize = parseSyncSafeInteger$1(data.subarray(frameStart + 4, frameStart + 8));\n if (frameSize < 1) {\n break;\n }\n frameHeader = String.fromCharCode(data[frameStart], data[frameStart + 1], data[frameStart + 2], data[frameStart + 3]);\n var frame = {\n id: frameHeader,\n data: data.subarray(frameStart + 10, frameStart + frameSize + 10)\n };\n frame.key = frame.id; // parse frame values\n\n if (frameParsers[frame.id]) {\n // use frame specific parser\n frameParsers[frame.id](frame);\n } else if (frame.id[0] === 'T') {\n // use text frame generic parser\n frameParsers['T*'](frame);\n } else if (frame.id[0] === 'W') {\n // use URL link frame generic parser\n frameParsers['W*'](frame);\n }\n frames.push(frame);\n frameStart += 10; // advance past the frame header\n\n frameStart += frameSize; // advance past the frame body\n } while (frameStart < tagSize);\n return frames;\n };\n var parseId3 = {\n parseId3Frames: parseId3Frames$1,\n parseSyncSafeInteger: parseSyncSafeInteger$1,\n frameParsers: frameParsers\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Accepts program elementary stream (PES) data events and parses out\n * ID3 metadata from them, if present.\n * @see http://id3.org/id3v2.3.0\n */\n\n var Stream$5 = stream,\n StreamTypes$3 = streamTypes,\n id3 = parseId3,\n MetadataStream;\n MetadataStream = function (options) {\n var settings = {\n // the bytes of the program-level descriptor field in MP2T\n // see ISO/IEC 13818-1:2013 (E), section 2.6 \"Program and\n // program element descriptors\"\n descriptor: options && options.descriptor\n },\n // the total size in bytes of the ID3 tag being parsed\n tagSize = 0,\n // tag data that is not complete enough to be parsed\n buffer = [],\n // the total number of bytes currently in the buffer\n bufferSize = 0,\n i;\n MetadataStream.prototype.init.call(this); // calculate the text track in-band metadata track dispatch type\n // https://html.spec.whatwg.org/multipage/embedded-content.html#steps-to-expose-a-media-resource-specific-text-track\n\n this.dispatchType = StreamTypes$3.METADATA_STREAM_TYPE.toString(16);\n if (settings.descriptor) {\n for (i = 0; i < settings.descriptor.length; i++) {\n this.dispatchType += ('00' + settings.descriptor[i].toString(16)).slice(-2);\n }\n }\n this.push = function (chunk) {\n var tag, frameStart, frameSize, frame, i, frameHeader;\n if (chunk.type !== 'timed-metadata') {\n return;\n } // if data_alignment_indicator is set in the PES header,\n // we must have the start of a new ID3 tag. Assume anything\n // remaining in the buffer was malformed and throw it out\n\n if (chunk.dataAlignmentIndicator) {\n bufferSize = 0;\n buffer.length = 0;\n } // ignore events that don't look like ID3 data\n\n if (buffer.length === 0 && (chunk.data.length < 10 || chunk.data[0] !== 'I'.charCodeAt(0) || chunk.data[1] !== 'D'.charCodeAt(0) || chunk.data[2] !== '3'.charCodeAt(0))) {\n this.trigger('log', {\n level: 'warn',\n message: 'Skipping unrecognized metadata packet'\n });\n return;\n } // add this chunk to the data we've collected so far\n\n buffer.push(chunk);\n bufferSize += chunk.data.byteLength; // grab the size of the entire frame from the ID3 header\n\n if (buffer.length === 1) {\n // the frame size is transmitted as a 28-bit integer in the\n // last four bytes of the ID3 header.\n // The most significant bit of each byte is dropped and the\n // results concatenated to recover the actual value.\n tagSize = id3.parseSyncSafeInteger(chunk.data.subarray(6, 10)); // ID3 reports the tag size excluding the header but it's more\n // convenient for our comparisons to include it\n\n tagSize += 10;\n } // if the entire frame has not arrived, wait for more data\n\n if (bufferSize < tagSize) {\n return;\n } // collect the entire frame so it can be parsed\n\n tag = {\n data: new Uint8Array(tagSize),\n frames: [],\n pts: buffer[0].pts,\n dts: buffer[0].dts\n };\n for (i = 0; i < tagSize;) {\n tag.data.set(buffer[0].data.subarray(0, tagSize - i), i);\n i += buffer[0].data.byteLength;\n bufferSize -= buffer[0].data.byteLength;\n buffer.shift();\n } // find the start of the first frame and the end of the tag\n\n frameStart = 10;\n if (tag.data[5] & 0x40) {\n // advance the frame start past the extended header\n frameStart += 4; // header size field\n\n frameStart += id3.parseSyncSafeInteger(tag.data.subarray(10, 14)); // clip any padding off the end\n\n tagSize -= id3.parseSyncSafeInteger(tag.data.subarray(16, 20));\n } // parse one or more ID3 frames\n // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n do {\n // determine the number of bytes in this frame\n frameSize = id3.parseSyncSafeInteger(tag.data.subarray(frameStart + 4, frameStart + 8));\n if (frameSize < 1) {\n this.trigger('log', {\n level: 'warn',\n message: 'Malformed ID3 frame encountered. Skipping remaining metadata parsing.'\n }); // If the frame is malformed, don't parse any further frames but allow previous valid parsed frames\n // to be sent along.\n\n break;\n }\n frameHeader = String.fromCharCode(tag.data[frameStart], tag.data[frameStart + 1], tag.data[frameStart + 2], tag.data[frameStart + 3]);\n frame = {\n id: frameHeader,\n data: tag.data.subarray(frameStart + 10, frameStart + frameSize + 10)\n };\n frame.key = frame.id; // parse frame values\n\n if (id3.frameParsers[frame.id]) {\n // use frame specific parser\n id3.frameParsers[frame.id](frame);\n } else if (frame.id[0] === 'T') {\n // use text frame generic parser\n id3.frameParsers['T*'](frame);\n } else if (frame.id[0] === 'W') {\n // use URL link frame generic parser\n id3.frameParsers['W*'](frame);\n } // handle the special PRIV frame used to indicate the start\n // time for raw AAC data\n\n if (frame.owner === 'com.apple.streaming.transportStreamTimestamp') {\n var d = frame.data,\n size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;\n size *= 4;\n size += d[7] & 0x03;\n frame.timeStamp = size; // in raw AAC, all subsequent data will be timestamped based\n // on the value of this frame\n // we couldn't have known the appropriate pts and dts before\n // parsing this ID3 tag so set those values now\n\n if (tag.pts === undefined && tag.dts === undefined) {\n tag.pts = frame.timeStamp;\n tag.dts = frame.timeStamp;\n }\n this.trigger('timestamp', frame);\n }\n tag.frames.push(frame);\n frameStart += 10; // advance past the frame header\n\n frameStart += frameSize; // advance past the frame body\n } while (frameStart < tagSize);\n this.trigger('data', tag);\n };\n };\n MetadataStream.prototype = new Stream$5();\n var metadataStream = MetadataStream;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * A stream-based mp2t to mp4 converter. This utility can be used to\n * deliver mp4s to a SourceBuffer on platforms that support native\n * Media Source Extensions.\n */\n\n var Stream$4 = stream,\n CaptionStream$1 = captionStream,\n StreamTypes$2 = streamTypes,\n TimestampRolloverStream = timestampRolloverStream.TimestampRolloverStream; // object types\n\n var TransportPacketStream, TransportParseStream, ElementaryStream; // constants\n\n var MP2T_PACKET_LENGTH$1 = 188,\n // bytes\n SYNC_BYTE$1 = 0x47;\n /**\n * Splits an incoming stream of binary data into MPEG-2 Transport\n * Stream packets.\n */\n\n TransportPacketStream = function () {\n var buffer = new Uint8Array(MP2T_PACKET_LENGTH$1),\n bytesInBuffer = 0;\n TransportPacketStream.prototype.init.call(this); // Deliver new bytes to the stream.\n\n /**\n * Split a stream of data into M2TS packets\n **/\n\n this.push = function (bytes) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH$1,\n everything; // If there are bytes remaining from the last segment, prepend them to the\n // bytes that were pushed in\n\n if (bytesInBuffer) {\n everything = new Uint8Array(bytes.byteLength + bytesInBuffer);\n everything.set(buffer.subarray(0, bytesInBuffer));\n everything.set(bytes, bytesInBuffer);\n bytesInBuffer = 0;\n } else {\n everything = bytes;\n } // While we have enough data for a packet\n\n while (endIndex < everything.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (everything[startIndex] === SYNC_BYTE$1 && everything[endIndex] === SYNC_BYTE$1) {\n // We found a packet so emit it and jump one whole packet forward in\n // the stream\n this.trigger('data', everything.subarray(startIndex, endIndex));\n startIndex += MP2T_PACKET_LENGTH$1;\n endIndex += MP2T_PACKET_LENGTH$1;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex++;\n endIndex++;\n } // If there was some data left over at the end of the segment that couldn't\n // possibly be a whole packet, keep it because it might be the start of a packet\n // that continues in the next segment\n\n if (startIndex < everything.byteLength) {\n buffer.set(everything.subarray(startIndex), 0);\n bytesInBuffer = everything.byteLength - startIndex;\n }\n };\n /**\n * Passes identified M2TS packets to the TransportParseStream to be parsed\n **/\n\n this.flush = function () {\n // If the buffer contains a whole packet when we are being flushed, emit it\n // and empty the buffer. Otherwise hold onto the data because it may be\n // important for decoding the next segment\n if (bytesInBuffer === MP2T_PACKET_LENGTH$1 && buffer[0] === SYNC_BYTE$1) {\n this.trigger('data', buffer);\n bytesInBuffer = 0;\n }\n this.trigger('done');\n };\n this.endTimeline = function () {\n this.flush();\n this.trigger('endedtimeline');\n };\n this.reset = function () {\n bytesInBuffer = 0;\n this.trigger('reset');\n };\n };\n TransportPacketStream.prototype = new Stream$4();\n /**\n * Accepts an MP2T TransportPacketStream and emits data events with parsed\n * forms of the individual transport stream packets.\n */\n\n TransportParseStream = function () {\n var parsePsi, parsePat, parsePmt, self;\n TransportParseStream.prototype.init.call(this);\n self = this;\n this.packetsWaitingForPmt = [];\n this.programMapTable = undefined;\n parsePsi = function (payload, psi) {\n var offset = 0; // PSI packets may be split into multiple sections and those\n // sections may be split into multiple packets. If a PSI\n // section starts in this packet, the payload_unit_start_indicator\n // will be true and the first byte of the payload will indicate\n // the offset from the current position to the start of the\n // section.\n\n if (psi.payloadUnitStartIndicator) {\n offset += payload[offset] + 1;\n }\n if (psi.type === 'pat') {\n parsePat(payload.subarray(offset), psi);\n } else {\n parsePmt(payload.subarray(offset), psi);\n }\n };\n parsePat = function (payload, pat) {\n pat.section_number = payload[7]; // eslint-disable-line camelcase\n\n pat.last_section_number = payload[8]; // eslint-disable-line camelcase\n // skip the PSI header and parse the first PMT entry\n\n self.pmtPid = (payload[10] & 0x1F) << 8 | payload[11];\n pat.pmtPid = self.pmtPid;\n };\n /**\n * Parse out the relevant fields of a Program Map Table (PMT).\n * @param payload {Uint8Array} the PMT-specific portion of an MP2T\n * packet. The first byte in this array should be the table_id\n * field.\n * @param pmt {object} the object that should be decorated with\n * fields parsed from the PMT.\n */\n\n parsePmt = function (payload, pmt) {\n var sectionLength, tableEnd, programInfoLength, offset; // PMTs can be sent ahead of the time when they should actually\n // take effect. We don't believe this should ever be the case\n // for HLS but we'll ignore \"forward\" PMT declarations if we see\n // them. Future PMT declarations have the current_next_indicator\n // set to zero.\n\n if (!(payload[5] & 0x01)) {\n return;\n } // overwrite any existing program map table\n\n self.programMapTable = {\n video: null,\n audio: null,\n 'timed-metadata': {}\n }; // the mapping table ends at the end of the current section\n\n sectionLength = (payload[1] & 0x0f) << 8 | payload[2];\n tableEnd = 3 + sectionLength - 4; // to determine where the table is, we have to figure out how\n // long the program info descriptors are\n\n programInfoLength = (payload[10] & 0x0f) << 8 | payload[11]; // advance the offset to the first entry in the mapping table\n\n offset = 12 + programInfoLength;\n while (offset < tableEnd) {\n var streamType = payload[offset];\n var pid = (payload[offset + 1] & 0x1F) << 8 | payload[offset + 2]; // only map a single elementary_pid for audio and video stream types\n // TODO: should this be done for metadata too? for now maintain behavior of\n // multiple metadata streams\n\n if (streamType === StreamTypes$2.H264_STREAM_TYPE && self.programMapTable.video === null) {\n self.programMapTable.video = pid;\n } else if (streamType === StreamTypes$2.ADTS_STREAM_TYPE && self.programMapTable.audio === null) {\n self.programMapTable.audio = pid;\n } else if (streamType === StreamTypes$2.METADATA_STREAM_TYPE) {\n // map pid to stream type for metadata streams\n self.programMapTable['timed-metadata'][pid] = streamType;\n } // move to the next table entry\n // skip past the elementary stream descriptors, if present\n\n offset += ((payload[offset + 3] & 0x0F) << 8 | payload[offset + 4]) + 5;\n } // record the map on the packet as well\n\n pmt.programMapTable = self.programMapTable;\n };\n /**\n * Deliver a new MP2T packet to the next stream in the pipeline.\n */\n\n this.push = function (packet) {\n var result = {},\n offset = 4;\n result.payloadUnitStartIndicator = !!(packet[1] & 0x40); // pid is a 13-bit field starting at the last bit of packet[1]\n\n result.pid = packet[1] & 0x1f;\n result.pid <<= 8;\n result.pid |= packet[2]; // if an adaption field is present, its length is specified by the\n // fifth byte of the TS packet header. The adaptation field is\n // used to add stuffing to PES packets that don't fill a complete\n // TS packet, and to specify some forms of timing and control data\n // that we do not currently use.\n\n if ((packet[3] & 0x30) >>> 4 > 0x01) {\n offset += packet[offset] + 1;\n } // parse the rest of the packet based on the type\n\n if (result.pid === 0) {\n result.type = 'pat';\n parsePsi(packet.subarray(offset), result);\n this.trigger('data', result);\n } else if (result.pid === this.pmtPid) {\n result.type = 'pmt';\n parsePsi(packet.subarray(offset), result);\n this.trigger('data', result); // if there are any packets waiting for a PMT to be found, process them now\n\n while (this.packetsWaitingForPmt.length) {\n this.processPes_.apply(this, this.packetsWaitingForPmt.shift());\n }\n } else if (this.programMapTable === undefined) {\n // When we have not seen a PMT yet, defer further processing of\n // PES packets until one has been parsed\n this.packetsWaitingForPmt.push([packet, offset, result]);\n } else {\n this.processPes_(packet, offset, result);\n }\n };\n this.processPes_ = function (packet, offset, result) {\n // set the appropriate stream type\n if (result.pid === this.programMapTable.video) {\n result.streamType = StreamTypes$2.H264_STREAM_TYPE;\n } else if (result.pid === this.programMapTable.audio) {\n result.streamType = StreamTypes$2.ADTS_STREAM_TYPE;\n } else {\n // if not video or audio, it is timed-metadata or unknown\n // if unknown, streamType will be undefined\n result.streamType = this.programMapTable['timed-metadata'][result.pid];\n }\n result.type = 'pes';\n result.data = packet.subarray(offset);\n this.trigger('data', result);\n };\n };\n TransportParseStream.prototype = new Stream$4();\n TransportParseStream.STREAM_TYPES = {\n h264: 0x1b,\n adts: 0x0f\n };\n /**\n * Reconsistutes program elementary stream (PES) packets from parsed\n * transport stream packets. That is, if you pipe an\n * mp2t.TransportParseStream into a mp2t.ElementaryStream, the output\n * events will be events which capture the bytes for individual PES\n * packets plus relevant metadata that has been extracted from the\n * container.\n */\n\n ElementaryStream = function () {\n var self = this,\n segmentHadPmt = false,\n // PES packet fragments\n video = {\n data: [],\n size: 0\n },\n audio = {\n data: [],\n size: 0\n },\n timedMetadata = {\n data: [],\n size: 0\n },\n programMapTable,\n parsePes = function (payload, pes) {\n var ptsDtsFlags;\n const startPrefix = payload[0] << 16 | payload[1] << 8 | payload[2]; // default to an empty array\n\n pes.data = new Uint8Array(); // In certain live streams, the start of a TS fragment has ts packets\n // that are frame data that is continuing from the previous fragment. This\n // is to check that the pes data is the start of a new pes payload\n\n if (startPrefix !== 1) {\n return;\n } // get the packet length, this will be 0 for video\n\n pes.packetLength = 6 + (payload[4] << 8 | payload[5]); // find out if this packets starts a new keyframe\n\n pes.dataAlignmentIndicator = (payload[6] & 0x04) !== 0; // PES packets may be annotated with a PTS value, or a PTS value\n // and a DTS value. Determine what combination of values is\n // available to work with.\n\n ptsDtsFlags = payload[7]; // PTS and DTS are normally stored as a 33-bit number. Javascript\n // performs all bitwise operations on 32-bit integers but javascript\n // supports a much greater range (52-bits) of integer using standard\n // mathematical operations.\n // We construct a 31-bit value using bitwise operators over the 31\n // most significant bits and then multiply by 4 (equal to a left-shift\n // of 2) before we add the final 2 least significant bits of the\n // timestamp (equal to an OR.)\n\n if (ptsDtsFlags & 0xC0) {\n // the PTS and DTS are not written out directly. For information\n // on how they are encoded, see\n // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n pes.pts = (payload[9] & 0x0E) << 27 | (payload[10] & 0xFF) << 20 | (payload[11] & 0xFE) << 12 | (payload[12] & 0xFF) << 5 | (payload[13] & 0xFE) >>> 3;\n pes.pts *= 4; // Left shift by 2\n\n pes.pts += (payload[13] & 0x06) >>> 1; // OR by the two LSBs\n\n pes.dts = pes.pts;\n if (ptsDtsFlags & 0x40) {\n pes.dts = (payload[14] & 0x0E) << 27 | (payload[15] & 0xFF) << 20 | (payload[16] & 0xFE) << 12 | (payload[17] & 0xFF) << 5 | (payload[18] & 0xFE) >>> 3;\n pes.dts *= 4; // Left shift by 2\n\n pes.dts += (payload[18] & 0x06) >>> 1; // OR by the two LSBs\n }\n } // the data section starts immediately after the PES header.\n // pes_header_data_length specifies the number of header bytes\n // that follow the last byte of the field.\n\n pes.data = payload.subarray(9 + payload[8]);\n },\n /**\n * Pass completely parsed PES packets to the next stream in the pipeline\n **/\n flushStream = function (stream, type, forceFlush) {\n var packetData = new Uint8Array(stream.size),\n event = {\n type: type\n },\n i = 0,\n offset = 0,\n packetFlushable = false,\n fragment; // do nothing if there is not enough buffered data for a complete\n // PES header\n\n if (!stream.data.length || stream.size < 9) {\n return;\n }\n event.trackId = stream.data[0].pid; // reassemble the packet\n\n for (i = 0; i < stream.data.length; i++) {\n fragment = stream.data[i];\n packetData.set(fragment.data, offset);\n offset += fragment.data.byteLength;\n } // parse assembled packet's PES header\n\n parsePes(packetData, event); // non-video PES packets MUST have a non-zero PES_packet_length\n // check that there is enough stream data to fill the packet\n\n packetFlushable = type === 'video' || event.packetLength <= stream.size; // flush pending packets if the conditions are right\n\n if (forceFlush || packetFlushable) {\n stream.size = 0;\n stream.data.length = 0;\n } // only emit packets that are complete. this is to avoid assembling\n // incomplete PES packets due to poor segmentation\n\n if (packetFlushable) {\n self.trigger('data', event);\n }\n };\n ElementaryStream.prototype.init.call(this);\n /**\n * Identifies M2TS packet types and parses PES packets using metadata\n * parsed from the PMT\n **/\n\n this.push = function (data) {\n ({\n pat: function () {// we have to wait for the PMT to arrive as well before we\n // have any meaningful metadata\n },\n pes: function () {\n var stream, streamType;\n switch (data.streamType) {\n case StreamTypes$2.H264_STREAM_TYPE:\n stream = video;\n streamType = 'video';\n break;\n case StreamTypes$2.ADTS_STREAM_TYPE:\n stream = audio;\n streamType = 'audio';\n break;\n case StreamTypes$2.METADATA_STREAM_TYPE:\n stream = timedMetadata;\n streamType = 'timed-metadata';\n break;\n default:\n // ignore unknown stream types\n return;\n } // if a new packet is starting, we can flush the completed\n // packet\n\n if (data.payloadUnitStartIndicator) {\n flushStream(stream, streamType, true);\n } // buffer this fragment until we are sure we've received the\n // complete payload\n\n stream.data.push(data);\n stream.size += data.data.byteLength;\n },\n pmt: function () {\n var event = {\n type: 'metadata',\n tracks: []\n };\n programMapTable = data.programMapTable; // translate audio and video streams to tracks\n\n if (programMapTable.video !== null) {\n event.tracks.push({\n timelineStartInfo: {\n baseMediaDecodeTime: 0\n },\n id: +programMapTable.video,\n codec: 'avc',\n type: 'video'\n });\n }\n if (programMapTable.audio !== null) {\n event.tracks.push({\n timelineStartInfo: {\n baseMediaDecodeTime: 0\n },\n id: +programMapTable.audio,\n codec: 'adts',\n type: 'audio'\n });\n }\n segmentHadPmt = true;\n self.trigger('data', event);\n }\n })[data.type]();\n };\n this.reset = function () {\n video.size = 0;\n video.data.length = 0;\n audio.size = 0;\n audio.data.length = 0;\n this.trigger('reset');\n };\n /**\n * Flush any remaining input. Video PES packets may be of variable\n * length. Normally, the start of a new video packet can trigger the\n * finalization of the previous packet. That is not possible if no\n * more video is forthcoming, however. In that case, some other\n * mechanism (like the end of the file) has to be employed. When it is\n * clear that no additional data is forthcoming, calling this method\n * will flush the buffered packets.\n */\n\n this.flushStreams_ = function () {\n // !!THIS ORDER IS IMPORTANT!!\n // video first then audio\n flushStream(video, 'video');\n flushStream(audio, 'audio');\n flushStream(timedMetadata, 'timed-metadata');\n };\n this.flush = function () {\n // if on flush we haven't had a pmt emitted\n // and we have a pmt to emit. emit the pmt\n // so that we trigger a trackinfo downstream.\n if (!segmentHadPmt && programMapTable) {\n var pmt = {\n type: 'metadata',\n tracks: []\n }; // translate audio and video streams to tracks\n\n if (programMapTable.video !== null) {\n pmt.tracks.push({\n timelineStartInfo: {\n baseMediaDecodeTime: 0\n },\n id: +programMapTable.video,\n codec: 'avc',\n type: 'video'\n });\n }\n if (programMapTable.audio !== null) {\n pmt.tracks.push({\n timelineStartInfo: {\n baseMediaDecodeTime: 0\n },\n id: +programMapTable.audio,\n codec: 'adts',\n type: 'audio'\n });\n }\n self.trigger('data', pmt);\n }\n segmentHadPmt = false;\n this.flushStreams_();\n this.trigger('done');\n };\n };\n ElementaryStream.prototype = new Stream$4();\n var m2ts$1 = {\n PAT_PID: 0x0000,\n MP2T_PACKET_LENGTH: MP2T_PACKET_LENGTH$1,\n TransportPacketStream: TransportPacketStream,\n TransportParseStream: TransportParseStream,\n ElementaryStream: ElementaryStream,\n TimestampRolloverStream: TimestampRolloverStream,\n CaptionStream: CaptionStream$1.CaptionStream,\n Cea608Stream: CaptionStream$1.Cea608Stream,\n Cea708Stream: CaptionStream$1.Cea708Stream,\n MetadataStream: metadataStream\n };\n for (var type in StreamTypes$2) {\n if (StreamTypes$2.hasOwnProperty(type)) {\n m2ts$1[type] = StreamTypes$2[type];\n }\n }\n var m2ts_1 = m2ts$1;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var Stream$3 = stream;\n var ONE_SECOND_IN_TS$2 = clock$2.ONE_SECOND_IN_TS;\n var AdtsStream$1;\n var ADTS_SAMPLING_FREQUENCIES$1 = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\n /*\n * Accepts a ElementaryStream and emits data events with parsed\n * AAC Audio Frames of the individual packets. Input audio in ADTS\n * format is unpacked and re-emitted as AAC frames.\n *\n * @see http://wiki.multimedia.cx/index.php?title=ADTS\n * @see http://wiki.multimedia.cx/?title=Understanding_AAC\n */\n\n AdtsStream$1 = function (handlePartialSegments) {\n var buffer,\n frameNum = 0;\n AdtsStream$1.prototype.init.call(this);\n this.skipWarn_ = function (start, end) {\n this.trigger('log', {\n level: 'warn',\n message: `adts skiping bytes ${start} to ${end} in frame ${frameNum} outside syncword`\n });\n };\n this.push = function (packet) {\n var i = 0,\n frameLength,\n protectionSkipBytes,\n oldBuffer,\n sampleCount,\n adtsFrameDuration;\n if (!handlePartialSegments) {\n frameNum = 0;\n }\n if (packet.type !== 'audio') {\n // ignore non-audio data\n return;\n } // Prepend any data in the buffer to the input data so that we can parse\n // aac frames the cross a PES packet boundary\n\n if (buffer && buffer.length) {\n oldBuffer = buffer;\n buffer = new Uint8Array(oldBuffer.byteLength + packet.data.byteLength);\n buffer.set(oldBuffer);\n buffer.set(packet.data, oldBuffer.byteLength);\n } else {\n buffer = packet.data;\n } // unpack any ADTS frames which have been fully received\n // for details on the ADTS header, see http://wiki.multimedia.cx/index.php?title=ADTS\n\n var skip; // We use i + 7 here because we want to be able to parse the entire header.\n // If we don't have enough bytes to do that, then we definitely won't have a full frame.\n\n while (i + 7 < buffer.length) {\n // Look for the start of an ADTS header..\n if (buffer[i] !== 0xFF || (buffer[i + 1] & 0xF6) !== 0xF0) {\n if (typeof skip !== 'number') {\n skip = i;\n } // If a valid header was not found, jump one forward and attempt to\n // find a valid ADTS header starting at the next byte\n\n i++;\n continue;\n }\n if (typeof skip === 'number') {\n this.skipWarn_(skip, i);\n skip = null;\n } // The protection skip bit tells us if we have 2 bytes of CRC data at the\n // end of the ADTS header\n\n protectionSkipBytes = (~buffer[i + 1] & 0x01) * 2; // Frame length is a 13 bit integer starting 16 bits from the\n // end of the sync sequence\n // NOTE: frame length includes the size of the header\n\n frameLength = (buffer[i + 3] & 0x03) << 11 | buffer[i + 4] << 3 | (buffer[i + 5] & 0xe0) >> 5;\n sampleCount = ((buffer[i + 6] & 0x03) + 1) * 1024;\n adtsFrameDuration = sampleCount * ONE_SECOND_IN_TS$2 / ADTS_SAMPLING_FREQUENCIES$1[(buffer[i + 2] & 0x3c) >>> 2]; // If we don't have enough data to actually finish this ADTS frame,\n // then we have to wait for more data\n\n if (buffer.byteLength - i < frameLength) {\n break;\n } // Otherwise, deliver the complete AAC frame\n\n this.trigger('data', {\n pts: packet.pts + frameNum * adtsFrameDuration,\n dts: packet.dts + frameNum * adtsFrameDuration,\n sampleCount: sampleCount,\n audioobjecttype: (buffer[i + 2] >>> 6 & 0x03) + 1,\n channelcount: (buffer[i + 2] & 1) << 2 | (buffer[i + 3] & 0xc0) >>> 6,\n samplerate: ADTS_SAMPLING_FREQUENCIES$1[(buffer[i + 2] & 0x3c) >>> 2],\n samplingfrequencyindex: (buffer[i + 2] & 0x3c) >>> 2,\n // assume ISO/IEC 14496-12 AudioSampleEntry default of 16\n samplesize: 16,\n // data is the frame without it's header\n data: buffer.subarray(i + 7 + protectionSkipBytes, i + frameLength)\n });\n frameNum++;\n i += frameLength;\n }\n if (typeof skip === 'number') {\n this.skipWarn_(skip, i);\n skip = null;\n } // remove processed bytes from the buffer.\n\n buffer = buffer.subarray(i);\n };\n this.flush = function () {\n frameNum = 0;\n this.trigger('done');\n };\n this.reset = function () {\n buffer = void 0;\n this.trigger('reset');\n };\n this.endTimeline = function () {\n buffer = void 0;\n this.trigger('endedtimeline');\n };\n };\n AdtsStream$1.prototype = new Stream$3();\n var adts = AdtsStream$1;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var ExpGolomb$1;\n /**\n * Parser for exponential Golomb codes, a variable-bitwidth number encoding\n * scheme used by h264.\n */\n\n ExpGolomb$1 = function (workingData) {\n var\n // the number of bytes left to examine in workingData\n workingBytesAvailable = workingData.byteLength,\n // the current word being examined\n workingWord = 0,\n // :uint\n // the number of bits left to examine in the current word\n workingBitsAvailable = 0; // :uint;\n // ():uint\n\n this.length = function () {\n return 8 * workingBytesAvailable;\n }; // ():uint\n\n this.bitsAvailable = function () {\n return 8 * workingBytesAvailable + workingBitsAvailable;\n }; // ():void\n\n this.loadWord = function () {\n var position = workingData.byteLength - workingBytesAvailable,\n workingBytes = new Uint8Array(4),\n availableBytes = Math.min(4, workingBytesAvailable);\n if (availableBytes === 0) {\n throw new Error('no bytes available');\n }\n workingBytes.set(workingData.subarray(position, position + availableBytes));\n workingWord = new DataView(workingBytes.buffer).getUint32(0); // track the amount of workingData that has been processed\n\n workingBitsAvailable = availableBytes * 8;\n workingBytesAvailable -= availableBytes;\n }; // (count:int):void\n\n this.skipBits = function (count) {\n var skipBytes; // :int\n\n if (workingBitsAvailable > count) {\n workingWord <<= count;\n workingBitsAvailable -= count;\n } else {\n count -= workingBitsAvailable;\n skipBytes = Math.floor(count / 8);\n count -= skipBytes * 8;\n workingBytesAvailable -= skipBytes;\n this.loadWord();\n workingWord <<= count;\n workingBitsAvailable -= count;\n }\n }; // (size:int):uint\n\n this.readBits = function (size) {\n var bits = Math.min(workingBitsAvailable, size),\n // :uint\n valu = workingWord >>> 32 - bits; // :uint\n // if size > 31, handle error\n\n workingBitsAvailable -= bits;\n if (workingBitsAvailable > 0) {\n workingWord <<= bits;\n } else if (workingBytesAvailable > 0) {\n this.loadWord();\n }\n bits = size - bits;\n if (bits > 0) {\n return valu << bits | this.readBits(bits);\n }\n return valu;\n }; // ():uint\n\n this.skipLeadingZeros = function () {\n var leadingZeroCount; // :uint\n\n for (leadingZeroCount = 0; leadingZeroCount < workingBitsAvailable; ++leadingZeroCount) {\n if ((workingWord & 0x80000000 >>> leadingZeroCount) !== 0) {\n // the first bit of working word is 1\n workingWord <<= leadingZeroCount;\n workingBitsAvailable -= leadingZeroCount;\n return leadingZeroCount;\n }\n } // we exhausted workingWord and still have not found a 1\n\n this.loadWord();\n return leadingZeroCount + this.skipLeadingZeros();\n }; // ():void\n\n this.skipUnsignedExpGolomb = function () {\n this.skipBits(1 + this.skipLeadingZeros());\n }; // ():void\n\n this.skipExpGolomb = function () {\n this.skipBits(1 + this.skipLeadingZeros());\n }; // ():uint\n\n this.readUnsignedExpGolomb = function () {\n var clz = this.skipLeadingZeros(); // :uint\n\n return this.readBits(clz + 1) - 1;\n }; // ():int\n\n this.readExpGolomb = function () {\n var valu = this.readUnsignedExpGolomb(); // :int\n\n if (0x01 & valu) {\n // the number is odd if the low order bit is set\n return 1 + valu >>> 1; // add 1 to make it even, and divide by 2\n }\n\n return -1 * (valu >>> 1); // divide by two then make it negative\n }; // Some convenience functions\n // :Boolean\n\n this.readBoolean = function () {\n return this.readBits(1) === 1;\n }; // ():int\n\n this.readUnsignedByte = function () {\n return this.readBits(8);\n };\n this.loadWord();\n };\n var expGolomb = ExpGolomb$1;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var Stream$2 = stream;\n var ExpGolomb = expGolomb;\n var H264Stream$1, NalByteStream;\n var PROFILES_WITH_OPTIONAL_SPS_DATA;\n /**\n * Accepts a NAL unit byte stream and unpacks the embedded NAL units.\n */\n\n NalByteStream = function () {\n var syncPoint = 0,\n i,\n buffer;\n NalByteStream.prototype.init.call(this);\n /*\n * Scans a byte stream and triggers a data event with the NAL units found.\n * @param {Object} data Event received from H264Stream\n * @param {Uint8Array} data.data The h264 byte stream to be scanned\n *\n * @see H264Stream.push\n */\n\n this.push = function (data) {\n var swapBuffer;\n if (!buffer) {\n buffer = data.data;\n } else {\n swapBuffer = new Uint8Array(buffer.byteLength + data.data.byteLength);\n swapBuffer.set(buffer);\n swapBuffer.set(data.data, buffer.byteLength);\n buffer = swapBuffer;\n }\n var len = buffer.byteLength; // Rec. ITU-T H.264, Annex B\n // scan for NAL unit boundaries\n // a match looks like this:\n // 0 0 1 .. NAL .. 0 0 1\n // ^ sync point ^ i\n // or this:\n // 0 0 1 .. NAL .. 0 0 0\n // ^ sync point ^ i\n // advance the sync point to a NAL start, if necessary\n\n for (; syncPoint < len - 3; syncPoint++) {\n if (buffer[syncPoint + 2] === 1) {\n // the sync point is properly aligned\n i = syncPoint + 5;\n break;\n }\n }\n while (i < len) {\n // look at the current byte to determine if we've hit the end of\n // a NAL unit boundary\n switch (buffer[i]) {\n case 0:\n // skip past non-sync sequences\n if (buffer[i - 1] !== 0) {\n i += 2;\n break;\n } else if (buffer[i - 2] !== 0) {\n i++;\n break;\n } // deliver the NAL unit if it isn't empty\n\n if (syncPoint + 3 !== i - 2) {\n this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\n } // drop trailing zeroes\n\n do {\n i++;\n } while (buffer[i] !== 1 && i < len);\n syncPoint = i - 2;\n i += 3;\n break;\n case 1:\n // skip past non-sync sequences\n if (buffer[i - 1] !== 0 || buffer[i - 2] !== 0) {\n i += 3;\n break;\n } // deliver the NAL unit\n\n this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\n syncPoint = i - 2;\n i += 3;\n break;\n default:\n // the current byte isn't a one or zero, so it cannot be part\n // of a sync sequence\n i += 3;\n break;\n }\n } // filter out the NAL units that were delivered\n\n buffer = buffer.subarray(syncPoint);\n i -= syncPoint;\n syncPoint = 0;\n };\n this.reset = function () {\n buffer = null;\n syncPoint = 0;\n this.trigger('reset');\n };\n this.flush = function () {\n // deliver the last buffered NAL unit\n if (buffer && buffer.byteLength > 3) {\n this.trigger('data', buffer.subarray(syncPoint + 3));\n } // reset the stream state\n\n buffer = null;\n syncPoint = 0;\n this.trigger('done');\n };\n this.endTimeline = function () {\n this.flush();\n this.trigger('endedtimeline');\n };\n };\n NalByteStream.prototype = new Stream$2(); // values of profile_idc that indicate additional fields are included in the SPS\n // see Recommendation ITU-T H.264 (4/2013),\n // 7.3.2.1.1 Sequence parameter set data syntax\n\n PROFILES_WITH_OPTIONAL_SPS_DATA = {\n 100: true,\n 110: true,\n 122: true,\n 244: true,\n 44: true,\n 83: true,\n 86: true,\n 118: true,\n 128: true,\n // TODO: the three profiles below don't\n // appear to have sps data in the specificiation anymore?\n 138: true,\n 139: true,\n 134: true\n };\n /**\n * Accepts input from a ElementaryStream and produces H.264 NAL unit data\n * events.\n */\n\n H264Stream$1 = function () {\n var nalByteStream = new NalByteStream(),\n self,\n trackId,\n currentPts,\n currentDts,\n discardEmulationPreventionBytes,\n readSequenceParameterSet,\n skipScalingList;\n H264Stream$1.prototype.init.call(this);\n self = this;\n /*\n * Pushes a packet from a stream onto the NalByteStream\n *\n * @param {Object} packet - A packet received from a stream\n * @param {Uint8Array} packet.data - The raw bytes of the packet\n * @param {Number} packet.dts - Decode timestamp of the packet\n * @param {Number} packet.pts - Presentation timestamp of the packet\n * @param {Number} packet.trackId - The id of the h264 track this packet came from\n * @param {('video'|'audio')} packet.type - The type of packet\n *\n */\n\n this.push = function (packet) {\n if (packet.type !== 'video') {\n return;\n }\n trackId = packet.trackId;\n currentPts = packet.pts;\n currentDts = packet.dts;\n nalByteStream.push(packet);\n };\n /*\n * Identify NAL unit types and pass on the NALU, trackId, presentation and decode timestamps\n * for the NALUs to the next stream component.\n * Also, preprocess caption and sequence parameter NALUs.\n *\n * @param {Uint8Array} data - A NAL unit identified by `NalByteStream.push`\n * @see NalByteStream.push\n */\n\n nalByteStream.on('data', function (data) {\n var event = {\n trackId: trackId,\n pts: currentPts,\n dts: currentDts,\n data: data,\n nalUnitTypeCode: data[0] & 0x1f\n };\n switch (event.nalUnitTypeCode) {\n case 0x05:\n event.nalUnitType = 'slice_layer_without_partitioning_rbsp_idr';\n break;\n case 0x06:\n event.nalUnitType = 'sei_rbsp';\n event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\n break;\n case 0x07:\n event.nalUnitType = 'seq_parameter_set_rbsp';\n event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\n event.config = readSequenceParameterSet(event.escapedRBSP);\n break;\n case 0x08:\n event.nalUnitType = 'pic_parameter_set_rbsp';\n break;\n case 0x09:\n event.nalUnitType = 'access_unit_delimiter_rbsp';\n break;\n } // This triggers data on the H264Stream\n\n self.trigger('data', event);\n });\n nalByteStream.on('done', function () {\n self.trigger('done');\n });\n nalByteStream.on('partialdone', function () {\n self.trigger('partialdone');\n });\n nalByteStream.on('reset', function () {\n self.trigger('reset');\n });\n nalByteStream.on('endedtimeline', function () {\n self.trigger('endedtimeline');\n });\n this.flush = function () {\n nalByteStream.flush();\n };\n this.partialFlush = function () {\n nalByteStream.partialFlush();\n };\n this.reset = function () {\n nalByteStream.reset();\n };\n this.endTimeline = function () {\n nalByteStream.endTimeline();\n };\n /**\n * Advance the ExpGolomb decoder past a scaling list. The scaling\n * list is optionally transmitted as part of a sequence parameter\n * set and is not relevant to transmuxing.\n * @param count {number} the number of entries in this scaling list\n * @param expGolombDecoder {object} an ExpGolomb pointed to the\n * start of a scaling list\n * @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1\n */\n\n skipScalingList = function (count, expGolombDecoder) {\n var lastScale = 8,\n nextScale = 8,\n j,\n deltaScale;\n for (j = 0; j < count; j++) {\n if (nextScale !== 0) {\n deltaScale = expGolombDecoder.readExpGolomb();\n nextScale = (lastScale + deltaScale + 256) % 256;\n }\n lastScale = nextScale === 0 ? lastScale : nextScale;\n }\n };\n /**\n * Expunge any \"Emulation Prevention\" bytes from a \"Raw Byte\n * Sequence Payload\"\n * @param data {Uint8Array} the bytes of a RBSP from a NAL\n * unit\n * @return {Uint8Array} the RBSP without any Emulation\n * Prevention Bytes\n */\n\n discardEmulationPreventionBytes = function (data) {\n var length = data.byteLength,\n emulationPreventionBytesPositions = [],\n i = 1,\n newLength,\n newData; // Find all `Emulation Prevention Bytes`\n\n while (i < length - 2) {\n if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\n emulationPreventionBytesPositions.push(i + 2);\n i += 2;\n } else {\n i++;\n }\n } // If no Emulation Prevention Bytes were found just return the original\n // array\n\n if (emulationPreventionBytesPositions.length === 0) {\n return data;\n } // Create a new array to hold the NAL unit data\n\n newLength = length - emulationPreventionBytesPositions.length;\n newData = new Uint8Array(newLength);\n var sourceIndex = 0;\n for (i = 0; i < newLength; sourceIndex++, i++) {\n if (sourceIndex === emulationPreventionBytesPositions[0]) {\n // Skip this byte\n sourceIndex++; // Remove this position index\n\n emulationPreventionBytesPositions.shift();\n }\n newData[i] = data[sourceIndex];\n }\n return newData;\n };\n /**\n * Read a sequence parameter set and return some interesting video\n * properties. A sequence parameter set is the H264 metadata that\n * describes the properties of upcoming video frames.\n * @param data {Uint8Array} the bytes of a sequence parameter set\n * @return {object} an object with configuration parsed from the\n * sequence parameter set, including the dimensions of the\n * associated video frames.\n */\n\n readSequenceParameterSet = function (data) {\n var frameCropLeftOffset = 0,\n frameCropRightOffset = 0,\n frameCropTopOffset = 0,\n frameCropBottomOffset = 0,\n expGolombDecoder,\n profileIdc,\n levelIdc,\n profileCompatibility,\n chromaFormatIdc,\n picOrderCntType,\n numRefFramesInPicOrderCntCycle,\n picWidthInMbsMinus1,\n picHeightInMapUnitsMinus1,\n frameMbsOnlyFlag,\n scalingListCount,\n sarRatio = [1, 1],\n aspectRatioIdc,\n i;\n expGolombDecoder = new ExpGolomb(data);\n profileIdc = expGolombDecoder.readUnsignedByte(); // profile_idc\n\n profileCompatibility = expGolombDecoder.readUnsignedByte(); // constraint_set[0-5]_flag\n\n levelIdc = expGolombDecoder.readUnsignedByte(); // level_idc u(8)\n\n expGolombDecoder.skipUnsignedExpGolomb(); // seq_parameter_set_id\n // some profiles have more optional data we don't need\n\n if (PROFILES_WITH_OPTIONAL_SPS_DATA[profileIdc]) {\n chromaFormatIdc = expGolombDecoder.readUnsignedExpGolomb();\n if (chromaFormatIdc === 3) {\n expGolombDecoder.skipBits(1); // separate_colour_plane_flag\n }\n\n expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_luma_minus8\n\n expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_chroma_minus8\n\n expGolombDecoder.skipBits(1); // qpprime_y_zero_transform_bypass_flag\n\n if (expGolombDecoder.readBoolean()) {\n // seq_scaling_matrix_present_flag\n scalingListCount = chromaFormatIdc !== 3 ? 8 : 12;\n for (i = 0; i < scalingListCount; i++) {\n if (expGolombDecoder.readBoolean()) {\n // seq_scaling_list_present_flag[ i ]\n if (i < 6) {\n skipScalingList(16, expGolombDecoder);\n } else {\n skipScalingList(64, expGolombDecoder);\n }\n }\n }\n }\n }\n expGolombDecoder.skipUnsignedExpGolomb(); // log2_max_frame_num_minus4\n\n picOrderCntType = expGolombDecoder.readUnsignedExpGolomb();\n if (picOrderCntType === 0) {\n expGolombDecoder.readUnsignedExpGolomb(); // log2_max_pic_order_cnt_lsb_minus4\n } else if (picOrderCntType === 1) {\n expGolombDecoder.skipBits(1); // delta_pic_order_always_zero_flag\n\n expGolombDecoder.skipExpGolomb(); // offset_for_non_ref_pic\n\n expGolombDecoder.skipExpGolomb(); // offset_for_top_to_bottom_field\n\n numRefFramesInPicOrderCntCycle = expGolombDecoder.readUnsignedExpGolomb();\n for (i = 0; i < numRefFramesInPicOrderCntCycle; i++) {\n expGolombDecoder.skipExpGolomb(); // offset_for_ref_frame[ i ]\n }\n }\n\n expGolombDecoder.skipUnsignedExpGolomb(); // max_num_ref_frames\n\n expGolombDecoder.skipBits(1); // gaps_in_frame_num_value_allowed_flag\n\n picWidthInMbsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\n picHeightInMapUnitsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\n frameMbsOnlyFlag = expGolombDecoder.readBits(1);\n if (frameMbsOnlyFlag === 0) {\n expGolombDecoder.skipBits(1); // mb_adaptive_frame_field_flag\n }\n\n expGolombDecoder.skipBits(1); // direct_8x8_inference_flag\n\n if (expGolombDecoder.readBoolean()) {\n // frame_cropping_flag\n frameCropLeftOffset = expGolombDecoder.readUnsignedExpGolomb();\n frameCropRightOffset = expGolombDecoder.readUnsignedExpGolomb();\n frameCropTopOffset = expGolombDecoder.readUnsignedExpGolomb();\n frameCropBottomOffset = expGolombDecoder.readUnsignedExpGolomb();\n }\n if (expGolombDecoder.readBoolean()) {\n // vui_parameters_present_flag\n if (expGolombDecoder.readBoolean()) {\n // aspect_ratio_info_present_flag\n aspectRatioIdc = expGolombDecoder.readUnsignedByte();\n switch (aspectRatioIdc) {\n case 1:\n sarRatio = [1, 1];\n break;\n case 2:\n sarRatio = [12, 11];\n break;\n case 3:\n sarRatio = [10, 11];\n break;\n case 4:\n sarRatio = [16, 11];\n break;\n case 5:\n sarRatio = [40, 33];\n break;\n case 6:\n sarRatio = [24, 11];\n break;\n case 7:\n sarRatio = [20, 11];\n break;\n case 8:\n sarRatio = [32, 11];\n break;\n case 9:\n sarRatio = [80, 33];\n break;\n case 10:\n sarRatio = [18, 11];\n break;\n case 11:\n sarRatio = [15, 11];\n break;\n case 12:\n sarRatio = [64, 33];\n break;\n case 13:\n sarRatio = [160, 99];\n break;\n case 14:\n sarRatio = [4, 3];\n break;\n case 15:\n sarRatio = [3, 2];\n break;\n case 16:\n sarRatio = [2, 1];\n break;\n case 255:\n {\n sarRatio = [expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte(), expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte()];\n break;\n }\n }\n if (sarRatio) {\n sarRatio[0] / sarRatio[1];\n }\n }\n }\n return {\n profileIdc: profileIdc,\n levelIdc: levelIdc,\n profileCompatibility: profileCompatibility,\n width: (picWidthInMbsMinus1 + 1) * 16 - frameCropLeftOffset * 2 - frameCropRightOffset * 2,\n height: (2 - frameMbsOnlyFlag) * (picHeightInMapUnitsMinus1 + 1) * 16 - frameCropTopOffset * 2 - frameCropBottomOffset * 2,\n // sar is sample aspect ratio\n sarRatio: sarRatio\n };\n };\n };\n H264Stream$1.prototype = new Stream$2();\n var h264 = {\n H264Stream: H264Stream$1,\n NalByteStream: NalByteStream\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Utilities to detect basic properties and metadata about Aac data.\n */\n\n var ADTS_SAMPLING_FREQUENCIES = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\n var parseId3TagSize = function (header, byteIndex) {\n var returnSize = header[byteIndex + 6] << 21 | header[byteIndex + 7] << 14 | header[byteIndex + 8] << 7 | header[byteIndex + 9],\n flags = header[byteIndex + 5],\n footerPresent = (flags & 16) >> 4; // if we get a negative returnSize clamp it to 0\n\n returnSize = returnSize >= 0 ? returnSize : 0;\n if (footerPresent) {\n return returnSize + 20;\n }\n return returnSize + 10;\n };\n var getId3Offset = function (data, offset) {\n if (data.length - offset < 10 || data[offset] !== 'I'.charCodeAt(0) || data[offset + 1] !== 'D'.charCodeAt(0) || data[offset + 2] !== '3'.charCodeAt(0)) {\n return offset;\n }\n offset += parseId3TagSize(data, offset);\n return getId3Offset(data, offset);\n }; // TODO: use vhs-utils\n\n var isLikelyAacData$1 = function (data) {\n var offset = getId3Offset(data, 0);\n return data.length >= offset + 2 && (data[offset] & 0xFF) === 0xFF && (data[offset + 1] & 0xF0) === 0xF0 &&\n // verify that the 2 layer bits are 0, aka this\n // is not mp3 data but aac data.\n (data[offset + 1] & 0x16) === 0x10;\n };\n var parseSyncSafeInteger = function (data) {\n return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3];\n }; // return a percent-encoded representation of the specified byte range\n // @see http://en.wikipedia.org/wiki/Percent-encoding\n\n var percentEncode = function (bytes, start, end) {\n var i,\n result = '';\n for (i = start; i < end; i++) {\n result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\n }\n return result;\n }; // return the string representation of the specified byte range,\n // interpreted as ISO-8859-1.\n\n var parseIso88591 = function (bytes, start, end) {\n return unescape(percentEncode(bytes, start, end)); // jshint ignore:line\n };\n\n var parseAdtsSize = function (header, byteIndex) {\n var lowThree = (header[byteIndex + 5] & 0xE0) >> 5,\n middle = header[byteIndex + 4] << 3,\n highTwo = header[byteIndex + 3] & 0x3 << 11;\n return highTwo | middle | lowThree;\n };\n var parseType$4 = function (header, byteIndex) {\n if (header[byteIndex] === 'I'.charCodeAt(0) && header[byteIndex + 1] === 'D'.charCodeAt(0) && header[byteIndex + 2] === '3'.charCodeAt(0)) {\n return 'timed-metadata';\n } else if (header[byteIndex] & 0xff === 0xff && (header[byteIndex + 1] & 0xf0) === 0xf0) {\n return 'audio';\n }\n return null;\n };\n var parseSampleRate = function (packet) {\n var i = 0;\n while (i + 5 < packet.length) {\n if (packet[i] !== 0xFF || (packet[i + 1] & 0xF6) !== 0xF0) {\n // If a valid header was not found, jump one forward and attempt to\n // find a valid ADTS header starting at the next byte\n i++;\n continue;\n }\n return ADTS_SAMPLING_FREQUENCIES[(packet[i + 2] & 0x3c) >>> 2];\n }\n return null;\n };\n var parseAacTimestamp = function (packet) {\n var frameStart, frameSize, frame, frameHeader; // find the start of the first frame and the end of the tag\n\n frameStart = 10;\n if (packet[5] & 0x40) {\n // advance the frame start past the extended header\n frameStart += 4; // header size field\n\n frameStart += parseSyncSafeInteger(packet.subarray(10, 14));\n } // parse one or more ID3 frames\n // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n\n do {\n // determine the number of bytes in this frame\n frameSize = parseSyncSafeInteger(packet.subarray(frameStart + 4, frameStart + 8));\n if (frameSize < 1) {\n return null;\n }\n frameHeader = String.fromCharCode(packet[frameStart], packet[frameStart + 1], packet[frameStart + 2], packet[frameStart + 3]);\n if (frameHeader === 'PRIV') {\n frame = packet.subarray(frameStart + 10, frameStart + frameSize + 10);\n for (var i = 0; i < frame.byteLength; i++) {\n if (frame[i] === 0) {\n var owner = parseIso88591(frame, 0, i);\n if (owner === 'com.apple.streaming.transportStreamTimestamp') {\n var d = frame.subarray(i + 1);\n var size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;\n size *= 4;\n size += d[7] & 0x03;\n return size;\n }\n break;\n }\n }\n }\n frameStart += 10; // advance past the frame header\n\n frameStart += frameSize; // advance past the frame body\n } while (frameStart < packet.byteLength);\n return null;\n };\n var utils = {\n isLikelyAacData: isLikelyAacData$1,\n parseId3TagSize: parseId3TagSize,\n parseAdtsSize: parseAdtsSize,\n parseType: parseType$4,\n parseSampleRate: parseSampleRate,\n parseAacTimestamp: parseAacTimestamp\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * A stream-based aac to mp4 converter. This utility can be used to\n * deliver mp4s to a SourceBuffer on platforms that support native\n * Media Source Extensions.\n */\n\n var Stream$1 = stream;\n var aacUtils = utils; // Constants\n\n var AacStream$1;\n /**\n * Splits an incoming stream of binary data into ADTS and ID3 Frames.\n */\n\n AacStream$1 = function () {\n var everything = new Uint8Array(),\n timeStamp = 0;\n AacStream$1.prototype.init.call(this);\n this.setTimestamp = function (timestamp) {\n timeStamp = timestamp;\n };\n this.push = function (bytes) {\n var frameSize = 0,\n byteIndex = 0,\n bytesLeft,\n chunk,\n packet,\n tempLength; // If there are bytes remaining from the last segment, prepend them to the\n // bytes that were pushed in\n\n if (everything.length) {\n tempLength = everything.length;\n everything = new Uint8Array(bytes.byteLength + tempLength);\n everything.set(everything.subarray(0, tempLength));\n everything.set(bytes, tempLength);\n } else {\n everything = bytes;\n }\n while (everything.length - byteIndex >= 3) {\n if (everything[byteIndex] === 'I'.charCodeAt(0) && everything[byteIndex + 1] === 'D'.charCodeAt(0) && everything[byteIndex + 2] === '3'.charCodeAt(0)) {\n // Exit early because we don't have enough to parse\n // the ID3 tag header\n if (everything.length - byteIndex < 10) {\n break;\n } // check framesize\n\n frameSize = aacUtils.parseId3TagSize(everything, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n // Add to byteIndex to support multiple ID3 tags in sequence\n\n if (byteIndex + frameSize > everything.length) {\n break;\n }\n chunk = {\n type: 'timed-metadata',\n data: everything.subarray(byteIndex, byteIndex + frameSize)\n };\n this.trigger('data', chunk);\n byteIndex += frameSize;\n continue;\n } else if ((everything[byteIndex] & 0xff) === 0xff && (everything[byteIndex + 1] & 0xf0) === 0xf0) {\n // Exit early because we don't have enough to parse\n // the ADTS frame header\n if (everything.length - byteIndex < 7) {\n break;\n }\n frameSize = aacUtils.parseAdtsSize(everything, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n\n if (byteIndex + frameSize > everything.length) {\n break;\n }\n packet = {\n type: 'audio',\n data: everything.subarray(byteIndex, byteIndex + frameSize),\n pts: timeStamp,\n dts: timeStamp\n };\n this.trigger('data', packet);\n byteIndex += frameSize;\n continue;\n }\n byteIndex++;\n }\n bytesLeft = everything.length - byteIndex;\n if (bytesLeft > 0) {\n everything = everything.subarray(byteIndex);\n } else {\n everything = new Uint8Array();\n }\n };\n this.reset = function () {\n everything = new Uint8Array();\n this.trigger('reset');\n };\n this.endTimeline = function () {\n everything = new Uint8Array();\n this.trigger('endedtimeline');\n };\n };\n AacStream$1.prototype = new Stream$1();\n var aac = AacStream$1;\n var AUDIO_PROPERTIES$1 = ['audioobjecttype', 'channelcount', 'samplerate', 'samplingfrequencyindex', 'samplesize'];\n var audioProperties = AUDIO_PROPERTIES$1;\n var VIDEO_PROPERTIES$1 = ['width', 'height', 'profileIdc', 'levelIdc', 'profileCompatibility', 'sarRatio'];\n var videoProperties = VIDEO_PROPERTIES$1;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * A stream-based mp2t to mp4 converter. This utility can be used to\n * deliver mp4s to a SourceBuffer on platforms that support native\n * Media Source Extensions.\n */\n\n var Stream = stream;\n var mp4 = mp4Generator;\n var frameUtils = frameUtils$1;\n var audioFrameUtils = audioFrameUtils$1;\n var trackDecodeInfo = trackDecodeInfo$1;\n var m2ts = m2ts_1;\n var clock = clock$2;\n var AdtsStream = adts;\n var H264Stream = h264.H264Stream;\n var AacStream = aac;\n var isLikelyAacData = utils.isLikelyAacData;\n var ONE_SECOND_IN_TS$1 = clock$2.ONE_SECOND_IN_TS;\n var AUDIO_PROPERTIES = audioProperties;\n var VIDEO_PROPERTIES = videoProperties; // object types\n\n var VideoSegmentStream, AudioSegmentStream, Transmuxer, CoalesceStream;\n var retriggerForStream = function (key, event) {\n event.stream = key;\n this.trigger('log', event);\n };\n var addPipelineLogRetriggers = function (transmuxer, pipeline) {\n var keys = Object.keys(pipeline);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i]; // skip non-stream keys and headOfPipeline\n // which is just a duplicate\n\n if (key === 'headOfPipeline' || !pipeline[key].on) {\n continue;\n }\n pipeline[key].on('log', retriggerForStream.bind(transmuxer, key));\n }\n };\n /**\n * Compare two arrays (even typed) for same-ness\n */\n\n var arrayEquals = function (a, b) {\n var i;\n if (a.length !== b.length) {\n return false;\n } // compare the value of each element in the array\n\n for (i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n };\n var generateSegmentTimingInfo = function (baseMediaDecodeTime, startDts, startPts, endDts, endPts, prependedContentDuration) {\n var ptsOffsetFromDts = startPts - startDts,\n decodeDuration = endDts - startDts,\n presentationDuration = endPts - startPts; // The PTS and DTS values are based on the actual stream times from the segment,\n // however, the player time values will reflect a start from the baseMediaDecodeTime.\n // In order to provide relevant values for the player times, base timing info on the\n // baseMediaDecodeTime and the DTS and PTS durations of the segment.\n\n return {\n start: {\n dts: baseMediaDecodeTime,\n pts: baseMediaDecodeTime + ptsOffsetFromDts\n },\n end: {\n dts: baseMediaDecodeTime + decodeDuration,\n pts: baseMediaDecodeTime + presentationDuration\n },\n prependedContentDuration: prependedContentDuration,\n baseMediaDecodeTime: baseMediaDecodeTime\n };\n };\n /**\n * Constructs a single-track, ISO BMFF media segment from AAC data\n * events. The output of this stream can be fed to a SourceBuffer\n * configured with a suitable initialization segment.\n * @param track {object} track metadata configuration\n * @param options {object} transmuxer options object\n * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n * in the source; false to adjust the first segment to start at 0.\n */\n\n AudioSegmentStream = function (track, options) {\n var adtsFrames = [],\n sequenceNumber,\n earliestAllowedDts = 0,\n audioAppendStartTs = 0,\n videoBaseMediaDecodeTime = Infinity;\n options = options || {};\n sequenceNumber = options.firstSequenceNumber || 0;\n AudioSegmentStream.prototype.init.call(this);\n this.push = function (data) {\n trackDecodeInfo.collectDtsInfo(track, data);\n if (track) {\n AUDIO_PROPERTIES.forEach(function (prop) {\n track[prop] = data[prop];\n });\n } // buffer audio data until end() is called\n\n adtsFrames.push(data);\n };\n this.setEarliestDts = function (earliestDts) {\n earliestAllowedDts = earliestDts;\n };\n this.setVideoBaseMediaDecodeTime = function (baseMediaDecodeTime) {\n videoBaseMediaDecodeTime = baseMediaDecodeTime;\n };\n this.setAudioAppendStart = function (timestamp) {\n audioAppendStartTs = timestamp;\n };\n this.flush = function () {\n var frames, moof, mdat, boxes, frameDuration, segmentDuration, videoClockCyclesOfSilencePrefixed; // return early if no audio data has been observed\n\n if (adtsFrames.length === 0) {\n this.trigger('done', 'AudioSegmentStream');\n return;\n }\n frames = audioFrameUtils.trimAdtsFramesByEarliestDts(adtsFrames, track, earliestAllowedDts);\n track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps); // amount of audio filled but the value is in video clock rather than audio clock\n\n videoClockCyclesOfSilencePrefixed = audioFrameUtils.prefixWithSilence(track, frames, audioAppendStartTs, videoBaseMediaDecodeTime); // we have to build the index from byte locations to\n // samples (that is, adts frames) in the audio data\n\n track.samples = audioFrameUtils.generateSampleTable(frames); // concatenate the audio data to constuct the mdat\n\n mdat = mp4.mdat(audioFrameUtils.concatenateFrameData(frames));\n adtsFrames = [];\n moof = mp4.moof(sequenceNumber, [track]);\n boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // bump the sequence number for next time\n\n sequenceNumber++;\n boxes.set(moof);\n boxes.set(mdat, moof.byteLength);\n trackDecodeInfo.clearDtsInfo(track);\n frameDuration = Math.ceil(ONE_SECOND_IN_TS$1 * 1024 / track.samplerate); // TODO this check was added to maintain backwards compatibility (particularly with\n // tests) on adding the timingInfo event. However, it seems unlikely that there's a\n // valid use-case where an init segment/data should be triggered without associated\n // frames. Leaving for now, but should be looked into.\n\n if (frames.length) {\n segmentDuration = frames.length * frameDuration;\n this.trigger('segmentTimingInfo', generateSegmentTimingInfo(\n // The audio track's baseMediaDecodeTime is in audio clock cycles, but the\n // frame info is in video clock cycles. Convert to match expectation of\n // listeners (that all timestamps will be based on video clock cycles).\n clock.audioTsToVideoTs(track.baseMediaDecodeTime, track.samplerate),\n // frame times are already in video clock, as is segment duration\n frames[0].dts, frames[0].pts, frames[0].dts + segmentDuration, frames[0].pts + segmentDuration, videoClockCyclesOfSilencePrefixed || 0));\n this.trigger('timingInfo', {\n start: frames[0].pts,\n end: frames[0].pts + segmentDuration\n });\n }\n this.trigger('data', {\n track: track,\n boxes: boxes\n });\n this.trigger('done', 'AudioSegmentStream');\n };\n this.reset = function () {\n trackDecodeInfo.clearDtsInfo(track);\n adtsFrames = [];\n this.trigger('reset');\n };\n };\n AudioSegmentStream.prototype = new Stream();\n /**\n * Constructs a single-track, ISO BMFF media segment from H264 data\n * events. The output of this stream can be fed to a SourceBuffer\n * configured with a suitable initialization segment.\n * @param track {object} track metadata configuration\n * @param options {object} transmuxer options object\n * @param options.alignGopsAtEnd {boolean} If true, start from the end of the\n * gopsToAlignWith list when attempting to align gop pts\n * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n * in the source; false to adjust the first segment to start at 0.\n */\n\n VideoSegmentStream = function (track, options) {\n var sequenceNumber,\n nalUnits = [],\n gopsToAlignWith = [],\n config,\n pps;\n options = options || {};\n sequenceNumber = options.firstSequenceNumber || 0;\n VideoSegmentStream.prototype.init.call(this);\n delete track.minPTS;\n this.gopCache_ = [];\n /**\n * Constructs a ISO BMFF segment given H264 nalUnits\n * @param {Object} nalUnit A data event representing a nalUnit\n * @param {String} nalUnit.nalUnitType\n * @param {Object} nalUnit.config Properties for a mp4 track\n * @param {Uint8Array} nalUnit.data The nalUnit bytes\n * @see lib/codecs/h264.js\n **/\n\n this.push = function (nalUnit) {\n trackDecodeInfo.collectDtsInfo(track, nalUnit); // record the track config\n\n if (nalUnit.nalUnitType === 'seq_parameter_set_rbsp' && !config) {\n config = nalUnit.config;\n track.sps = [nalUnit.data];\n VIDEO_PROPERTIES.forEach(function (prop) {\n track[prop] = config[prop];\n }, this);\n }\n if (nalUnit.nalUnitType === 'pic_parameter_set_rbsp' && !pps) {\n pps = nalUnit.data;\n track.pps = [nalUnit.data];\n } // buffer video until flush() is called\n\n nalUnits.push(nalUnit);\n };\n /**\n * Pass constructed ISO BMFF track and boxes on to the\n * next stream in the pipeline\n **/\n\n this.flush = function () {\n var frames,\n gopForFusion,\n gops,\n moof,\n mdat,\n boxes,\n prependedContentDuration = 0,\n firstGop,\n lastGop; // Throw away nalUnits at the start of the byte stream until\n // we find the first AUD\n\n while (nalUnits.length) {\n if (nalUnits[0].nalUnitType === 'access_unit_delimiter_rbsp') {\n break;\n }\n nalUnits.shift();\n } // Return early if no video data has been observed\n\n if (nalUnits.length === 0) {\n this.resetStream_();\n this.trigger('done', 'VideoSegmentStream');\n return;\n } // Organize the raw nal-units into arrays that represent\n // higher-level constructs such as frames and gops\n // (group-of-pictures)\n\n frames = frameUtils.groupNalsIntoFrames(nalUnits);\n gops = frameUtils.groupFramesIntoGops(frames); // If the first frame of this fragment is not a keyframe we have\n // a problem since MSE (on Chrome) requires a leading keyframe.\n //\n // We have two approaches to repairing this situation:\n // 1) GOP-FUSION:\n // This is where we keep track of the GOPS (group-of-pictures)\n // from previous fragments and attempt to find one that we can\n // prepend to the current fragment in order to create a valid\n // fragment.\n // 2) KEYFRAME-PULLING:\n // Here we search for the first keyframe in the fragment and\n // throw away all the frames between the start of the fragment\n // and that keyframe. We then extend the duration and pull the\n // PTS of the keyframe forward so that it covers the time range\n // of the frames that were disposed of.\n //\n // #1 is far prefereable over #2 which can cause \"stuttering\" but\n // requires more things to be just right.\n\n if (!gops[0][0].keyFrame) {\n // Search for a gop for fusion from our gopCache\n gopForFusion = this.getGopForFusion_(nalUnits[0], track);\n if (gopForFusion) {\n // in order to provide more accurate timing information about the segment, save\n // the number of seconds prepended to the original segment due to GOP fusion\n prependedContentDuration = gopForFusion.duration;\n gops.unshift(gopForFusion); // Adjust Gops' metadata to account for the inclusion of the\n // new gop at the beginning\n\n gops.byteLength += gopForFusion.byteLength;\n gops.nalCount += gopForFusion.nalCount;\n gops.pts = gopForFusion.pts;\n gops.dts = gopForFusion.dts;\n gops.duration += gopForFusion.duration;\n } else {\n // If we didn't find a candidate gop fall back to keyframe-pulling\n gops = frameUtils.extendFirstKeyFrame(gops);\n }\n } // Trim gops to align with gopsToAlignWith\n\n if (gopsToAlignWith.length) {\n var alignedGops;\n if (options.alignGopsAtEnd) {\n alignedGops = this.alignGopsAtEnd_(gops);\n } else {\n alignedGops = this.alignGopsAtStart_(gops);\n }\n if (!alignedGops) {\n // save all the nals in the last GOP into the gop cache\n this.gopCache_.unshift({\n gop: gops.pop(),\n pps: track.pps,\n sps: track.sps\n }); // Keep a maximum of 6 GOPs in the cache\n\n this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits\n\n nalUnits = []; // return early no gops can be aligned with desired gopsToAlignWith\n\n this.resetStream_();\n this.trigger('done', 'VideoSegmentStream');\n return;\n } // Some gops were trimmed. clear dts info so minSegmentDts and pts are correct\n // when recalculated before sending off to CoalesceStream\n\n trackDecodeInfo.clearDtsInfo(track);\n gops = alignedGops;\n }\n trackDecodeInfo.collectDtsInfo(track, gops); // First, we have to build the index from byte locations to\n // samples (that is, frames) in the video data\n\n track.samples = frameUtils.generateSampleTable(gops); // Concatenate the video data and construct the mdat\n\n mdat = mp4.mdat(frameUtils.concatenateNalData(gops));\n track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps);\n this.trigger('processedGopsInfo', gops.map(function (gop) {\n return {\n pts: gop.pts,\n dts: gop.dts,\n byteLength: gop.byteLength\n };\n }));\n firstGop = gops[0];\n lastGop = gops[gops.length - 1];\n this.trigger('segmentTimingInfo', generateSegmentTimingInfo(track.baseMediaDecodeTime, firstGop.dts, firstGop.pts, lastGop.dts + lastGop.duration, lastGop.pts + lastGop.duration, prependedContentDuration));\n this.trigger('timingInfo', {\n start: gops[0].pts,\n end: gops[gops.length - 1].pts + gops[gops.length - 1].duration\n }); // save all the nals in the last GOP into the gop cache\n\n this.gopCache_.unshift({\n gop: gops.pop(),\n pps: track.pps,\n sps: track.sps\n }); // Keep a maximum of 6 GOPs in the cache\n\n this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits\n\n nalUnits = [];\n this.trigger('baseMediaDecodeTime', track.baseMediaDecodeTime);\n this.trigger('timelineStartInfo', track.timelineStartInfo);\n moof = mp4.moof(sequenceNumber, [track]); // it would be great to allocate this array up front instead of\n // throwing away hundreds of media segment fragments\n\n boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // Bump the sequence number for next time\n\n sequenceNumber++;\n boxes.set(moof);\n boxes.set(mdat, moof.byteLength);\n this.trigger('data', {\n track: track,\n boxes: boxes\n });\n this.resetStream_(); // Continue with the flush process now\n\n this.trigger('done', 'VideoSegmentStream');\n };\n this.reset = function () {\n this.resetStream_();\n nalUnits = [];\n this.gopCache_.length = 0;\n gopsToAlignWith.length = 0;\n this.trigger('reset');\n };\n this.resetStream_ = function () {\n trackDecodeInfo.clearDtsInfo(track); // reset config and pps because they may differ across segments\n // for instance, when we are rendition switching\n\n config = undefined;\n pps = undefined;\n }; // Search for a candidate Gop for gop-fusion from the gop cache and\n // return it or return null if no good candidate was found\n\n this.getGopForFusion_ = function (nalUnit) {\n var halfSecond = 45000,\n // Half-a-second in a 90khz clock\n allowableOverlap = 10000,\n // About 3 frames @ 30fps\n nearestDistance = Infinity,\n dtsDistance,\n nearestGopObj,\n currentGop,\n currentGopObj,\n i; // Search for the GOP nearest to the beginning of this nal unit\n\n for (i = 0; i < this.gopCache_.length; i++) {\n currentGopObj = this.gopCache_[i];\n currentGop = currentGopObj.gop; // Reject Gops with different SPS or PPS\n\n if (!(track.pps && arrayEquals(track.pps[0], currentGopObj.pps[0])) || !(track.sps && arrayEquals(track.sps[0], currentGopObj.sps[0]))) {\n continue;\n } // Reject Gops that would require a negative baseMediaDecodeTime\n\n if (currentGop.dts < track.timelineStartInfo.dts) {\n continue;\n } // The distance between the end of the gop and the start of the nalUnit\n\n dtsDistance = nalUnit.dts - currentGop.dts - currentGop.duration; // Only consider GOPS that start before the nal unit and end within\n // a half-second of the nal unit\n\n if (dtsDistance >= -allowableOverlap && dtsDistance <= halfSecond) {\n // Always use the closest GOP we found if there is more than\n // one candidate\n if (!nearestGopObj || nearestDistance > dtsDistance) {\n nearestGopObj = currentGopObj;\n nearestDistance = dtsDistance;\n }\n }\n }\n if (nearestGopObj) {\n return nearestGopObj.gop;\n }\n return null;\n }; // trim gop list to the first gop found that has a matching pts with a gop in the list\n // of gopsToAlignWith starting from the START of the list\n\n this.alignGopsAtStart_ = function (gops) {\n var alignIndex, gopIndex, align, gop, byteLength, nalCount, duration, alignedGops;\n byteLength = gops.byteLength;\n nalCount = gops.nalCount;\n duration = gops.duration;\n alignIndex = gopIndex = 0;\n while (alignIndex < gopsToAlignWith.length && gopIndex < gops.length) {\n align = gopsToAlignWith[alignIndex];\n gop = gops[gopIndex];\n if (align.pts === gop.pts) {\n break;\n }\n if (gop.pts > align.pts) {\n // this current gop starts after the current gop we want to align on, so increment\n // align index\n alignIndex++;\n continue;\n } // current gop starts before the current gop we want to align on. so increment gop\n // index\n\n gopIndex++;\n byteLength -= gop.byteLength;\n nalCount -= gop.nalCount;\n duration -= gop.duration;\n }\n if (gopIndex === 0) {\n // no gops to trim\n return gops;\n }\n if (gopIndex === gops.length) {\n // all gops trimmed, skip appending all gops\n return null;\n }\n alignedGops = gops.slice(gopIndex);\n alignedGops.byteLength = byteLength;\n alignedGops.duration = duration;\n alignedGops.nalCount = nalCount;\n alignedGops.pts = alignedGops[0].pts;\n alignedGops.dts = alignedGops[0].dts;\n return alignedGops;\n }; // trim gop list to the first gop found that has a matching pts with a gop in the list\n // of gopsToAlignWith starting from the END of the list\n\n this.alignGopsAtEnd_ = function (gops) {\n var alignIndex, gopIndex, align, gop, alignEndIndex, matchFound;\n alignIndex = gopsToAlignWith.length - 1;\n gopIndex = gops.length - 1;\n alignEndIndex = null;\n matchFound = false;\n while (alignIndex >= 0 && gopIndex >= 0) {\n align = gopsToAlignWith[alignIndex];\n gop = gops[gopIndex];\n if (align.pts === gop.pts) {\n matchFound = true;\n break;\n }\n if (align.pts > gop.pts) {\n alignIndex--;\n continue;\n }\n if (alignIndex === gopsToAlignWith.length - 1) {\n // gop.pts is greater than the last alignment candidate. If no match is found\n // by the end of this loop, we still want to append gops that come after this\n // point\n alignEndIndex = gopIndex;\n }\n gopIndex--;\n }\n if (!matchFound && alignEndIndex === null) {\n return null;\n }\n var trimIndex;\n if (matchFound) {\n trimIndex = gopIndex;\n } else {\n trimIndex = alignEndIndex;\n }\n if (trimIndex === 0) {\n return gops;\n }\n var alignedGops = gops.slice(trimIndex);\n var metadata = alignedGops.reduce(function (total, gop) {\n total.byteLength += gop.byteLength;\n total.duration += gop.duration;\n total.nalCount += gop.nalCount;\n return total;\n }, {\n byteLength: 0,\n duration: 0,\n nalCount: 0\n });\n alignedGops.byteLength = metadata.byteLength;\n alignedGops.duration = metadata.duration;\n alignedGops.nalCount = metadata.nalCount;\n alignedGops.pts = alignedGops[0].pts;\n alignedGops.dts = alignedGops[0].dts;\n return alignedGops;\n };\n this.alignGopsWith = function (newGopsToAlignWith) {\n gopsToAlignWith = newGopsToAlignWith;\n };\n };\n VideoSegmentStream.prototype = new Stream();\n /**\n * A Stream that can combine multiple streams (ie. audio & video)\n * into a single output segment for MSE. Also supports audio-only\n * and video-only streams.\n * @param options {object} transmuxer options object\n * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\n * in the source; false to adjust the first segment to start at media timeline start.\n */\n\n CoalesceStream = function (options, metadataStream) {\n // Number of Tracks per output segment\n // If greater than 1, we combine multiple\n // tracks into a single segment\n this.numberOfTracks = 0;\n this.metadataStream = metadataStream;\n options = options || {};\n if (typeof options.remux !== 'undefined') {\n this.remuxTracks = !!options.remux;\n } else {\n this.remuxTracks = true;\n }\n if (typeof options.keepOriginalTimestamps === 'boolean') {\n this.keepOriginalTimestamps = options.keepOriginalTimestamps;\n } else {\n this.keepOriginalTimestamps = false;\n }\n this.pendingTracks = [];\n this.videoTrack = null;\n this.pendingBoxes = [];\n this.pendingCaptions = [];\n this.pendingMetadata = [];\n this.pendingBytes = 0;\n this.emittedTracks = 0;\n CoalesceStream.prototype.init.call(this); // Take output from multiple\n\n this.push = function (output) {\n // buffer incoming captions until the associated video segment\n // finishes\n if (output.content || output.text) {\n return this.pendingCaptions.push(output);\n } // buffer incoming id3 tags until the final flush\n\n if (output.frames) {\n return this.pendingMetadata.push(output);\n } // Add this track to the list of pending tracks and store\n // important information required for the construction of\n // the final segment\n\n this.pendingTracks.push(output.track);\n this.pendingBytes += output.boxes.byteLength; // TODO: is there an issue for this against chrome?\n // We unshift audio and push video because\n // as of Chrome 75 when switching from\n // one init segment to another if the video\n // mdat does not appear after the audio mdat\n // only audio will play for the duration of our transmux.\n\n if (output.track.type === 'video') {\n this.videoTrack = output.track;\n this.pendingBoxes.push(output.boxes);\n }\n if (output.track.type === 'audio') {\n this.audioTrack = output.track;\n this.pendingBoxes.unshift(output.boxes);\n }\n };\n };\n CoalesceStream.prototype = new Stream();\n CoalesceStream.prototype.flush = function (flushSource) {\n var offset = 0,\n event = {\n captions: [],\n captionStreams: {},\n metadata: [],\n info: {}\n },\n caption,\n id3,\n initSegment,\n timelineStartPts = 0,\n i;\n if (this.pendingTracks.length < this.numberOfTracks) {\n if (flushSource !== 'VideoSegmentStream' && flushSource !== 'AudioSegmentStream') {\n // Return because we haven't received a flush from a data-generating\n // portion of the segment (meaning that we have only recieved meta-data\n // or captions.)\n return;\n } else if (this.remuxTracks) {\n // Return until we have enough tracks from the pipeline to remux (if we\n // are remuxing audio and video into a single MP4)\n return;\n } else if (this.pendingTracks.length === 0) {\n // In the case where we receive a flush without any data having been\n // received we consider it an emitted track for the purposes of coalescing\n // `done` events.\n // We do this for the case where there is an audio and video track in the\n // segment but no audio data. (seen in several playlists with alternate\n // audio tracks and no audio present in the main TS segments.)\n this.emittedTracks++;\n if (this.emittedTracks >= this.numberOfTracks) {\n this.trigger('done');\n this.emittedTracks = 0;\n }\n return;\n }\n }\n if (this.videoTrack) {\n timelineStartPts = this.videoTrack.timelineStartInfo.pts;\n VIDEO_PROPERTIES.forEach(function (prop) {\n event.info[prop] = this.videoTrack[prop];\n }, this);\n } else if (this.audioTrack) {\n timelineStartPts = this.audioTrack.timelineStartInfo.pts;\n AUDIO_PROPERTIES.forEach(function (prop) {\n event.info[prop] = this.audioTrack[prop];\n }, this);\n }\n if (this.videoTrack || this.audioTrack) {\n if (this.pendingTracks.length === 1) {\n event.type = this.pendingTracks[0].type;\n } else {\n event.type = 'combined';\n }\n this.emittedTracks += this.pendingTracks.length;\n initSegment = mp4.initSegment(this.pendingTracks); // Create a new typed array to hold the init segment\n\n event.initSegment = new Uint8Array(initSegment.byteLength); // Create an init segment containing a moov\n // and track definitions\n\n event.initSegment.set(initSegment); // Create a new typed array to hold the moof+mdats\n\n event.data = new Uint8Array(this.pendingBytes); // Append each moof+mdat (one per track) together\n\n for (i = 0; i < this.pendingBoxes.length; i++) {\n event.data.set(this.pendingBoxes[i], offset);\n offset += this.pendingBoxes[i].byteLength;\n } // Translate caption PTS times into second offsets to match the\n // video timeline for the segment, and add track info\n\n for (i = 0; i < this.pendingCaptions.length; i++) {\n caption = this.pendingCaptions[i];\n caption.startTime = clock.metadataTsToSeconds(caption.startPts, timelineStartPts, this.keepOriginalTimestamps);\n caption.endTime = clock.metadataTsToSeconds(caption.endPts, timelineStartPts, this.keepOriginalTimestamps);\n event.captionStreams[caption.stream] = true;\n event.captions.push(caption);\n } // Translate ID3 frame PTS times into second offsets to match the\n // video timeline for the segment\n\n for (i = 0; i < this.pendingMetadata.length; i++) {\n id3 = this.pendingMetadata[i];\n id3.cueTime = clock.metadataTsToSeconds(id3.pts, timelineStartPts, this.keepOriginalTimestamps);\n event.metadata.push(id3);\n } // We add this to every single emitted segment even though we only need\n // it for the first\n\n event.metadata.dispatchType = this.metadataStream.dispatchType; // Reset stream state\n\n this.pendingTracks.length = 0;\n this.videoTrack = null;\n this.pendingBoxes.length = 0;\n this.pendingCaptions.length = 0;\n this.pendingBytes = 0;\n this.pendingMetadata.length = 0; // Emit the built segment\n // We include captions and ID3 tags for backwards compatibility,\n // ideally we should send only video and audio in the data event\n\n this.trigger('data', event); // Emit each caption to the outside world\n // Ideally, this would happen immediately on parsing captions,\n // but we need to ensure that video data is sent back first\n // so that caption timing can be adjusted to match video timing\n\n for (i = 0; i < event.captions.length; i++) {\n caption = event.captions[i];\n this.trigger('caption', caption);\n } // Emit each id3 tag to the outside world\n // Ideally, this would happen immediately on parsing the tag,\n // but we need to ensure that video data is sent back first\n // so that ID3 frame timing can be adjusted to match video timing\n\n for (i = 0; i < event.metadata.length; i++) {\n id3 = event.metadata[i];\n this.trigger('id3Frame', id3);\n }\n } // Only emit `done` if all tracks have been flushed and emitted\n\n if (this.emittedTracks >= this.numberOfTracks) {\n this.trigger('done');\n this.emittedTracks = 0;\n }\n };\n CoalesceStream.prototype.setRemux = function (val) {\n this.remuxTracks = val;\n };\n /**\n * A Stream that expects MP2T binary data as input and produces\n * corresponding media segments, suitable for use with Media Source\n * Extension (MSE) implementations that support the ISO BMFF byte\n * stream format, like Chrome.\n */\n\n Transmuxer = function (options) {\n var self = this,\n hasFlushed = true,\n videoTrack,\n audioTrack;\n Transmuxer.prototype.init.call(this);\n options = options || {};\n this.baseMediaDecodeTime = options.baseMediaDecodeTime || 0;\n this.transmuxPipeline_ = {};\n this.setupAacPipeline = function () {\n var pipeline = {};\n this.transmuxPipeline_ = pipeline;\n pipeline.type = 'aac';\n pipeline.metadataStream = new m2ts.MetadataStream(); // set up the parsing pipeline\n\n pipeline.aacStream = new AacStream();\n pipeline.audioTimestampRolloverStream = new m2ts.TimestampRolloverStream('audio');\n pipeline.timedMetadataTimestampRolloverStream = new m2ts.TimestampRolloverStream('timed-metadata');\n pipeline.adtsStream = new AdtsStream();\n pipeline.coalesceStream = new CoalesceStream(options, pipeline.metadataStream);\n pipeline.headOfPipeline = pipeline.aacStream;\n pipeline.aacStream.pipe(pipeline.audioTimestampRolloverStream).pipe(pipeline.adtsStream);\n pipeline.aacStream.pipe(pipeline.timedMetadataTimestampRolloverStream).pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream);\n pipeline.metadataStream.on('timestamp', function (frame) {\n pipeline.aacStream.setTimestamp(frame.timeStamp);\n });\n pipeline.aacStream.on('data', function (data) {\n if (data.type !== 'timed-metadata' && data.type !== 'audio' || pipeline.audioSegmentStream) {\n return;\n }\n audioTrack = audioTrack || {\n timelineStartInfo: {\n baseMediaDecodeTime: self.baseMediaDecodeTime\n },\n codec: 'adts',\n type: 'audio'\n }; // hook up the audio segment stream to the first track with aac data\n\n pipeline.coalesceStream.numberOfTracks++;\n pipeline.audioSegmentStream = new AudioSegmentStream(audioTrack, options);\n pipeline.audioSegmentStream.on('log', self.getLogTrigger_('audioSegmentStream'));\n pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo')); // Set up the final part of the audio pipeline\n\n pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream); // emit pmt info\n\n self.trigger('trackinfo', {\n hasAudio: !!audioTrack,\n hasVideo: !!videoTrack\n });\n }); // Re-emit any data coming from the coalesce stream to the outside world\n\n pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data')); // Let the consumer know we have finished flushing the entire pipeline\n\n pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\n addPipelineLogRetriggers(this, pipeline);\n };\n this.setupTsPipeline = function () {\n var pipeline = {};\n this.transmuxPipeline_ = pipeline;\n pipeline.type = 'ts';\n pipeline.metadataStream = new m2ts.MetadataStream(); // set up the parsing pipeline\n\n pipeline.packetStream = new m2ts.TransportPacketStream();\n pipeline.parseStream = new m2ts.TransportParseStream();\n pipeline.elementaryStream = new m2ts.ElementaryStream();\n pipeline.timestampRolloverStream = new m2ts.TimestampRolloverStream();\n pipeline.adtsStream = new AdtsStream();\n pipeline.h264Stream = new H264Stream();\n pipeline.captionStream = new m2ts.CaptionStream(options);\n pipeline.coalesceStream = new CoalesceStream(options, pipeline.metadataStream);\n pipeline.headOfPipeline = pipeline.packetStream; // disassemble MPEG2-TS packets into elementary streams\n\n pipeline.packetStream.pipe(pipeline.parseStream).pipe(pipeline.elementaryStream).pipe(pipeline.timestampRolloverStream); // !!THIS ORDER IS IMPORTANT!!\n // demux the streams\n\n pipeline.timestampRolloverStream.pipe(pipeline.h264Stream);\n pipeline.timestampRolloverStream.pipe(pipeline.adtsStream);\n pipeline.timestampRolloverStream.pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream); // Hook up CEA-608/708 caption stream\n\n pipeline.h264Stream.pipe(pipeline.captionStream).pipe(pipeline.coalesceStream);\n pipeline.elementaryStream.on('data', function (data) {\n var i;\n if (data.type === 'metadata') {\n i = data.tracks.length; // scan the tracks listed in the metadata\n\n while (i--) {\n if (!videoTrack && data.tracks[i].type === 'video') {\n videoTrack = data.tracks[i];\n videoTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\n } else if (!audioTrack && data.tracks[i].type === 'audio') {\n audioTrack = data.tracks[i];\n audioTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\n }\n } // hook up the video segment stream to the first track with h264 data\n\n if (videoTrack && !pipeline.videoSegmentStream) {\n pipeline.coalesceStream.numberOfTracks++;\n pipeline.videoSegmentStream = new VideoSegmentStream(videoTrack, options);\n pipeline.videoSegmentStream.on('log', self.getLogTrigger_('videoSegmentStream'));\n pipeline.videoSegmentStream.on('timelineStartInfo', function (timelineStartInfo) {\n // When video emits timelineStartInfo data after a flush, we forward that\n // info to the AudioSegmentStream, if it exists, because video timeline\n // data takes precedence. Do not do this if keepOriginalTimestamps is set,\n // because this is a particularly subtle form of timestamp alteration.\n if (audioTrack && !options.keepOriginalTimestamps) {\n audioTrack.timelineStartInfo = timelineStartInfo; // On the first segment we trim AAC frames that exist before the\n // very earliest DTS we have seen in video because Chrome will\n // interpret any video track with a baseMediaDecodeTime that is\n // non-zero as a gap.\n\n pipeline.audioSegmentStream.setEarliestDts(timelineStartInfo.dts - self.baseMediaDecodeTime);\n }\n });\n pipeline.videoSegmentStream.on('processedGopsInfo', self.trigger.bind(self, 'gopInfo'));\n pipeline.videoSegmentStream.on('segmentTimingInfo', self.trigger.bind(self, 'videoSegmentTimingInfo'));\n pipeline.videoSegmentStream.on('baseMediaDecodeTime', function (baseMediaDecodeTime) {\n if (audioTrack) {\n pipeline.audioSegmentStream.setVideoBaseMediaDecodeTime(baseMediaDecodeTime);\n }\n });\n pipeline.videoSegmentStream.on('timingInfo', self.trigger.bind(self, 'videoTimingInfo')); // Set up the final part of the video pipeline\n\n pipeline.h264Stream.pipe(pipeline.videoSegmentStream).pipe(pipeline.coalesceStream);\n }\n if (audioTrack && !pipeline.audioSegmentStream) {\n // hook up the audio segment stream to the first track with aac data\n pipeline.coalesceStream.numberOfTracks++;\n pipeline.audioSegmentStream = new AudioSegmentStream(audioTrack, options);\n pipeline.audioSegmentStream.on('log', self.getLogTrigger_('audioSegmentStream'));\n pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo'));\n pipeline.audioSegmentStream.on('segmentTimingInfo', self.trigger.bind(self, 'audioSegmentTimingInfo')); // Set up the final part of the audio pipeline\n\n pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream);\n } // emit pmt info\n\n self.trigger('trackinfo', {\n hasAudio: !!audioTrack,\n hasVideo: !!videoTrack\n });\n }\n }); // Re-emit any data coming from the coalesce stream to the outside world\n\n pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data'));\n pipeline.coalesceStream.on('id3Frame', function (id3Frame) {\n id3Frame.dispatchType = pipeline.metadataStream.dispatchType;\n self.trigger('id3Frame', id3Frame);\n });\n pipeline.coalesceStream.on('caption', this.trigger.bind(this, 'caption')); // Let the consumer know we have finished flushing the entire pipeline\n\n pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\n addPipelineLogRetriggers(this, pipeline);\n }; // hook up the segment streams once track metadata is delivered\n\n this.setBaseMediaDecodeTime = function (baseMediaDecodeTime) {\n var pipeline = this.transmuxPipeline_;\n if (!options.keepOriginalTimestamps) {\n this.baseMediaDecodeTime = baseMediaDecodeTime;\n }\n if (audioTrack) {\n audioTrack.timelineStartInfo.dts = undefined;\n audioTrack.timelineStartInfo.pts = undefined;\n trackDecodeInfo.clearDtsInfo(audioTrack);\n if (pipeline.audioTimestampRolloverStream) {\n pipeline.audioTimestampRolloverStream.discontinuity();\n }\n }\n if (videoTrack) {\n if (pipeline.videoSegmentStream) {\n pipeline.videoSegmentStream.gopCache_ = [];\n }\n videoTrack.timelineStartInfo.dts = undefined;\n videoTrack.timelineStartInfo.pts = undefined;\n trackDecodeInfo.clearDtsInfo(videoTrack);\n pipeline.captionStream.reset();\n }\n if (pipeline.timestampRolloverStream) {\n pipeline.timestampRolloverStream.discontinuity();\n }\n };\n this.setAudioAppendStart = function (timestamp) {\n if (audioTrack) {\n this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(timestamp);\n }\n };\n this.setRemux = function (val) {\n var pipeline = this.transmuxPipeline_;\n options.remux = val;\n if (pipeline && pipeline.coalesceStream) {\n pipeline.coalesceStream.setRemux(val);\n }\n };\n this.alignGopsWith = function (gopsToAlignWith) {\n if (videoTrack && this.transmuxPipeline_.videoSegmentStream) {\n this.transmuxPipeline_.videoSegmentStream.alignGopsWith(gopsToAlignWith);\n }\n };\n this.getLogTrigger_ = function (key) {\n var self = this;\n return function (event) {\n event.stream = key;\n self.trigger('log', event);\n };\n }; // feed incoming data to the front of the parsing pipeline\n\n this.push = function (data) {\n if (hasFlushed) {\n var isAac = isLikelyAacData(data);\n if (isAac && this.transmuxPipeline_.type !== 'aac') {\n this.setupAacPipeline();\n } else if (!isAac && this.transmuxPipeline_.type !== 'ts') {\n this.setupTsPipeline();\n }\n hasFlushed = false;\n }\n this.transmuxPipeline_.headOfPipeline.push(data);\n }; // flush any buffered data\n\n this.flush = function () {\n hasFlushed = true; // Start at the top of the pipeline and flush all pending work\n\n this.transmuxPipeline_.headOfPipeline.flush();\n };\n this.endTimeline = function () {\n this.transmuxPipeline_.headOfPipeline.endTimeline();\n };\n this.reset = function () {\n if (this.transmuxPipeline_.headOfPipeline) {\n this.transmuxPipeline_.headOfPipeline.reset();\n }\n }; // Caption data has to be reset when seeking outside buffered range\n\n this.resetCaptions = function () {\n if (this.transmuxPipeline_.captionStream) {\n this.transmuxPipeline_.captionStream.reset();\n }\n };\n };\n Transmuxer.prototype = new Stream();\n var transmuxer = {\n Transmuxer: Transmuxer,\n VideoSegmentStream: VideoSegmentStream,\n AudioSegmentStream: AudioSegmentStream,\n AUDIO_PROPERTIES: AUDIO_PROPERTIES,\n VIDEO_PROPERTIES: VIDEO_PROPERTIES,\n // exported for testing\n generateSegmentTimingInfo: generateSegmentTimingInfo\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n */\n\n var toUnsigned$3 = function (value) {\n return value >>> 0;\n };\n var toHexString$1 = function (value) {\n return ('00' + value.toString(16)).slice(-2);\n };\n var bin = {\n toUnsigned: toUnsigned$3,\n toHexString: toHexString$1\n };\n var parseType$3 = function (buffer) {\n var result = '';\n result += String.fromCharCode(buffer[0]);\n result += String.fromCharCode(buffer[1]);\n result += String.fromCharCode(buffer[2]);\n result += String.fromCharCode(buffer[3]);\n return result;\n };\n var parseType_1 = parseType$3;\n var toUnsigned$2 = bin.toUnsigned;\n var parseType$2 = parseType_1;\n var findBox$2 = function (data, path) {\n var results = [],\n i,\n size,\n type,\n end,\n subresults;\n if (!path.length) {\n // short-circuit the search for empty paths\n return null;\n }\n for (i = 0; i < data.byteLength;) {\n size = toUnsigned$2(data[i] << 24 | data[i + 1] << 16 | data[i + 2] << 8 | data[i + 3]);\n type = parseType$2(data.subarray(i + 4, i + 8));\n end = size > 1 ? i + size : data.byteLength;\n if (type === path[0]) {\n if (path.length === 1) {\n // this is the end of the path and we've found the box we were\n // looking for\n results.push(data.subarray(i + 8, end));\n } else {\n // recursively search for the next box along the path\n subresults = findBox$2(data.subarray(i + 8, end), path.slice(1));\n if (subresults.length) {\n results = results.concat(subresults);\n }\n }\n }\n i = end;\n } // we've finished searching all of data\n\n return results;\n };\n var findBox_1 = findBox$2;\n var toUnsigned$1 = bin.toUnsigned;\n var getUint64$2 = numbers.getUint64;\n var tfdt = function (data) {\n var result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4))\n };\n if (result.version === 1) {\n result.baseMediaDecodeTime = getUint64$2(data.subarray(4));\n } else {\n result.baseMediaDecodeTime = toUnsigned$1(data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]);\n }\n return result;\n };\n var parseTfdt$2 = tfdt;\n var parseSampleFlags$1 = function (flags) {\n return {\n isLeading: (flags[0] & 0x0c) >>> 2,\n dependsOn: flags[0] & 0x03,\n isDependedOn: (flags[1] & 0xc0) >>> 6,\n hasRedundancy: (flags[1] & 0x30) >>> 4,\n paddingValue: (flags[1] & 0x0e) >>> 1,\n isNonSyncSample: flags[1] & 0x01,\n degradationPriority: flags[2] << 8 | flags[3]\n };\n };\n var parseSampleFlags_1 = parseSampleFlags$1;\n var parseSampleFlags = parseSampleFlags_1;\n var trun = function (data) {\n var result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n samples: []\n },\n view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n // Flag interpretation\n dataOffsetPresent = result.flags[2] & 0x01,\n // compare with 2nd byte of 0x1\n firstSampleFlagsPresent = result.flags[2] & 0x04,\n // compare with 2nd byte of 0x4\n sampleDurationPresent = result.flags[1] & 0x01,\n // compare with 2nd byte of 0x100\n sampleSizePresent = result.flags[1] & 0x02,\n // compare with 2nd byte of 0x200\n sampleFlagsPresent = result.flags[1] & 0x04,\n // compare with 2nd byte of 0x400\n sampleCompositionTimeOffsetPresent = result.flags[1] & 0x08,\n // compare with 2nd byte of 0x800\n sampleCount = view.getUint32(4),\n offset = 8,\n sample;\n if (dataOffsetPresent) {\n // 32 bit signed integer\n result.dataOffset = view.getInt32(offset);\n offset += 4;\n } // Overrides the flags for the first sample only. The order of\n // optional values will be: duration, size, compositionTimeOffset\n\n if (firstSampleFlagsPresent && sampleCount) {\n sample = {\n flags: parseSampleFlags(data.subarray(offset, offset + 4))\n };\n offset += 4;\n if (sampleDurationPresent) {\n sample.duration = view.getUint32(offset);\n offset += 4;\n }\n if (sampleSizePresent) {\n sample.size = view.getUint32(offset);\n offset += 4;\n }\n if (sampleCompositionTimeOffsetPresent) {\n if (result.version === 1) {\n sample.compositionTimeOffset = view.getInt32(offset);\n } else {\n sample.compositionTimeOffset = view.getUint32(offset);\n }\n offset += 4;\n }\n result.samples.push(sample);\n sampleCount--;\n }\n while (sampleCount--) {\n sample = {};\n if (sampleDurationPresent) {\n sample.duration = view.getUint32(offset);\n offset += 4;\n }\n if (sampleSizePresent) {\n sample.size = view.getUint32(offset);\n offset += 4;\n }\n if (sampleFlagsPresent) {\n sample.flags = parseSampleFlags(data.subarray(offset, offset + 4));\n offset += 4;\n }\n if (sampleCompositionTimeOffsetPresent) {\n if (result.version === 1) {\n sample.compositionTimeOffset = view.getInt32(offset);\n } else {\n sample.compositionTimeOffset = view.getUint32(offset);\n }\n offset += 4;\n }\n result.samples.push(sample);\n }\n return result;\n };\n var parseTrun$2 = trun;\n var tfhd = function (data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n trackId: view.getUint32(4)\n },\n baseDataOffsetPresent = result.flags[2] & 0x01,\n sampleDescriptionIndexPresent = result.flags[2] & 0x02,\n defaultSampleDurationPresent = result.flags[2] & 0x08,\n defaultSampleSizePresent = result.flags[2] & 0x10,\n defaultSampleFlagsPresent = result.flags[2] & 0x20,\n durationIsEmpty = result.flags[0] & 0x010000,\n defaultBaseIsMoof = result.flags[0] & 0x020000,\n i;\n i = 8;\n if (baseDataOffsetPresent) {\n i += 4; // truncate top 4 bytes\n // FIXME: should we read the full 64 bits?\n\n result.baseDataOffset = view.getUint32(12);\n i += 4;\n }\n if (sampleDescriptionIndexPresent) {\n result.sampleDescriptionIndex = view.getUint32(i);\n i += 4;\n }\n if (defaultSampleDurationPresent) {\n result.defaultSampleDuration = view.getUint32(i);\n i += 4;\n }\n if (defaultSampleSizePresent) {\n result.defaultSampleSize = view.getUint32(i);\n i += 4;\n }\n if (defaultSampleFlagsPresent) {\n result.defaultSampleFlags = view.getUint32(i);\n }\n if (durationIsEmpty) {\n result.durationIsEmpty = true;\n }\n if (!baseDataOffsetPresent && defaultBaseIsMoof) {\n result.baseDataOffsetIsMoof = true;\n }\n return result;\n };\n var parseTfhd$2 = tfhd;\n var win;\n if (typeof window !== \"undefined\") {\n win = window;\n } else if (typeof commonjsGlobal !== \"undefined\") {\n win = commonjsGlobal;\n } else if (typeof self !== \"undefined\") {\n win = self;\n } else {\n win = {};\n }\n var window_1 = win;\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Reads in-band CEA-708 captions out of FMP4 segments.\n * @see https://en.wikipedia.org/wiki/CEA-708\n */\n\n var discardEmulationPreventionBytes = captionPacketParser.discardEmulationPreventionBytes;\n var CaptionStream = captionStream.CaptionStream;\n var findBox$1 = findBox_1;\n var parseTfdt$1 = parseTfdt$2;\n var parseTrun$1 = parseTrun$2;\n var parseTfhd$1 = parseTfhd$2;\n var window$2 = window_1;\n /**\n * Maps an offset in the mdat to a sample based on the the size of the samples.\n * Assumes that `parseSamples` has been called first.\n *\n * @param {Number} offset - The offset into the mdat\n * @param {Object[]} samples - An array of samples, parsed using `parseSamples`\n * @return {?Object} The matching sample, or null if no match was found.\n *\n * @see ISO-BMFF-12/2015, Section 8.8.8\n **/\n\n var mapToSample = function (offset, samples) {\n var approximateOffset = offset;\n for (var i = 0; i < samples.length; i++) {\n var sample = samples[i];\n if (approximateOffset < sample.size) {\n return sample;\n }\n approximateOffset -= sample.size;\n }\n return null;\n };\n /**\n * Finds SEI nal units contained in a Media Data Box.\n * Assumes that `parseSamples` has been called first.\n *\n * @param {Uint8Array} avcStream - The bytes of the mdat\n * @param {Object[]} samples - The samples parsed out by `parseSamples`\n * @param {Number} trackId - The trackId of this video track\n * @return {Object[]} seiNals - the parsed SEI NALUs found.\n * The contents of the seiNal should match what is expected by\n * CaptionStream.push (nalUnitType, size, data, escapedRBSP, pts, dts)\n *\n * @see ISO-BMFF-12/2015, Section 8.1.1\n * @see Rec. ITU-T H.264, 7.3.2.3.1\n **/\n\n var findSeiNals = function (avcStream, samples, trackId) {\n var avcView = new DataView(avcStream.buffer, avcStream.byteOffset, avcStream.byteLength),\n result = {\n logs: [],\n seiNals: []\n },\n seiNal,\n i,\n length,\n lastMatchedSample;\n for (i = 0; i + 4 < avcStream.length; i += length) {\n length = avcView.getUint32(i);\n i += 4; // Bail if this doesn't appear to be an H264 stream\n\n if (length <= 0) {\n continue;\n }\n switch (avcStream[i] & 0x1F) {\n case 0x06:\n var data = avcStream.subarray(i + 1, i + 1 + length);\n var matchingSample = mapToSample(i, samples);\n seiNal = {\n nalUnitType: 'sei_rbsp',\n size: length,\n data: data,\n escapedRBSP: discardEmulationPreventionBytes(data),\n trackId: trackId\n };\n if (matchingSample) {\n seiNal.pts = matchingSample.pts;\n seiNal.dts = matchingSample.dts;\n lastMatchedSample = matchingSample;\n } else if (lastMatchedSample) {\n // If a matching sample cannot be found, use the last\n // sample's values as they should be as close as possible\n seiNal.pts = lastMatchedSample.pts;\n seiNal.dts = lastMatchedSample.dts;\n } else {\n result.logs.push({\n level: 'warn',\n message: 'We\\'ve encountered a nal unit without data at ' + i + ' for trackId ' + trackId + '. See mux.js#223.'\n });\n break;\n }\n result.seiNals.push(seiNal);\n break;\n }\n }\n return result;\n };\n /**\n * Parses sample information out of Track Run Boxes and calculates\n * the absolute presentation and decode timestamps of each sample.\n *\n * @param {Array} truns - The Trun Run boxes to be parsed\n * @param {Number|BigInt} baseMediaDecodeTime - base media decode time from tfdt\n @see ISO-BMFF-12/2015, Section 8.8.12\n * @param {Object} tfhd - The parsed Track Fragment Header\n * @see inspect.parseTfhd\n * @return {Object[]} the parsed samples\n *\n * @see ISO-BMFF-12/2015, Section 8.8.8\n **/\n\n var parseSamples = function (truns, baseMediaDecodeTime, tfhd) {\n var currentDts = baseMediaDecodeTime;\n var defaultSampleDuration = tfhd.defaultSampleDuration || 0;\n var defaultSampleSize = tfhd.defaultSampleSize || 0;\n var trackId = tfhd.trackId;\n var allSamples = [];\n truns.forEach(function (trun) {\n // Note: We currently do not parse the sample table as well\n // as the trun. It's possible some sources will require this.\n // moov > trak > mdia > minf > stbl\n var trackRun = parseTrun$1(trun);\n var samples = trackRun.samples;\n samples.forEach(function (sample) {\n if (sample.duration === undefined) {\n sample.duration = defaultSampleDuration;\n }\n if (sample.size === undefined) {\n sample.size = defaultSampleSize;\n }\n sample.trackId = trackId;\n sample.dts = currentDts;\n if (sample.compositionTimeOffset === undefined) {\n sample.compositionTimeOffset = 0;\n }\n if (typeof currentDts === 'bigint') {\n sample.pts = currentDts + window$2.BigInt(sample.compositionTimeOffset);\n currentDts += window$2.BigInt(sample.duration);\n } else {\n sample.pts = currentDts + sample.compositionTimeOffset;\n currentDts += sample.duration;\n }\n });\n allSamples = allSamples.concat(samples);\n });\n return allSamples;\n };\n /**\n * Parses out caption nals from an FMP4 segment's video tracks.\n *\n * @param {Uint8Array} segment - The bytes of a single segment\n * @param {Number} videoTrackId - The trackId of a video track in the segment\n * @return {Object.} A mapping of video trackId to\n * a list of seiNals found in that track\n **/\n\n var parseCaptionNals = function (segment, videoTrackId) {\n // To get the samples\n var trafs = findBox$1(segment, ['moof', 'traf']); // To get SEI NAL units\n\n var mdats = findBox$1(segment, ['mdat']);\n var captionNals = {};\n var mdatTrafPairs = []; // Pair up each traf with a mdat as moofs and mdats are in pairs\n\n mdats.forEach(function (mdat, index) {\n var matchingTraf = trafs[index];\n mdatTrafPairs.push({\n mdat: mdat,\n traf: matchingTraf\n });\n });\n mdatTrafPairs.forEach(function (pair) {\n var mdat = pair.mdat;\n var traf = pair.traf;\n var tfhd = findBox$1(traf, ['tfhd']); // Exactly 1 tfhd per traf\n\n var headerInfo = parseTfhd$1(tfhd[0]);\n var trackId = headerInfo.trackId;\n var tfdt = findBox$1(traf, ['tfdt']); // Either 0 or 1 tfdt per traf\n\n var baseMediaDecodeTime = tfdt.length > 0 ? parseTfdt$1(tfdt[0]).baseMediaDecodeTime : 0;\n var truns = findBox$1(traf, ['trun']);\n var samples;\n var result; // Only parse video data for the chosen video track\n\n if (videoTrackId === trackId && truns.length > 0) {\n samples = parseSamples(truns, baseMediaDecodeTime, headerInfo);\n result = findSeiNals(mdat, samples, trackId);\n if (!captionNals[trackId]) {\n captionNals[trackId] = {\n seiNals: [],\n logs: []\n };\n }\n captionNals[trackId].seiNals = captionNals[trackId].seiNals.concat(result.seiNals);\n captionNals[trackId].logs = captionNals[trackId].logs.concat(result.logs);\n }\n });\n return captionNals;\n };\n /**\n * Parses out inband captions from an MP4 container and returns\n * caption objects that can be used by WebVTT and the TextTrack API.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/VTTCue\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TextTrack\n * Assumes that `probe.getVideoTrackIds` and `probe.timescale` have been called first\n *\n * @param {Uint8Array} segment - The fmp4 segment containing embedded captions\n * @param {Number} trackId - The id of the video track to parse\n * @param {Number} timescale - The timescale for the video track from the init segment\n *\n * @return {?Object[]} parsedCaptions - A list of captions or null if no video tracks\n * @return {Number} parsedCaptions[].startTime - The time to show the caption in seconds\n * @return {Number} parsedCaptions[].endTime - The time to stop showing the caption in seconds\n * @return {Object[]} parsedCaptions[].content - A list of individual caption segments\n * @return {String} parsedCaptions[].content.text - The visible content of the caption segment\n * @return {Number} parsedCaptions[].content.line - The line height from 1-15 for positioning of the caption segment\n * @return {Number} parsedCaptions[].content.position - The column indent percentage for cue positioning from 10-80\n **/\n\n var parseEmbeddedCaptions = function (segment, trackId, timescale) {\n var captionNals; // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there\n\n if (trackId === null) {\n return null;\n }\n captionNals = parseCaptionNals(segment, trackId);\n var trackNals = captionNals[trackId] || {};\n return {\n seiNals: trackNals.seiNals,\n logs: trackNals.logs,\n timescale: timescale\n };\n };\n /**\n * Converts SEI NALUs into captions that can be used by video.js\n **/\n\n var CaptionParser = function () {\n var isInitialized = false;\n var captionStream; // Stores segments seen before trackId and timescale are set\n\n var segmentCache; // Stores video track ID of the track being parsed\n\n var trackId; // Stores the timescale of the track being parsed\n\n var timescale; // Stores captions parsed so far\n\n var parsedCaptions; // Stores whether we are receiving partial data or not\n\n var parsingPartial;\n /**\n * A method to indicate whether a CaptionParser has been initalized\n * @returns {Boolean}\n **/\n\n this.isInitialized = function () {\n return isInitialized;\n };\n /**\n * Initializes the underlying CaptionStream, SEI NAL parsing\n * and management, and caption collection\n **/\n\n this.init = function (options) {\n captionStream = new CaptionStream();\n isInitialized = true;\n parsingPartial = options ? options.isPartial : false; // Collect dispatched captions\n\n captionStream.on('data', function (event) {\n // Convert to seconds in the source's timescale\n event.startTime = event.startPts / timescale;\n event.endTime = event.endPts / timescale;\n parsedCaptions.captions.push(event);\n parsedCaptions.captionStreams[event.stream] = true;\n });\n captionStream.on('log', function (log) {\n parsedCaptions.logs.push(log);\n });\n };\n /**\n * Determines if a new video track will be selected\n * or if the timescale changed\n * @return {Boolean}\n **/\n\n this.isNewInit = function (videoTrackIds, timescales) {\n if (videoTrackIds && videoTrackIds.length === 0 || timescales && typeof timescales === 'object' && Object.keys(timescales).length === 0) {\n return false;\n }\n return trackId !== videoTrackIds[0] || timescale !== timescales[trackId];\n };\n /**\n * Parses out SEI captions and interacts with underlying\n * CaptionStream to return dispatched captions\n *\n * @param {Uint8Array} segment - The fmp4 segment containing embedded captions\n * @param {Number[]} videoTrackIds - A list of video tracks found in the init segment\n * @param {Object.} timescales - The timescales found in the init segment\n * @see parseEmbeddedCaptions\n * @see m2ts/caption-stream.js\n **/\n\n this.parse = function (segment, videoTrackIds, timescales) {\n var parsedData;\n if (!this.isInitialized()) {\n return null; // This is not likely to be a video segment\n } else if (!videoTrackIds || !timescales) {\n return null;\n } else if (this.isNewInit(videoTrackIds, timescales)) {\n // Use the first video track only as there is no\n // mechanism to switch to other video tracks\n trackId = videoTrackIds[0];\n timescale = timescales[trackId]; // If an init segment has not been seen yet, hold onto segment\n // data until we have one.\n // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there\n } else if (trackId === null || !timescale) {\n segmentCache.push(segment);\n return null;\n } // Now that a timescale and trackId is set, parse cached segments\n\n while (segmentCache.length > 0) {\n var cachedSegment = segmentCache.shift();\n this.parse(cachedSegment, videoTrackIds, timescales);\n }\n parsedData = parseEmbeddedCaptions(segment, trackId, timescale);\n if (parsedData && parsedData.logs) {\n parsedCaptions.logs = parsedCaptions.logs.concat(parsedData.logs);\n }\n if (parsedData === null || !parsedData.seiNals) {\n if (parsedCaptions.logs.length) {\n return {\n logs: parsedCaptions.logs,\n captions: [],\n captionStreams: []\n };\n }\n return null;\n }\n this.pushNals(parsedData.seiNals); // Force the parsed captions to be dispatched\n\n this.flushStream();\n return parsedCaptions;\n };\n /**\n * Pushes SEI NALUs onto CaptionStream\n * @param {Object[]} nals - A list of SEI nals parsed using `parseCaptionNals`\n * Assumes that `parseCaptionNals` has been called first\n * @see m2ts/caption-stream.js\n **/\n\n this.pushNals = function (nals) {\n if (!this.isInitialized() || !nals || nals.length === 0) {\n return null;\n }\n nals.forEach(function (nal) {\n captionStream.push(nal);\n });\n };\n /**\n * Flushes underlying CaptionStream to dispatch processed, displayable captions\n * @see m2ts/caption-stream.js\n **/\n\n this.flushStream = function () {\n if (!this.isInitialized()) {\n return null;\n }\n if (!parsingPartial) {\n captionStream.flush();\n } else {\n captionStream.partialFlush();\n }\n };\n /**\n * Reset caption buckets for new data\n **/\n\n this.clearParsedCaptions = function () {\n parsedCaptions.captions = [];\n parsedCaptions.captionStreams = {};\n parsedCaptions.logs = [];\n };\n /**\n * Resets underlying CaptionStream\n * @see m2ts/caption-stream.js\n **/\n\n this.resetCaptionStream = function () {\n if (!this.isInitialized()) {\n return null;\n }\n captionStream.reset();\n };\n /**\n * Convenience method to clear all captions flushed from the\n * CaptionStream and still being parsed\n * @see m2ts/caption-stream.js\n **/\n\n this.clearAllCaptions = function () {\n this.clearParsedCaptions();\n this.resetCaptionStream();\n };\n /**\n * Reset caption parser\n **/\n\n this.reset = function () {\n segmentCache = [];\n trackId = null;\n timescale = null;\n if (!parsedCaptions) {\n parsedCaptions = {\n captions: [],\n // CC1, CC2, CC3, CC4\n captionStreams: {},\n logs: []\n };\n } else {\n this.clearParsedCaptions();\n }\n this.resetCaptionStream();\n };\n this.reset();\n };\n var captionParser = CaptionParser;\n /**\n * Returns the first string in the data array ending with a null char '\\0'\n * @param {UInt8} data \n * @returns the string with the null char\n */\n\n var uint8ToCString$1 = function (data) {\n var index = 0;\n var curChar = String.fromCharCode(data[index]);\n var retString = '';\n while (curChar !== '\\0') {\n retString += curChar;\n index++;\n curChar = String.fromCharCode(data[index]);\n } // Add nullChar\n\n retString += curChar;\n return retString;\n };\n var string = {\n uint8ToCString: uint8ToCString$1\n };\n var uint8ToCString = string.uint8ToCString;\n var getUint64$1 = numbers.getUint64;\n /**\n * Based on: ISO/IEC 23009 Section: 5.10.3.3\n * References:\n * https://dashif-documents.azurewebsites.net/Events/master/event.html#emsg-format\n * https://aomediacodec.github.io/id3-emsg/\n * \n * Takes emsg box data as a uint8 array and returns a emsg box object\n * @param {UInt8Array} boxData data from emsg box\n * @returns A parsed emsg box object\n */\n\n var parseEmsgBox = function (boxData) {\n // version + flags\n var offset = 4;\n var version = boxData[0];\n var scheme_id_uri, value, timescale, presentation_time, presentation_time_delta, event_duration, id, message_data;\n if (version === 0) {\n scheme_id_uri = uint8ToCString(boxData.subarray(offset));\n offset += scheme_id_uri.length;\n value = uint8ToCString(boxData.subarray(offset));\n offset += value.length;\n var dv = new DataView(boxData.buffer);\n timescale = dv.getUint32(offset);\n offset += 4;\n presentation_time_delta = dv.getUint32(offset);\n offset += 4;\n event_duration = dv.getUint32(offset);\n offset += 4;\n id = dv.getUint32(offset);\n offset += 4;\n } else if (version === 1) {\n var dv = new DataView(boxData.buffer);\n timescale = dv.getUint32(offset);\n offset += 4;\n presentation_time = getUint64$1(boxData.subarray(offset));\n offset += 8;\n event_duration = dv.getUint32(offset);\n offset += 4;\n id = dv.getUint32(offset);\n offset += 4;\n scheme_id_uri = uint8ToCString(boxData.subarray(offset));\n offset += scheme_id_uri.length;\n value = uint8ToCString(boxData.subarray(offset));\n offset += value.length;\n }\n message_data = new Uint8Array(boxData.subarray(offset, boxData.byteLength));\n var emsgBox = {\n scheme_id_uri,\n value,\n // if timescale is undefined or 0 set to 1 \n timescale: timescale ? timescale : 1,\n presentation_time,\n presentation_time_delta,\n event_duration,\n id,\n message_data\n };\n return isValidEmsgBox(version, emsgBox) ? emsgBox : undefined;\n };\n /**\n * Scales a presentation time or time delta with an offset with a provided timescale\n * @param {number} presentationTime \n * @param {number} timescale \n * @param {number} timeDelta \n * @param {number} offset \n * @returns the scaled time as a number\n */\n\n var scaleTime = function (presentationTime, timescale, timeDelta, offset) {\n return presentationTime || presentationTime === 0 ? presentationTime / timescale : offset + timeDelta / timescale;\n };\n /**\n * Checks the emsg box data for validity based on the version\n * @param {number} version of the emsg box to validate\n * @param {Object} emsg the emsg data to validate\n * @returns if the box is valid as a boolean\n */\n\n var isValidEmsgBox = function (version, emsg) {\n var hasScheme = emsg.scheme_id_uri !== '\\0';\n var isValidV0Box = version === 0 && isDefined(emsg.presentation_time_delta) && hasScheme;\n var isValidV1Box = version === 1 && isDefined(emsg.presentation_time) && hasScheme; // Only valid versions of emsg are 0 and 1\n\n return !(version > 1) && isValidV0Box || isValidV1Box;\n }; // Utility function to check if an object is defined\n\n var isDefined = function (data) {\n return data !== undefined || data !== null;\n };\n var emsg$1 = {\n parseEmsgBox: parseEmsgBox,\n scaleTime: scaleTime\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Utilities to detect basic properties and metadata about MP4s.\n */\n\n var toUnsigned = bin.toUnsigned;\n var toHexString = bin.toHexString;\n var findBox = findBox_1;\n var parseType$1 = parseType_1;\n var emsg = emsg$1;\n var parseTfhd = parseTfhd$2;\n var parseTrun = parseTrun$2;\n var parseTfdt = parseTfdt$2;\n var getUint64 = numbers.getUint64;\n var timescale, startTime, compositionStartTime, getVideoTrackIds, getTracks, getTimescaleFromMediaHeader, getEmsgID3;\n var window$1 = window_1;\n var parseId3Frames = parseId3.parseId3Frames;\n /**\n * Parses an MP4 initialization segment and extracts the timescale\n * values for any declared tracks. Timescale values indicate the\n * number of clock ticks per second to assume for time-based values\n * elsewhere in the MP4.\n *\n * To determine the start time of an MP4, you need two pieces of\n * information: the timescale unit and the earliest base media decode\n * time. Multiple timescales can be specified within an MP4 but the\n * base media decode time is always expressed in the timescale from\n * the media header box for the track:\n * ```\n * moov > trak > mdia > mdhd.timescale\n * ```\n * @param init {Uint8Array} the bytes of the init segment\n * @return {object} a hash of track ids to timescale values or null if\n * the init segment is malformed.\n */\n\n timescale = function (init) {\n var result = {},\n traks = findBox(init, ['moov', 'trak']); // mdhd timescale\n\n return traks.reduce(function (result, trak) {\n var tkhd, version, index, id, mdhd;\n tkhd = findBox(trak, ['tkhd'])[0];\n if (!tkhd) {\n return null;\n }\n version = tkhd[0];\n index = version === 0 ? 12 : 20;\n id = toUnsigned(tkhd[index] << 24 | tkhd[index + 1] << 16 | tkhd[index + 2] << 8 | tkhd[index + 3]);\n mdhd = findBox(trak, ['mdia', 'mdhd'])[0];\n if (!mdhd) {\n return null;\n }\n version = mdhd[0];\n index = version === 0 ? 12 : 20;\n result[id] = toUnsigned(mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]);\n return result;\n }, result);\n };\n /**\n * Determine the base media decode start time, in seconds, for an MP4\n * fragment. If multiple fragments are specified, the earliest time is\n * returned.\n *\n * The base media decode time can be parsed from track fragment\n * metadata:\n * ```\n * moof > traf > tfdt.baseMediaDecodeTime\n * ```\n * It requires the timescale value from the mdhd to interpret.\n *\n * @param timescale {object} a hash of track ids to timescale values.\n * @return {number} the earliest base media decode start time for the\n * fragment, in seconds\n */\n\n startTime = function (timescale, fragment) {\n var trafs; // we need info from two childrend of each track fragment box\n\n trafs = findBox(fragment, ['moof', 'traf']); // determine the start times for each track\n\n var lowestTime = trafs.reduce(function (acc, traf) {\n var tfhd = findBox(traf, ['tfhd'])[0]; // get the track id from the tfhd\n\n var id = toUnsigned(tfhd[4] << 24 | tfhd[5] << 16 | tfhd[6] << 8 | tfhd[7]); // assume a 90kHz clock if no timescale was specified\n\n var scale = timescale[id] || 90e3; // get the base media decode time from the tfdt\n\n var tfdt = findBox(traf, ['tfdt'])[0];\n var dv = new DataView(tfdt.buffer, tfdt.byteOffset, tfdt.byteLength);\n var baseTime; // version 1 is 64 bit\n\n if (tfdt[0] === 1) {\n baseTime = getUint64(tfdt.subarray(4, 12));\n } else {\n baseTime = dv.getUint32(4);\n } // convert base time to seconds if it is a valid number.\n\n let seconds;\n if (typeof baseTime === 'bigint') {\n seconds = baseTime / window$1.BigInt(scale);\n } else if (typeof baseTime === 'number' && !isNaN(baseTime)) {\n seconds = baseTime / scale;\n }\n if (seconds < Number.MAX_SAFE_INTEGER) {\n seconds = Number(seconds);\n }\n if (seconds < acc) {\n acc = seconds;\n }\n return acc;\n }, Infinity);\n return typeof lowestTime === 'bigint' || isFinite(lowestTime) ? lowestTime : 0;\n };\n /**\n * Determine the composition start, in seconds, for an MP4\n * fragment.\n *\n * The composition start time of a fragment can be calculated using the base\n * media decode time, composition time offset, and timescale, as follows:\n *\n * compositionStartTime = (baseMediaDecodeTime + compositionTimeOffset) / timescale\n *\n * All of the aforementioned information is contained within a media fragment's\n * `traf` box, except for timescale info, which comes from the initialization\n * segment, so a track id (also contained within a `traf`) is also necessary to\n * associate it with a timescale\n *\n *\n * @param timescales {object} - a hash of track ids to timescale values.\n * @param fragment {Unit8Array} - the bytes of a media segment\n * @return {number} the composition start time for the fragment, in seconds\n **/\n\n compositionStartTime = function (timescales, fragment) {\n var trafBoxes = findBox(fragment, ['moof', 'traf']);\n var baseMediaDecodeTime = 0;\n var compositionTimeOffset = 0;\n var trackId;\n if (trafBoxes && trafBoxes.length) {\n // The spec states that track run samples contained within a `traf` box are contiguous, but\n // it does not explicitly state whether the `traf` boxes themselves are contiguous.\n // We will assume that they are, so we only need the first to calculate start time.\n var tfhd = findBox(trafBoxes[0], ['tfhd'])[0];\n var trun = findBox(trafBoxes[0], ['trun'])[0];\n var tfdt = findBox(trafBoxes[0], ['tfdt'])[0];\n if (tfhd) {\n var parsedTfhd = parseTfhd(tfhd);\n trackId = parsedTfhd.trackId;\n }\n if (tfdt) {\n var parsedTfdt = parseTfdt(tfdt);\n baseMediaDecodeTime = parsedTfdt.baseMediaDecodeTime;\n }\n if (trun) {\n var parsedTrun = parseTrun(trun);\n if (parsedTrun.samples && parsedTrun.samples.length) {\n compositionTimeOffset = parsedTrun.samples[0].compositionTimeOffset || 0;\n }\n }\n } // Get timescale for this specific track. Assume a 90kHz clock if no timescale was\n // specified.\n\n var timescale = timescales[trackId] || 90e3; // return the composition start time, in seconds\n\n if (typeof baseMediaDecodeTime === 'bigint') {\n compositionTimeOffset = window$1.BigInt(compositionTimeOffset);\n timescale = window$1.BigInt(timescale);\n }\n var result = (baseMediaDecodeTime + compositionTimeOffset) / timescale;\n if (typeof result === 'bigint' && result < Number.MAX_SAFE_INTEGER) {\n result = Number(result);\n }\n return result;\n };\n /**\n * Find the trackIds of the video tracks in this source.\n * Found by parsing the Handler Reference and Track Header Boxes:\n * moov > trak > mdia > hdlr\n * moov > trak > tkhd\n *\n * @param {Uint8Array} init - The bytes of the init segment for this source\n * @return {Number[]} A list of trackIds\n *\n * @see ISO-BMFF-12/2015, Section 8.4.3\n **/\n\n getVideoTrackIds = function (init) {\n var traks = findBox(init, ['moov', 'trak']);\n var videoTrackIds = [];\n traks.forEach(function (trak) {\n var hdlrs = findBox(trak, ['mdia', 'hdlr']);\n var tkhds = findBox(trak, ['tkhd']);\n hdlrs.forEach(function (hdlr, index) {\n var handlerType = parseType$1(hdlr.subarray(8, 12));\n var tkhd = tkhds[index];\n var view;\n var version;\n var trackId;\n if (handlerType === 'vide') {\n view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n version = view.getUint8(0);\n trackId = version === 0 ? view.getUint32(12) : view.getUint32(20);\n videoTrackIds.push(trackId);\n }\n });\n });\n return videoTrackIds;\n };\n getTimescaleFromMediaHeader = function (mdhd) {\n // mdhd is a FullBox, meaning it will have its own version as the first byte\n var version = mdhd[0];\n var index = version === 0 ? 12 : 20;\n return toUnsigned(mdhd[index] << 24 | mdhd[index + 1] << 16 | mdhd[index + 2] << 8 | mdhd[index + 3]);\n };\n /**\n * Get all the video, audio, and hint tracks from a non fragmented\n * mp4 segment\n */\n\n getTracks = function (init) {\n var traks = findBox(init, ['moov', 'trak']);\n var tracks = [];\n traks.forEach(function (trak) {\n var track = {};\n var tkhd = findBox(trak, ['tkhd'])[0];\n var view, tkhdVersion; // id\n\n if (tkhd) {\n view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\n tkhdVersion = view.getUint8(0);\n track.id = tkhdVersion === 0 ? view.getUint32(12) : view.getUint32(20);\n }\n var hdlr = findBox(trak, ['mdia', 'hdlr'])[0]; // type\n\n if (hdlr) {\n var type = parseType$1(hdlr.subarray(8, 12));\n if (type === 'vide') {\n track.type = 'video';\n } else if (type === 'soun') {\n track.type = 'audio';\n } else {\n track.type = type;\n }\n } // codec\n\n var stsd = findBox(trak, ['mdia', 'minf', 'stbl', 'stsd'])[0];\n if (stsd) {\n var sampleDescriptions = stsd.subarray(8); // gives the codec type string\n\n track.codec = parseType$1(sampleDescriptions.subarray(4, 8));\n var codecBox = findBox(sampleDescriptions, [track.codec])[0];\n var codecConfig, codecConfigType;\n if (codecBox) {\n // https://tools.ietf.org/html/rfc6381#section-3.3\n if (/^[asm]vc[1-9]$/i.test(track.codec)) {\n // we don't need anything but the \"config\" parameter of the\n // avc1 codecBox\n codecConfig = codecBox.subarray(78);\n codecConfigType = parseType$1(codecConfig.subarray(4, 8));\n if (codecConfigType === 'avcC' && codecConfig.length > 11) {\n track.codec += '.'; // left padded with zeroes for single digit hex\n // profile idc\n\n track.codec += toHexString(codecConfig[9]); // the byte containing the constraint_set flags\n\n track.codec += toHexString(codecConfig[10]); // level idc\n\n track.codec += toHexString(codecConfig[11]);\n } else {\n // TODO: show a warning that we couldn't parse the codec\n // and are using the default\n track.codec = 'avc1.4d400d';\n }\n } else if (/^mp4[a,v]$/i.test(track.codec)) {\n // we do not need anything but the streamDescriptor of the mp4a codecBox\n codecConfig = codecBox.subarray(28);\n codecConfigType = parseType$1(codecConfig.subarray(4, 8));\n if (codecConfigType === 'esds' && codecConfig.length > 20 && codecConfig[19] !== 0) {\n track.codec += '.' + toHexString(codecConfig[19]); // this value is only a single digit\n\n track.codec += '.' + toHexString(codecConfig[20] >>> 2 & 0x3f).replace(/^0/, '');\n } else {\n // TODO: show a warning that we couldn't parse the codec\n // and are using the default\n track.codec = 'mp4a.40.2';\n }\n } else {\n // flac, opus, etc\n track.codec = track.codec.toLowerCase();\n }\n }\n }\n var mdhd = findBox(trak, ['mdia', 'mdhd'])[0];\n if (mdhd) {\n track.timescale = getTimescaleFromMediaHeader(mdhd);\n }\n tracks.push(track);\n });\n return tracks;\n };\n /**\n * Returns an array of emsg ID3 data from the provided segmentData.\n * An offset can also be provided as the Latest Arrival Time to calculate \n * the Event Start Time of v0 EMSG boxes. \n * See: https://dashif-documents.azurewebsites.net/Events/master/event.html#Inband-event-timing\n * \n * @param {Uint8Array} segmentData the segment byte array.\n * @param {number} offset the segment start time or Latest Arrival Time, \n * @return {Object[]} an array of ID3 parsed from EMSG boxes\n */\n\n getEmsgID3 = function (segmentData, offset = 0) {\n var emsgBoxes = findBox(segmentData, ['emsg']);\n return emsgBoxes.map(data => {\n var parsedBox = emsg.parseEmsgBox(new Uint8Array(data));\n var parsedId3Frames = parseId3Frames(parsedBox.message_data);\n return {\n cueTime: emsg.scaleTime(parsedBox.presentation_time, parsedBox.timescale, parsedBox.presentation_time_delta, offset),\n duration: emsg.scaleTime(parsedBox.event_duration, parsedBox.timescale),\n frames: parsedId3Frames\n };\n });\n };\n var probe$2 = {\n // export mp4 inspector's findBox and parseType for backwards compatibility\n findBox: findBox,\n parseType: parseType$1,\n timescale: timescale,\n startTime: startTime,\n compositionStartTime: compositionStartTime,\n videoTrackIds: getVideoTrackIds,\n tracks: getTracks,\n getTimescaleFromMediaHeader: getTimescaleFromMediaHeader,\n getEmsgID3: getEmsgID3\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Utilities to detect basic properties and metadata about TS Segments.\n */\n\n var StreamTypes$1 = streamTypes;\n var parsePid = function (packet) {\n var pid = packet[1] & 0x1f;\n pid <<= 8;\n pid |= packet[2];\n return pid;\n };\n var parsePayloadUnitStartIndicator = function (packet) {\n return !!(packet[1] & 0x40);\n };\n var parseAdaptionField = function (packet) {\n var offset = 0; // if an adaption field is present, its length is specified by the\n // fifth byte of the TS packet header. The adaptation field is\n // used to add stuffing to PES packets that don't fill a complete\n // TS packet, and to specify some forms of timing and control data\n // that we do not currently use.\n\n if ((packet[3] & 0x30) >>> 4 > 0x01) {\n offset += packet[4] + 1;\n }\n return offset;\n };\n var parseType = function (packet, pmtPid) {\n var pid = parsePid(packet);\n if (pid === 0) {\n return 'pat';\n } else if (pid === pmtPid) {\n return 'pmt';\n } else if (pmtPid) {\n return 'pes';\n }\n return null;\n };\n var parsePat = function (packet) {\n var pusi = parsePayloadUnitStartIndicator(packet);\n var offset = 4 + parseAdaptionField(packet);\n if (pusi) {\n offset += packet[offset] + 1;\n }\n return (packet[offset + 10] & 0x1f) << 8 | packet[offset + 11];\n };\n var parsePmt = function (packet) {\n var programMapTable = {};\n var pusi = parsePayloadUnitStartIndicator(packet);\n var payloadOffset = 4 + parseAdaptionField(packet);\n if (pusi) {\n payloadOffset += packet[payloadOffset] + 1;\n } // PMTs can be sent ahead of the time when they should actually\n // take effect. We don't believe this should ever be the case\n // for HLS but we'll ignore \"forward\" PMT declarations if we see\n // them. Future PMT declarations have the current_next_indicator\n // set to zero.\n\n if (!(packet[payloadOffset + 5] & 0x01)) {\n return;\n }\n var sectionLength, tableEnd, programInfoLength; // the mapping table ends at the end of the current section\n\n sectionLength = (packet[payloadOffset + 1] & 0x0f) << 8 | packet[payloadOffset + 2];\n tableEnd = 3 + sectionLength - 4; // to determine where the table is, we have to figure out how\n // long the program info descriptors are\n\n programInfoLength = (packet[payloadOffset + 10] & 0x0f) << 8 | packet[payloadOffset + 11]; // advance the offset to the first entry in the mapping table\n\n var offset = 12 + programInfoLength;\n while (offset < tableEnd) {\n var i = payloadOffset + offset; // add an entry that maps the elementary_pid to the stream_type\n\n programMapTable[(packet[i + 1] & 0x1F) << 8 | packet[i + 2]] = packet[i]; // move to the next table entry\n // skip past the elementary stream descriptors, if present\n\n offset += ((packet[i + 3] & 0x0F) << 8 | packet[i + 4]) + 5;\n }\n return programMapTable;\n };\n var parsePesType = function (packet, programMapTable) {\n var pid = parsePid(packet);\n var type = programMapTable[pid];\n switch (type) {\n case StreamTypes$1.H264_STREAM_TYPE:\n return 'video';\n case StreamTypes$1.ADTS_STREAM_TYPE:\n return 'audio';\n case StreamTypes$1.METADATA_STREAM_TYPE:\n return 'timed-metadata';\n default:\n return null;\n }\n };\n var parsePesTime = function (packet) {\n var pusi = parsePayloadUnitStartIndicator(packet);\n if (!pusi) {\n return null;\n }\n var offset = 4 + parseAdaptionField(packet);\n if (offset >= packet.byteLength) {\n // From the H 222.0 MPEG-TS spec\n // \"For transport stream packets carrying PES packets, stuffing is needed when there\n // is insufficient PES packet data to completely fill the transport stream packet\n // payload bytes. Stuffing is accomplished by defining an adaptation field longer than\n // the sum of the lengths of the data elements in it, so that the payload bytes\n // remaining after the adaptation field exactly accommodates the available PES packet\n // data.\"\n //\n // If the offset is >= the length of the packet, then the packet contains no data\n // and instead is just adaption field stuffing bytes\n return null;\n }\n var pes = null;\n var ptsDtsFlags; // PES packets may be annotated with a PTS value, or a PTS value\n // and a DTS value. Determine what combination of values is\n // available to work with.\n\n ptsDtsFlags = packet[offset + 7]; // PTS and DTS are normally stored as a 33-bit number. Javascript\n // performs all bitwise operations on 32-bit integers but javascript\n // supports a much greater range (52-bits) of integer using standard\n // mathematical operations.\n // We construct a 31-bit value using bitwise operators over the 31\n // most significant bits and then multiply by 4 (equal to a left-shift\n // of 2) before we add the final 2 least significant bits of the\n // timestamp (equal to an OR.)\n\n if (ptsDtsFlags & 0xC0) {\n pes = {}; // the PTS and DTS are not written out directly. For information\n // on how they are encoded, see\n // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n\n pes.pts = (packet[offset + 9] & 0x0E) << 27 | (packet[offset + 10] & 0xFF) << 20 | (packet[offset + 11] & 0xFE) << 12 | (packet[offset + 12] & 0xFF) << 5 | (packet[offset + 13] & 0xFE) >>> 3;\n pes.pts *= 4; // Left shift by 2\n\n pes.pts += (packet[offset + 13] & 0x06) >>> 1; // OR by the two LSBs\n\n pes.dts = pes.pts;\n if (ptsDtsFlags & 0x40) {\n pes.dts = (packet[offset + 14] & 0x0E) << 27 | (packet[offset + 15] & 0xFF) << 20 | (packet[offset + 16] & 0xFE) << 12 | (packet[offset + 17] & 0xFF) << 5 | (packet[offset + 18] & 0xFE) >>> 3;\n pes.dts *= 4; // Left shift by 2\n\n pes.dts += (packet[offset + 18] & 0x06) >>> 1; // OR by the two LSBs\n }\n }\n\n return pes;\n };\n var parseNalUnitType = function (type) {\n switch (type) {\n case 0x05:\n return 'slice_layer_without_partitioning_rbsp_idr';\n case 0x06:\n return 'sei_rbsp';\n case 0x07:\n return 'seq_parameter_set_rbsp';\n case 0x08:\n return 'pic_parameter_set_rbsp';\n case 0x09:\n return 'access_unit_delimiter_rbsp';\n default:\n return null;\n }\n };\n var videoPacketContainsKeyFrame = function (packet) {\n var offset = 4 + parseAdaptionField(packet);\n var frameBuffer = packet.subarray(offset);\n var frameI = 0;\n var frameSyncPoint = 0;\n var foundKeyFrame = false;\n var nalType; // advance the sync point to a NAL start, if necessary\n\n for (; frameSyncPoint < frameBuffer.byteLength - 3; frameSyncPoint++) {\n if (frameBuffer[frameSyncPoint + 2] === 1) {\n // the sync point is properly aligned\n frameI = frameSyncPoint + 5;\n break;\n }\n }\n while (frameI < frameBuffer.byteLength) {\n // look at the current byte to determine if we've hit the end of\n // a NAL unit boundary\n switch (frameBuffer[frameI]) {\n case 0:\n // skip past non-sync sequences\n if (frameBuffer[frameI - 1] !== 0) {\n frameI += 2;\n break;\n } else if (frameBuffer[frameI - 2] !== 0) {\n frameI++;\n break;\n }\n if (frameSyncPoint + 3 !== frameI - 2) {\n nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n foundKeyFrame = true;\n }\n } // drop trailing zeroes\n\n do {\n frameI++;\n } while (frameBuffer[frameI] !== 1 && frameI < frameBuffer.length);\n frameSyncPoint = frameI - 2;\n frameI += 3;\n break;\n case 1:\n // skip past non-sync sequences\n if (frameBuffer[frameI - 1] !== 0 || frameBuffer[frameI - 2] !== 0) {\n frameI += 3;\n break;\n }\n nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n foundKeyFrame = true;\n }\n frameSyncPoint = frameI - 2;\n frameI += 3;\n break;\n default:\n // the current byte isn't a one or zero, so it cannot be part\n // of a sync sequence\n frameI += 3;\n break;\n }\n }\n frameBuffer = frameBuffer.subarray(frameSyncPoint);\n frameI -= frameSyncPoint;\n frameSyncPoint = 0; // parse the final nal\n\n if (frameBuffer && frameBuffer.byteLength > 3) {\n nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\n if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\n foundKeyFrame = true;\n }\n }\n return foundKeyFrame;\n };\n var probe$1 = {\n parseType: parseType,\n parsePat: parsePat,\n parsePmt: parsePmt,\n parsePayloadUnitStartIndicator: parsePayloadUnitStartIndicator,\n parsePesType: parsePesType,\n parsePesTime: parsePesTime,\n videoPacketContainsKeyFrame: videoPacketContainsKeyFrame\n };\n /**\n * mux.js\n *\n * Copyright (c) Brightcove\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\n *\n * Parse mpeg2 transport stream packets to extract basic timing information\n */\n\n var StreamTypes = streamTypes;\n var handleRollover = timestampRolloverStream.handleRollover;\n var probe = {};\n probe.ts = probe$1;\n probe.aac = utils;\n var ONE_SECOND_IN_TS = clock$2.ONE_SECOND_IN_TS;\n var MP2T_PACKET_LENGTH = 188,\n // bytes\n SYNC_BYTE = 0x47;\n /**\n * walks through segment data looking for pat and pmt packets to parse out\n * program map table information\n */\n\n var parsePsi_ = function (bytes, pmt) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH,\n packet,\n type;\n while (endIndex < bytes.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pat':\n pmt.pid = probe.ts.parsePat(packet);\n break;\n case 'pmt':\n var table = probe.ts.parsePmt(packet);\n pmt.table = pmt.table || {};\n Object.keys(table).forEach(function (key) {\n pmt.table[key] = table[key];\n });\n break;\n }\n startIndex += MP2T_PACKET_LENGTH;\n endIndex += MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex++;\n endIndex++;\n }\n };\n /**\n * walks through the segment data from the start and end to get timing information\n * for the first and last audio pes packets\n */\n\n var parseAudioPes_ = function (bytes, pmt, result) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH,\n packet,\n type,\n pesType,\n pusi,\n parsed;\n var endLoop = false; // Start walking from start of segment to get first audio packet\n\n while (endIndex <= bytes.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n if (pesType === 'audio' && pusi) {\n parsed = probe.ts.parsePesTime(packet);\n if (parsed) {\n parsed.type = 'audio';\n result.audio.push(parsed);\n endLoop = true;\n }\n }\n break;\n }\n if (endLoop) {\n break;\n }\n startIndex += MP2T_PACKET_LENGTH;\n endIndex += MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex++;\n endIndex++;\n } // Start walking from end of segment to get last audio packet\n\n endIndex = bytes.byteLength;\n startIndex = endIndex - MP2T_PACKET_LENGTH;\n endLoop = false;\n while (startIndex >= 0) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n if (pesType === 'audio' && pusi) {\n parsed = probe.ts.parsePesTime(packet);\n if (parsed) {\n parsed.type = 'audio';\n result.audio.push(parsed);\n endLoop = true;\n }\n }\n break;\n }\n if (endLoop) {\n break;\n }\n startIndex -= MP2T_PACKET_LENGTH;\n endIndex -= MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex--;\n endIndex--;\n }\n };\n /**\n * walks through the segment data from the start and end to get timing information\n * for the first and last video pes packets as well as timing information for the first\n * key frame.\n */\n\n var parseVideoPes_ = function (bytes, pmt, result) {\n var startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH,\n packet,\n type,\n pesType,\n pusi,\n parsed,\n frame,\n i,\n pes;\n var endLoop = false;\n var currentFrame = {\n data: [],\n size: 0\n }; // Start walking from start of segment to get first video packet\n\n while (endIndex < bytes.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n if (pesType === 'video') {\n if (pusi && !endLoop) {\n parsed = probe.ts.parsePesTime(packet);\n if (parsed) {\n parsed.type = 'video';\n result.video.push(parsed);\n endLoop = true;\n }\n }\n if (!result.firstKeyFrame) {\n if (pusi) {\n if (currentFrame.size !== 0) {\n frame = new Uint8Array(currentFrame.size);\n i = 0;\n while (currentFrame.data.length) {\n pes = currentFrame.data.shift();\n frame.set(pes, i);\n i += pes.byteLength;\n }\n if (probe.ts.videoPacketContainsKeyFrame(frame)) {\n var firstKeyFrame = probe.ts.parsePesTime(frame); // PTS/DTS may not be available. Simply *not* setting\n // the keyframe seems to work fine with HLS playback\n // and definitely preferable to a crash with TypeError...\n\n if (firstKeyFrame) {\n result.firstKeyFrame = firstKeyFrame;\n result.firstKeyFrame.type = 'video';\n } else {\n // eslint-disable-next-line\n console.warn('Failed to extract PTS/DTS from PES at first keyframe. ' + 'This could be an unusual TS segment, or else mux.js did not ' + 'parse your TS segment correctly. If you know your TS ' + 'segments do contain PTS/DTS on keyframes please file a bug ' + 'report! You can try ffprobe to double check for yourself.');\n }\n }\n currentFrame.size = 0;\n }\n }\n currentFrame.data.push(packet);\n currentFrame.size += packet.byteLength;\n }\n }\n break;\n }\n if (endLoop && result.firstKeyFrame) {\n break;\n }\n startIndex += MP2T_PACKET_LENGTH;\n endIndex += MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex++;\n endIndex++;\n } // Start walking from end of segment to get last video packet\n\n endIndex = bytes.byteLength;\n startIndex = endIndex - MP2T_PACKET_LENGTH;\n endLoop = false;\n while (startIndex >= 0) {\n // Look for a pair of start and end sync bytes in the data..\n if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\n // We found a packet\n packet = bytes.subarray(startIndex, endIndex);\n type = probe.ts.parseType(packet, pmt.pid);\n switch (type) {\n case 'pes':\n pesType = probe.ts.parsePesType(packet, pmt.table);\n pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\n if (pesType === 'video' && pusi) {\n parsed = probe.ts.parsePesTime(packet);\n if (parsed) {\n parsed.type = 'video';\n result.video.push(parsed);\n endLoop = true;\n }\n }\n break;\n }\n if (endLoop) {\n break;\n }\n startIndex -= MP2T_PACKET_LENGTH;\n endIndex -= MP2T_PACKET_LENGTH;\n continue;\n } // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n\n startIndex--;\n endIndex--;\n }\n };\n /**\n * Adjusts the timestamp information for the segment to account for\n * rollover and convert to seconds based on pes packet timescale (90khz clock)\n */\n\n var adjustTimestamp_ = function (segmentInfo, baseTimestamp) {\n if (segmentInfo.audio && segmentInfo.audio.length) {\n var audioBaseTimestamp = baseTimestamp;\n if (typeof audioBaseTimestamp === 'undefined' || isNaN(audioBaseTimestamp)) {\n audioBaseTimestamp = segmentInfo.audio[0].dts;\n }\n segmentInfo.audio.forEach(function (info) {\n info.dts = handleRollover(info.dts, audioBaseTimestamp);\n info.pts = handleRollover(info.pts, audioBaseTimestamp); // time in seconds\n\n info.dtsTime = info.dts / ONE_SECOND_IN_TS;\n info.ptsTime = info.pts / ONE_SECOND_IN_TS;\n });\n }\n if (segmentInfo.video && segmentInfo.video.length) {\n var videoBaseTimestamp = baseTimestamp;\n if (typeof videoBaseTimestamp === 'undefined' || isNaN(videoBaseTimestamp)) {\n videoBaseTimestamp = segmentInfo.video[0].dts;\n }\n segmentInfo.video.forEach(function (info) {\n info.dts = handleRollover(info.dts, videoBaseTimestamp);\n info.pts = handleRollover(info.pts, videoBaseTimestamp); // time in seconds\n\n info.dtsTime = info.dts / ONE_SECOND_IN_TS;\n info.ptsTime = info.pts / ONE_SECOND_IN_TS;\n });\n if (segmentInfo.firstKeyFrame) {\n var frame = segmentInfo.firstKeyFrame;\n frame.dts = handleRollover(frame.dts, videoBaseTimestamp);\n frame.pts = handleRollover(frame.pts, videoBaseTimestamp); // time in seconds\n\n frame.dtsTime = frame.dts / ONE_SECOND_IN_TS;\n frame.ptsTime = frame.pts / ONE_SECOND_IN_TS;\n }\n }\n };\n /**\n * inspects the aac data stream for start and end time information\n */\n\n var inspectAac_ = function (bytes) {\n var endLoop = false,\n audioCount = 0,\n sampleRate = null,\n timestamp = null,\n frameSize = 0,\n byteIndex = 0,\n packet;\n while (bytes.length - byteIndex >= 3) {\n var type = probe.aac.parseType(bytes, byteIndex);\n switch (type) {\n case 'timed-metadata':\n // Exit early because we don't have enough to parse\n // the ID3 tag header\n if (bytes.length - byteIndex < 10) {\n endLoop = true;\n break;\n }\n frameSize = probe.aac.parseId3TagSize(bytes, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n\n if (frameSize > bytes.length) {\n endLoop = true;\n break;\n }\n if (timestamp === null) {\n packet = bytes.subarray(byteIndex, byteIndex + frameSize);\n timestamp = probe.aac.parseAacTimestamp(packet);\n }\n byteIndex += frameSize;\n break;\n case 'audio':\n // Exit early because we don't have enough to parse\n // the ADTS frame header\n if (bytes.length - byteIndex < 7) {\n endLoop = true;\n break;\n }\n frameSize = probe.aac.parseAdtsSize(bytes, byteIndex); // Exit early if we don't have enough in the buffer\n // to emit a full packet\n\n if (frameSize > bytes.length) {\n endLoop = true;\n break;\n }\n if (sampleRate === null) {\n packet = bytes.subarray(byteIndex, byteIndex + frameSize);\n sampleRate = probe.aac.parseSampleRate(packet);\n }\n audioCount++;\n byteIndex += frameSize;\n break;\n default:\n byteIndex++;\n break;\n }\n if (endLoop) {\n return null;\n }\n }\n if (sampleRate === null || timestamp === null) {\n return null;\n }\n var audioTimescale = ONE_SECOND_IN_TS / sampleRate;\n var result = {\n audio: [{\n type: 'audio',\n dts: timestamp,\n pts: timestamp\n }, {\n type: 'audio',\n dts: timestamp + audioCount * 1024 * audioTimescale,\n pts: timestamp + audioCount * 1024 * audioTimescale\n }]\n };\n return result;\n };\n /**\n * inspects the transport stream segment data for start and end time information\n * of the audio and video tracks (when present) as well as the first key frame's\n * start time.\n */\n\n var inspectTs_ = function (bytes) {\n var pmt = {\n pid: null,\n table: null\n };\n var result = {};\n parsePsi_(bytes, pmt);\n for (var pid in pmt.table) {\n if (pmt.table.hasOwnProperty(pid)) {\n var type = pmt.table[pid];\n switch (type) {\n case StreamTypes.H264_STREAM_TYPE:\n result.video = [];\n parseVideoPes_(bytes, pmt, result);\n if (result.video.length === 0) {\n delete result.video;\n }\n break;\n case StreamTypes.ADTS_STREAM_TYPE:\n result.audio = [];\n parseAudioPes_(bytes, pmt, result);\n if (result.audio.length === 0) {\n delete result.audio;\n }\n break;\n }\n }\n }\n return result;\n };\n /**\n * Inspects segment byte data and returns an object with start and end timing information\n *\n * @param {Uint8Array} bytes The segment byte data\n * @param {Number} baseTimestamp Relative reference timestamp used when adjusting frame\n * timestamps for rollover. This value must be in 90khz clock.\n * @return {Object} Object containing start and end frame timing info of segment.\n */\n\n var inspect = function (bytes, baseTimestamp) {\n var isAacData = probe.aac.isLikelyAacData(bytes);\n var result;\n if (isAacData) {\n result = inspectAac_(bytes);\n } else {\n result = inspectTs_(bytes);\n }\n if (!result || !result.audio && !result.video) {\n return null;\n }\n adjustTimestamp_(result, baseTimestamp);\n return result;\n };\n var tsInspector = {\n inspect: inspect,\n parseAudioPes_: parseAudioPes_\n };\n /* global self */\n\n /**\n * Re-emits transmuxer events by converting them into messages to the\n * world outside the worker.\n *\n * @param {Object} transmuxer the transmuxer to wire events on\n * @private\n */\n\n const wireTransmuxerEvents = function (self, transmuxer) {\n transmuxer.on('data', function (segment) {\n // transfer ownership of the underlying ArrayBuffer\n // instead of doing a copy to save memory\n // ArrayBuffers are transferable but generic TypedArrays are not\n // @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers#Passing_data_by_transferring_ownership_(transferable_objects)\n const initArray = segment.initSegment;\n segment.initSegment = {\n data: initArray.buffer,\n byteOffset: initArray.byteOffset,\n byteLength: initArray.byteLength\n };\n const typedArray = segment.data;\n segment.data = typedArray.buffer;\n self.postMessage({\n action: 'data',\n segment,\n byteOffset: typedArray.byteOffset,\n byteLength: typedArray.byteLength\n }, [segment.data]);\n });\n transmuxer.on('done', function (data) {\n self.postMessage({\n action: 'done'\n });\n });\n transmuxer.on('gopInfo', function (gopInfo) {\n self.postMessage({\n action: 'gopInfo',\n gopInfo\n });\n });\n transmuxer.on('videoSegmentTimingInfo', function (timingInfo) {\n const videoSegmentTimingInfo = {\n start: {\n decode: clock$2.videoTsToSeconds(timingInfo.start.dts),\n presentation: clock$2.videoTsToSeconds(timingInfo.start.pts)\n },\n end: {\n decode: clock$2.videoTsToSeconds(timingInfo.end.dts),\n presentation: clock$2.videoTsToSeconds(timingInfo.end.pts)\n },\n baseMediaDecodeTime: clock$2.videoTsToSeconds(timingInfo.baseMediaDecodeTime)\n };\n if (timingInfo.prependedContentDuration) {\n videoSegmentTimingInfo.prependedContentDuration = clock$2.videoTsToSeconds(timingInfo.prependedContentDuration);\n }\n self.postMessage({\n action: 'videoSegmentTimingInfo',\n videoSegmentTimingInfo\n });\n });\n transmuxer.on('audioSegmentTimingInfo', function (timingInfo) {\n // Note that all times for [audio/video]SegmentTimingInfo events are in video clock\n const audioSegmentTimingInfo = {\n start: {\n decode: clock$2.videoTsToSeconds(timingInfo.start.dts),\n presentation: clock$2.videoTsToSeconds(timingInfo.start.pts)\n },\n end: {\n decode: clock$2.videoTsToSeconds(timingInfo.end.dts),\n presentation: clock$2.videoTsToSeconds(timingInfo.end.pts)\n },\n baseMediaDecodeTime: clock$2.videoTsToSeconds(timingInfo.baseMediaDecodeTime)\n };\n if (timingInfo.prependedContentDuration) {\n audioSegmentTimingInfo.prependedContentDuration = clock$2.videoTsToSeconds(timingInfo.prependedContentDuration);\n }\n self.postMessage({\n action: 'audioSegmentTimingInfo',\n audioSegmentTimingInfo\n });\n });\n transmuxer.on('id3Frame', function (id3Frame) {\n self.postMessage({\n action: 'id3Frame',\n id3Frame\n });\n });\n transmuxer.on('caption', function (caption) {\n self.postMessage({\n action: 'caption',\n caption\n });\n });\n transmuxer.on('trackinfo', function (trackInfo) {\n self.postMessage({\n action: 'trackinfo',\n trackInfo\n });\n });\n transmuxer.on('audioTimingInfo', function (audioTimingInfo) {\n // convert to video TS since we prioritize video time over audio\n self.postMessage({\n action: 'audioTimingInfo',\n audioTimingInfo: {\n start: clock$2.videoTsToSeconds(audioTimingInfo.start),\n end: clock$2.videoTsToSeconds(audioTimingInfo.end)\n }\n });\n });\n transmuxer.on('videoTimingInfo', function (videoTimingInfo) {\n self.postMessage({\n action: 'videoTimingInfo',\n videoTimingInfo: {\n start: clock$2.videoTsToSeconds(videoTimingInfo.start),\n end: clock$2.videoTsToSeconds(videoTimingInfo.end)\n }\n });\n });\n transmuxer.on('log', function (log) {\n self.postMessage({\n action: 'log',\n log\n });\n });\n };\n /**\n * All incoming messages route through this hash. If no function exists\n * to handle an incoming message, then we ignore the message.\n *\n * @class MessageHandlers\n * @param {Object} options the options to initialize with\n */\n\n class MessageHandlers {\n constructor(self, options) {\n this.options = options || {};\n this.self = self;\n this.init();\n }\n /**\n * initialize our web worker and wire all the events.\n */\n\n init() {\n if (this.transmuxer) {\n this.transmuxer.dispose();\n }\n this.transmuxer = new transmuxer.Transmuxer(this.options);\n wireTransmuxerEvents(this.self, this.transmuxer);\n }\n pushMp4Captions(data) {\n if (!this.captionParser) {\n this.captionParser = new captionParser();\n this.captionParser.init();\n }\n const segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\n const parsed = this.captionParser.parse(segment, data.trackIds, data.timescales);\n this.self.postMessage({\n action: 'mp4Captions',\n captions: parsed && parsed.captions || [],\n logs: parsed && parsed.logs || [],\n data: segment.buffer\n }, [segment.buffer]);\n }\n probeMp4StartTime({\n timescales,\n data\n }) {\n const startTime = probe$2.startTime(timescales, data);\n this.self.postMessage({\n action: 'probeMp4StartTime',\n startTime,\n data\n }, [data.buffer]);\n }\n probeMp4Tracks({\n data\n }) {\n const tracks = probe$2.tracks(data);\n this.self.postMessage({\n action: 'probeMp4Tracks',\n tracks,\n data\n }, [data.buffer]);\n }\n /**\n * Probes an mp4 segment for EMSG boxes containing ID3 data.\n * https://aomediacodec.github.io/id3-emsg/\n *\n * @param {Uint8Array} data segment data\n * @param {number} offset segment start time\n * @return {Object[]} an array of ID3 frames\n */\n\n probeEmsgID3({\n data,\n offset\n }) {\n const id3Frames = probe$2.getEmsgID3(data, offset);\n this.self.postMessage({\n action: 'probeEmsgID3',\n id3Frames,\n emsgData: data\n }, [data.buffer]);\n }\n /**\n * Probe an mpeg2-ts segment to determine the start time of the segment in it's\n * internal \"media time,\" as well as whether it contains video and/or audio.\n *\n * @private\n * @param {Uint8Array} bytes - segment bytes\n * @param {number} baseStartTime\n * Relative reference timestamp used when adjusting frame timestamps for rollover.\n * This value should be in seconds, as it's converted to a 90khz clock within the\n * function body.\n * @return {Object} The start time of the current segment in \"media time\" as well as\n * whether it contains video and/or audio\n */\n\n probeTs({\n data,\n baseStartTime\n }) {\n const tsStartTime = typeof baseStartTime === 'number' && !isNaN(baseStartTime) ? baseStartTime * clock$2.ONE_SECOND_IN_TS : void 0;\n const timeInfo = tsInspector.inspect(data, tsStartTime);\n let result = null;\n if (timeInfo) {\n result = {\n // each type's time info comes back as an array of 2 times, start and end\n hasVideo: timeInfo.video && timeInfo.video.length === 2 || false,\n hasAudio: timeInfo.audio && timeInfo.audio.length === 2 || false\n };\n if (result.hasVideo) {\n result.videoStart = timeInfo.video[0].ptsTime;\n }\n if (result.hasAudio) {\n result.audioStart = timeInfo.audio[0].ptsTime;\n }\n }\n this.self.postMessage({\n action: 'probeTs',\n result,\n data\n }, [data.buffer]);\n }\n clearAllMp4Captions() {\n if (this.captionParser) {\n this.captionParser.clearAllCaptions();\n }\n }\n clearParsedMp4Captions() {\n if (this.captionParser) {\n this.captionParser.clearParsedCaptions();\n }\n }\n /**\n * Adds data (a ts segment) to the start of the transmuxer pipeline for\n * processing.\n *\n * @param {ArrayBuffer} data data to push into the muxer\n */\n\n push(data) {\n // Cast array buffer to correct type for transmuxer\n const segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\n this.transmuxer.push(segment);\n }\n /**\n * Recreate the transmuxer so that the next segment added via `push`\n * start with a fresh transmuxer.\n */\n\n reset() {\n this.transmuxer.reset();\n }\n /**\n * Set the value that will be used as the `baseMediaDecodeTime` time for the\n * next segment pushed in. Subsequent segments will have their `baseMediaDecodeTime`\n * set relative to the first based on the PTS values.\n *\n * @param {Object} data used to set the timestamp offset in the muxer\n */\n\n setTimestampOffset(data) {\n const timestampOffset = data.timestampOffset || 0;\n this.transmuxer.setBaseMediaDecodeTime(Math.round(clock$2.secondsToVideoTs(timestampOffset)));\n }\n setAudioAppendStart(data) {\n this.transmuxer.setAudioAppendStart(Math.ceil(clock$2.secondsToVideoTs(data.appendStart)));\n }\n setRemux(data) {\n this.transmuxer.setRemux(data.remux);\n }\n /**\n * Forces the pipeline to finish processing the last segment and emit it's\n * results.\n *\n * @param {Object} data event data, not really used\n */\n\n flush(data) {\n this.transmuxer.flush(); // transmuxed done action is fired after both audio/video pipelines are flushed\n\n self.postMessage({\n action: 'done',\n type: 'transmuxed'\n });\n }\n endTimeline() {\n this.transmuxer.endTimeline(); // transmuxed endedtimeline action is fired after both audio/video pipelines end their\n // timelines\n\n self.postMessage({\n action: 'endedtimeline',\n type: 'transmuxed'\n });\n }\n alignGopsWith(data) {\n this.transmuxer.alignGopsWith(data.gopsToAlignWith.slice());\n }\n }\n /**\n * Our web worker interface so that things can talk to mux.js\n * that will be running in a web worker. the scope is passed to this by\n * webworkify.\n *\n * @param {Object} self the scope for the web worker\n */\n\n self.onmessage = function (event) {\n if (event.data.action === 'init' && event.data.options) {\n this.messageHandlers = new MessageHandlers(self, event.data.options);\n return;\n }\n if (!this.messageHandlers) {\n this.messageHandlers = new MessageHandlers(self);\n }\n if (event.data && event.data.action && event.data.action !== 'init') {\n if (this.messageHandlers[event.data.action]) {\n this.messageHandlers[event.data.action](event.data);\n }\n }\n };\n}));\nvar TransmuxWorker = factory(workerCode$1);\n/* rollup-plugin-worker-factory end for worker!/home/runner/work/http-streaming/http-streaming/src/transmuxer-worker.js */\n\nconst handleData_ = (event, transmuxedData, callback) => {\n const {\n type,\n initSegment,\n captions,\n captionStreams,\n metadata,\n videoFrameDtsTime,\n videoFramePtsTime\n } = event.data.segment;\n transmuxedData.buffer.push({\n captions,\n captionStreams,\n metadata\n });\n const boxes = event.data.segment.boxes || {\n data: event.data.segment.data\n };\n const result = {\n type,\n // cast ArrayBuffer to TypedArray\n data: new Uint8Array(boxes.data, boxes.data.byteOffset, boxes.data.byteLength),\n initSegment: new Uint8Array(initSegment.data, initSegment.byteOffset, initSegment.byteLength)\n };\n if (typeof videoFrameDtsTime !== 'undefined') {\n result.videoFrameDtsTime = videoFrameDtsTime;\n }\n if (typeof videoFramePtsTime !== 'undefined') {\n result.videoFramePtsTime = videoFramePtsTime;\n }\n callback(result);\n};\nconst handleDone_ = ({\n transmuxedData,\n callback\n}) => {\n // Previously we only returned data on data events,\n // not on done events. Clear out the buffer to keep that consistent.\n transmuxedData.buffer = []; // all buffers should have been flushed from the muxer, so start processing anything we\n // have received\n\n callback(transmuxedData);\n};\nconst handleGopInfo_ = (event, transmuxedData) => {\n transmuxedData.gopInfo = event.data.gopInfo;\n};\nconst processTransmux = options => {\n const {\n transmuxer,\n bytes,\n audioAppendStart,\n gopsToAlignWith,\n remux,\n onData,\n onTrackInfo,\n onAudioTimingInfo,\n onVideoTimingInfo,\n onVideoSegmentTimingInfo,\n onAudioSegmentTimingInfo,\n onId3,\n onCaptions,\n onDone,\n onEndedTimeline,\n onTransmuxerLog,\n isEndOfTimeline\n } = options;\n const transmuxedData = {\n buffer: []\n };\n let waitForEndedTimelineEvent = isEndOfTimeline;\n const handleMessage = event => {\n if (transmuxer.currentTransmux !== options) {\n // disposed\n return;\n }\n if (event.data.action === 'data') {\n handleData_(event, transmuxedData, onData);\n }\n if (event.data.action === 'trackinfo') {\n onTrackInfo(event.data.trackInfo);\n }\n if (event.data.action === 'gopInfo') {\n handleGopInfo_(event, transmuxedData);\n }\n if (event.data.action === 'audioTimingInfo') {\n onAudioTimingInfo(event.data.audioTimingInfo);\n }\n if (event.data.action === 'videoTimingInfo') {\n onVideoTimingInfo(event.data.videoTimingInfo);\n }\n if (event.data.action === 'videoSegmentTimingInfo') {\n onVideoSegmentTimingInfo(event.data.videoSegmentTimingInfo);\n }\n if (event.data.action === 'audioSegmentTimingInfo') {\n onAudioSegmentTimingInfo(event.data.audioSegmentTimingInfo);\n }\n if (event.data.action === 'id3Frame') {\n onId3([event.data.id3Frame], event.data.id3Frame.dispatchType);\n }\n if (event.data.action === 'caption') {\n onCaptions(event.data.caption);\n }\n if (event.data.action === 'endedtimeline') {\n waitForEndedTimelineEvent = false;\n onEndedTimeline();\n }\n if (event.data.action === 'log') {\n onTransmuxerLog(event.data.log);\n } // wait for the transmuxed event since we may have audio and video\n\n if (event.data.type !== 'transmuxed') {\n return;\n } // If the \"endedtimeline\" event has not yet fired, and this segment represents the end\n // of a timeline, that means there may still be data events before the segment\n // processing can be considerred complete. In that case, the final event should be\n // an \"endedtimeline\" event with the type \"transmuxed.\"\n\n if (waitForEndedTimelineEvent) {\n return;\n }\n transmuxer.onmessage = null;\n handleDone_({\n transmuxedData,\n callback: onDone\n });\n /* eslint-disable no-use-before-define */\n\n dequeue(transmuxer);\n /* eslint-enable */\n };\n\n transmuxer.onmessage = handleMessage;\n if (audioAppendStart) {\n transmuxer.postMessage({\n action: 'setAudioAppendStart',\n appendStart: audioAppendStart\n });\n } // allow empty arrays to be passed to clear out GOPs\n\n if (Array.isArray(gopsToAlignWith)) {\n transmuxer.postMessage({\n action: 'alignGopsWith',\n gopsToAlignWith\n });\n }\n if (typeof remux !== 'undefined') {\n transmuxer.postMessage({\n action: 'setRemux',\n remux\n });\n }\n if (bytes.byteLength) {\n const buffer = bytes instanceof ArrayBuffer ? bytes : bytes.buffer;\n const byteOffset = bytes instanceof ArrayBuffer ? 0 : bytes.byteOffset;\n transmuxer.postMessage({\n action: 'push',\n // Send the typed-array of data as an ArrayBuffer so that\n // it can be sent as a \"Transferable\" and avoid the costly\n // memory copy\n data: buffer,\n // To recreate the original typed-array, we need information\n // about what portion of the ArrayBuffer it was a view into\n byteOffset,\n byteLength: bytes.byteLength\n }, [buffer]);\n }\n if (isEndOfTimeline) {\n transmuxer.postMessage({\n action: 'endTimeline'\n });\n } // even if we didn't push any bytes, we have to make sure we flush in case we reached\n // the end of the segment\n\n transmuxer.postMessage({\n action: 'flush'\n });\n};\nconst dequeue = transmuxer => {\n transmuxer.currentTransmux = null;\n if (transmuxer.transmuxQueue.length) {\n transmuxer.currentTransmux = transmuxer.transmuxQueue.shift();\n if (typeof transmuxer.currentTransmux === 'function') {\n transmuxer.currentTransmux();\n } else {\n processTransmux(transmuxer.currentTransmux);\n }\n }\n};\nconst processAction = (transmuxer, action) => {\n transmuxer.postMessage({\n action\n });\n dequeue(transmuxer);\n};\nconst enqueueAction = (action, transmuxer) => {\n if (!transmuxer.currentTransmux) {\n transmuxer.currentTransmux = action;\n processAction(transmuxer, action);\n return;\n }\n transmuxer.transmuxQueue.push(processAction.bind(null, transmuxer, action));\n};\nconst reset = transmuxer => {\n enqueueAction('reset', transmuxer);\n};\nconst endTimeline = transmuxer => {\n enqueueAction('endTimeline', transmuxer);\n};\nconst transmux = options => {\n if (!options.transmuxer.currentTransmux) {\n options.transmuxer.currentTransmux = options;\n processTransmux(options);\n return;\n }\n options.transmuxer.transmuxQueue.push(options);\n};\nconst createTransmuxer = options => {\n const transmuxer = new TransmuxWorker();\n transmuxer.currentTransmux = null;\n transmuxer.transmuxQueue = [];\n const term = transmuxer.terminate;\n transmuxer.terminate = () => {\n transmuxer.currentTransmux = null;\n transmuxer.transmuxQueue.length = 0;\n return term.call(transmuxer);\n };\n transmuxer.postMessage({\n action: 'init',\n options\n });\n return transmuxer;\n};\nvar segmentTransmuxer = {\n reset,\n endTimeline,\n transmux,\n createTransmuxer\n};\nconst workerCallback = function (options) {\n const transmuxer = options.transmuxer;\n const endAction = options.endAction || options.action;\n const callback = options.callback;\n const message = _extends({}, options, {\n endAction: null,\n transmuxer: null,\n callback: null\n });\n const listenForEndEvent = event => {\n if (event.data.action !== endAction) {\n return;\n }\n transmuxer.removeEventListener('message', listenForEndEvent); // transfer ownership of bytes back to us.\n\n if (event.data.data) {\n event.data.data = new Uint8Array(event.data.data, options.byteOffset || 0, options.byteLength || event.data.data.byteLength);\n if (options.data) {\n options.data = event.data.data;\n }\n }\n callback(event.data);\n };\n transmuxer.addEventListener('message', listenForEndEvent);\n if (options.data) {\n const isArrayBuffer = options.data instanceof ArrayBuffer;\n message.byteOffset = isArrayBuffer ? 0 : options.data.byteOffset;\n message.byteLength = options.data.byteLength;\n const transfers = [isArrayBuffer ? options.data : options.data.buffer];\n transmuxer.postMessage(message, transfers);\n } else {\n transmuxer.postMessage(message);\n }\n};\nconst REQUEST_ERRORS = {\n FAILURE: 2,\n TIMEOUT: -101,\n ABORTED: -102\n};\n/**\n * Abort all requests\n *\n * @param {Object} activeXhrs - an object that tracks all XHR requests\n */\n\nconst abortAll = activeXhrs => {\n activeXhrs.forEach(xhr => {\n xhr.abort();\n });\n};\n/**\n * Gather important bandwidth stats once a request has completed\n *\n * @param {Object} request - the XHR request from which to gather stats\n */\n\nconst getRequestStats = request => {\n return {\n bandwidth: request.bandwidth,\n bytesReceived: request.bytesReceived || 0,\n roundTripTime: request.roundTripTime || 0\n };\n};\n/**\n * If possible gather bandwidth stats as a request is in\n * progress\n *\n * @param {Event} progressEvent - an event object from an XHR's progress event\n */\n\nconst getProgressStats = progressEvent => {\n const request = progressEvent.target;\n const roundTripTime = Date.now() - request.requestTime;\n const stats = {\n bandwidth: Infinity,\n bytesReceived: 0,\n roundTripTime: roundTripTime || 0\n };\n stats.bytesReceived = progressEvent.loaded; // This can result in Infinity if stats.roundTripTime is 0 but that is ok\n // because we should only use bandwidth stats on progress to determine when\n // abort a request early due to insufficient bandwidth\n\n stats.bandwidth = Math.floor(stats.bytesReceived / stats.roundTripTime * 8 * 1000);\n return stats;\n};\n/**\n * Handle all error conditions in one place and return an object\n * with all the information\n *\n * @param {Error|null} error - if non-null signals an error occured with the XHR\n * @param {Object} request - the XHR request that possibly generated the error\n */\n\nconst handleErrors = (error, request) => {\n if (request.timedout) {\n return {\n status: request.status,\n message: 'HLS request timed-out at URL: ' + request.uri,\n code: REQUEST_ERRORS.TIMEOUT,\n xhr: request\n };\n }\n if (request.aborted) {\n return {\n status: request.status,\n message: 'HLS request aborted at URL: ' + request.uri,\n code: REQUEST_ERRORS.ABORTED,\n xhr: request\n };\n }\n if (error) {\n return {\n status: request.status,\n message: 'HLS request errored at URL: ' + request.uri,\n code: REQUEST_ERRORS.FAILURE,\n xhr: request\n };\n }\n if (request.responseType === 'arraybuffer' && request.response.byteLength === 0) {\n return {\n status: request.status,\n message: 'Empty HLS response at URL: ' + request.uri,\n code: REQUEST_ERRORS.FAILURE,\n xhr: request\n };\n }\n return null;\n};\n/**\n * Handle responses for key data and convert the key data to the correct format\n * for the decryption step later\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Array} objects - objects to add the key bytes to.\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n * this request\n */\n\nconst handleKeyResponse = (segment, objects, finishProcessingFn) => (error, request) => {\n const response = request.response;\n const errorObj = handleErrors(error, request);\n if (errorObj) {\n return finishProcessingFn(errorObj, segment);\n }\n if (response.byteLength !== 16) {\n return finishProcessingFn({\n status: request.status,\n message: 'Invalid HLS key at URL: ' + request.uri,\n code: REQUEST_ERRORS.FAILURE,\n xhr: request\n }, segment);\n }\n const view = new DataView(response);\n const bytes = new Uint32Array([view.getUint32(0), view.getUint32(4), view.getUint32(8), view.getUint32(12)]);\n for (let i = 0; i < objects.length; i++) {\n objects[i].bytes = bytes;\n }\n return finishProcessingFn(null, segment);\n};\nconst parseInitSegment = (segment, callback) => {\n const type = detectContainerForBytes(segment.map.bytes); // TODO: We should also handle ts init segments here, but we\n // only know how to parse mp4 init segments at the moment\n\n if (type !== 'mp4') {\n const uri = segment.map.resolvedUri || segment.map.uri;\n const mediaType = type || 'unknown';\n return callback({\n internal: true,\n message: `Found unsupported ${mediaType} container for initialization segment at URL: ${uri}`,\n code: REQUEST_ERRORS.FAILURE,\n metadata: {\n errorType: videojs.Error.UnsupportedMediaInitialization,\n mediaType\n }\n });\n }\n workerCallback({\n action: 'probeMp4Tracks',\n data: segment.map.bytes,\n transmuxer: segment.transmuxer,\n callback: ({\n tracks,\n data\n }) => {\n // transfer bytes back to us\n segment.map.bytes = data;\n tracks.forEach(function (track) {\n segment.map.tracks = segment.map.tracks || {}; // only support one track of each type for now\n\n if (segment.map.tracks[track.type]) {\n return;\n }\n segment.map.tracks[track.type] = track;\n if (typeof track.id === 'number' && track.timescale) {\n segment.map.timescales = segment.map.timescales || {};\n segment.map.timescales[track.id] = track.timescale;\n }\n });\n return callback(null);\n }\n });\n};\n/**\n * Handle init-segment responses\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n * this request\n */\n\nconst handleInitSegmentResponse = ({\n segment,\n finishProcessingFn\n}) => (error, request) => {\n const errorObj = handleErrors(error, request);\n if (errorObj) {\n return finishProcessingFn(errorObj, segment);\n }\n const bytes = new Uint8Array(request.response); // init segment is encypted, we will have to wait\n // until the key request is done to decrypt.\n\n if (segment.map.key) {\n segment.map.encryptedBytes = bytes;\n return finishProcessingFn(null, segment);\n }\n segment.map.bytes = bytes;\n parseInitSegment(segment, function (parseError) {\n if (parseError) {\n parseError.xhr = request;\n parseError.status = request.status;\n return finishProcessingFn(parseError, segment);\n }\n finishProcessingFn(null, segment);\n });\n};\n/**\n * Response handler for segment-requests being sure to set the correct\n * property depending on whether the segment is encryped or not\n * Also records and keeps track of stats that are used for ABR purposes\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\n * this request\n */\n\nconst handleSegmentResponse = ({\n segment,\n finishProcessingFn,\n responseType\n}) => (error, request) => {\n const errorObj = handleErrors(error, request);\n if (errorObj) {\n return finishProcessingFn(errorObj, segment);\n }\n const newBytes =\n // although responseText \"should\" exist, this guard serves to prevent an error being\n // thrown for two primary cases:\n // 1. the mime type override stops working, or is not implemented for a specific\n // browser\n // 2. when using mock XHR libraries like sinon that do not allow the override behavior\n responseType === 'arraybuffer' || !request.responseText ? request.response : stringToArrayBuffer(request.responseText.substring(segment.lastReachedChar || 0));\n segment.stats = getRequestStats(request);\n if (segment.key) {\n segment.encryptedBytes = new Uint8Array(newBytes);\n } else {\n segment.bytes = new Uint8Array(newBytes);\n }\n return finishProcessingFn(null, segment);\n};\nconst transmuxAndNotify = ({\n segment,\n bytes,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n}) => {\n const fmp4Tracks = segment.map && segment.map.tracks || {};\n const isMuxed = Boolean(fmp4Tracks.audio && fmp4Tracks.video); // Keep references to each function so we can null them out after we're done with them.\n // One reason for this is that in the case of full segments, we want to trust start\n // times from the probe, rather than the transmuxer.\n\n let audioStartFn = timingInfoFn.bind(null, segment, 'audio', 'start');\n const audioEndFn = timingInfoFn.bind(null, segment, 'audio', 'end');\n let videoStartFn = timingInfoFn.bind(null, segment, 'video', 'start');\n const videoEndFn = timingInfoFn.bind(null, segment, 'video', 'end');\n const finish = () => transmux({\n bytes,\n transmuxer: segment.transmuxer,\n audioAppendStart: segment.audioAppendStart,\n gopsToAlignWith: segment.gopsToAlignWith,\n remux: isMuxed,\n onData: result => {\n result.type = result.type === 'combined' ? 'video' : result.type;\n dataFn(segment, result);\n },\n onTrackInfo: trackInfo => {\n if (trackInfoFn) {\n if (isMuxed) {\n trackInfo.isMuxed = true;\n }\n trackInfoFn(segment, trackInfo);\n }\n },\n onAudioTimingInfo: audioTimingInfo => {\n // we only want the first start value we encounter\n if (audioStartFn && typeof audioTimingInfo.start !== 'undefined') {\n audioStartFn(audioTimingInfo.start);\n audioStartFn = null;\n } // we want to continually update the end time\n\n if (audioEndFn && typeof audioTimingInfo.end !== 'undefined') {\n audioEndFn(audioTimingInfo.end);\n }\n },\n onVideoTimingInfo: videoTimingInfo => {\n // we only want the first start value we encounter\n if (videoStartFn && typeof videoTimingInfo.start !== 'undefined') {\n videoStartFn(videoTimingInfo.start);\n videoStartFn = null;\n } // we want to continually update the end time\n\n if (videoEndFn && typeof videoTimingInfo.end !== 'undefined') {\n videoEndFn(videoTimingInfo.end);\n }\n },\n onVideoSegmentTimingInfo: videoSegmentTimingInfo => {\n videoSegmentTimingInfoFn(videoSegmentTimingInfo);\n },\n onAudioSegmentTimingInfo: audioSegmentTimingInfo => {\n audioSegmentTimingInfoFn(audioSegmentTimingInfo);\n },\n onId3: (id3Frames, dispatchType) => {\n id3Fn(segment, id3Frames, dispatchType);\n },\n onCaptions: captions => {\n captionsFn(segment, [captions]);\n },\n isEndOfTimeline,\n onEndedTimeline: () => {\n endedTimelineFn();\n },\n onTransmuxerLog,\n onDone: result => {\n if (!doneFn) {\n return;\n }\n result.type = result.type === 'combined' ? 'video' : result.type;\n doneFn(null, segment, result);\n }\n }); // In the transmuxer, we don't yet have the ability to extract a \"proper\" start time.\n // Meaning cached frame data may corrupt our notion of where this segment\n // really starts. To get around this, probe for the info needed.\n\n workerCallback({\n action: 'probeTs',\n transmuxer: segment.transmuxer,\n data: bytes,\n baseStartTime: segment.baseStartTime,\n callback: data => {\n segment.bytes = bytes = data.data;\n const probeResult = data.result;\n if (probeResult) {\n trackInfoFn(segment, {\n hasAudio: probeResult.hasAudio,\n hasVideo: probeResult.hasVideo,\n isMuxed\n });\n trackInfoFn = null;\n }\n finish();\n }\n });\n};\nconst handleSegmentBytes = ({\n segment,\n bytes,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n}) => {\n let bytesAsUint8Array = new Uint8Array(bytes); // TODO:\n // We should have a handler that fetches the number of bytes required\n // to check if something is fmp4. This will allow us to save bandwidth\n // because we can only exclude a playlist and abort requests\n // by codec after trackinfo triggers.\n\n if (isLikelyFmp4MediaSegment(bytesAsUint8Array)) {\n segment.isFmp4 = true;\n const {\n tracks\n } = segment.map;\n const trackInfo = {\n isFmp4: true,\n hasVideo: !!tracks.video,\n hasAudio: !!tracks.audio\n }; // if we have a audio track, with a codec that is not set to\n // encrypted audio\n\n if (tracks.audio && tracks.audio.codec && tracks.audio.codec !== 'enca') {\n trackInfo.audioCodec = tracks.audio.codec;\n } // if we have a video track, with a codec that is not set to\n // encrypted video\n\n if (tracks.video && tracks.video.codec && tracks.video.codec !== 'encv') {\n trackInfo.videoCodec = tracks.video.codec;\n }\n if (tracks.video && tracks.audio) {\n trackInfo.isMuxed = true;\n } // since we don't support appending fmp4 data on progress, we know we have the full\n // segment here\n\n trackInfoFn(segment, trackInfo); // The probe doesn't provide the segment end time, so only callback with the start\n // time. The end time can be roughly calculated by the receiver using the duration.\n //\n // Note that the start time returned by the probe reflects the baseMediaDecodeTime, as\n // that is the true start of the segment (where the playback engine should begin\n // decoding).\n\n const finishLoading = (captions, id3Frames) => {\n // if the track still has audio at this point it is only possible\n // for it to be audio only. See `tracks.video && tracks.audio` if statement\n // above.\n // we make sure to use segment.bytes here as that\n dataFn(segment, {\n data: bytesAsUint8Array,\n type: trackInfo.hasAudio && !trackInfo.isMuxed ? 'audio' : 'video'\n });\n if (id3Frames && id3Frames.length) {\n id3Fn(segment, id3Frames);\n }\n if (captions && captions.length) {\n captionsFn(segment, captions);\n }\n doneFn(null, segment, {});\n };\n workerCallback({\n action: 'probeMp4StartTime',\n timescales: segment.map.timescales,\n data: bytesAsUint8Array,\n transmuxer: segment.transmuxer,\n callback: ({\n data,\n startTime\n }) => {\n // transfer bytes back to us\n bytes = data.buffer;\n segment.bytes = bytesAsUint8Array = data;\n if (trackInfo.hasAudio && !trackInfo.isMuxed) {\n timingInfoFn(segment, 'audio', 'start', startTime);\n }\n if (trackInfo.hasVideo) {\n timingInfoFn(segment, 'video', 'start', startTime);\n }\n workerCallback({\n action: 'probeEmsgID3',\n data: bytesAsUint8Array,\n transmuxer: segment.transmuxer,\n offset: startTime,\n callback: ({\n emsgData,\n id3Frames\n }) => {\n // transfer bytes back to us\n bytes = emsgData.buffer;\n segment.bytes = bytesAsUint8Array = emsgData; // Run through the CaptionParser in case there are captions.\n // Initialize CaptionParser if it hasn't been yet\n\n if (!tracks.video || !emsgData.byteLength || !segment.transmuxer) {\n finishLoading(undefined, id3Frames);\n return;\n }\n workerCallback({\n action: 'pushMp4Captions',\n endAction: 'mp4Captions',\n transmuxer: segment.transmuxer,\n data: bytesAsUint8Array,\n timescales: segment.map.timescales,\n trackIds: [tracks.video.id],\n callback: message => {\n // transfer bytes back to us\n bytes = message.data.buffer;\n segment.bytes = bytesAsUint8Array = message.data;\n message.logs.forEach(function (log) {\n onTransmuxerLog(merge(log, {\n stream: 'mp4CaptionParser'\n }));\n });\n finishLoading(message.captions, id3Frames);\n }\n });\n }\n });\n }\n });\n return;\n } // VTT or other segments that don't need processing\n\n if (!segment.transmuxer) {\n doneFn(null, segment, {});\n return;\n }\n if (typeof segment.container === 'undefined') {\n segment.container = detectContainerForBytes(bytesAsUint8Array);\n }\n if (segment.container !== 'ts' && segment.container !== 'aac') {\n trackInfoFn(segment, {\n hasAudio: false,\n hasVideo: false\n });\n doneFn(null, segment, {});\n return;\n } // ts or aac\n\n transmuxAndNotify({\n segment,\n bytes,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n });\n};\nconst decrypt = function ({\n id,\n key,\n encryptedBytes,\n decryptionWorker\n}, callback) {\n const decryptionHandler = event => {\n if (event.data.source === id) {\n decryptionWorker.removeEventListener('message', decryptionHandler);\n const decrypted = event.data.decrypted;\n callback(new Uint8Array(decrypted.bytes, decrypted.byteOffset, decrypted.byteLength));\n }\n };\n decryptionWorker.addEventListener('message', decryptionHandler);\n let keyBytes;\n if (key.bytes.slice) {\n keyBytes = key.bytes.slice();\n } else {\n keyBytes = new Uint32Array(Array.prototype.slice.call(key.bytes));\n } // incrementally decrypt the bytes\n\n decryptionWorker.postMessage(createTransferableMessage({\n source: id,\n encrypted: encryptedBytes,\n key: keyBytes,\n iv: key.iv\n }), [encryptedBytes.buffer, keyBytes.buffer]);\n};\n/**\n * Decrypt the segment via the decryption web worker\n *\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128 decryption\n * routines\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n * a callback that receives video timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n * a callback that receives audio timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {boolean} isEndOfTimeline\n * true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n * a callback made when a timeline is ended, will only be called if\n * isEndOfTimeline is true\n * @param {Function} dataFn - a callback that is executed when segment bytes are available\n * and ready to use\n * @param {Function} doneFn - a callback that is executed after decryption has completed\n */\n\nconst decryptSegment = ({\n decryptionWorker,\n segment,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n}) => {\n decrypt({\n id: segment.requestId,\n key: segment.key,\n encryptedBytes: segment.encryptedBytes,\n decryptionWorker\n }, decryptedBytes => {\n segment.bytes = decryptedBytes;\n handleSegmentBytes({\n segment,\n bytes: segment.bytes,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n });\n });\n};\n/**\n * This function waits for all XHRs to finish (with either success or failure)\n * before continueing processing via it's callback. The function gathers errors\n * from each request into a single errors array so that the error status for\n * each request can be examined later.\n *\n * @param {Object} activeXhrs - an object that tracks all XHR requests\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128 decryption\n * routines\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n * a callback that receives video timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n * a callback that receives audio timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} id3Fn - a callback that receives ID3 metadata\n * @param {Function} captionsFn - a callback that receives captions\n * @param {boolean} isEndOfTimeline\n * true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n * a callback made when a timeline is ended, will only be called if\n * isEndOfTimeline is true\n * @param {Function} dataFn - a callback that is executed when segment bytes are available\n * and ready to use\n * @param {Function} doneFn - a callback that is executed after all resources have been\n * downloaded and any decryption completed\n */\n\nconst waitForCompletion = ({\n activeXhrs,\n decryptionWorker,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n}) => {\n let count = 0;\n let didError = false;\n return (error, segment) => {\n if (didError) {\n return;\n }\n if (error) {\n didError = true; // If there are errors, we have to abort any outstanding requests\n\n abortAll(activeXhrs); // Even though the requests above are aborted, and in theory we could wait until we\n // handle the aborted events from those requests, there are some cases where we may\n // never get an aborted event. For instance, if the network connection is lost and\n // there were two requests, the first may have triggered an error immediately, while\n // the second request remains unsent. In that case, the aborted algorithm will not\n // trigger an abort: see https://xhr.spec.whatwg.org/#the-abort()-method\n //\n // We also can't rely on the ready state of the XHR, since the request that\n // triggered the connection error may also show as a ready state of 0 (unsent).\n // Therefore, we have to finish this group of requests immediately after the first\n // seen error.\n\n return doneFn(error, segment);\n }\n count += 1;\n if (count === activeXhrs.length) {\n const segmentFinish = function () {\n if (segment.encryptedBytes) {\n return decryptSegment({\n decryptionWorker,\n segment,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n });\n } // Otherwise, everything is ready just continue\n\n handleSegmentBytes({\n segment,\n bytes: segment.bytes,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n });\n }; // Keep track of when *all* of the requests have completed\n\n segment.endOfAllRequests = Date.now();\n if (segment.map && segment.map.encryptedBytes && !segment.map.bytes) {\n return decrypt({\n decryptionWorker,\n // add -init to the \"id\" to differentiate between segment\n // and init segment decryption, just in case they happen\n // at the same time at some point in the future.\n id: segment.requestId + '-init',\n encryptedBytes: segment.map.encryptedBytes,\n key: segment.map.key\n }, decryptedBytes => {\n segment.map.bytes = decryptedBytes;\n parseInitSegment(segment, parseError => {\n if (parseError) {\n abortAll(activeXhrs);\n return doneFn(parseError, segment);\n }\n segmentFinish();\n });\n });\n }\n segmentFinish();\n }\n };\n};\n/**\n * Calls the abort callback if any request within the batch was aborted. Will only call\n * the callback once per batch of requests, even if multiple were aborted.\n *\n * @param {Object} loadendState - state to check to see if the abort function was called\n * @param {Function} abortFn - callback to call for abort\n */\n\nconst handleLoadEnd = ({\n loadendState,\n abortFn\n}) => event => {\n const request = event.target;\n if (request.aborted && abortFn && !loadendState.calledAbortFn) {\n abortFn();\n loadendState.calledAbortFn = true;\n }\n};\n/**\n * Simple progress event callback handler that gathers some stats before\n * executing a provided callback with the `segment` object\n *\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} progressFn - a callback that is executed each time a progress event\n * is received\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n * a callback that receives video timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n * a callback that receives audio timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {boolean} isEndOfTimeline\n * true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n * a callback made when a timeline is ended, will only be called if\n * isEndOfTimeline is true\n * @param {Function} dataFn - a callback that is executed when segment bytes are available\n * and ready to use\n * @param {Event} event - the progress event object from XMLHttpRequest\n */\n\nconst handleProgress = ({\n segment,\n progressFn,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn\n}) => event => {\n const request = event.target;\n if (request.aborted) {\n return;\n }\n segment.stats = merge(segment.stats, getProgressStats(event)); // record the time that we receive the first byte of data\n\n if (!segment.stats.firstBytesReceivedAt && segment.stats.bytesReceived) {\n segment.stats.firstBytesReceivedAt = Date.now();\n }\n return progressFn(event, segment);\n};\n/**\n * Load all resources and does any processing necessary for a media-segment\n *\n * Features:\n * decrypts the media-segment if it has a key uri and an iv\n * aborts *all* requests if *any* one request fails\n *\n * The segment object, at minimum, has the following format:\n * {\n * resolvedUri: String,\n * [transmuxer]: Object,\n * [byterange]: {\n * offset: Number,\n * length: Number\n * },\n * [key]: {\n * resolvedUri: String\n * [byterange]: {\n * offset: Number,\n * length: Number\n * },\n * iv: {\n * bytes: Uint32Array\n * }\n * },\n * [map]: {\n * resolvedUri: String,\n * [byterange]: {\n * offset: Number,\n * length: Number\n * },\n * [bytes]: Uint8Array\n * }\n * }\n * ...where [name] denotes optional properties\n *\n * @param {Function} xhr - an instance of the xhr wrapper in xhr.js\n * @param {Object} xhrOptions - the base options to provide to all xhr requests\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128\n * decryption routines\n * @param {Object} segment - a simplified copy of the segmentInfo object\n * from SegmentLoader\n * @param {Function} abortFn - a callback called (only once) if any piece of a request was\n * aborted\n * @param {Function} progressFn - a callback that receives progress events from the main\n * segment's xhr request\n * @param {Function} trackInfoFn - a callback that receives track info\n * @param {Function} timingInfoFn - a callback that receives timing info\n * @param {Function} videoSegmentTimingInfoFn\n * a callback that receives video timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} audioSegmentTimingInfoFn\n * a callback that receives audio timing info based on media times and\n * any adjustments made by the transmuxer\n * @param {Function} id3Fn - a callback that receives ID3 metadata\n * @param {Function} captionsFn - a callback that receives captions\n * @param {boolean} isEndOfTimeline\n * true if this segment represents the last segment in a timeline\n * @param {Function} endedTimelineFn\n * a callback made when a timeline is ended, will only be called if\n * isEndOfTimeline is true\n * @param {Function} dataFn - a callback that receives data from the main segment's xhr\n * request, transmuxed if needed\n * @param {Function} doneFn - a callback that is executed only once all requests have\n * succeeded or failed\n * @return {Function} a function that, when invoked, immediately aborts all\n * outstanding requests\n */\n\nconst mediaSegmentRequest = ({\n xhr,\n xhrOptions,\n decryptionWorker,\n segment,\n abortFn,\n progressFn,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n}) => {\n const activeXhrs = [];\n const finishProcessingFn = waitForCompletion({\n activeXhrs,\n decryptionWorker,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn,\n doneFn,\n onTransmuxerLog\n }); // optionally, request the decryption key\n\n if (segment.key && !segment.key.bytes) {\n const objects = [segment.key];\n if (segment.map && !segment.map.bytes && segment.map.key && segment.map.key.resolvedUri === segment.key.resolvedUri) {\n objects.push(segment.map.key);\n }\n const keyRequestOptions = merge(xhrOptions, {\n uri: segment.key.resolvedUri,\n responseType: 'arraybuffer',\n requestType: 'segment-key'\n });\n const keyRequestCallback = handleKeyResponse(segment, objects, finishProcessingFn);\n const keyXhr = xhr(keyRequestOptions, keyRequestCallback);\n activeXhrs.push(keyXhr);\n } // optionally, request the associated media init segment\n\n if (segment.map && !segment.map.bytes) {\n const differentMapKey = segment.map.key && (!segment.key || segment.key.resolvedUri !== segment.map.key.resolvedUri);\n if (differentMapKey) {\n const mapKeyRequestOptions = merge(xhrOptions, {\n uri: segment.map.key.resolvedUri,\n responseType: 'arraybuffer',\n requestType: 'segment-key'\n });\n const mapKeyRequestCallback = handleKeyResponse(segment, [segment.map.key], finishProcessingFn);\n const mapKeyXhr = xhr(mapKeyRequestOptions, mapKeyRequestCallback);\n activeXhrs.push(mapKeyXhr);\n }\n const initSegmentOptions = merge(xhrOptions, {\n uri: segment.map.resolvedUri,\n responseType: 'arraybuffer',\n headers: segmentXhrHeaders(segment.map),\n requestType: 'segment-media-initialization'\n });\n const initSegmentRequestCallback = handleInitSegmentResponse({\n segment,\n finishProcessingFn\n });\n const initSegmentXhr = xhr(initSegmentOptions, initSegmentRequestCallback);\n activeXhrs.push(initSegmentXhr);\n }\n const segmentRequestOptions = merge(xhrOptions, {\n uri: segment.part && segment.part.resolvedUri || segment.resolvedUri,\n responseType: 'arraybuffer',\n headers: segmentXhrHeaders(segment),\n requestType: 'segment'\n });\n const segmentRequestCallback = handleSegmentResponse({\n segment,\n finishProcessingFn,\n responseType: segmentRequestOptions.responseType\n });\n const segmentXhr = xhr(segmentRequestOptions, segmentRequestCallback);\n segmentXhr.addEventListener('progress', handleProgress({\n segment,\n progressFn,\n trackInfoFn,\n timingInfoFn,\n videoSegmentTimingInfoFn,\n audioSegmentTimingInfoFn,\n id3Fn,\n captionsFn,\n isEndOfTimeline,\n endedTimelineFn,\n dataFn\n }));\n activeXhrs.push(segmentXhr); // since all parts of the request must be considered, but should not make callbacks\n // multiple times, provide a shared state object\n\n const loadendState = {};\n activeXhrs.forEach(activeXhr => {\n activeXhr.addEventListener('loadend', handleLoadEnd({\n loadendState,\n abortFn\n }));\n });\n return () => abortAll(activeXhrs);\n};\n\n/**\n * @file - codecs.js - Handles tasks regarding codec strings such as translating them to\n * codec strings, or translating codec strings into objects that can be examined.\n */\nconst logFn$1 = logger('CodecUtils');\n/**\n * Returns a set of codec strings parsed from the playlist or the default\n * codec strings if no codecs were specified in the playlist\n *\n * @param {Playlist} media the current media playlist\n * @return {Object} an object with the video and audio codecs\n */\n\nconst getCodecs = function (media) {\n // if the codecs were explicitly specified, use them instead of the\n // defaults\n const mediaAttributes = media.attributes || {};\n if (mediaAttributes.CODECS) {\n return parseCodecs(mediaAttributes.CODECS);\n }\n};\nconst isMaat = (main, media) => {\n const mediaAttributes = media.attributes || {};\n return main && main.mediaGroups && main.mediaGroups.AUDIO && mediaAttributes.AUDIO && main.mediaGroups.AUDIO[mediaAttributes.AUDIO];\n};\nconst isMuxed = (main, media) => {\n if (!isMaat(main, media)) {\n return true;\n }\n const mediaAttributes = media.attributes || {};\n const audioGroup = main.mediaGroups.AUDIO[mediaAttributes.AUDIO];\n for (const groupId in audioGroup) {\n // If an audio group has a URI (the case for HLS, as HLS will use external playlists),\n // or there are listed playlists (the case for DASH, as the manifest will have already\n // provided all of the details necessary to generate the audio playlist, as opposed to\n // HLS' externally requested playlists), then the content is demuxed.\n if (!audioGroup[groupId].uri && !audioGroup[groupId].playlists) {\n return true;\n }\n }\n return false;\n};\nconst unwrapCodecList = function (codecList) {\n const codecs = {};\n codecList.forEach(({\n mediaType,\n type,\n details\n }) => {\n codecs[mediaType] = codecs[mediaType] || [];\n codecs[mediaType].push(translateLegacyCodec(`${type}${details}`));\n });\n Object.keys(codecs).forEach(function (mediaType) {\n if (codecs[mediaType].length > 1) {\n logFn$1(`multiple ${mediaType} codecs found as attributes: ${codecs[mediaType].join(', ')}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`);\n codecs[mediaType] = null;\n return;\n }\n codecs[mediaType] = codecs[mediaType][0];\n });\n return codecs;\n};\nconst codecCount = function (codecObj) {\n let count = 0;\n if (codecObj.audio) {\n count++;\n }\n if (codecObj.video) {\n count++;\n }\n return count;\n};\n/**\n * Calculates the codec strings for a working configuration of\n * SourceBuffers to play variant streams in a main playlist. If\n * there is no possible working configuration, an empty object will be\n * returned.\n *\n * @param main {Object} the m3u8 object for the main playlist\n * @param media {Object} the m3u8 object for the variant playlist\n * @return {Object} the codec strings.\n *\n * @private\n */\n\nconst codecsForPlaylist = function (main, media) {\n const mediaAttributes = media.attributes || {};\n const codecInfo = unwrapCodecList(getCodecs(media) || []); // HLS with multiple-audio tracks must always get an audio codec.\n // Put another way, there is no way to have a video-only multiple-audio HLS!\n\n if (isMaat(main, media) && !codecInfo.audio) {\n if (!isMuxed(main, media)) {\n // It is possible for codecs to be specified on the audio media group playlist but\n // not on the rendition playlist. This is mostly the case for DASH, where audio and\n // video are always separate (and separately specified).\n const defaultCodecs = unwrapCodecList(codecsFromDefault(main, mediaAttributes.AUDIO) || []);\n if (defaultCodecs.audio) {\n codecInfo.audio = defaultCodecs.audio;\n }\n }\n }\n return codecInfo;\n};\nconst logFn = logger('PlaylistSelector');\nconst representationToString = function (representation) {\n if (!representation || !representation.playlist) {\n return;\n }\n const playlist = representation.playlist;\n return JSON.stringify({\n id: playlist.id,\n bandwidth: representation.bandwidth,\n width: representation.width,\n height: representation.height,\n codecs: playlist.attributes && playlist.attributes.CODECS || ''\n });\n}; // Utilities\n\n/**\n * Returns the CSS value for the specified property on an element\n * using `getComputedStyle`. Firefox has a long-standing issue where\n * getComputedStyle() may return null when running in an iframe with\n * `display: none`.\n *\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n * @param {HTMLElement} el the htmlelement to work on\n * @param {string} the proprety to get the style for\n */\n\nconst safeGetComputedStyle = function (el, property) {\n if (!el) {\n return '';\n }\n const result = window$1.getComputedStyle(el);\n if (!result) {\n return '';\n }\n return result[property];\n};\n/**\n * Resuable stable sort function\n *\n * @param {Playlists} array\n * @param {Function} sortFn Different comparators\n * @function stableSort\n */\n\nconst stableSort = function (array, sortFn) {\n const newArray = array.slice();\n array.sort(function (left, right) {\n const cmp = sortFn(left, right);\n if (cmp === 0) {\n return newArray.indexOf(left) - newArray.indexOf(right);\n }\n return cmp;\n });\n};\n/**\n * A comparator function to sort two playlist object by bandwidth.\n *\n * @param {Object} left a media playlist object\n * @param {Object} right a media playlist object\n * @return {number} Greater than zero if the bandwidth attribute of\n * left is greater than the corresponding attribute of right. Less\n * than zero if the bandwidth of right is greater than left and\n * exactly zero if the two are equal.\n */\n\nconst comparePlaylistBandwidth = function (left, right) {\n let leftBandwidth;\n let rightBandwidth;\n if (left.attributes.BANDWIDTH) {\n leftBandwidth = left.attributes.BANDWIDTH;\n }\n leftBandwidth = leftBandwidth || window$1.Number.MAX_VALUE;\n if (right.attributes.BANDWIDTH) {\n rightBandwidth = right.attributes.BANDWIDTH;\n }\n rightBandwidth = rightBandwidth || window$1.Number.MAX_VALUE;\n return leftBandwidth - rightBandwidth;\n};\n/**\n * A comparator function to sort two playlist object by resolution (width).\n *\n * @param {Object} left a media playlist object\n * @param {Object} right a media playlist object\n * @return {number} Greater than zero if the resolution.width attribute of\n * left is greater than the corresponding attribute of right. Less\n * than zero if the resolution.width of right is greater than left and\n * exactly zero if the two are equal.\n */\n\nconst comparePlaylistResolution = function (left, right) {\n let leftWidth;\n let rightWidth;\n if (left.attributes.RESOLUTION && left.attributes.RESOLUTION.width) {\n leftWidth = left.attributes.RESOLUTION.width;\n }\n leftWidth = leftWidth || window$1.Number.MAX_VALUE;\n if (right.attributes.RESOLUTION && right.attributes.RESOLUTION.width) {\n rightWidth = right.attributes.RESOLUTION.width;\n }\n rightWidth = rightWidth || window$1.Number.MAX_VALUE; // NOTE - Fallback to bandwidth sort as appropriate in cases where multiple renditions\n // have the same media dimensions/ resolution\n\n if (leftWidth === rightWidth && left.attributes.BANDWIDTH && right.attributes.BANDWIDTH) {\n return left.attributes.BANDWIDTH - right.attributes.BANDWIDTH;\n }\n return leftWidth - rightWidth;\n};\n/**\n * Chooses the appropriate media playlist based on bandwidth and player size\n *\n * @param {Object} main\n * Object representation of the main manifest\n * @param {number} playerBandwidth\n * Current calculated bandwidth of the player\n * @param {number} playerWidth\n * Current width of the player element (should account for the device pixel ratio)\n * @param {number} playerHeight\n * Current height of the player element (should account for the device pixel ratio)\n * @param {boolean} limitRenditionByPlayerDimensions\n * True if the player width and height should be used during the selection, false otherwise\n * @param {Object} playlistController\n * the current playlistController object\n * @return {Playlist} the highest bitrate playlist less than the\n * currently detected bandwidth, accounting for some amount of\n * bandwidth variance\n */\n\nlet simpleSelector = function (main, playerBandwidth, playerWidth, playerHeight, limitRenditionByPlayerDimensions, playlistController) {\n // If we end up getting called before `main` is available, exit early\n if (!main) {\n return;\n }\n const options = {\n bandwidth: playerBandwidth,\n width: playerWidth,\n height: playerHeight,\n limitRenditionByPlayerDimensions\n };\n let playlists = main.playlists; // if playlist is audio only, select between currently active audio group playlists.\n\n if (Playlist.isAudioOnly(main)) {\n playlists = playlistController.getAudioTrackPlaylists_(); // add audioOnly to options so that we log audioOnly: true\n // at the buttom of this function for debugging.\n\n options.audioOnly = true;\n } // convert the playlists to an intermediary representation to make comparisons easier\n\n let sortedPlaylistReps = playlists.map(playlist => {\n let bandwidth;\n const width = playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.width;\n const height = playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height;\n bandwidth = playlist.attributes && playlist.attributes.BANDWIDTH;\n bandwidth = bandwidth || window$1.Number.MAX_VALUE;\n return {\n bandwidth,\n width,\n height,\n playlist\n };\n });\n stableSort(sortedPlaylistReps, (left, right) => left.bandwidth - right.bandwidth); // filter out any playlists that have been excluded due to\n // incompatible configurations\n\n sortedPlaylistReps = sortedPlaylistReps.filter(rep => !Playlist.isIncompatible(rep.playlist)); // filter out any playlists that have been disabled manually through the representations\n // api or excluded temporarily due to playback errors.\n\n let enabledPlaylistReps = sortedPlaylistReps.filter(rep => Playlist.isEnabled(rep.playlist));\n if (!enabledPlaylistReps.length) {\n // if there are no enabled playlists, then they have all been excluded or disabled\n // by the user through the representations api. In this case, ignore exclusion and\n // fallback to what the user wants by using playlists the user has not disabled.\n enabledPlaylistReps = sortedPlaylistReps.filter(rep => !Playlist.isDisabled(rep.playlist));\n } // filter out any variant that has greater effective bitrate\n // than the current estimated bandwidth\n\n const bandwidthPlaylistReps = enabledPlaylistReps.filter(rep => rep.bandwidth * Config.BANDWIDTH_VARIANCE < playerBandwidth);\n let highestRemainingBandwidthRep = bandwidthPlaylistReps[bandwidthPlaylistReps.length - 1]; // get all of the renditions with the same (highest) bandwidth\n // and then taking the very first element\n\n const bandwidthBestRep = bandwidthPlaylistReps.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0]; // if we're not going to limit renditions by player size, make an early decision.\n\n if (limitRenditionByPlayerDimensions === false) {\n const chosenRep = bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n if (chosenRep && chosenRep.playlist) {\n let type = 'sortedPlaylistReps';\n if (bandwidthBestRep) {\n type = 'bandwidthBestRep';\n }\n if (enabledPlaylistReps[0]) {\n type = 'enabledPlaylistReps';\n }\n logFn(`choosing ${representationToString(chosenRep)} using ${type} with options`, options);\n return chosenRep.playlist;\n }\n logFn('could not choose a playlist with options', options);\n return null;\n } // filter out playlists without resolution information\n\n const haveResolution = bandwidthPlaylistReps.filter(rep => rep.width && rep.height); // sort variants by resolution\n\n stableSort(haveResolution, (left, right) => left.width - right.width); // if we have the exact resolution as the player use it\n\n const resolutionBestRepList = haveResolution.filter(rep => rep.width === playerWidth && rep.height === playerHeight);\n highestRemainingBandwidthRep = resolutionBestRepList[resolutionBestRepList.length - 1]; // ensure that we pick the highest bandwidth variant that have exact resolution\n\n const resolutionBestRep = resolutionBestRepList.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0];\n let resolutionPlusOneList;\n let resolutionPlusOneSmallest;\n let resolutionPlusOneRep; // find the smallest variant that is larger than the player\n // if there is no match of exact resolution\n\n if (!resolutionBestRep) {\n resolutionPlusOneList = haveResolution.filter(rep => rep.width > playerWidth || rep.height > playerHeight); // find all the variants have the same smallest resolution\n\n resolutionPlusOneSmallest = resolutionPlusOneList.filter(rep => rep.width === resolutionPlusOneList[0].width && rep.height === resolutionPlusOneList[0].height); // ensure that we also pick the highest bandwidth variant that\n // is just-larger-than the video player\n\n highestRemainingBandwidthRep = resolutionPlusOneSmallest[resolutionPlusOneSmallest.length - 1];\n resolutionPlusOneRep = resolutionPlusOneSmallest.filter(rep => rep.bandwidth === highestRemainingBandwidthRep.bandwidth)[0];\n }\n let leastPixelDiffRep; // If this selector proves to be better than others,\n // resolutionPlusOneRep and resolutionBestRep and all\n // the code involving them should be removed.\n\n if (playlistController.leastPixelDiffSelector) {\n // find the variant that is closest to the player's pixel size\n const leastPixelDiffList = haveResolution.map(rep => {\n rep.pixelDiff = Math.abs(rep.width - playerWidth) + Math.abs(rep.height - playerHeight);\n return rep;\n }); // get the highest bandwidth, closest resolution playlist\n\n stableSort(leastPixelDiffList, (left, right) => {\n // sort by highest bandwidth if pixelDiff is the same\n if (left.pixelDiff === right.pixelDiff) {\n return right.bandwidth - left.bandwidth;\n }\n return left.pixelDiff - right.pixelDiff;\n });\n leastPixelDiffRep = leastPixelDiffList[0];\n } // fallback chain of variants\n\n const chosenRep = leastPixelDiffRep || resolutionPlusOneRep || resolutionBestRep || bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\n if (chosenRep && chosenRep.playlist) {\n let type = 'sortedPlaylistReps';\n if (leastPixelDiffRep) {\n type = 'leastPixelDiffRep';\n } else if (resolutionPlusOneRep) {\n type = 'resolutionPlusOneRep';\n } else if (resolutionBestRep) {\n type = 'resolutionBestRep';\n } else if (bandwidthBestRep) {\n type = 'bandwidthBestRep';\n } else if (enabledPlaylistReps[0]) {\n type = 'enabledPlaylistReps';\n }\n logFn(`choosing ${representationToString(chosenRep)} using ${type} with options`, options);\n return chosenRep.playlist;\n }\n logFn('could not choose a playlist with options', options);\n return null;\n};\n\n/**\n * Chooses the appropriate media playlist based on the most recent\n * bandwidth estimate and the player size.\n *\n * Expects to be called within the context of an instance of VhsHandler\n *\n * @return {Playlist} the highest bitrate playlist less than the\n * currently detected bandwidth, accounting for some amount of\n * bandwidth variance\n */\n\nconst lastBandwidthSelector = function () {\n const pixelRatio = this.useDevicePixelRatio ? window$1.devicePixelRatio || 1 : 1;\n return simpleSelector(this.playlists.main, this.systemBandwidth, parseInt(safeGetComputedStyle(this.tech_.el(), 'width'), 10) * pixelRatio, parseInt(safeGetComputedStyle(this.tech_.el(), 'height'), 10) * pixelRatio, this.limitRenditionByPlayerDimensions, this.playlistController_);\n};\n/**\n * Chooses the appropriate media playlist based on an\n * exponential-weighted moving average of the bandwidth after\n * filtering for player size.\n *\n * Expects to be called within the context of an instance of VhsHandler\n *\n * @param {number} decay - a number between 0 and 1. Higher values of\n * this parameter will cause previous bandwidth estimates to lose\n * significance more quickly.\n * @return {Function} a function which can be invoked to create a new\n * playlist selector function.\n * @see https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average\n */\n\nconst movingAverageBandwidthSelector = function (decay) {\n let average = -1;\n let lastSystemBandwidth = -1;\n if (decay < 0 || decay > 1) {\n throw new Error('Moving average bandwidth decay must be between 0 and 1.');\n }\n return function () {\n const pixelRatio = this.useDevicePixelRatio ? window$1.devicePixelRatio || 1 : 1;\n if (average < 0) {\n average = this.systemBandwidth;\n lastSystemBandwidth = this.systemBandwidth;\n } // stop the average value from decaying for every 250ms\n // when the systemBandwidth is constant\n // and\n // stop average from setting to a very low value when the\n // systemBandwidth becomes 0 in case of chunk cancellation\n\n if (this.systemBandwidth > 0 && this.systemBandwidth !== lastSystemBandwidth) {\n average = decay * this.systemBandwidth + (1 - decay) * average;\n lastSystemBandwidth = this.systemBandwidth;\n }\n return simpleSelector(this.playlists.main, average, parseInt(safeGetComputedStyle(this.tech_.el(), 'width'), 10) * pixelRatio, parseInt(safeGetComputedStyle(this.tech_.el(), 'height'), 10) * pixelRatio, this.limitRenditionByPlayerDimensions, this.playlistController_);\n };\n};\n/**\n * Chooses the appropriate media playlist based on the potential to rebuffer\n *\n * @param {Object} settings\n * Object of information required to use this selector\n * @param {Object} settings.main\n * Object representation of the main manifest\n * @param {number} settings.currentTime\n * The current time of the player\n * @param {number} settings.bandwidth\n * Current measured bandwidth\n * @param {number} settings.duration\n * Duration of the media\n * @param {number} settings.segmentDuration\n * Segment duration to be used in round trip time calculations\n * @param {number} settings.timeUntilRebuffer\n * Time left in seconds until the player has to rebuffer\n * @param {number} settings.currentTimeline\n * The current timeline segments are being loaded from\n * @param {SyncController} settings.syncController\n * SyncController for determining if we have a sync point for a given playlist\n * @return {Object|null}\n * {Object} return.playlist\n * The highest bandwidth playlist with the least amount of rebuffering\n * {Number} return.rebufferingImpact\n * The amount of time in seconds switching to this playlist will rebuffer. A\n * negative value means that switching will cause zero rebuffering.\n */\n\nconst minRebufferMaxBandwidthSelector = function (settings) {\n const {\n main,\n currentTime,\n bandwidth,\n duration,\n segmentDuration,\n timeUntilRebuffer,\n currentTimeline,\n syncController\n } = settings; // filter out any playlists that have been excluded due to\n // incompatible configurations\n\n const compatiblePlaylists = main.playlists.filter(playlist => !Playlist.isIncompatible(playlist)); // filter out any playlists that have been disabled manually through the representations\n // api or excluded temporarily due to playback errors.\n\n let enabledPlaylists = compatiblePlaylists.filter(Playlist.isEnabled);\n if (!enabledPlaylists.length) {\n // if there are no enabled playlists, then they have all been excluded or disabled\n // by the user through the representations api. In this case, ignore exclusion and\n // fallback to what the user wants by using playlists the user has not disabled.\n enabledPlaylists = compatiblePlaylists.filter(playlist => !Playlist.isDisabled(playlist));\n }\n const bandwidthPlaylists = enabledPlaylists.filter(Playlist.hasAttribute.bind(null, 'BANDWIDTH'));\n const rebufferingEstimates = bandwidthPlaylists.map(playlist => {\n const syncPoint = syncController.getSyncPoint(playlist, duration, currentTimeline, currentTime); // If there is no sync point for this playlist, switching to it will require a\n // sync request first. This will double the request time\n\n const numRequests = syncPoint ? 1 : 2;\n const requestTimeEstimate = Playlist.estimateSegmentRequestTime(segmentDuration, bandwidth, playlist);\n const rebufferingImpact = requestTimeEstimate * numRequests - timeUntilRebuffer;\n return {\n playlist,\n rebufferingImpact\n };\n });\n const noRebufferingPlaylists = rebufferingEstimates.filter(estimate => estimate.rebufferingImpact <= 0); // Sort by bandwidth DESC\n\n stableSort(noRebufferingPlaylists, (a, b) => comparePlaylistBandwidth(b.playlist, a.playlist));\n if (noRebufferingPlaylists.length) {\n return noRebufferingPlaylists[0];\n }\n stableSort(rebufferingEstimates, (a, b) => a.rebufferingImpact - b.rebufferingImpact);\n return rebufferingEstimates[0] || null;\n};\n/**\n * Chooses the appropriate media playlist, which in this case is the lowest bitrate\n * one with video. If no renditions with video exist, return the lowest audio rendition.\n *\n * Expects to be called within the context of an instance of VhsHandler\n *\n * @return {Object|null}\n * {Object} return.playlist\n * The lowest bitrate playlist that contains a video codec. If no such rendition\n * exists pick the lowest audio rendition.\n */\n\nconst lowestBitrateCompatibleVariantSelector = function () {\n // filter out any playlists that have been excluded due to\n // incompatible configurations or playback errors\n const playlists = this.playlists.main.playlists.filter(Playlist.isEnabled); // Sort ascending by bitrate\n\n stableSort(playlists, (a, b) => comparePlaylistBandwidth(a, b)); // Parse and assume that playlists with no video codec have no video\n // (this is not necessarily true, although it is generally true).\n //\n // If an entire manifest has no valid videos everything will get filtered\n // out.\n\n const playlistsWithVideo = playlists.filter(playlist => !!codecsForPlaylist(this.playlists.main, playlist).video);\n return playlistsWithVideo[0] || null;\n};\n\n/**\n * Combine all segments into a single Uint8Array\n *\n * @param {Object} segmentObj\n * @return {Uint8Array} concatenated bytes\n * @private\n */\nconst concatSegments = segmentObj => {\n let offset = 0;\n let tempBuffer;\n if (segmentObj.bytes) {\n tempBuffer = new Uint8Array(segmentObj.bytes); // combine the individual segments into one large typed-array\n\n segmentObj.segments.forEach(segment => {\n tempBuffer.set(segment, offset);\n offset += segment.byteLength;\n });\n }\n return tempBuffer;\n};\n\n/**\n * @file text-tracks.js\n */\n/**\n * Create captions text tracks on video.js if they do not exist\n *\n * @param {Object} inbandTextTracks a reference to current inbandTextTracks\n * @param {Object} tech the video.js tech\n * @param {Object} captionStream the caption stream to create\n * @private\n */\n\nconst createCaptionsTrackIfNotExists = function (inbandTextTracks, tech, captionStream) {\n if (!inbandTextTracks[captionStream]) {\n tech.trigger({\n type: 'usage',\n name: 'vhs-608'\n });\n let instreamId = captionStream; // we need to translate SERVICEn for 708 to how mux.js currently labels them\n\n if (/^cc708_/.test(captionStream)) {\n instreamId = 'SERVICE' + captionStream.split('_')[1];\n }\n const track = tech.textTracks().getTrackById(instreamId);\n if (track) {\n // Resuse an existing track with a CC# id because this was\n // very likely created by videojs-contrib-hls from information\n // in the m3u8 for us to use\n inbandTextTracks[captionStream] = track;\n } else {\n // This section gets called when we have caption services that aren't specified in the manifest.\n // Manifest level caption services are handled in media-groups.js under CLOSED-CAPTIONS.\n const captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {};\n let label = captionStream;\n let language = captionStream;\n let def = false;\n const captionService = captionServices[instreamId];\n if (captionService) {\n label = captionService.label;\n language = captionService.language;\n def = captionService.default;\n } // Otherwise, create a track with the default `CC#` label and\n // without a language\n\n inbandTextTracks[captionStream] = tech.addRemoteTextTrack({\n kind: 'captions',\n id: instreamId,\n // TODO: investigate why this doesn't seem to turn the caption on by default\n default: def,\n label,\n language\n }, false).track;\n }\n }\n};\n/**\n * Add caption text track data to a source handler given an array of captions\n *\n * @param {Object}\n * @param {Object} inbandTextTracks the inband text tracks\n * @param {number} timestampOffset the timestamp offset of the source buffer\n * @param {Array} captionArray an array of caption data\n * @private\n */\n\nconst addCaptionData = function ({\n inbandTextTracks,\n captionArray,\n timestampOffset\n}) {\n if (!captionArray) {\n return;\n }\n const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n captionArray.forEach(caption => {\n const track = caption.stream; // in CEA 608 captions, video.js/mux.js sends a content array\n // with positioning data\n\n if (caption.content) {\n caption.content.forEach(value => {\n const cue = new Cue(caption.startTime + timestampOffset, caption.endTime + timestampOffset, value.text);\n cue.line = value.line;\n cue.align = 'left';\n cue.position = value.position;\n cue.positionAlign = 'line-left';\n inbandTextTracks[track].addCue(cue);\n });\n } else {\n // otherwise, a text value with combined captions is sent\n inbandTextTracks[track].addCue(new Cue(caption.startTime + timestampOffset, caption.endTime + timestampOffset, caption.text));\n }\n });\n};\n/**\n * Define properties on a cue for backwards compatability,\n * but warn the user that the way that they are using it\n * is depricated and will be removed at a later date.\n *\n * @param {Cue} cue the cue to add the properties on\n * @private\n */\n\nconst deprecateOldCue = function (cue) {\n Object.defineProperties(cue.frame, {\n id: {\n get() {\n videojs.log.warn('cue.frame.id is deprecated. Use cue.value.key instead.');\n return cue.value.key;\n }\n },\n value: {\n get() {\n videojs.log.warn('cue.frame.value is deprecated. Use cue.value.data instead.');\n return cue.value.data;\n }\n },\n privateData: {\n get() {\n videojs.log.warn('cue.frame.privateData is deprecated. Use cue.value.data instead.');\n return cue.value.data;\n }\n }\n });\n};\n/**\n * Add metadata text track data to a source handler given an array of metadata\n *\n * @param {Object}\n * @param {Object} inbandTextTracks the inband text tracks\n * @param {Array} metadataArray an array of meta data\n * @param {number} timestampOffset the timestamp offset of the source buffer\n * @param {number} videoDuration the duration of the video\n * @private\n */\n\nconst addMetadata = ({\n inbandTextTracks,\n metadataArray,\n timestampOffset,\n videoDuration\n}) => {\n if (!metadataArray) {\n return;\n }\n const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n const metadataTrack = inbandTextTracks.metadataTrack_;\n if (!metadataTrack) {\n return;\n }\n metadataArray.forEach(metadata => {\n const time = metadata.cueTime + timestampOffset; // if time isn't a finite number between 0 and Infinity, like NaN,\n // ignore this bit of metadata.\n // This likely occurs when you have an non-timed ID3 tag like TIT2,\n // which is the \"Title/Songname/Content description\" frame\n\n if (typeof time !== 'number' || window$1.isNaN(time) || time < 0 || !(time < Infinity)) {\n return;\n } // If we have no frames, we can't create a cue.\n\n if (!metadata.frames || !metadata.frames.length) {\n return;\n }\n metadata.frames.forEach(frame => {\n const cue = new Cue(time, time, frame.value || frame.url || frame.data || '');\n cue.frame = frame;\n cue.value = frame;\n deprecateOldCue(cue);\n metadataTrack.addCue(cue);\n });\n });\n if (!metadataTrack.cues || !metadataTrack.cues.length) {\n return;\n } // Updating the metadeta cues so that\n // the endTime of each cue is the startTime of the next cue\n // the endTime of last cue is the duration of the video\n\n const cues = metadataTrack.cues;\n const cuesArray = []; // Create a copy of the TextTrackCueList...\n // ...disregarding cues with a falsey value\n\n for (let i = 0; i < cues.length; i++) {\n if (cues[i]) {\n cuesArray.push(cues[i]);\n }\n } // Group cues by their startTime value\n\n const cuesGroupedByStartTime = cuesArray.reduce((obj, cue) => {\n const timeSlot = obj[cue.startTime] || [];\n timeSlot.push(cue);\n obj[cue.startTime] = timeSlot;\n return obj;\n }, {}); // Sort startTimes by ascending order\n\n const sortedStartTimes = Object.keys(cuesGroupedByStartTime).sort((a, b) => Number(a) - Number(b)); // Map each cue group's endTime to the next group's startTime\n\n sortedStartTimes.forEach((startTime, idx) => {\n const cueGroup = cuesGroupedByStartTime[startTime];\n const finiteDuration = isFinite(videoDuration) ? videoDuration : startTime;\n const nextTime = Number(sortedStartTimes[idx + 1]) || finiteDuration; // Map each cue's endTime the next group's startTime\n\n cueGroup.forEach(cue => {\n cue.endTime = nextTime;\n });\n });\n}; // object for mapping daterange attributes\n\nconst dateRangeAttr = {\n id: 'ID',\n class: 'CLASS',\n startDate: 'START-DATE',\n duration: 'DURATION',\n endDate: 'END-DATE',\n endOnNext: 'END-ON-NEXT',\n plannedDuration: 'PLANNED-DURATION',\n scte35Out: 'SCTE35-OUT',\n scte35In: 'SCTE35-IN'\n};\nconst dateRangeKeysToOmit = new Set(['id', 'class', 'startDate', 'duration', 'endDate', 'endOnNext', 'startTime', 'endTime', 'processDateRange']);\n/**\n * Add DateRange metadata text track to a source handler given an array of metadata\n *\n * @param {Object}\n * @param {Object} inbandTextTracks the inband text tracks\n * @param {Array} dateRanges parsed media playlist\n * @private\n */\n\nconst addDateRangeMetadata = ({\n inbandTextTracks,\n dateRanges\n}) => {\n const metadataTrack = inbandTextTracks.metadataTrack_;\n if (!metadataTrack) {\n return;\n }\n const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n dateRanges.forEach(dateRange => {\n // we generate multiple cues for each date range with different attributes\n for (const key of Object.keys(dateRange)) {\n if (dateRangeKeysToOmit.has(key)) {\n continue;\n }\n const cue = new Cue(dateRange.startTime, dateRange.endTime, '');\n cue.id = dateRange.id;\n cue.type = 'com.apple.quicktime.HLS';\n cue.value = {\n key: dateRangeAttr[key],\n data: dateRange[key]\n };\n if (key === 'scte35Out' || key === 'scte35In') {\n cue.value.data = new Uint8Array(cue.value.data.match(/[\\da-f]{2}/gi)).buffer;\n }\n metadataTrack.addCue(cue);\n }\n dateRange.processDateRange();\n });\n};\n/**\n * Create metadata text track on video.js if it does not exist\n *\n * @param {Object} inbandTextTracks a reference to current inbandTextTracks\n * @param {string} dispatchType the inband metadata track dispatch type\n * @param {Object} tech the video.js tech\n * @private\n */\n\nconst createMetadataTrackIfNotExists = (inbandTextTracks, dispatchType, tech) => {\n if (inbandTextTracks.metadataTrack_) {\n return;\n }\n inbandTextTracks.metadataTrack_ = tech.addRemoteTextTrack({\n kind: 'metadata',\n label: 'Timed Metadata'\n }, false).track;\n if (!videojs.browser.IS_ANY_SAFARI) {\n inbandTextTracks.metadataTrack_.inBandMetadataTrackDispatchType = dispatchType;\n }\n};\n/**\n * Remove cues from a track on video.js.\n *\n * @param {Double} start start of where we should remove the cue\n * @param {Double} end end of where the we should remove the cue\n * @param {Object} track the text track to remove the cues from\n * @private\n */\n\nconst removeCuesFromTrack = function (start, end, track) {\n let i;\n let cue;\n if (!track) {\n return;\n }\n if (!track.cues) {\n return;\n }\n i = track.cues.length;\n while (i--) {\n cue = track.cues[i]; // Remove any cue within the provided start and end time\n\n if (cue.startTime >= start && cue.endTime <= end) {\n track.removeCue(cue);\n }\n }\n};\n/**\n * Remove duplicate cues from a track on video.js (a cue is considered a\n * duplicate if it has the same time interval and text as another)\n *\n * @param {Object} track the text track to remove the duplicate cues from\n * @private\n */\n\nconst removeDuplicateCuesFromTrack = function (track) {\n const cues = track.cues;\n if (!cues) {\n return;\n }\n const uniqueCues = {};\n for (let i = cues.length - 1; i >= 0; i--) {\n const cue = cues[i];\n const cueKey = `${cue.startTime}-${cue.endTime}-${cue.text}`;\n if (uniqueCues[cueKey]) {\n track.removeCue(cue);\n } else {\n uniqueCues[cueKey] = cue;\n }\n }\n};\n\n/**\n * Returns a list of gops in the buffer that have a pts value of 3 seconds or more in\n * front of current time.\n *\n * @param {Array} buffer\n * The current buffer of gop information\n * @param {number} currentTime\n * The current time\n * @param {Double} mapping\n * Offset to map display time to stream presentation time\n * @return {Array}\n * List of gops considered safe to append over\n */\n\nconst gopsSafeToAlignWith = (buffer, currentTime, mapping) => {\n if (typeof currentTime === 'undefined' || currentTime === null || !buffer.length) {\n return [];\n } // pts value for current time + 3 seconds to give a bit more wiggle room\n\n const currentTimePts = Math.ceil((currentTime - mapping + 3) * ONE_SECOND_IN_TS);\n let i;\n for (i = 0; i < buffer.length; i++) {\n if (buffer[i].pts > currentTimePts) {\n break;\n }\n }\n return buffer.slice(i);\n};\n/**\n * Appends gop information (timing and byteLength) received by the transmuxer for the\n * gops appended in the last call to appendBuffer\n *\n * @param {Array} buffer\n * The current buffer of gop information\n * @param {Array} gops\n * List of new gop information\n * @param {boolean} replace\n * If true, replace the buffer with the new gop information. If false, append the\n * new gop information to the buffer in the right location of time.\n * @return {Array}\n * Updated list of gop information\n */\n\nconst updateGopBuffer = (buffer, gops, replace) => {\n if (!gops.length) {\n return buffer;\n }\n if (replace) {\n // If we are in safe append mode, then completely overwrite the gop buffer\n // with the most recent appeneded data. This will make sure that when appending\n // future segments, we only try to align with gops that are both ahead of current\n // time and in the last segment appended.\n return gops.slice();\n }\n const start = gops[0].pts;\n let i = 0;\n for (i; i < buffer.length; i++) {\n if (buffer[i].pts >= start) {\n break;\n }\n }\n return buffer.slice(0, i).concat(gops);\n};\n/**\n * Removes gop information in buffer that overlaps with provided start and end\n *\n * @param {Array} buffer\n * The current buffer of gop information\n * @param {Double} start\n * position to start the remove at\n * @param {Double} end\n * position to end the remove at\n * @param {Double} mapping\n * Offset to map display time to stream presentation time\n */\n\nconst removeGopBuffer = (buffer, start, end, mapping) => {\n const startPts = Math.ceil((start - mapping) * ONE_SECOND_IN_TS);\n const endPts = Math.ceil((end - mapping) * ONE_SECOND_IN_TS);\n const updatedBuffer = buffer.slice();\n let i = buffer.length;\n while (i--) {\n if (buffer[i].pts <= endPts) {\n break;\n }\n }\n if (i === -1) {\n // no removal because end of remove range is before start of buffer\n return updatedBuffer;\n }\n let j = i + 1;\n while (j--) {\n if (buffer[j].pts <= startPts) {\n break;\n }\n } // clamp remove range start to 0 index\n\n j = Math.max(j, 0);\n updatedBuffer.splice(j, i - j + 1);\n return updatedBuffer;\n};\nconst shallowEqual = function (a, b) {\n // if both are undefined\n // or one or the other is undefined\n // they are not equal\n if (!a && !b || !a && b || a && !b) {\n return false;\n } // they are the same object and thus, equal\n\n if (a === b) {\n return true;\n } // sort keys so we can make sure they have\n // all the same keys later.\n\n const akeys = Object.keys(a).sort();\n const bkeys = Object.keys(b).sort(); // different number of keys, not equal\n\n if (akeys.length !== bkeys.length) {\n return false;\n }\n for (let i = 0; i < akeys.length; i++) {\n const key = akeys[i]; // different sorted keys, not equal\n\n if (key !== bkeys[i]) {\n return false;\n } // different values, not equal\n\n if (a[key] !== b[key]) {\n return false;\n }\n }\n return true;\n};\n\n// https://www.w3.org/TR/WebIDL-1/#quotaexceedederror\nconst QUOTA_EXCEEDED_ERR = 22;\n\n/**\n * The segment loader has no recourse except to fetch a segment in the\n * current playlist and use the internal timestamps in that segment to\n * generate a syncPoint. This function returns a good candidate index\n * for that process.\n *\n * @param {Array} segments - the segments array from a playlist.\n * @return {number} An index of a segment from the playlist to load\n */\n\nconst getSyncSegmentCandidate = function (currentTimeline, segments, targetTime) {\n segments = segments || [];\n const timelineSegments = [];\n let time = 0;\n for (let i = 0; i < segments.length; i++) {\n const segment = segments[i];\n if (currentTimeline === segment.timeline) {\n timelineSegments.push(i);\n time += segment.duration;\n if (time > targetTime) {\n return i;\n }\n }\n }\n if (timelineSegments.length === 0) {\n return 0;\n } // default to the last timeline segment\n\n return timelineSegments[timelineSegments.length - 1];\n}; // In the event of a quota exceeded error, keep at least one second of back buffer. This\n// number was arbitrarily chosen and may be updated in the future, but seemed reasonable\n// as a start to prevent any potential issues with removing content too close to the\n// playhead.\n\nconst MIN_BACK_BUFFER = 1; // in ms\n\nconst CHECK_BUFFER_DELAY = 500;\nconst finite = num => typeof num === 'number' && isFinite(num); // With most content hovering around 30fps, if a segment has a duration less than a half\n// frame at 30fps or one frame at 60fps, the bandwidth and throughput calculations will\n// not accurately reflect the rest of the content.\n\nconst MIN_SEGMENT_DURATION_TO_SAVE_STATS = 1 / 60;\nconst illegalMediaSwitch = (loaderType, startingMedia, trackInfo) => {\n // Although these checks should most likely cover non 'main' types, for now it narrows\n // the scope of our checks.\n if (loaderType !== 'main' || !startingMedia || !trackInfo) {\n return null;\n }\n if (!trackInfo.hasAudio && !trackInfo.hasVideo) {\n return 'Neither audio nor video found in segment.';\n }\n if (startingMedia.hasVideo && !trackInfo.hasVideo) {\n return 'Only audio found in segment when we expected video.' + ' We can\\'t switch to audio only from a stream that had video.' + ' To get rid of this message, please add codec information to the manifest.';\n }\n if (!startingMedia.hasVideo && trackInfo.hasVideo) {\n return 'Video found in segment when we expected only audio.' + ' We can\\'t switch to a stream with video from an audio only stream.' + ' To get rid of this message, please add codec information to the manifest.';\n }\n return null;\n};\n/**\n * Calculates a time value that is safe to remove from the back buffer without interrupting\n * playback.\n *\n * @param {TimeRange} seekable\n * The current seekable range\n * @param {number} currentTime\n * The current time of the player\n * @param {number} targetDuration\n * The target duration of the current playlist\n * @return {number}\n * Time that is safe to remove from the back buffer without interrupting playback\n */\n\nconst safeBackBufferTrimTime = (seekable, currentTime, targetDuration) => {\n // 30 seconds before the playhead provides a safe default for trimming.\n //\n // Choosing a reasonable default is particularly important for high bitrate content and\n // VOD videos/live streams with large windows, as the buffer may end up overfilled and\n // throw an APPEND_BUFFER_ERR.\n let trimTime = currentTime - Config.BACK_BUFFER_LENGTH;\n if (seekable.length) {\n // Some live playlists may have a shorter window of content than the full allowed back\n // buffer. For these playlists, don't save content that's no longer within the window.\n trimTime = Math.max(trimTime, seekable.start(0));\n } // Don't remove within target duration of the current time to avoid the possibility of\n // removing the GOP currently being played, as removing it can cause playback stalls.\n\n const maxTrimTime = currentTime - targetDuration;\n return Math.min(maxTrimTime, trimTime);\n};\nconst segmentInfoString = segmentInfo => {\n const {\n startOfSegment,\n duration,\n segment,\n part,\n playlist: {\n mediaSequence: seq,\n id,\n segments = []\n },\n mediaIndex: index,\n partIndex,\n timeline\n } = segmentInfo;\n const segmentLen = segments.length - 1;\n let selection = 'mediaIndex/partIndex increment';\n if (segmentInfo.getMediaInfoForTime) {\n selection = `getMediaInfoForTime (${segmentInfo.getMediaInfoForTime})`;\n } else if (segmentInfo.isSyncRequest) {\n selection = 'getSyncSegmentCandidate (isSyncRequest)';\n }\n if (segmentInfo.independent) {\n selection += ` with independent ${segmentInfo.independent}`;\n }\n const hasPartIndex = typeof partIndex === 'number';\n const name = segmentInfo.segment.uri ? 'segment' : 'pre-segment';\n const zeroBasedPartCount = hasPartIndex ? getKnownPartCount({\n preloadSegment: segment\n }) - 1 : 0;\n return `${name} [${seq + index}/${seq + segmentLen}]` + (hasPartIndex ? ` part [${partIndex}/${zeroBasedPartCount}]` : '') + ` segment start/end [${segment.start} => ${segment.end}]` + (hasPartIndex ? ` part start/end [${part.start} => ${part.end}]` : '') + ` startOfSegment [${startOfSegment}]` + ` duration [${duration}]` + ` timeline [${timeline}]` + ` selected by [${selection}]` + ` playlist [${id}]`;\n};\nconst timingInfoPropertyForMedia = mediaType => `${mediaType}TimingInfo`;\n/**\n * Returns the timestamp offset to use for the segment.\n *\n * @param {number} segmentTimeline\n * The timeline of the segment\n * @param {number} currentTimeline\n * The timeline currently being followed by the loader\n * @param {number} startOfSegment\n * The estimated segment start\n * @param {TimeRange[]} buffered\n * The loader's buffer\n * @param {boolean} overrideCheck\n * If true, no checks are made to see if the timestamp offset value should be set,\n * but sets it directly to a value.\n *\n * @return {number|null}\n * Either a number representing a new timestamp offset, or null if the segment is\n * part of the same timeline\n */\n\nconst timestampOffsetForSegment = ({\n segmentTimeline,\n currentTimeline,\n startOfSegment,\n buffered,\n overrideCheck\n}) => {\n // Check to see if we are crossing a discontinuity to see if we need to set the\n // timestamp offset on the transmuxer and source buffer.\n //\n // Previously, we changed the timestampOffset if the start of this segment was less than\n // the currently set timestampOffset, but this isn't desirable as it can produce bad\n // behavior, especially around long running live streams.\n if (!overrideCheck && segmentTimeline === currentTimeline) {\n return null;\n } // When changing renditions, it's possible to request a segment on an older timeline. For\n // instance, given two renditions with the following:\n //\n // #EXTINF:10\n // segment1\n // #EXT-X-DISCONTINUITY\n // #EXTINF:10\n // segment2\n // #EXTINF:10\n // segment3\n //\n // And the current player state:\n //\n // current time: 8\n // buffer: 0 => 20\n //\n // The next segment on the current rendition would be segment3, filling the buffer from\n // 20s onwards. However, if a rendition switch happens after segment2 was requested,\n // then the next segment to be requested will be segment1 from the new rendition in\n // order to fill time 8 and onwards. Using the buffered end would result in repeated\n // content (since it would position segment1 of the new rendition starting at 20s). This\n // case can be identified when the new segment's timeline is a prior value. Instead of\n // using the buffered end, the startOfSegment can be used, which, hopefully, will be\n // more accurate to the actual start time of the segment.\n\n if (segmentTimeline < currentTimeline) {\n return startOfSegment;\n } // segmentInfo.startOfSegment used to be used as the timestamp offset, however, that\n // value uses the end of the last segment if it is available. While this value\n // should often be correct, it's better to rely on the buffered end, as the new\n // content post discontinuity should line up with the buffered end as if it were\n // time 0 for the new content.\n\n return buffered.length ? buffered.end(buffered.length - 1) : startOfSegment;\n};\n/**\n * Returns whether or not the loader should wait for a timeline change from the timeline\n * change controller before processing the segment.\n *\n * Primary timing in VHS goes by video. This is different from most media players, as\n * audio is more often used as the primary timing source. For the foreseeable future, VHS\n * will continue to use video as the primary timing source, due to the current logic and\n * expectations built around it.\n\n * Since the timing follows video, in order to maintain sync, the video loader is\n * responsible for setting both audio and video source buffer timestamp offsets.\n *\n * Setting different values for audio and video source buffers could lead to\n * desyncing. The following examples demonstrate some of the situations where this\n * distinction is important. Note that all of these cases involve demuxed content. When\n * content is muxed, the audio and video are packaged together, therefore syncing\n * separate media playlists is not an issue.\n *\n * CASE 1: Audio prepares to load a new timeline before video:\n *\n * Timeline: 0 1\n * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Audio Loader: ^\n * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Video Loader ^\n *\n * In the above example, the audio loader is preparing to load the 6th segment, the first\n * after a discontinuity, while the video loader is still loading the 5th segment, before\n * the discontinuity.\n *\n * If the audio loader goes ahead and loads and appends the 6th segment before the video\n * loader crosses the discontinuity, then when appended, the 6th audio segment will use\n * the timestamp offset from timeline 0. This will likely lead to desyncing. In addition,\n * the audio loader must provide the audioAppendStart value to trim the content in the\n * transmuxer, and that value relies on the audio timestamp offset. Since the audio\n * timestamp offset is set by the video (main) loader, the audio loader shouldn't load the\n * segment until that value is provided.\n *\n * CASE 2: Video prepares to load a new timeline before audio:\n *\n * Timeline: 0 1\n * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Audio Loader: ^\n * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Video Loader ^\n *\n * In the above example, the video loader is preparing to load the 6th segment, the first\n * after a discontinuity, while the audio loader is still loading the 5th segment, before\n * the discontinuity.\n *\n * If the video loader goes ahead and loads and appends the 6th segment, then once the\n * segment is loaded and processed, both the video and audio timestamp offsets will be\n * set, since video is used as the primary timing source. This is to ensure content lines\n * up appropriately, as any modifications to the video timing are reflected by audio when\n * the video loader sets the audio and video timestamp offsets to the same value. However,\n * setting the timestamp offset for audio before audio has had a chance to change\n * timelines will likely lead to desyncing, as the audio loader will append segment 5 with\n * a timestamp intended to apply to segments from timeline 1 rather than timeline 0.\n *\n * CASE 3: When seeking, audio prepares to load a new timeline before video\n *\n * Timeline: 0 1\n * Audio Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Audio Loader: ^\n * Video Segments: 0 1 2 3 4 5 DISCO 6 7 8 9\n * Video Loader ^\n *\n * In the above example, both audio and video loaders are loading segments from timeline\n * 0, but imagine that the seek originated from timeline 1.\n *\n * When seeking to a new timeline, the timestamp offset will be set based on the expected\n * segment start of the loaded video segment. In order to maintain sync, the audio loader\n * must wait for the video loader to load its segment and update both the audio and video\n * timestamp offsets before it may load and append its own segment. This is the case\n * whether the seek results in a mismatched segment request (e.g., the audio loader\n * chooses to load segment 3 and the video loader chooses to load segment 4) or the\n * loaders choose to load the same segment index from each playlist, as the segments may\n * not be aligned perfectly, even for matching segment indexes.\n *\n * @param {Object} timelinechangeController\n * @param {number} currentTimeline\n * The timeline currently being followed by the loader\n * @param {number} segmentTimeline\n * The timeline of the segment being loaded\n * @param {('main'|'audio')} loaderType\n * The loader type\n * @param {boolean} audioDisabled\n * Whether the audio is disabled for the loader. This should only be true when the\n * loader may have muxed audio in its segment, but should not append it, e.g., for\n * the main loader when an alternate audio playlist is active.\n *\n * @return {boolean}\n * Whether the loader should wait for a timeline change from the timeline change\n * controller before processing the segment\n */\n\nconst shouldWaitForTimelineChange = ({\n timelineChangeController,\n currentTimeline,\n segmentTimeline,\n loaderType,\n audioDisabled\n}) => {\n if (currentTimeline === segmentTimeline) {\n return false;\n }\n if (loaderType === 'audio') {\n const lastMainTimelineChange = timelineChangeController.lastTimelineChange({\n type: 'main'\n }); // Audio loader should wait if:\n //\n // * main hasn't had a timeline change yet (thus has not loaded its first segment)\n // * main hasn't yet changed to the timeline audio is looking to load\n\n return !lastMainTimelineChange || lastMainTimelineChange.to !== segmentTimeline;\n } // The main loader only needs to wait for timeline changes if there's demuxed audio.\n // Otherwise, there's nothing to wait for, since audio would be muxed into the main\n // loader's segments (or the content is audio/video only and handled by the main\n // loader).\n\n if (loaderType === 'main' && audioDisabled) {\n const pendingAudioTimelineChange = timelineChangeController.pendingTimelineChange({\n type: 'audio'\n }); // Main loader should wait for the audio loader if audio is not pending a timeline\n // change to the current timeline.\n //\n // Since the main loader is responsible for setting the timestamp offset for both\n // audio and video, the main loader must wait for audio to be about to change to its\n // timeline before setting the offset, otherwise, if audio is behind in loading,\n // segments from the previous timeline would be adjusted by the new timestamp offset.\n //\n // This requirement means that video will not cross a timeline until the audio is\n // about to cross to it, so that way audio and video will always cross the timeline\n // together.\n //\n // In addition to normal timeline changes, these rules also apply to the start of a\n // stream (going from a non-existent timeline, -1, to timeline 0). It's important\n // that these rules apply to the first timeline change because if they did not, it's\n // possible that the main loader will cross two timelines before the audio loader has\n // crossed one. Logic may be implemented to handle the startup as a special case, but\n // it's easier to simply treat all timeline changes the same.\n\n if (pendingAudioTimelineChange && pendingAudioTimelineChange.to === segmentTimeline) {\n return false;\n }\n return true;\n }\n return false;\n};\nconst mediaDuration = timingInfos => {\n let maxDuration = 0;\n ['video', 'audio'].forEach(function (type) {\n const typeTimingInfo = timingInfos[`${type}TimingInfo`];\n if (!typeTimingInfo) {\n return;\n }\n const {\n start,\n end\n } = typeTimingInfo;\n let duration;\n if (typeof start === 'bigint' || typeof end === 'bigint') {\n duration = window$1.BigInt(end) - window$1.BigInt(start);\n } else if (typeof start === 'number' && typeof end === 'number') {\n duration = end - start;\n }\n if (typeof duration !== 'undefined' && duration > maxDuration) {\n maxDuration = duration;\n }\n }); // convert back to a number if it is lower than MAX_SAFE_INTEGER\n // as we only need BigInt when we are above that.\n\n if (typeof maxDuration === 'bigint' && maxDuration < Number.MAX_SAFE_INTEGER) {\n maxDuration = Number(maxDuration);\n }\n return maxDuration;\n};\nconst segmentTooLong = ({\n segmentDuration,\n maxDuration\n}) => {\n // 0 duration segments are most likely due to metadata only segments or a lack of\n // information.\n if (!segmentDuration) {\n return false;\n } // For HLS:\n //\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1\n // The EXTINF duration of each Media Segment in the Playlist\n // file, when rounded to the nearest integer, MUST be less than or equal\n // to the target duration; longer segments can trigger playback stalls\n // or other errors.\n //\n // For DASH, the mpd-parser uses the largest reported segment duration as the target\n // duration. Although that reported duration is occasionally approximate (i.e., not\n // exact), a strict check may report that a segment is too long more often in DASH.\n\n return Math.round(segmentDuration) > maxDuration + TIME_FUDGE_FACTOR;\n};\nconst getTroublesomeSegmentDurationMessage = (segmentInfo, sourceType) => {\n // Right now we aren't following DASH's timing model exactly, so only perform\n // this check for HLS content.\n if (sourceType !== 'hls') {\n return null;\n }\n const segmentDuration = mediaDuration({\n audioTimingInfo: segmentInfo.audioTimingInfo,\n videoTimingInfo: segmentInfo.videoTimingInfo\n }); // Don't report if we lack information.\n //\n // If the segment has a duration of 0 it is either a lack of information or a\n // metadata only segment and shouldn't be reported here.\n\n if (!segmentDuration) {\n return null;\n }\n const targetDuration = segmentInfo.playlist.targetDuration;\n const isSegmentWayTooLong = segmentTooLong({\n segmentDuration,\n maxDuration: targetDuration * 2\n });\n const isSegmentSlightlyTooLong = segmentTooLong({\n segmentDuration,\n maxDuration: targetDuration\n });\n const segmentTooLongMessage = `Segment with index ${segmentInfo.mediaIndex} ` + `from playlist ${segmentInfo.playlist.id} ` + `has a duration of ${segmentDuration} ` + `when the reported duration is ${segmentInfo.duration} ` + `and the target duration is ${targetDuration}. ` + 'For HLS content, a duration in excess of the target duration may result in ' + 'playback issues. See the HLS specification section on EXT-X-TARGETDURATION for ' + 'more details: ' + 'https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1';\n if (isSegmentWayTooLong || isSegmentSlightlyTooLong) {\n return {\n severity: isSegmentWayTooLong ? 'warn' : 'info',\n message: segmentTooLongMessage\n };\n }\n return null;\n};\n/**\n * An object that manages segment loading and appending.\n *\n * @class SegmentLoader\n * @param {Object} options required and optional options\n * @extends videojs.EventTarget\n */\n\nclass SegmentLoader extends videojs.EventTarget {\n constructor(settings, options = {}) {\n super(); // check pre-conditions\n\n if (!settings) {\n throw new TypeError('Initialization settings are required');\n }\n if (typeof settings.currentTime !== 'function') {\n throw new TypeError('No currentTime getter specified');\n }\n if (!settings.mediaSource) {\n throw new TypeError('No MediaSource specified');\n } // public properties\n\n this.bandwidth = settings.bandwidth;\n this.throughput = {\n rate: 0,\n count: 0\n };\n this.roundTrip = NaN;\n this.resetStats_();\n this.mediaIndex = null;\n this.partIndex = null; // private settings\n\n this.hasPlayed_ = settings.hasPlayed;\n this.currentTime_ = settings.currentTime;\n this.seekable_ = settings.seekable;\n this.seeking_ = settings.seeking;\n this.duration_ = settings.duration;\n this.mediaSource_ = settings.mediaSource;\n this.vhs_ = settings.vhs;\n this.loaderType_ = settings.loaderType;\n this.currentMediaInfo_ = void 0;\n this.startingMediaInfo_ = void 0;\n this.segmentMetadataTrack_ = settings.segmentMetadataTrack;\n this.goalBufferLength_ = settings.goalBufferLength;\n this.sourceType_ = settings.sourceType;\n this.sourceUpdater_ = settings.sourceUpdater;\n this.inbandTextTracks_ = settings.inbandTextTracks;\n this.state_ = 'INIT';\n this.timelineChangeController_ = settings.timelineChangeController;\n this.shouldSaveSegmentTimingInfo_ = true;\n this.parse708captions_ = settings.parse708captions;\n this.useDtsForTimestampOffset_ = settings.useDtsForTimestampOffset;\n this.captionServices_ = settings.captionServices;\n this.exactManifestTimings = settings.exactManifestTimings;\n this.addMetadataToTextTrack = settings.addMetadataToTextTrack; // private instance variables\n\n this.checkBufferTimeout_ = null;\n this.error_ = void 0;\n this.currentTimeline_ = -1;\n this.shouldForceTimestampOffsetAfterResync_ = false;\n this.pendingSegment_ = null;\n this.xhrOptions_ = null;\n this.pendingSegments_ = [];\n this.audioDisabled_ = false;\n this.isPendingTimestampOffset_ = false; // TODO possibly move gopBuffer and timeMapping info to a separate controller\n\n this.gopBuffer_ = [];\n this.timeMapping_ = 0;\n this.safeAppend_ = false;\n this.appendInitSegment_ = {\n audio: true,\n video: true\n };\n this.playlistOfLastInitSegment_ = {\n audio: null,\n video: null\n };\n this.callQueue_ = []; // If the segment loader prepares to load a segment, but does not have enough\n // information yet to start the loading process (e.g., if the audio loader wants to\n // load a segment from the next timeline but the main loader hasn't yet crossed that\n // timeline), then the load call will be added to the queue until it is ready to be\n // processed.\n\n this.loadQueue_ = [];\n this.metadataQueue_ = {\n id3: [],\n caption: []\n };\n this.waitingOnRemove_ = false;\n this.quotaExceededErrorRetryTimeout_ = null; // Fragmented mp4 playback\n\n this.activeInitSegmentId_ = null;\n this.initSegments_ = {}; // HLSe playback\n\n this.cacheEncryptionKeys_ = settings.cacheEncryptionKeys;\n this.keyCache_ = {};\n this.decrypter_ = settings.decrypter; // Manages the tracking and generation of sync-points, mappings\n // between a time in the display time and a segment index within\n // a playlist\n\n this.syncController_ = settings.syncController;\n this.syncPoint_ = {\n segmentIndex: 0,\n time: 0\n };\n this.transmuxer_ = this.createTransmuxer_();\n this.triggerSyncInfoUpdate_ = () => this.trigger('syncinfoupdate');\n this.syncController_.on('syncinfoupdate', this.triggerSyncInfoUpdate_);\n this.mediaSource_.addEventListener('sourceopen', () => {\n if (!this.isEndOfStream_()) {\n this.ended_ = false;\n }\n }); // ...for determining the fetch location\n\n this.fetchAtBuffer_ = false;\n this.logger_ = logger(`SegmentLoader[${this.loaderType_}]`);\n Object.defineProperty(this, 'state', {\n get() {\n return this.state_;\n },\n set(newState) {\n if (newState !== this.state_) {\n this.logger_(`${this.state_} -> ${newState}`);\n this.state_ = newState;\n this.trigger('statechange');\n }\n }\n });\n this.sourceUpdater_.on('ready', () => {\n if (this.hasEnoughInfoToAppend_()) {\n this.processCallQueue_();\n }\n }); // Only the main loader needs to listen for pending timeline changes, as the main\n // loader should wait for audio to be ready to change its timeline so that both main\n // and audio timelines change together. For more details, see the\n // shouldWaitForTimelineChange function.\n\n if (this.loaderType_ === 'main') {\n this.timelineChangeController_.on('pendingtimelinechange', () => {\n if (this.hasEnoughInfoToAppend_()) {\n this.processCallQueue_();\n }\n });\n } // The main loader only listens on pending timeline changes, but the audio loader,\n // since its loads follow main, needs to listen on timeline changes. For more details,\n // see the shouldWaitForTimelineChange function.\n\n if (this.loaderType_ === 'audio') {\n this.timelineChangeController_.on('timelinechange', () => {\n if (this.hasEnoughInfoToLoad_()) {\n this.processLoadQueue_();\n }\n if (this.hasEnoughInfoToAppend_()) {\n this.processCallQueue_();\n }\n });\n }\n }\n createTransmuxer_() {\n return segmentTransmuxer.createTransmuxer({\n remux: false,\n alignGopsAtEnd: this.safeAppend_,\n keepOriginalTimestamps: true,\n parse708captions: this.parse708captions_,\n captionServices: this.captionServices_\n });\n }\n /**\n * reset all of our media stats\n *\n * @private\n */\n\n resetStats_() {\n this.mediaBytesTransferred = 0;\n this.mediaRequests = 0;\n this.mediaRequestsAborted = 0;\n this.mediaRequestsTimedout = 0;\n this.mediaRequestsErrored = 0;\n this.mediaTransferDuration = 0;\n this.mediaSecondsLoaded = 0;\n this.mediaAppends = 0;\n }\n /**\n * dispose of the SegmentLoader and reset to the default state\n */\n\n dispose() {\n this.trigger('dispose');\n this.state = 'DISPOSED';\n this.pause();\n this.abort_();\n if (this.transmuxer_) {\n this.transmuxer_.terminate();\n }\n this.resetStats_();\n if (this.checkBufferTimeout_) {\n window$1.clearTimeout(this.checkBufferTimeout_);\n }\n if (this.syncController_ && this.triggerSyncInfoUpdate_) {\n this.syncController_.off('syncinfoupdate', this.triggerSyncInfoUpdate_);\n }\n this.off();\n }\n setAudio(enable) {\n this.audioDisabled_ = !enable;\n if (enable) {\n this.appendInitSegment_.audio = true;\n } else {\n // remove current track audio if it gets disabled\n this.sourceUpdater_.removeAudio(0, this.duration_());\n }\n }\n /**\n * abort anything that is currently doing on with the SegmentLoader\n * and reset to a default state\n */\n\n abort() {\n if (this.state !== 'WAITING') {\n if (this.pendingSegment_) {\n this.pendingSegment_ = null;\n }\n return;\n }\n this.abort_(); // We aborted the requests we were waiting on, so reset the loader's state to READY\n // since we are no longer \"waiting\" on any requests. XHR callback is not always run\n // when the request is aborted. This will prevent the loader from being stuck in the\n // WAITING state indefinitely.\n\n this.state = 'READY'; // don't wait for buffer check timeouts to begin fetching the\n // next segment\n\n if (!this.paused()) {\n this.monitorBuffer_();\n }\n }\n /**\n * abort all pending xhr requests and null any pending segements\n *\n * @private\n */\n\n abort_() {\n if (this.pendingSegment_ && this.pendingSegment_.abortRequests) {\n this.pendingSegment_.abortRequests();\n } // clear out the segment being processed\n\n this.pendingSegment_ = null;\n this.callQueue_ = [];\n this.loadQueue_ = [];\n this.metadataQueue_.id3 = [];\n this.metadataQueue_.caption = [];\n this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);\n this.waitingOnRemove_ = false;\n window$1.clearTimeout(this.quotaExceededErrorRetryTimeout_);\n this.quotaExceededErrorRetryTimeout_ = null;\n }\n checkForAbort_(requestId) {\n // If the state is APPENDING, then aborts will not modify the state, meaning the first\n // callback that happens should reset the state to READY so that loading can continue.\n if (this.state === 'APPENDING' && !this.pendingSegment_) {\n this.state = 'READY';\n return true;\n }\n if (!this.pendingSegment_ || this.pendingSegment_.requestId !== requestId) {\n return true;\n }\n return false;\n }\n /**\n * set an error on the segment loader and null out any pending segements\n *\n * @param {Error} error the error to set on the SegmentLoader\n * @return {Error} the error that was set or that is currently set\n */\n\n error(error) {\n if (typeof error !== 'undefined') {\n this.logger_('error occurred:', error);\n this.error_ = error;\n }\n this.pendingSegment_ = null;\n return this.error_;\n }\n endOfStream() {\n this.ended_ = true;\n if (this.transmuxer_) {\n // need to clear out any cached data to prepare for the new segment\n segmentTransmuxer.reset(this.transmuxer_);\n }\n this.gopBuffer_.length = 0;\n this.pause();\n this.trigger('ended');\n }\n /**\n * Indicates which time ranges are buffered\n *\n * @return {TimeRange}\n * TimeRange object representing the current buffered ranges\n */\n\n buffered_() {\n const trackInfo = this.getMediaInfo_();\n if (!this.sourceUpdater_ || !trackInfo) {\n return createTimeRanges();\n }\n if (this.loaderType_ === 'main') {\n const {\n hasAudio,\n hasVideo,\n isMuxed\n } = trackInfo;\n if (hasVideo && hasAudio && !this.audioDisabled_ && !isMuxed) {\n return this.sourceUpdater_.buffered();\n }\n if (hasVideo) {\n return this.sourceUpdater_.videoBuffered();\n }\n } // One case that can be ignored for now is audio only with alt audio,\n // as we don't yet have proper support for that.\n\n return this.sourceUpdater_.audioBuffered();\n }\n /**\n * Gets and sets init segment for the provided map\n *\n * @param {Object} map\n * The map object representing the init segment to get or set\n * @param {boolean=} set\n * If true, the init segment for the provided map should be saved\n * @return {Object}\n * map object for desired init segment\n */\n\n initSegmentForMap(map, set = false) {\n if (!map) {\n return null;\n }\n const id = initSegmentId(map);\n let storedMap = this.initSegments_[id];\n if (set && !storedMap && map.bytes) {\n this.initSegments_[id] = storedMap = {\n resolvedUri: map.resolvedUri,\n byterange: map.byterange,\n bytes: map.bytes,\n tracks: map.tracks,\n timescales: map.timescales\n };\n }\n return storedMap || map;\n }\n /**\n * Gets and sets key for the provided key\n *\n * @param {Object} key\n * The key object representing the key to get or set\n * @param {boolean=} set\n * If true, the key for the provided key should be saved\n * @return {Object}\n * Key object for desired key\n */\n\n segmentKey(key, set = false) {\n if (!key) {\n return null;\n }\n const id = segmentKeyId(key);\n let storedKey = this.keyCache_[id]; // TODO: We should use the HTTP Expires header to invalidate our cache per\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-6.2.3\n\n if (this.cacheEncryptionKeys_ && set && !storedKey && key.bytes) {\n this.keyCache_[id] = storedKey = {\n resolvedUri: key.resolvedUri,\n bytes: key.bytes\n };\n }\n const result = {\n resolvedUri: (storedKey || key).resolvedUri\n };\n if (storedKey) {\n result.bytes = storedKey.bytes;\n }\n return result;\n }\n /**\n * Returns true if all configuration required for loading is present, otherwise false.\n *\n * @return {boolean} True if the all configuration is ready for loading\n * @private\n */\n\n couldBeginLoading_() {\n return this.playlist_ && !this.paused();\n }\n /**\n * load a playlist and start to fill the buffer\n */\n\n load() {\n // un-pause\n this.monitorBuffer_(); // if we don't have a playlist yet, keep waiting for one to be\n // specified\n\n if (!this.playlist_) {\n return;\n } // if all the configuration is ready, initialize and begin loading\n\n if (this.state === 'INIT' && this.couldBeginLoading_()) {\n return this.init_();\n } // if we're in the middle of processing a segment already, don't\n // kick off an additional segment request\n\n if (!this.couldBeginLoading_() || this.state !== 'READY' && this.state !== 'INIT') {\n return;\n }\n this.state = 'READY';\n }\n /**\n * Once all the starting parameters have been specified, begin\n * operation. This method should only be invoked from the INIT\n * state.\n *\n * @private\n */\n\n init_() {\n this.state = 'READY'; // if this is the audio segment loader, and it hasn't been inited before, then any old\n // audio data from the muxed content should be removed\n\n this.resetEverything();\n return this.monitorBuffer_();\n }\n /**\n * set a playlist on the segment loader\n *\n * @param {PlaylistLoader} media the playlist to set on the segment loader\n */\n\n playlist(newPlaylist, options = {}) {\n if (!newPlaylist) {\n return;\n }\n const oldPlaylist = this.playlist_;\n const segmentInfo = this.pendingSegment_;\n this.playlist_ = newPlaylist;\n this.xhrOptions_ = options; // when we haven't started playing yet, the start of a live playlist\n // is always our zero-time so force a sync update each time the playlist\n // is refreshed from the server\n //\n // Use the INIT state to determine if playback has started, as the playlist sync info\n // should be fixed once requests begin (as sync points are generated based on sync\n // info), but not before then.\n\n if (this.state === 'INIT') {\n newPlaylist.syncInfo = {\n mediaSequence: newPlaylist.mediaSequence,\n time: 0\n }; // Setting the date time mapping means mapping the program date time (if available)\n // to time 0 on the player's timeline. The playlist's syncInfo serves a similar\n // purpose, mapping the initial mediaSequence to time zero. Since the syncInfo can\n // be updated as the playlist is refreshed before the loader starts loading, the\n // program date time mapping needs to be updated as well.\n //\n // This mapping is only done for the main loader because a program date time should\n // map equivalently between playlists.\n\n if (this.loaderType_ === 'main') {\n this.syncController_.setDateTimeMappingForStart(newPlaylist);\n }\n }\n let oldId = null;\n if (oldPlaylist) {\n if (oldPlaylist.id) {\n oldId = oldPlaylist.id;\n } else if (oldPlaylist.uri) {\n oldId = oldPlaylist.uri;\n }\n }\n this.logger_(`playlist update [${oldId} => ${newPlaylist.id || newPlaylist.uri}]`);\n this.syncController_.updateMediaSequenceMap(newPlaylist, this.currentTime_(), this.loaderType_); // in VOD, this is always a rendition switch (or we updated our syncInfo above)\n // in LIVE, we always want to update with new playlists (including refreshes)\n\n this.trigger('syncinfoupdate'); // if we were unpaused but waiting for a playlist, start\n // buffering now\n\n if (this.state === 'INIT' && this.couldBeginLoading_()) {\n return this.init_();\n }\n if (!oldPlaylist || oldPlaylist.uri !== newPlaylist.uri) {\n if (this.mediaIndex !== null) {\n // we must reset/resync the segment loader when we switch renditions and\n // the segment loader is already synced to the previous rendition\n // We only want to reset the loader here for LLHLS playback, as resetLoader sets fetchAtBuffer_\n // to false, resulting in fetching segments at currentTime and causing repeated\n // same-segment requests on playlist change. This erroneously drives up the playback watcher\n // stalled segment count, as re-requesting segments at the currentTime or browser cached segments\n // will not change the buffer.\n // Reference for LLHLS fixes: https://github.com/videojs/http-streaming/pull/1201\n const isLLHLS = !newPlaylist.endList && typeof newPlaylist.partTargetDuration === 'number';\n if (isLLHLS) {\n this.resetLoader();\n } else {\n this.resyncLoader();\n }\n }\n this.currentMediaInfo_ = void 0;\n this.trigger('playlistupdate'); // the rest of this function depends on `oldPlaylist` being defined\n\n return;\n } // we reloaded the same playlist so we are in a live scenario\n // and we will likely need to adjust the mediaIndex\n\n const mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence;\n this.logger_(`live window shift [${mediaSequenceDiff}]`); // update the mediaIndex on the SegmentLoader\n // this is important because we can abort a request and this value must be\n // equal to the last appended mediaIndex\n\n if (this.mediaIndex !== null) {\n this.mediaIndex -= mediaSequenceDiff; // this can happen if we are going to load the first segment, but get a playlist\n // update during that. mediaIndex would go from 0 to -1 if mediaSequence in the\n // new playlist was incremented by 1.\n\n if (this.mediaIndex < 0) {\n this.mediaIndex = null;\n this.partIndex = null;\n } else {\n const segment = this.playlist_.segments[this.mediaIndex]; // partIndex should remain the same for the same segment\n // unless parts fell off of the playlist for this segment.\n // In that case we need to reset partIndex and resync\n\n if (this.partIndex && (!segment.parts || !segment.parts.length || !segment.parts[this.partIndex])) {\n const mediaIndex = this.mediaIndex;\n this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`);\n this.resetLoader(); // We want to throw away the partIndex and the data associated with it,\n // as the part was dropped from our current playlists segment.\n // The mediaIndex will still be valid so keep that around.\n\n this.mediaIndex = mediaIndex;\n }\n }\n } // update the mediaIndex on the SegmentInfo object\n // this is important because we will update this.mediaIndex with this value\n // in `handleAppendsDone_` after the segment has been successfully appended\n\n if (segmentInfo) {\n segmentInfo.mediaIndex -= mediaSequenceDiff;\n if (segmentInfo.mediaIndex < 0) {\n segmentInfo.mediaIndex = null;\n segmentInfo.partIndex = null;\n } else {\n // we need to update the referenced segment so that timing information is\n // saved for the new playlist's segment, however, if the segment fell off the\n // playlist, we can leave the old reference and just lose the timing info\n if (segmentInfo.mediaIndex >= 0) {\n segmentInfo.segment = newPlaylist.segments[segmentInfo.mediaIndex];\n }\n if (segmentInfo.partIndex >= 0 && segmentInfo.segment.parts) {\n segmentInfo.part = segmentInfo.segment.parts[segmentInfo.partIndex];\n }\n }\n }\n this.syncController_.saveExpiredSegmentInfo(oldPlaylist, newPlaylist);\n }\n /**\n * Prevent the loader from fetching additional segments. If there\n * is a segment request outstanding, it will finish processing\n * before the loader halts. A segment loader can be unpaused by\n * calling load().\n */\n\n pause() {\n if (this.checkBufferTimeout_) {\n window$1.clearTimeout(this.checkBufferTimeout_);\n this.checkBufferTimeout_ = null;\n }\n }\n /**\n * Returns whether the segment loader is fetching additional\n * segments when given the opportunity. This property can be\n * modified through calls to pause() and load().\n */\n\n paused() {\n return this.checkBufferTimeout_ === null;\n }\n /**\n * Delete all the buffered data and reset the SegmentLoader\n *\n * @param {Function} [done] an optional callback to be executed when the remove\n * operation is complete\n */\n\n resetEverything(done) {\n this.ended_ = false;\n this.activeInitSegmentId_ = null;\n this.appendInitSegment_ = {\n audio: true,\n video: true\n };\n this.resetLoader(); // remove from 0, the earliest point, to Infinity, to signify removal of everything.\n // VTT Segment Loader doesn't need to do anything but in the regular SegmentLoader,\n // we then clamp the value to duration if necessary.\n\n this.remove(0, Infinity, done); // clears fmp4 captions\n\n if (this.transmuxer_) {\n this.transmuxer_.postMessage({\n action: 'clearAllMp4Captions'\n }); // reset the cache in the transmuxer\n\n this.transmuxer_.postMessage({\n action: 'reset'\n });\n }\n }\n /**\n * Force the SegmentLoader to resync and start loading around the currentTime instead\n * of starting at the end of the buffer\n *\n * Useful for fast quality changes\n */\n\n resetLoader() {\n this.fetchAtBuffer_ = false;\n this.resyncLoader();\n }\n /**\n * Force the SegmentLoader to restart synchronization and make a conservative guess\n * before returning to the simple walk-forward method\n */\n\n resyncLoader() {\n if (this.transmuxer_) {\n // need to clear out any cached data to prepare for the new segment\n segmentTransmuxer.reset(this.transmuxer_);\n }\n this.mediaIndex = null;\n this.partIndex = null;\n this.syncPoint_ = null;\n this.isPendingTimestampOffset_ = false;\n this.shouldForceTimestampOffsetAfterResync_ = true;\n this.callQueue_ = [];\n this.loadQueue_ = [];\n this.metadataQueue_.id3 = [];\n this.metadataQueue_.caption = [];\n this.abort();\n if (this.transmuxer_) {\n this.transmuxer_.postMessage({\n action: 'clearParsedMp4Captions'\n });\n }\n }\n /**\n * Remove any data in the source buffer between start and end times\n *\n * @param {number} start - the start time of the region to remove from the buffer\n * @param {number} end - the end time of the region to remove from the buffer\n * @param {Function} [done] - an optional callback to be executed when the remove\n * @param {boolean} force - force all remove operations to happen\n * operation is complete\n */\n\n remove(start, end, done = () => {}, force = false) {\n // clamp end to duration if we need to remove everything.\n // This is due to a browser bug that causes issues if we remove to Infinity.\n // videojs/videojs-contrib-hls#1225\n if (end === Infinity) {\n end = this.duration_();\n } // skip removes that would throw an error\n // commonly happens during a rendition switch at the start of a video\n // from start 0 to end 0\n\n if (end <= start) {\n this.logger_('skipping remove because end ${end} is <= start ${start}');\n return;\n }\n if (!this.sourceUpdater_ || !this.getMediaInfo_()) {\n this.logger_('skipping remove because no source updater or starting media info'); // nothing to remove if we haven't processed any media\n\n return;\n } // set it to one to complete this function's removes\n\n let removesRemaining = 1;\n const removeFinished = () => {\n removesRemaining--;\n if (removesRemaining === 0) {\n done();\n }\n };\n if (force || !this.audioDisabled_) {\n removesRemaining++;\n this.sourceUpdater_.removeAudio(start, end, removeFinished);\n } // While it would be better to only remove video if the main loader has video, this\n // should be safe with audio only as removeVideo will call back even if there's no\n // video buffer.\n //\n // In theory we can check to see if there's video before calling the remove, but in\n // the event that we're switching between renditions and from video to audio only\n // (when we add support for that), we may need to clear the video contents despite\n // what the new media will contain.\n\n if (force || this.loaderType_ === 'main') {\n this.gopBuffer_ = removeGopBuffer(this.gopBuffer_, start, end, this.timeMapping_);\n removesRemaining++;\n this.sourceUpdater_.removeVideo(start, end, removeFinished);\n } // remove any captions and ID3 tags\n\n for (const track in this.inbandTextTracks_) {\n removeCuesFromTrack(start, end, this.inbandTextTracks_[track]);\n }\n removeCuesFromTrack(start, end, this.segmentMetadataTrack_); // finished this function's removes\n\n removeFinished();\n }\n /**\n * (re-)schedule monitorBufferTick_ to run as soon as possible\n *\n * @private\n */\n\n monitorBuffer_() {\n if (this.checkBufferTimeout_) {\n window$1.clearTimeout(this.checkBufferTimeout_);\n }\n this.checkBufferTimeout_ = window$1.setTimeout(this.monitorBufferTick_.bind(this), 1);\n }\n /**\n * As long as the SegmentLoader is in the READY state, periodically\n * invoke fillBuffer_().\n *\n * @private\n */\n\n monitorBufferTick_() {\n if (this.state === 'READY') {\n this.fillBuffer_();\n }\n if (this.checkBufferTimeout_) {\n window$1.clearTimeout(this.checkBufferTimeout_);\n }\n this.checkBufferTimeout_ = window$1.setTimeout(this.monitorBufferTick_.bind(this), CHECK_BUFFER_DELAY);\n }\n /**\n * fill the buffer with segements unless the sourceBuffers are\n * currently updating\n *\n * Note: this function should only ever be called by monitorBuffer_\n * and never directly\n *\n * @private\n */\n\n fillBuffer_() {\n // TODO since the source buffer maintains a queue, and we shouldn't call this function\n // except when we're ready for the next segment, this check can most likely be removed\n if (this.sourceUpdater_.updating()) {\n return;\n } // see if we need to begin loading immediately\n\n const segmentInfo = this.chooseNextRequest_();\n if (!segmentInfo) {\n return;\n }\n if (typeof segmentInfo.timestampOffset === 'number') {\n this.isPendingTimestampOffset_ = false;\n this.timelineChangeController_.pendingTimelineChange({\n type: this.loaderType_,\n from: this.currentTimeline_,\n to: segmentInfo.timeline\n });\n }\n this.loadSegment_(segmentInfo);\n }\n /**\n * Determines if we should call endOfStream on the media source based\n * on the state of the buffer or if appened segment was the final\n * segment in the playlist.\n *\n * @param {number} [mediaIndex] the media index of segment we last appended\n * @param {Object} [playlist] a media playlist object\n * @return {boolean} do we need to call endOfStream on the MediaSource\n */\n\n isEndOfStream_(mediaIndex = this.mediaIndex, playlist = this.playlist_, partIndex = this.partIndex) {\n if (!playlist || !this.mediaSource_) {\n return false;\n }\n const segment = typeof mediaIndex === 'number' && playlist.segments[mediaIndex]; // mediaIndex is zero based but length is 1 based\n\n const appendedLastSegment = mediaIndex + 1 === playlist.segments.length; // true if there are no parts, or this is the last part.\n\n const appendedLastPart = !segment || !segment.parts || partIndex + 1 === segment.parts.length; // if we've buffered to the end of the video, we need to call endOfStream\n // so that MediaSources can trigger the `ended` event when it runs out of\n // buffered data instead of waiting for me\n\n return playlist.endList && this.mediaSource_.readyState === 'open' && appendedLastSegment && appendedLastPart;\n }\n /**\n * Determines what request should be made given current segment loader state.\n *\n * @return {Object} a request object that describes the segment/part to load\n */\n\n chooseNextRequest_() {\n const buffered = this.buffered_();\n const bufferedEnd = lastBufferedEnd(buffered) || 0;\n const bufferedTime = timeAheadOf(buffered, this.currentTime_());\n const preloaded = !this.hasPlayed_() && bufferedTime >= 1;\n const haveEnoughBuffer = bufferedTime >= this.goalBufferLength_();\n const segments = this.playlist_.segments; // return no segment if:\n // 1. we don't have segments\n // 2. The video has not yet played and we already downloaded a segment\n // 3. we already have enough buffered time\n\n if (!segments.length || preloaded || haveEnoughBuffer) {\n return null;\n }\n this.syncPoint_ = this.syncPoint_ || this.syncController_.getSyncPoint(this.playlist_, this.duration_(), this.currentTimeline_, this.currentTime_(), this.loaderType_);\n const next = {\n partIndex: null,\n mediaIndex: null,\n startOfSegment: null,\n playlist: this.playlist_,\n isSyncRequest: Boolean(!this.syncPoint_)\n };\n if (next.isSyncRequest) {\n next.mediaIndex = getSyncSegmentCandidate(this.currentTimeline_, segments, bufferedEnd);\n this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${next.mediaIndex}`);\n } else if (this.mediaIndex !== null) {\n const segment = segments[this.mediaIndex];\n const partIndex = typeof this.partIndex === 'number' ? this.partIndex : -1;\n next.startOfSegment = segment.end ? segment.end : bufferedEnd;\n if (segment.parts && segment.parts[partIndex + 1]) {\n next.mediaIndex = this.mediaIndex;\n next.partIndex = partIndex + 1;\n } else {\n next.mediaIndex = this.mediaIndex + 1;\n }\n } else {\n // Find the segment containing the end of the buffer or current time.\n let mediaInfo = Playlist.getMediaInfoForTime({\n exactManifestTimings: this.exactManifestTimings,\n playlist: this.playlist_,\n currentTime: this.fetchAtBuffer_ ? bufferedEnd : this.currentTime_(),\n startingPartIndex: this.syncPoint_.partIndex,\n startingSegmentIndex: this.syncPoint_.segmentIndex,\n startTime: this.syncPoint_.time\n });\n if (!mediaInfo) {\n return null;\n }\n if (this.fetchAtBuffer_) {\n const segment = segments[mediaInfo.segmentIndex];\n const segmentEnd = mediaInfo.startTime + segment.duration;\n if (segmentEnd > bufferedEnd) {\n const difference = segmentEnd - bufferedEnd;\n const extendedFudgeFactor = 2 * TIME_FUDGE_FACTOR; // difference <= 0.06\n\n if (difference <= extendedFudgeFactor) {\n // we are trying to choose segment that had been already appended from previous quality\n // lets try to choose segment with buffered.end + padding (difference + 0.06)\n mediaInfo = Playlist.getMediaInfoForTime({\n exactManifestTimings: this.exactManifestTimings,\n playlist: this.playlist_,\n currentTime: bufferedEnd + difference + extendedFudgeFactor,\n startingPartIndex: this.syncPoint_.partIndex,\n startingSegmentIndex: this.syncPoint_.segmentIndex,\n startTime: this.syncPoint_.time\n });\n if (!mediaInfo) {\n // could not find next segment/part\n // early return and wait until playlist is refreshed\n return null;\n } // found next segment/part\n }\n }\n }\n\n const {\n segmentIndex,\n startTime,\n partIndex\n } = mediaInfo;\n next.getMediaInfoForTime = this.fetchAtBuffer_ ? `bufferedEnd ${bufferedEnd}` : `currentTime ${this.currentTime_()}`;\n next.mediaIndex = segmentIndex;\n next.startOfSegment = startTime;\n next.partIndex = partIndex;\n this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${next.mediaIndex} `);\n }\n const nextSegment = segments[next.mediaIndex];\n let nextPart = nextSegment && typeof next.partIndex === 'number' && nextSegment.parts && nextSegment.parts[next.partIndex]; // if the next segment index is invalid or\n // the next partIndex is invalid do not choose a next segment.\n\n if (!nextSegment || typeof next.partIndex === 'number' && !nextPart) {\n return null;\n } // if the next segment has parts, and we don't have a partIndex.\n // Set partIndex to 0\n\n if (typeof next.partIndex !== 'number' && nextSegment.parts) {\n next.partIndex = 0;\n nextPart = nextSegment.parts[0];\n } // independentSegments applies to every segment in a playlist. If independentSegments appears in a main playlist,\n // it applies to each segment in each media playlist.\n // https://datatracker.ietf.org/doc/html/draft-pantos-http-live-streaming-23#section-4.3.5.1\n\n const hasIndependentSegments = this.vhs_.playlists && this.vhs_.playlists.main && this.vhs_.playlists.main.independentSegments || this.playlist_.independentSegments; // if we have no buffered data then we need to make sure\n // that the next part we append is \"independent\" if possible.\n // So we check if the previous part is independent, and request\n // it if it is.\n\n if (!bufferedTime && nextPart && !hasIndependentSegments && !nextPart.independent) {\n if (next.partIndex === 0) {\n const lastSegment = segments[next.mediaIndex - 1];\n const lastSegmentLastPart = lastSegment.parts && lastSegment.parts.length && lastSegment.parts[lastSegment.parts.length - 1];\n if (lastSegmentLastPart && lastSegmentLastPart.independent) {\n next.mediaIndex -= 1;\n next.partIndex = lastSegment.parts.length - 1;\n next.independent = 'previous segment';\n }\n } else if (nextSegment.parts[next.partIndex - 1].independent) {\n next.partIndex -= 1;\n next.independent = 'previous part';\n }\n }\n const ended = this.mediaSource_ && this.mediaSource_.readyState === 'ended'; // do not choose a next segment if all of the following:\n // 1. this is the last segment in the playlist\n // 2. end of stream has been called on the media source already\n // 3. the player is not seeking\n\n if (next.mediaIndex >= segments.length - 1 && ended && !this.seeking_()) {\n return null;\n }\n if (this.shouldForceTimestampOffsetAfterResync_) {\n this.shouldForceTimestampOffsetAfterResync_ = false;\n next.forceTimestampOffset = true;\n this.logger_('choose next request. Force timestamp offset after loader resync');\n }\n return this.generateSegmentInfo_(next);\n }\n generateSegmentInfo_(options) {\n const {\n independent,\n playlist,\n mediaIndex,\n startOfSegment,\n isSyncRequest,\n partIndex,\n forceTimestampOffset,\n getMediaInfoForTime\n } = options;\n const segment = playlist.segments[mediaIndex];\n const part = typeof partIndex === 'number' && segment.parts[partIndex];\n const segmentInfo = {\n requestId: 'segment-loader-' + Math.random(),\n // resolve the segment URL relative to the playlist\n uri: part && part.resolvedUri || segment.resolvedUri,\n // the segment's mediaIndex at the time it was requested\n mediaIndex,\n partIndex: part ? partIndex : null,\n // whether or not to update the SegmentLoader's state with this\n // segment's mediaIndex\n isSyncRequest,\n startOfSegment,\n // the segment's playlist\n playlist,\n // unencrypted bytes of the segment\n bytes: null,\n // when a key is defined for this segment, the encrypted bytes\n encryptedBytes: null,\n // The target timestampOffset for this segment when we append it\n // to the source buffer\n timestampOffset: null,\n // The timeline that the segment is in\n timeline: segment.timeline,\n // The expected duration of the segment in seconds\n duration: part && part.duration || segment.duration,\n // retain the segment in case the playlist updates while doing an async process\n segment,\n part,\n byteLength: 0,\n transmuxer: this.transmuxer_,\n // type of getMediaInfoForTime that was used to get this segment\n getMediaInfoForTime,\n independent\n };\n const overrideCheck = typeof forceTimestampOffset !== 'undefined' ? forceTimestampOffset : this.isPendingTimestampOffset_;\n segmentInfo.timestampOffset = this.timestampOffsetForSegment_({\n segmentTimeline: segment.timeline,\n currentTimeline: this.currentTimeline_,\n startOfSegment,\n buffered: this.buffered_(),\n overrideCheck\n });\n const audioBufferedEnd = lastBufferedEnd(this.sourceUpdater_.audioBuffered());\n if (typeof audioBufferedEnd === 'number') {\n // since the transmuxer is using the actual timing values, but the buffer is\n // adjusted by the timestamp offset, we must adjust the value here\n segmentInfo.audioAppendStart = audioBufferedEnd - this.sourceUpdater_.audioTimestampOffset();\n }\n if (this.sourceUpdater_.videoBuffered().length) {\n segmentInfo.gopsToAlignWith = gopsSafeToAlignWith(this.gopBuffer_,\n // since the transmuxer is using the actual timing values, but the time is\n // adjusted by the timestmap offset, we must adjust the value here\n this.currentTime_() - this.sourceUpdater_.videoTimestampOffset(), this.timeMapping_);\n }\n return segmentInfo;\n } // get the timestampoffset for a segment,\n // added so that vtt segment loader can override and prevent\n // adding timestamp offsets.\n\n timestampOffsetForSegment_(options) {\n return timestampOffsetForSegment(options);\n }\n /**\n * Determines if the network has enough bandwidth to complete the current segment\n * request in a timely manner. If not, the request will be aborted early and bandwidth\n * updated to trigger a playlist switch.\n *\n * @param {Object} stats\n * Object containing stats about the request timing and size\n * @private\n */\n\n earlyAbortWhenNeeded_(stats) {\n if (this.vhs_.tech_.paused() ||\n // Don't abort if the current playlist is on the lowestEnabledRendition\n // TODO: Replace using timeout with a boolean indicating whether this playlist is\n // the lowestEnabledRendition.\n !this.xhrOptions_.timeout ||\n // Don't abort if we have no bandwidth information to estimate segment sizes\n !this.playlist_.attributes.BANDWIDTH) {\n return;\n } // Wait at least 1 second since the first byte of data has been received before\n // using the calculated bandwidth from the progress event to allow the bitrate\n // to stabilize\n\n if (Date.now() - (stats.firstBytesReceivedAt || Date.now()) < 1000) {\n return;\n }\n const currentTime = this.currentTime_();\n const measuredBandwidth = stats.bandwidth;\n const segmentDuration = this.pendingSegment_.duration;\n const requestTimeRemaining = Playlist.estimateSegmentRequestTime(segmentDuration, measuredBandwidth, this.playlist_, stats.bytesReceived); // Subtract 1 from the timeUntilRebuffer so we still consider an early abort\n // if we are only left with less than 1 second when the request completes.\n // A negative timeUntilRebuffering indicates we are already rebuffering\n\n const timeUntilRebuffer$1 = timeUntilRebuffer(this.buffered_(), currentTime, this.vhs_.tech_.playbackRate()) - 1; // Only consider aborting early if the estimated time to finish the download\n // is larger than the estimated time until the player runs out of forward buffer\n\n if (requestTimeRemaining <= timeUntilRebuffer$1) {\n return;\n }\n const switchCandidate = minRebufferMaxBandwidthSelector({\n main: this.vhs_.playlists.main,\n currentTime,\n bandwidth: measuredBandwidth,\n duration: this.duration_(),\n segmentDuration,\n timeUntilRebuffer: timeUntilRebuffer$1,\n currentTimeline: this.currentTimeline_,\n syncController: this.syncController_\n });\n if (!switchCandidate) {\n return;\n }\n const rebufferingImpact = requestTimeRemaining - timeUntilRebuffer$1;\n const timeSavedBySwitching = rebufferingImpact - switchCandidate.rebufferingImpact;\n let minimumTimeSaving = 0.5; // If we are already rebuffering, increase the amount of variance we add to the\n // potential round trip time of the new request so that we are not too aggressive\n // with switching to a playlist that might save us a fraction of a second.\n\n if (timeUntilRebuffer$1 <= TIME_FUDGE_FACTOR) {\n minimumTimeSaving = 1;\n }\n if (!switchCandidate.playlist || switchCandidate.playlist.uri === this.playlist_.uri || timeSavedBySwitching < minimumTimeSaving) {\n return;\n } // set the bandwidth to that of the desired playlist being sure to scale by\n // BANDWIDTH_VARIANCE and add one so the playlist selector does not exclude it\n // don't trigger a bandwidthupdate as the bandwidth is artifial\n\n this.bandwidth = switchCandidate.playlist.attributes.BANDWIDTH * Config.BANDWIDTH_VARIANCE + 1;\n this.trigger('earlyabort');\n }\n handleAbort_(segmentInfo) {\n this.logger_(`Aborting ${segmentInfoString(segmentInfo)}`);\n this.mediaRequestsAborted += 1;\n }\n /**\n * XHR `progress` event handler\n *\n * @param {Event}\n * The XHR `progress` event\n * @param {Object} simpleSegment\n * A simplified segment object copy\n * @private\n */\n\n handleProgress_(event, simpleSegment) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n }\n this.trigger('progress');\n }\n handleTrackInfo_(simpleSegment, trackInfo) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n }\n if (this.checkForIllegalMediaSwitch(trackInfo)) {\n return;\n }\n trackInfo = trackInfo || {}; // When we have track info, determine what media types this loader is dealing with.\n // Guard against cases where we're not getting track info at all until we are\n // certain that all streams will provide it.\n\n if (!shallowEqual(this.currentMediaInfo_, trackInfo)) {\n this.appendInitSegment_ = {\n audio: true,\n video: true\n };\n this.startingMediaInfo_ = trackInfo;\n this.currentMediaInfo_ = trackInfo;\n this.logger_('trackinfo update', trackInfo);\n this.trigger('trackinfo');\n } // trackinfo may cause an abort if the trackinfo\n // causes a codec change to an unsupported codec.\n\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n } // set trackinfo on the pending segment so that\n // it can append.\n\n this.pendingSegment_.trackInfo = trackInfo; // check if any calls were waiting on the track info\n\n if (this.hasEnoughInfoToAppend_()) {\n this.processCallQueue_();\n }\n }\n handleTimingInfo_(simpleSegment, mediaType, timeType, time) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n }\n const segmentInfo = this.pendingSegment_;\n const timingInfoProperty = timingInfoPropertyForMedia(mediaType);\n segmentInfo[timingInfoProperty] = segmentInfo[timingInfoProperty] || {};\n segmentInfo[timingInfoProperty][timeType] = time;\n this.logger_(`timinginfo: ${mediaType} - ${timeType} - ${time}`); // check if any calls were waiting on the timing info\n\n if (this.hasEnoughInfoToAppend_()) {\n this.processCallQueue_();\n }\n }\n handleCaptions_(simpleSegment, captionData) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n } // This could only happen with fmp4 segments, but\n // should still not happen in general\n\n if (captionData.length === 0) {\n this.logger_('SegmentLoader received no captions from a caption event');\n return;\n }\n const segmentInfo = this.pendingSegment_; // Wait until we have some video data so that caption timing\n // can be adjusted by the timestamp offset\n\n if (!segmentInfo.hasAppendedData_) {\n this.metadataQueue_.caption.push(this.handleCaptions_.bind(this, simpleSegment, captionData));\n return;\n }\n const timestampOffset = this.sourceUpdater_.videoTimestampOffset() === null ? this.sourceUpdater_.audioTimestampOffset() : this.sourceUpdater_.videoTimestampOffset();\n const captionTracks = {}; // get total start/end and captions for each track/stream\n\n captionData.forEach(caption => {\n // caption.stream is actually a track name...\n // set to the existing values in tracks or default values\n captionTracks[caption.stream] = captionTracks[caption.stream] || {\n // Infinity, as any other value will be less than this\n startTime: Infinity,\n captions: [],\n // 0 as an other value will be more than this\n endTime: 0\n };\n const captionTrack = captionTracks[caption.stream];\n captionTrack.startTime = Math.min(captionTrack.startTime, caption.startTime + timestampOffset);\n captionTrack.endTime = Math.max(captionTrack.endTime, caption.endTime + timestampOffset);\n captionTrack.captions.push(caption);\n });\n Object.keys(captionTracks).forEach(trackName => {\n const {\n startTime,\n endTime,\n captions\n } = captionTracks[trackName];\n const inbandTextTracks = this.inbandTextTracks_;\n this.logger_(`adding cues from ${startTime} -> ${endTime} for ${trackName}`);\n createCaptionsTrackIfNotExists(inbandTextTracks, this.vhs_.tech_, trackName); // clear out any cues that start and end at the same time period for the same track.\n // We do this because a rendition change that also changes the timescale for captions\n // will result in captions being re-parsed for certain segments. If we add them again\n // without clearing we will have two of the same captions visible.\n\n removeCuesFromTrack(startTime, endTime, inbandTextTracks[trackName]);\n addCaptionData({\n captionArray: captions,\n inbandTextTracks,\n timestampOffset\n });\n }); // Reset stored captions since we added parsed\n // captions to a text track at this point\n\n if (this.transmuxer_) {\n this.transmuxer_.postMessage({\n action: 'clearParsedMp4Captions'\n });\n }\n }\n handleId3_(simpleSegment, id3Frames, dispatchType) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n }\n const segmentInfo = this.pendingSegment_; // we need to have appended data in order for the timestamp offset to be set\n\n if (!segmentInfo.hasAppendedData_) {\n this.metadataQueue_.id3.push(this.handleId3_.bind(this, simpleSegment, id3Frames, dispatchType));\n return;\n }\n this.addMetadataToTextTrack(dispatchType, id3Frames, this.duration_());\n }\n processMetadataQueue_() {\n this.metadataQueue_.id3.forEach(fn => fn());\n this.metadataQueue_.caption.forEach(fn => fn());\n this.metadataQueue_.id3 = [];\n this.metadataQueue_.caption = [];\n }\n processCallQueue_() {\n const callQueue = this.callQueue_; // Clear out the queue before the queued functions are run, since some of the\n // functions may check the length of the load queue and default to pushing themselves\n // back onto the queue.\n\n this.callQueue_ = [];\n callQueue.forEach(fun => fun());\n }\n processLoadQueue_() {\n const loadQueue = this.loadQueue_; // Clear out the queue before the queued functions are run, since some of the\n // functions may check the length of the load queue and default to pushing themselves\n // back onto the queue.\n\n this.loadQueue_ = [];\n loadQueue.forEach(fun => fun());\n }\n /**\n * Determines whether the loader has enough info to load the next segment.\n *\n * @return {boolean}\n * Whether or not the loader has enough info to load the next segment\n */\n\n hasEnoughInfoToLoad_() {\n // Since primary timing goes by video, only the audio loader potentially needs to wait\n // to load.\n if (this.loaderType_ !== 'audio') {\n return true;\n }\n const segmentInfo = this.pendingSegment_; // A fill buffer must have already run to establish a pending segment before there's\n // enough info to load.\n\n if (!segmentInfo) {\n return false;\n } // The first segment can and should be loaded immediately so that source buffers are\n // created together (before appending). Source buffer creation uses the presence of\n // audio and video data to determine whether to create audio/video source buffers, and\n // uses processed (transmuxed or parsed) media to determine the types required.\n\n if (!this.getCurrentMediaInfo_()) {\n return true;\n }\n if (\n // Technically, instead of waiting to load a segment on timeline changes, a segment\n // can be requested and downloaded and only wait before it is transmuxed or parsed.\n // But in practice, there are a few reasons why it is better to wait until a loader\n // is ready to append that segment before requesting and downloading:\n //\n // 1. Because audio and main loaders cross discontinuities together, if this loader\n // is waiting for the other to catch up, then instead of requesting another\n // segment and using up more bandwidth, by not yet loading, more bandwidth is\n // allotted to the loader currently behind.\n // 2. media-segment-request doesn't have to have logic to consider whether a segment\n // is ready to be processed or not, isolating the queueing behavior to the loader.\n // 3. The audio loader bases some of its segment properties on timing information\n // provided by the main loader, meaning that, if the logic for waiting on\n // processing was in media-segment-request, then it would also need to know how\n // to re-generate the segment information after the main loader caught up.\n shouldWaitForTimelineChange({\n timelineChangeController: this.timelineChangeController_,\n currentTimeline: this.currentTimeline_,\n segmentTimeline: segmentInfo.timeline,\n loaderType: this.loaderType_,\n audioDisabled: this.audioDisabled_\n })) {\n return false;\n }\n return true;\n }\n getCurrentMediaInfo_(segmentInfo = this.pendingSegment_) {\n return segmentInfo && segmentInfo.trackInfo || this.currentMediaInfo_;\n }\n getMediaInfo_(segmentInfo = this.pendingSegment_) {\n return this.getCurrentMediaInfo_(segmentInfo) || this.startingMediaInfo_;\n }\n getPendingSegmentPlaylist() {\n return this.pendingSegment_ ? this.pendingSegment_.playlist : null;\n }\n hasEnoughInfoToAppend_() {\n if (!this.sourceUpdater_.ready()) {\n return false;\n } // If content needs to be removed or the loader is waiting on an append reattempt,\n // then no additional content should be appended until the prior append is resolved.\n\n if (this.waitingOnRemove_ || this.quotaExceededErrorRetryTimeout_) {\n return false;\n }\n const segmentInfo = this.pendingSegment_;\n const trackInfo = this.getCurrentMediaInfo_(); // no segment to append any data for or\n // we do not have information on this specific\n // segment yet\n\n if (!segmentInfo || !trackInfo) {\n return false;\n }\n const {\n hasAudio,\n hasVideo,\n isMuxed\n } = trackInfo;\n if (hasVideo && !segmentInfo.videoTimingInfo) {\n return false;\n } // muxed content only relies on video timing information for now.\n\n if (hasAudio && !this.audioDisabled_ && !isMuxed && !segmentInfo.audioTimingInfo) {\n return false;\n }\n if (shouldWaitForTimelineChange({\n timelineChangeController: this.timelineChangeController_,\n currentTimeline: this.currentTimeline_,\n segmentTimeline: segmentInfo.timeline,\n loaderType: this.loaderType_,\n audioDisabled: this.audioDisabled_\n })) {\n return false;\n }\n return true;\n }\n handleData_(simpleSegment, result) {\n this.earlyAbortWhenNeeded_(simpleSegment.stats);\n if (this.checkForAbort_(simpleSegment.requestId)) {\n return;\n } // If there's anything in the call queue, then this data came later and should be\n // executed after the calls currently queued.\n\n if (this.callQueue_.length || !this.hasEnoughInfoToAppend_()) {\n this.callQueue_.push(this.handleData_.bind(this, simpleSegment, result));\n return;\n }\n const segmentInfo = this.pendingSegment_; // update the time mapping so we can translate from display time to media time\n\n this.setTimeMapping_(segmentInfo.timeline); // for tracking overall stats\n\n this.updateMediaSecondsLoaded_(segmentInfo.part || segmentInfo.segment); // Note that the state isn't changed from loading to appending. This is because abort\n // logic may change behavior depending on the state, and changing state too early may\n // inflate our estimates of bandwidth. In the future this should be re-examined to\n // note more granular states.\n // don't process and append data if the mediaSource is closed\n\n if (this.mediaSource_.readyState === 'closed') {\n return;\n } // if this request included an initialization segment, save that data\n // to the initSegment cache\n\n if (simpleSegment.map) {\n simpleSegment.map = this.initSegmentForMap(simpleSegment.map, true); // move over init segment properties to media request\n\n segmentInfo.segment.map = simpleSegment.map;\n } // if this request included a segment key, save that data in the cache\n\n if (simpleSegment.key) {\n this.segmentKey(simpleSegment.key, true);\n }\n segmentInfo.isFmp4 = simpleSegment.isFmp4;\n segmentInfo.timingInfo = segmentInfo.timingInfo || {};\n if (segmentInfo.isFmp4) {\n this.trigger('fmp4');\n segmentInfo.timingInfo.start = segmentInfo[timingInfoPropertyForMedia(result.type)].start;\n } else {\n const trackInfo = this.getCurrentMediaInfo_();\n const useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo;\n let firstVideoFrameTimeForData;\n if (useVideoTimingInfo) {\n firstVideoFrameTimeForData = segmentInfo.videoTimingInfo.start;\n } // Segment loader knows more about segment timing than the transmuxer (in certain\n // aspects), so make any changes required for a more accurate start time.\n // Don't set the end time yet, as the segment may not be finished processing.\n\n segmentInfo.timingInfo.start = this.trueSegmentStart_({\n currentStart: segmentInfo.timingInfo.start,\n playlist: segmentInfo.playlist,\n mediaIndex: segmentInfo.mediaIndex,\n currentVideoTimestampOffset: this.sourceUpdater_.videoTimestampOffset(),\n useVideoTimingInfo,\n firstVideoFrameTimeForData,\n videoTimingInfo: segmentInfo.videoTimingInfo,\n audioTimingInfo: segmentInfo.audioTimingInfo\n });\n } // Init segments for audio and video only need to be appended in certain cases. Now\n // that data is about to be appended, we can check the final cases to determine\n // whether we should append an init segment.\n\n this.updateAppendInitSegmentStatus(segmentInfo, result.type); // Timestamp offset should be updated once we get new data and have its timing info,\n // as we use the start of the segment to offset the best guess (playlist provided)\n // timestamp offset.\n\n this.updateSourceBufferTimestampOffset_(segmentInfo); // if this is a sync request we need to determine whether it should\n // be appended or not.\n\n if (segmentInfo.isSyncRequest) {\n // first save/update our timing info for this segment.\n // this is what allows us to choose an accurate segment\n // and the main reason we make a sync request.\n this.updateTimingInfoEnd_(segmentInfo);\n this.syncController_.saveSegmentTimingInfo({\n segmentInfo,\n shouldSaveTimelineMapping: this.loaderType_ === 'main'\n });\n const next = this.chooseNextRequest_(); // If the sync request isn't the segment that would be requested next\n // after taking into account its timing info, do not append it.\n\n if (next.mediaIndex !== segmentInfo.mediaIndex || next.partIndex !== segmentInfo.partIndex) {\n this.logger_('sync segment was incorrect, not appending');\n return;\n } // otherwise append it like any other segment as our guess was correct.\n\n this.logger_('sync segment was correct, appending');\n } // Save some state so that in the future anything waiting on first append (and/or\n // timestamp offset(s)) can process immediately. While the extra state isn't optimal,\n // we need some notion of whether the timestamp offset or other relevant information\n // has had a chance to be set.\n\n segmentInfo.hasAppendedData_ = true; // Now that the timestamp offset should be set, we can append any waiting ID3 tags.\n\n this.processMetadataQueue_();\n this.appendData_(segmentInfo, result);\n }\n updateAppendInitSegmentStatus(segmentInfo, type) {\n // alt audio doesn't manage timestamp offset\n if (this.loaderType_ === 'main' && typeof segmentInfo.timestampOffset === 'number' &&\n // in the case that we're handling partial data, we don't want to append an init\n // segment for each chunk\n !segmentInfo.changedTimestampOffset) {\n // if the timestamp offset changed, the timeline may have changed, so we have to re-\n // append init segments\n this.appendInitSegment_ = {\n audio: true,\n video: true\n };\n }\n if (this.playlistOfLastInitSegment_[type] !== segmentInfo.playlist) {\n // make sure we append init segment on playlist changes, in case the media config\n // changed\n this.appendInitSegment_[type] = true;\n }\n }\n getInitSegmentAndUpdateState_({\n type,\n initSegment,\n map,\n playlist\n }) {\n // \"The EXT-X-MAP tag specifies how to obtain the Media Initialization Section\n // (Section 3) required to parse the applicable Media Segments. It applies to every\n // Media Segment that appears after it in the Playlist until the next EXT-X-MAP tag\n // or until the end of the playlist.\"\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.2.5\n if (map) {\n const id = initSegmentId(map);\n if (this.activeInitSegmentId_ === id) {\n // don't need to re-append the init segment if the ID matches\n return null;\n } // a map-specified init segment takes priority over any transmuxed (or otherwise\n // obtained) init segment\n //\n // this also caches the init segment for later use\n\n initSegment = this.initSegmentForMap(map, true).bytes;\n this.activeInitSegmentId_ = id;\n } // We used to always prepend init segments for video, however, that shouldn't be\n // necessary. Instead, we should only append on changes, similar to what we've always\n // done for audio. This is more important (though may not be that important) for\n // frame-by-frame appending for LHLS, simply because of the increased quantity of\n // appends.\n\n if (initSegment && this.appendInitSegment_[type]) {\n // Make sure we track the playlist that we last used for the init segment, so that\n // we can re-append the init segment in the event that we get data from a new\n // playlist. Discontinuities and track changes are handled in other sections.\n this.playlistOfLastInitSegment_[type] = playlist; // Disable future init segment appends for this type. Until a change is necessary.\n\n this.appendInitSegment_[type] = false; // we need to clear out the fmp4 active init segment id, since\n // we are appending the muxer init segment\n\n this.activeInitSegmentId_ = null;\n return initSegment;\n }\n return null;\n }\n handleQuotaExceededError_({\n segmentInfo,\n type,\n bytes\n }, error) {\n const audioBuffered = this.sourceUpdater_.audioBuffered();\n const videoBuffered = this.sourceUpdater_.videoBuffered(); // For now we're ignoring any notion of gaps in the buffer, but they, in theory,\n // should be cleared out during the buffer removals. However, log in case it helps\n // debug.\n\n if (audioBuffered.length > 1) {\n this.logger_('On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: ' + timeRangesToArray(audioBuffered).join(', '));\n }\n if (videoBuffered.length > 1) {\n this.logger_('On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: ' + timeRangesToArray(videoBuffered).join(', '));\n }\n const audioBufferStart = audioBuffered.length ? audioBuffered.start(0) : 0;\n const audioBufferEnd = audioBuffered.length ? audioBuffered.end(audioBuffered.length - 1) : 0;\n const videoBufferStart = videoBuffered.length ? videoBuffered.start(0) : 0;\n const videoBufferEnd = videoBuffered.length ? videoBuffered.end(videoBuffered.length - 1) : 0;\n if (audioBufferEnd - audioBufferStart <= MIN_BACK_BUFFER && videoBufferEnd - videoBufferStart <= MIN_BACK_BUFFER) {\n // Can't remove enough buffer to make room for new segment (or the browser doesn't\n // allow for appends of segments this size). In the future, it may be possible to\n // split up the segment and append in pieces, but for now, error out this playlist\n // in an attempt to switch to a more manageable rendition.\n this.logger_('On QUOTA_EXCEEDED_ERR, single segment too large to append to ' + 'buffer, triggering an error. ' + `Appended byte length: ${bytes.byteLength}, ` + `audio buffer: ${timeRangesToArray(audioBuffered).join(', ')}, ` + `video buffer: ${timeRangesToArray(videoBuffered).join(', ')}, `);\n this.error({\n message: 'Quota exceeded error with append of a single segment of content',\n excludeUntil: Infinity,\n metadata: {\n errorType: videojs.Error.SegmentExceedsSourceBufferQuota\n }\n });\n this.trigger('error');\n return;\n } // To try to resolve the quota exceeded error, clear back buffer and retry. This means\n // that the segment-loader should block on future events until this one is handled, so\n // that it doesn't keep moving onto further segments. Adding the call to the call\n // queue will prevent further appends until waitingOnRemove_ and\n // quotaExceededErrorRetryTimeout_ are cleared.\n //\n // Note that this will only block the current loader. In the case of demuxed content,\n // the other load may keep filling as fast as possible. In practice, this should be\n // OK, as it is a rare case when either audio has a high enough bitrate to fill up a\n // source buffer, or video fills without enough room for audio to append (and without\n // the availability of clearing out seconds of back buffer to make room for audio).\n // But it might still be good to handle this case in the future as a TODO.\n\n this.waitingOnRemove_ = true;\n this.callQueue_.push(this.appendToSourceBuffer_.bind(this, {\n segmentInfo,\n type,\n bytes\n }));\n const currentTime = this.currentTime_(); // Try to remove as much audio and video as possible to make room for new content\n // before retrying.\n\n const timeToRemoveUntil = currentTime - MIN_BACK_BUFFER;\n this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${timeToRemoveUntil}`);\n this.remove(0, timeToRemoveUntil, () => {\n this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${MIN_BACK_BUFFER}s`);\n this.waitingOnRemove_ = false; // wait the length of time alotted in the back buffer to prevent wasted\n // attempts (since we can't clear less than the minimum)\n\n this.quotaExceededErrorRetryTimeout_ = window$1.setTimeout(() => {\n this.logger_('On QUOTA_EXCEEDED_ERR, re-processing call queue');\n this.quotaExceededErrorRetryTimeout_ = null;\n this.processCallQueue_();\n }, MIN_BACK_BUFFER * 1000);\n }, true);\n }\n handleAppendError_({\n segmentInfo,\n type,\n bytes\n }, error) {\n // if there's no error, nothing to do\n if (!error) {\n return;\n }\n if (error.code === QUOTA_EXCEEDED_ERR) {\n this.handleQuotaExceededError_({\n segmentInfo,\n type,\n bytes\n }); // A quota exceeded error should be recoverable with a future re-append, so no need\n // to trigger an append error.\n\n return;\n }\n this.logger_('Received non QUOTA_EXCEEDED_ERR on append', error); // If an append errors, we often can't recover.\n // (see https://w3c.github.io/media-source/#sourcebuffer-append-error).\n //\n // Trigger a special error so that it can be handled separately from normal,\n // recoverable errors.\n\n this.error({\n message: `${type} append of ${bytes.length}b failed for segment ` + `#${segmentInfo.mediaIndex} in playlist ${segmentInfo.playlist.id}`,\n metadata: {\n errorType: videojs.Error.SegmentAppendError\n }\n });\n this.trigger('appenderror');\n }\n appendToSourceBuffer_({\n segmentInfo,\n type,\n initSegment,\n data,\n bytes\n }) {\n // If this is a re-append, bytes were already created and don't need to be recreated\n if (!bytes) {\n const segments = [data];\n let byteLength = data.byteLength;\n if (initSegment) {\n // if the media initialization segment is changing, append it before the content\n // segment\n segments.unshift(initSegment);\n byteLength += initSegment.byteLength;\n } // Technically we should be OK appending the init segment separately, however, we\n // haven't yet tested that, and prepending is how we have always done things.\n\n bytes = concatSegments({\n bytes: byteLength,\n segments\n });\n }\n this.sourceUpdater_.appendBuffer({\n segmentInfo,\n type,\n bytes\n }, this.handleAppendError_.bind(this, {\n segmentInfo,\n type,\n bytes\n }));\n }\n handleSegmentTimingInfo_(type, requestId, segmentTimingInfo) {\n if (!this.pendingSegment_ || requestId !== this.pendingSegment_.requestId) {\n return;\n }\n const segment = this.pendingSegment_.segment;\n const timingInfoProperty = `${type}TimingInfo`;\n if (!segment[timingInfoProperty]) {\n segment[timingInfoProperty] = {};\n }\n segment[timingInfoProperty].transmuxerPrependedSeconds = segmentTimingInfo.prependedContentDuration || 0;\n segment[timingInfoProperty].transmuxedPresentationStart = segmentTimingInfo.start.presentation;\n segment[timingInfoProperty].transmuxedDecodeStart = segmentTimingInfo.start.decode;\n segment[timingInfoProperty].transmuxedPresentationEnd = segmentTimingInfo.end.presentation;\n segment[timingInfoProperty].transmuxedDecodeEnd = segmentTimingInfo.end.decode; // mainly used as a reference for debugging\n\n segment[timingInfoProperty].baseMediaDecodeTime = segmentTimingInfo.baseMediaDecodeTime;\n }\n appendData_(segmentInfo, result) {\n const {\n type,\n data\n } = result;\n if (!data || !data.byteLength) {\n return;\n }\n if (type === 'audio' && this.audioDisabled_) {\n return;\n }\n const initSegment = this.getInitSegmentAndUpdateState_({\n type,\n initSegment: result.initSegment,\n playlist: segmentInfo.playlist,\n map: segmentInfo.isFmp4 ? segmentInfo.segment.map : null\n });\n this.appendToSourceBuffer_({\n segmentInfo,\n type,\n initSegment,\n data\n });\n }\n /**\n * load a specific segment from a request into the buffer\n *\n * @private\n */\n\n loadSegment_(segmentInfo) {\n this.state = 'WAITING';\n this.pendingSegment_ = segmentInfo;\n this.trimBackBuffer_(segmentInfo);\n if (typeof segmentInfo.timestampOffset === 'number') {\n if (this.transmuxer_) {\n this.transmuxer_.postMessage({\n action: 'clearAllMp4Captions'\n });\n }\n }\n if (!this.hasEnoughInfoToLoad_()) {\n this.loadQueue_.push(() => {\n // regenerate the audioAppendStart, timestampOffset, etc as they\n // may have changed since this function was added to the queue.\n const options = _extends({}, segmentInfo, {\n forceTimestampOffset: true\n });\n _extends(segmentInfo, this.generateSegmentInfo_(options));\n this.isPendingTimestampOffset_ = false;\n this.updateTransmuxerAndRequestSegment_(segmentInfo);\n });\n return;\n }\n this.updateTransmuxerAndRequestSegment_(segmentInfo);\n }\n updateTransmuxerAndRequestSegment_(segmentInfo) {\n // We'll update the source buffer's timestamp offset once we have transmuxed data, but\n // the transmuxer still needs to be updated before then.\n //\n // Even though keepOriginalTimestamps is set to true for the transmuxer, timestamp\n // offset must be passed to the transmuxer for stream correcting adjustments.\n if (this.shouldUpdateTransmuxerTimestampOffset_(segmentInfo.timestampOffset)) {\n this.gopBuffer_.length = 0; // gopsToAlignWith was set before the GOP buffer was cleared\n\n segmentInfo.gopsToAlignWith = [];\n this.timeMapping_ = 0; // reset values in the transmuxer since a discontinuity should start fresh\n\n this.transmuxer_.postMessage({\n action: 'reset'\n });\n this.transmuxer_.postMessage({\n action: 'setTimestampOffset',\n timestampOffset: segmentInfo.timestampOffset\n });\n }\n const simpleSegment = this.createSimplifiedSegmentObj_(segmentInfo);\n const isEndOfStream = this.isEndOfStream_(segmentInfo.mediaIndex, segmentInfo.playlist, segmentInfo.partIndex);\n const isWalkingForward = this.mediaIndex !== null;\n const isDiscontinuity = segmentInfo.timeline !== this.currentTimeline_ &&\n // currentTimeline starts at -1, so we shouldn't end the timeline switching to 0,\n // the first timeline\n segmentInfo.timeline > 0;\n const isEndOfTimeline = isEndOfStream || isWalkingForward && isDiscontinuity;\n this.logger_(`Requesting ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated with this segment, but it is not cached (identified by a lack of bytes),\n // then this init segment has never been seen before and should be appended.\n //\n // At this point the content type (audio/video or both) is not yet known, but it should be safe to set\n // both to true and leave the decision of whether to append the init segment to append time.\n\n if (simpleSegment.map && !simpleSegment.map.bytes) {\n this.logger_('going to request init segment.');\n this.appendInitSegment_ = {\n video: true,\n audio: true\n };\n }\n segmentInfo.abortRequests = mediaSegmentRequest({\n xhr: this.vhs_.xhr,\n xhrOptions: this.xhrOptions_,\n decryptionWorker: this.decrypter_,\n segment: simpleSegment,\n abortFn: this.handleAbort_.bind(this, segmentInfo),\n progressFn: this.handleProgress_.bind(this),\n trackInfoFn: this.handleTrackInfo_.bind(this),\n timingInfoFn: this.handleTimingInfo_.bind(this),\n videoSegmentTimingInfoFn: this.handleSegmentTimingInfo_.bind(this, 'video', segmentInfo.requestId),\n audioSegmentTimingInfoFn: this.handleSegmentTimingInfo_.bind(this, 'audio', segmentInfo.requestId),\n captionsFn: this.handleCaptions_.bind(this),\n isEndOfTimeline,\n endedTimelineFn: () => {\n this.logger_('received endedtimeline callback');\n },\n id3Fn: this.handleId3_.bind(this),\n dataFn: this.handleData_.bind(this),\n doneFn: this.segmentRequestFinished_.bind(this),\n onTransmuxerLog: ({\n message,\n level,\n stream\n }) => {\n this.logger_(`${segmentInfoString(segmentInfo)} logged from transmuxer stream ${stream} as a ${level}: ${message}`);\n }\n });\n }\n /**\n * trim the back buffer so that we don't have too much data\n * in the source buffer\n *\n * @private\n *\n * @param {Object} segmentInfo - the current segment\n */\n\n trimBackBuffer_(segmentInfo) {\n const removeToTime = safeBackBufferTrimTime(this.seekable_(), this.currentTime_(), this.playlist_.targetDuration || 10); // Chrome has a hard limit of 150MB of\n // buffer and a very conservative \"garbage collector\"\n // We manually clear out the old buffer to ensure\n // we don't trigger the QuotaExceeded error\n // on the source buffer during subsequent appends\n\n if (removeToTime > 0) {\n this.remove(0, removeToTime);\n }\n }\n /**\n * created a simplified copy of the segment object with just the\n * information necessary to perform the XHR and decryption\n *\n * @private\n *\n * @param {Object} segmentInfo - the current segment\n * @return {Object} a simplified segment object copy\n */\n\n createSimplifiedSegmentObj_(segmentInfo) {\n const segment = segmentInfo.segment;\n const part = segmentInfo.part;\n const simpleSegment = {\n resolvedUri: part ? part.resolvedUri : segment.resolvedUri,\n byterange: part ? part.byterange : segment.byterange,\n requestId: segmentInfo.requestId,\n transmuxer: segmentInfo.transmuxer,\n audioAppendStart: segmentInfo.audioAppendStart,\n gopsToAlignWith: segmentInfo.gopsToAlignWith,\n part: segmentInfo.part\n };\n const previousSegment = segmentInfo.playlist.segments[segmentInfo.mediaIndex - 1];\n if (previousSegment && previousSegment.timeline === segment.timeline) {\n // The baseStartTime of a segment is used to handle rollover when probing the TS\n // segment to retrieve timing information. Since the probe only looks at the media's\n // times (e.g., PTS and DTS values of the segment), and doesn't consider the\n // player's time (e.g., player.currentTime()), baseStartTime should reflect the\n // media time as well. transmuxedDecodeEnd represents the end time of a segment, in\n // seconds of media time, so should be used here. The previous segment is used since\n // the end of the previous segment should represent the beginning of the current\n // segment, so long as they are on the same timeline.\n if (previousSegment.videoTimingInfo) {\n simpleSegment.baseStartTime = previousSegment.videoTimingInfo.transmuxedDecodeEnd;\n } else if (previousSegment.audioTimingInfo) {\n simpleSegment.baseStartTime = previousSegment.audioTimingInfo.transmuxedDecodeEnd;\n }\n }\n if (segment.key) {\n // if the media sequence is greater than 2^32, the IV will be incorrect\n // assuming 10s segments, that would be about 1300 years\n const iv = segment.key.iv || new Uint32Array([0, 0, 0, segmentInfo.mediaIndex + segmentInfo.playlist.mediaSequence]);\n simpleSegment.key = this.segmentKey(segment.key);\n simpleSegment.key.iv = iv;\n }\n if (segment.map) {\n simpleSegment.map = this.initSegmentForMap(segment.map);\n }\n return simpleSegment;\n }\n saveTransferStats_(stats) {\n // every request counts as a media request even if it has been aborted\n // or canceled due to a timeout\n this.mediaRequests += 1;\n if (stats) {\n this.mediaBytesTransferred += stats.bytesReceived;\n this.mediaTransferDuration += stats.roundTripTime;\n }\n }\n saveBandwidthRelatedStats_(duration, stats) {\n // byteLength will be used for throughput, and should be based on bytes receieved,\n // which we only know at the end of the request and should reflect total bytes\n // downloaded rather than just bytes processed from components of the segment\n this.pendingSegment_.byteLength = stats.bytesReceived;\n if (duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) {\n this.logger_(`Ignoring segment's bandwidth because its duration of ${duration}` + ` is less than the min to record ${MIN_SEGMENT_DURATION_TO_SAVE_STATS}`);\n return;\n }\n this.bandwidth = stats.bandwidth;\n this.roundTrip = stats.roundTripTime;\n }\n handleTimeout_() {\n // although the VTT segment loader bandwidth isn't really used, it's good to\n // maintain functinality between segment loaders\n this.mediaRequestsTimedout += 1;\n this.bandwidth = 1;\n this.roundTrip = NaN;\n this.trigger('bandwidthupdate');\n this.trigger('timeout');\n }\n /**\n * Handle the callback from the segmentRequest function and set the\n * associated SegmentLoader state and errors if necessary\n *\n * @private\n */\n\n segmentRequestFinished_(error, simpleSegment, result) {\n // TODO handle special cases, e.g., muxed audio/video but only audio in the segment\n // check the call queue directly since this function doesn't need to deal with any\n // data, and can continue even if the source buffers are not set up and we didn't get\n // any data from the segment\n if (this.callQueue_.length) {\n this.callQueue_.push(this.segmentRequestFinished_.bind(this, error, simpleSegment, result));\n return;\n }\n this.saveTransferStats_(simpleSegment.stats); // The request was aborted and the SegmentLoader has already been reset\n\n if (!this.pendingSegment_) {\n return;\n } // the request was aborted and the SegmentLoader has already started\n // another request. this can happen when the timeout for an aborted\n // request triggers due to a limitation in the XHR library\n // do not count this as any sort of request or we risk double-counting\n\n if (simpleSegment.requestId !== this.pendingSegment_.requestId) {\n return;\n } // an error occurred from the active pendingSegment_ so reset everything\n\n if (error) {\n this.pendingSegment_ = null;\n this.state = 'READY'; // aborts are not a true error condition and nothing corrective needs to be done\n\n if (error.code === REQUEST_ERRORS.ABORTED) {\n return;\n }\n this.pause(); // the error is really just that at least one of the requests timed-out\n // set the bandwidth to a very low value and trigger an ABR switch to\n // take emergency action\n\n if (error.code === REQUEST_ERRORS.TIMEOUT) {\n this.handleTimeout_();\n return;\n } // if control-flow has arrived here, then the error is real\n // emit an error event to exclude the current playlist\n\n this.mediaRequestsErrored += 1;\n this.error(error);\n this.trigger('error');\n return;\n }\n const segmentInfo = this.pendingSegment_; // the response was a success so set any bandwidth stats the request\n // generated for ABR purposes\n\n this.saveBandwidthRelatedStats_(segmentInfo.duration, simpleSegment.stats);\n segmentInfo.endOfAllRequests = simpleSegment.endOfAllRequests;\n if (result.gopInfo) {\n this.gopBuffer_ = updateGopBuffer(this.gopBuffer_, result.gopInfo, this.safeAppend_);\n } // Although we may have already started appending on progress, we shouldn't switch the\n // state away from loading until we are officially done loading the segment data.\n\n this.state = 'APPENDING'; // used for testing\n\n this.trigger('appending');\n this.waitForAppendsToComplete_(segmentInfo);\n }\n setTimeMapping_(timeline) {\n const timelineMapping = this.syncController_.mappingForTimeline(timeline);\n if (timelineMapping !== null) {\n this.timeMapping_ = timelineMapping;\n }\n }\n updateMediaSecondsLoaded_(segment) {\n if (typeof segment.start === 'number' && typeof segment.end === 'number') {\n this.mediaSecondsLoaded += segment.end - segment.start;\n } else {\n this.mediaSecondsLoaded += segment.duration;\n }\n }\n shouldUpdateTransmuxerTimestampOffset_(timestampOffset) {\n if (timestampOffset === null) {\n return false;\n } // note that we're potentially using the same timestamp offset for both video and\n // audio\n\n if (this.loaderType_ === 'main' && timestampOffset !== this.sourceUpdater_.videoTimestampOffset()) {\n return true;\n }\n if (!this.audioDisabled_ && timestampOffset !== this.sourceUpdater_.audioTimestampOffset()) {\n return true;\n }\n return false;\n }\n trueSegmentStart_({\n currentStart,\n playlist,\n mediaIndex,\n firstVideoFrameTimeForData,\n currentVideoTimestampOffset,\n useVideoTimingInfo,\n videoTimingInfo,\n audioTimingInfo\n }) {\n if (typeof currentStart !== 'undefined') {\n // if start was set once, keep using it\n return currentStart;\n }\n if (!useVideoTimingInfo) {\n return audioTimingInfo.start;\n }\n const previousSegment = playlist.segments[mediaIndex - 1]; // The start of a segment should be the start of the first full frame contained\n // within that segment. Since the transmuxer maintains a cache of incomplete data\n // from and/or the last frame seen, the start time may reflect a frame that starts\n // in the previous segment. Check for that case and ensure the start time is\n // accurate for the segment.\n\n if (mediaIndex === 0 || !previousSegment || typeof previousSegment.start === 'undefined' || previousSegment.end !== firstVideoFrameTimeForData + currentVideoTimestampOffset) {\n return firstVideoFrameTimeForData;\n }\n return videoTimingInfo.start;\n }\n waitForAppendsToComplete_(segmentInfo) {\n const trackInfo = this.getCurrentMediaInfo_(segmentInfo);\n if (!trackInfo) {\n this.error({\n message: 'No starting media returned, likely due to an unsupported media format.',\n playlistExclusionDuration: Infinity,\n metadata: {\n errorType: videojs.Error.SegmentUnsupportedMediaFormat\n }\n });\n this.trigger('error');\n return;\n } // Although transmuxing is done, appends may not yet be finished. Throw a marker\n // on each queue this loader is responsible for to ensure that the appends are\n // complete.\n\n const {\n hasAudio,\n hasVideo,\n isMuxed\n } = trackInfo;\n const waitForVideo = this.loaderType_ === 'main' && hasVideo;\n const waitForAudio = !this.audioDisabled_ && hasAudio && !isMuxed;\n segmentInfo.waitingOnAppends = 0; // segments with no data\n\n if (!segmentInfo.hasAppendedData_) {\n if (!segmentInfo.timingInfo && typeof segmentInfo.timestampOffset === 'number') {\n // When there's no audio or video data in the segment, there's no audio or video\n // timing information.\n //\n // If there's no audio or video timing information, then the timestamp offset\n // can't be adjusted to the appropriate value for the transmuxer and source\n // buffers.\n //\n // Therefore, the next segment should be used to set the timestamp offset.\n this.isPendingTimestampOffset_ = true;\n } // override settings for metadata only segments\n\n segmentInfo.timingInfo = {\n start: 0\n };\n segmentInfo.waitingOnAppends++;\n if (!this.isPendingTimestampOffset_) {\n // update the timestampoffset\n this.updateSourceBufferTimestampOffset_(segmentInfo); // make sure the metadata queue is processed even though we have\n // no video/audio data.\n\n this.processMetadataQueue_();\n } // append is \"done\" instantly with no data.\n\n this.checkAppendsDone_(segmentInfo);\n return;\n } // Since source updater could call back synchronously, do the increments first.\n\n if (waitForVideo) {\n segmentInfo.waitingOnAppends++;\n }\n if (waitForAudio) {\n segmentInfo.waitingOnAppends++;\n }\n if (waitForVideo) {\n this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this, segmentInfo));\n }\n if (waitForAudio) {\n this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this, segmentInfo));\n }\n }\n checkAppendsDone_(segmentInfo) {\n if (this.checkForAbort_(segmentInfo.requestId)) {\n return;\n }\n segmentInfo.waitingOnAppends--;\n if (segmentInfo.waitingOnAppends === 0) {\n this.handleAppendsDone_();\n }\n }\n checkForIllegalMediaSwitch(trackInfo) {\n const illegalMediaSwitchError = illegalMediaSwitch(this.loaderType_, this.getCurrentMediaInfo_(), trackInfo);\n if (illegalMediaSwitchError) {\n this.error({\n message: illegalMediaSwitchError,\n playlistExclusionDuration: Infinity,\n metadata: {\n errorType: videojs.Error.SegmentSwitchError\n }\n });\n this.trigger('error');\n return true;\n }\n return false;\n }\n updateSourceBufferTimestampOffset_(segmentInfo) {\n if (segmentInfo.timestampOffset === null ||\n // we don't yet have the start for whatever media type (video or audio) has\n // priority, timing-wise, so we must wait\n typeof segmentInfo.timingInfo.start !== 'number' ||\n // already updated the timestamp offset for this segment\n segmentInfo.changedTimestampOffset ||\n // the alt audio loader should not be responsible for setting the timestamp offset\n this.loaderType_ !== 'main') {\n return;\n }\n let didChange = false; // Primary timing goes by video, and audio is trimmed in the transmuxer, meaning that\n // the timing info here comes from video. In the event that the audio is longer than\n // the video, this will trim the start of the audio.\n // This also trims any offset from 0 at the beginning of the media\n\n segmentInfo.timestampOffset -= this.getSegmentStartTimeForTimestampOffsetCalculation_({\n videoTimingInfo: segmentInfo.segment.videoTimingInfo,\n audioTimingInfo: segmentInfo.segment.audioTimingInfo,\n timingInfo: segmentInfo.timingInfo\n }); // In the event that there are part segment downloads, each will try to update the\n // timestamp offset. Retaining this bit of state prevents us from updating in the\n // future (within the same segment), however, there may be a better way to handle it.\n\n segmentInfo.changedTimestampOffset = true;\n if (segmentInfo.timestampOffset !== this.sourceUpdater_.videoTimestampOffset()) {\n this.sourceUpdater_.videoTimestampOffset(segmentInfo.timestampOffset);\n didChange = true;\n }\n if (segmentInfo.timestampOffset !== this.sourceUpdater_.audioTimestampOffset()) {\n this.sourceUpdater_.audioTimestampOffset(segmentInfo.timestampOffset);\n didChange = true;\n }\n if (didChange) {\n this.trigger('timestampoffset');\n }\n }\n getSegmentStartTimeForTimestampOffsetCalculation_({\n videoTimingInfo,\n audioTimingInfo,\n timingInfo\n }) {\n if (!this.useDtsForTimestampOffset_) {\n return timingInfo.start;\n }\n if (videoTimingInfo && typeof videoTimingInfo.transmuxedDecodeStart === 'number') {\n return videoTimingInfo.transmuxedDecodeStart;\n } // handle audio only\n\n if (audioTimingInfo && typeof audioTimingInfo.transmuxedDecodeStart === 'number') {\n return audioTimingInfo.transmuxedDecodeStart;\n } // handle content not transmuxed (e.g., MP4)\n\n return timingInfo.start;\n }\n updateTimingInfoEnd_(segmentInfo) {\n segmentInfo.timingInfo = segmentInfo.timingInfo || {};\n const trackInfo = this.getMediaInfo_();\n const useVideoTimingInfo = this.loaderType_ === 'main' && trackInfo && trackInfo.hasVideo;\n const prioritizedTimingInfo = useVideoTimingInfo && segmentInfo.videoTimingInfo ? segmentInfo.videoTimingInfo : segmentInfo.audioTimingInfo;\n if (!prioritizedTimingInfo) {\n return;\n }\n segmentInfo.timingInfo.end = typeof prioritizedTimingInfo.end === 'number' ?\n // End time may not exist in a case where we aren't parsing the full segment (one\n // current example is the case of fmp4), so use the rough duration to calculate an\n // end time.\n prioritizedTimingInfo.end : prioritizedTimingInfo.start + segmentInfo.duration;\n }\n /**\n * callback to run when appendBuffer is finished. detects if we are\n * in a good state to do things with the data we got, or if we need\n * to wait for more\n *\n * @private\n */\n\n handleAppendsDone_() {\n // appendsdone can cause an abort\n if (this.pendingSegment_) {\n this.trigger('appendsdone');\n }\n if (!this.pendingSegment_) {\n this.state = 'READY'; // TODO should this move into this.checkForAbort to speed up requests post abort in\n // all appending cases?\n\n if (!this.paused()) {\n this.monitorBuffer_();\n }\n return;\n }\n const segmentInfo = this.pendingSegment_; // Now that the end of the segment has been reached, we can set the end time. It's\n // best to wait until all appends are done so we're sure that the primary media is\n // finished (and we have its end time).\n\n this.updateTimingInfoEnd_(segmentInfo);\n if (this.shouldSaveSegmentTimingInfo_) {\n // Timeline mappings should only be saved for the main loader. This is for multiple\n // reasons:\n //\n // 1) Only one mapping is saved per timeline, meaning that if both the audio loader\n // and the main loader try to save the timeline mapping, whichever comes later\n // will overwrite the first. In theory this is OK, as the mappings should be the\n // same, however, it breaks for (2)\n // 2) In the event of a live stream, the initial live point will make for a somewhat\n // arbitrary mapping. If audio and video streams are not perfectly in-sync, then\n // the mapping will be off for one of the streams, dependent on which one was\n // first saved (see (1)).\n // 3) Primary timing goes by video in VHS, so the mapping should be video.\n //\n // Since the audio loader will wait for the main loader to load the first segment,\n // the main loader will save the first timeline mapping, and ensure that there won't\n // be a case where audio loads two segments without saving a mapping (thus leading\n // to missing segment timing info).\n this.syncController_.saveSegmentTimingInfo({\n segmentInfo,\n shouldSaveTimelineMapping: this.loaderType_ === 'main'\n });\n }\n const segmentDurationMessage = getTroublesomeSegmentDurationMessage(segmentInfo, this.sourceType_);\n if (segmentDurationMessage) {\n if (segmentDurationMessage.severity === 'warn') {\n videojs.log.warn(segmentDurationMessage.message);\n } else {\n this.logger_(segmentDurationMessage.message);\n }\n }\n this.recordThroughput_(segmentInfo);\n this.pendingSegment_ = null;\n this.state = 'READY';\n if (segmentInfo.isSyncRequest) {\n this.trigger('syncinfoupdate'); // if the sync request was not appended\n // then it was not the correct segment.\n // throw it away and use the data it gave us\n // to get the correct one.\n\n if (!segmentInfo.hasAppendedData_) {\n this.logger_(`Throwing away un-appended sync request ${segmentInfoString(segmentInfo)}`);\n return;\n }\n }\n this.logger_(`Appended ${segmentInfoString(segmentInfo)}`);\n this.addSegmentMetadataCue_(segmentInfo);\n this.fetchAtBuffer_ = true;\n if (this.currentTimeline_ !== segmentInfo.timeline) {\n this.timelineChangeController_.lastTimelineChange({\n type: this.loaderType_,\n from: this.currentTimeline_,\n to: segmentInfo.timeline\n }); // If audio is not disabled, the main segment loader is responsible for updating\n // the audio timeline as well. If the content is video only, this won't have any\n // impact.\n\n if (this.loaderType_ === 'main' && !this.audioDisabled_) {\n this.timelineChangeController_.lastTimelineChange({\n type: 'audio',\n from: this.currentTimeline_,\n to: segmentInfo.timeline\n });\n }\n }\n this.currentTimeline_ = segmentInfo.timeline; // We must update the syncinfo to recalculate the seekable range before\n // the following conditional otherwise it may consider this a bad \"guess\"\n // and attempt to resync when the post-update seekable window and live\n // point would mean that this was the perfect segment to fetch\n\n this.trigger('syncinfoupdate');\n const segment = segmentInfo.segment;\n const part = segmentInfo.part;\n const badSegmentGuess = segment.end && this.currentTime_() - segment.end > segmentInfo.playlist.targetDuration * 3;\n const badPartGuess = part && part.end && this.currentTime_() - part.end > segmentInfo.playlist.partTargetDuration * 3; // If we previously appended a segment/part that ends more than 3 part/targetDurations before\n // the currentTime_ that means that our conservative guess was too conservative.\n // In that case, reset the loader state so that we try to use any information gained\n // from the previous request to create a new, more accurate, sync-point.\n\n if (badSegmentGuess || badPartGuess) {\n this.logger_(`bad ${badSegmentGuess ? 'segment' : 'part'} ${segmentInfoString(segmentInfo)}`);\n this.resetEverything();\n return;\n }\n const isWalkingForward = this.mediaIndex !== null; // Don't do a rendition switch unless we have enough time to get a sync segment\n // and conservatively guess\n\n if (isWalkingForward) {\n this.trigger('bandwidthupdate');\n }\n this.trigger('progress');\n this.mediaIndex = segmentInfo.mediaIndex;\n this.partIndex = segmentInfo.partIndex; // any time an update finishes and the last segment is in the\n // buffer, end the stream. this ensures the \"ended\" event will\n // fire if playback reaches that point.\n\n if (this.isEndOfStream_(segmentInfo.mediaIndex, segmentInfo.playlist, segmentInfo.partIndex)) {\n this.endOfStream();\n } // used for testing\n\n this.trigger('appended');\n if (segmentInfo.hasAppendedData_) {\n this.mediaAppends++;\n }\n if (!this.paused()) {\n this.monitorBuffer_();\n }\n }\n /**\n * Records the current throughput of the decrypt, transmux, and append\n * portion of the semgment pipeline. `throughput.rate` is a the cumulative\n * moving average of the throughput. `throughput.count` is the number of\n * data points in the average.\n *\n * @private\n * @param {Object} segmentInfo the object returned by loadSegment\n */\n\n recordThroughput_(segmentInfo) {\n if (segmentInfo.duration < MIN_SEGMENT_DURATION_TO_SAVE_STATS) {\n this.logger_(`Ignoring segment's throughput because its duration of ${segmentInfo.duration}` + ` is less than the min to record ${MIN_SEGMENT_DURATION_TO_SAVE_STATS}`);\n return;\n }\n const rate = this.throughput.rate; // Add one to the time to ensure that we don't accidentally attempt to divide\n // by zero in the case where the throughput is ridiculously high\n\n const segmentProcessingTime = Date.now() - segmentInfo.endOfAllRequests + 1; // Multiply by 8000 to convert from bytes/millisecond to bits/second\n\n const segmentProcessingThroughput = Math.floor(segmentInfo.byteLength / segmentProcessingTime * 8 * 1000); // This is just a cumulative moving average calculation:\n // newAvg = oldAvg + (sample - oldAvg) / (sampleCount + 1)\n\n this.throughput.rate += (segmentProcessingThroughput - rate) / ++this.throughput.count;\n }\n /**\n * Adds a cue to the segment-metadata track with some metadata information about the\n * segment\n *\n * @private\n * @param {Object} segmentInfo\n * the object returned by loadSegment\n * @method addSegmentMetadataCue_\n */\n\n addSegmentMetadataCue_(segmentInfo) {\n if (!this.segmentMetadataTrack_) {\n return;\n }\n const segment = segmentInfo.segment;\n const start = segment.start;\n const end = segment.end; // Do not try adding the cue if the start and end times are invalid.\n\n if (!finite(start) || !finite(end)) {\n return;\n }\n removeCuesFromTrack(start, end, this.segmentMetadataTrack_);\n const Cue = window$1.WebKitDataCue || window$1.VTTCue;\n const value = {\n custom: segment.custom,\n dateTimeObject: segment.dateTimeObject,\n dateTimeString: segment.dateTimeString,\n programDateTime: segment.programDateTime,\n bandwidth: segmentInfo.playlist.attributes.BANDWIDTH,\n resolution: segmentInfo.playlist.attributes.RESOLUTION,\n codecs: segmentInfo.playlist.attributes.CODECS,\n byteLength: segmentInfo.byteLength,\n uri: segmentInfo.uri,\n timeline: segmentInfo.timeline,\n playlist: segmentInfo.playlist.id,\n start,\n end\n };\n const data = JSON.stringify(value);\n const cue = new Cue(start, end, data); // Attach the metadata to the value property of the cue to keep consistency between\n // the differences of WebKitDataCue in safari and VTTCue in other browsers\n\n cue.value = value;\n this.segmentMetadataTrack_.addCue(cue);\n }\n}\nfunction noop() {}\nconst toTitleCase = function (string) {\n if (typeof string !== 'string') {\n return string;\n }\n return string.replace(/./, w => w.toUpperCase());\n};\n\n/**\n * @file source-updater.js\n */\nconst bufferTypes = ['video', 'audio'];\nconst updating = (type, sourceUpdater) => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`];\n return sourceBuffer && sourceBuffer.updating || sourceUpdater.queuePending[type];\n};\nconst nextQueueIndexOfType = (type, queue) => {\n for (let i = 0; i < queue.length; i++) {\n const queueEntry = queue[i];\n if (queueEntry.type === 'mediaSource') {\n // If the next entry is a media source entry (uses multiple source buffers), block\n // processing to allow it to go through first.\n return null;\n }\n if (queueEntry.type === type) {\n return i;\n }\n }\n return null;\n};\nconst shiftQueue = (type, sourceUpdater) => {\n if (sourceUpdater.queue.length === 0) {\n return;\n }\n let queueIndex = 0;\n let queueEntry = sourceUpdater.queue[queueIndex];\n if (queueEntry.type === 'mediaSource') {\n if (!sourceUpdater.updating() && sourceUpdater.mediaSource.readyState !== 'closed') {\n sourceUpdater.queue.shift();\n queueEntry.action(sourceUpdater);\n if (queueEntry.doneFn) {\n queueEntry.doneFn();\n } // Only specific source buffer actions must wait for async updateend events. Media\n // Source actions process synchronously. Therefore, both audio and video source\n // buffers are now clear to process the next queue entries.\n\n shiftQueue('audio', sourceUpdater);\n shiftQueue('video', sourceUpdater);\n } // Media Source actions require both source buffers, so if the media source action\n // couldn't process yet (because one or both source buffers are busy), block other\n // queue actions until both are available and the media source action can process.\n\n return;\n }\n if (type === 'mediaSource') {\n // If the queue was shifted by a media source action (this happens when pushing a\n // media source action onto the queue), then it wasn't from an updateend event from an\n // audio or video source buffer, so there's no change from previous state, and no\n // processing should be done.\n return;\n } // Media source queue entries don't need to consider whether the source updater is\n // started (i.e., source buffers are created) as they don't need the source buffers, but\n // source buffer queue entries do.\n\n if (!sourceUpdater.ready() || sourceUpdater.mediaSource.readyState === 'closed' || updating(type, sourceUpdater)) {\n return;\n }\n if (queueEntry.type !== type) {\n queueIndex = nextQueueIndexOfType(type, sourceUpdater.queue);\n if (queueIndex === null) {\n // Either there's no queue entry that uses this source buffer type in the queue, or\n // there's a media source queue entry before the next entry of this type, in which\n // case wait for that action to process first.\n return;\n }\n queueEntry = sourceUpdater.queue[queueIndex];\n }\n sourceUpdater.queue.splice(queueIndex, 1); // Keep a record that this source buffer type is in use.\n //\n // The queue pending operation must be set before the action is performed in the event\n // that the action results in a synchronous event that is acted upon. For instance, if\n // an exception is thrown that can be handled, it's possible that new actions will be\n // appended to an empty queue and immediately executed, but would not have the correct\n // pending information if this property was set after the action was performed.\n\n sourceUpdater.queuePending[type] = queueEntry;\n queueEntry.action(type, sourceUpdater);\n if (!queueEntry.doneFn) {\n // synchronous operation, process next entry\n sourceUpdater.queuePending[type] = null;\n shiftQueue(type, sourceUpdater);\n return;\n }\n};\nconst cleanupBuffer = (type, sourceUpdater) => {\n const buffer = sourceUpdater[`${type}Buffer`];\n const titleType = toTitleCase(type);\n if (!buffer) {\n return;\n }\n buffer.removeEventListener('updateend', sourceUpdater[`on${titleType}UpdateEnd_`]);\n buffer.removeEventListener('error', sourceUpdater[`on${titleType}Error_`]);\n sourceUpdater.codecs[type] = null;\n sourceUpdater[`${type}Buffer`] = null;\n};\nconst inSourceBuffers = (mediaSource, sourceBuffer) => mediaSource && sourceBuffer && Array.prototype.indexOf.call(mediaSource.sourceBuffers, sourceBuffer) !== -1;\nconst actions = {\n appendBuffer: (bytes, segmentInfo, onError) => (type, sourceUpdater) => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(`Appending segment ${segmentInfo.mediaIndex}'s ${bytes.length} bytes to ${type}Buffer`);\n try {\n sourceBuffer.appendBuffer(bytes);\n } catch (e) {\n sourceUpdater.logger_(`Error with code ${e.code} ` + (e.code === QUOTA_EXCEEDED_ERR ? '(QUOTA_EXCEEDED_ERR) ' : '') + `when appending segment ${segmentInfo.mediaIndex} to ${type}Buffer`);\n sourceUpdater.queuePending[type] = null;\n onError(e);\n }\n },\n remove: (start, end) => (type, sourceUpdater) => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(`Removing ${start} to ${end} from ${type}Buffer`);\n try {\n sourceBuffer.remove(start, end);\n } catch (e) {\n sourceUpdater.logger_(`Remove ${start} to ${end} from ${type}Buffer failed`);\n }\n },\n timestampOffset: offset => (type, sourceUpdater) => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(`Setting ${type}timestampOffset to ${offset}`);\n sourceBuffer.timestampOffset = offset;\n },\n callback: callback => (type, sourceUpdater) => {\n callback();\n },\n endOfStream: error => sourceUpdater => {\n if (sourceUpdater.mediaSource.readyState !== 'open') {\n return;\n }\n sourceUpdater.logger_(`Calling mediaSource endOfStream(${error || ''})`);\n try {\n sourceUpdater.mediaSource.endOfStream(error);\n } catch (e) {\n videojs.log.warn('Failed to call media source endOfStream', e);\n }\n },\n duration: duration => sourceUpdater => {\n sourceUpdater.logger_(`Setting mediaSource duration to ${duration}`);\n try {\n sourceUpdater.mediaSource.duration = duration;\n } catch (e) {\n videojs.log.warn('Failed to set media source duration', e);\n }\n },\n abort: () => (type, sourceUpdater) => {\n if (sourceUpdater.mediaSource.readyState !== 'open') {\n return;\n }\n const sourceBuffer = sourceUpdater[`${type}Buffer`]; // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(`calling abort on ${type}Buffer`);\n try {\n sourceBuffer.abort();\n } catch (e) {\n videojs.log.warn(`Failed to abort on ${type}Buffer`, e);\n }\n },\n addSourceBuffer: (type, codec) => sourceUpdater => {\n const titleType = toTitleCase(type);\n const mime = getMimeForCodec(codec);\n sourceUpdater.logger_(`Adding ${type}Buffer with codec ${codec} to mediaSource`);\n const sourceBuffer = sourceUpdater.mediaSource.addSourceBuffer(mime);\n sourceBuffer.addEventListener('updateend', sourceUpdater[`on${titleType}UpdateEnd_`]);\n sourceBuffer.addEventListener('error', sourceUpdater[`on${titleType}Error_`]);\n sourceUpdater.codecs[type] = codec;\n sourceUpdater[`${type}Buffer`] = sourceBuffer;\n },\n removeSourceBuffer: type => sourceUpdater => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`];\n cleanupBuffer(type, sourceUpdater); // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n }\n sourceUpdater.logger_(`Removing ${type}Buffer with codec ${sourceUpdater.codecs[type]} from mediaSource`);\n try {\n sourceUpdater.mediaSource.removeSourceBuffer(sourceBuffer);\n } catch (e) {\n videojs.log.warn(`Failed to removeSourceBuffer ${type}Buffer`, e);\n }\n },\n changeType: codec => (type, sourceUpdater) => {\n const sourceBuffer = sourceUpdater[`${type}Buffer`];\n const mime = getMimeForCodec(codec); // can't do anything if the media source / source buffer is null\n // or the media source does not contain this source buffer.\n\n if (!inSourceBuffers(sourceUpdater.mediaSource, sourceBuffer)) {\n return;\n } // do not update codec if we don't need to.\n // Only update if we change the codec base.\n // For example, going from avc1.640028 to avc1.64001f does not require a changeType call.\n\n const newCodecBase = codec.substring(0, codec.indexOf('.'));\n const oldCodec = sourceUpdater.codecs[type];\n const oldCodecBase = oldCodec.substring(0, oldCodec.indexOf('.'));\n if (oldCodecBase === newCodecBase) {\n return;\n }\n sourceUpdater.logger_(`changing ${type}Buffer codec from ${sourceUpdater.codecs[type]} to ${codec}`); // check if change to the provided type is supported\n\n try {\n sourceBuffer.changeType(mime);\n sourceUpdater.codecs[type] = codec;\n } catch (e) {\n videojs.log.warn(`Failed to changeType on ${type}Buffer`, e);\n }\n }\n};\nconst pushQueue = ({\n type,\n sourceUpdater,\n action,\n doneFn,\n name\n}) => {\n sourceUpdater.queue.push({\n type,\n action,\n doneFn,\n name\n });\n shiftQueue(type, sourceUpdater);\n};\nconst onUpdateend = (type, sourceUpdater) => e => {\n // Although there should, in theory, be a pending action for any updateend receieved,\n // there are some actions that may trigger updateend events without set definitions in\n // the w3c spec. For instance, setting the duration on the media source may trigger\n // updateend events on source buffers. This does not appear to be in the spec. As such,\n // if we encounter an updateend without a corresponding pending action from our queue\n // for that source buffer type, process the next action.\n if (sourceUpdater.queuePending[type]) {\n const doneFn = sourceUpdater.queuePending[type].doneFn;\n sourceUpdater.queuePending[type] = null;\n if (doneFn) {\n // if there's an error, report it\n doneFn(sourceUpdater[`${type}Error_`]);\n }\n }\n shiftQueue(type, sourceUpdater);\n};\n/**\n * A queue of callbacks to be serialized and applied when a\n * MediaSource and its associated SourceBuffers are not in the\n * updating state. It is used by the segment loader to update the\n * underlying SourceBuffers when new data is loaded, for instance.\n *\n * @class SourceUpdater\n * @param {MediaSource} mediaSource the MediaSource to create the SourceBuffer from\n * @param {string} mimeType the desired MIME type of the underlying SourceBuffer\n */\n\nclass SourceUpdater extends videojs.EventTarget {\n constructor(mediaSource) {\n super();\n this.mediaSource = mediaSource;\n this.sourceopenListener_ = () => shiftQueue('mediaSource', this);\n this.mediaSource.addEventListener('sourceopen', this.sourceopenListener_);\n this.logger_ = logger('SourceUpdater'); // initial timestamp offset is 0\n\n this.audioTimestampOffset_ = 0;\n this.videoTimestampOffset_ = 0;\n this.queue = [];\n this.queuePending = {\n audio: null,\n video: null\n };\n this.delayedAudioAppendQueue_ = [];\n this.videoAppendQueued_ = false;\n this.codecs = {};\n this.onVideoUpdateEnd_ = onUpdateend('video', this);\n this.onAudioUpdateEnd_ = onUpdateend('audio', this);\n this.onVideoError_ = e => {\n // used for debugging\n this.videoError_ = e;\n };\n this.onAudioError_ = e => {\n // used for debugging\n this.audioError_ = e;\n };\n this.createdSourceBuffers_ = false;\n this.initializedEme_ = false;\n this.triggeredReady_ = false;\n }\n initializedEme() {\n this.initializedEme_ = true;\n this.triggerReady();\n }\n hasCreatedSourceBuffers() {\n // if false, likely waiting on one of the segment loaders to get enough data to create\n // source buffers\n return this.createdSourceBuffers_;\n }\n hasInitializedAnyEme() {\n return this.initializedEme_;\n }\n ready() {\n return this.hasCreatedSourceBuffers() && this.hasInitializedAnyEme();\n }\n createSourceBuffers(codecs) {\n if (this.hasCreatedSourceBuffers()) {\n // already created them before\n return;\n } // the intial addOrChangeSourceBuffers will always be\n // two add buffers.\n\n this.addOrChangeSourceBuffers(codecs);\n this.createdSourceBuffers_ = true;\n this.trigger('createdsourcebuffers');\n this.triggerReady();\n }\n triggerReady() {\n // only allow ready to be triggered once, this prevents the case\n // where:\n // 1. we trigger createdsourcebuffers\n // 2. ie 11 synchronously initializates eme\n // 3. the synchronous initialization causes us to trigger ready\n // 4. We go back to the ready check in createSourceBuffers and ready is triggered again.\n if (this.ready() && !this.triggeredReady_) {\n this.triggeredReady_ = true;\n this.trigger('ready');\n }\n }\n /**\n * Add a type of source buffer to the media source.\n *\n * @param {string} type\n * The type of source buffer to add.\n *\n * @param {string} codec\n * The codec to add the source buffer with.\n */\n\n addSourceBuffer(type, codec) {\n pushQueue({\n type: 'mediaSource',\n sourceUpdater: this,\n action: actions.addSourceBuffer(type, codec),\n name: 'addSourceBuffer'\n });\n }\n /**\n * call abort on a source buffer.\n *\n * @param {string} type\n * The type of source buffer to call abort on.\n */\n\n abort(type) {\n pushQueue({\n type,\n sourceUpdater: this,\n action: actions.abort(type),\n name: 'abort'\n });\n }\n /**\n * Call removeSourceBuffer and remove a specific type\n * of source buffer on the mediaSource.\n *\n * @param {string} type\n * The type of source buffer to remove.\n */\n\n removeSourceBuffer(type) {\n if (!this.canRemoveSourceBuffer()) {\n videojs.log.error('removeSourceBuffer is not supported!');\n return;\n }\n pushQueue({\n type: 'mediaSource',\n sourceUpdater: this,\n action: actions.removeSourceBuffer(type),\n name: 'removeSourceBuffer'\n });\n }\n /**\n * Whether or not the removeSourceBuffer function is supported\n * on the mediaSource.\n *\n * @return {boolean}\n * if removeSourceBuffer can be called.\n */\n\n canRemoveSourceBuffer() {\n // As of Firefox 83 removeSourceBuffer\n // throws errors, so we report that it does not support this.\n return !videojs.browser.IS_FIREFOX && window$1.MediaSource && window$1.MediaSource.prototype && typeof window$1.MediaSource.prototype.removeSourceBuffer === 'function';\n }\n /**\n * Whether or not the changeType function is supported\n * on our SourceBuffers.\n *\n * @return {boolean}\n * if changeType can be called.\n */\n\n static canChangeType() {\n return window$1.SourceBuffer && window$1.SourceBuffer.prototype && typeof window$1.SourceBuffer.prototype.changeType === 'function';\n }\n /**\n * Whether or not the changeType function is supported\n * on our SourceBuffers.\n *\n * @return {boolean}\n * if changeType can be called.\n */\n\n canChangeType() {\n return this.constructor.canChangeType();\n }\n /**\n * Call the changeType function on a source buffer, given the code and type.\n *\n * @param {string} type\n * The type of source buffer to call changeType on.\n *\n * @param {string} codec\n * The codec string to change type with on the source buffer.\n */\n\n changeType(type, codec) {\n if (!this.canChangeType()) {\n videojs.log.error('changeType is not supported!');\n return;\n }\n pushQueue({\n type,\n sourceUpdater: this,\n action: actions.changeType(codec),\n name: 'changeType'\n });\n }\n /**\n * Add source buffers with a codec or, if they are already created,\n * call changeType on source buffers using changeType.\n *\n * @param {Object} codecs\n * Codecs to switch to\n */\n\n addOrChangeSourceBuffers(codecs) {\n if (!codecs || typeof codecs !== 'object' || Object.keys(codecs).length === 0) {\n throw new Error('Cannot addOrChangeSourceBuffers to undefined codecs');\n }\n Object.keys(codecs).forEach(type => {\n const codec = codecs[type];\n if (!this.hasCreatedSourceBuffers()) {\n return this.addSourceBuffer(type, codec);\n }\n if (this.canChangeType()) {\n this.changeType(type, codec);\n }\n });\n }\n /**\n * Queue an update to append an ArrayBuffer.\n *\n * @param {MediaObject} object containing audioBytes and/or videoBytes\n * @param {Function} done the function to call when done\n * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-appendBuffer-void-ArrayBuffer-data\n */\n\n appendBuffer(options, doneFn) {\n const {\n segmentInfo,\n type,\n bytes\n } = options;\n this.processedAppend_ = true;\n if (type === 'audio' && this.videoBuffer && !this.videoAppendQueued_) {\n this.delayedAudioAppendQueue_.push([options, doneFn]);\n this.logger_(`delayed audio append of ${bytes.length} until video append`);\n return;\n } // In the case of certain errors, for instance, QUOTA_EXCEEDED_ERR, updateend will\n // not be fired. This means that the queue will be blocked until the next action\n // taken by the segment-loader. Provide a mechanism for segment-loader to handle\n // these errors by calling the doneFn with the specific error.\n\n const onError = doneFn;\n pushQueue({\n type,\n sourceUpdater: this,\n action: actions.appendBuffer(bytes, segmentInfo || {\n mediaIndex: -1\n }, onError),\n doneFn,\n name: 'appendBuffer'\n });\n if (type === 'video') {\n this.videoAppendQueued_ = true;\n if (!this.delayedAudioAppendQueue_.length) {\n return;\n }\n const queue = this.delayedAudioAppendQueue_.slice();\n this.logger_(`queuing delayed audio ${queue.length} appendBuffers`);\n this.delayedAudioAppendQueue_.length = 0;\n queue.forEach(que => {\n this.appendBuffer.apply(this, que);\n });\n }\n }\n /**\n * Get the audio buffer's buffered timerange.\n *\n * @return {TimeRange}\n * The audio buffer's buffered time range\n */\n\n audioBuffered() {\n // no media source/source buffer or it isn't in the media sources\n // source buffer list\n if (!inSourceBuffers(this.mediaSource, this.audioBuffer)) {\n return createTimeRanges();\n }\n return this.audioBuffer.buffered ? this.audioBuffer.buffered : createTimeRanges();\n }\n /**\n * Get the video buffer's buffered timerange.\n *\n * @return {TimeRange}\n * The video buffer's buffered time range\n */\n\n videoBuffered() {\n // no media source/source buffer or it isn't in the media sources\n // source buffer list\n if (!inSourceBuffers(this.mediaSource, this.videoBuffer)) {\n return createTimeRanges();\n }\n return this.videoBuffer.buffered ? this.videoBuffer.buffered : createTimeRanges();\n }\n /**\n * Get a combined video/audio buffer's buffered timerange.\n *\n * @return {TimeRange}\n * the combined time range\n */\n\n buffered() {\n const video = inSourceBuffers(this.mediaSource, this.videoBuffer) ? this.videoBuffer : null;\n const audio = inSourceBuffers(this.mediaSource, this.audioBuffer) ? this.audioBuffer : null;\n if (audio && !video) {\n return this.audioBuffered();\n }\n if (video && !audio) {\n return this.videoBuffered();\n }\n return bufferIntersection(this.audioBuffered(), this.videoBuffered());\n }\n /**\n * Add a callback to the queue that will set duration on the mediaSource.\n *\n * @param {number} duration\n * The duration to set\n *\n * @param {Function} [doneFn]\n * function to run after duration has been set.\n */\n\n setDuration(duration, doneFn = noop) {\n // In order to set the duration on the media source, it's necessary to wait for all\n // source buffers to no longer be updating. \"If the updating attribute equals true on\n // any SourceBuffer in sourceBuffers, then throw an InvalidStateError exception and\n // abort these steps.\" (source: https://www.w3.org/TR/media-source/#attributes).\n pushQueue({\n type: 'mediaSource',\n sourceUpdater: this,\n action: actions.duration(duration),\n name: 'duration',\n doneFn\n });\n }\n /**\n * Add a mediaSource endOfStream call to the queue\n *\n * @param {Error} [error]\n * Call endOfStream with an error\n *\n * @param {Function} [doneFn]\n * A function that should be called when the\n * endOfStream call has finished.\n */\n\n endOfStream(error = null, doneFn = noop) {\n if (typeof error !== 'string') {\n error = undefined;\n } // In order to set the duration on the media source, it's necessary to wait for all\n // source buffers to no longer be updating. \"If the updating attribute equals true on\n // any SourceBuffer in sourceBuffers, then throw an InvalidStateError exception and\n // abort these steps.\" (source: https://www.w3.org/TR/media-source/#attributes).\n\n pushQueue({\n type: 'mediaSource',\n sourceUpdater: this,\n action: actions.endOfStream(error),\n name: 'endOfStream',\n doneFn\n });\n }\n /**\n * Queue an update to remove a time range from the buffer.\n *\n * @param {number} start where to start the removal\n * @param {number} end where to end the removal\n * @param {Function} [done=noop] optional callback to be executed when the remove\n * operation is complete\n * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-remove-void-double-start-unrestricted-double-end\n */\n\n removeAudio(start, end, done = noop) {\n if (!this.audioBuffered().length || this.audioBuffered().end(0) === 0) {\n done();\n return;\n }\n pushQueue({\n type: 'audio',\n sourceUpdater: this,\n action: actions.remove(start, end),\n doneFn: done,\n name: 'remove'\n });\n }\n /**\n * Queue an update to remove a time range from the buffer.\n *\n * @param {number} start where to start the removal\n * @param {number} end where to end the removal\n * @param {Function} [done=noop] optional callback to be executed when the remove\n * operation is complete\n * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-remove-void-double-start-unrestricted-double-end\n */\n\n removeVideo(start, end, done = noop) {\n if (!this.videoBuffered().length || this.videoBuffered().end(0) === 0) {\n done();\n return;\n }\n pushQueue({\n type: 'video',\n sourceUpdater: this,\n action: actions.remove(start, end),\n doneFn: done,\n name: 'remove'\n });\n }\n /**\n * Whether the underlying sourceBuffer is updating or not\n *\n * @return {boolean} the updating status of the SourceBuffer\n */\n\n updating() {\n // the audio/video source buffer is updating\n if (updating('audio', this) || updating('video', this)) {\n return true;\n }\n return false;\n }\n /**\n * Set/get the timestampoffset on the audio SourceBuffer\n *\n * @return {number} the timestamp offset\n */\n\n audioTimestampOffset(offset) {\n if (typeof offset !== 'undefined' && this.audioBuffer &&\n // no point in updating if it's the same\n this.audioTimestampOffset_ !== offset) {\n pushQueue({\n type: 'audio',\n sourceUpdater: this,\n action: actions.timestampOffset(offset),\n name: 'timestampOffset'\n });\n this.audioTimestampOffset_ = offset;\n }\n return this.audioTimestampOffset_;\n }\n /**\n * Set/get the timestampoffset on the video SourceBuffer\n *\n * @return {number} the timestamp offset\n */\n\n videoTimestampOffset(offset) {\n if (typeof offset !== 'undefined' && this.videoBuffer &&\n // no point in updating if it's the same\n this.videoTimestampOffset !== offset) {\n pushQueue({\n type: 'video',\n sourceUpdater: this,\n action: actions.timestampOffset(offset),\n name: 'timestampOffset'\n });\n this.videoTimestampOffset_ = offset;\n }\n return this.videoTimestampOffset_;\n }\n /**\n * Add a function to the queue that will be called\n * when it is its turn to run in the audio queue.\n *\n * @param {Function} callback\n * The callback to queue.\n */\n\n audioQueueCallback(callback) {\n if (!this.audioBuffer) {\n return;\n }\n pushQueue({\n type: 'audio',\n sourceUpdater: this,\n action: actions.callback(callback),\n name: 'callback'\n });\n }\n /**\n * Add a function to the queue that will be called\n * when it is its turn to run in the video queue.\n *\n * @param {Function} callback\n * The callback to queue.\n */\n\n videoQueueCallback(callback) {\n if (!this.videoBuffer) {\n return;\n }\n pushQueue({\n type: 'video',\n sourceUpdater: this,\n action: actions.callback(callback),\n name: 'callback'\n });\n }\n /**\n * dispose of the source updater and the underlying sourceBuffer\n */\n\n dispose() {\n this.trigger('dispose');\n bufferTypes.forEach(type => {\n this.abort(type);\n if (this.canRemoveSourceBuffer()) {\n this.removeSourceBuffer(type);\n } else {\n this[`${type}QueueCallback`](() => cleanupBuffer(type, this));\n }\n });\n this.videoAppendQueued_ = false;\n this.delayedAudioAppendQueue_.length = 0;\n if (this.sourceopenListener_) {\n this.mediaSource.removeEventListener('sourceopen', this.sourceopenListener_);\n }\n this.off();\n }\n}\nconst uint8ToUtf8 = uintArray => decodeURIComponent(escape(String.fromCharCode.apply(null, uintArray)));\nconst bufferToHexString = buffer => {\n const uInt8Buffer = new Uint8Array(buffer);\n return Array.from(uInt8Buffer).map(byte => byte.toString(16).padStart(2, '0')).join('');\n};\n\n/**\n * @file vtt-segment-loader.js\n */\nconst VTT_LINE_TERMINATORS = new Uint8Array('\\n\\n'.split('').map(char => char.charCodeAt(0)));\nclass NoVttJsError extends Error {\n constructor() {\n super('Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.');\n }\n}\n/**\n * An object that manages segment loading and appending.\n *\n * @class VTTSegmentLoader\n * @param {Object} options required and optional options\n * @extends videojs.EventTarget\n */\n\nclass VTTSegmentLoader extends SegmentLoader {\n constructor(settings, options = {}) {\n super(settings, options); // SegmentLoader requires a MediaSource be specified or it will throw an error;\n // however, VTTSegmentLoader has no need of a media source, so delete the reference\n\n this.mediaSource_ = null;\n this.subtitlesTrack_ = null;\n this.loaderType_ = 'subtitle';\n this.featuresNativeTextTracks_ = settings.featuresNativeTextTracks;\n this.loadVttJs = settings.loadVttJs; // The VTT segment will have its own time mappings. Saving VTT segment timing info in\n // the sync controller leads to improper behavior.\n\n this.shouldSaveSegmentTimingInfo_ = false;\n }\n createTransmuxer_() {\n // don't need to transmux any subtitles\n return null;\n }\n /**\n * Indicates which time ranges are buffered\n *\n * @return {TimeRange}\n * TimeRange object representing the current buffered ranges\n */\n\n buffered_() {\n if (!this.subtitlesTrack_ || !this.subtitlesTrack_.cues || !this.subtitlesTrack_.cues.length) {\n return createTimeRanges();\n }\n const cues = this.subtitlesTrack_.cues;\n const start = cues[0].startTime;\n const end = cues[cues.length - 1].startTime;\n return createTimeRanges([[start, end]]);\n }\n /**\n * Gets and sets init segment for the provided map\n *\n * @param {Object} map\n * The map object representing the init segment to get or set\n * @param {boolean=} set\n * If true, the init segment for the provided map should be saved\n * @return {Object}\n * map object for desired init segment\n */\n\n initSegmentForMap(map, set = false) {\n if (!map) {\n return null;\n }\n const id = initSegmentId(map);\n let storedMap = this.initSegments_[id];\n if (set && !storedMap && map.bytes) {\n // append WebVTT line terminators to the media initialization segment if it exists\n // to follow the WebVTT spec (https://w3c.github.io/webvtt/#file-structure) that\n // requires two or more WebVTT line terminators between the WebVTT header and the\n // rest of the file\n const combinedByteLength = VTT_LINE_TERMINATORS.byteLength + map.bytes.byteLength;\n const combinedSegment = new Uint8Array(combinedByteLength);\n combinedSegment.set(map.bytes);\n combinedSegment.set(VTT_LINE_TERMINATORS, map.bytes.byteLength);\n this.initSegments_[id] = storedMap = {\n resolvedUri: map.resolvedUri,\n byterange: map.byterange,\n bytes: combinedSegment\n };\n }\n return storedMap || map;\n }\n /**\n * Returns true if all configuration required for loading is present, otherwise false.\n *\n * @return {boolean} True if the all configuration is ready for loading\n * @private\n */\n\n couldBeginLoading_() {\n return this.playlist_ && this.subtitlesTrack_ && !this.paused();\n }\n /**\n * Once all the starting parameters have been specified, begin\n * operation. This method should only be invoked from the INIT\n * state.\n *\n * @private\n */\n\n init_() {\n this.state = 'READY';\n this.resetEverything();\n return this.monitorBuffer_();\n }\n /**\n * Set a subtitle track on the segment loader to add subtitles to\n *\n * @param {TextTrack=} track\n * The text track to add loaded subtitles to\n * @return {TextTrack}\n * Returns the subtitles track\n */\n\n track(track) {\n if (typeof track === 'undefined') {\n return this.subtitlesTrack_;\n }\n this.subtitlesTrack_ = track; // if we were unpaused but waiting for a sourceUpdater, start\n // buffering now\n\n if (this.state === 'INIT' && this.couldBeginLoading_()) {\n this.init_();\n }\n return this.subtitlesTrack_;\n }\n /**\n * Remove any data in the source buffer between start and end times\n *\n * @param {number} start - the start time of the region to remove from the buffer\n * @param {number} end - the end time of the region to remove from the buffer\n */\n\n remove(start, end) {\n removeCuesFromTrack(start, end, this.subtitlesTrack_);\n }\n /**\n * fill the buffer with segements unless the sourceBuffers are\n * currently updating\n *\n * Note: this function should only ever be called by monitorBuffer_\n * and never directly\n *\n * @private\n */\n\n fillBuffer_() {\n // see if we need to begin loading immediately\n const segmentInfo = this.chooseNextRequest_();\n if (!segmentInfo) {\n return;\n }\n if (this.syncController_.timestampOffsetForTimeline(segmentInfo.timeline) === null) {\n // We don't have the timestamp offset that we need to sync subtitles.\n // Rerun on a timestamp offset or user interaction.\n const checkTimestampOffset = () => {\n this.state = 'READY';\n if (!this.paused()) {\n // if not paused, queue a buffer check as soon as possible\n this.monitorBuffer_();\n }\n };\n this.syncController_.one('timestampoffset', checkTimestampOffset);\n this.state = 'WAITING_ON_TIMELINE';\n return;\n }\n this.loadSegment_(segmentInfo);\n } // never set a timestamp offset for vtt segments.\n\n timestampOffsetForSegment_() {\n return null;\n }\n chooseNextRequest_() {\n return this.skipEmptySegments_(super.chooseNextRequest_());\n }\n /**\n * Prevents the segment loader from requesting segments we know contain no subtitles\n * by walking forward until we find the next segment that we don't know whether it is\n * empty or not.\n *\n * @param {Object} segmentInfo\n * a segment info object that describes the current segment\n * @return {Object}\n * a segment info object that describes the current segment\n */\n\n skipEmptySegments_(segmentInfo) {\n while (segmentInfo && segmentInfo.segment.empty) {\n // stop at the last possible segmentInfo\n if (segmentInfo.mediaIndex + 1 >= segmentInfo.playlist.segments.length) {\n segmentInfo = null;\n break;\n }\n segmentInfo = this.generateSegmentInfo_({\n playlist: segmentInfo.playlist,\n mediaIndex: segmentInfo.mediaIndex + 1,\n startOfSegment: segmentInfo.startOfSegment + segmentInfo.duration,\n isSyncRequest: segmentInfo.isSyncRequest\n });\n }\n return segmentInfo;\n }\n stopForError(error) {\n this.error(error);\n this.state = 'READY';\n this.pause();\n this.trigger('error');\n }\n /**\n * append a decrypted segement to the SourceBuffer through a SourceUpdater\n *\n * @private\n */\n\n segmentRequestFinished_(error, simpleSegment, result) {\n if (!this.subtitlesTrack_) {\n this.state = 'READY';\n return;\n }\n this.saveTransferStats_(simpleSegment.stats); // the request was aborted\n\n if (!this.pendingSegment_) {\n this.state = 'READY';\n this.mediaRequestsAborted += 1;\n return;\n }\n if (error) {\n if (error.code === REQUEST_ERRORS.TIMEOUT) {\n this.handleTimeout_();\n }\n if (error.code === REQUEST_ERRORS.ABORTED) {\n this.mediaRequestsAborted += 1;\n } else {\n this.mediaRequestsErrored += 1;\n }\n this.stopForError(error);\n return;\n }\n const segmentInfo = this.pendingSegment_; // although the VTT segment loader bandwidth isn't really used, it's good to\n // maintain functionality between segment loaders\n\n this.saveBandwidthRelatedStats_(segmentInfo.duration, simpleSegment.stats); // if this request included a segment key, save that data in the cache\n\n if (simpleSegment.key) {\n this.segmentKey(simpleSegment.key, true);\n }\n this.state = 'APPENDING'; // used for tests\n\n this.trigger('appending');\n const segment = segmentInfo.segment;\n if (segment.map) {\n segment.map.bytes = simpleSegment.map.bytes;\n }\n segmentInfo.bytes = simpleSegment.bytes; // Make sure that vttjs has loaded, otherwise, load it and wait till it finished loading\n\n if (typeof window$1.WebVTT !== 'function' && typeof this.loadVttJs === 'function') {\n this.state = 'WAITING_ON_VTTJS'; // should be fine to call multiple times\n // script will be loaded once but multiple listeners will be added to the queue, which is expected.\n\n this.loadVttJs().then(() => this.segmentRequestFinished_(error, simpleSegment, result), () => this.stopForError({\n message: 'Error loading vtt.js',\n metadata: {\n errorType: videojs.Error.VttLoadError\n }\n }));\n return;\n }\n segment.requested = true;\n try {\n this.parseVTTCues_(segmentInfo);\n } catch (e) {\n this.stopForError({\n message: e.message,\n metadata: {\n errorType: videojs.Error.VttCueParsingError\n }\n });\n return;\n }\n this.updateTimeMapping_(segmentInfo, this.syncController_.timelines[segmentInfo.timeline], this.playlist_);\n if (segmentInfo.cues.length) {\n segmentInfo.timingInfo = {\n start: segmentInfo.cues[0].startTime,\n end: segmentInfo.cues[segmentInfo.cues.length - 1].endTime\n };\n } else {\n segmentInfo.timingInfo = {\n start: segmentInfo.startOfSegment,\n end: segmentInfo.startOfSegment + segmentInfo.duration\n };\n }\n if (segmentInfo.isSyncRequest) {\n this.trigger('syncinfoupdate');\n this.pendingSegment_ = null;\n this.state = 'READY';\n return;\n }\n segmentInfo.byteLength = segmentInfo.bytes.byteLength;\n this.mediaSecondsLoaded += segment.duration; // Create VTTCue instances for each cue in the new segment and add them to\n // the subtitle track\n\n segmentInfo.cues.forEach(cue => {\n this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_ ? new window$1.VTTCue(cue.startTime, cue.endTime, cue.text) : cue);\n }); // Remove any duplicate cues from the subtitle track. The WebVTT spec allows\n // cues to have identical time-intervals, but if the text is also identical\n // we can safely assume it is a duplicate that can be removed (ex. when a cue\n // \"overlaps\" VTT segments)\n\n removeDuplicateCuesFromTrack(this.subtitlesTrack_);\n this.handleAppendsDone_();\n }\n handleData_() {// noop as we shouldn't be getting video/audio data captions\n // that we do not support here.\n }\n updateTimingInfoEnd_() {// noop\n }\n /**\n * Uses the WebVTT parser to parse the segment response\n *\n * @throws NoVttJsError\n *\n * @param {Object} segmentInfo\n * a segment info object that describes the current segment\n * @private\n */\n\n parseVTTCues_(segmentInfo) {\n let decoder;\n let decodeBytesToString = false;\n if (typeof window$1.WebVTT !== 'function') {\n // caller is responsible for exception handling.\n throw new NoVttJsError();\n }\n if (typeof window$1.TextDecoder === 'function') {\n decoder = new window$1.TextDecoder('utf8');\n } else {\n decoder = window$1.WebVTT.StringDecoder();\n decodeBytesToString = true;\n }\n const parser = new window$1.WebVTT.Parser(window$1, window$1.vttjs, decoder);\n segmentInfo.cues = [];\n segmentInfo.timestampmap = {\n MPEGTS: 0,\n LOCAL: 0\n };\n parser.oncue = segmentInfo.cues.push.bind(segmentInfo.cues);\n parser.ontimestampmap = map => {\n segmentInfo.timestampmap = map;\n };\n parser.onparsingerror = error => {\n videojs.log.warn('Error encountered when parsing cues: ' + error.message);\n };\n if (segmentInfo.segment.map) {\n let mapData = segmentInfo.segment.map.bytes;\n if (decodeBytesToString) {\n mapData = uint8ToUtf8(mapData);\n }\n parser.parse(mapData);\n }\n let segmentData = segmentInfo.bytes;\n if (decodeBytesToString) {\n segmentData = uint8ToUtf8(segmentData);\n }\n parser.parse(segmentData);\n parser.flush();\n }\n /**\n * Updates the start and end times of any cues parsed by the WebVTT parser using\n * the information parsed from the X-TIMESTAMP-MAP header and a TS to media time mapping\n * from the SyncController\n *\n * @param {Object} segmentInfo\n * a segment info object that describes the current segment\n * @param {Object} mappingObj\n * object containing a mapping from TS to media time\n * @param {Object} playlist\n * the playlist object containing the segment\n * @private\n */\n\n updateTimeMapping_(segmentInfo, mappingObj, playlist) {\n const segment = segmentInfo.segment;\n if (!mappingObj) {\n // If the sync controller does not have a mapping of TS to Media Time for the\n // timeline, then we don't have enough information to update the cue\n // start/end times\n return;\n }\n if (!segmentInfo.cues.length) {\n // If there are no cues, we also do not have enough information to figure out\n // segment timing. Mark that the segment contains no cues so we don't re-request\n // an empty segment.\n segment.empty = true;\n return;\n }\n const {\n MPEGTS,\n LOCAL\n } = segmentInfo.timestampmap;\n /**\n * From the spec:\n * The MPEGTS media timestamp MUST use a 90KHz timescale,\n * even when non-WebVTT Media Segments use a different timescale.\n */\n\n const mpegTsInSeconds = MPEGTS / ONE_SECOND_IN_TS;\n const diff = mpegTsInSeconds - LOCAL + mappingObj.mapping;\n segmentInfo.cues.forEach(cue => {\n const duration = cue.endTime - cue.startTime;\n const startTime = MPEGTS === 0 ? cue.startTime + diff : this.handleRollover_(cue.startTime + diff, mappingObj.time);\n cue.startTime = Math.max(startTime, 0);\n cue.endTime = Math.max(startTime + duration, 0);\n });\n if (!playlist.syncInfo) {\n const firstStart = segmentInfo.cues[0].startTime;\n const lastStart = segmentInfo.cues[segmentInfo.cues.length - 1].startTime;\n playlist.syncInfo = {\n mediaSequence: playlist.mediaSequence + segmentInfo.mediaIndex,\n time: Math.min(firstStart, lastStart - segment.duration)\n };\n }\n }\n /**\n * MPEG-TS PES timestamps are limited to 2^33.\n * Once they reach 2^33, they roll over to 0.\n * mux.js handles PES timestamp rollover for the following scenarios:\n * [forward rollover(right)] ->\n * PES timestamps monotonically increase, and once they reach 2^33, they roll over to 0\n * [backward rollover(left)] -->\n * we seek back to position before rollover.\n *\n * According to the HLS SPEC:\n * When synchronizing WebVTT with PES timestamps, clients SHOULD account\n * for cases where the 33-bit PES timestamps have wrapped and the WebVTT\n * cue times have not. When the PES timestamp wraps, the WebVTT Segment\n * SHOULD have a X-TIMESTAMP-MAP header that maps the current WebVTT\n * time to the new (low valued) PES timestamp.\n *\n * So we want to handle rollover here and align VTT Cue start/end time to the player's time.\n */\n\n handleRollover_(value, reference) {\n if (reference === null) {\n return value;\n }\n let valueIn90khz = value * ONE_SECOND_IN_TS;\n const referenceIn90khz = reference * ONE_SECOND_IN_TS;\n let offset;\n if (referenceIn90khz < valueIn90khz) {\n // - 2^33\n offset = -8589934592;\n } else {\n // + 2^33\n offset = 8589934592;\n } // distance(value - reference) > 2^32\n\n while (Math.abs(valueIn90khz - referenceIn90khz) > 4294967296) {\n valueIn90khz += offset;\n }\n return valueIn90khz / ONE_SECOND_IN_TS;\n }\n}\n\n/**\n * @file ad-cue-tags.js\n */\n/**\n * Searches for an ad cue that overlaps with the given mediaTime\n *\n * @param {Object} track\n * the track to find the cue for\n *\n * @param {number} mediaTime\n * the time to find the cue at\n *\n * @return {Object|null}\n * the found cue or null\n */\n\nconst findAdCue = function (track, mediaTime) {\n const cues = track.cues;\n for (let i = 0; i < cues.length; i++) {\n const cue = cues[i];\n if (mediaTime >= cue.adStartTime && mediaTime <= cue.adEndTime) {\n return cue;\n }\n }\n return null;\n};\nconst updateAdCues = function (media, track, offset = 0) {\n if (!media.segments) {\n return;\n }\n let mediaTime = offset;\n let cue;\n for (let i = 0; i < media.segments.length; i++) {\n const segment = media.segments[i];\n if (!cue) {\n // Since the cues will span for at least the segment duration, adding a fudge\n // factor of half segment duration will prevent duplicate cues from being\n // created when timing info is not exact (e.g. cue start time initialized\n // at 10.006677, but next call mediaTime is 10.003332 )\n cue = findAdCue(track, mediaTime + segment.duration / 2);\n }\n if (cue) {\n if ('cueIn' in segment) {\n // Found a CUE-IN so end the cue\n cue.endTime = mediaTime;\n cue.adEndTime = mediaTime;\n mediaTime += segment.duration;\n cue = null;\n continue;\n }\n if (mediaTime < cue.endTime) {\n // Already processed this mediaTime for this cue\n mediaTime += segment.duration;\n continue;\n } // otherwise extend cue until a CUE-IN is found\n\n cue.endTime += segment.duration;\n } else {\n if ('cueOut' in segment) {\n cue = new window$1.VTTCue(mediaTime, mediaTime + segment.duration, segment.cueOut);\n cue.adStartTime = mediaTime; // Assumes tag format to be\n // #EXT-X-CUE-OUT:30\n\n cue.adEndTime = mediaTime + parseFloat(segment.cueOut);\n track.addCue(cue);\n }\n if ('cueOutCont' in segment) {\n // Entered into the middle of an ad cue\n // Assumes tag formate to be\n // #EXT-X-CUE-OUT-CONT:10/30\n const [adOffset, adTotal] = segment.cueOutCont.split('/').map(parseFloat);\n cue = new window$1.VTTCue(mediaTime, mediaTime + segment.duration, '');\n cue.adStartTime = mediaTime - adOffset;\n cue.adEndTime = cue.adStartTime + adTotal;\n track.addCue(cue);\n }\n }\n mediaTime += segment.duration;\n }\n};\n\n/**\n * @file sync-controller.js\n */\n// synchronize expired playlist segments.\n// the max media sequence diff is 48 hours of live stream\n// content with two second segments. Anything larger than that\n// will likely be invalid.\n\nconst MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC = 86400;\nconst syncPointStrategies = [\n// Stategy \"VOD\": Handle the VOD-case where the sync-point is *always*\n// the equivalence display-time 0 === segment-index 0\n{\n name: 'VOD',\n run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n if (duration !== Infinity) {\n const syncPoint = {\n time: 0,\n segmentIndex: 0,\n partIndex: null\n };\n return syncPoint;\n }\n return null;\n }\n}, {\n name: 'MediaSequence',\n /**\n * run media sequence strategy\n *\n * @param {SyncController} syncController\n * @param {Object} playlist\n * @param {number} duration\n * @param {number} currentTimeline\n * @param {number} currentTime\n * @param {string} type\n */\n run: (syncController, playlist, duration, currentTimeline, currentTime, type) => {\n if (!type) {\n return null;\n }\n const mediaSequenceMap = syncController.getMediaSequenceMap(type);\n if (!mediaSequenceMap || mediaSequenceMap.size === 0) {\n return null;\n }\n if (playlist.mediaSequence === undefined || !Array.isArray(playlist.segments) || !playlist.segments.length) {\n return null;\n }\n let currentMediaSequence = playlist.mediaSequence;\n let segmentIndex = 0;\n for (const segment of playlist.segments) {\n const range = mediaSequenceMap.get(currentMediaSequence);\n if (!range) {\n // unexpected case\n // we expect this playlist to be the same playlist in the map\n // just break from the loop and move forward to the next strategy\n break;\n }\n if (currentTime >= range.start && currentTime < range.end) {\n // we found segment\n if (Array.isArray(segment.parts) && segment.parts.length) {\n let currentPartStart = range.start;\n let partIndex = 0;\n for (const part of segment.parts) {\n const start = currentPartStart;\n const end = start + part.duration;\n if (currentTime >= start && currentTime < end) {\n return {\n time: range.start,\n segmentIndex,\n partIndex\n };\n }\n partIndex++;\n currentPartStart = end;\n }\n } // no parts found, return sync point for segment\n\n return {\n time: range.start,\n segmentIndex,\n partIndex: null\n };\n }\n segmentIndex++;\n currentMediaSequence++;\n } // we didn't find any segments for provided current time\n\n return null;\n }\n},\n// Stategy \"ProgramDateTime\": We have a program-date-time tag in this playlist\n{\n name: 'ProgramDateTime',\n run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n if (!Object.keys(syncController.timelineToDatetimeMappings).length) {\n return null;\n }\n let syncPoint = null;\n let lastDistance = null;\n const partsAndSegments = getPartsAndSegments(playlist);\n currentTime = currentTime || 0;\n for (let i = 0; i < partsAndSegments.length; i++) {\n // start from the end and loop backwards for live\n // or start from the front and loop forwards for non-live\n const index = playlist.endList || currentTime === 0 ? i : partsAndSegments.length - (i + 1);\n const partAndSegment = partsAndSegments[index];\n const segment = partAndSegment.segment;\n const datetimeMapping = syncController.timelineToDatetimeMappings[segment.timeline];\n if (!datetimeMapping || !segment.dateTimeObject) {\n continue;\n }\n const segmentTime = segment.dateTimeObject.getTime() / 1000;\n let start = segmentTime + datetimeMapping; // take part duration into account.\n\n if (segment.parts && typeof partAndSegment.partIndex === 'number') {\n for (let z = 0; z < partAndSegment.partIndex; z++) {\n start += segment.parts[z].duration;\n }\n }\n const distance = Math.abs(currentTime - start); // Once the distance begins to increase, or if distance is 0, we have passed\n // currentTime and can stop looking for better candidates\n\n if (lastDistance !== null && (distance === 0 || lastDistance < distance)) {\n break;\n }\n lastDistance = distance;\n syncPoint = {\n time: start,\n segmentIndex: partAndSegment.segmentIndex,\n partIndex: partAndSegment.partIndex\n };\n }\n return syncPoint;\n }\n},\n// Stategy \"Segment\": We have a known time mapping for a timeline and a\n// segment in the current timeline with timing data\n{\n name: 'Segment',\n run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n let syncPoint = null;\n let lastDistance = null;\n currentTime = currentTime || 0;\n const partsAndSegments = getPartsAndSegments(playlist);\n for (let i = 0; i < partsAndSegments.length; i++) {\n // start from the end and loop backwards for live\n // or start from the front and loop forwards for non-live\n const index = playlist.endList || currentTime === 0 ? i : partsAndSegments.length - (i + 1);\n const partAndSegment = partsAndSegments[index];\n const segment = partAndSegment.segment;\n const start = partAndSegment.part && partAndSegment.part.start || segment && segment.start;\n if (segment.timeline === currentTimeline && typeof start !== 'undefined') {\n const distance = Math.abs(currentTime - start); // Once the distance begins to increase, we have passed\n // currentTime and can stop looking for better candidates\n\n if (lastDistance !== null && lastDistance < distance) {\n break;\n }\n if (!syncPoint || lastDistance === null || lastDistance >= distance) {\n lastDistance = distance;\n syncPoint = {\n time: start,\n segmentIndex: partAndSegment.segmentIndex,\n partIndex: partAndSegment.partIndex\n };\n }\n }\n }\n return syncPoint;\n }\n},\n// Stategy \"Discontinuity\": We have a discontinuity with a known\n// display-time\n{\n name: 'Discontinuity',\n run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n let syncPoint = null;\n currentTime = currentTime || 0;\n if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\n let lastDistance = null;\n for (let i = 0; i < playlist.discontinuityStarts.length; i++) {\n const segmentIndex = playlist.discontinuityStarts[i];\n const discontinuity = playlist.discontinuitySequence + i + 1;\n const discontinuitySync = syncController.discontinuities[discontinuity];\n if (discontinuitySync) {\n const distance = Math.abs(currentTime - discontinuitySync.time); // Once the distance begins to increase, we have passed\n // currentTime and can stop looking for better candidates\n\n if (lastDistance !== null && lastDistance < distance) {\n break;\n }\n if (!syncPoint || lastDistance === null || lastDistance >= distance) {\n lastDistance = distance;\n syncPoint = {\n time: discontinuitySync.time,\n segmentIndex,\n partIndex: null\n };\n }\n }\n }\n }\n return syncPoint;\n }\n},\n// Stategy \"Playlist\": We have a playlist with a known mapping of\n// segment index to display time\n{\n name: 'Playlist',\n run: (syncController, playlist, duration, currentTimeline, currentTime) => {\n if (playlist.syncInfo) {\n const syncPoint = {\n time: playlist.syncInfo.time,\n segmentIndex: playlist.syncInfo.mediaSequence - playlist.mediaSequence,\n partIndex: null\n };\n return syncPoint;\n }\n return null;\n }\n}];\nclass SyncController extends videojs.EventTarget {\n constructor(options = {}) {\n super(); // ...for synching across variants\n\n this.timelines = [];\n this.discontinuities = [];\n this.timelineToDatetimeMappings = {};\n /**\n * @type {Map>}\n * @private\n */\n\n this.mediaSequenceStorage_ = new Map();\n this.logger_ = logger('SyncController');\n }\n /**\n * Get media sequence map by type\n *\n * @param {string} type - segment loader type\n * @return {Map | undefined}\n */\n\n getMediaSequenceMap(type) {\n return this.mediaSequenceStorage_.get(type);\n }\n /**\n * Update Media Sequence Map -> \n *\n * @param {Object} playlist - parsed playlist\n * @param {number} currentTime - current player's time\n * @param {string} type - segment loader type\n * @return {void}\n */\n\n updateMediaSequenceMap(playlist, currentTime, type) {\n // we should not process this playlist if it does not have mediaSequence or segments\n if (playlist.mediaSequence === undefined || !Array.isArray(playlist.segments) || !playlist.segments.length) {\n return;\n }\n const currentMap = this.getMediaSequenceMap(type);\n const result = new Map();\n let currentMediaSequence = playlist.mediaSequence;\n let currentBaseTime;\n if (!currentMap) {\n // first playlist setup:\n currentBaseTime = 0;\n } else if (currentMap.has(playlist.mediaSequence)) {\n // further playlists setup:\n currentBaseTime = currentMap.get(playlist.mediaSequence).start;\n } else {\n // it seems like we have a gap between playlists, use current time as a fallback:\n this.logger_(`MediaSequence sync for ${type} segment loader - received a gap between playlists.\nFallback base time to: ${currentTime}.\nReceived media sequence: ${currentMediaSequence}.\nCurrent map: `, currentMap);\n currentBaseTime = currentTime;\n }\n this.logger_(`MediaSequence sync for ${type} segment loader.\nReceived media sequence: ${currentMediaSequence}.\nbase time is ${currentBaseTime}\nCurrent map: `, currentMap);\n playlist.segments.forEach(segment => {\n const start = currentBaseTime;\n const end = start + segment.duration;\n const range = {\n start,\n end\n };\n result.set(currentMediaSequence, range);\n currentMediaSequence++;\n currentBaseTime = end;\n });\n this.mediaSequenceStorage_.set(type, result);\n }\n /**\n * Find a sync-point for the playlist specified\n *\n * A sync-point is defined as a known mapping from display-time to\n * a segment-index in the current playlist.\n *\n * @param {Playlist} playlist\n * The playlist that needs a sync-point\n * @param {number} duration\n * Duration of the MediaSource (Infinite if playing a live source)\n * @param {number} currentTimeline\n * The last timeline from which a segment was loaded\n * @param {number} currentTime\n * Current player's time\n * @param {string} type\n * Segment loader type\n * @return {Object}\n * A sync-point object\n */\n\n getSyncPoint(playlist, duration, currentTimeline, currentTime, type) {\n // Always use VOD sync point for VOD\n if (duration !== Infinity) {\n const vodSyncPointStrategy = syncPointStrategies.find(({\n name\n }) => name === 'VOD');\n return vodSyncPointStrategy.run(this, playlist, duration);\n }\n const syncPoints = this.runStrategies_(playlist, duration, currentTimeline, currentTime, type);\n if (!syncPoints.length) {\n // Signal that we need to attempt to get a sync-point manually\n // by fetching a segment in the playlist and constructing\n // a sync-point from that information\n return null;\n } // If we have exact match just return it instead of finding the nearest distance\n\n for (const syncPointInfo of syncPoints) {\n const {\n syncPoint,\n strategy\n } = syncPointInfo;\n const {\n segmentIndex,\n time\n } = syncPoint;\n if (segmentIndex < 0) {\n continue;\n }\n const selectedSegment = playlist.segments[segmentIndex];\n const start = time;\n const end = start + selectedSegment.duration;\n this.logger_(`Strategy: ${strategy}. Current time: ${currentTime}. selected segment: ${segmentIndex}. Time: [${start} -> ${end}]}`);\n if (currentTime >= start && currentTime < end) {\n this.logger_('Found sync point with exact match: ', syncPoint);\n return syncPoint;\n }\n } // Now find the sync-point that is closest to the currentTime because\n // that should result in the most accurate guess about which segment\n // to fetch\n\n return this.selectSyncPoint_(syncPoints, {\n key: 'time',\n value: currentTime\n });\n }\n /**\n * Calculate the amount of time that has expired off the playlist during playback\n *\n * @param {Playlist} playlist\n * Playlist object to calculate expired from\n * @param {number} duration\n * Duration of the MediaSource (Infinity if playling a live source)\n * @return {number|null}\n * The amount of time that has expired off the playlist during playback. Null\n * if no sync-points for the playlist can be found.\n */\n\n getExpiredTime(playlist, duration) {\n if (!playlist || !playlist.segments) {\n return null;\n }\n const syncPoints = this.runStrategies_(playlist, duration, playlist.discontinuitySequence, 0, 'main'); // Without sync-points, there is not enough information to determine the expired time\n\n if (!syncPoints.length) {\n return null;\n }\n const syncPoint = this.selectSyncPoint_(syncPoints, {\n key: 'segmentIndex',\n value: 0\n }); // If the sync-point is beyond the start of the playlist, we want to subtract the\n // duration from index 0 to syncPoint.segmentIndex instead of adding.\n\n if (syncPoint.segmentIndex > 0) {\n syncPoint.time *= -1;\n }\n return Math.abs(syncPoint.time + sumDurations({\n defaultDuration: playlist.targetDuration,\n durationList: playlist.segments,\n startIndex: syncPoint.segmentIndex,\n endIndex: 0\n }));\n }\n /**\n * Runs each sync-point strategy and returns a list of sync-points returned by the\n * strategies\n *\n * @private\n * @param {Playlist} playlist\n * The playlist that needs a sync-point\n * @param {number} duration\n * Duration of the MediaSource (Infinity if playing a live source)\n * @param {number} currentTimeline\n * The last timeline from which a segment was loaded\n * @param {number} currentTime\n * Current player's time\n * @param {string} type\n * Segment loader type\n * @return {Array}\n * A list of sync-point objects\n */\n\n runStrategies_(playlist, duration, currentTimeline, currentTime, type) {\n const syncPoints = []; // Try to find a sync-point in by utilizing various strategies...\n\n for (let i = 0; i < syncPointStrategies.length; i++) {\n const strategy = syncPointStrategies[i];\n const syncPoint = strategy.run(this, playlist, duration, currentTimeline, currentTime, type);\n if (syncPoint) {\n syncPoint.strategy = strategy.name;\n syncPoints.push({\n strategy: strategy.name,\n syncPoint\n });\n }\n }\n return syncPoints;\n }\n /**\n * Selects the sync-point nearest the specified target\n *\n * @private\n * @param {Array} syncPoints\n * List of sync-points to select from\n * @param {Object} target\n * Object specifying the property and value we are targeting\n * @param {string} target.key\n * Specifies the property to target. Must be either 'time' or 'segmentIndex'\n * @param {number} target.value\n * The value to target for the specified key.\n * @return {Object}\n * The sync-point nearest the target\n */\n\n selectSyncPoint_(syncPoints, target) {\n let bestSyncPoint = syncPoints[0].syncPoint;\n let bestDistance = Math.abs(syncPoints[0].syncPoint[target.key] - target.value);\n let bestStrategy = syncPoints[0].strategy;\n for (let i = 1; i < syncPoints.length; i++) {\n const newDistance = Math.abs(syncPoints[i].syncPoint[target.key] - target.value);\n if (newDistance < bestDistance) {\n bestDistance = newDistance;\n bestSyncPoint = syncPoints[i].syncPoint;\n bestStrategy = syncPoints[i].strategy;\n }\n }\n this.logger_(`syncPoint for [${target.key}: ${target.value}] chosen with strategy` + ` [${bestStrategy}]: [time:${bestSyncPoint.time},` + ` segmentIndex:${bestSyncPoint.segmentIndex}` + (typeof bestSyncPoint.partIndex === 'number' ? `,partIndex:${bestSyncPoint.partIndex}` : '') + ']');\n return bestSyncPoint;\n }\n /**\n * Save any meta-data present on the segments when segments leave\n * the live window to the playlist to allow for synchronization at the\n * playlist level later.\n *\n * @param {Playlist} oldPlaylist - The previous active playlist\n * @param {Playlist} newPlaylist - The updated and most current playlist\n */\n\n saveExpiredSegmentInfo(oldPlaylist, newPlaylist) {\n const mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence; // Ignore large media sequence gaps\n\n if (mediaSequenceDiff > MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC) {\n videojs.log.warn(`Not saving expired segment info. Media sequence gap ${mediaSequenceDiff} is too large.`);\n return;\n } // When a segment expires from the playlist and it has a start time\n // save that information as a possible sync-point reference in future\n\n for (let i = mediaSequenceDiff - 1; i >= 0; i--) {\n const lastRemovedSegment = oldPlaylist.segments[i];\n if (lastRemovedSegment && typeof lastRemovedSegment.start !== 'undefined') {\n newPlaylist.syncInfo = {\n mediaSequence: oldPlaylist.mediaSequence + i,\n time: lastRemovedSegment.start\n };\n this.logger_(`playlist refresh sync: [time:${newPlaylist.syncInfo.time},` + ` mediaSequence: ${newPlaylist.syncInfo.mediaSequence}]`);\n this.trigger('syncinfoupdate');\n break;\n }\n }\n }\n /**\n * Save the mapping from playlist's ProgramDateTime to display. This should only happen\n * before segments start to load.\n *\n * @param {Playlist} playlist - The currently active playlist\n */\n\n setDateTimeMappingForStart(playlist) {\n // It's possible for the playlist to be updated before playback starts, meaning time\n // zero is not yet set. If, during these playlist refreshes, a discontinuity is\n // crossed, then the old time zero mapping (for the prior timeline) would be retained\n // unless the mappings are cleared.\n this.timelineToDatetimeMappings = {};\n if (playlist.segments && playlist.segments.length && playlist.segments[0].dateTimeObject) {\n const firstSegment = playlist.segments[0];\n const playlistTimestamp = firstSegment.dateTimeObject.getTime() / 1000;\n this.timelineToDatetimeMappings[firstSegment.timeline] = -playlistTimestamp;\n }\n }\n /**\n * Calculates and saves timeline mappings, playlist sync info, and segment timing values\n * based on the latest timing information.\n *\n * @param {Object} options\n * Options object\n * @param {SegmentInfo} options.segmentInfo\n * The current active request information\n * @param {boolean} options.shouldSaveTimelineMapping\n * If there's a timeline change, determines if the timeline mapping should be\n * saved for timeline mapping and program date time mappings.\n */\n\n saveSegmentTimingInfo({\n segmentInfo,\n shouldSaveTimelineMapping\n }) {\n const didCalculateSegmentTimeMapping = this.calculateSegmentTimeMapping_(segmentInfo, segmentInfo.timingInfo, shouldSaveTimelineMapping);\n const segment = segmentInfo.segment;\n if (didCalculateSegmentTimeMapping) {\n this.saveDiscontinuitySyncInfo_(segmentInfo); // If the playlist does not have sync information yet, record that information\n // now with segment timing information\n\n if (!segmentInfo.playlist.syncInfo) {\n segmentInfo.playlist.syncInfo = {\n mediaSequence: segmentInfo.playlist.mediaSequence + segmentInfo.mediaIndex,\n time: segment.start\n };\n }\n }\n const dateTime = segment.dateTimeObject;\n if (segment.discontinuity && shouldSaveTimelineMapping && dateTime) {\n this.timelineToDatetimeMappings[segment.timeline] = -(dateTime.getTime() / 1000);\n }\n }\n timestampOffsetForTimeline(timeline) {\n if (typeof this.timelines[timeline] === 'undefined') {\n return null;\n }\n return this.timelines[timeline].time;\n }\n mappingForTimeline(timeline) {\n if (typeof this.timelines[timeline] === 'undefined') {\n return null;\n }\n return this.timelines[timeline].mapping;\n }\n /**\n * Use the \"media time\" for a segment to generate a mapping to \"display time\" and\n * save that display time to the segment.\n *\n * @private\n * @param {SegmentInfo} segmentInfo\n * The current active request information\n * @param {Object} timingInfo\n * The start and end time of the current segment in \"media time\"\n * @param {boolean} shouldSaveTimelineMapping\n * If there's a timeline change, determines if the timeline mapping should be\n * saved in timelines.\n * @return {boolean}\n * Returns false if segment time mapping could not be calculated\n */\n\n calculateSegmentTimeMapping_(segmentInfo, timingInfo, shouldSaveTimelineMapping) {\n // TODO: remove side effects\n const segment = segmentInfo.segment;\n const part = segmentInfo.part;\n let mappingObj = this.timelines[segmentInfo.timeline];\n let start;\n let end;\n if (typeof segmentInfo.timestampOffset === 'number') {\n mappingObj = {\n time: segmentInfo.startOfSegment,\n mapping: segmentInfo.startOfSegment - timingInfo.start\n };\n if (shouldSaveTimelineMapping) {\n this.timelines[segmentInfo.timeline] = mappingObj;\n this.trigger('timestampoffset');\n this.logger_(`time mapping for timeline ${segmentInfo.timeline}: ` + `[time: ${mappingObj.time}] [mapping: ${mappingObj.mapping}]`);\n }\n start = segmentInfo.startOfSegment;\n end = timingInfo.end + mappingObj.mapping;\n } else if (mappingObj) {\n start = timingInfo.start + mappingObj.mapping;\n end = timingInfo.end + mappingObj.mapping;\n } else {\n return false;\n }\n if (part) {\n part.start = start;\n part.end = end;\n } // If we don't have a segment start yet or the start value we got\n // is less than our current segment.start value, save a new start value.\n // We have to do this because parts will have segment timing info saved\n // multiple times and we want segment start to be the earliest part start\n // value for that segment.\n\n if (!segment.start || start < segment.start) {\n segment.start = start;\n }\n segment.end = end;\n return true;\n }\n /**\n * Each time we have discontinuity in the playlist, attempt to calculate the location\n * in display of the start of the discontinuity and save that. We also save an accuracy\n * value so that we save values with the most accuracy (closest to 0.)\n *\n * @private\n * @param {SegmentInfo} segmentInfo - The current active request information\n */\n\n saveDiscontinuitySyncInfo_(segmentInfo) {\n const playlist = segmentInfo.playlist;\n const segment = segmentInfo.segment; // If the current segment is a discontinuity then we know exactly where\n // the start of the range and it's accuracy is 0 (greater accuracy values\n // mean more approximation)\n\n if (segment.discontinuity) {\n this.discontinuities[segment.timeline] = {\n time: segment.start,\n accuracy: 0\n };\n } else if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\n // Search for future discontinuities that we can provide better timing\n // information for and save that information for sync purposes\n for (let i = 0; i < playlist.discontinuityStarts.length; i++) {\n const segmentIndex = playlist.discontinuityStarts[i];\n const discontinuity = playlist.discontinuitySequence + i + 1;\n const mediaIndexDiff = segmentIndex - segmentInfo.mediaIndex;\n const accuracy = Math.abs(mediaIndexDiff);\n if (!this.discontinuities[discontinuity] || this.discontinuities[discontinuity].accuracy > accuracy) {\n let time;\n if (mediaIndexDiff < 0) {\n time = segment.start - sumDurations({\n defaultDuration: playlist.targetDuration,\n durationList: playlist.segments,\n startIndex: segmentInfo.mediaIndex,\n endIndex: segmentIndex\n });\n } else {\n time = segment.end + sumDurations({\n defaultDuration: playlist.targetDuration,\n durationList: playlist.segments,\n startIndex: segmentInfo.mediaIndex + 1,\n endIndex: segmentIndex\n });\n }\n this.discontinuities[discontinuity] = {\n time,\n accuracy\n };\n }\n }\n }\n }\n dispose() {\n this.trigger('dispose');\n this.off();\n }\n}\n\n/**\n * The TimelineChangeController acts as a source for segment loaders to listen for and\n * keep track of latest and pending timeline changes. This is useful to ensure proper\n * sync, as each loader may need to make a consideration for what timeline the other\n * loader is on before making changes which could impact the other loader's media.\n *\n * @class TimelineChangeController\n * @extends videojs.EventTarget\n */\n\nclass TimelineChangeController extends videojs.EventTarget {\n constructor() {\n super();\n this.pendingTimelineChanges_ = {};\n this.lastTimelineChanges_ = {};\n }\n clearPendingTimelineChange(type) {\n this.pendingTimelineChanges_[type] = null;\n this.trigger('pendingtimelinechange');\n }\n pendingTimelineChange({\n type,\n from,\n to\n }) {\n if (typeof from === 'number' && typeof to === 'number') {\n this.pendingTimelineChanges_[type] = {\n type,\n from,\n to\n };\n this.trigger('pendingtimelinechange');\n }\n return this.pendingTimelineChanges_[type];\n }\n lastTimelineChange({\n type,\n from,\n to\n }) {\n if (typeof from === 'number' && typeof to === 'number') {\n this.lastTimelineChanges_[type] = {\n type,\n from,\n to\n };\n delete this.pendingTimelineChanges_[type];\n this.trigger('timelinechange');\n }\n return this.lastTimelineChanges_[type];\n }\n dispose() {\n this.trigger('dispose');\n this.pendingTimelineChanges_ = {};\n this.lastTimelineChanges_ = {};\n this.off();\n }\n}\n\n/* rollup-plugin-worker-factory start for worker!/home/runner/work/http-streaming/http-streaming/src/decrypter-worker.js */\nconst workerCode = transform(getWorkerString(function () {\n /**\n * @file stream.js\n */\n\n /**\n * A lightweight readable stream implemention that handles event dispatching.\n *\n * @class Stream\n */\n\n var Stream = /*#__PURE__*/function () {\n function Stream() {\n this.listeners = {};\n }\n /**\n * Add a listener for a specified event type.\n *\n * @param {string} type the event name\n * @param {Function} listener the callback to be invoked when an event of\n * the specified type occurs\n */\n\n var _proto = Stream.prototype;\n _proto.on = function on(type, listener) {\n if (!this.listeners[type]) {\n this.listeners[type] = [];\n }\n this.listeners[type].push(listener);\n }\n /**\n * Remove a listener for a specified event type.\n *\n * @param {string} type the event name\n * @param {Function} listener a function previously registered for this\n * type of event through `on`\n * @return {boolean} if we could turn it off or not\n */;\n\n _proto.off = function off(type, listener) {\n if (!this.listeners[type]) {\n return false;\n }\n var index = this.listeners[type].indexOf(listener); // TODO: which is better?\n // In Video.js we slice listener functions\n // on trigger so that it does not mess up the order\n // while we loop through.\n //\n // Here we slice on off so that the loop in trigger\n // can continue using it's old reference to loop without\n // messing up the order.\n\n this.listeners[type] = this.listeners[type].slice(0);\n this.listeners[type].splice(index, 1);\n return index > -1;\n }\n /**\n * Trigger an event of the specified type on this stream. Any additional\n * arguments to this function are passed as parameters to event listeners.\n *\n * @param {string} type the event name\n */;\n\n _proto.trigger = function trigger(type) {\n var callbacks = this.listeners[type];\n if (!callbacks) {\n return;\n } // Slicing the arguments on every invocation of this method\n // can add a significant amount of overhead. Avoid the\n // intermediate object creation for the common case of a\n // single callback argument\n\n if (arguments.length === 2) {\n var length = callbacks.length;\n for (var i = 0; i < length; ++i) {\n callbacks[i].call(this, arguments[1]);\n }\n } else {\n var args = Array.prototype.slice.call(arguments, 1);\n var _length = callbacks.length;\n for (var _i = 0; _i < _length; ++_i) {\n callbacks[_i].apply(this, args);\n }\n }\n }\n /**\n * Destroys the stream and cleans up.\n */;\n\n _proto.dispose = function dispose() {\n this.listeners = {};\n }\n /**\n * Forwards all `data` events on this stream to the destination stream. The\n * destination stream should provide a method `push` to receive the data\n * events as they arrive.\n *\n * @param {Stream} destination the stream that will receive all `data` events\n * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n */;\n\n _proto.pipe = function pipe(destination) {\n this.on('data', function (data) {\n destination.push(data);\n });\n };\n return Stream;\n }();\n /*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */\n\n /**\n * Returns the subarray of a Uint8Array without PKCS#7 padding.\n *\n * @param padded {Uint8Array} unencrypted bytes that have been padded\n * @return {Uint8Array} the unpadded bytes\n * @see http://tools.ietf.org/html/rfc5652\n */\n\n function unpad(padded) {\n return padded.subarray(0, padded.byteLength - padded[padded.byteLength - 1]);\n }\n /*! @name aes-decrypter @version 4.0.1 @license Apache-2.0 */\n\n /**\n * @file aes.js\n *\n * This file contains an adaptation of the AES decryption algorithm\n * from the Standford Javascript Cryptography Library. That work is\n * covered by the following copyright and permissions notice:\n *\n * Copyright 2009-2010 Emily Stark, Mike Hamburg, Dan Boneh.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\n * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN\n * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation\n * are those of the authors and should not be interpreted as representing\n * official policies, either expressed or implied, of the authors.\n */\n\n /**\n * Expand the S-box tables.\n *\n * @private\n */\n\n const precompute = function () {\n const tables = [[[], [], [], [], []], [[], [], [], [], []]];\n const encTable = tables[0];\n const decTable = tables[1];\n const sbox = encTable[4];\n const sboxInv = decTable[4];\n let i;\n let x;\n let xInv;\n const d = [];\n const th = [];\n let x2;\n let x4;\n let x8;\n let s;\n let tEnc;\n let tDec; // Compute double and third tables\n\n for (i = 0; i < 256; i++) {\n th[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n }\n for (x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n // Compute sbox\n s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n s = s >> 8 ^ s & 255 ^ 99;\n sbox[x] = s;\n sboxInv[s] = x; // Compute MixColumns\n\n x8 = d[x4 = d[x2 = d[x]]];\n tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n tEnc = d[s] * 0x101 ^ s * 0x1010100;\n for (i = 0; i < 4; i++) {\n encTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n decTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n }\n } // Compactify. Considerable speedup on Firefox.\n\n for (i = 0; i < 5; i++) {\n encTable[i] = encTable[i].slice(0);\n decTable[i] = decTable[i].slice(0);\n }\n return tables;\n };\n let aesTables = null;\n /**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @class AES\n * @param key {Array} The key as an array of 4, 6 or 8 words.\n */\n\n class AES {\n constructor(key) {\n /**\n * The expanded S-box and inverse S-box tables. These will be computed\n * on the client so that we don't have to send them down the wire.\n *\n * There are two tables, _tables[0] is for encryption and\n * _tables[1] is for decryption.\n *\n * The first 4 sub-tables are the expanded S-box with MixColumns. The\n * last (_tables[01][4]) is the S-box itself.\n *\n * @private\n */\n // if we have yet to precompute the S-box tables\n // do so now\n if (!aesTables) {\n aesTables = precompute();\n } // then make a copy of that object for use\n\n this._tables = [[aesTables[0][0].slice(), aesTables[0][1].slice(), aesTables[0][2].slice(), aesTables[0][3].slice(), aesTables[0][4].slice()], [aesTables[1][0].slice(), aesTables[1][1].slice(), aesTables[1][2].slice(), aesTables[1][3].slice(), aesTables[1][4].slice()]];\n let i;\n let j;\n let tmp;\n const sbox = this._tables[0][4];\n const decTable = this._tables[1];\n const keyLen = key.length;\n let rcon = 1;\n if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n throw new Error('Invalid aes key size');\n }\n const encKey = key.slice(0);\n const decKey = [];\n this._key = [encKey, decKey]; // schedule encryption keys\n\n for (i = keyLen; i < 4 * keyLen + 28; i++) {\n tmp = encKey[i - 1]; // apply sbox\n\n if (i % keyLen === 0 || keyLen === 8 && i % keyLen === 4) {\n tmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255]; // shift rows and add rcon\n\n if (i % keyLen === 0) {\n tmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n rcon = rcon << 1 ^ (rcon >> 7) * 283;\n }\n }\n encKey[i] = encKey[i - keyLen] ^ tmp;\n } // schedule decryption keys\n\n for (j = 0; i; j++, i--) {\n tmp = encKey[j & 3 ? i : i - 4];\n if (i <= 4 || j < 4) {\n decKey[j] = tmp;\n } else {\n decKey[j] = decTable[0][sbox[tmp >>> 24]] ^ decTable[1][sbox[tmp >> 16 & 255]] ^ decTable[2][sbox[tmp >> 8 & 255]] ^ decTable[3][sbox[tmp & 255]];\n }\n }\n }\n /**\n * Decrypt 16 bytes, specified as four 32-bit words.\n *\n * @param {number} encrypted0 the first word to decrypt\n * @param {number} encrypted1 the second word to decrypt\n * @param {number} encrypted2 the third word to decrypt\n * @param {number} encrypted3 the fourth word to decrypt\n * @param {Int32Array} out the array to write the decrypted words\n * into\n * @param {number} offset the offset into the output array to start\n * writing results\n * @return {Array} The plaintext.\n */\n\n decrypt(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) {\n const key = this._key[1]; // state variables a,b,c,d are loaded with pre-whitened data\n\n let a = encrypted0 ^ key[0];\n let b = encrypted3 ^ key[1];\n let c = encrypted2 ^ key[2];\n let d = encrypted1 ^ key[3];\n let a2;\n let b2;\n let c2; // key.length === 2 ?\n\n const nInnerRounds = key.length / 4 - 2;\n let i;\n let kIndex = 4;\n const table = this._tables[1]; // load up the tables\n\n const table0 = table[0];\n const table1 = table[1];\n const table2 = table[2];\n const table3 = table[3];\n const sbox = table[4]; // Inner rounds. Cribbed from OpenSSL.\n\n for (i = 0; i < nInnerRounds; i++) {\n a2 = table0[a >>> 24] ^ table1[b >> 16 & 255] ^ table2[c >> 8 & 255] ^ table3[d & 255] ^ key[kIndex];\n b2 = table0[b >>> 24] ^ table1[c >> 16 & 255] ^ table2[d >> 8 & 255] ^ table3[a & 255] ^ key[kIndex + 1];\n c2 = table0[c >>> 24] ^ table1[d >> 16 & 255] ^ table2[a >> 8 & 255] ^ table3[b & 255] ^ key[kIndex + 2];\n d = table0[d >>> 24] ^ table1[a >> 16 & 255] ^ table2[b >> 8 & 255] ^ table3[c & 255] ^ key[kIndex + 3];\n kIndex += 4;\n a = a2;\n b = b2;\n c = c2;\n } // Last round.\n\n for (i = 0; i < 4; i++) {\n out[(3 & -i) + offset] = sbox[a >>> 24] << 24 ^ sbox[b >> 16 & 255] << 16 ^ sbox[c >> 8 & 255] << 8 ^ sbox[d & 255] ^ key[kIndex++];\n a2 = a;\n a = b;\n b = c;\n c = d;\n d = a2;\n }\n }\n }\n /**\n * @file async-stream.js\n */\n\n /**\n * A wrapper around the Stream class to use setTimeout\n * and run stream \"jobs\" Asynchronously\n *\n * @class AsyncStream\n * @extends Stream\n */\n\n class AsyncStream extends Stream {\n constructor() {\n super(Stream);\n this.jobs = [];\n this.delay = 1;\n this.timeout_ = null;\n }\n /**\n * process an async job\n *\n * @private\n */\n\n processJob_() {\n this.jobs.shift()();\n if (this.jobs.length) {\n this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\n } else {\n this.timeout_ = null;\n }\n }\n /**\n * push a job into the stream\n *\n * @param {Function} job the job to push into the stream\n */\n\n push(job) {\n this.jobs.push(job);\n if (!this.timeout_) {\n this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\n }\n }\n }\n /**\n * @file decrypter.js\n *\n * An asynchronous implementation of AES-128 CBC decryption with\n * PKCS#7 padding.\n */\n\n /**\n * Convert network-order (big-endian) bytes into their little-endian\n * representation.\n */\n\n const ntoh = function (word) {\n return word << 24 | (word & 0xff00) << 8 | (word & 0xff0000) >> 8 | word >>> 24;\n };\n /**\n * Decrypt bytes using AES-128 with CBC and PKCS#7 padding.\n *\n * @param {Uint8Array} encrypted the encrypted bytes\n * @param {Uint32Array} key the bytes of the decryption key\n * @param {Uint32Array} initVector the initialization vector (IV) to\n * use for the first round of CBC.\n * @return {Uint8Array} the decrypted bytes\n *\n * @see http://en.wikipedia.org/wiki/Advanced_Encryption_Standard\n * @see http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29\n * @see https://tools.ietf.org/html/rfc2315\n */\n\n const decrypt = function (encrypted, key, initVector) {\n // word-level access to the encrypted bytes\n const encrypted32 = new Int32Array(encrypted.buffer, encrypted.byteOffset, encrypted.byteLength >> 2);\n const decipher = new AES(Array.prototype.slice.call(key)); // byte and word-level access for the decrypted output\n\n const decrypted = new Uint8Array(encrypted.byteLength);\n const decrypted32 = new Int32Array(decrypted.buffer); // temporary variables for working with the IV, encrypted, and\n // decrypted data\n\n let init0;\n let init1;\n let init2;\n let init3;\n let encrypted0;\n let encrypted1;\n let encrypted2;\n let encrypted3; // iteration variable\n\n let wordIx; // pull out the words of the IV to ensure we don't modify the\n // passed-in reference and easier access\n\n init0 = initVector[0];\n init1 = initVector[1];\n init2 = initVector[2];\n init3 = initVector[3]; // decrypt four word sequences, applying cipher-block chaining (CBC)\n // to each decrypted block\n\n for (wordIx = 0; wordIx < encrypted32.length; wordIx += 4) {\n // convert big-endian (network order) words into little-endian\n // (javascript order)\n encrypted0 = ntoh(encrypted32[wordIx]);\n encrypted1 = ntoh(encrypted32[wordIx + 1]);\n encrypted2 = ntoh(encrypted32[wordIx + 2]);\n encrypted3 = ntoh(encrypted32[wordIx + 3]); // decrypt the block\n\n decipher.decrypt(encrypted0, encrypted1, encrypted2, encrypted3, decrypted32, wordIx); // XOR with the IV, and restore network byte-order to obtain the\n // plaintext\n\n decrypted32[wordIx] = ntoh(decrypted32[wordIx] ^ init0);\n decrypted32[wordIx + 1] = ntoh(decrypted32[wordIx + 1] ^ init1);\n decrypted32[wordIx + 2] = ntoh(decrypted32[wordIx + 2] ^ init2);\n decrypted32[wordIx + 3] = ntoh(decrypted32[wordIx + 3] ^ init3); // setup the IV for the next round\n\n init0 = encrypted0;\n init1 = encrypted1;\n init2 = encrypted2;\n init3 = encrypted3;\n }\n return decrypted;\n };\n /**\n * The `Decrypter` class that manages decryption of AES\n * data through `AsyncStream` objects and the `decrypt`\n * function\n *\n * @param {Uint8Array} encrypted the encrypted bytes\n * @param {Uint32Array} key the bytes of the decryption key\n * @param {Uint32Array} initVector the initialization vector (IV) to\n * @param {Function} done the function to run when done\n * @class Decrypter\n */\n\n class Decrypter {\n constructor(encrypted, key, initVector, done) {\n const step = Decrypter.STEP;\n const encrypted32 = new Int32Array(encrypted.buffer);\n const decrypted = new Uint8Array(encrypted.byteLength);\n let i = 0;\n this.asyncStream_ = new AsyncStream(); // split up the encryption job and do the individual chunks asynchronously\n\n this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\n for (i = step; i < encrypted32.length; i += step) {\n initVector = new Uint32Array([ntoh(encrypted32[i - 4]), ntoh(encrypted32[i - 3]), ntoh(encrypted32[i - 2]), ntoh(encrypted32[i - 1])]);\n this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\n } // invoke the done() callback when everything is finished\n\n this.asyncStream_.push(function () {\n // remove pkcs#7 padding from the decrypted bytes\n done(null, unpad(decrypted));\n });\n }\n /**\n * a getter for step the maximum number of bytes to process at one time\n *\n * @return {number} the value of step 32000\n */\n\n static get STEP() {\n // 4 * 8000;\n return 32000;\n }\n /**\n * @private\n */\n\n decryptChunk_(encrypted, key, initVector, decrypted) {\n return function () {\n const bytes = decrypt(encrypted, key, initVector);\n decrypted.set(bytes, encrypted.byteOffset);\n };\n }\n }\n var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n var win;\n if (typeof window !== \"undefined\") {\n win = window;\n } else if (typeof commonjsGlobal !== \"undefined\") {\n win = commonjsGlobal;\n } else if (typeof self !== \"undefined\") {\n win = self;\n } else {\n win = {};\n }\n var window_1 = win;\n var isArrayBufferView = function isArrayBufferView(obj) {\n if (ArrayBuffer.isView === 'function') {\n return ArrayBuffer.isView(obj);\n }\n return obj && obj.buffer instanceof ArrayBuffer;\n };\n var BigInt = window_1.BigInt || Number;\n [BigInt('0x1'), BigInt('0x100'), BigInt('0x10000'), BigInt('0x1000000'), BigInt('0x100000000'), BigInt('0x10000000000'), BigInt('0x1000000000000'), BigInt('0x100000000000000'), BigInt('0x10000000000000000')];\n (function () {\n var a = new Uint16Array([0xFFCC]);\n var b = new Uint8Array(a.buffer, a.byteOffset, a.byteLength);\n if (b[0] === 0xFF) {\n return 'big';\n }\n if (b[0] === 0xCC) {\n return 'little';\n }\n return 'unknown';\n })();\n /**\n * Creates an object for sending to a web worker modifying properties that are TypedArrays\n * into a new object with seperated properties for the buffer, byteOffset, and byteLength.\n *\n * @param {Object} message\n * Object of properties and values to send to the web worker\n * @return {Object}\n * Modified message with TypedArray values expanded\n * @function createTransferableMessage\n */\n\n const createTransferableMessage = function (message) {\n const transferable = {};\n Object.keys(message).forEach(key => {\n const value = message[key];\n if (isArrayBufferView(value)) {\n transferable[key] = {\n bytes: value.buffer,\n byteOffset: value.byteOffset,\n byteLength: value.byteLength\n };\n } else {\n transferable[key] = value;\n }\n });\n return transferable;\n };\n /* global self */\n\n /**\n * Our web worker interface so that things can talk to aes-decrypter\n * that will be running in a web worker. the scope is passed to this by\n * webworkify.\n */\n\n self.onmessage = function (event) {\n const data = event.data;\n const encrypted = new Uint8Array(data.encrypted.bytes, data.encrypted.byteOffset, data.encrypted.byteLength);\n const key = new Uint32Array(data.key.bytes, data.key.byteOffset, data.key.byteLength / 4);\n const iv = new Uint32Array(data.iv.bytes, data.iv.byteOffset, data.iv.byteLength / 4);\n /* eslint-disable no-new, handle-callback-err */\n\n new Decrypter(encrypted, key, iv, function (err, bytes) {\n self.postMessage(createTransferableMessage({\n source: data.source,\n decrypted: bytes\n }), [bytes.buffer]);\n });\n /* eslint-enable */\n };\n}));\n\nvar Decrypter = factory(workerCode);\n/* rollup-plugin-worker-factory end for worker!/home/runner/work/http-streaming/http-streaming/src/decrypter-worker.js */\n\n/**\n * Convert the properties of an HLS track into an audioTrackKind.\n *\n * @private\n */\n\nconst audioTrackKind_ = properties => {\n let kind = properties.default ? 'main' : 'alternative';\n if (properties.characteristics && properties.characteristics.indexOf('public.accessibility.describes-video') >= 0) {\n kind = 'main-desc';\n }\n return kind;\n};\n/**\n * Pause provided segment loader and playlist loader if active\n *\n * @param {SegmentLoader} segmentLoader\n * SegmentLoader to pause\n * @param {Object} mediaType\n * Active media type\n * @function stopLoaders\n */\n\nconst stopLoaders = (segmentLoader, mediaType) => {\n segmentLoader.abort();\n segmentLoader.pause();\n if (mediaType && mediaType.activePlaylistLoader) {\n mediaType.activePlaylistLoader.pause();\n mediaType.activePlaylistLoader = null;\n }\n};\n/**\n * Start loading provided segment loader and playlist loader\n *\n * @param {PlaylistLoader} playlistLoader\n * PlaylistLoader to start loading\n * @param {Object} mediaType\n * Active media type\n * @function startLoaders\n */\n\nconst startLoaders = (playlistLoader, mediaType) => {\n // Segment loader will be started after `loadedmetadata` or `loadedplaylist` from the\n // playlist loader\n mediaType.activePlaylistLoader = playlistLoader;\n playlistLoader.load();\n};\n/**\n * Returns a function to be called when the media group changes. It performs a\n * non-destructive (preserve the buffer) resync of the SegmentLoader. This is because a\n * change of group is merely a rendition switch of the same content at another encoding,\n * rather than a change of content, such as switching audio from English to Spanish.\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Handler for a non-destructive resync of SegmentLoader when the active media\n * group changes.\n * @function onGroupChanged\n */\n\nconst onGroupChanged = (type, settings) => () => {\n const {\n segmentLoaders: {\n [type]: segmentLoader,\n main: mainSegmentLoader\n },\n mediaTypes: {\n [type]: mediaType\n }\n } = settings;\n const activeTrack = mediaType.activeTrack();\n const activeGroup = mediaType.getActiveGroup();\n const previousActiveLoader = mediaType.activePlaylistLoader;\n const lastGroup = mediaType.lastGroup_; // the group did not change do nothing\n\n if (activeGroup && lastGroup && activeGroup.id === lastGroup.id) {\n return;\n }\n mediaType.lastGroup_ = activeGroup;\n mediaType.lastTrack_ = activeTrack;\n stopLoaders(segmentLoader, mediaType);\n if (!activeGroup || activeGroup.isMainPlaylist) {\n // there is no group active or active group is a main playlist and won't change\n return;\n }\n if (!activeGroup.playlistLoader) {\n if (previousActiveLoader) {\n // The previous group had a playlist loader but the new active group does not\n // this means we are switching from demuxed to muxed audio. In this case we want to\n // do a destructive reset of the main segment loader and not restart the audio\n // loaders.\n mainSegmentLoader.resetEverything();\n }\n return;\n } // Non-destructive resync\n\n segmentLoader.resyncLoader();\n startLoaders(activeGroup.playlistLoader, mediaType);\n};\nconst onGroupChanging = (type, settings) => () => {\n const {\n segmentLoaders: {\n [type]: segmentLoader\n },\n mediaTypes: {\n [type]: mediaType\n }\n } = settings;\n mediaType.lastGroup_ = null;\n segmentLoader.abort();\n segmentLoader.pause();\n};\n/**\n * Returns a function to be called when the media track changes. It performs a\n * destructive reset of the SegmentLoader to ensure we start loading as close to\n * currentTime as possible.\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Handler for a destructive reset of SegmentLoader when the active media\n * track changes.\n * @function onTrackChanged\n */\n\nconst onTrackChanged = (type, settings) => () => {\n const {\n mainPlaylistLoader,\n segmentLoaders: {\n [type]: segmentLoader,\n main: mainSegmentLoader\n },\n mediaTypes: {\n [type]: mediaType\n }\n } = settings;\n const activeTrack = mediaType.activeTrack();\n const activeGroup = mediaType.getActiveGroup();\n const previousActiveLoader = mediaType.activePlaylistLoader;\n const lastTrack = mediaType.lastTrack_; // track did not change, do nothing\n\n if (lastTrack && activeTrack && lastTrack.id === activeTrack.id) {\n return;\n }\n mediaType.lastGroup_ = activeGroup;\n mediaType.lastTrack_ = activeTrack;\n stopLoaders(segmentLoader, mediaType);\n if (!activeGroup) {\n // there is no group active so we do not want to restart loaders\n return;\n }\n if (activeGroup.isMainPlaylist) {\n // track did not change, do nothing\n if (!activeTrack || !lastTrack || activeTrack.id === lastTrack.id) {\n return;\n }\n const pc = settings.vhs.playlistController_;\n const newPlaylist = pc.selectPlaylist(); // media will not change do nothing\n\n if (pc.media() === newPlaylist) {\n return;\n }\n mediaType.logger_(`track change. Switching main audio from ${lastTrack.id} to ${activeTrack.id}`);\n mainPlaylistLoader.pause();\n mainSegmentLoader.resetEverything();\n pc.fastQualityChange_(newPlaylist);\n return;\n }\n if (type === 'AUDIO') {\n if (!activeGroup.playlistLoader) {\n // when switching from demuxed audio/video to muxed audio/video (noted by no\n // playlist loader for the audio group), we want to do a destructive reset of the\n // main segment loader and not restart the audio loaders\n mainSegmentLoader.setAudio(true); // don't have to worry about disabling the audio of the audio segment loader since\n // it should be stopped\n\n mainSegmentLoader.resetEverything();\n return;\n } // although the segment loader is an audio segment loader, call the setAudio\n // function to ensure it is prepared to re-append the init segment (or handle other\n // config changes)\n\n segmentLoader.setAudio(true);\n mainSegmentLoader.setAudio(false);\n }\n if (previousActiveLoader === activeGroup.playlistLoader) {\n // Nothing has actually changed. This can happen because track change events can fire\n // multiple times for a \"single\" change. One for enabling the new active track, and\n // one for disabling the track that was active\n startLoaders(activeGroup.playlistLoader, mediaType);\n return;\n }\n if (segmentLoader.track) {\n // For WebVTT, set the new text track in the segmentloader\n segmentLoader.track(activeTrack);\n } // destructive reset\n\n segmentLoader.resetEverything();\n startLoaders(activeGroup.playlistLoader, mediaType);\n};\nconst onError = {\n /**\n * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters\n * an error.\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Error handler. Logs warning (or error if the playlist is excluded) to\n * console and switches back to default audio track.\n * @function onError.AUDIO\n */\n AUDIO: (type, settings) => () => {\n const {\n mediaTypes: {\n [type]: mediaType\n },\n excludePlaylist\n } = settings; // switch back to default audio track\n\n const activeTrack = mediaType.activeTrack();\n const activeGroup = mediaType.activeGroup();\n const id = (activeGroup.filter(group => group.default)[0] || activeGroup[0]).id;\n const defaultTrack = mediaType.tracks[id];\n if (activeTrack === defaultTrack) {\n // Default track encountered an error. All we can do now is exclude the current\n // rendition and hope another will switch audio groups\n excludePlaylist({\n error: {\n message: 'Problem encountered loading the default audio track.'\n }\n });\n return;\n }\n videojs.log.warn('Problem encountered loading the alternate audio track.' + 'Switching back to default.');\n for (const trackId in mediaType.tracks) {\n mediaType.tracks[trackId].enabled = mediaType.tracks[trackId] === defaultTrack;\n }\n mediaType.onTrackChanged();\n },\n /**\n * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters\n * an error.\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Error handler. Logs warning to console and disables the active subtitle track\n * @function onError.SUBTITLES\n */\n SUBTITLES: (type, settings) => () => {\n const {\n mediaTypes: {\n [type]: mediaType\n }\n } = settings;\n videojs.log.warn('Problem encountered loading the subtitle track.' + 'Disabling subtitle track.');\n const track = mediaType.activeTrack();\n if (track) {\n track.mode = 'disabled';\n }\n mediaType.onTrackChanged();\n }\n};\nconst setupListeners = {\n /**\n * Setup event listeners for audio playlist loader\n *\n * @param {string} type\n * MediaGroup type\n * @param {PlaylistLoader|null} playlistLoader\n * PlaylistLoader to register listeners on\n * @param {Object} settings\n * Object containing required information for media groups\n * @function setupListeners.AUDIO\n */\n AUDIO: (type, playlistLoader, settings) => {\n if (!playlistLoader) {\n // no playlist loader means audio will be muxed with the video\n return;\n }\n const {\n tech,\n requestOptions,\n segmentLoaders: {\n [type]: segmentLoader\n }\n } = settings;\n playlistLoader.on('loadedmetadata', () => {\n const media = playlistLoader.media();\n segmentLoader.playlist(media, requestOptions); // if the video is already playing, or if this isn't a live video and preload\n // permits, start downloading segments\n\n if (!tech.paused() || media.endList && tech.preload() !== 'none') {\n segmentLoader.load();\n }\n });\n playlistLoader.on('loadedplaylist', () => {\n segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running\n\n if (!tech.paused()) {\n segmentLoader.load();\n }\n });\n playlistLoader.on('error', onError[type](type, settings));\n },\n /**\n * Setup event listeners for subtitle playlist loader\n *\n * @param {string} type\n * MediaGroup type\n * @param {PlaylistLoader|null} playlistLoader\n * PlaylistLoader to register listeners on\n * @param {Object} settings\n * Object containing required information for media groups\n * @function setupListeners.SUBTITLES\n */\n SUBTITLES: (type, playlistLoader, settings) => {\n const {\n tech,\n requestOptions,\n segmentLoaders: {\n [type]: segmentLoader\n },\n mediaTypes: {\n [type]: mediaType\n }\n } = settings;\n playlistLoader.on('loadedmetadata', () => {\n const media = playlistLoader.media();\n segmentLoader.playlist(media, requestOptions);\n segmentLoader.track(mediaType.activeTrack()); // if the video is already playing, or if this isn't a live video and preload\n // permits, start downloading segments\n\n if (!tech.paused() || media.endList && tech.preload() !== 'none') {\n segmentLoader.load();\n }\n });\n playlistLoader.on('loadedplaylist', () => {\n segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running\n\n if (!tech.paused()) {\n segmentLoader.load();\n }\n });\n playlistLoader.on('error', onError[type](type, settings));\n }\n};\nconst initialize = {\n /**\n * Setup PlaylistLoaders and AudioTracks for the audio groups\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @function initialize.AUDIO\n */\n 'AUDIO': (type, settings) => {\n const {\n vhs,\n sourceType,\n segmentLoaders: {\n [type]: segmentLoader\n },\n requestOptions,\n main: {\n mediaGroups\n },\n mediaTypes: {\n [type]: {\n groups,\n tracks,\n logger_\n }\n },\n mainPlaylistLoader\n } = settings;\n const audioOnlyMain = isAudioOnly(mainPlaylistLoader.main); // force a default if we have none\n\n if (!mediaGroups[type] || Object.keys(mediaGroups[type]).length === 0) {\n mediaGroups[type] = {\n main: {\n default: {\n default: true\n }\n }\n };\n if (audioOnlyMain) {\n mediaGroups[type].main.default.playlists = mainPlaylistLoader.main.playlists;\n }\n }\n for (const groupId in mediaGroups[type]) {\n if (!groups[groupId]) {\n groups[groupId] = [];\n }\n for (const variantLabel in mediaGroups[type][groupId]) {\n let properties = mediaGroups[type][groupId][variantLabel];\n let playlistLoader;\n if (audioOnlyMain) {\n logger_(`AUDIO group '${groupId}' label '${variantLabel}' is a main playlist`);\n properties.isMainPlaylist = true;\n playlistLoader = null; // if vhs-json was provided as the source, and the media playlist was resolved,\n // use the resolved media playlist object\n } else if (sourceType === 'vhs-json' && properties.playlists) {\n playlistLoader = new PlaylistLoader(properties.playlists[0], vhs, requestOptions);\n } else if (properties.resolvedUri) {\n playlistLoader = new PlaylistLoader(properties.resolvedUri, vhs, requestOptions); // TODO: dash isn't the only type with properties.playlists\n // should we even have properties.playlists in this check.\n } else if (properties.playlists && sourceType === 'dash') {\n playlistLoader = new DashPlaylistLoader(properties.playlists[0], vhs, requestOptions, mainPlaylistLoader);\n } else {\n // no resolvedUri means the audio is muxed with the video when using this\n // audio track\n playlistLoader = null;\n }\n properties = merge({\n id: variantLabel,\n playlistLoader\n }, properties);\n setupListeners[type](type, properties.playlistLoader, settings);\n groups[groupId].push(properties);\n if (typeof tracks[variantLabel] === 'undefined') {\n const track = new videojs.AudioTrack({\n id: variantLabel,\n kind: audioTrackKind_(properties),\n enabled: false,\n language: properties.language,\n default: properties.default,\n label: variantLabel\n });\n tracks[variantLabel] = track;\n }\n }\n } // setup single error event handler for the segment loader\n\n segmentLoader.on('error', onError[type](type, settings));\n },\n /**\n * Setup PlaylistLoaders and TextTracks for the subtitle groups\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @function initialize.SUBTITLES\n */\n 'SUBTITLES': (type, settings) => {\n const {\n tech,\n vhs,\n sourceType,\n segmentLoaders: {\n [type]: segmentLoader\n },\n requestOptions,\n main: {\n mediaGroups\n },\n mediaTypes: {\n [type]: {\n groups,\n tracks\n }\n },\n mainPlaylistLoader\n } = settings;\n for (const groupId in mediaGroups[type]) {\n if (!groups[groupId]) {\n groups[groupId] = [];\n }\n for (const variantLabel in mediaGroups[type][groupId]) {\n if (!vhs.options_.useForcedSubtitles && mediaGroups[type][groupId][variantLabel].forced) {\n // Subtitle playlists with the forced attribute are not selectable in Safari.\n // According to Apple's HLS Authoring Specification:\n // If content has forced subtitles and regular subtitles in a given language,\n // the regular subtitles track in that language MUST contain both the forced\n // subtitles and the regular subtitles for that language.\n // Because of this requirement and that Safari does not add forced subtitles,\n // forced subtitles are skipped here to maintain consistent experience across\n // all platforms\n continue;\n }\n let properties = mediaGroups[type][groupId][variantLabel];\n let playlistLoader;\n if (sourceType === 'hls') {\n playlistLoader = new PlaylistLoader(properties.resolvedUri, vhs, requestOptions);\n } else if (sourceType === 'dash') {\n const playlists = properties.playlists.filter(p => p.excludeUntil !== Infinity);\n if (!playlists.length) {\n return;\n }\n playlistLoader = new DashPlaylistLoader(properties.playlists[0], vhs, requestOptions, mainPlaylistLoader);\n } else if (sourceType === 'vhs-json') {\n playlistLoader = new PlaylistLoader(\n // if the vhs-json object included the media playlist, use the media playlist\n // as provided, otherwise use the resolved URI to load the playlist\n properties.playlists ? properties.playlists[0] : properties.resolvedUri, vhs, requestOptions);\n }\n properties = merge({\n id: variantLabel,\n playlistLoader\n }, properties);\n setupListeners[type](type, properties.playlistLoader, settings);\n groups[groupId].push(properties);\n if (typeof tracks[variantLabel] === 'undefined') {\n const track = tech.addRemoteTextTrack({\n id: variantLabel,\n kind: 'subtitles',\n default: properties.default && properties.autoselect,\n language: properties.language,\n label: variantLabel\n }, false).track;\n tracks[variantLabel] = track;\n }\n }\n } // setup single error event handler for the segment loader\n\n segmentLoader.on('error', onError[type](type, settings));\n },\n /**\n * Setup TextTracks for the closed-caption groups\n *\n * @param {String} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @function initialize['CLOSED-CAPTIONS']\n */\n 'CLOSED-CAPTIONS': (type, settings) => {\n const {\n tech,\n main: {\n mediaGroups\n },\n mediaTypes: {\n [type]: {\n groups,\n tracks\n }\n }\n } = settings;\n for (const groupId in mediaGroups[type]) {\n if (!groups[groupId]) {\n groups[groupId] = [];\n }\n for (const variantLabel in mediaGroups[type][groupId]) {\n const properties = mediaGroups[type][groupId][variantLabel]; // Look for either 608 (CCn) or 708 (SERVICEn) caption services\n\n if (!/^(?:CC|SERVICE)/.test(properties.instreamId)) {\n continue;\n }\n const captionServices = tech.options_.vhs && tech.options_.vhs.captionServices || {};\n let newProps = {\n label: variantLabel,\n language: properties.language,\n instreamId: properties.instreamId,\n default: properties.default && properties.autoselect\n };\n if (captionServices[newProps.instreamId]) {\n newProps = merge(newProps, captionServices[newProps.instreamId]);\n }\n if (newProps.default === undefined) {\n delete newProps.default;\n } // No PlaylistLoader is required for Closed-Captions because the captions are\n // embedded within the video stream\n\n groups[groupId].push(merge({\n id: variantLabel\n }, properties));\n if (typeof tracks[variantLabel] === 'undefined') {\n const track = tech.addRemoteTextTrack({\n id: newProps.instreamId,\n kind: 'captions',\n default: newProps.default,\n language: newProps.language,\n label: newProps.label\n }, false).track;\n tracks[variantLabel] = track;\n }\n }\n }\n }\n};\nconst groupMatch = (list, media) => {\n for (let i = 0; i < list.length; i++) {\n if (playlistMatch(media, list[i])) {\n return true;\n }\n if (list[i].playlists && groupMatch(list[i].playlists, media)) {\n return true;\n }\n }\n return false;\n};\n/**\n * Returns a function used to get the active group of the provided type\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Function that returns the active media group for the provided type. Takes an\n * optional parameter {TextTrack} track. If no track is provided, a list of all\n * variants in the group, otherwise the variant corresponding to the provided\n * track is returned.\n * @function activeGroup\n */\n\nconst activeGroup = (type, settings) => track => {\n const {\n mainPlaylistLoader,\n mediaTypes: {\n [type]: {\n groups\n }\n }\n } = settings;\n const media = mainPlaylistLoader.media();\n if (!media) {\n return null;\n }\n let variants = null; // set to variants to main media active group\n\n if (media.attributes[type]) {\n variants = groups[media.attributes[type]];\n }\n const groupKeys = Object.keys(groups);\n if (!variants) {\n // find the mainPlaylistLoader media\n // that is in a media group if we are dealing\n // with audio only\n if (type === 'AUDIO' && groupKeys.length > 1 && isAudioOnly(settings.main)) {\n for (let i = 0; i < groupKeys.length; i++) {\n const groupPropertyList = groups[groupKeys[i]];\n if (groupMatch(groupPropertyList, media)) {\n variants = groupPropertyList;\n break;\n }\n } // use the main group if it exists\n } else if (groups.main) {\n variants = groups.main; // only one group, use that one\n } else if (groupKeys.length === 1) {\n variants = groups[groupKeys[0]];\n }\n }\n if (typeof track === 'undefined') {\n return variants;\n }\n if (track === null || !variants) {\n // An active track was specified so a corresponding group is expected. track === null\n // means no track is currently active so there is no corresponding group\n return null;\n }\n return variants.filter(props => props.id === track.id)[0] || null;\n};\nconst activeTrack = {\n /**\n * Returns a function used to get the active track of type provided\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Function that returns the active media track for the provided type. Returns\n * null if no track is active\n * @function activeTrack.AUDIO\n */\n AUDIO: (type, settings) => () => {\n const {\n mediaTypes: {\n [type]: {\n tracks\n }\n }\n } = settings;\n for (const id in tracks) {\n if (tracks[id].enabled) {\n return tracks[id];\n }\n }\n return null;\n },\n /**\n * Returns a function used to get the active track of type provided\n *\n * @param {string} type\n * MediaGroup type\n * @param {Object} settings\n * Object containing required information for media groups\n * @return {Function}\n * Function that returns the active media track for the provided type. Returns\n * null if no track is active\n * @function activeTrack.SUBTITLES\n */\n SUBTITLES: (type, settings) => () => {\n const {\n mediaTypes: {\n [type]: {\n tracks\n }\n }\n } = settings;\n for (const id in tracks) {\n if (tracks[id].mode === 'showing' || tracks[id].mode === 'hidden') {\n return tracks[id];\n }\n }\n return null;\n }\n};\nconst getActiveGroup = (type, {\n mediaTypes\n}) => () => {\n const activeTrack_ = mediaTypes[type].activeTrack();\n if (!activeTrack_) {\n return null;\n }\n return mediaTypes[type].activeGroup(activeTrack_);\n};\n/**\n * Setup PlaylistLoaders and Tracks for media groups (Audio, Subtitles,\n * Closed-Captions) specified in the main manifest.\n *\n * @param {Object} settings\n * Object containing required information for setting up the media groups\n * @param {Tech} settings.tech\n * The tech of the player\n * @param {Object} settings.requestOptions\n * XHR request options used by the segment loaders\n * @param {PlaylistLoader} settings.mainPlaylistLoader\n * PlaylistLoader for the main source\n * @param {VhsHandler} settings.vhs\n * VHS SourceHandler\n * @param {Object} settings.main\n * The parsed main manifest\n * @param {Object} settings.mediaTypes\n * Object to store the loaders, tracks, and utility methods for each media type\n * @param {Function} settings.excludePlaylist\n * Excludes the current rendition and forces a rendition switch.\n * @function setupMediaGroups\n */\n\nconst setupMediaGroups = settings => {\n ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n initialize[type](type, settings);\n });\n const {\n mediaTypes,\n mainPlaylistLoader,\n tech,\n vhs,\n segmentLoaders: {\n ['AUDIO']: audioSegmentLoader,\n main: mainSegmentLoader\n }\n } = settings; // setup active group and track getters and change event handlers\n\n ['AUDIO', 'SUBTITLES'].forEach(type => {\n mediaTypes[type].activeGroup = activeGroup(type, settings);\n mediaTypes[type].activeTrack = activeTrack[type](type, settings);\n mediaTypes[type].onGroupChanged = onGroupChanged(type, settings);\n mediaTypes[type].onGroupChanging = onGroupChanging(type, settings);\n mediaTypes[type].onTrackChanged = onTrackChanged(type, settings);\n mediaTypes[type].getActiveGroup = getActiveGroup(type, settings);\n }); // DO NOT enable the default subtitle or caption track.\n // DO enable the default audio track\n\n const audioGroup = mediaTypes.AUDIO.activeGroup();\n if (audioGroup) {\n const groupId = (audioGroup.filter(group => group.default)[0] || audioGroup[0]).id;\n mediaTypes.AUDIO.tracks[groupId].enabled = true;\n mediaTypes.AUDIO.onGroupChanged();\n mediaTypes.AUDIO.onTrackChanged();\n const activeAudioGroup = mediaTypes.AUDIO.getActiveGroup(); // a similar check for handling setAudio on each loader is run again each time the\n // track is changed, but needs to be handled here since the track may not be considered\n // changed on the first call to onTrackChanged\n\n if (!activeAudioGroup.playlistLoader) {\n // either audio is muxed with video or the stream is audio only\n mainSegmentLoader.setAudio(true);\n } else {\n // audio is demuxed\n mainSegmentLoader.setAudio(false);\n audioSegmentLoader.setAudio(true);\n }\n }\n mainPlaylistLoader.on('mediachange', () => {\n ['AUDIO', 'SUBTITLES'].forEach(type => mediaTypes[type].onGroupChanged());\n });\n mainPlaylistLoader.on('mediachanging', () => {\n ['AUDIO', 'SUBTITLES'].forEach(type => mediaTypes[type].onGroupChanging());\n }); // custom audio track change event handler for usage event\n\n const onAudioTrackChanged = () => {\n mediaTypes.AUDIO.onTrackChanged();\n tech.trigger({\n type: 'usage',\n name: 'vhs-audio-change'\n });\n };\n tech.audioTracks().addEventListener('change', onAudioTrackChanged);\n tech.remoteTextTracks().addEventListener('change', mediaTypes.SUBTITLES.onTrackChanged);\n vhs.on('dispose', () => {\n tech.audioTracks().removeEventListener('change', onAudioTrackChanged);\n tech.remoteTextTracks().removeEventListener('change', mediaTypes.SUBTITLES.onTrackChanged);\n }); // clear existing audio tracks and add the ones we just created\n\n tech.clearTracks('audio');\n for (const id in mediaTypes.AUDIO.tracks) {\n tech.audioTracks().addTrack(mediaTypes.AUDIO.tracks[id]);\n }\n};\n/**\n * Creates skeleton object used to store the loaders, tracks, and utility methods for each\n * media type\n *\n * @return {Object}\n * Object to store the loaders, tracks, and utility methods for each media type\n * @function createMediaTypes\n */\n\nconst createMediaTypes = () => {\n const mediaTypes = {};\n ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n mediaTypes[type] = {\n groups: {},\n tracks: {},\n activePlaylistLoader: null,\n activeGroup: noop,\n activeTrack: noop,\n getActiveGroup: noop,\n onGroupChanged: noop,\n onTrackChanged: noop,\n lastTrack_: null,\n logger_: logger(`MediaGroups[${type}]`)\n };\n });\n return mediaTypes;\n};\n\n/**\n * A utility class for setting properties and maintaining the state of the content steering manifest.\n *\n * Content Steering manifest format:\n * VERSION: number (required) currently only version 1 is supported.\n * TTL: number in seconds (optional) until the next content steering manifest reload.\n * RELOAD-URI: string (optional) uri to fetch the next content steering manifest.\n * SERVICE-LOCATION-PRIORITY or PATHWAY-PRIORITY a non empty array of unique string values.\n * PATHWAY-CLONES: array (optional) (HLS only) pathway clone objects to copy from other playlists.\n */\n\nclass SteeringManifest {\n constructor() {\n this.priority_ = [];\n this.pathwayClones_ = new Map();\n }\n set version(number) {\n // Only version 1 is currently supported for both DASH and HLS.\n if (number === 1) {\n this.version_ = number;\n }\n }\n set ttl(seconds) {\n // TTL = time-to-live, default = 300 seconds.\n this.ttl_ = seconds || 300;\n }\n set reloadUri(uri) {\n if (uri) {\n // reload URI can be relative to the previous reloadUri.\n this.reloadUri_ = resolveUrl(this.reloadUri_, uri);\n }\n }\n set priority(array) {\n // priority must be non-empty and unique values.\n if (array && array.length) {\n this.priority_ = array;\n }\n }\n set pathwayClones(array) {\n // pathwayClones must be non-empty.\n if (array && array.length) {\n this.pathwayClones_ = new Map(array.map(clone => [clone.ID, clone]));\n }\n }\n get version() {\n return this.version_;\n }\n get ttl() {\n return this.ttl_;\n }\n get reloadUri() {\n return this.reloadUri_;\n }\n get priority() {\n return this.priority_;\n }\n get pathwayClones() {\n return this.pathwayClones_;\n }\n}\n/**\n * This class represents a content steering manifest and associated state. See both HLS and DASH specifications.\n * HLS: https://developer.apple.com/streaming/HLSContentSteeringSpecification.pdf and\n * https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/ section 4.4.6.6.\n * DASH: https://dashif.org/docs/DASH-IF-CTS-00XX-Content-Steering-Community-Review.pdf\n *\n * @param {function} xhr for making a network request from the browser.\n * @param {function} bandwidth for fetching the current bandwidth from the main segment loader.\n */\n\nclass ContentSteeringController extends videojs.EventTarget {\n constructor(xhr, bandwidth) {\n super();\n this.currentPathway = null;\n this.defaultPathway = null;\n this.queryBeforeStart = false;\n this.availablePathways_ = new Set();\n this.steeringManifest = new SteeringManifest();\n this.proxyServerUrl_ = null;\n this.manifestType_ = null;\n this.ttlTimeout_ = null;\n this.request_ = null;\n this.currentPathwayClones = new Map();\n this.nextPathwayClones = new Map();\n this.excludedSteeringManifestURLs = new Set();\n this.logger_ = logger('Content Steering');\n this.xhr_ = xhr;\n this.getBandwidth_ = bandwidth;\n }\n /**\n * Assigns the content steering tag properties to the steering controller\n *\n * @param {string} baseUrl the baseURL from the main manifest for resolving the steering manifest url\n * @param {Object} steeringTag the content steering tag from the main manifest\n */\n\n assignTagProperties(baseUrl, steeringTag) {\n this.manifestType_ = steeringTag.serverUri ? 'HLS' : 'DASH'; // serverUri is HLS serverURL is DASH\n\n const steeringUri = steeringTag.serverUri || steeringTag.serverURL;\n if (!steeringUri) {\n this.logger_(`steering manifest URL is ${steeringUri}, cannot request steering manifest.`);\n this.trigger('error');\n return;\n } // Content steering manifests can be encoded as a data URI. We can decode, parse and return early if that's the case.\n\n if (steeringUri.startsWith('data:')) {\n this.decodeDataUriManifest_(steeringUri.substring(steeringUri.indexOf(',') + 1));\n return;\n } // reloadUri is the resolution of the main manifest URL and steering URL.\n\n this.steeringManifest.reloadUri = resolveUrl(baseUrl, steeringUri); // pathwayId is HLS defaultServiceLocation is DASH\n\n this.defaultPathway = steeringTag.pathwayId || steeringTag.defaultServiceLocation; // currently only DASH supports the following properties on tags.\n\n this.queryBeforeStart = steeringTag.queryBeforeStart;\n this.proxyServerUrl_ = steeringTag.proxyServerURL; // trigger a steering event if we have a pathway from the content steering tag.\n // this tells VHS which segment pathway to start with.\n // If queryBeforeStart is true we need to wait for the steering manifest response.\n\n if (this.defaultPathway && !this.queryBeforeStart) {\n this.trigger('content-steering');\n }\n }\n /**\n * Requests the content steering manifest and parse the response. This should only be called after\n * assignTagProperties was called with a content steering tag.\n *\n * @param {string} initialUri The optional uri to make the request with.\n * If set, the request should be made with exactly what is passed in this variable.\n * This scenario should only happen once on initalization.\n */\n\n requestSteeringManifest(initial) {\n const reloadUri = this.steeringManifest.reloadUri;\n if (!reloadUri) {\n return;\n } // We currently don't support passing MPD query parameters directly to the content steering URL as this requires\n // ExtUrlQueryInfo tag support. See the DASH content steering spec section 8.1.\n // This request URI accounts for manifest URIs that have been excluded.\n\n const uri = initial ? reloadUri : this.getRequestURI(reloadUri); // If there are no valid manifest URIs, we should stop content steering.\n\n if (!uri) {\n this.logger_('No valid content steering manifest URIs. Stopping content steering.');\n this.trigger('error');\n this.dispose();\n return;\n }\n this.request_ = this.xhr_({\n uri,\n requestType: 'content-steering-manifest'\n }, (error, errorInfo) => {\n if (error) {\n // If the client receives HTTP 410 Gone in response to a manifest request,\n // it MUST NOT issue another request for that URI for the remainder of the\n // playback session. It MAY continue to use the most-recently obtained set\n // of Pathways.\n if (errorInfo.status === 410) {\n this.logger_(`manifest request 410 ${error}.`);\n this.logger_(`There will be no more content steering requests to ${uri} this session.`);\n this.excludedSteeringManifestURLs.add(uri);\n return;\n } // If the client receives HTTP 429 Too Many Requests with a Retry-After\n // header in response to a manifest request, it SHOULD wait until the time\n // specified by the Retry-After header to reissue the request.\n\n if (errorInfo.status === 429) {\n const retrySeconds = errorInfo.responseHeaders['retry-after'];\n this.logger_(`manifest request 429 ${error}.`);\n this.logger_(`content steering will retry in ${retrySeconds} seconds.`);\n this.startTTLTimeout_(parseInt(retrySeconds, 10));\n return;\n } // If the Steering Manifest cannot be loaded and parsed correctly, the\n // client SHOULD continue to use the previous values and attempt to reload\n // it after waiting for the previously-specified TTL (or 5 minutes if\n // none).\n\n this.logger_(`manifest failed to load ${error}.`);\n this.startTTLTimeout_();\n return;\n }\n const steeringManifestJson = JSON.parse(this.request_.responseText);\n this.assignSteeringProperties_(steeringManifestJson);\n this.startTTLTimeout_();\n });\n }\n /**\n * Set the proxy server URL and add the steering manifest url as a URI encoded parameter.\n *\n * @param {string} steeringUrl the steering manifest url\n * @return the steering manifest url to a proxy server with all parameters set\n */\n\n setProxyServerUrl_(steeringUrl) {\n const steeringUrlObject = new window$1.URL(steeringUrl);\n const proxyServerUrlObject = new window$1.URL(this.proxyServerUrl_);\n proxyServerUrlObject.searchParams.set('url', encodeURI(steeringUrlObject.toString()));\n return this.setSteeringParams_(proxyServerUrlObject.toString());\n }\n /**\n * Decodes and parses the data uri encoded steering manifest\n *\n * @param {string} dataUri the data uri to be decoded and parsed.\n */\n\n decodeDataUriManifest_(dataUri) {\n const steeringManifestJson = JSON.parse(window$1.atob(dataUri));\n this.assignSteeringProperties_(steeringManifestJson);\n }\n /**\n * Set the HLS or DASH content steering manifest request query parameters. For example:\n * _HLS_pathway=\"\" and _HLS_throughput=\n * _DASH_pathway and _DASH_throughput\n *\n * @param {string} uri to add content steering server parameters to.\n * @return a new uri as a string with the added steering query parameters.\n */\n\n setSteeringParams_(url) {\n const urlObject = new window$1.URL(url);\n const path = this.getPathway();\n const networkThroughput = this.getBandwidth_();\n if (path) {\n const pathwayKey = `_${this.manifestType_}_pathway`;\n urlObject.searchParams.set(pathwayKey, path);\n }\n if (networkThroughput) {\n const throughputKey = `_${this.manifestType_}_throughput`;\n urlObject.searchParams.set(throughputKey, networkThroughput);\n }\n return urlObject.toString();\n }\n /**\n * Assigns the current steering manifest properties and to the SteeringManifest object\n *\n * @param {Object} steeringJson the raw JSON steering manifest\n */\n\n assignSteeringProperties_(steeringJson) {\n this.steeringManifest.version = steeringJson.VERSION;\n if (!this.steeringManifest.version) {\n this.logger_(`manifest version is ${steeringJson.VERSION}, which is not supported.`);\n this.trigger('error');\n return;\n }\n this.steeringManifest.ttl = steeringJson.TTL;\n this.steeringManifest.reloadUri = steeringJson['RELOAD-URI']; // HLS = PATHWAY-PRIORITY required. DASH = SERVICE-LOCATION-PRIORITY optional\n\n this.steeringManifest.priority = steeringJson['PATHWAY-PRIORITY'] || steeringJson['SERVICE-LOCATION-PRIORITY']; // Pathway clones to be created/updated in HLS.\n // See section 7.2 https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/\n\n this.steeringManifest.pathwayClones = steeringJson['PATHWAY-CLONES'];\n this.nextPathwayClones = this.steeringManifest.pathwayClones; // 1. apply first pathway from the array.\n // 2. if first pathway doesn't exist in manifest, try next pathway.\n // a. if all pathways are exhausted, ignore the steering manifest priority.\n // 3. if segments fail from an established pathway, try all variants/renditions, then exclude the failed pathway.\n // a. exclude a pathway for a minimum of the last TTL duration. Meaning, from the next steering response,\n // the excluded pathway will be ignored.\n // See excludePathway usage in excludePlaylist().\n // If there are no available pathways, we need to stop content steering.\n\n if (!this.availablePathways_.size) {\n this.logger_('There are no available pathways for content steering. Ending content steering.');\n this.trigger('error');\n this.dispose();\n }\n const chooseNextPathway = pathwaysByPriority => {\n for (const path of pathwaysByPriority) {\n if (this.availablePathways_.has(path)) {\n return path;\n }\n } // If no pathway matches, ignore the manifest and choose the first available.\n\n return [...this.availablePathways_][0];\n };\n const nextPathway = chooseNextPathway(this.steeringManifest.priority);\n if (this.currentPathway !== nextPathway) {\n this.currentPathway = nextPathway;\n this.trigger('content-steering');\n }\n }\n /**\n * Returns the pathway to use for steering decisions\n *\n * @return {string} returns the current pathway or the default\n */\n\n getPathway() {\n return this.currentPathway || this.defaultPathway;\n }\n /**\n * Chooses the manifest request URI based on proxy URIs and server URLs.\n * Also accounts for exclusion on certain manifest URIs.\n *\n * @param {string} reloadUri the base uri before parameters\n *\n * @return {string} the final URI for the request to the manifest server.\n */\n\n getRequestURI(reloadUri) {\n if (!reloadUri) {\n return null;\n }\n const isExcluded = uri => this.excludedSteeringManifestURLs.has(uri);\n if (this.proxyServerUrl_) {\n const proxyURI = this.setProxyServerUrl_(reloadUri);\n if (!isExcluded(proxyURI)) {\n return proxyURI;\n }\n }\n const steeringURI = this.setSteeringParams_(reloadUri);\n if (!isExcluded(steeringURI)) {\n return steeringURI;\n } // Return nothing if all valid manifest URIs are excluded.\n\n return null;\n }\n /**\n * Start the timeout for re-requesting the steering manifest at the TTL interval.\n *\n * @param {number} ttl time in seconds of the timeout. Defaults to the\n * ttl interval in the steering manifest\n */\n\n startTTLTimeout_(ttl = this.steeringManifest.ttl) {\n // 300 (5 minutes) is the default value.\n const ttlMS = ttl * 1000;\n this.ttlTimeout_ = window$1.setTimeout(() => {\n this.requestSteeringManifest();\n }, ttlMS);\n }\n /**\n * Clear the TTL timeout if necessary.\n */\n\n clearTTLTimeout_() {\n window$1.clearTimeout(this.ttlTimeout_);\n this.ttlTimeout_ = null;\n }\n /**\n * aborts any current steering xhr and sets the current request object to null\n */\n\n abort() {\n if (this.request_) {\n this.request_.abort();\n }\n this.request_ = null;\n }\n /**\n * aborts steering requests clears the ttl timeout and resets all properties.\n */\n\n dispose() {\n this.off('content-steering');\n this.off('error');\n this.abort();\n this.clearTTLTimeout_();\n this.currentPathway = null;\n this.defaultPathway = null;\n this.queryBeforeStart = null;\n this.proxyServerUrl_ = null;\n this.manifestType_ = null;\n this.ttlTimeout_ = null;\n this.request_ = null;\n this.excludedSteeringManifestURLs = new Set();\n this.availablePathways_ = new Set();\n this.steeringManifest = new SteeringManifest();\n }\n /**\n * adds a pathway to the available pathways set\n *\n * @param {string} pathway the pathway string to add\n */\n\n addAvailablePathway(pathway) {\n if (pathway) {\n this.availablePathways_.add(pathway);\n }\n }\n /**\n * Clears all pathways from the available pathways set\n */\n\n clearAvailablePathways() {\n this.availablePathways_.clear();\n }\n /**\n * Removes a pathway from the available pathways set.\n */\n\n excludePathway(pathway) {\n return this.availablePathways_.delete(pathway);\n }\n /**\n * Checks the refreshed DASH manifest content steering tag for changes.\n *\n * @param {string} baseURL new steering tag on DASH manifest refresh\n * @param {Object} newTag the new tag to check for changes\n * @return a true or false whether the new tag has different values\n */\n\n didDASHTagChange(baseURL, newTag) {\n return !newTag && this.steeringManifest.reloadUri || newTag && (resolveUrl(baseURL, newTag.serverURL) !== this.steeringManifest.reloadUri || newTag.defaultServiceLocation !== this.defaultPathway || newTag.queryBeforeStart !== this.queryBeforeStart || newTag.proxyServerURL !== this.proxyServerUrl_);\n }\n getAvailablePathways() {\n return this.availablePathways_;\n }\n}\n\n/**\n * @file playlist-controller.js\n */\nconst ABORT_EARLY_EXCLUSION_SECONDS = 10;\nlet Vhs$1; // SegmentLoader stats that need to have each loader's\n// values summed to calculate the final value\n\nconst loaderStats = ['mediaRequests', 'mediaRequestsAborted', 'mediaRequestsTimedout', 'mediaRequestsErrored', 'mediaTransferDuration', 'mediaBytesTransferred', 'mediaAppends'];\nconst sumLoaderStat = function (stat) {\n return this.audioSegmentLoader_[stat] + this.mainSegmentLoader_[stat];\n};\nconst shouldSwitchToMedia = function ({\n currentPlaylist,\n buffered,\n currentTime,\n nextPlaylist,\n bufferLowWaterLine,\n bufferHighWaterLine,\n duration,\n bufferBasedABR,\n log\n}) {\n // we have no other playlist to switch to\n if (!nextPlaylist) {\n videojs.log.warn('We received no playlist to switch to. Please check your stream.');\n return false;\n }\n const sharedLogLine = `allowing switch ${currentPlaylist && currentPlaylist.id || 'null'} -> ${nextPlaylist.id}`;\n if (!currentPlaylist) {\n log(`${sharedLogLine} as current playlist is not set`);\n return true;\n } // no need to switch if playlist is the same\n\n if (nextPlaylist.id === currentPlaylist.id) {\n return false;\n } // determine if current time is in a buffered range.\n\n const isBuffered = Boolean(findRange(buffered, currentTime).length); // If the playlist is live, then we want to not take low water line into account.\n // This is because in LIVE, the player plays 3 segments from the end of the\n // playlist, and if `BUFFER_LOW_WATER_LINE` is greater than the duration availble\n // in those segments, a viewer will never experience a rendition upswitch.\n\n if (!currentPlaylist.endList) {\n // For LLHLS live streams, don't switch renditions before playback has started, as it almost\n // doubles the time to first playback.\n if (!isBuffered && typeof currentPlaylist.partTargetDuration === 'number') {\n log(`not ${sharedLogLine} as current playlist is live llhls, but currentTime isn't in buffered.`);\n return false;\n }\n log(`${sharedLogLine} as current playlist is live`);\n return true;\n }\n const forwardBuffer = timeAheadOf(buffered, currentTime);\n const maxBufferLowWaterLine = bufferBasedABR ? Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE : Config.MAX_BUFFER_LOW_WATER_LINE; // For the same reason as LIVE, we ignore the low water line when the VOD\n // duration is below the max potential low water line\n\n if (duration < maxBufferLowWaterLine) {\n log(`${sharedLogLine} as duration < max low water line (${duration} < ${maxBufferLowWaterLine})`);\n return true;\n }\n const nextBandwidth = nextPlaylist.attributes.BANDWIDTH;\n const currBandwidth = currentPlaylist.attributes.BANDWIDTH; // when switching down, if our buffer is lower than the high water line,\n // we can switch down\n\n if (nextBandwidth < currBandwidth && (!bufferBasedABR || forwardBuffer < bufferHighWaterLine)) {\n let logLine = `${sharedLogLine} as next bandwidth < current bandwidth (${nextBandwidth} < ${currBandwidth})`;\n if (bufferBasedABR) {\n logLine += ` and forwardBuffer < bufferHighWaterLine (${forwardBuffer} < ${bufferHighWaterLine})`;\n }\n log(logLine);\n return true;\n } // and if our buffer is higher than the low water line,\n // we can switch up\n\n if ((!bufferBasedABR || nextBandwidth > currBandwidth) && forwardBuffer >= bufferLowWaterLine) {\n let logLine = `${sharedLogLine} as forwardBuffer >= bufferLowWaterLine (${forwardBuffer} >= ${bufferLowWaterLine})`;\n if (bufferBasedABR) {\n logLine += ` and next bandwidth > current bandwidth (${nextBandwidth} > ${currBandwidth})`;\n }\n log(logLine);\n return true;\n }\n log(`not ${sharedLogLine} as no switching criteria met`);\n return false;\n};\n/**\n * the main playlist controller controller all interactons\n * between playlists and segmentloaders. At this time this mainly\n * involves a main playlist and a series of audio playlists\n * if they are available\n *\n * @class PlaylistController\n * @extends videojs.EventTarget\n */\n\nclass PlaylistController extends videojs.EventTarget {\n constructor(options) {\n super();\n const {\n src,\n withCredentials,\n tech,\n bandwidth,\n externVhs,\n useCueTags,\n playlistExclusionDuration,\n enableLowInitialPlaylist,\n sourceType,\n cacheEncryptionKeys,\n bufferBasedABR,\n leastPixelDiffSelector,\n captionServices\n } = options;\n if (!src) {\n throw new Error('A non-empty playlist URL or JSON manifest string is required');\n }\n let {\n maxPlaylistRetries\n } = options;\n if (maxPlaylistRetries === null || typeof maxPlaylistRetries === 'undefined') {\n maxPlaylistRetries = Infinity;\n }\n Vhs$1 = externVhs;\n this.bufferBasedABR = Boolean(bufferBasedABR);\n this.leastPixelDiffSelector = Boolean(leastPixelDiffSelector);\n this.withCredentials = withCredentials;\n this.tech_ = tech;\n this.vhs_ = tech.vhs;\n this.sourceType_ = sourceType;\n this.useCueTags_ = useCueTags;\n this.playlistExclusionDuration = playlistExclusionDuration;\n this.maxPlaylistRetries = maxPlaylistRetries;\n this.enableLowInitialPlaylist = enableLowInitialPlaylist;\n if (this.useCueTags_) {\n this.cueTagsTrack_ = this.tech_.addTextTrack('metadata', 'ad-cues');\n this.cueTagsTrack_.inBandMetadataTrackDispatchType = '';\n }\n this.requestOptions_ = {\n withCredentials,\n maxPlaylistRetries,\n timeout: null\n };\n this.on('error', this.pauseLoading);\n this.mediaTypes_ = createMediaTypes();\n this.mediaSource = new window$1.MediaSource();\n this.handleDurationChange_ = this.handleDurationChange_.bind(this);\n this.handleSourceOpen_ = this.handleSourceOpen_.bind(this);\n this.handleSourceEnded_ = this.handleSourceEnded_.bind(this);\n this.mediaSource.addEventListener('durationchange', this.handleDurationChange_); // load the media source into the player\n\n this.mediaSource.addEventListener('sourceopen', this.handleSourceOpen_);\n this.mediaSource.addEventListener('sourceended', this.handleSourceEnded_); // we don't have to handle sourceclose since dispose will handle termination of\n // everything, and the MediaSource should not be detached without a proper disposal\n\n this.seekable_ = createTimeRanges();\n this.hasPlayed_ = false;\n this.syncController_ = new SyncController(options);\n this.segmentMetadataTrack_ = tech.addRemoteTextTrack({\n kind: 'metadata',\n label: 'segment-metadata'\n }, false).track;\n this.decrypter_ = new Decrypter();\n this.sourceUpdater_ = new SourceUpdater(this.mediaSource);\n this.inbandTextTracks_ = {};\n this.timelineChangeController_ = new TimelineChangeController();\n this.keyStatusMap_ = new Map();\n const segmentLoaderSettings = {\n vhs: this.vhs_,\n parse708captions: options.parse708captions,\n useDtsForTimestampOffset: options.useDtsForTimestampOffset,\n captionServices,\n mediaSource: this.mediaSource,\n currentTime: this.tech_.currentTime.bind(this.tech_),\n seekable: () => this.seekable(),\n seeking: () => this.tech_.seeking(),\n duration: () => this.duration(),\n hasPlayed: () => this.hasPlayed_,\n goalBufferLength: () => this.goalBufferLength(),\n bandwidth,\n syncController: this.syncController_,\n decrypter: this.decrypter_,\n sourceType: this.sourceType_,\n inbandTextTracks: this.inbandTextTracks_,\n cacheEncryptionKeys,\n sourceUpdater: this.sourceUpdater_,\n timelineChangeController: this.timelineChangeController_,\n exactManifestTimings: options.exactManifestTimings,\n addMetadataToTextTrack: this.addMetadataToTextTrack.bind(this)\n }; // The source type check not only determines whether a special DASH playlist loader\n // should be used, but also covers the case where the provided src is a vhs-json\n // manifest object (instead of a URL). In the case of vhs-json, the default\n // PlaylistLoader should be used.\n\n this.mainPlaylistLoader_ = this.sourceType_ === 'dash' ? new DashPlaylistLoader(src, this.vhs_, merge(this.requestOptions_, {\n addMetadataToTextTrack: this.addMetadataToTextTrack.bind(this)\n })) : new PlaylistLoader(src, this.vhs_, merge(this.requestOptions_, {\n addDateRangesToTextTrack: this.addDateRangesToTextTrack_.bind(this)\n }));\n this.setupMainPlaylistLoaderListeners_(); // setup segment loaders\n // combined audio/video or just video when alternate audio track is selected\n\n this.mainSegmentLoader_ = new SegmentLoader(merge(segmentLoaderSettings, {\n segmentMetadataTrack: this.segmentMetadataTrack_,\n loaderType: 'main'\n }), options); // alternate audio track\n\n this.audioSegmentLoader_ = new SegmentLoader(merge(segmentLoaderSettings, {\n loaderType: 'audio'\n }), options);\n this.subtitleSegmentLoader_ = new VTTSegmentLoader(merge(segmentLoaderSettings, {\n loaderType: 'vtt',\n featuresNativeTextTracks: this.tech_.featuresNativeTextTracks,\n loadVttJs: () => new Promise((resolve, reject) => {\n function onLoad() {\n tech.off('vttjserror', onError);\n resolve();\n }\n function onError() {\n tech.off('vttjsloaded', onLoad);\n reject();\n }\n tech.one('vttjsloaded', onLoad);\n tech.one('vttjserror', onError); // safe to call multiple times, script will be loaded only once:\n\n tech.addWebVttScript_();\n })\n }), options);\n const getBandwidth = () => {\n return this.mainSegmentLoader_.bandwidth;\n };\n this.contentSteeringController_ = new ContentSteeringController(this.vhs_.xhr, getBandwidth);\n this.setupSegmentLoaderListeners_();\n if (this.bufferBasedABR) {\n this.mainPlaylistLoader_.one('loadedplaylist', () => this.startABRTimer_());\n this.tech_.on('pause', () => this.stopABRTimer_());\n this.tech_.on('play', () => this.startABRTimer_());\n } // Create SegmentLoader stat-getters\n // mediaRequests_\n // mediaRequestsAborted_\n // mediaRequestsTimedout_\n // mediaRequestsErrored_\n // mediaTransferDuration_\n // mediaBytesTransferred_\n // mediaAppends_\n\n loaderStats.forEach(stat => {\n this[stat + '_'] = sumLoaderStat.bind(this, stat);\n });\n this.logger_ = logger('pc');\n this.triggeredFmp4Usage = false;\n if (this.tech_.preload() === 'none') {\n this.loadOnPlay_ = () => {\n this.loadOnPlay_ = null;\n this.mainPlaylistLoader_.load();\n };\n this.tech_.one('play', this.loadOnPlay_);\n } else {\n this.mainPlaylistLoader_.load();\n }\n this.timeToLoadedData__ = -1;\n this.mainAppendsToLoadedData__ = -1;\n this.audioAppendsToLoadedData__ = -1;\n const event = this.tech_.preload() === 'none' ? 'play' : 'loadstart'; // start the first frame timer on loadstart or play (for preload none)\n\n this.tech_.one(event, () => {\n const timeToLoadedDataStart = Date.now();\n this.tech_.one('loadeddata', () => {\n this.timeToLoadedData__ = Date.now() - timeToLoadedDataStart;\n this.mainAppendsToLoadedData__ = this.mainSegmentLoader_.mediaAppends;\n this.audioAppendsToLoadedData__ = this.audioSegmentLoader_.mediaAppends;\n });\n });\n }\n mainAppendsToLoadedData_() {\n return this.mainAppendsToLoadedData__;\n }\n audioAppendsToLoadedData_() {\n return this.audioAppendsToLoadedData__;\n }\n appendsToLoadedData_() {\n const main = this.mainAppendsToLoadedData_();\n const audio = this.audioAppendsToLoadedData_();\n if (main === -1 || audio === -1) {\n return -1;\n }\n return main + audio;\n }\n timeToLoadedData_() {\n return this.timeToLoadedData__;\n }\n /**\n * Run selectPlaylist and switch to the new playlist if we should\n *\n * @param {string} [reason=abr] a reason for why the ABR check is made\n * @private\n */\n\n checkABR_(reason = 'abr') {\n const nextPlaylist = this.selectPlaylist();\n if (nextPlaylist && this.shouldSwitchToMedia_(nextPlaylist)) {\n this.switchMedia_(nextPlaylist, reason);\n }\n }\n switchMedia_(playlist, cause, delay) {\n const oldMedia = this.media();\n const oldId = oldMedia && (oldMedia.id || oldMedia.uri);\n const newId = playlist && (playlist.id || playlist.uri);\n if (oldId && oldId !== newId) {\n this.logger_(`switch media ${oldId} -> ${newId} from ${cause}`);\n this.tech_.trigger({\n type: 'usage',\n name: `vhs-rendition-change-${cause}`\n });\n }\n this.mainPlaylistLoader_.media(playlist, delay);\n }\n /**\n * A function that ensures we switch our playlists inside of `mediaTypes`\n * to match the current `serviceLocation` provided by the contentSteering controller.\n * We want to check media types of `AUDIO`, `SUBTITLES`, and `CLOSED-CAPTIONS`.\n *\n * This should only be called on a DASH playback scenario while using content steering.\n * This is necessary due to differences in how media in HLS manifests are generally tied to\n * a video playlist, where in DASH that is not always the case.\n */\n\n switchMediaForDASHContentSteering_() {\n ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(type => {\n const mediaType = this.mediaTypes_[type];\n const activeGroup = mediaType ? mediaType.activeGroup() : null;\n const pathway = this.contentSteeringController_.getPathway();\n if (activeGroup && pathway) {\n // activeGroup can be an array or a single group\n const mediaPlaylists = activeGroup.length ? activeGroup[0].playlists : activeGroup.playlists;\n const dashMediaPlaylists = mediaPlaylists.filter(p => p.attributes.serviceLocation === pathway); // Switch the current active playlist to the correct CDN\n\n if (dashMediaPlaylists.length) {\n this.mediaTypes_[type].activePlaylistLoader.media(dashMediaPlaylists[0]);\n }\n }\n });\n }\n /**\n * Start a timer that periodically calls checkABR_\n *\n * @private\n */\n\n startABRTimer_() {\n this.stopABRTimer_();\n this.abrTimer_ = window$1.setInterval(() => this.checkABR_(), 250);\n }\n /**\n * Stop the timer that periodically calls checkABR_\n *\n * @private\n */\n\n stopABRTimer_() {\n // if we're scrubbing, we don't need to pause.\n // This getter will be added to Video.js in version 7.11.\n if (this.tech_.scrubbing && this.tech_.scrubbing()) {\n return;\n }\n window$1.clearInterval(this.abrTimer_);\n this.abrTimer_ = null;\n }\n /**\n * Get a list of playlists for the currently selected audio playlist\n *\n * @return {Array} the array of audio playlists\n */\n\n getAudioTrackPlaylists_() {\n const main = this.main();\n const defaultPlaylists = main && main.playlists || []; // if we don't have any audio groups then we can only\n // assume that the audio tracks are contained in main\n // playlist array, use that or an empty array.\n\n if (!main || !main.mediaGroups || !main.mediaGroups.AUDIO) {\n return defaultPlaylists;\n }\n const AUDIO = main.mediaGroups.AUDIO;\n const groupKeys = Object.keys(AUDIO);\n let track; // get the current active track\n\n if (Object.keys(this.mediaTypes_.AUDIO.groups).length) {\n track = this.mediaTypes_.AUDIO.activeTrack(); // or get the default track from main if mediaTypes_ isn't setup yet\n } else {\n // default group is `main` or just the first group.\n const defaultGroup = AUDIO.main || groupKeys.length && AUDIO[groupKeys[0]];\n for (const label in defaultGroup) {\n if (defaultGroup[label].default) {\n track = {\n label\n };\n break;\n }\n }\n } // no active track no playlists.\n\n if (!track) {\n return defaultPlaylists;\n }\n const playlists = []; // get all of the playlists that are possible for the\n // active track.\n\n for (const group in AUDIO) {\n if (AUDIO[group][track.label]) {\n const properties = AUDIO[group][track.label];\n if (properties.playlists && properties.playlists.length) {\n playlists.push.apply(playlists, properties.playlists);\n } else if (properties.uri) {\n playlists.push(properties);\n } else if (main.playlists.length) {\n // if an audio group does not have a uri\n // see if we have main playlists that use it as a group.\n // if we do then add those to the playlists list.\n for (let i = 0; i < main.playlists.length; i++) {\n const playlist = main.playlists[i];\n if (playlist.attributes && playlist.attributes.AUDIO && playlist.attributes.AUDIO === group) {\n playlists.push(playlist);\n }\n }\n }\n }\n }\n if (!playlists.length) {\n return defaultPlaylists;\n }\n return playlists;\n }\n /**\n * Register event handlers on the main playlist loader. A helper\n * function for construction time.\n *\n * @private\n */\n\n setupMainPlaylistLoaderListeners_() {\n this.mainPlaylistLoader_.on('loadedmetadata', () => {\n const media = this.mainPlaylistLoader_.media();\n const requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to\n // timeout the request.\n\n if (isLowestEnabledRendition(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.media())) {\n this.requestOptions_.timeout = 0;\n } else {\n this.requestOptions_.timeout = requestTimeout;\n } // if this isn't a live video and preload permits, start\n // downloading segments\n\n if (media.endList && this.tech_.preload() !== 'none') {\n this.mainSegmentLoader_.playlist(media, this.requestOptions_);\n this.mainSegmentLoader_.load();\n }\n setupMediaGroups({\n sourceType: this.sourceType_,\n segmentLoaders: {\n AUDIO: this.audioSegmentLoader_,\n SUBTITLES: this.subtitleSegmentLoader_,\n main: this.mainSegmentLoader_\n },\n tech: this.tech_,\n requestOptions: this.requestOptions_,\n mainPlaylistLoader: this.mainPlaylistLoader_,\n vhs: this.vhs_,\n main: this.main(),\n mediaTypes: this.mediaTypes_,\n excludePlaylist: this.excludePlaylist.bind(this)\n });\n this.triggerPresenceUsage_(this.main(), media);\n this.setupFirstPlay();\n if (!this.mediaTypes_.AUDIO.activePlaylistLoader || this.mediaTypes_.AUDIO.activePlaylistLoader.media()) {\n this.trigger('selectedinitialmedia');\n } else {\n // We must wait for the active audio playlist loader to\n // finish setting up before triggering this event so the\n // representations API and EME setup is correct\n this.mediaTypes_.AUDIO.activePlaylistLoader.one('loadedmetadata', () => {\n this.trigger('selectedinitialmedia');\n });\n }\n });\n this.mainPlaylistLoader_.on('loadedplaylist', () => {\n if (this.loadOnPlay_) {\n this.tech_.off('play', this.loadOnPlay_);\n }\n let updatedPlaylist = this.mainPlaylistLoader_.media();\n if (!updatedPlaylist) {\n // Add content steering listeners on first load and init.\n this.attachContentSteeringListeners_();\n this.initContentSteeringController_(); // exclude any variants that are not supported by the browser before selecting\n // an initial media as the playlist selectors do not consider browser support\n\n this.excludeUnsupportedVariants_();\n let selectedMedia;\n if (this.enableLowInitialPlaylist) {\n selectedMedia = this.selectInitialPlaylist();\n }\n if (!selectedMedia) {\n selectedMedia = this.selectPlaylist();\n }\n if (!selectedMedia || !this.shouldSwitchToMedia_(selectedMedia)) {\n return;\n }\n this.initialMedia_ = selectedMedia;\n this.switchMedia_(this.initialMedia_, 'initial'); // Under the standard case where a source URL is provided, loadedplaylist will\n // fire again since the playlist will be requested. In the case of vhs-json\n // (where the manifest object is provided as the source), when the media\n // playlist's `segments` list is already available, a media playlist won't be\n // requested, and loadedplaylist won't fire again, so the playlist handler must be\n // called on its own here.\n\n const haveJsonSource = this.sourceType_ === 'vhs-json' && this.initialMedia_.segments;\n if (!haveJsonSource) {\n return;\n }\n updatedPlaylist = this.initialMedia_;\n }\n this.handleUpdatedMediaPlaylist(updatedPlaylist);\n });\n this.mainPlaylistLoader_.on('error', () => {\n const error = this.mainPlaylistLoader_.error;\n this.excludePlaylist({\n playlistToExclude: error.playlist,\n error\n });\n });\n this.mainPlaylistLoader_.on('mediachanging', () => {\n this.mainSegmentLoader_.abort();\n this.mainSegmentLoader_.pause();\n });\n this.mainPlaylistLoader_.on('mediachange', () => {\n const media = this.mainPlaylistLoader_.media();\n const requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to\n // timeout the request.\n\n if (isLowestEnabledRendition(this.mainPlaylistLoader_.main, this.mainPlaylistLoader_.media())) {\n this.requestOptions_.timeout = 0;\n } else {\n this.requestOptions_.timeout = requestTimeout;\n }\n if (this.sourceType_ === 'dash') {\n // we don't want to re-request the same hls playlist right after it was changed\n this.mainPlaylistLoader_.load();\n } // TODO: Create a new event on the PlaylistLoader that signals\n // that the segments have changed in some way and use that to\n // update the SegmentLoader instead of doing it twice here and\n // on `loadedplaylist`\n\n this.mainSegmentLoader_.pause();\n this.mainSegmentLoader_.playlist(media, this.requestOptions_);\n if (this.waitingForFastQualityPlaylistReceived_) {\n this.runFastQualitySwitch_();\n } else {\n this.mainSegmentLoader_.load();\n }\n this.tech_.trigger({\n type: 'mediachange',\n bubbles: true\n });\n });\n this.mainPlaylistLoader_.on('playlistunchanged', () => {\n const updatedPlaylist = this.mainPlaylistLoader_.media(); // ignore unchanged playlists that have already been\n // excluded for not-changing. We likely just have a really slowly updating\n // playlist.\n\n if (updatedPlaylist.lastExcludeReason_ === 'playlist-unchanged') {\n return;\n }\n const playlistOutdated = this.stuckAtPlaylistEnd_(updatedPlaylist);\n if (playlistOutdated) {\n // Playlist has stopped updating and we're stuck at its end. Try to\n // exclude it and switch to another playlist in the hope that that\n // one is updating (and give the player a chance to re-adjust to the\n // safe live point).\n this.excludePlaylist({\n error: {\n message: 'Playlist no longer updating.',\n reason: 'playlist-unchanged'\n }\n }); // useful for monitoring QoS\n\n this.tech_.trigger('playliststuck');\n }\n });\n this.mainPlaylistLoader_.on('renditiondisabled', () => {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-rendition-disabled'\n });\n });\n this.mainPlaylistLoader_.on('renditionenabled', () => {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-rendition-enabled'\n });\n });\n }\n /**\n * Given an updated media playlist (whether it was loaded for the first time, or\n * refreshed for live playlists), update any relevant properties and state to reflect\n * changes in the media that should be accounted for (e.g., cues and duration).\n *\n * @param {Object} updatedPlaylist the updated media playlist object\n *\n * @private\n */\n\n handleUpdatedMediaPlaylist(updatedPlaylist) {\n if (this.useCueTags_) {\n this.updateAdCues_(updatedPlaylist);\n } // TODO: Create a new event on the PlaylistLoader that signals\n // that the segments have changed in some way and use that to\n // update the SegmentLoader instead of doing it twice here and\n // on `mediachange`\n\n this.mainSegmentLoader_.pause();\n this.mainSegmentLoader_.playlist(updatedPlaylist, this.requestOptions_);\n if (this.waitingForFastQualityPlaylistReceived_) {\n this.runFastQualitySwitch_();\n }\n this.updateDuration(!updatedPlaylist.endList); // If the player isn't paused, ensure that the segment loader is running,\n // as it is possible that it was temporarily stopped while waiting for\n // a playlist (e.g., in case the playlist errored and we re-requested it).\n\n if (!this.tech_.paused()) {\n this.mainSegmentLoader_.load();\n if (this.audioSegmentLoader_) {\n this.audioSegmentLoader_.load();\n }\n }\n }\n /**\n * A helper function for triggerring presence usage events once per source\n *\n * @private\n */\n\n triggerPresenceUsage_(main, media) {\n const mediaGroups = main.mediaGroups || {};\n let defaultDemuxed = true;\n const audioGroupKeys = Object.keys(mediaGroups.AUDIO);\n for (const mediaGroup in mediaGroups.AUDIO) {\n for (const label in mediaGroups.AUDIO[mediaGroup]) {\n const properties = mediaGroups.AUDIO[mediaGroup][label];\n if (!properties.uri) {\n defaultDemuxed = false;\n }\n }\n }\n if (defaultDemuxed) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-demuxed'\n });\n }\n if (Object.keys(mediaGroups.SUBTITLES).length) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-webvtt'\n });\n }\n if (Vhs$1.Playlist.isAes(media)) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-aes'\n });\n }\n if (audioGroupKeys.length && Object.keys(mediaGroups.AUDIO[audioGroupKeys[0]]).length > 1) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-alternate-audio'\n });\n }\n if (this.useCueTags_) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-playlist-cue-tags'\n });\n }\n }\n shouldSwitchToMedia_(nextPlaylist) {\n const currentPlaylist = this.mainPlaylistLoader_.media() || this.mainPlaylistLoader_.pendingMedia_;\n const currentTime = this.tech_.currentTime();\n const bufferLowWaterLine = this.bufferLowWaterLine();\n const bufferHighWaterLine = this.bufferHighWaterLine();\n const buffered = this.tech_.buffered();\n return shouldSwitchToMedia({\n buffered,\n currentTime,\n currentPlaylist,\n nextPlaylist,\n bufferLowWaterLine,\n bufferHighWaterLine,\n duration: this.duration(),\n bufferBasedABR: this.bufferBasedABR,\n log: this.logger_\n });\n }\n /**\n * Register event handlers on the segment loaders. A helper function\n * for construction time.\n *\n * @private\n */\n\n setupSegmentLoaderListeners_() {\n this.mainSegmentLoader_.on('bandwidthupdate', () => {\n // Whether or not buffer based ABR or another ABR is used, on a bandwidth change it's\n // useful to check to see if a rendition switch should be made.\n this.checkABR_('bandwidthupdate');\n this.tech_.trigger('bandwidthupdate');\n });\n this.mainSegmentLoader_.on('timeout', () => {\n if (this.bufferBasedABR) {\n // If a rendition change is needed, then it would've be done on `bandwidthupdate`.\n // Here the only consideration is that for buffer based ABR there's no guarantee\n // of an immediate switch (since the bandwidth is averaged with a timeout\n // bandwidth value of 1), so force a load on the segment loader to keep it going.\n this.mainSegmentLoader_.load();\n }\n }); // `progress` events are not reliable enough of a bandwidth measure to trigger buffer\n // based ABR.\n\n if (!this.bufferBasedABR) {\n this.mainSegmentLoader_.on('progress', () => {\n this.trigger('progress');\n });\n }\n this.mainSegmentLoader_.on('error', () => {\n const error = this.mainSegmentLoader_.error();\n this.excludePlaylist({\n playlistToExclude: error.playlist,\n error\n });\n });\n this.mainSegmentLoader_.on('appenderror', () => {\n this.error = this.mainSegmentLoader_.error_;\n this.trigger('error');\n });\n this.mainSegmentLoader_.on('syncinfoupdate', () => {\n this.onSyncInfoUpdate_();\n });\n this.mainSegmentLoader_.on('timestampoffset', () => {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-timestamp-offset'\n });\n });\n this.audioSegmentLoader_.on('syncinfoupdate', () => {\n this.onSyncInfoUpdate_();\n });\n this.audioSegmentLoader_.on('appenderror', () => {\n this.error = this.audioSegmentLoader_.error_;\n this.trigger('error');\n });\n this.mainSegmentLoader_.on('ended', () => {\n this.logger_('main segment loader ended');\n this.onEndOfStream();\n });\n this.mainSegmentLoader_.on('earlyabort', event => {\n // never try to early abort with the new ABR algorithm\n if (this.bufferBasedABR) {\n return;\n }\n this.delegateLoaders_('all', ['abort']);\n this.excludePlaylist({\n error: {\n message: 'Aborted early because there isn\\'t enough bandwidth to complete ' + 'the request without rebuffering.'\n },\n playlistExclusionDuration: ABORT_EARLY_EXCLUSION_SECONDS\n });\n });\n const updateCodecs = () => {\n if (!this.sourceUpdater_.hasCreatedSourceBuffers()) {\n return this.tryToCreateSourceBuffers_();\n }\n const codecs = this.getCodecsOrExclude_(); // no codecs means that the playlist was excluded\n\n if (!codecs) {\n return;\n }\n this.sourceUpdater_.addOrChangeSourceBuffers(codecs);\n };\n this.mainSegmentLoader_.on('trackinfo', updateCodecs);\n this.audioSegmentLoader_.on('trackinfo', updateCodecs);\n this.mainSegmentLoader_.on('fmp4', () => {\n if (!this.triggeredFmp4Usage) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-fmp4'\n });\n this.triggeredFmp4Usage = true;\n }\n });\n this.audioSegmentLoader_.on('fmp4', () => {\n if (!this.triggeredFmp4Usage) {\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-fmp4'\n });\n this.triggeredFmp4Usage = true;\n }\n });\n this.audioSegmentLoader_.on('ended', () => {\n this.logger_('audioSegmentLoader ended');\n this.onEndOfStream();\n });\n }\n mediaSecondsLoaded_() {\n return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded + this.mainSegmentLoader_.mediaSecondsLoaded);\n }\n /**\n * Call load on our SegmentLoaders\n */\n\n load() {\n this.mainSegmentLoader_.load();\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n this.audioSegmentLoader_.load();\n }\n if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n this.subtitleSegmentLoader_.load();\n }\n }\n /**\n * Re-tune playback quality level for the current player\n * conditions. This method will perform destructive actions like removing\n * already buffered content in order to readjust the currently active\n * playlist quickly. This is good for manual quality changes\n *\n * @private\n */\n\n fastQualityChange_(media = this.selectPlaylist()) {\n if (media && media === this.mainPlaylistLoader_.media()) {\n this.logger_('skipping fastQualityChange because new media is same as old');\n return;\n }\n this.switchMedia_(media, 'fast-quality'); // we would like to avoid race condition when we call fastQuality,\n // reset everything and start loading segments from prev segments instead of new because new playlist is not received yet\n\n this.waitingForFastQualityPlaylistReceived_ = true;\n }\n runFastQualitySwitch_() {\n this.waitingForFastQualityPlaylistReceived_ = false; // Delete all buffered data to allow an immediate quality switch, then seek to give\n // the browser a kick to remove any cached frames from the previous rendtion (.04 seconds\n // ahead was roughly the minimum that will accomplish this across a variety of content\n // in IE and Edge, but seeking in place is sufficient on all other browsers)\n // Edge/IE bug: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/14600375/\n // Chrome bug: https://bugs.chromium.org/p/chromium/issues/detail?id=651904\n\n this.mainSegmentLoader_.pause();\n this.mainSegmentLoader_.resetEverything(() => {\n this.tech_.setCurrentTime(this.tech_.currentTime());\n }); // don't need to reset audio as it is reset when media changes\n }\n /**\n * Begin playback.\n */\n\n play() {\n if (this.setupFirstPlay()) {\n return;\n }\n if (this.tech_.ended()) {\n this.tech_.setCurrentTime(0);\n }\n if (this.hasPlayed_) {\n this.load();\n }\n const seekable = this.tech_.seekable(); // if the viewer has paused and we fell out of the live window,\n // seek forward to the live point\n\n if (this.tech_.duration() === Infinity) {\n if (this.tech_.currentTime() < seekable.start(0)) {\n return this.tech_.setCurrentTime(seekable.end(seekable.length - 1));\n }\n }\n }\n /**\n * Seek to the latest media position if this is a live video and the\n * player and video are loaded and initialized.\n */\n\n setupFirstPlay() {\n const media = this.mainPlaylistLoader_.media(); // Check that everything is ready to begin buffering for the first call to play\n // If 1) there is no active media\n // 2) the player is paused\n // 3) the first play has already been setup\n // then exit early\n\n if (!media || this.tech_.paused() || this.hasPlayed_) {\n return false;\n } // when the video is a live stream and/or has a start time\n\n if (!media.endList || media.start) {\n const seekable = this.seekable();\n if (!seekable.length) {\n // without a seekable range, the player cannot seek to begin buffering at the\n // live or start point\n return false;\n }\n const seekableEnd = seekable.end(0);\n let startPoint = seekableEnd;\n if (media.start) {\n const offset = media.start.timeOffset;\n if (offset < 0) {\n startPoint = Math.max(seekableEnd + offset, seekable.start(0));\n } else {\n startPoint = Math.min(seekableEnd, offset);\n }\n } // trigger firstplay to inform the source handler to ignore the next seek event\n\n this.trigger('firstplay'); // seek to the live point\n\n this.tech_.setCurrentTime(startPoint);\n }\n this.hasPlayed_ = true; // we can begin loading now that everything is ready\n\n this.load();\n return true;\n }\n /**\n * handle the sourceopen event on the MediaSource\n *\n * @private\n */\n\n handleSourceOpen_() {\n // Only attempt to create the source buffer if none already exist.\n // handleSourceOpen is also called when we are \"re-opening\" a source buffer\n // after `endOfStream` has been called (in response to a seek for instance)\n this.tryToCreateSourceBuffers_(); // if autoplay is enabled, begin playback. This is duplicative of\n // code in video.js but is required because play() must be invoked\n // *after* the media source has opened.\n\n if (this.tech_.autoplay()) {\n const playPromise = this.tech_.play(); // Catch/silence error when a pause interrupts a play request\n // on browsers which return a promise\n\n if (typeof playPromise !== 'undefined' && typeof playPromise.then === 'function') {\n playPromise.then(null, e => {});\n }\n }\n this.trigger('sourceopen');\n }\n /**\n * handle the sourceended event on the MediaSource\n *\n * @private\n */\n\n handleSourceEnded_() {\n if (!this.inbandTextTracks_.metadataTrack_) {\n return;\n }\n const cues = this.inbandTextTracks_.metadataTrack_.cues;\n if (!cues || !cues.length) {\n return;\n }\n const duration = this.duration();\n cues[cues.length - 1].endTime = isNaN(duration) || Math.abs(duration) === Infinity ? Number.MAX_VALUE : duration;\n }\n /**\n * handle the durationchange event on the MediaSource\n *\n * @private\n */\n\n handleDurationChange_() {\n this.tech_.trigger('durationchange');\n }\n /**\n * Calls endOfStream on the media source when all active stream types have called\n * endOfStream\n *\n * @param {string} streamType\n * Stream type of the segment loader that called endOfStream\n * @private\n */\n\n onEndOfStream() {\n let isEndOfStream = this.mainSegmentLoader_.ended_;\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n const mainMediaInfo = this.mainSegmentLoader_.getCurrentMediaInfo_(); // if the audio playlist loader exists, then alternate audio is active\n\n if (!mainMediaInfo || mainMediaInfo.hasVideo) {\n // if we do not know if the main segment loader contains video yet or if we\n // definitively know the main segment loader contains video, then we need to wait\n // for both main and audio segment loaders to call endOfStream\n isEndOfStream = isEndOfStream && this.audioSegmentLoader_.ended_;\n } else {\n // otherwise just rely on the audio loader\n isEndOfStream = this.audioSegmentLoader_.ended_;\n }\n }\n if (!isEndOfStream) {\n return;\n }\n this.stopABRTimer_();\n this.sourceUpdater_.endOfStream();\n }\n /**\n * Check if a playlist has stopped being updated\n *\n * @param {Object} playlist the media playlist object\n * @return {boolean} whether the playlist has stopped being updated or not\n */\n\n stuckAtPlaylistEnd_(playlist) {\n const seekable = this.seekable();\n if (!seekable.length) {\n // playlist doesn't have enough information to determine whether we are stuck\n return false;\n }\n const expired = this.syncController_.getExpiredTime(playlist, this.duration());\n if (expired === null) {\n return false;\n } // does not use the safe live end to calculate playlist end, since we\n // don't want to say we are stuck while there is still content\n\n const absolutePlaylistEnd = Vhs$1.Playlist.playlistEnd(playlist, expired);\n const currentTime = this.tech_.currentTime();\n const buffered = this.tech_.buffered();\n if (!buffered.length) {\n // return true if the playhead reached the absolute end of the playlist\n return absolutePlaylistEnd - currentTime <= SAFE_TIME_DELTA;\n }\n const bufferedEnd = buffered.end(buffered.length - 1); // return true if there is too little buffer left and buffer has reached absolute\n // end of playlist\n\n return bufferedEnd - currentTime <= SAFE_TIME_DELTA && absolutePlaylistEnd - bufferedEnd <= SAFE_TIME_DELTA;\n }\n /**\n * Exclude a playlist for a set amount of time, making it unavailable for selection by\n * the rendition selection algorithm, then force a new playlist (rendition) selection.\n *\n * @param {Object=} playlistToExclude\n * the playlist to exclude, defaults to the currently selected playlist\n * @param {Object=} error\n * an optional error\n * @param {number=} playlistExclusionDuration\n * an optional number of seconds to exclude the playlist\n */\n\n excludePlaylist({\n playlistToExclude = this.mainPlaylistLoader_.media(),\n error = {},\n playlistExclusionDuration\n }) {\n // If the `error` was generated by the playlist loader, it will contain\n // the playlist we were trying to load (but failed) and that should be\n // excluded instead of the currently selected playlist which is likely\n // out-of-date in this scenario\n playlistToExclude = playlistToExclude || this.mainPlaylistLoader_.media();\n playlistExclusionDuration = playlistExclusionDuration || error.playlistExclusionDuration || this.playlistExclusionDuration; // If there is no current playlist, then an error occurred while we were\n // trying to load the main OR while we were disposing of the tech\n\n if (!playlistToExclude) {\n this.error = error;\n if (this.mediaSource.readyState !== 'open') {\n this.trigger('error');\n } else {\n this.sourceUpdater_.endOfStream('network');\n }\n return;\n }\n playlistToExclude.playlistErrors_++;\n const playlists = this.mainPlaylistLoader_.main.playlists;\n const enabledPlaylists = playlists.filter(isEnabled);\n const isFinalRendition = enabledPlaylists.length === 1 && enabledPlaylists[0] === playlistToExclude; // Don't exclude the only playlist unless it was excluded\n // forever\n\n if (playlists.length === 1 && playlistExclusionDuration !== Infinity) {\n videojs.log.warn(`Problem encountered with playlist ${playlistToExclude.id}. ` + 'Trying again since it is the only playlist.');\n this.tech_.trigger('retryplaylist'); // if this is a final rendition, we should delay\n\n return this.mainPlaylistLoader_.load(isFinalRendition);\n }\n if (isFinalRendition) {\n // If we're content steering, try other pathways.\n if (this.main().contentSteering) {\n const pathway = this.pathwayAttribute_(playlistToExclude); // Ignore at least 1 steering manifest refresh.\n\n const reIncludeDelay = this.contentSteeringController_.steeringManifest.ttl * 1000;\n this.contentSteeringController_.excludePathway(pathway);\n this.excludeThenChangePathway_();\n setTimeout(() => {\n this.contentSteeringController_.addAvailablePathway(pathway);\n }, reIncludeDelay);\n return;\n } // Since we're on the final non-excluded playlist, and we're about to exclude\n // it, instead of erring the player or retrying this playlist, clear out the current\n // exclusion list. This allows other playlists to be attempted in case any have been\n // fixed.\n\n let reincluded = false;\n playlists.forEach(playlist => {\n // skip current playlist which is about to be excluded\n if (playlist === playlistToExclude) {\n return;\n }\n const excludeUntil = playlist.excludeUntil; // a playlist cannot be reincluded if it wasn't excluded to begin with.\n\n if (typeof excludeUntil !== 'undefined' && excludeUntil !== Infinity) {\n reincluded = true;\n delete playlist.excludeUntil;\n }\n });\n if (reincluded) {\n videojs.log.warn('Removing other playlists from the exclusion list because the last ' + 'rendition is about to be excluded.'); // Technically we are retrying a playlist, in that we are simply retrying a previous\n // playlist. This is needed for users relying on the retryplaylist event to catch a\n // case where the player might be stuck and looping through \"dead\" playlists.\n\n this.tech_.trigger('retryplaylist');\n }\n } // Exclude this playlist\n\n let excludeUntil;\n if (playlistToExclude.playlistErrors_ > this.maxPlaylistRetries) {\n excludeUntil = Infinity;\n } else {\n excludeUntil = Date.now() + playlistExclusionDuration * 1000;\n }\n playlistToExclude.excludeUntil = excludeUntil;\n if (error.reason) {\n playlistToExclude.lastExcludeReason_ = error.reason;\n }\n this.tech_.trigger('excludeplaylist');\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-rendition-excluded'\n }); // TODO: only load a new playlist if we're excluding the current playlist\n // If this function was called with a playlist that's not the current active playlist\n // (e.g., media().id !== playlistToExclude.id),\n // then a new playlist should not be selected and loaded, as there's nothing wrong with the current playlist.\n\n const nextPlaylist = this.selectPlaylist();\n if (!nextPlaylist) {\n this.error = 'Playback cannot continue. No available working or supported playlists.';\n this.trigger('error');\n return;\n }\n const logFn = error.internal ? this.logger_ : videojs.log.warn;\n const errorMessage = error.message ? ' ' + error.message : '';\n logFn(`${error.internal ? 'Internal problem' : 'Problem'} encountered with playlist ${playlistToExclude.id}.` + `${errorMessage} Switching to playlist ${nextPlaylist.id}.`); // if audio group changed reset audio loaders\n\n if (nextPlaylist.attributes.AUDIO !== playlistToExclude.attributes.AUDIO) {\n this.delegateLoaders_('audio', ['abort', 'pause']);\n } // if subtitle group changed reset subtitle loaders\n\n if (nextPlaylist.attributes.SUBTITLES !== playlistToExclude.attributes.SUBTITLES) {\n this.delegateLoaders_('subtitle', ['abort', 'pause']);\n }\n this.delegateLoaders_('main', ['abort', 'pause']);\n const delayDuration = nextPlaylist.targetDuration / 2 * 1000 || 5 * 1000;\n const shouldDelay = typeof nextPlaylist.lastRequest === 'number' && Date.now() - nextPlaylist.lastRequest <= delayDuration; // delay if it's a final rendition or if the last refresh is sooner than half targetDuration\n\n return this.switchMedia_(nextPlaylist, 'exclude', isFinalRendition || shouldDelay);\n }\n /**\n * Pause all segment/playlist loaders\n */\n\n pauseLoading() {\n this.delegateLoaders_('all', ['abort', 'pause']);\n this.stopABRTimer_();\n }\n /**\n * Call a set of functions in order on playlist loaders, segment loaders,\n * or both types of loaders.\n *\n * @param {string} filter\n * Filter loaders that should call fnNames using a string. Can be:\n * * all - run on all loaders\n * * audio - run on all audio loaders\n * * subtitle - run on all subtitle loaders\n * * main - run on the main loaders\n *\n * @param {Array|string} fnNames\n * A string or array of function names to call.\n */\n\n delegateLoaders_(filter, fnNames) {\n const loaders = [];\n const dontFilterPlaylist = filter === 'all';\n if (dontFilterPlaylist || filter === 'main') {\n loaders.push(this.mainPlaylistLoader_);\n }\n const mediaTypes = [];\n if (dontFilterPlaylist || filter === 'audio') {\n mediaTypes.push('AUDIO');\n }\n if (dontFilterPlaylist || filter === 'subtitle') {\n mediaTypes.push('CLOSED-CAPTIONS');\n mediaTypes.push('SUBTITLES');\n }\n mediaTypes.forEach(mediaType => {\n const loader = this.mediaTypes_[mediaType] && this.mediaTypes_[mediaType].activePlaylistLoader;\n if (loader) {\n loaders.push(loader);\n }\n });\n ['main', 'audio', 'subtitle'].forEach(name => {\n const loader = this[`${name}SegmentLoader_`];\n if (loader && (filter === name || filter === 'all')) {\n loaders.push(loader);\n }\n });\n loaders.forEach(loader => fnNames.forEach(fnName => {\n if (typeof loader[fnName] === 'function') {\n loader[fnName]();\n }\n }));\n }\n /**\n * set the current time on all segment loaders\n *\n * @param {TimeRange} currentTime the current time to set\n * @return {TimeRange} the current time\n */\n\n setCurrentTime(currentTime) {\n const buffered = findRange(this.tech_.buffered(), currentTime);\n if (!(this.mainPlaylistLoader_ && this.mainPlaylistLoader_.media())) {\n // return immediately if the metadata is not ready yet\n return 0;\n } // it's clearly an edge-case but don't thrown an error if asked to\n // seek within an empty playlist\n\n if (!this.mainPlaylistLoader_.media().segments) {\n return 0;\n } // if the seek location is already buffered, continue buffering as usual\n\n if (buffered && buffered.length) {\n return currentTime;\n } // cancel outstanding requests so we begin buffering at the new\n // location\n\n this.mainSegmentLoader_.pause();\n this.mainSegmentLoader_.resetEverything();\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n this.audioSegmentLoader_.pause();\n this.audioSegmentLoader_.resetEverything();\n }\n if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\n this.subtitleSegmentLoader_.pause();\n this.subtitleSegmentLoader_.resetEverything();\n } // start segment loader loading in case they are paused\n\n this.load();\n }\n /**\n * get the current duration\n *\n * @return {TimeRange} the duration\n */\n\n duration() {\n if (!this.mainPlaylistLoader_) {\n return 0;\n }\n const media = this.mainPlaylistLoader_.media();\n if (!media) {\n // no playlists loaded yet, so can't determine a duration\n return 0;\n } // Don't rely on the media source for duration in the case of a live playlist since\n // setting the native MediaSource's duration to infinity ends up with consequences to\n // seekable behavior. See https://github.com/w3c/media-source/issues/5 for details.\n //\n // This is resolved in the spec by https://github.com/w3c/media-source/pull/92,\n // however, few browsers have support for setLiveSeekableRange()\n // https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/setLiveSeekableRange\n //\n // Until a time when the duration of the media source can be set to infinity, and a\n // seekable range specified across browsers, just return Infinity.\n\n if (!media.endList) {\n return Infinity;\n } // Since this is a VOD video, it is safe to rely on the media source's duration (if\n // available). If it's not available, fall back to a playlist-calculated estimate.\n\n if (this.mediaSource) {\n return this.mediaSource.duration;\n }\n return Vhs$1.Playlist.duration(media);\n }\n /**\n * check the seekable range\n *\n * @return {TimeRange} the seekable range\n */\n\n seekable() {\n return this.seekable_;\n }\n onSyncInfoUpdate_() {\n let audioSeekable; // TODO check for creation of both source buffers before updating seekable\n //\n // A fix was made to this function where a check for\n // this.sourceUpdater_.hasCreatedSourceBuffers\n // was added to ensure that both source buffers were created before seekable was\n // updated. However, it originally had a bug where it was checking for a true and\n // returning early instead of checking for false. Setting it to check for false to\n // return early though created other issues. A call to play() would check for seekable\n // end without verifying that a seekable range was present. In addition, even checking\n // for that didn't solve some issues, as handleFirstPlay is sometimes worked around\n // due to a media update calling load on the segment loaders, skipping a seek to live,\n // thereby starting live streams at the beginning of the stream rather than at the end.\n //\n // This conditional should be fixed to wait for the creation of two source buffers at\n // the same time as the other sections of code are fixed to properly seek to live and\n // not throw an error due to checking for a seekable end when no seekable range exists.\n //\n // For now, fall back to the older behavior, with the understanding that the seekable\n // range may not be completely correct, leading to a suboptimal initial live point.\n\n if (!this.mainPlaylistLoader_) {\n return;\n }\n let media = this.mainPlaylistLoader_.media();\n if (!media) {\n return;\n }\n let expired = this.syncController_.getExpiredTime(media, this.duration());\n if (expired === null) {\n // not enough information to update seekable\n return;\n }\n const main = this.mainPlaylistLoader_.main;\n const mainSeekable = Vhs$1.Playlist.seekable(media, expired, Vhs$1.Playlist.liveEdgeDelay(main, media));\n if (mainSeekable.length === 0) {\n return;\n }\n if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\n media = this.mediaTypes_.AUDIO.activePlaylistLoader.media();\n expired = this.syncController_.getExpiredTime(media, this.duration());\n if (expired === null) {\n return;\n }\n audioSeekable = Vhs$1.Playlist.seekable(media, expired, Vhs$1.Playlist.liveEdgeDelay(main, media));\n if (audioSeekable.length === 0) {\n return;\n }\n }\n let oldEnd;\n let oldStart;\n if (this.seekable_ && this.seekable_.length) {\n oldEnd = this.seekable_.end(0);\n oldStart = this.seekable_.start(0);\n }\n if (!audioSeekable) {\n // seekable has been calculated based on buffering video data so it\n // can be returned directly\n this.seekable_ = mainSeekable;\n } else if (audioSeekable.start(0) > mainSeekable.end(0) || mainSeekable.start(0) > audioSeekable.end(0)) {\n // seekables are pretty far off, rely on main\n this.seekable_ = mainSeekable;\n } else {\n this.seekable_ = createTimeRanges([[audioSeekable.start(0) > mainSeekable.start(0) ? audioSeekable.start(0) : mainSeekable.start(0), audioSeekable.end(0) < mainSeekable.end(0) ? audioSeekable.end(0) : mainSeekable.end(0)]]);\n } // seekable is the same as last time\n\n if (this.seekable_ && this.seekable_.length) {\n if (this.seekable_.end(0) === oldEnd && this.seekable_.start(0) === oldStart) {\n return;\n }\n }\n this.logger_(`seekable updated [${printableRange(this.seekable_)}]`);\n this.tech_.trigger('seekablechanged');\n }\n /**\n * Update the player duration\n */\n\n updateDuration(isLive) {\n if (this.updateDuration_) {\n this.mediaSource.removeEventListener('sourceopen', this.updateDuration_);\n this.updateDuration_ = null;\n }\n if (this.mediaSource.readyState !== 'open') {\n this.updateDuration_ = this.updateDuration.bind(this, isLive);\n this.mediaSource.addEventListener('sourceopen', this.updateDuration_);\n return;\n }\n if (isLive) {\n const seekable = this.seekable();\n if (!seekable.length) {\n return;\n } // Even in the case of a live playlist, the native MediaSource's duration should not\n // be set to Infinity (even though this would be expected for a live playlist), since\n // setting the native MediaSource's duration to infinity ends up with consequences to\n // seekable behavior. See https://github.com/w3c/media-source/issues/5 for details.\n //\n // This is resolved in the spec by https://github.com/w3c/media-source/pull/92,\n // however, few browsers have support for setLiveSeekableRange()\n // https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/setLiveSeekableRange\n //\n // Until a time when the duration of the media source can be set to infinity, and a\n // seekable range specified across browsers, the duration should be greater than or\n // equal to the last possible seekable value.\n // MediaSource duration starts as NaN\n // It is possible (and probable) that this case will never be reached for many\n // sources, since the MediaSource reports duration as the highest value without\n // accounting for timestamp offset. For example, if the timestamp offset is -100 and\n // we buffered times 0 to 100 with real times of 100 to 200, even though current\n // time will be between 0 and 100, the native media source may report the duration\n // as 200. However, since we report duration separate from the media source (as\n // Infinity), and as long as the native media source duration value is greater than\n // our reported seekable range, seeks will work as expected. The large number as\n // duration for live is actually a strategy used by some players to work around the\n // issue of live seekable ranges cited above.\n\n if (isNaN(this.mediaSource.duration) || this.mediaSource.duration < seekable.end(seekable.length - 1)) {\n this.sourceUpdater_.setDuration(seekable.end(seekable.length - 1));\n }\n return;\n }\n const buffered = this.tech_.buffered();\n let duration = Vhs$1.Playlist.duration(this.mainPlaylistLoader_.media());\n if (buffered.length > 0) {\n duration = Math.max(duration, buffered.end(buffered.length - 1));\n }\n if (this.mediaSource.duration !== duration) {\n this.sourceUpdater_.setDuration(duration);\n }\n }\n /**\n * dispose of the PlaylistController and everything\n * that it controls\n */\n\n dispose() {\n this.trigger('dispose');\n this.decrypter_.terminate();\n this.mainPlaylistLoader_.dispose();\n this.mainSegmentLoader_.dispose();\n this.contentSteeringController_.dispose();\n this.keyStatusMap_.clear();\n if (this.loadOnPlay_) {\n this.tech_.off('play', this.loadOnPlay_);\n }\n ['AUDIO', 'SUBTITLES'].forEach(type => {\n const groups = this.mediaTypes_[type].groups;\n for (const id in groups) {\n groups[id].forEach(group => {\n if (group.playlistLoader) {\n group.playlistLoader.dispose();\n }\n });\n }\n });\n this.audioSegmentLoader_.dispose();\n this.subtitleSegmentLoader_.dispose();\n this.sourceUpdater_.dispose();\n this.timelineChangeController_.dispose();\n this.stopABRTimer_();\n if (this.updateDuration_) {\n this.mediaSource.removeEventListener('sourceopen', this.updateDuration_);\n }\n this.mediaSource.removeEventListener('durationchange', this.handleDurationChange_); // load the media source into the player\n\n this.mediaSource.removeEventListener('sourceopen', this.handleSourceOpen_);\n this.mediaSource.removeEventListener('sourceended', this.handleSourceEnded_);\n this.off();\n }\n /**\n * return the main playlist object if we have one\n *\n * @return {Object} the main playlist object that we parsed\n */\n\n main() {\n return this.mainPlaylistLoader_.main;\n }\n /**\n * return the currently selected playlist\n *\n * @return {Object} the currently selected playlist object that we parsed\n */\n\n media() {\n // playlist loader will not return media if it has not been fully loaded\n return this.mainPlaylistLoader_.media() || this.initialMedia_;\n }\n areMediaTypesKnown_() {\n const usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader;\n const hasMainMediaInfo = !!this.mainSegmentLoader_.getCurrentMediaInfo_(); // if we are not using an audio loader, then we have audio media info\n // otherwise check on the segment loader.\n\n const hasAudioMediaInfo = !usingAudioLoader ? true : !!this.audioSegmentLoader_.getCurrentMediaInfo_(); // one or both loaders has not loaded sufficently to get codecs\n\n if (!hasMainMediaInfo || !hasAudioMediaInfo) {\n return false;\n }\n return true;\n }\n getCodecsOrExclude_() {\n const media = {\n main: this.mainSegmentLoader_.getCurrentMediaInfo_() || {},\n audio: this.audioSegmentLoader_.getCurrentMediaInfo_() || {}\n };\n const playlist = this.mainSegmentLoader_.getPendingSegmentPlaylist() || this.media(); // set \"main\" media equal to video\n\n media.video = media.main;\n const playlistCodecs = codecsForPlaylist(this.main(), playlist);\n const codecs = {};\n const usingAudioLoader = !!this.mediaTypes_.AUDIO.activePlaylistLoader;\n if (media.main.hasVideo) {\n codecs.video = playlistCodecs.video || media.main.videoCodec || DEFAULT_VIDEO_CODEC;\n }\n if (media.main.isMuxed) {\n codecs.video += `,${playlistCodecs.audio || media.main.audioCodec || DEFAULT_AUDIO_CODEC}`;\n }\n if (media.main.hasAudio && !media.main.isMuxed || media.audio.hasAudio || usingAudioLoader) {\n codecs.audio = playlistCodecs.audio || media.main.audioCodec || media.audio.audioCodec || DEFAULT_AUDIO_CODEC; // set audio isFmp4 so we use the correct \"supports\" function below\n\n media.audio.isFmp4 = media.main.hasAudio && !media.main.isMuxed ? media.main.isFmp4 : media.audio.isFmp4;\n } // no codecs, no playback.\n\n if (!codecs.audio && !codecs.video) {\n this.excludePlaylist({\n playlistToExclude: playlist,\n error: {\n message: 'Could not determine codecs for playlist.'\n },\n playlistExclusionDuration: Infinity\n });\n return;\n } // fmp4 relies on browser support, while ts relies on muxer support\n\n const supportFunction = (isFmp4, codec) => isFmp4 ? browserSupportsCodec(codec) : muxerSupportsCodec(codec);\n const unsupportedCodecs = {};\n let unsupportedAudio;\n ['video', 'audio'].forEach(function (type) {\n if (codecs.hasOwnProperty(type) && !supportFunction(media[type].isFmp4, codecs[type])) {\n const supporter = media[type].isFmp4 ? 'browser' : 'muxer';\n unsupportedCodecs[supporter] = unsupportedCodecs[supporter] || [];\n unsupportedCodecs[supporter].push(codecs[type]);\n if (type === 'audio') {\n unsupportedAudio = supporter;\n }\n }\n });\n if (usingAudioLoader && unsupportedAudio && playlist.attributes.AUDIO) {\n const audioGroup = playlist.attributes.AUDIO;\n this.main().playlists.forEach(variant => {\n const variantAudioGroup = variant.attributes && variant.attributes.AUDIO;\n if (variantAudioGroup === audioGroup && variant !== playlist) {\n variant.excludeUntil = Infinity;\n }\n });\n this.logger_(`excluding audio group ${audioGroup} as ${unsupportedAudio} does not support codec(s): \"${codecs.audio}\"`);\n } // if we have any unsupported codecs exclude this playlist.\n\n if (Object.keys(unsupportedCodecs).length) {\n const message = Object.keys(unsupportedCodecs).reduce((acc, supporter) => {\n if (acc) {\n acc += ', ';\n }\n acc += `${supporter} does not support codec(s): \"${unsupportedCodecs[supporter].join(',')}\"`;\n return acc;\n }, '') + '.';\n this.excludePlaylist({\n playlistToExclude: playlist,\n error: {\n internal: true,\n message\n },\n playlistExclusionDuration: Infinity\n });\n return;\n } // check if codec switching is happening\n\n if (this.sourceUpdater_.hasCreatedSourceBuffers() && !this.sourceUpdater_.canChangeType()) {\n const switchMessages = [];\n ['video', 'audio'].forEach(type => {\n const newCodec = (parseCodecs(this.sourceUpdater_.codecs[type] || '')[0] || {}).type;\n const oldCodec = (parseCodecs(codecs[type] || '')[0] || {}).type;\n if (newCodec && oldCodec && newCodec.toLowerCase() !== oldCodec.toLowerCase()) {\n switchMessages.push(`\"${this.sourceUpdater_.codecs[type]}\" -> \"${codecs[type]}\"`);\n }\n });\n if (switchMessages.length) {\n this.excludePlaylist({\n playlistToExclude: playlist,\n error: {\n message: `Codec switching not supported: ${switchMessages.join(', ')}.`,\n internal: true\n },\n playlistExclusionDuration: Infinity\n });\n return;\n }\n } // TODO: when using the muxer shouldn't we just return\n // the codecs that the muxer outputs?\n\n return codecs;\n }\n /**\n * Create source buffers and exlude any incompatible renditions.\n *\n * @private\n */\n\n tryToCreateSourceBuffers_() {\n // media source is not ready yet or sourceBuffers are already\n // created.\n if (this.mediaSource.readyState !== 'open' || this.sourceUpdater_.hasCreatedSourceBuffers()) {\n return;\n }\n if (!this.areMediaTypesKnown_()) {\n return;\n }\n const codecs = this.getCodecsOrExclude_(); // no codecs means that the playlist was excluded\n\n if (!codecs) {\n return;\n }\n this.sourceUpdater_.createSourceBuffers(codecs);\n const codecString = [codecs.video, codecs.audio].filter(Boolean).join(',');\n this.excludeIncompatibleVariants_(codecString);\n }\n /**\n * Excludes playlists with codecs that are unsupported by the muxer and browser.\n */\n\n excludeUnsupportedVariants_() {\n const playlists = this.main().playlists;\n const ids = []; // TODO: why don't we have a property to loop through all\n // playlist? Why did we ever mix indexes and keys?\n\n Object.keys(playlists).forEach(key => {\n const variant = playlists[key]; // check if we already processed this playlist.\n\n if (ids.indexOf(variant.id) !== -1) {\n return;\n }\n ids.push(variant.id);\n const codecs = codecsForPlaylist(this.main, variant);\n const unsupported = [];\n if (codecs.audio && !muxerSupportsCodec(codecs.audio) && !browserSupportsCodec(codecs.audio)) {\n unsupported.push(`audio codec ${codecs.audio}`);\n }\n if (codecs.video && !muxerSupportsCodec(codecs.video) && !browserSupportsCodec(codecs.video)) {\n unsupported.push(`video codec ${codecs.video}`);\n }\n if (codecs.text && codecs.text === 'stpp.ttml.im1t') {\n unsupported.push(`text codec ${codecs.text}`);\n }\n if (unsupported.length) {\n variant.excludeUntil = Infinity;\n this.logger_(`excluding ${variant.id} for unsupported: ${unsupported.join(', ')}`);\n }\n });\n }\n /**\n * Exclude playlists that are known to be codec or\n * stream-incompatible with the SourceBuffer configuration. For\n * instance, Media Source Extensions would cause the video element to\n * stall waiting for video data if you switched from a variant with\n * video and audio to an audio-only one.\n *\n * @param {Object} media a media playlist compatible with the current\n * set of SourceBuffers. Variants in the current main playlist that\n * do not appear to have compatible codec or stream configurations\n * will be excluded from the default playlist selection algorithm\n * indefinitely.\n * @private\n */\n\n excludeIncompatibleVariants_(codecString) {\n const ids = [];\n const playlists = this.main().playlists;\n const codecs = unwrapCodecList(parseCodecs(codecString));\n const codecCount_ = codecCount(codecs);\n const videoDetails = codecs.video && parseCodecs(codecs.video)[0] || null;\n const audioDetails = codecs.audio && parseCodecs(codecs.audio)[0] || null;\n Object.keys(playlists).forEach(key => {\n const variant = playlists[key]; // check if we already processed this playlist.\n // or it if it is already excluded forever.\n\n if (ids.indexOf(variant.id) !== -1 || variant.excludeUntil === Infinity) {\n return;\n }\n ids.push(variant.id);\n const exclusionReasons = []; // get codecs from the playlist for this variant\n\n const variantCodecs = codecsForPlaylist(this.mainPlaylistLoader_.main, variant);\n const variantCodecCount = codecCount(variantCodecs); // if no codecs are listed, we cannot determine that this\n // variant is incompatible. Wait for mux.js to probe\n\n if (!variantCodecs.audio && !variantCodecs.video) {\n return;\n } // TODO: we can support this by removing the\n // old media source and creating a new one, but it will take some work.\n // The number of streams cannot change\n\n if (variantCodecCount !== codecCount_) {\n exclusionReasons.push(`codec count \"${variantCodecCount}\" !== \"${codecCount_}\"`);\n } // only exclude playlists by codec change, if codecs cannot switch\n // during playback.\n\n if (!this.sourceUpdater_.canChangeType()) {\n const variantVideoDetails = variantCodecs.video && parseCodecs(variantCodecs.video)[0] || null;\n const variantAudioDetails = variantCodecs.audio && parseCodecs(variantCodecs.audio)[0] || null; // the video codec cannot change\n\n if (variantVideoDetails && videoDetails && variantVideoDetails.type.toLowerCase() !== videoDetails.type.toLowerCase()) {\n exclusionReasons.push(`video codec \"${variantVideoDetails.type}\" !== \"${videoDetails.type}\"`);\n } // the audio codec cannot change\n\n if (variantAudioDetails && audioDetails && variantAudioDetails.type.toLowerCase() !== audioDetails.type.toLowerCase()) {\n exclusionReasons.push(`audio codec \"${variantAudioDetails.type}\" !== \"${audioDetails.type}\"`);\n }\n }\n if (exclusionReasons.length) {\n variant.excludeUntil = Infinity;\n this.logger_(`excluding ${variant.id}: ${exclusionReasons.join(' && ')}`);\n }\n });\n }\n updateAdCues_(media) {\n let offset = 0;\n const seekable = this.seekable();\n if (seekable.length) {\n offset = seekable.start(0);\n }\n updateAdCues(media, this.cueTagsTrack_, offset);\n }\n /**\n * Calculates the desired forward buffer length based on current time\n *\n * @return {number} Desired forward buffer length in seconds\n */\n\n goalBufferLength() {\n const currentTime = this.tech_.currentTime();\n const initial = Config.GOAL_BUFFER_LENGTH;\n const rate = Config.GOAL_BUFFER_LENGTH_RATE;\n const max = Math.max(initial, Config.MAX_GOAL_BUFFER_LENGTH);\n return Math.min(initial + currentTime * rate, max);\n }\n /**\n * Calculates the desired buffer low water line based on current time\n *\n * @return {number} Desired buffer low water line in seconds\n */\n\n bufferLowWaterLine() {\n const currentTime = this.tech_.currentTime();\n const initial = Config.BUFFER_LOW_WATER_LINE;\n const rate = Config.BUFFER_LOW_WATER_LINE_RATE;\n const max = Math.max(initial, Config.MAX_BUFFER_LOW_WATER_LINE);\n const newMax = Math.max(initial, Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);\n return Math.min(initial + currentTime * rate, this.bufferBasedABR ? newMax : max);\n }\n bufferHighWaterLine() {\n return Config.BUFFER_HIGH_WATER_LINE;\n }\n addDateRangesToTextTrack_(dateRanges) {\n createMetadataTrackIfNotExists(this.inbandTextTracks_, 'com.apple.streaming', this.tech_);\n addDateRangeMetadata({\n inbandTextTracks: this.inbandTextTracks_,\n dateRanges\n });\n }\n addMetadataToTextTrack(dispatchType, metadataArray, videoDuration) {\n const timestampOffset = this.sourceUpdater_.videoBuffer ? this.sourceUpdater_.videoTimestampOffset() : this.sourceUpdater_.audioTimestampOffset(); // There's potentially an issue where we could double add metadata if there's a muxed\n // audio/video source with a metadata track, and an alt audio with a metadata track.\n // However, this probably won't happen, and if it does it can be handled then.\n\n createMetadataTrackIfNotExists(this.inbandTextTracks_, dispatchType, this.tech_);\n addMetadata({\n inbandTextTracks: this.inbandTextTracks_,\n metadataArray,\n timestampOffset,\n videoDuration\n });\n }\n /**\n * Utility for getting the pathway or service location from an HLS or DASH playlist.\n *\n * @param {Object} playlist for getting pathway from.\n * @return the pathway attribute of a playlist\n */\n\n pathwayAttribute_(playlist) {\n return playlist.attributes['PATHWAY-ID'] || playlist.attributes.serviceLocation;\n }\n /**\n * Initialize available pathways and apply the tag properties.\n */\n\n initContentSteeringController_() {\n const main = this.main();\n if (!main.contentSteering) {\n return;\n }\n for (const playlist of main.playlists) {\n this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(playlist));\n }\n this.contentSteeringController_.assignTagProperties(main.uri, main.contentSteering); // request the steering manifest immediately if queryBeforeStart is set.\n\n if (this.contentSteeringController_.queryBeforeStart) {\n // When queryBeforeStart is true, initial request should omit steering parameters.\n this.contentSteeringController_.requestSteeringManifest(true);\n return;\n } // otherwise start content steering after playback starts\n\n this.tech_.one('canplay', () => {\n this.contentSteeringController_.requestSteeringManifest();\n });\n }\n /**\n * Reset the content steering controller and re-init.\n */\n\n resetContentSteeringController_() {\n this.contentSteeringController_.clearAvailablePathways();\n this.contentSteeringController_.dispose();\n this.initContentSteeringController_();\n }\n /**\n * Attaches the listeners for content steering.\n */\n\n attachContentSteeringListeners_() {\n this.contentSteeringController_.on('content-steering', this.excludeThenChangePathway_.bind(this));\n if (this.sourceType_ === 'dash') {\n this.mainPlaylistLoader_.on('loadedplaylist', () => {\n const main = this.main(); // check if steering tag or pathways changed.\n\n const didDashTagChange = this.contentSteeringController_.didDASHTagChange(main.uri, main.contentSteering);\n const didPathwaysChange = () => {\n const availablePathways = this.contentSteeringController_.getAvailablePathways();\n const newPathways = [];\n for (const playlist of main.playlists) {\n const serviceLocation = playlist.attributes.serviceLocation;\n if (serviceLocation) {\n newPathways.push(serviceLocation);\n if (!availablePathways.has(serviceLocation)) {\n return true;\n }\n }\n } // If we have no new serviceLocations and previously had availablePathways\n\n if (!newPathways.length && availablePathways.size) {\n return true;\n }\n return false;\n };\n if (didDashTagChange || didPathwaysChange()) {\n this.resetContentSteeringController_();\n }\n });\n }\n }\n /**\n * Simple exclude and change playlist logic for content steering.\n */\n\n excludeThenChangePathway_() {\n const currentPathway = this.contentSteeringController_.getPathway();\n if (!currentPathway) {\n return;\n }\n this.handlePathwayClones_();\n const main = this.main();\n const playlists = main.playlists;\n const ids = new Set();\n let didEnablePlaylists = false;\n Object.keys(playlists).forEach(key => {\n const variant = playlists[key];\n const pathwayId = this.pathwayAttribute_(variant);\n const differentPathwayId = pathwayId && currentPathway !== pathwayId;\n const steeringExclusion = variant.excludeUntil === Infinity && variant.lastExcludeReason_ === 'content-steering';\n if (steeringExclusion && !differentPathwayId) {\n delete variant.excludeUntil;\n delete variant.lastExcludeReason_;\n didEnablePlaylists = true;\n }\n const noExcludeUntil = !variant.excludeUntil && variant.excludeUntil !== Infinity;\n const shouldExclude = !ids.has(variant.id) && differentPathwayId && noExcludeUntil;\n if (!shouldExclude) {\n return;\n }\n ids.add(variant.id);\n variant.excludeUntil = Infinity;\n variant.lastExcludeReason_ = 'content-steering'; // TODO: kind of spammy, maybe move this.\n\n this.logger_(`excluding ${variant.id} for ${variant.lastExcludeReason_}`);\n });\n if (this.contentSteeringController_.manifestType_ === 'DASH') {\n Object.keys(this.mediaTypes_).forEach(key => {\n const type = this.mediaTypes_[key];\n if (type.activePlaylistLoader) {\n const currentPlaylist = type.activePlaylistLoader.media_; // Check if the current media playlist matches the current CDN\n\n if (currentPlaylist && currentPlaylist.attributes.serviceLocation !== currentPathway) {\n didEnablePlaylists = true;\n }\n }\n });\n }\n if (didEnablePlaylists) {\n this.changeSegmentPathway_();\n }\n }\n /**\n * Add, update, or delete playlists and media groups for\n * the pathway clones for HLS Content Steering.\n *\n * See https://datatracker.ietf.org/doc/draft-pantos-hls-rfc8216bis/\n *\n * NOTE: Pathway cloning does not currently support the `PER_VARIANT_URIS` and\n * `PER_RENDITION_URIS` as we do not handle `STABLE-VARIANT-ID` or\n * `STABLE-RENDITION-ID` values.\n */\n\n handlePathwayClones_() {\n const main = this.main();\n const playlists = main.playlists;\n const currentPathwayClones = this.contentSteeringController_.currentPathwayClones;\n const nextPathwayClones = this.contentSteeringController_.nextPathwayClones;\n const hasClones = currentPathwayClones && currentPathwayClones.size || nextPathwayClones && nextPathwayClones.size;\n if (!hasClones) {\n return;\n }\n for (const [id, clone] of currentPathwayClones.entries()) {\n const newClone = nextPathwayClones.get(id); // Delete the old pathway clone.\n\n if (!newClone) {\n this.mainPlaylistLoader_.updateOrDeleteClone(clone);\n this.contentSteeringController_.excludePathway(id);\n }\n }\n for (const [id, clone] of nextPathwayClones.entries()) {\n const oldClone = currentPathwayClones.get(id); // Create a new pathway if it is a new pathway clone object.\n\n if (!oldClone) {\n const playlistsToClone = playlists.filter(p => {\n return p.attributes['PATHWAY-ID'] === clone['BASE-ID'];\n });\n playlistsToClone.forEach(p => {\n this.mainPlaylistLoader_.addClonePathway(clone, p);\n });\n this.contentSteeringController_.addAvailablePathway(id);\n continue;\n } // There have not been changes to the pathway clone object, so skip.\n\n if (this.equalPathwayClones_(oldClone, clone)) {\n continue;\n } // Update a preexisting cloned pathway.\n // True is set for the update flag.\n\n this.mainPlaylistLoader_.updateOrDeleteClone(clone, true);\n this.contentSteeringController_.addAvailablePathway(id);\n } // Deep copy contents of next to current pathways.\n\n this.contentSteeringController_.currentPathwayClones = new Map(JSON.parse(JSON.stringify([...nextPathwayClones])));\n }\n /**\n * Determines whether two pathway clone objects are equivalent.\n *\n * @param {Object} a The first pathway clone object.\n * @param {Object} b The second pathway clone object.\n * @return {boolean} True if the pathway clone objects are equal, false otherwise.\n */\n\n equalPathwayClones_(a, b) {\n if (a['BASE-ID'] !== b['BASE-ID'] || a.ID !== b.ID || a['URI-REPLACEMENT'].HOST !== b['URI-REPLACEMENT'].HOST) {\n return false;\n }\n const aParams = a['URI-REPLACEMENT'].PARAMS;\n const bParams = b['URI-REPLACEMENT'].PARAMS; // We need to iterate through both lists of params because one could be\n // missing a parameter that the other has.\n\n for (const p in aParams) {\n if (aParams[p] !== bParams[p]) {\n return false;\n }\n }\n for (const p in bParams) {\n if (aParams[p] !== bParams[p]) {\n return false;\n }\n }\n return true;\n }\n /**\n * Changes the current playlists for audio, video and subtitles after a new pathway\n * is chosen from content steering.\n */\n\n changeSegmentPathway_() {\n const nextPlaylist = this.selectPlaylist();\n this.pauseLoading(); // Switch audio and text track playlists if necessary in DASH\n\n if (this.contentSteeringController_.manifestType_ === 'DASH') {\n this.switchMediaForDASHContentSteering_();\n }\n this.switchMedia_(nextPlaylist, 'content-steering');\n }\n /**\n * Iterates through playlists and check their keyId set and compare with the\n * keyStatusMap, only enable playlists that have a usable key. If the playlist\n * has no keyId leave it enabled by default.\n */\n\n excludeNonUsablePlaylistsByKeyId_() {\n if (!this.mainPlaylistLoader_ || !this.mainPlaylistLoader_.main) {\n return;\n }\n let nonUsableKeyStatusCount = 0;\n const NON_USABLE = 'non-usable';\n this.mainPlaylistLoader_.main.playlists.forEach(playlist => {\n const keyIdSet = this.mainPlaylistLoader_.getKeyIdSet(playlist); // If the playlist doesn't have keyIDs lets not exclude it.\n\n if (!keyIdSet || !keyIdSet.size) {\n return;\n }\n keyIdSet.forEach(key => {\n const USABLE = 'usable';\n const hasUsableKeyStatus = this.keyStatusMap_.has(key) && this.keyStatusMap_.get(key) === USABLE;\n const nonUsableExclusion = playlist.lastExcludeReason_ === NON_USABLE && playlist.excludeUntil === Infinity;\n if (!hasUsableKeyStatus) {\n // Only exclude playlists that haven't already been excluded as non-usable.\n if (playlist.excludeUntil !== Infinity && playlist.lastExcludeReason_ !== NON_USABLE) {\n playlist.excludeUntil = Infinity;\n playlist.lastExcludeReason_ = NON_USABLE;\n this.logger_(`excluding playlist ${playlist.id} because the key ID ${key} doesn't exist in the keyStatusMap or is not ${USABLE}`);\n } // count all nonUsableKeyStatus\n\n nonUsableKeyStatusCount++;\n } else if (hasUsableKeyStatus && nonUsableExclusion) {\n delete playlist.excludeUntil;\n delete playlist.lastExcludeReason_;\n this.logger_(`enabling playlist ${playlist.id} because key ID ${key} is ${USABLE}`);\n }\n });\n }); // If for whatever reason every playlist has a non usable key status. Lets try re-including the SD renditions as a failsafe.\n\n if (nonUsableKeyStatusCount >= this.mainPlaylistLoader_.main.playlists.length) {\n this.mainPlaylistLoader_.main.playlists.forEach(playlist => {\n const isNonHD = playlist && playlist.attributes && playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height < 720;\n const excludedForNonUsableKey = playlist.excludeUntil === Infinity && playlist.lastExcludeReason_ === NON_USABLE;\n if (isNonHD && excludedForNonUsableKey) {\n // Only delete the excludeUntil so we don't try and re-exclude these playlists.\n delete playlist.excludeUntil;\n videojs.log.warn(`enabling non-HD playlist ${playlist.id} because all playlists were excluded due to ${NON_USABLE} key IDs`);\n }\n });\n }\n }\n /**\n * Adds a keystatus to the keystatus map, tries to convert to string if necessary.\n *\n * @param {any} keyId the keyId to add a status for\n * @param {string} status the status of the keyId\n */\n\n addKeyStatus_(keyId, status) {\n const isString = typeof keyId === 'string';\n const keyIdHexString = isString ? keyId : bufferToHexString(keyId);\n const formattedKeyIdString = keyIdHexString.slice(0, 32).toLowerCase();\n this.logger_(`KeyStatus '${status}' with key ID ${formattedKeyIdString} added to the keyStatusMap`);\n this.keyStatusMap_.set(formattedKeyIdString, status);\n }\n /**\n * Utility function for adding key status to the keyStatusMap and filtering usable encrypted playlists.\n *\n * @param {any} keyId the keyId from the keystatuschange event\n * @param {string} status the key status string\n */\n\n updatePlaylistByKeyStatus(keyId, status) {\n this.addKeyStatus_(keyId, status);\n if (!this.waitingForFastQualityPlaylistReceived_) {\n this.excludeNonUsableThenChangePlaylist_();\n } // Listen to loadedplaylist with a single listener and check for new contentProtection elements when a playlist is updated.\n\n this.mainPlaylistLoader_.off('loadedplaylist', this.excludeNonUsableThenChangePlaylist_.bind(this));\n this.mainPlaylistLoader_.on('loadedplaylist', this.excludeNonUsableThenChangePlaylist_.bind(this));\n }\n excludeNonUsableThenChangePlaylist_() {\n this.excludeNonUsablePlaylistsByKeyId_();\n this.fastQualityChange_();\n }\n}\n\n/**\n * Returns a function that acts as the Enable/disable playlist function.\n *\n * @param {PlaylistLoader} loader - The main playlist loader\n * @param {string} playlistID - id of the playlist\n * @param {Function} changePlaylistFn - A function to be called after a\n * playlist's enabled-state has been changed. Will NOT be called if a\n * playlist's enabled-state is unchanged\n * @param {boolean=} enable - Value to set the playlist enabled-state to\n * or if undefined returns the current enabled-state for the playlist\n * @return {Function} Function for setting/getting enabled\n */\n\nconst enableFunction = (loader, playlistID, changePlaylistFn) => enable => {\n const playlist = loader.main.playlists[playlistID];\n const incompatible = isIncompatible(playlist);\n const currentlyEnabled = isEnabled(playlist);\n if (typeof enable === 'undefined') {\n return currentlyEnabled;\n }\n if (enable) {\n delete playlist.disabled;\n } else {\n playlist.disabled = true;\n }\n if (enable !== currentlyEnabled && !incompatible) {\n // Ensure the outside world knows about our changes\n changePlaylistFn();\n if (enable) {\n loader.trigger('renditionenabled');\n } else {\n loader.trigger('renditiondisabled');\n }\n }\n return enable;\n};\n/**\n * The representation object encapsulates the publicly visible information\n * in a media playlist along with a setter/getter-type function (enabled)\n * for changing the enabled-state of a particular playlist entry\n *\n * @class Representation\n */\n\nclass Representation {\n constructor(vhsHandler, playlist, id) {\n const {\n playlistController_: pc\n } = vhsHandler;\n const qualityChangeFunction = pc.fastQualityChange_.bind(pc); // some playlist attributes are optional\n\n if (playlist.attributes) {\n const resolution = playlist.attributes.RESOLUTION;\n this.width = resolution && resolution.width;\n this.height = resolution && resolution.height;\n this.bandwidth = playlist.attributes.BANDWIDTH;\n this.frameRate = playlist.attributes['FRAME-RATE'];\n }\n this.codecs = codecsForPlaylist(pc.main(), playlist);\n this.playlist = playlist; // The id is simply the ordinality of the media playlist\n // within the main playlist\n\n this.id = id; // Partially-apply the enableFunction to create a playlist-\n // specific variant\n\n this.enabled = enableFunction(vhsHandler.playlists, playlist.id, qualityChangeFunction);\n }\n}\n/**\n * A mixin function that adds the `representations` api to an instance\n * of the VhsHandler class\n *\n * @param {VhsHandler} vhsHandler - An instance of VhsHandler to add the\n * representation API into\n */\n\nconst renditionSelectionMixin = function (vhsHandler) {\n // Add a single API-specific function to the VhsHandler instance\n vhsHandler.representations = () => {\n const main = vhsHandler.playlistController_.main();\n const playlists = isAudioOnly(main) ? vhsHandler.playlistController_.getAudioTrackPlaylists_() : main.playlists;\n if (!playlists) {\n return [];\n }\n return playlists.filter(media => !isIncompatible(media)).map((e, i) => new Representation(vhsHandler, e, e.id));\n };\n};\n\n/**\n * @file playback-watcher.js\n *\n * Playback starts, and now my watch begins. It shall not end until my death. I shall\n * take no wait, hold no uncleared timeouts, father no bad seeks. I shall wear no crowns\n * and win no glory. I shall live and die at my post. I am the corrector of the underflow.\n * I am the watcher of gaps. I am the shield that guards the realms of seekable. I pledge\n * my life and honor to the Playback Watch, for this Player and all the Players to come.\n */\n\nconst timerCancelEvents = ['seeking', 'seeked', 'pause', 'playing', 'error'];\n/**\n * @class PlaybackWatcher\n */\n\nclass PlaybackWatcher {\n /**\n * Represents an PlaybackWatcher object.\n *\n * @class\n * @param {Object} options an object that includes the tech and settings\n */\n constructor(options) {\n this.playlistController_ = options.playlistController;\n this.tech_ = options.tech;\n this.seekable = options.seekable;\n this.allowSeeksWithinUnsafeLiveWindow = options.allowSeeksWithinUnsafeLiveWindow;\n this.liveRangeSafeTimeDelta = options.liveRangeSafeTimeDelta;\n this.media = options.media;\n this.consecutiveUpdates = 0;\n this.lastRecordedTime = null;\n this.checkCurrentTimeTimeout_ = null;\n this.logger_ = logger('PlaybackWatcher');\n this.logger_('initialize');\n const playHandler = () => this.monitorCurrentTime_();\n const canPlayHandler = () => this.monitorCurrentTime_();\n const waitingHandler = () => this.techWaiting_();\n const cancelTimerHandler = () => this.resetTimeUpdate_();\n const pc = this.playlistController_;\n const loaderTypes = ['main', 'subtitle', 'audio'];\n const loaderChecks = {};\n loaderTypes.forEach(type => {\n loaderChecks[type] = {\n reset: () => this.resetSegmentDownloads_(type),\n updateend: () => this.checkSegmentDownloads_(type)\n };\n pc[`${type}SegmentLoader_`].on('appendsdone', loaderChecks[type].updateend); // If a rendition switch happens during a playback stall where the buffer\n // isn't changing we want to reset. We cannot assume that the new rendition\n // will also be stalled, until after new appends.\n\n pc[`${type}SegmentLoader_`].on('playlistupdate', loaderChecks[type].reset); // Playback stalls should not be detected right after seeking.\n // This prevents one segment playlists (single vtt or single segment content)\n // from being detected as stalling. As the buffer will not change in those cases, since\n // the buffer is the entire video duration.\n\n this.tech_.on(['seeked', 'seeking'], loaderChecks[type].reset);\n });\n /**\n * We check if a seek was into a gap through the following steps:\n * 1. We get a seeking event and we do not get a seeked event. This means that\n * a seek was attempted but not completed.\n * 2. We run `fixesBadSeeks_` on segment loader appends. This means that we already\n * removed everything from our buffer and appended a segment, and should be ready\n * to check for gaps.\n */\n\n const setSeekingHandlers = fn => {\n ['main', 'audio'].forEach(type => {\n pc[`${type}SegmentLoader_`][fn]('appended', this.seekingAppendCheck_);\n });\n };\n this.seekingAppendCheck_ = () => {\n if (this.fixesBadSeeks_()) {\n this.consecutiveUpdates = 0;\n this.lastRecordedTime = this.tech_.currentTime();\n setSeekingHandlers('off');\n }\n };\n this.clearSeekingAppendCheck_ = () => setSeekingHandlers('off');\n this.watchForBadSeeking_ = () => {\n this.clearSeekingAppendCheck_();\n setSeekingHandlers('on');\n };\n this.tech_.on('seeked', this.clearSeekingAppendCheck_);\n this.tech_.on('seeking', this.watchForBadSeeking_);\n this.tech_.on('waiting', waitingHandler);\n this.tech_.on(timerCancelEvents, cancelTimerHandler);\n this.tech_.on('canplay', canPlayHandler);\n /*\n An edge case exists that results in gaps not being skipped when they exist at the beginning of a stream. This case\n is surfaced in one of two ways:\n 1) The `waiting` event is fired before the player has buffered content, making it impossible\n to find or skip the gap. The `waiting` event is followed by a `play` event. On first play\n we can check if playback is stalled due to a gap, and skip the gap if necessary.\n 2) A source with a gap at the beginning of the stream is loaded programatically while the player\n is in a playing state. To catch this case, it's important that our one-time play listener is setup\n even if the player is in a playing state\n */\n\n this.tech_.one('play', playHandler); // Define the dispose function to clean up our events\n\n this.dispose = () => {\n this.clearSeekingAppendCheck_();\n this.logger_('dispose');\n this.tech_.off('waiting', waitingHandler);\n this.tech_.off(timerCancelEvents, cancelTimerHandler);\n this.tech_.off('canplay', canPlayHandler);\n this.tech_.off('play', playHandler);\n this.tech_.off('seeking', this.watchForBadSeeking_);\n this.tech_.off('seeked', this.clearSeekingAppendCheck_);\n loaderTypes.forEach(type => {\n pc[`${type}SegmentLoader_`].off('appendsdone', loaderChecks[type].updateend);\n pc[`${type}SegmentLoader_`].off('playlistupdate', loaderChecks[type].reset);\n this.tech_.off(['seeked', 'seeking'], loaderChecks[type].reset);\n });\n if (this.checkCurrentTimeTimeout_) {\n window$1.clearTimeout(this.checkCurrentTimeTimeout_);\n }\n this.resetTimeUpdate_();\n };\n }\n /**\n * Periodically check current time to see if playback stopped\n *\n * @private\n */\n\n monitorCurrentTime_() {\n this.checkCurrentTime_();\n if (this.checkCurrentTimeTimeout_) {\n window$1.clearTimeout(this.checkCurrentTimeTimeout_);\n } // 42 = 24 fps // 250 is what Webkit uses // FF uses 15\n\n this.checkCurrentTimeTimeout_ = window$1.setTimeout(this.monitorCurrentTime_.bind(this), 250);\n }\n /**\n * Reset stalled download stats for a specific type of loader\n *\n * @param {string} type\n * The segment loader type to check.\n *\n * @listens SegmentLoader#playlistupdate\n * @listens Tech#seeking\n * @listens Tech#seeked\n */\n\n resetSegmentDownloads_(type) {\n const loader = this.playlistController_[`${type}SegmentLoader_`];\n if (this[`${type}StalledDownloads_`] > 0) {\n this.logger_(`resetting possible stalled download count for ${type} loader`);\n }\n this[`${type}StalledDownloads_`] = 0;\n this[`${type}Buffered_`] = loader.buffered_();\n }\n /**\n * Checks on every segment `appendsdone` to see\n * if segment appends are making progress. If they are not\n * and we are still downloading bytes. We exclude the playlist.\n *\n * @param {string} type\n * The segment loader type to check.\n *\n * @listens SegmentLoader#appendsdone\n */\n\n checkSegmentDownloads_(type) {\n const pc = this.playlistController_;\n const loader = pc[`${type}SegmentLoader_`];\n const buffered = loader.buffered_();\n const isBufferedDifferent = isRangeDifferent(this[`${type}Buffered_`], buffered);\n this[`${type}Buffered_`] = buffered; // if another watcher is going to fix the issue or\n // the buffered value for this loader changed\n // appends are working\n\n if (isBufferedDifferent) {\n this.resetSegmentDownloads_(type);\n return;\n }\n this[`${type}StalledDownloads_`]++;\n this.logger_(`found #${this[`${type}StalledDownloads_`]} ${type} appends that did not increase buffer (possible stalled download)`, {\n playlistId: loader.playlist_ && loader.playlist_.id,\n buffered: timeRangesToArray(buffered)\n }); // after 10 possibly stalled appends with no reset, exclude\n\n if (this[`${type}StalledDownloads_`] < 10) {\n return;\n }\n this.logger_(`${type} loader stalled download exclusion`);\n this.resetSegmentDownloads_(type);\n this.tech_.trigger({\n type: 'usage',\n name: `vhs-${type}-download-exclusion`\n });\n if (type === 'subtitle') {\n return;\n } // TODO: should we exclude audio tracks rather than main tracks\n // when type is audio?\n\n pc.excludePlaylist({\n error: {\n message: `Excessive ${type} segment downloading detected.`\n },\n playlistExclusionDuration: Infinity\n });\n }\n /**\n * The purpose of this function is to emulate the \"waiting\" event on\n * browsers that do not emit it when they are waiting for more\n * data to continue playback\n *\n * @private\n */\n\n checkCurrentTime_() {\n if (this.tech_.paused() || this.tech_.seeking()) {\n return;\n }\n const currentTime = this.tech_.currentTime();\n const buffered = this.tech_.buffered();\n if (this.lastRecordedTime === currentTime && (!buffered.length || currentTime + SAFE_TIME_DELTA >= buffered.end(buffered.length - 1))) {\n // If current time is at the end of the final buffered region, then any playback\n // stall is most likely caused by buffering in a low bandwidth environment. The tech\n // should fire a `waiting` event in this scenario, but due to browser and tech\n // inconsistencies. Calling `techWaiting_` here allows us to simulate\n // responding to a native `waiting` event when the tech fails to emit one.\n return this.techWaiting_();\n }\n if (this.consecutiveUpdates >= 5 && currentTime === this.lastRecordedTime) {\n this.consecutiveUpdates++;\n this.waiting_();\n } else if (currentTime === this.lastRecordedTime) {\n this.consecutiveUpdates++;\n } else {\n this.consecutiveUpdates = 0;\n this.lastRecordedTime = currentTime;\n }\n }\n /**\n * Resets the 'timeupdate' mechanism designed to detect that we are stalled\n *\n * @private\n */\n\n resetTimeUpdate_() {\n this.consecutiveUpdates = 0;\n }\n /**\n * Fixes situations where there's a bad seek\n *\n * @return {boolean} whether an action was taken to fix the seek\n * @private\n */\n\n fixesBadSeeks_() {\n const seeking = this.tech_.seeking();\n if (!seeking) {\n return false;\n } // TODO: It's possible that these seekable checks should be moved out of this function\n // and into a function that runs on seekablechange. It's also possible that we only need\n // afterSeekableWindow as the buffered check at the bottom is good enough to handle before\n // seekable range.\n\n const seekable = this.seekable();\n const currentTime = this.tech_.currentTime();\n const isAfterSeekableRange = this.afterSeekableWindow_(seekable, currentTime, this.media(), this.allowSeeksWithinUnsafeLiveWindow);\n let seekTo;\n if (isAfterSeekableRange) {\n const seekableEnd = seekable.end(seekable.length - 1); // sync to live point (if VOD, our seekable was updated and we're simply adjusting)\n\n seekTo = seekableEnd;\n }\n if (this.beforeSeekableWindow_(seekable, currentTime)) {\n const seekableStart = seekable.start(0); // sync to the beginning of the live window\n // provide a buffer of .1 seconds to handle rounding/imprecise numbers\n\n seekTo = seekableStart + (\n // if the playlist is too short and the seekable range is an exact time (can\n // happen in live with a 3 segment playlist), then don't use a time delta\n seekableStart === seekable.end(0) ? 0 : SAFE_TIME_DELTA);\n }\n if (typeof seekTo !== 'undefined') {\n this.logger_(`Trying to seek outside of seekable at time ${currentTime} with ` + `seekable range ${printableRange(seekable)}. Seeking to ` + `${seekTo}.`);\n this.tech_.setCurrentTime(seekTo);\n return true;\n }\n const sourceUpdater = this.playlistController_.sourceUpdater_;\n const buffered = this.tech_.buffered();\n const audioBuffered = sourceUpdater.audioBuffer ? sourceUpdater.audioBuffered() : null;\n const videoBuffered = sourceUpdater.videoBuffer ? sourceUpdater.videoBuffered() : null;\n const media = this.media(); // verify that at least two segment durations or one part duration have been\n // appended before checking for a gap.\n\n const minAppendedDuration = media.partTargetDuration ? media.partTargetDuration : (media.targetDuration - TIME_FUDGE_FACTOR) * 2; // verify that at least two segment durations have been\n // appended before checking for a gap.\n\n const bufferedToCheck = [audioBuffered, videoBuffered];\n for (let i = 0; i < bufferedToCheck.length; i++) {\n // skip null buffered\n if (!bufferedToCheck[i]) {\n continue;\n }\n const timeAhead = timeAheadOf(bufferedToCheck[i], currentTime); // if we are less than two video/audio segment durations or one part\n // duration behind we haven't appended enough to call this a bad seek.\n\n if (timeAhead < minAppendedDuration) {\n return false;\n }\n }\n const nextRange = findNextRange(buffered, currentTime); // we have appended enough content, but we don't have anything buffered\n // to seek over the gap\n\n if (nextRange.length === 0) {\n return false;\n }\n seekTo = nextRange.start(0) + SAFE_TIME_DELTA;\n this.logger_(`Buffered region starts (${nextRange.start(0)}) ` + ` just beyond seek point (${currentTime}). Seeking to ${seekTo}.`);\n this.tech_.setCurrentTime(seekTo);\n return true;\n }\n /**\n * Handler for situations when we determine the player is waiting.\n *\n * @private\n */\n\n waiting_() {\n if (this.techWaiting_()) {\n return;\n } // All tech waiting checks failed. Use last resort correction\n\n const currentTime = this.tech_.currentTime();\n const buffered = this.tech_.buffered();\n const currentRange = findRange(buffered, currentTime); // Sometimes the player can stall for unknown reasons within a contiguous buffered\n // region with no indication that anything is amiss (seen in Firefox). Seeking to\n // currentTime is usually enough to kickstart the player. This checks that the player\n // is currently within a buffered region before attempting a corrective seek.\n // Chrome does not appear to continue `timeupdate` events after a `waiting` event\n // until there is ~ 3 seconds of forward buffer available. PlaybackWatcher should also\n // make sure there is ~3 seconds of forward buffer before taking any corrective action\n // to avoid triggering an `unknownwaiting` event when the network is slow.\n\n if (currentRange.length && currentTime + 3 <= currentRange.end(0)) {\n this.resetTimeUpdate_();\n this.tech_.setCurrentTime(currentTime);\n this.logger_(`Stopped at ${currentTime} while inside a buffered region ` + `[${currentRange.start(0)} -> ${currentRange.end(0)}]. Attempting to resume ` + 'playback by seeking to the current time.'); // unknown waiting corrections may be useful for monitoring QoS\n\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-unknown-waiting'\n });\n return;\n }\n }\n /**\n * Handler for situations when the tech fires a `waiting` event\n *\n * @return {boolean}\n * True if an action (or none) was needed to correct the waiting. False if no\n * checks passed\n * @private\n */\n\n techWaiting_() {\n const seekable = this.seekable();\n const currentTime = this.tech_.currentTime();\n if (this.tech_.seeking()) {\n // Tech is seeking or already waiting on another action, no action needed\n return true;\n }\n if (this.beforeSeekableWindow_(seekable, currentTime)) {\n const livePoint = seekable.end(seekable.length - 1);\n this.logger_(`Fell out of live window at time ${currentTime}. Seeking to ` + `live point (seekable end) ${livePoint}`);\n this.resetTimeUpdate_();\n this.tech_.setCurrentTime(livePoint); // live window resyncs may be useful for monitoring QoS\n\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-live-resync'\n });\n return true;\n }\n const sourceUpdater = this.tech_.vhs.playlistController_.sourceUpdater_;\n const buffered = this.tech_.buffered();\n const videoUnderflow = this.videoUnderflow_({\n audioBuffered: sourceUpdater.audioBuffered(),\n videoBuffered: sourceUpdater.videoBuffered(),\n currentTime\n });\n if (videoUnderflow) {\n // Even though the video underflowed and was stuck in a gap, the audio overplayed\n // the gap, leading currentTime into a buffered range. Seeking to currentTime\n // allows the video to catch up to the audio position without losing any audio\n // (only suffering ~3 seconds of frozen video and a pause in audio playback).\n this.resetTimeUpdate_();\n this.tech_.setCurrentTime(currentTime); // video underflow may be useful for monitoring QoS\n\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-video-underflow'\n });\n return true;\n }\n const nextRange = findNextRange(buffered, currentTime); // check for gap\n\n if (nextRange.length > 0) {\n this.logger_(`Stopped at ${currentTime} and seeking to ${nextRange.start(0)}`);\n this.resetTimeUpdate_();\n this.skipTheGap_(currentTime);\n return true;\n } // All checks failed. Returning false to indicate failure to correct waiting\n\n return false;\n }\n afterSeekableWindow_(seekable, currentTime, playlist, allowSeeksWithinUnsafeLiveWindow = false) {\n if (!seekable.length) {\n // we can't make a solid case if there's no seekable, default to false\n return false;\n }\n let allowedEnd = seekable.end(seekable.length - 1) + SAFE_TIME_DELTA;\n const isLive = !playlist.endList;\n const isLLHLS = typeof playlist.partTargetDuration === 'number';\n if (isLive && (isLLHLS || allowSeeksWithinUnsafeLiveWindow)) {\n allowedEnd = seekable.end(seekable.length - 1) + playlist.targetDuration * 3;\n }\n if (currentTime > allowedEnd) {\n return true;\n }\n return false;\n }\n beforeSeekableWindow_(seekable, currentTime) {\n if (seekable.length &&\n // can't fall before 0 and 0 seekable start identifies VOD stream\n seekable.start(0) > 0 && currentTime < seekable.start(0) - this.liveRangeSafeTimeDelta) {\n return true;\n }\n return false;\n }\n videoUnderflow_({\n videoBuffered,\n audioBuffered,\n currentTime\n }) {\n // audio only content will not have video underflow :)\n if (!videoBuffered) {\n return;\n }\n let gap; // find a gap in demuxed content.\n\n if (videoBuffered.length && audioBuffered.length) {\n // in Chrome audio will continue to play for ~3s when we run out of video\n // so we have to check that the video buffer did have some buffer in the\n // past.\n const lastVideoRange = findRange(videoBuffered, currentTime - 3);\n const videoRange = findRange(videoBuffered, currentTime);\n const audioRange = findRange(audioBuffered, currentTime);\n if (audioRange.length && !videoRange.length && lastVideoRange.length) {\n gap = {\n start: lastVideoRange.end(0),\n end: audioRange.end(0)\n };\n } // find a gap in muxed content.\n } else {\n const nextRange = findNextRange(videoBuffered, currentTime); // Even if there is no available next range, there is still a possibility we are\n // stuck in a gap due to video underflow.\n\n if (!nextRange.length) {\n gap = this.gapFromVideoUnderflow_(videoBuffered, currentTime);\n }\n }\n if (gap) {\n this.logger_(`Encountered a gap in video from ${gap.start} to ${gap.end}. ` + `Seeking to current time ${currentTime}`);\n return true;\n }\n return false;\n }\n /**\n * Timer callback. If playback still has not proceeded, then we seek\n * to the start of the next buffered region.\n *\n * @private\n */\n\n skipTheGap_(scheduledCurrentTime) {\n const buffered = this.tech_.buffered();\n const currentTime = this.tech_.currentTime();\n const nextRange = findNextRange(buffered, currentTime);\n this.resetTimeUpdate_();\n if (nextRange.length === 0 || currentTime !== scheduledCurrentTime) {\n return;\n }\n this.logger_('skipTheGap_:', 'currentTime:', currentTime, 'scheduled currentTime:', scheduledCurrentTime, 'nextRange start:', nextRange.start(0)); // only seek if we still have not played\n\n this.tech_.setCurrentTime(nextRange.start(0) + TIME_FUDGE_FACTOR);\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-gap-skip'\n });\n }\n gapFromVideoUnderflow_(buffered, currentTime) {\n // At least in Chrome, if there is a gap in the video buffer, the audio will continue\n // playing for ~3 seconds after the video gap starts. This is done to account for\n // video buffer underflow/underrun (note that this is not done when there is audio\n // buffer underflow/underrun -- in that case the video will stop as soon as it\n // encounters the gap, as audio stalls are more noticeable/jarring to a user than\n // video stalls). The player's time will reflect the playthrough of audio, so the\n // time will appear as if we are in a buffered region, even if we are stuck in a\n // \"gap.\"\n //\n // Example:\n // video buffer: 0 => 10.1, 10.2 => 20\n // audio buffer: 0 => 20\n // overall buffer: 0 => 10.1, 10.2 => 20\n // current time: 13\n //\n // Chrome's video froze at 10 seconds, where the video buffer encountered the gap,\n // however, the audio continued playing until it reached ~3 seconds past the gap\n // (13 seconds), at which point it stops as well. Since current time is past the\n // gap, findNextRange will return no ranges.\n //\n // To check for this issue, we see if there is a gap that starts somewhere within\n // a 3 second range (3 seconds +/- 1 second) back from our current time.\n const gaps = findGaps(buffered);\n for (let i = 0; i < gaps.length; i++) {\n const start = gaps.start(i);\n const end = gaps.end(i); // gap is starts no more than 4 seconds back\n\n if (currentTime - start < 4 && currentTime - start > 2) {\n return {\n start,\n end\n };\n }\n }\n return null;\n }\n}\nconst defaultOptions = {\n errorInterval: 30,\n getSource(next) {\n const tech = this.tech({\n IWillNotUseThisInPlugins: true\n });\n const sourceObj = tech.currentSource_ || this.currentSource();\n return next(sourceObj);\n }\n};\n/**\n * Main entry point for the plugin\n *\n * @param {Player} player a reference to a videojs Player instance\n * @param {Object} [options] an object with plugin options\n * @private\n */\n\nconst initPlugin = function (player, options) {\n let lastCalled = 0;\n let seekTo = 0;\n const localOptions = merge(defaultOptions, options);\n player.ready(() => {\n player.trigger({\n type: 'usage',\n name: 'vhs-error-reload-initialized'\n });\n });\n /**\n * Player modifications to perform that must wait until `loadedmetadata`\n * has been triggered\n *\n * @private\n */\n\n const loadedMetadataHandler = function () {\n if (seekTo) {\n player.currentTime(seekTo);\n }\n };\n /**\n * Set the source on the player element, play, and seek if necessary\n *\n * @param {Object} sourceObj An object specifying the source url and mime-type to play\n * @private\n */\n\n const setSource = function (sourceObj) {\n if (sourceObj === null || sourceObj === undefined) {\n return;\n }\n seekTo = player.duration() !== Infinity && player.currentTime() || 0;\n player.one('loadedmetadata', loadedMetadataHandler);\n player.src(sourceObj);\n player.trigger({\n type: 'usage',\n name: 'vhs-error-reload'\n });\n player.play();\n };\n /**\n * Attempt to get a source from either the built-in getSource function\n * or a custom function provided via the options\n *\n * @private\n */\n\n const errorHandler = function () {\n // Do not attempt to reload the source if a source-reload occurred before\n // 'errorInterval' time has elapsed since the last source-reload\n if (Date.now() - lastCalled < localOptions.errorInterval * 1000) {\n player.trigger({\n type: 'usage',\n name: 'vhs-error-reload-canceled'\n });\n return;\n }\n if (!localOptions.getSource || typeof localOptions.getSource !== 'function') {\n videojs.log.error('ERROR: reloadSourceOnError - The option getSource must be a function!');\n return;\n }\n lastCalled = Date.now();\n return localOptions.getSource.call(player, setSource);\n };\n /**\n * Unbind any event handlers that were bound by the plugin\n *\n * @private\n */\n\n const cleanupEvents = function () {\n player.off('loadedmetadata', loadedMetadataHandler);\n player.off('error', errorHandler);\n player.off('dispose', cleanupEvents);\n };\n /**\n * Cleanup before re-initializing the plugin\n *\n * @param {Object} [newOptions] an object with plugin options\n * @private\n */\n\n const reinitPlugin = function (newOptions) {\n cleanupEvents();\n initPlugin(player, newOptions);\n };\n player.on('error', errorHandler);\n player.on('dispose', cleanupEvents); // Overwrite the plugin function so that we can correctly cleanup before\n // initializing the plugin\n\n player.reloadSourceOnError = reinitPlugin;\n};\n/**\n * Reload the source when an error is detected as long as there\n * wasn't an error previously within the last 30 seconds\n *\n * @param {Object} [options] an object with plugin options\n */\n\nconst reloadSourceOnError = function (options) {\n initPlugin(this, options);\n};\nvar version$4 = \"3.11.1\";\nvar version$3 = \"7.0.2\";\nvar version$2 = \"1.3.0\";\nvar version$1 = \"7.1.0\";\nvar version = \"4.0.1\";\n\n/**\n * @file videojs-http-streaming.js\n *\n * The main file for the VHS project.\n * License: https://github.com/videojs/videojs-http-streaming/blob/main/LICENSE\n */\nconst Vhs = {\n PlaylistLoader,\n Playlist,\n utils,\n STANDARD_PLAYLIST_SELECTOR: lastBandwidthSelector,\n INITIAL_PLAYLIST_SELECTOR: lowestBitrateCompatibleVariantSelector,\n lastBandwidthSelector,\n movingAverageBandwidthSelector,\n comparePlaylistBandwidth,\n comparePlaylistResolution,\n xhr: xhrFactory()\n}; // Define getter/setters for config properties\n\nObject.keys(Config).forEach(prop => {\n Object.defineProperty(Vhs, prop, {\n get() {\n videojs.log.warn(`using Vhs.${prop} is UNSAFE be sure you know what you are doing`);\n return Config[prop];\n },\n set(value) {\n videojs.log.warn(`using Vhs.${prop} is UNSAFE be sure you know what you are doing`);\n if (typeof value !== 'number' || value < 0) {\n videojs.log.warn(`value of Vhs.${prop} must be greater than or equal to 0`);\n return;\n }\n Config[prop] = value;\n }\n });\n});\nconst LOCAL_STORAGE_KEY = 'videojs-vhs';\n/**\n * Updates the selectedIndex of the QualityLevelList when a mediachange happens in vhs.\n *\n * @param {QualityLevelList} qualityLevels The QualityLevelList to update.\n * @param {PlaylistLoader} playlistLoader PlaylistLoader containing the new media info.\n * @function handleVhsMediaChange\n */\n\nconst handleVhsMediaChange = function (qualityLevels, playlistLoader) {\n const newPlaylist = playlistLoader.media();\n let selectedIndex = -1;\n for (let i = 0; i < qualityLevels.length; i++) {\n if (qualityLevels[i].id === newPlaylist.id) {\n selectedIndex = i;\n break;\n }\n }\n qualityLevels.selectedIndex_ = selectedIndex;\n qualityLevels.trigger({\n selectedIndex,\n type: 'change'\n });\n};\n/**\n * Adds quality levels to list once playlist metadata is available\n *\n * @param {QualityLevelList} qualityLevels The QualityLevelList to attach events to.\n * @param {Object} vhs Vhs object to listen to for media events.\n * @function handleVhsLoadedMetadata\n */\n\nconst handleVhsLoadedMetadata = function (qualityLevels, vhs) {\n vhs.representations().forEach(rep => {\n qualityLevels.addQualityLevel(rep);\n });\n handleVhsMediaChange(qualityLevels, vhs.playlists);\n}; // VHS is a source handler, not a tech. Make sure attempts to use it\n// as one do not cause exceptions.\n\nVhs.canPlaySource = function () {\n return videojs.log.warn('VHS is no longer a tech. Please remove it from ' + 'your player\\'s techOrder.');\n};\nconst emeKeySystems = (keySystemOptions, mainPlaylist, audioPlaylist) => {\n if (!keySystemOptions) {\n return keySystemOptions;\n }\n let codecs = {};\n if (mainPlaylist && mainPlaylist.attributes && mainPlaylist.attributes.CODECS) {\n codecs = unwrapCodecList(parseCodecs(mainPlaylist.attributes.CODECS));\n }\n if (audioPlaylist && audioPlaylist.attributes && audioPlaylist.attributes.CODECS) {\n codecs.audio = audioPlaylist.attributes.CODECS;\n }\n const videoContentType = getMimeForCodec(codecs.video);\n const audioContentType = getMimeForCodec(codecs.audio); // upsert the content types based on the selected playlist\n\n const keySystemContentTypes = {};\n for (const keySystem in keySystemOptions) {\n keySystemContentTypes[keySystem] = {};\n if (audioContentType) {\n keySystemContentTypes[keySystem].audioContentType = audioContentType;\n }\n if (videoContentType) {\n keySystemContentTypes[keySystem].videoContentType = videoContentType;\n } // Default to using the video playlist's PSSH even though they may be different, as\n // videojs-contrib-eme will only accept one in the options.\n //\n // This shouldn't be an issue for most cases as early intialization will handle all\n // unique PSSH values, and if they aren't, then encrypted events should have the\n // specific information needed for the unique license.\n\n if (mainPlaylist.contentProtection && mainPlaylist.contentProtection[keySystem] && mainPlaylist.contentProtection[keySystem].pssh) {\n keySystemContentTypes[keySystem].pssh = mainPlaylist.contentProtection[keySystem].pssh;\n } // videojs-contrib-eme accepts the option of specifying: 'com.some.cdm': 'url'\n // so we need to prevent overwriting the URL entirely\n\n if (typeof keySystemOptions[keySystem] === 'string') {\n keySystemContentTypes[keySystem].url = keySystemOptions[keySystem];\n }\n }\n return merge(keySystemOptions, keySystemContentTypes);\n};\n/**\n * @typedef {Object} KeySystems\n *\n * keySystems configuration for https://github.com/videojs/videojs-contrib-eme\n * Note: not all options are listed here.\n *\n * @property {Uint8Array} [pssh]\n * Protection System Specific Header\n */\n\n/**\n * Goes through all the playlists and collects an array of KeySystems options objects\n * containing each playlist's keySystems and their pssh values, if available.\n *\n * @param {Object[]} playlists\n * The playlists to look through\n * @param {string[]} keySystems\n * The keySystems to collect pssh values for\n *\n * @return {KeySystems[]}\n * An array of KeySystems objects containing available key systems and their\n * pssh values\n */\n\nconst getAllPsshKeySystemsOptions = (playlists, keySystems) => {\n return playlists.reduce((keySystemsArr, playlist) => {\n if (!playlist.contentProtection) {\n return keySystemsArr;\n }\n const keySystemsOptions = keySystems.reduce((keySystemsObj, keySystem) => {\n const keySystemOptions = playlist.contentProtection[keySystem];\n if (keySystemOptions && keySystemOptions.pssh) {\n keySystemsObj[keySystem] = {\n pssh: keySystemOptions.pssh\n };\n }\n return keySystemsObj;\n }, {});\n if (Object.keys(keySystemsOptions).length) {\n keySystemsArr.push(keySystemsOptions);\n }\n return keySystemsArr;\n }, []);\n};\n/**\n * Returns a promise that waits for the\n * [eme plugin](https://github.com/videojs/videojs-contrib-eme) to create a key session.\n *\n * Works around https://bugs.chromium.org/p/chromium/issues/detail?id=895449 in non-IE11\n * browsers.\n *\n * As per the above ticket, this is particularly important for Chrome, where, if\n * unencrypted content is appended before encrypted content and the key session has not\n * been created, a MEDIA_ERR_DECODE will be thrown once the encrypted content is reached\n * during playback.\n *\n * @param {Object} player\n * The player instance\n * @param {Object[]} sourceKeySystems\n * The key systems options from the player source\n * @param {Object} [audioMedia]\n * The active audio media playlist (optional)\n * @param {Object[]} mainPlaylists\n * The playlists found on the main playlist object\n *\n * @return {Object}\n * Promise that resolves when the key session has been created\n */\n\nconst waitForKeySessionCreation = ({\n player,\n sourceKeySystems,\n audioMedia,\n mainPlaylists\n}) => {\n if (!player.eme.initializeMediaKeys) {\n return Promise.resolve();\n } // TODO should all audio PSSH values be initialized for DRM?\n //\n // All unique video rendition pssh values are initialized for DRM, but here only\n // the initial audio playlist license is initialized. In theory, an encrypted\n // event should be fired if the user switches to an alternative audio playlist\n // where a license is required, but this case hasn't yet been tested. In addition, there\n // may be many alternate audio playlists unlikely to be used (e.g., multiple different\n // languages).\n\n const playlists = audioMedia ? mainPlaylists.concat([audioMedia]) : mainPlaylists;\n const keySystemsOptionsArr = getAllPsshKeySystemsOptions(playlists, Object.keys(sourceKeySystems));\n const initializationFinishedPromises = [];\n const keySessionCreatedPromises = []; // Since PSSH values are interpreted as initData, EME will dedupe any duplicates. The\n // only place where it should not be deduped is for ms-prefixed APIs, but\n // the existence of modern EME APIs in addition to\n // ms-prefixed APIs on Edge should prevent this from being a concern.\n // initializeMediaKeys also won't use the webkit-prefixed APIs.\n\n keySystemsOptionsArr.forEach(keySystemsOptions => {\n keySessionCreatedPromises.push(new Promise((resolve, reject) => {\n player.tech_.one('keysessioncreated', resolve);\n }));\n initializationFinishedPromises.push(new Promise((resolve, reject) => {\n player.eme.initializeMediaKeys({\n keySystems: keySystemsOptions\n }, err => {\n if (err) {\n reject(err);\n return;\n }\n resolve();\n });\n }));\n }); // The reasons Promise.race is chosen over Promise.any:\n //\n // * Promise.any is only available in Safari 14+.\n // * None of these promises are expected to reject. If they do reject, it might be\n // better here for the race to surface the rejection, rather than mask it by using\n // Promise.any.\n\n return Promise.race([\n // If a session was previously created, these will all finish resolving without\n // creating a new session, otherwise it will take until the end of all license\n // requests, which is why the key session check is used (to make setup much faster).\n Promise.all(initializationFinishedPromises),\n // Once a single session is created, the browser knows DRM will be used.\n Promise.race(keySessionCreatedPromises)]);\n};\n/**\n * If the [eme](https://github.com/videojs/videojs-contrib-eme) plugin is available, and\n * there are keySystems on the source, sets up source options to prepare the source for\n * eme.\n *\n * @param {Object} player\n * The player instance\n * @param {Object[]} sourceKeySystems\n * The key systems options from the player source\n * @param {Object} media\n * The active media playlist\n * @param {Object} [audioMedia]\n * The active audio media playlist (optional)\n *\n * @return {boolean}\n * Whether or not options were configured and EME is available\n */\n\nconst setupEmeOptions = ({\n player,\n sourceKeySystems,\n media,\n audioMedia\n}) => {\n const sourceOptions = emeKeySystems(sourceKeySystems, media, audioMedia);\n if (!sourceOptions) {\n return false;\n }\n player.currentSource().keySystems = sourceOptions; // eme handles the rest of the setup, so if it is missing\n // do nothing.\n\n if (sourceOptions && !player.eme) {\n videojs.log.warn('DRM encrypted source cannot be decrypted without a DRM plugin');\n return false;\n }\n return true;\n};\nconst getVhsLocalStorage = () => {\n if (!window$1.localStorage) {\n return null;\n }\n const storedObject = window$1.localStorage.getItem(LOCAL_STORAGE_KEY);\n if (!storedObject) {\n return null;\n }\n try {\n return JSON.parse(storedObject);\n } catch (e) {\n // someone may have tampered with the value\n return null;\n }\n};\nconst updateVhsLocalStorage = options => {\n if (!window$1.localStorage) {\n return false;\n }\n let objectToStore = getVhsLocalStorage();\n objectToStore = objectToStore ? merge(objectToStore, options) : options;\n try {\n window$1.localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(objectToStore));\n } catch (e) {\n // Throws if storage is full (e.g., always on iOS 5+ Safari private mode, where\n // storage is set to 0).\n // https://developer.mozilla.org/en-US/docs/Web/API/Storage/setItem#Exceptions\n // No need to perform any operation.\n return false;\n }\n return objectToStore;\n};\n/**\n * Parses VHS-supported media types from data URIs. See\n * https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs\n * for information on data URIs.\n *\n * @param {string} dataUri\n * The data URI\n *\n * @return {string|Object}\n * The parsed object/string, or the original string if no supported media type\n * was found\n */\n\nconst expandDataUri = dataUri => {\n if (dataUri.toLowerCase().indexOf('data:application/vnd.videojs.vhs+json,') === 0) {\n return JSON.parse(dataUri.substring(dataUri.indexOf(',') + 1));\n } // no known case for this data URI, return the string as-is\n\n return dataUri;\n};\n/**\n * Adds a request hook to an xhr object\n *\n * @param {Object} xhr object to add the onRequest hook to\n * @param {function} callback hook function for an xhr request\n */\n\nconst addOnRequestHook = (xhr, callback) => {\n if (!xhr._requestCallbackSet) {\n xhr._requestCallbackSet = new Set();\n }\n xhr._requestCallbackSet.add(callback);\n};\n/**\n * Adds a response hook to an xhr object\n *\n * @param {Object} xhr object to add the onResponse hook to\n * @param {function} callback hook function for an xhr response\n */\n\nconst addOnResponseHook = (xhr, callback) => {\n if (!xhr._responseCallbackSet) {\n xhr._responseCallbackSet = new Set();\n }\n xhr._responseCallbackSet.add(callback);\n};\n/**\n * Removes a request hook on an xhr object, deletes the onRequest set if empty.\n *\n * @param {Object} xhr object to remove the onRequest hook from\n * @param {function} callback hook function to remove\n */\n\nconst removeOnRequestHook = (xhr, callback) => {\n if (!xhr._requestCallbackSet) {\n return;\n }\n xhr._requestCallbackSet.delete(callback);\n if (!xhr._requestCallbackSet.size) {\n delete xhr._requestCallbackSet;\n }\n};\n/**\n * Removes a response hook on an xhr object, deletes the onResponse set if empty.\n *\n * @param {Object} xhr object to remove the onResponse hook from\n * @param {function} callback hook function to remove\n */\n\nconst removeOnResponseHook = (xhr, callback) => {\n if (!xhr._responseCallbackSet) {\n return;\n }\n xhr._responseCallbackSet.delete(callback);\n if (!xhr._responseCallbackSet.size) {\n delete xhr._responseCallbackSet;\n }\n};\n/**\n * Whether the browser has built-in HLS support.\n */\n\nVhs.supportsNativeHls = function () {\n if (!document || !document.createElement) {\n return false;\n }\n const video = document.createElement('video'); // native HLS is definitely not supported if HTML5 video isn't\n\n if (!videojs.getTech('Html5').isSupported()) {\n return false;\n } // HLS manifests can go by many mime-types\n\n const canPlay = [\n // Apple santioned\n 'application/vnd.apple.mpegurl',\n // Apple sanctioned for backwards compatibility\n 'audio/mpegurl',\n // Very common\n 'audio/x-mpegurl',\n // Very common\n 'application/x-mpegurl',\n // Included for completeness\n 'video/x-mpegurl', 'video/mpegurl', 'application/mpegurl'];\n return canPlay.some(function (canItPlay) {\n return /maybe|probably/i.test(video.canPlayType(canItPlay));\n });\n}();\nVhs.supportsNativeDash = function () {\n if (!document || !document.createElement || !videojs.getTech('Html5').isSupported()) {\n return false;\n }\n return /maybe|probably/i.test(document.createElement('video').canPlayType('application/dash+xml'));\n}();\nVhs.supportsTypeNatively = type => {\n if (type === 'hls') {\n return Vhs.supportsNativeHls;\n }\n if (type === 'dash') {\n return Vhs.supportsNativeDash;\n }\n return false;\n};\n/**\n * VHS is a source handler, not a tech. Make sure attempts to use it\n * as one do not cause exceptions.\n */\n\nVhs.isSupported = function () {\n return videojs.log.warn('VHS is no longer a tech. Please remove it from ' + 'your player\\'s techOrder.');\n};\n/**\n * A global function for setting an onRequest hook\n *\n * @param {function} callback for request modifiction\n */\n\nVhs.xhr.onRequest = function (callback) {\n addOnRequestHook(Vhs.xhr, callback);\n};\n/**\n * A global function for setting an onResponse hook\n *\n * @param {callback} callback for response data retrieval\n */\n\nVhs.xhr.onResponse = function (callback) {\n addOnResponseHook(Vhs.xhr, callback);\n};\n/**\n * Deletes a global onRequest callback if it exists\n *\n * @param {function} callback to delete from the global set\n */\n\nVhs.xhr.offRequest = function (callback) {\n removeOnRequestHook(Vhs.xhr, callback);\n};\n/**\n * Deletes a global onResponse callback if it exists\n *\n * @param {function} callback to delete from the global set\n */\n\nVhs.xhr.offResponse = function (callback) {\n removeOnResponseHook(Vhs.xhr, callback);\n};\nconst Component = videojs.getComponent('Component');\n/**\n * The Vhs Handler object, where we orchestrate all of the parts\n * of VHS to interact with video.js\n *\n * @class VhsHandler\n * @extends videojs.Component\n * @param {Object} source the soruce object\n * @param {Tech} tech the parent tech object\n * @param {Object} options optional and required options\n */\n\nclass VhsHandler extends Component {\n constructor(source, tech, options) {\n super(tech, options.vhs); // if a tech level `initialBandwidth` option was passed\n // use that over the VHS level `bandwidth` option\n\n if (typeof options.initialBandwidth === 'number') {\n this.options_.bandwidth = options.initialBandwidth;\n }\n this.logger_ = logger('VhsHandler'); // we need access to the player in some cases,\n // so, get it from Video.js via the `playerId`\n\n if (tech.options_ && tech.options_.playerId) {\n const _player = videojs.getPlayer(tech.options_.playerId);\n this.player_ = _player;\n }\n this.tech_ = tech;\n this.source_ = source;\n this.stats = {};\n this.ignoreNextSeekingEvent_ = false;\n this.setOptions_();\n if (this.options_.overrideNative && tech.overrideNativeAudioTracks && tech.overrideNativeVideoTracks) {\n tech.overrideNativeAudioTracks(true);\n tech.overrideNativeVideoTracks(true);\n } else if (this.options_.overrideNative && (tech.featuresNativeVideoTracks || tech.featuresNativeAudioTracks)) {\n // overriding native VHS only works if audio tracks have been emulated\n // error early if we're misconfigured\n throw new Error('Overriding native VHS requires emulated tracks. ' + 'See https://git.io/vMpjB');\n } // listen for fullscreenchange events for this player so that we\n // can adjust our quality selection quickly\n\n this.on(document, ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'], event => {\n const fullscreenElement = document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement;\n if (fullscreenElement && fullscreenElement.contains(this.tech_.el())) {\n this.playlistController_.fastQualityChange_();\n } else {\n // When leaving fullscreen, since the in page pixel dimensions should be smaller\n // than full screen, see if there should be a rendition switch down to preserve\n // bandwidth.\n this.playlistController_.checkABR_();\n }\n });\n this.on(this.tech_, 'seeking', function () {\n if (this.ignoreNextSeekingEvent_) {\n this.ignoreNextSeekingEvent_ = false;\n return;\n }\n this.setCurrentTime(this.tech_.currentTime());\n });\n this.on(this.tech_, 'error', function () {\n // verify that the error was real and we are loaded\n // enough to have pc loaded.\n if (this.tech_.error() && this.playlistController_) {\n this.playlistController_.pauseLoading();\n }\n });\n this.on(this.tech_, 'play', this.play);\n }\n /**\n * Set VHS options based on options from configuration, as well as partial\n * options to be passed at a later time.\n *\n * @param {Object} options A partial chunk of config options\n */\n\n setOptions_(options = {}) {\n this.options_ = merge(this.options_, options); // defaults\n\n this.options_.withCredentials = this.options_.withCredentials || false;\n this.options_.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions === false ? false : true;\n this.options_.useDevicePixelRatio = this.options_.useDevicePixelRatio || false;\n this.options_.useBandwidthFromLocalStorage = typeof this.source_.useBandwidthFromLocalStorage !== 'undefined' ? this.source_.useBandwidthFromLocalStorage : this.options_.useBandwidthFromLocalStorage || false;\n this.options_.useForcedSubtitles = this.options_.useForcedSubtitles || false;\n this.options_.useNetworkInformationApi = this.options_.useNetworkInformationApi || false;\n this.options_.useDtsForTimestampOffset = this.options_.useDtsForTimestampOffset || false;\n this.options_.customTagParsers = this.options_.customTagParsers || [];\n this.options_.customTagMappers = this.options_.customTagMappers || [];\n this.options_.cacheEncryptionKeys = this.options_.cacheEncryptionKeys || false;\n this.options_.llhls = this.options_.llhls === false ? false : true;\n this.options_.bufferBasedABR = this.options_.bufferBasedABR || false;\n if (typeof this.options_.playlistExclusionDuration !== 'number') {\n this.options_.playlistExclusionDuration = 60;\n }\n if (typeof this.options_.bandwidth !== 'number') {\n if (this.options_.useBandwidthFromLocalStorage) {\n const storedObject = getVhsLocalStorage();\n if (storedObject && storedObject.bandwidth) {\n this.options_.bandwidth = storedObject.bandwidth;\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-bandwidth-from-local-storage'\n });\n }\n if (storedObject && storedObject.throughput) {\n this.options_.throughput = storedObject.throughput;\n this.tech_.trigger({\n type: 'usage',\n name: 'vhs-throughput-from-local-storage'\n });\n }\n }\n } // if bandwidth was not set by options or pulled from local storage, start playlist\n // selection at a reasonable bandwidth\n\n if (typeof this.options_.bandwidth !== 'number') {\n this.options_.bandwidth = Config.INITIAL_BANDWIDTH;\n } // If the bandwidth number is unchanged from the initial setting\n // then this takes precedence over the enableLowInitialPlaylist option\n\n this.options_.enableLowInitialPlaylist = this.options_.enableLowInitialPlaylist && this.options_.bandwidth === Config.INITIAL_BANDWIDTH; // grab options passed to player.src\n\n ['withCredentials', 'useDevicePixelRatio', 'limitRenditionByPlayerDimensions', 'bandwidth', 'customTagParsers', 'customTagMappers', 'cacheEncryptionKeys', 'playlistSelector', 'initialPlaylistSelector', 'bufferBasedABR', 'liveRangeSafeTimeDelta', 'llhls', 'useForcedSubtitles', 'useNetworkInformationApi', 'useDtsForTimestampOffset', 'exactManifestTimings', 'leastPixelDiffSelector'].forEach(option => {\n if (typeof this.source_[option] !== 'undefined') {\n this.options_[option] = this.source_[option];\n }\n });\n this.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions;\n this.useDevicePixelRatio = this.options_.useDevicePixelRatio;\n } // alias for public method to set options\n\n setOptions(options = {}) {\n this.setOptions_(options);\n }\n /**\n * called when player.src gets called, handle a new source\n *\n * @param {Object} src the source object to handle\n */\n\n src(src, type) {\n // do nothing if the src is falsey\n if (!src) {\n return;\n }\n this.setOptions_(); // add main playlist controller options\n\n this.options_.src = expandDataUri(this.source_.src);\n this.options_.tech = this.tech_;\n this.options_.externVhs = Vhs;\n this.options_.sourceType = simpleTypeFromSourceType(type); // Whenever we seek internally, we should update the tech\n\n this.options_.seekTo = time => {\n this.tech_.setCurrentTime(time);\n };\n this.playlistController_ = new PlaylistController(this.options_);\n const playbackWatcherOptions = merge({\n liveRangeSafeTimeDelta: SAFE_TIME_DELTA\n }, this.options_, {\n seekable: () => this.seekable(),\n media: () => this.playlistController_.media(),\n playlistController: this.playlistController_\n });\n this.playbackWatcher_ = new PlaybackWatcher(playbackWatcherOptions);\n this.playlistController_.on('error', () => {\n const player = videojs.players[this.tech_.options_.playerId];\n let error = this.playlistController_.error;\n if (typeof error === 'object' && !error.code) {\n error.code = 3;\n } else if (typeof error === 'string') {\n error = {\n message: error,\n code: 3\n };\n }\n player.error(error);\n });\n const defaultSelector = this.options_.bufferBasedABR ? Vhs.movingAverageBandwidthSelector(0.55) : Vhs.STANDARD_PLAYLIST_SELECTOR; // `this` in selectPlaylist should be the VhsHandler for backwards\n // compatibility with < v2\n\n this.playlistController_.selectPlaylist = this.selectPlaylist ? this.selectPlaylist.bind(this) : defaultSelector.bind(this);\n this.playlistController_.selectInitialPlaylist = Vhs.INITIAL_PLAYLIST_SELECTOR.bind(this); // re-expose some internal objects for backwards compatibility with < v2\n\n this.playlists = this.playlistController_.mainPlaylistLoader_;\n this.mediaSource = this.playlistController_.mediaSource; // Proxy assignment of some properties to the main playlist\n // controller. Using a custom property for backwards compatibility\n // with < v2\n\n Object.defineProperties(this, {\n selectPlaylist: {\n get() {\n return this.playlistController_.selectPlaylist;\n },\n set(selectPlaylist) {\n this.playlistController_.selectPlaylist = selectPlaylist.bind(this);\n }\n },\n throughput: {\n get() {\n return this.playlistController_.mainSegmentLoader_.throughput.rate;\n },\n set(throughput) {\n this.playlistController_.mainSegmentLoader_.throughput.rate = throughput; // By setting `count` to 1 the throughput value becomes the starting value\n // for the cumulative average\n\n this.playlistController_.mainSegmentLoader_.throughput.count = 1;\n }\n },\n bandwidth: {\n get() {\n let playerBandwidthEst = this.playlistController_.mainSegmentLoader_.bandwidth;\n const networkInformation = window$1.navigator.connection || window$1.navigator.mozConnection || window$1.navigator.webkitConnection;\n const tenMbpsAsBitsPerSecond = 10e6;\n if (this.options_.useNetworkInformationApi && networkInformation) {\n // downlink returns Mbps\n // https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/downlink\n const networkInfoBandwidthEstBitsPerSec = networkInformation.downlink * 1000 * 1000; // downlink maxes out at 10 Mbps. In the event that both networkInformationApi and the player\n // estimate a bandwidth greater than 10 Mbps, use the larger of the two estimates to ensure that\n // high quality streams are not filtered out.\n\n if (networkInfoBandwidthEstBitsPerSec >= tenMbpsAsBitsPerSecond && playerBandwidthEst >= tenMbpsAsBitsPerSecond) {\n playerBandwidthEst = Math.max(playerBandwidthEst, networkInfoBandwidthEstBitsPerSec);\n } else {\n playerBandwidthEst = networkInfoBandwidthEstBitsPerSec;\n }\n }\n return playerBandwidthEst;\n },\n set(bandwidth) {\n this.playlistController_.mainSegmentLoader_.bandwidth = bandwidth; // setting the bandwidth manually resets the throughput counter\n // `count` is set to zero that current value of `rate` isn't included\n // in the cumulative average\n\n this.playlistController_.mainSegmentLoader_.throughput = {\n rate: 0,\n count: 0\n };\n }\n },\n /**\n * `systemBandwidth` is a combination of two serial processes bit-rates. The first\n * is the network bitrate provided by `bandwidth` and the second is the bitrate of\n * the entire process after that - decryption, transmuxing, and appending - provided\n * by `throughput`.\n *\n * Since the two process are serial, the overall system bandwidth is given by:\n * sysBandwidth = 1 / (1 / bandwidth + 1 / throughput)\n */\n systemBandwidth: {\n get() {\n const invBandwidth = 1 / (this.bandwidth || 1);\n let invThroughput;\n if (this.throughput > 0) {\n invThroughput = 1 / this.throughput;\n } else {\n invThroughput = 0;\n }\n const systemBitrate = Math.floor(1 / (invBandwidth + invThroughput));\n return systemBitrate;\n },\n set() {\n videojs.log.error('The \"systemBandwidth\" property is read-only');\n }\n }\n });\n if (this.options_.bandwidth) {\n this.bandwidth = this.options_.bandwidth;\n }\n if (this.options_.throughput) {\n this.throughput = this.options_.throughput;\n }\n Object.defineProperties(this.stats, {\n bandwidth: {\n get: () => this.bandwidth || 0,\n enumerable: true\n },\n mediaRequests: {\n get: () => this.playlistController_.mediaRequests_() || 0,\n enumerable: true\n },\n mediaRequestsAborted: {\n get: () => this.playlistController_.mediaRequestsAborted_() || 0,\n enumerable: true\n },\n mediaRequestsTimedout: {\n get: () => this.playlistController_.mediaRequestsTimedout_() || 0,\n enumerable: true\n },\n mediaRequestsErrored: {\n get: () => this.playlistController_.mediaRequestsErrored_() || 0,\n enumerable: true\n },\n mediaTransferDuration: {\n get: () => this.playlistController_.mediaTransferDuration_() || 0,\n enumerable: true\n },\n mediaBytesTransferred: {\n get: () => this.playlistController_.mediaBytesTransferred_() || 0,\n enumerable: true\n },\n mediaSecondsLoaded: {\n get: () => this.playlistController_.mediaSecondsLoaded_() || 0,\n enumerable: true\n },\n mediaAppends: {\n get: () => this.playlistController_.mediaAppends_() || 0,\n enumerable: true\n },\n mainAppendsToLoadedData: {\n get: () => this.playlistController_.mainAppendsToLoadedData_() || 0,\n enumerable: true\n },\n audioAppendsToLoadedData: {\n get: () => this.playlistController_.audioAppendsToLoadedData_() || 0,\n enumerable: true\n },\n appendsToLoadedData: {\n get: () => this.playlistController_.appendsToLoadedData_() || 0,\n enumerable: true\n },\n timeToLoadedData: {\n get: () => this.playlistController_.timeToLoadedData_() || 0,\n enumerable: true\n },\n buffered: {\n get: () => timeRangesToArray(this.tech_.buffered()),\n enumerable: true\n },\n currentTime: {\n get: () => this.tech_.currentTime(),\n enumerable: true\n },\n currentSource: {\n get: () => this.tech_.currentSource_,\n enumerable: true\n },\n currentTech: {\n get: () => this.tech_.name_,\n enumerable: true\n },\n duration: {\n get: () => this.tech_.duration(),\n enumerable: true\n },\n main: {\n get: () => this.playlists.main,\n enumerable: true\n },\n playerDimensions: {\n get: () => this.tech_.currentDimensions(),\n enumerable: true\n },\n seekable: {\n get: () => timeRangesToArray(this.tech_.seekable()),\n enumerable: true\n },\n timestamp: {\n get: () => Date.now(),\n enumerable: true\n },\n videoPlaybackQuality: {\n get: () => this.tech_.getVideoPlaybackQuality(),\n enumerable: true\n }\n });\n this.tech_.one('canplay', this.playlistController_.setupFirstPlay.bind(this.playlistController_));\n this.tech_.on('bandwidthupdate', () => {\n if (this.options_.useBandwidthFromLocalStorage) {\n updateVhsLocalStorage({\n bandwidth: this.bandwidth,\n throughput: Math.round(this.throughput)\n });\n }\n });\n this.playlistController_.on('selectedinitialmedia', () => {\n // Add the manual rendition mix-in to VhsHandler\n renditionSelectionMixin(this);\n });\n this.playlistController_.sourceUpdater_.on('createdsourcebuffers', () => {\n this.setupEme_();\n }); // the bandwidth of the primary segment loader is our best\n // estimate of overall bandwidth\n\n this.on(this.playlistController_, 'progress', function () {\n this.tech_.trigger('progress');\n }); // In the live case, we need to ignore the very first `seeking` event since\n // that will be the result of the seek-to-live behavior\n\n this.on(this.playlistController_, 'firstplay', function () {\n this.ignoreNextSeekingEvent_ = true;\n });\n this.setupQualityLevels_(); // do nothing if the tech has been disposed already\n // this can occur if someone sets the src in player.ready(), for instance\n\n if (!this.tech_.el()) {\n return;\n }\n this.mediaSourceUrl_ = window$1.URL.createObjectURL(this.playlistController_.mediaSource);\n this.tech_.src(this.mediaSourceUrl_);\n }\n createKeySessions_() {\n const audioPlaylistLoader = this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;\n this.logger_('waiting for EME key session creation');\n waitForKeySessionCreation({\n player: this.player_,\n sourceKeySystems: this.source_.keySystems,\n audioMedia: audioPlaylistLoader && audioPlaylistLoader.media(),\n mainPlaylists: this.playlists.main.playlists\n }).then(() => {\n this.logger_('created EME key session');\n this.playlistController_.sourceUpdater_.initializedEme();\n }).catch(err => {\n this.logger_('error while creating EME key session', err);\n this.player_.error({\n message: 'Failed to initialize media keys for EME',\n code: 3,\n metadata: {\n errorType: videojs.Error.EMEKeySessionCreationError\n }\n });\n });\n }\n handleWaitingForKey_() {\n // If waitingforkey is fired, it's possible that the data that's necessary to retrieve\n // the key is in the manifest. While this should've happened on initial source load, it\n // may happen again in live streams where the keys change, and the manifest info\n // reflects the update.\n //\n // Because videojs-contrib-eme compares the PSSH data we send to that of PSSH data it's\n // already requested keys for, we don't have to worry about this generating extraneous\n // requests.\n this.logger_('waitingforkey fired, attempting to create any new key sessions');\n this.createKeySessions_();\n }\n /**\n * If necessary and EME is available, sets up EME options and waits for key session\n * creation.\n *\n * This function also updates the source updater so taht it can be used, as for some\n * browsers, EME must be configured before content is appended (if appending unencrypted\n * content before encrypted content).\n */\n\n setupEme_() {\n const audioPlaylistLoader = this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;\n const didSetupEmeOptions = setupEmeOptions({\n player: this.player_,\n sourceKeySystems: this.source_.keySystems,\n media: this.playlists.media(),\n audioMedia: audioPlaylistLoader && audioPlaylistLoader.media()\n });\n this.player_.tech_.on('keystatuschange', e => {\n this.playlistController_.updatePlaylistByKeyStatus(e.keyId, e.status);\n });\n this.handleWaitingForKey_ = this.handleWaitingForKey_.bind(this);\n this.player_.tech_.on('waitingforkey', this.handleWaitingForKey_);\n if (!didSetupEmeOptions) {\n // If EME options were not set up, we've done all we could to initialize EME.\n this.playlistController_.sourceUpdater_.initializedEme();\n return;\n }\n this.createKeySessions_();\n }\n /**\n * Initializes the quality levels and sets listeners to update them.\n *\n * @method setupQualityLevels_\n * @private\n */\n\n setupQualityLevels_() {\n const player = videojs.players[this.tech_.options_.playerId]; // if there isn't a player or there isn't a qualityLevels plugin\n // or qualityLevels_ listeners have already been setup, do nothing.\n\n if (!player || !player.qualityLevels || this.qualityLevels_) {\n return;\n }\n this.qualityLevels_ = player.qualityLevels();\n this.playlistController_.on('selectedinitialmedia', () => {\n handleVhsLoadedMetadata(this.qualityLevels_, this);\n });\n this.playlists.on('mediachange', () => {\n handleVhsMediaChange(this.qualityLevels_, this.playlists);\n });\n }\n /**\n * return the version\n */\n\n static version() {\n return {\n '@videojs/http-streaming': version$4,\n 'mux.js': version$3,\n 'mpd-parser': version$2,\n 'm3u8-parser': version$1,\n 'aes-decrypter': version\n };\n }\n /**\n * return the version\n */\n\n version() {\n return this.constructor.version();\n }\n canChangeType() {\n return SourceUpdater.canChangeType();\n }\n /**\n * Begin playing the video.\n */\n\n play() {\n this.playlistController_.play();\n }\n /**\n * a wrapper around the function in PlaylistController\n */\n\n setCurrentTime(currentTime) {\n this.playlistController_.setCurrentTime(currentTime);\n }\n /**\n * a wrapper around the function in PlaylistController\n */\n\n duration() {\n return this.playlistController_.duration();\n }\n /**\n * a wrapper around the function in PlaylistController\n */\n\n seekable() {\n return this.playlistController_.seekable();\n }\n /**\n * Abort all outstanding work and cleanup.\n */\n\n dispose() {\n if (this.playbackWatcher_) {\n this.playbackWatcher_.dispose();\n }\n if (this.playlistController_) {\n this.playlistController_.dispose();\n }\n if (this.qualityLevels_) {\n this.qualityLevels_.dispose();\n }\n if (this.tech_ && this.tech_.vhs) {\n delete this.tech_.vhs;\n }\n if (this.mediaSourceUrl_ && window$1.URL.revokeObjectURL) {\n window$1.URL.revokeObjectURL(this.mediaSourceUrl_);\n this.mediaSourceUrl_ = null;\n }\n if (this.tech_) {\n this.tech_.off('waitingforkey', this.handleWaitingForKey_);\n }\n super.dispose();\n }\n convertToProgramTime(time, callback) {\n return getProgramTime({\n playlist: this.playlistController_.media(),\n time,\n callback\n });\n } // the player must be playing before calling this\n\n seekToProgramTime(programTime, callback, pauseAfterSeek = true, retryCount = 2) {\n return seekToProgramTime({\n programTime,\n playlist: this.playlistController_.media(),\n retryCount,\n pauseAfterSeek,\n seekTo: this.options_.seekTo,\n tech: this.options_.tech,\n callback\n });\n }\n /**\n * Adds the onRequest, onResponse, offRequest and offResponse functions\n * to the VhsHandler xhr Object.\n */\n\n setupXhrHooks_() {\n /**\n * A player function for setting an onRequest hook\n *\n * @param {function} callback for request modifiction\n */\n this.xhr.onRequest = callback => {\n addOnRequestHook(this.xhr, callback);\n };\n /**\n * A player function for setting an onResponse hook\n *\n * @param {callback} callback for response data retrieval\n */\n\n this.xhr.onResponse = callback => {\n addOnResponseHook(this.xhr, callback);\n };\n /**\n * Deletes a player onRequest callback if it exists\n *\n * @param {function} callback to delete from the player set\n */\n\n this.xhr.offRequest = callback => {\n removeOnRequestHook(this.xhr, callback);\n };\n /**\n * Deletes a player onResponse callback if it exists\n *\n * @param {function} callback to delete from the player set\n */\n\n this.xhr.offResponse = callback => {\n removeOnResponseHook(this.xhr, callback);\n }; // Trigger an event on the player to notify the user that vhs is ready to set xhr hooks.\n // This allows hooks to be set before the source is set to vhs when handleSource is called.\n\n this.player_.trigger('xhr-hooks-ready');\n }\n}\n/**\n * The Source Handler object, which informs video.js what additional\n * MIME types are supported and sets up playback. It is registered\n * automatically to the appropriate tech based on the capabilities of\n * the browser it is running in. It is not necessary to use or modify\n * this object in normal usage.\n */\n\nconst VhsSourceHandler = {\n name: 'videojs-http-streaming',\n VERSION: version$4,\n canHandleSource(srcObj, options = {}) {\n const localOptions = merge(videojs.options, options);\n return VhsSourceHandler.canPlayType(srcObj.type, localOptions);\n },\n handleSource(source, tech, options = {}) {\n const localOptions = merge(videojs.options, options);\n tech.vhs = new VhsHandler(source, tech, localOptions);\n tech.vhs.xhr = xhrFactory();\n tech.vhs.setupXhrHooks_();\n tech.vhs.src(source.src, source.type);\n return tech.vhs;\n },\n canPlayType(type, options) {\n const simpleType = simpleTypeFromSourceType(type);\n if (!simpleType) {\n return '';\n }\n const overrideNative = VhsSourceHandler.getOverrideNative(options);\n const supportsTypeNatively = Vhs.supportsTypeNatively(simpleType);\n const canUseMsePlayback = !supportsTypeNatively || overrideNative;\n return canUseMsePlayback ? 'maybe' : '';\n },\n getOverrideNative(options = {}) {\n const {\n vhs = {}\n } = options;\n const defaultOverrideNative = !(videojs.browser.IS_ANY_SAFARI || videojs.browser.IS_IOS);\n const {\n overrideNative = defaultOverrideNative\n } = vhs;\n return overrideNative;\n }\n};\n/**\n * Check to see if the native MediaSource object exists and supports\n * an MP4 container with both H.264 video and AAC-LC audio.\n *\n * @return {boolean} if native media sources are supported\n */\n\nconst supportsNativeMediaSources = () => {\n return browserSupportsCodec('avc1.4d400d,mp4a.40.2');\n}; // register source handlers with the appropriate techs\n\nif (supportsNativeMediaSources()) {\n videojs.getTech('Html5').registerSourceHandler(VhsSourceHandler, 0);\n}\nvideojs.VhsHandler = VhsHandler;\nvideojs.VhsSourceHandler = VhsSourceHandler;\nvideojs.Vhs = Vhs;\nif (!videojs.use) {\n videojs.registerComponent('Vhs', Vhs);\n}\nvideojs.options.vhs = videojs.options.vhs || {};\nif (!videojs.getPlugin || !videojs.getPlugin('reloadSourceOnError')) {\n videojs.registerPlugin('reloadSourceOnError', reloadSourceOnError);\n}\n\nexport { videojs as default };\n","/*! @name videojs-contrib-eme @version 3.11.2 @license Apache-2.0 */\nimport document from 'global/document';\nimport videojs from 'video.js';\nimport window from 'global/window';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nvar stringToUint16Array = function stringToUint16Array(string) {\n // 2 bytes for each char\n var buffer = new ArrayBuffer(string.length * 2);\n var array = new Uint16Array(buffer);\n\n for (var i = 0; i < string.length; i++) {\n array[i] = string.charCodeAt(i);\n }\n\n return array;\n};\nvar uint8ArrayToString = function uint8ArrayToString(array) {\n return String.fromCharCode.apply(null, new Uint16Array(array.buffer));\n};\nvar getHostnameFromUri = function getHostnameFromUri(uri) {\n var link = document.createElement('a');\n link.href = uri;\n return link.hostname;\n};\nvar arrayBuffersEqual = function arrayBuffersEqual(arrayBuffer1, arrayBuffer2) {\n if (arrayBuffer1 === arrayBuffer2) {\n return true;\n }\n\n if (arrayBuffer1.byteLength !== arrayBuffer2.byteLength) {\n return false;\n }\n\n var dataView1 = new DataView(arrayBuffer1);\n var dataView2 = new DataView(arrayBuffer2);\n\n for (var i = 0; i < dataView1.byteLength; i++) {\n if (dataView1.getUint8(i) !== dataView2.getUint8(i)) {\n return false;\n }\n }\n\n return true;\n};\nvar arrayBufferFrom = function arrayBufferFrom(bufferOrTypedArray) {\n if (bufferOrTypedArray instanceof Uint8Array || bufferOrTypedArray instanceof Uint16Array) {\n return bufferOrTypedArray.buffer;\n }\n\n return bufferOrTypedArray;\n}; // Normalize between Video.js 6/7 (videojs.mergeOptions) and 8 (videojs.obj.merge).\n\nvar merge = function merge() {\n var context = videojs.obj || videojs;\n var fn = context.merge || context.mergeOptions;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return fn.apply(context, args);\n};\nvar mergeAndRemoveNull = function mergeAndRemoveNull() {\n var result = merge.apply(void 0, arguments); // Any header whose value is `null` will be removed.\n\n Object.keys(result).forEach(function (k) {\n if (result[k] === null) {\n delete result[k];\n }\n });\n return result;\n};\n\nvar httpResponseHandler = videojs.xhr.httpHandler; // to make sure this doesn't break with older versions of Video.js,\n// do a super simple wrapper instead\n\nif (!httpResponseHandler) {\n httpResponseHandler = function httpResponseHandler(callback, decodeResponseBody) {\n return function (err, response, responseBody) {\n if (err) {\n callback(err);\n return;\n } // if the HTTP status code is 4xx or 5xx, the request also failed\n\n\n if (response.statusCode >= 400 && response.statusCode <= 599) {\n var cause = responseBody;\n\n if (decodeResponseBody) {\n cause = String.fromCharCode.apply(null, new Uint8Array(responseBody));\n }\n\n callback({\n cause: cause\n });\n return;\n } // otherwise, request succeeded\n\n\n callback(null, responseBody);\n };\n };\n}\n\n/**\n * Parses the EME key message XML to extract HTTP headers and the Challenge element to use\n * in the PlayReady license request.\n *\n * @param {ArrayBuffer} message key message from EME\n * @return {Object} an object containing headers and the message body to use in the\n * license request\n */\n\nvar getMessageContents = function getMessageContents(message) {\n // TODO do we want to support UTF-8?\n var xmlString = String.fromCharCode.apply(null, new Uint16Array(message));\n var xml = new window.DOMParser().parseFromString(xmlString, 'application/xml');\n var headersElement = xml.getElementsByTagName('HttpHeaders')[0];\n var headers = {};\n\n if (headersElement) {\n var headerNames = headersElement.getElementsByTagName('name');\n var headerValues = headersElement.getElementsByTagName('value');\n\n for (var i = 0; i < headerNames.length; i++) {\n headers[headerNames[i].childNodes[0].nodeValue] = headerValues[i].childNodes[0].nodeValue;\n }\n }\n\n var challengeElement = xml.getElementsByTagName('Challenge')[0];\n var challenge;\n\n if (challengeElement) {\n challenge = window.atob(challengeElement.childNodes[0].nodeValue);\n } // If we failed to parse the xml the soap message might be encoded already.\n // set the message data as the challenge and add generic SOAP headers.\n\n\n if (xml.querySelector('parsererror')) {\n headers = {\n 'Content-Type': 'text/xml; charset=utf-8',\n 'SOAPAction': '\"http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense\"'\n };\n challenge = message;\n }\n\n return {\n headers: headers,\n message: challenge\n };\n};\nvar requestPlayreadyLicense = function requestPlayreadyLicense(keySystemOptions, messageBuffer, emeOptions, callback) {\n var messageContents = getMessageContents(messageBuffer);\n var message = messageContents.message;\n var headers = mergeAndRemoveNull(messageContents.headers, emeOptions.emeHeaders, keySystemOptions.licenseHeaders);\n videojs.xhr({\n uri: keySystemOptions.url,\n method: 'post',\n headers: headers,\n body: message,\n responseType: 'arraybuffer'\n }, httpResponseHandler(callback, true));\n};\n\n/**\n * Returns an array of MediaKeySystemConfigurationObjects provided in the keySystem\n * options.\n *\n * @see {@link https://www.w3.org/TR/encrypted-media/#dom-mediakeysystemconfiguration|MediaKeySystemConfigurationObject}\n *\n * @param {Object} keySystemOptions\n * Options passed into videojs-contrib-eme for a specific keySystem\n * @return {Object[]}\n * Array of MediaKeySystemConfigurationObjects\n */\n\nvar getSupportedConfigurations = function getSupportedConfigurations(keySystemOptions) {\n if (keySystemOptions.supportedConfigurations) {\n return keySystemOptions.supportedConfigurations;\n } // TODO use initDataTypes when appropriate\n\n\n var supportedConfiguration = {};\n var audioContentType = keySystemOptions.audioContentType;\n var audioRobustness = keySystemOptions.audioRobustness;\n var videoContentType = keySystemOptions.videoContentType;\n var videoRobustness = keySystemOptions.videoRobustness;\n var persistentState = keySystemOptions.persistentState;\n\n if (audioContentType || audioRobustness) {\n supportedConfiguration.audioCapabilities = [_extends({}, audioContentType ? {\n contentType: audioContentType\n } : {}, audioRobustness ? {\n robustness: audioRobustness\n } : {})];\n }\n\n if (videoContentType || videoRobustness) {\n supportedConfiguration.videoCapabilities = [_extends({}, videoContentType ? {\n contentType: videoContentType\n } : {}, videoRobustness ? {\n robustness: videoRobustness\n } : {})];\n }\n\n if (persistentState) {\n supportedConfiguration.persistentState = persistentState;\n }\n\n return [supportedConfiguration];\n};\nvar getSupportedKeySystem = function getSupportedKeySystem(keySystems) {\n // As this happens after the src is set on the video, we rely only on the set src (we\n // do not change src based on capabilities of the browser in this plugin).\n var promise;\n Object.keys(keySystems).forEach(function (keySystem) {\n var supportedConfigurations = getSupportedConfigurations(keySystems[keySystem]);\n\n if (!promise) {\n promise = window.navigator.requestMediaKeySystemAccess(keySystem, supportedConfigurations);\n } else {\n promise = promise.catch(function (e) {\n return window.navigator.requestMediaKeySystemAccess(keySystem, supportedConfigurations);\n });\n }\n });\n return promise;\n};\nvar makeNewRequest = function makeNewRequest(player, requestOptions) {\n var mediaKeys = requestOptions.mediaKeys,\n initDataType = requestOptions.initDataType,\n initData = requestOptions.initData,\n options = requestOptions.options,\n getLicense = requestOptions.getLicense,\n removeSession = requestOptions.removeSession,\n eventBus = requestOptions.eventBus;\n var keySession = mediaKeys.createSession();\n eventBus.trigger('keysessioncreated');\n player.on('dispose', function () {\n keySession.close();\n });\n return new Promise(function (resolve, reject) {\n keySession.addEventListener('message', function (event) {\n // all other types will be handled by keystatuseschange\n if (event.messageType !== 'license-request' && event.messageType !== 'license-renewal') {\n return;\n }\n\n getLicense(options, event.message).then(function (license) {\n resolve(keySession.update(license));\n }).catch(function (err) {\n reject(err);\n });\n }, false);\n keySession.addEventListener('keystatuseschange', function (event) {\n var expired = false; // based on https://www.w3.org/TR/encrypted-media/#example-using-all-events\n\n keySession.keyStatuses.forEach(function (status, keyId) {\n // Trigger an event so that outside listeners can take action if appropriate.\n // For instance, the `output-restricted` status should result in an\n // error being thrown.\n eventBus.trigger({\n keyId: keyId,\n status: status,\n target: keySession,\n type: 'keystatuschange'\n });\n\n switch (status) {\n case 'expired':\n // If one key is expired in a session, all keys are expired. From\n // https://www.w3.org/TR/encrypted-media/#dom-mediakeystatus-expired, \"All other\n // keys in the session must have this status.\"\n expired = true;\n break;\n\n case 'internal-error':\n var message = 'Key status reported as \"internal-error.\" Leaving the session open since we ' + 'don\\'t have enough details to know if this error is fatal.'; // \"This value is not actionable by the application.\"\n // https://www.w3.org/TR/encrypted-media/#dom-mediakeystatus-internal-error\n\n videojs.log.warn(message, event);\n break;\n }\n });\n\n if (expired) {\n // Close session and remove it from the session list to ensure that a new\n // session can be created.\n //\n // TODO convert to videojs.log.debug and add back in\n // https://github.com/videojs/video.js/pull/4780\n // videojs.log.debug('Session expired, closing the session.');\n keySession.close().then(function () {\n removeSession(initData);\n makeNewRequest(player, requestOptions);\n });\n }\n }, false);\n keySession.generateRequest(initDataType, initData).catch(function () {\n reject('Unable to create or initialize key session');\n });\n });\n};\n/*\n * Creates a new media key session if media keys are available, otherwise queues the\n * session creation for when the media keys are available.\n *\n * @see {@link https://www.w3.org/TR/encrypted-media/#dom-mediakeysession|MediaKeySession}\n * @see {@link https://www.w3.org/TR/encrypted-media/#dom-mediakeys|MediaKeys}\n *\n * @function addSession\n * @param {Object} video\n * Target video element\n * @param {string} initDataType\n * The type of init data provided\n * @param {Uint8Array} initData\n * The media's init data\n * @param {Object} options\n * Options provided to the plugin for this key system\n * @param {function()} [getLicense]\n * User provided function to retrieve a license\n * @param {function()} removeSession\n * Function to remove the persisted session on key expiration so that a new session\n * may be created\n * @param {Object} eventBus\n * Event bus for any events pertinent to users\n * @return {Promise}\n * A resolved promise if session is waiting for media keys, or a promise for the\n * session creation if media keys are available\n */\n\nvar addSession = function addSession(_ref) {\n var player = _ref.player,\n video = _ref.video,\n initDataType = _ref.initDataType,\n initData = _ref.initData,\n options = _ref.options,\n getLicense = _ref.getLicense,\n removeSession = _ref.removeSession,\n eventBus = _ref.eventBus;\n\n if (video.mediaKeysObject) {\n return makeNewRequest(player, {\n mediaKeys: video.mediaKeysObject,\n initDataType: initDataType,\n initData: initData,\n options: options,\n getLicense: getLicense,\n removeSession: removeSession,\n eventBus: eventBus\n });\n }\n\n video.pendingSessionData.push({\n initDataType: initDataType,\n initData: initData,\n options: options,\n getLicense: getLicense,\n removeSession: removeSession,\n eventBus: eventBus\n });\n return Promise.resolve();\n};\n/*\n * Given media keys created from a key system access object, check for any session data\n * that was queued and create new sessions for each.\n *\n * @see {@link https://www.w3.org/TR/encrypted-media/#dom-mediakeysystemaccess|MediaKeySystemAccess}\n * @see {@link https://www.w3.org/TR/encrypted-media/#dom-mediakeysession|MediaKeySession}\n * @see {@link https://www.w3.org/TR/encrypted-media/#dom-mediakeys|MediaKeys}\n *\n * @function addPendingSessions\n * @param {Object} video\n * Target video element\n * @param {string} [certificate]\n * The server certificate (if used)\n * @param {Object} createdMediaKeys\n * Media keys to use for session creation\n * @return {Promise}\n * A promise containing new session creations and setting of media keys on the\n * video object\n */\n\nvar addPendingSessions = function addPendingSessions(_ref2) {\n var player = _ref2.player,\n video = _ref2.video,\n certificate = _ref2.certificate,\n createdMediaKeys = _ref2.createdMediaKeys;\n // save media keys on the video element to act as a reference for other functions so\n // that they don't recreate the keys\n video.mediaKeysObject = createdMediaKeys;\n var promises = [];\n\n if (certificate) {\n promises.push(createdMediaKeys.setServerCertificate(certificate));\n }\n\n for (var i = 0; i < video.pendingSessionData.length; i++) {\n var data = video.pendingSessionData[i];\n promises.push(makeNewRequest(player, {\n mediaKeys: video.mediaKeysObject,\n initDataType: data.initDataType,\n initData: data.initData,\n options: data.options,\n getLicense: data.getLicense,\n removeSession: data.removeSession,\n eventBus: data.eventBus\n }));\n }\n\n video.pendingSessionData = [];\n promises.push(video.setMediaKeys(createdMediaKeys));\n return Promise.all(promises);\n};\n\nvar defaultPlayreadyGetLicense = function defaultPlayreadyGetLicense(keySystemOptions) {\n return function (emeOptions, keyMessage, callback) {\n requestPlayreadyLicense(keySystemOptions, keyMessage, emeOptions, callback);\n };\n};\n\nvar defaultGetLicense = function defaultGetLicense(keySystemOptions) {\n return function (emeOptions, keyMessage, callback) {\n var headers = mergeAndRemoveNull({\n 'Content-type': 'application/octet-stream'\n }, emeOptions.emeHeaders, keySystemOptions.licenseHeaders);\n videojs.xhr({\n uri: keySystemOptions.url,\n method: 'POST',\n responseType: 'arraybuffer',\n body: keyMessage,\n headers: headers\n }, httpResponseHandler(callback, true));\n };\n};\n\nvar promisifyGetLicense = function promisifyGetLicense(getLicenseFn, eventBus) {\n return function (emeOptions, keyMessage) {\n return new Promise(function (resolve, reject) {\n getLicenseFn(emeOptions, keyMessage, function (err, license) {\n if (eventBus) {\n eventBus.trigger('licenserequestattempted');\n }\n\n if (err) {\n reject(err);\n return;\n }\n\n resolve(license);\n });\n });\n };\n};\n\nvar standardizeKeySystemOptions = function standardizeKeySystemOptions(keySystem, keySystemOptions) {\n if (typeof keySystemOptions === 'string') {\n keySystemOptions = {\n url: keySystemOptions\n };\n }\n\n if (!keySystemOptions.url && !keySystemOptions.getLicense) {\n throw new Error('Neither URL nor getLicense function provided to get license');\n }\n\n if (keySystemOptions.url && !keySystemOptions.getLicense) {\n keySystemOptions.getLicense = keySystem === 'com.microsoft.playready' ? defaultPlayreadyGetLicense(keySystemOptions) : defaultGetLicense(keySystemOptions);\n }\n\n return keySystemOptions;\n};\n\nvar standard5July2016 = function standard5July2016(_ref3) {\n var player = _ref3.player,\n video = _ref3.video,\n initDataType = _ref3.initDataType,\n initData = _ref3.initData,\n keySystemAccess = _ref3.keySystemAccess,\n options = _ref3.options,\n removeSession = _ref3.removeSession,\n eventBus = _ref3.eventBus;\n var keySystemPromise = Promise.resolve();\n\n if (typeof video.mediaKeysObject === 'undefined') {\n // Prevent entering this path again.\n video.mediaKeysObject = null; // Will store all initData until the MediaKeys is ready.\n\n video.pendingSessionData = [];\n var certificate;\n var keySystemOptions;\n keySystemPromise = new Promise(function (resolve, reject) {\n // save key system for adding sessions\n video.keySystem = keySystemAccess.keySystem;\n keySystemOptions = standardizeKeySystemOptions(keySystemAccess.keySystem, options.keySystems[keySystemAccess.keySystem]);\n\n if (!keySystemOptions.getCertificate) {\n resolve(keySystemAccess);\n return;\n }\n\n keySystemOptions.getCertificate(options, function (err, cert) {\n if (err) {\n reject(err);\n return;\n }\n\n certificate = cert;\n resolve();\n });\n }).then(function () {\n return keySystemAccess.createMediaKeys();\n }).then(function (createdMediaKeys) {\n return addPendingSessions({\n player: player,\n video: video,\n certificate: certificate,\n createdMediaKeys: createdMediaKeys\n });\n }).catch(function (err) {\n // if we have a specific error message, use it, otherwise show a more\n // generic one\n if (err) {\n return Promise.reject(err);\n }\n\n return Promise.reject('Failed to create and initialize a MediaKeys object');\n });\n }\n\n return keySystemPromise.then(function () {\n var _standardizeKeySystem = standardizeKeySystemOptions(video.keySystem, options.keySystems[video.keySystem]),\n getLicense = _standardizeKeySystem.getLicense;\n\n return addSession({\n player: player,\n video: video,\n initDataType: initDataType,\n initData: initData,\n options: options,\n // if key system has not been determined then addSession doesn't need getLicense\n getLicense: video.keySystem ? promisifyGetLicense(getLicense, eventBus) : null,\n removeSession: removeSession,\n eventBus: eventBus\n });\n });\n};\n\n/**\n * The W3C Working Draft of 22 October 2013 seems to be the best match for\n * the ms-prefixed API. However, it should only be used as a guide; it is\n * doubtful the spec is 100% implemented as described.\n *\n * @see https://www.w3.org/TR/2013/WD-encrypted-media-20131022\n */\nvar FAIRPLAY_KEY_SYSTEM = 'com.apple.fps.1_0';\n\nvar concatInitDataIdAndCertificate = function concatInitDataIdAndCertificate(_ref) {\n var initData = _ref.initData,\n id = _ref.id,\n cert = _ref.cert;\n\n if (typeof id === 'string') {\n id = stringToUint16Array(id);\n } // layout:\n // [initData]\n // [4 byte: idLength]\n // [idLength byte: id]\n // [4 byte:certLength]\n // [certLength byte: cert]\n\n\n var offset = 0;\n var buffer = new ArrayBuffer(initData.byteLength + 4 + id.byteLength + 4 + cert.byteLength);\n var dataView = new DataView(buffer);\n var initDataArray = new Uint8Array(buffer, offset, initData.byteLength);\n initDataArray.set(initData);\n offset += initData.byteLength;\n dataView.setUint32(offset, id.byteLength, true);\n offset += 4;\n var idArray = new Uint16Array(buffer, offset, id.length);\n idArray.set(id);\n offset += idArray.byteLength;\n dataView.setUint32(offset, cert.byteLength, true);\n offset += 4;\n var certArray = new Uint8Array(buffer, offset, cert.byteLength);\n certArray.set(cert);\n return new Uint8Array(buffer, 0, buffer.byteLength);\n};\n\nvar addKey = function addKey(_ref2) {\n var video = _ref2.video,\n contentId = _ref2.contentId,\n initData = _ref2.initData,\n cert = _ref2.cert,\n options = _ref2.options,\n getLicense = _ref2.getLicense,\n eventBus = _ref2.eventBus;\n return new Promise(function (resolve, reject) {\n if (!video.webkitKeys) {\n try {\n video.webkitSetMediaKeys(new window.WebKitMediaKeys(FAIRPLAY_KEY_SYSTEM));\n } catch (error) {\n reject('Could not create MediaKeys');\n return;\n }\n }\n\n var keySession;\n\n try {\n keySession = video.webkitKeys.createSession('video/mp4', concatInitDataIdAndCertificate({\n id: contentId,\n initData: initData,\n cert: cert\n }));\n } catch (error) {\n reject('Could not create key session');\n return;\n }\n\n eventBus.trigger('keysessioncreated');\n keySession.contentId = contentId;\n keySession.addEventListener('webkitkeymessage', function (event) {\n getLicense(options, contentId, event.message, function (err, license) {\n if (eventBus) {\n eventBus.trigger('licenserequestattempted');\n }\n\n if (err) {\n reject(err);\n return;\n }\n\n keySession.update(new Uint8Array(license));\n });\n });\n keySession.addEventListener('webkitkeyadded', function () {\n resolve();\n }); // for testing purposes, adding webkitkeyerror must be the last item in this method\n\n keySession.addEventListener('webkitkeyerror', function () {\n var error = keySession.error;\n reject(\"KeySession error: code \" + error.code + \", systemCode \" + error.systemCode);\n });\n });\n};\n\nvar defaultGetCertificate = function defaultGetCertificate(fairplayOptions) {\n return function (emeOptions, callback) {\n var headers = mergeAndRemoveNull(emeOptions.emeHeaders, fairplayOptions.certificateHeaders);\n videojs.xhr({\n uri: fairplayOptions.certificateUri,\n responseType: 'arraybuffer',\n headers: headers\n }, httpResponseHandler(function (err, license) {\n if (err) {\n callback(err);\n return;\n } // in this case, license is still the raw ArrayBuffer,\n // (we don't want httpResponseHandler to decode it)\n // convert it into Uint8Array as expected\n\n\n callback(null, new Uint8Array(license));\n }));\n };\n};\n\nvar defaultGetContentId = function defaultGetContentId(emeOptions, initData) {\n return getHostnameFromUri(uint8ArrayToString(initData));\n};\n\nvar defaultGetLicense$1 = function defaultGetLicense(fairplayOptions) {\n return function (emeOptions, contentId, keyMessage, callback) {\n var headers = mergeAndRemoveNull({\n 'Content-type': 'application/octet-stream'\n }, emeOptions.emeHeaders, fairplayOptions.licenseHeaders);\n videojs.xhr({\n uri: fairplayOptions.licenseUri,\n method: 'POST',\n responseType: 'arraybuffer',\n body: keyMessage,\n headers: headers\n }, httpResponseHandler(callback, true));\n };\n};\n\nvar fairplay = function fairplay(_ref3) {\n var video = _ref3.video,\n initData = _ref3.initData,\n options = _ref3.options,\n eventBus = _ref3.eventBus;\n var fairplayOptions = options.keySystems[FAIRPLAY_KEY_SYSTEM];\n var getCertificate = fairplayOptions.getCertificate || defaultGetCertificate(fairplayOptions);\n var getContentId = fairplayOptions.getContentId || defaultGetContentId;\n var getLicense = fairplayOptions.getLicense || defaultGetLicense$1(fairplayOptions);\n return new Promise(function (resolve, reject) {\n getCertificate(options, function (err, cert) {\n if (err) {\n reject(err);\n return;\n }\n\n resolve(cert);\n });\n }).then(function (cert) {\n return addKey({\n video: video,\n cert: cert,\n initData: initData,\n getLicense: getLicense,\n options: options,\n contentId: getContentId(options, initData),\n eventBus: eventBus\n });\n });\n};\n\n/**\n * The W3C Working Draft of 22 October 2013 seems to be the best match for\n * the ms-prefixed API. However, it should only be used as a guide; it is\n * doubtful the spec is 100% implemented as described.\n *\n * @see https://www.w3.org/TR/2013/WD-encrypted-media-20131022\n * @see https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/compatibility/mt598601(v=vs.85)\n */\nvar PLAYREADY_KEY_SYSTEM = 'com.microsoft.playready';\nvar addKeyToSession = function addKeyToSession(options, session, event, eventBus) {\n var playreadyOptions = options.keySystems[PLAYREADY_KEY_SYSTEM];\n\n if (typeof playreadyOptions.getKey === 'function') {\n playreadyOptions.getKey(options, event.destinationURL, event.message.buffer, function (err, key) {\n if (err) {\n eventBus.trigger({\n message: 'Unable to get key: ' + err,\n target: session,\n type: 'mskeyerror'\n });\n return;\n }\n\n session.update(key);\n });\n return;\n }\n\n if (typeof playreadyOptions === 'string') {\n playreadyOptions = {\n url: playreadyOptions\n };\n } else if (typeof playreadyOptions === 'boolean') {\n playreadyOptions = {};\n }\n\n if (!playreadyOptions.url) {\n playreadyOptions.url = event.destinationURL;\n }\n\n var callback = function callback(err, responseBody) {\n if (eventBus) {\n eventBus.trigger('licenserequestattempted');\n }\n\n if (err) {\n eventBus.trigger({\n message: 'Unable to request key from url: ' + playreadyOptions.url,\n target: session,\n type: 'mskeyerror'\n });\n return;\n }\n\n session.update(new Uint8Array(responseBody));\n };\n\n if (playreadyOptions.getLicense) {\n playreadyOptions.getLicense(options, event.message.buffer, callback);\n } else {\n requestPlayreadyLicense(playreadyOptions, event.message.buffer, options, callback);\n }\n};\nvar createSession = function createSession(video, initData, options, eventBus) {\n // Note: invalid mime type passed here throws a NotSupportedError\n var session = video.msKeys.createSession('video/mp4', initData);\n\n if (!session) {\n throw new Error('Could not create key session.');\n }\n\n eventBus.trigger('keysessioncreated'); // Note that mskeymessage may not always be called for PlayReady:\n //\n // \"If initData contains a PlayReady object that contains an OnDemand header, only a\n // keyAdded event is returned (as opposed to a keyMessage event as described in the\n // Encrypted Media Extension draft). Similarly, if initData contains a PlayReady object\n // that contains a key identifier in the hashed data storage (HDS), only a keyAdded\n // event is returned.\"\n // eslint-disable-next-line max-len\n // @see [PlayReady License Acquisition]{@link https://msdn.microsoft.com/en-us/library/dn468979.aspx}\n\n session.addEventListener('mskeymessage', function (event) {\n addKeyToSession(options, session, event, eventBus);\n });\n session.addEventListener('mskeyerror', function (event) {\n eventBus.trigger({\n message: 'Unexpected key error from key session with ' + (\"code: \" + session.error.code + \" and systemCode: \" + session.error.systemCode),\n target: session,\n type: 'mskeyerror'\n });\n });\n session.addEventListener('mskeyadded', function () {\n eventBus.trigger({\n target: session,\n type: 'mskeyadded'\n });\n });\n};\nvar msPrefixed = (function (_ref) {\n var video = _ref.video,\n initData = _ref.initData,\n options = _ref.options,\n eventBus = _ref.eventBus;\n\n // Although by the standard examples the presence of video.msKeys is checked first to\n // verify that we aren't trying to create a new session when one already exists, here\n // sessions are managed earlier (on the player.eme object), meaning that at this point\n // any existing keys should be cleaned up.\n // TODO: Will this break rotation? Is it safe?\n if (video.msKeys) {\n delete video.msKeys;\n }\n\n try {\n video.msSetMediaKeys(new window.MSMediaKeys(PLAYREADY_KEY_SYSTEM));\n } catch (e) {\n throw new Error('Unable to create media keys for PlayReady key system. ' + 'Error: ' + e.message);\n }\n\n createSession(video, initData, options, eventBus);\n});\n\nvar version = \"3.11.2\";\n\nvar hasSession = function hasSession(sessions, initData) {\n for (var i = 0; i < sessions.length; i++) {\n // Other types of sessions may be in the sessions array that don't store the initData\n // (for instance, PlayReady sessions on IE11).\n if (!sessions[i].initData) {\n continue;\n } // initData should be an ArrayBuffer by the spec:\n // eslint-disable-next-line max-len\n // @see [Media Encrypted Event initData Spec]{@link https://www.w3.org/TR/encrypted-media/#mediaencryptedeventinit}\n //\n // However, on some browsers it may come back with a typed array view of the buffer.\n // This is the case for IE11, however, since IE11 sessions are handled differently\n // (following the msneedkey PlayReady path), this coversion may not be important. It\n // is safe though, and might be a good idea to retain in the short term (until we have\n // catalogued the full range of browsers and their implementations).\n\n\n var sessionBuffer = arrayBufferFrom(sessions[i].initData);\n var initDataBuffer = arrayBufferFrom(initData);\n\n if (arrayBuffersEqual(sessionBuffer, initDataBuffer)) {\n return true;\n }\n }\n\n return false;\n};\nvar removeSession = function removeSession(sessions, initData) {\n for (var i = 0; i < sessions.length; i++) {\n if (sessions[i].initData === initData) {\n sessions.splice(i, 1);\n return;\n }\n }\n};\nvar handleEncryptedEvent = function handleEncryptedEvent(player, event, options, sessions, eventBus) {\n if (!options || !options.keySystems) {\n // return silently since it may be handled by a different system\n return Promise.resolve();\n }\n\n var initData = event.initData;\n return getSupportedKeySystem(options.keySystems).then(function (keySystemAccess) {\n var keySystem = keySystemAccess.keySystem; // Use existing init data from options if provided\n\n if (options.keySystems[keySystem] && options.keySystems[keySystem].pssh) {\n initData = options.keySystems[keySystem].pssh;\n } // \"Initialization Data must be a fixed value for a given set of stream(s) or media\n // data. It must only contain information related to the keys required to play a given\n // set of stream(s) or media data.\"\n // eslint-disable-next-line max-len\n // @see [Initialization Data Spec]{@link https://www.w3.org/TR/encrypted-media/#initialization-data}\n\n\n if (hasSession(sessions, initData) || !initData) {\n // TODO convert to videojs.log.debug and add back in\n // https://github.com/videojs/video.js/pull/4780\n // videojs.log('eme',\n // 'Already have a configured session for init data, ignoring event.');\n return Promise.resolve();\n }\n\n sessions.push({\n initData: initData\n });\n return standard5July2016({\n player: player,\n video: event.target,\n initDataType: event.initDataType,\n initData: initData,\n keySystemAccess: keySystemAccess,\n options: options,\n removeSession: removeSession.bind(null, sessions),\n eventBus: eventBus\n });\n });\n};\nvar handleWebKitNeedKeyEvent = function handleWebKitNeedKeyEvent(event, options, eventBus) {\n if (!options.keySystems || !options.keySystems[FAIRPLAY_KEY_SYSTEM] || !event.initData) {\n // return silently since it may be handled by a different system\n return Promise.resolve();\n } // From Apple's example Safari FairPlay integration code, webkitneedkey is not repeated\n // for the same content. Unless documentation is found to present the opposite, handle\n // all webkitneedkey events the same (even if they are repeated).\n\n\n return fairplay({\n video: event.target,\n initData: event.initData,\n options: options,\n eventBus: eventBus\n });\n};\nvar handleMsNeedKeyEvent = function handleMsNeedKeyEvent(event, options, sessions, eventBus) {\n if (!options.keySystems || !options.keySystems[PLAYREADY_KEY_SYSTEM]) {\n // return silently since it may be handled by a different system\n return;\n } // \"With PlayReady content protection, your Web app must handle the first needKey event,\n // but it must then ignore any other needKey event that occurs.\"\n // eslint-disable-next-line max-len\n // @see [PlayReady License Acquisition]{@link https://msdn.microsoft.com/en-us/library/dn468979.aspx}\n //\n // Usually (and as per the example in the link above) this is determined by checking for\n // the existence of video.msKeys. However, since the video element may be reused, it's\n // easier to directly manage the session.\n\n\n if (sessions.reduce(function (acc, session) {\n return acc || session.playready;\n }, false)) {\n // TODO convert to videojs.log.debug and add back in\n // https://github.com/videojs/video.js/pull/4780\n // videojs.log('eme',\n // 'An \\'msneedkey\\' event was receieved earlier, ignoring event.');\n return;\n }\n\n var initData = event.initData; // Use existing init data from options if provided\n\n if (options.keySystems[PLAYREADY_KEY_SYSTEM] && options.keySystems[PLAYREADY_KEY_SYSTEM].pssh) {\n initData = options.keySystems[PLAYREADY_KEY_SYSTEM].pssh;\n }\n\n if (!initData) {\n return;\n }\n\n sessions.push({\n playready: true,\n initData: initData\n });\n msPrefixed({\n video: event.target,\n initData: initData,\n options: options,\n eventBus: eventBus\n });\n};\nvar getOptions = function getOptions(player) {\n return merge(player.currentSource(), player.eme.options);\n};\n/**\n * Configure a persistent sessions array and activeSrc property to ensure we properly\n * handle each independent source's events. Should be run on any encrypted or needkey\n * style event to ensure that the sessions reflect the active source.\n *\n * @function setupSessions\n * @param {Player} player\n */\n\nvar setupSessions = function setupSessions(player) {\n var src = player.src();\n\n if (src !== player.eme.activeSrc) {\n player.eme.activeSrc = src;\n player.eme.sessions = [];\n }\n};\n/**\n * Construct a simple function that can be used to dispatch EME errors on the\n * player directly, such as providing it to a `.catch()`.\n *\n * @function emeErrorHandler\n * @param {Player} player\n * @return {Function}\n */\n\nvar emeErrorHandler = function emeErrorHandler(player) {\n return function (objOrErr) {\n var error = {\n // MEDIA_ERR_ENCRYPTED is code 5\n code: 5\n };\n\n if (typeof objOrErr === 'string') {\n error.message = objOrErr;\n } else if (objOrErr) {\n if (objOrErr.message) {\n error.message = objOrErr.message;\n }\n\n if (objOrErr.cause && (objOrErr.cause.length || objOrErr.cause.byteLength)) {\n error.cause = objOrErr.cause;\n }\n }\n\n player.error(error);\n };\n};\n/**\n * Function to invoke when the player is ready.\n *\n * This is a great place for your plugin to initialize itself. When this\n * function is called, the player will have its DOM and child components\n * in place.\n *\n * @function onPlayerReady\n * @param {Player} player\n * @param {Function} emeError\n */\n\nvar onPlayerReady = function onPlayerReady(player, emeError) {\n if (player.$('.vjs-tech').tagName.toLowerCase() !== 'video') {\n return;\n }\n\n setupSessions(player);\n\n if (window.WebKitMediaKeys) {\n var handleFn = function handleFn(event) {\n // TODO convert to videojs.log.debug and add back in\n // https://github.com/videojs/video.js/pull/4780\n // videojs.log('eme', 'Received a \\'webkitneedkey\\' event');\n // TODO it's possible that the video state must be cleared if reusing the same video\n // element between sources\n setupSessions(player);\n handleWebKitNeedKeyEvent(event, getOptions(player), player.tech_).catch(emeError);\n }; // Support Safari EME with FairPlay\n // (also used in early Chrome or Chrome with EME disabled flag)\n\n\n player.tech_.el_.addEventListener('webkitneedkey', function (event) {\n var options = getOptions(player);\n var firstWebkitneedkeyTimeout = options.firstWebkitneedkeyTimeout || 1000;\n var src = player.src(); // on source change or first startup reset webkitneedkey options.\n\n player.eme.webkitneedkey_ = player.eme.webkitneedkey_ || {}; // if the source changed we need to handle the first event again.\n // track source changes internally.\n\n if (player.eme.webkitneedkey_.src !== src) {\n player.eme.webkitneedkey_ = {\n handledFirstEvent: false,\n src: src\n };\n } // It's possible that at the start of playback a rendition switch\n // on a small player in safari's HLS implementation will cause\n // two webkitneedkey events to occur. We want to make sure to cancel\n // our first existing request if we get another within 1 second. This\n // prevents a non-fatal player error from showing up due to a\n // request failure.\n\n\n if (!player.eme.webkitneedkey_.handledFirstEvent) {\n // clear the old timeout so that a new one can be created\n // with the new rendition's event data\n player.clearTimeout(player.eme.webkitneedkey_.timeout);\n player.eme.webkitneedkey_.timeout = player.setTimeout(function () {\n player.eme.webkitneedkey_.handledFirstEvent = true;\n player.eme.webkitneedkey_.timeout = null;\n handleFn(event);\n }, firstWebkitneedkeyTimeout); // after we have a verified first request, we will request on\n // every other event like normal.\n } else {\n handleFn(event);\n }\n });\n } else if (window.MediaKeys) {\n // Support EME 05 July 2016\n // Chrome 42+, Firefox 47+, Edge, Safari 12.1+ on macOS 10.14+\n player.tech_.el_.addEventListener('encrypted', function (event) {\n // TODO convert to videojs.log.debug and add back in\n // https://github.com/videojs/video.js/pull/4780\n // videojs.log('eme', 'Received an \\'encrypted\\' event');\n setupSessions(player);\n handleEncryptedEvent(player, event, getOptions(player), player.eme.sessions, player.tech_).catch(emeError);\n });\n } else if (window.MSMediaKeys) {\n // IE11 Windows 8.1+\n // Since IE11 doesn't support promises, we have to use a combination of\n // try/catch blocks and event handling to simulate promise rejection.\n // Functionally speaking, there should be no discernible difference between\n // the behavior of IE11 and those of other browsers.\n player.tech_.el_.addEventListener('msneedkey', function (event) {\n // TODO convert to videojs.log.debug and add back in\n // https://github.com/videojs/video.js/pull/4780\n // videojs.log('eme', 'Received an \\'msneedkey\\' event');\n setupSessions(player);\n\n try {\n handleMsNeedKeyEvent(event, getOptions(player), player.eme.sessions, player.tech_);\n } catch (error) {\n emeError(error);\n }\n });\n player.tech_.on('mskeyerror', emeError); // TODO: refactor this plugin so it can use a plugin dispose\n\n player.on('dispose', function () {\n player.tech_.off('mskeyerror', emeError);\n });\n }\n};\n/**\n * A video.js plugin.\n *\n * In the plugin function, the value of `this` is a video.js `Player`\n * instance. You cannot rely on the player being in a \"ready\" state here,\n * depending on how the plugin is invoked. This may or may not be important\n * to you; if not, remove the wait for \"ready\"!\n *\n * @function eme\n * @param {Object} [options={}]\n * An object of options left to the plugin author to define.\n */\n\n\nvar eme = function eme(options) {\n if (options === void 0) {\n options = {};\n }\n\n var player = this;\n var emeError = emeErrorHandler(player);\n player.ready(function () {\n return onPlayerReady(player, emeError);\n }); // Plugin API\n\n player.eme = {\n /**\n * Sets up MediaKeys on demand\n * Works around https://bugs.chromium.org/p/chromium/issues/detail?id=895449\n *\n * @function initializeMediaKeys\n * @param {Object} [emeOptions={}]\n * An object of eme plugin options.\n * @param {Function} [callback=function(){}]\n * @param {boolean} [suppressErrorIfPossible=false]\n */\n initializeMediaKeys: function initializeMediaKeys(emeOptions, callback, suppressErrorIfPossible) {\n if (emeOptions === void 0) {\n emeOptions = {};\n }\n\n if (callback === void 0) {\n callback = function callback() {};\n }\n\n if (suppressErrorIfPossible === void 0) {\n suppressErrorIfPossible = false;\n }\n\n // TODO: this should be refactored and renamed to be less tied\n // to encrypted events\n var mergedEmeOptions = merge(player.currentSource(), options, emeOptions); // fake an encrypted event for handleEncryptedEvent\n\n var mockEncryptedEvent = {\n initDataType: 'cenc',\n initData: null,\n target: player.tech_.el_\n };\n setupSessions(player);\n\n if (player.tech_.el_.setMediaKeys) {\n handleEncryptedEvent(player, mockEncryptedEvent, mergedEmeOptions, player.eme.sessions, player.tech_).then(function () {\n return callback();\n }).catch(function (error) {\n callback(error);\n\n if (!suppressErrorIfPossible) {\n emeError(error);\n }\n });\n } else if (player.tech_.el_.msSetMediaKeys) {\n var msKeyHandler = function msKeyHandler(event) {\n player.tech_.off('mskeyadded', msKeyHandler);\n player.tech_.off('mskeyerror', msKeyHandler);\n\n if (event.type === 'mskeyerror') {\n callback(event.target.error);\n\n if (!suppressErrorIfPossible) {\n emeError(event.message);\n }\n } else {\n callback();\n }\n };\n\n player.tech_.one('mskeyadded', msKeyHandler);\n player.tech_.one('mskeyerror', msKeyHandler);\n\n try {\n handleMsNeedKeyEvent(mockEncryptedEvent, mergedEmeOptions, player.eme.sessions, player.tech_);\n } catch (error) {\n player.tech_.off('mskeyadded', msKeyHandler);\n player.tech_.off('mskeyerror', msKeyHandler);\n callback(error);\n\n if (!suppressErrorIfPossible) {\n emeError(error);\n }\n }\n }\n },\n options: options\n };\n}; // Register the plugin with video.js.\n\n\nvideojs.registerPlugin('eme', eme); // Include the version number.\n\neme.VERSION = version;\n\nexport default eme;\nexport { hasSession, removeSession, handleEncryptedEvent, handleWebKitNeedKeyEvent, handleMsNeedKeyEvent, getOptions, setupSessions, emeErrorHandler };\n","import videojs from 'video.js';\nimport 'videojs-contrib-eme';\n\nvar version = \"1.3.0\";\n\n/**\n * @ignore\n * @type {typeof import('video.js/dist/types/player').default}\n */\nconst vjsPlayer = videojs.getComponent('player');\n\n/**\n * This class extends the video.js Player.\n *\n * @class Player\n * @see https://docs.videojs.com/player\n */\nclass Player extends vjsPlayer {\n constructor(tag, options, ready) {\n /**\n * Configuration for plugins.\n *\n * @see [Video.js Plugins Option]{@link https://videojs.com/guides/options/#plugins}\n * @type {Object}\n * @property {boolean} eme - Enable the EME (Encrypted Media Extensions) plugin.\n */\n options = videojs.obj.merge(options, { plugins: { eme: true }});\n super(tag, options, ready);\n }\n\n /**\n * A getter/setter for the media's audio track.\n * Activates the audio track according to the language and kind properties.\n * Falls back on the first audio track found if the kind property is not satisfied.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/kind\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/language\n *\n * @param {import('./typedef').TrackSelector} [trackSelector]\n *\n * @example\n * // Get the current audio track\n * player.audioTrack();\n *\n * @example\n * // Activate an audio track based on language and kind properties\n * player.audioTrack({language:'en', kind:'description'});\n *\n * @example\n * // Activate first audio track found corresponding to language\n * player.audioTrack({language:'fr'});\n *\n * @return {import('video.js/dist/types/tracks/audio-track').default | undefined} The\n * currently enabled audio track. See {@link https://docs.videojs.com/audiotrack}.\n */\n audioTrack(trackSelector) {\n const audioTracks = Array.from(this.player().audioTracks());\n\n if (!trackSelector) {\n return audioTracks.find((audioTrack) => audioTrack.enabled);\n }\n\n const { kind, language } = trackSelector;\n const audioTrack =\n audioTracks.find(\n (audioTrack) =>\n audioTrack.language === language && audioTrack.kind === kind\n ) || audioTracks.find((audioTrack) => audioTrack.language === language);\n\n if (audioTrack) {\n audioTrack.enabled = true;\n }\n\n return audioTrack;\n }\n\n /**\n * A getter/setter for the media's text track.\n * Activates the text track according to the language and kind properties.\n * Falls back on the first text track found if the kind property is not satisfied.\n * Disables all subtitle tracks that are `showing` if the `trackSelector` is truthy but does not satisfy any condition.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/kind\n * @see https://developer.mozilla.org/en-US/docs/Web/API/textTrack/language\n *\n * @param {import('./typedef').TrackSelector} [trackSelector]\n *\n * @example\n * // Get the current text track\n * player.textTrack();\n *\n * @example\n * // Disable all text tracks has a side effect\n * player.textTrack('off');\n * player.textTrack({});\n *\n * @example\n * // Activate an text track based on language and kind properties\n * player.textTrack({language:'en', kind:'captions'});\n *\n * @example\n * // Activate first text track found corresponding to language\n * player.textTrack({language:'fr'});\n *\n * @return {import('video.js/dist/types/tracks/text-track').default | undefined} The\n * currently enabled text track. See {@link https://docs.videojs.com/texttrack}.\n */\n textTrack(trackSelector) {\n const textTracks = Array.from(this.player().textTracks()).filter(\n (textTrack) => !['chapters', 'metadata'].includes(textTrack.kind)\n );\n\n if (!trackSelector) {\n return textTracks.find((textTrack) => textTrack.mode === 'showing');\n }\n\n textTracks.forEach((textTrack) => (textTrack.mode = 'disabled'));\n\n const { kind, language } = trackSelector;\n const textTrack =\n textTracks.find((textTrack) => {\n if (textTrack.language === language && textTrack.kind === kind) {\n textTrack.mode = 'showing';\n }\n\n return textTrack.mode === 'showing';\n }) ||\n textTracks.find((textTrack) => {\n if (textTrack.language === language) {\n textTrack.mode = 'showing';\n }\n\n return textTrack.mode === 'showing';\n });\n\n return textTrack;\n }\n}\n\nvideojs.registerComponent('player', Player);\n\n/**\n * Pillarbox is an alias for the video.js namespace with additional options.\n *\n * @namespace\n * @see https://docs.videojs.com/module-videojs-videojs\n * @type {videojs}\n */\nconst pillarbox = videojs;\n\npillarbox.VERSION = {\n pillarbox: version,\n videojs: videojs.VERSION,\n [videojs.VhsSourceHandler.name]: videojs.VhsSourceHandler.VERSION,\n eme: videojs.getPlugin('eme').VERSION,\n};\n\n/**\n * Enable smooth seeking for Pillarbox.\n *\n * @see [Video.js enableSmoothSeeking Option]{@link https://videojs.com/guides/options/#enablesmoothseeking}\n * @type {boolean}\n * @default true\n */\npillarbox.options.enableSmoothSeeking = true;\n/**\n * Enable fill mode for the video player, allowing it to expand to fill the container.\n *\n * @see [Video.js Fill Option]{@link https://videojs.com/guides/layout/#fill-mode}\n * @type {boolean}\n * @default true\n */\npillarbox.options.fill = true;\n/**\n * Configuration options for HTML5 settings in Pillarbox.\n *\n * @see [VHS useForcedSubtitles Option]{@link https://github.com/videojs/http-streaming/blob/main/README.md#useforcedsubtitles}\n * @type {Object}\n * @property {Object} vhs - Configuration for the Video.js HTTP Streaming.\n * @property {boolean} useForcedSubtitles - Enables the player to display forced subtitles by default.\n * Forced subtitles are pieces of information intended for display when no other text representation\n * is selected. They are used to clarify dialogue, provide alternate languages, display texted graphics,\n * or present location/person IDs that are not otherwise covered in the dubbed/localized audio.\n */\npillarbox.options.html5 = {\n vhs: { useForcedSubtitles: true }\n};\n/**\n * Configuration for the live tracker.\n *\n * @see [Video.js liveTracker Option]{@link https://videojs.com/guides/options/#livetrackertrackingthreshold}\n * @type {Object}\n * @property {number} trackingThreshold - A threshold that controls when the liveui should be shown.\n * @property {number} liveTolerance - An option that controls how far from the seekable end should be considered live playback.\n */\npillarbox.options.liveTracker = {\n trackingThreshold: 120,\n liveTolerance: 15,\n};\n/**\n * Allows the player to use the live ui that includes:\n *\n * - A progress bar for seeking within the live window\n * - A button that can be clicked to seek to the live edge with a circle indicating if you are at the live edge or not.\n *\n * @see [Video.js liveui Option]{@link https://videojs.com/guides/options/#liveui}\n * @type {boolean}\n */\npillarbox.options.liveui = true;\n/**\n * Indicates that the video is to be played \"inline\", that is within the element's playback area.\n *\n * @see [Video element playsinline attribute]{@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#playsinline}\n * @type {boolean}\n */\npillarbox.options.playsinline = true;\n/**\n * Enable responsive mode, this will cause the player to customize itself based on responsive breakpoints.\n *\n * @see [Video.js Responsive Option]{@link https://videojs.com/guides/options/#responsive}\n * @type {boolean}\n */\npillarbox.options.responsive = true;\n/**\n * A placeholder for accessing trackers directly from the player.\n *\n * @type {Object}\n */\npillarbox.options.trackers = {};\n\n/**\n * Represents the composition of media content.\n *\n * @class MediaComposition\n * @property {string} chapterUrn URN (Uniform Resource Name) of the associated chapter.\n * @property {string} segmentUrn URN of the associated segment.\n * @property {Episode} episode Associated episode.\n * @property {Show} show Associated show.\n * @property {Channel} channel Associated channel.\n * @property {Array.} chapterList List of associated chapters.\n * @property {Array.} topicList List of associated topics.\n * @property {Object.} analyticsData Analytics data associated with the media composition.\n * @property {Object.} analyticsMetadata Metadata associated with analytics for the media composition.\n */\nclass MediaComposition {\n /**\n * Find a chapter by its URN.\n *\n * @param {String} urn\n *\n * @returns {Chapter} chapter\n */\n findChapterByUrn(urn) {\n if (this.chapterList) {\n const [chapter] = this.chapterList.filter(\n (element) => element.urn === urn\n );\n\n return chapter;\n }\n\n return undefined;\n }\n\n /**\n * Return a segment from main chapter following segmentUrn in mediaComposition.\n *\n * @returns {Segment|undefined} main segment\n */\n findMainSegment() {\n if (!this.segmentUrn) {\n return undefined;\n }\n\n const segmentList = this.getMainSegments();\n const [segment] = segmentList.filter(\n (element) => element.urn === this.segmentUrn\n );\n\n return segment;\n }\n\n /**\n * Find resource list by URN.\n *\n * @param {String} urn\n * @returns {Array.|undefined} of resources\n */\n findResourceListByUrn(urn) {\n const chapterByUrn = this.findChapterByUrn(urn);\n\n if (chapterByUrn) {\n return chapterByUrn.resourceList || [];\n }\n\n return undefined;\n }\n\n /**\n * A list of chapters.\n *\n * @returns {Array.} of chapters\n */\n getChapters() {\n return this.chapterList;\n }\n\n /**\n * Filter external text tracks that are already available internally.\n *\n * __Rules:__\n * 1. TTML format is filtered\n *\n * 2. If both are empty that means only internal text tracks will be displayed\n * to the user as they are automatically loaded by the player.\n *\n * 3. If subtitleInformationList is missing from the MediaComposition and subtitleList\n * is available but the media contains internal text tracks that are also available internally.\n * It will result on a duplication client side.\n *\n * 4. If subtitleList and subtitleInformationList a merge between both will be operated,\n * removing the external text tracks already available internally.\n *\n *\n * @returns {Array.} external text tracks\n */\n getFilteredExternalSubtitles() {\n const { subtitleList } = this.getMainChapter();\n const [{ subtitleInformationList } = {}] = this.getResourceList().filter(\n ({ subtitleInformationList }) => subtitleInformationList\n );\n const onlyHasExternalSubtitles = subtitleList && !subtitleInformationList;\n\n if (!subtitleList) {\n return [];\n }\n\n // TTML format is not supported\n const subtitles = subtitleList.filter(\n (subtitle) => subtitle.format !== 'TTML'\n );\n\n if (onlyHasExternalSubtitles) {\n return subtitles;\n }\n\n return subtitles.filter((subtitle) => {\n const addSubtitle = !subtitleInformationList.find(\n (subtitleInformation) =>\n subtitleInformation.locale === subtitle.locale &&\n subtitle.type === subtitleInformation.type\n );\n\n return addSubtitle;\n });\n }\n\n /**\n * Block reason for main chapter. This also uses current date for STARTDATE.\n *\n * @see BlockReason\n *\n * @returns {string | undefined} undefined if main chapter is not blocked\n */\n getMainBlockReason() {\n const mainChapter = this.getMainChapter();\n\n if (!mainChapter) {\n return undefined;\n }\n\n let { blockReason } = mainChapter;\n\n if (!blockReason && new Date() < this.getMainValidFromDate()) {\n blockReason = 'STARTDATE';\n }\n\n return blockReason;\n }\n\n /**\n * Get blocked segments from the main chapter.\n *\n * @returns {Array.} of blocked segments\n */\n getMainBlockedSegments() {\n return this.getMainSegments().filter(segment => segment.blockReason);\n }\n\n /**\n * Get the mediaComposition's main chapter.\n *\n * @returns {Chapter}\n */\n getMainChapter() {\n if (!this.mainChapter) {\n this.mainChapter = this.findChapterByUrn(this.chapterUrn);\n }\n\n if (!this.mainChapter && this.chapterList && this.chapterList.length > 0) {\n [this.mainChapter] = this.chapterList;\n }\n\n return this.mainChapter;\n }\n\n /**\n * Get the main chapter's image URL decorated with default width and format.\n *\n * @returns {String|undefined} image URL\n */\n getMainChapterImageUrl() {\n const mainChapter = this.getMainChapter();\n\n if (!mainChapter || !mainChapter.imageUrl) {\n return undefined;\n }\n\n return mainChapter.imageUrl;\n }\n\n /**\n * Get main resources.\n *\n * @returns {Array.} array of sources.\n */\n // eslint-disable-next-line max-lines-per-function\n getMainResources() {\n const resourceList = this.getResourceList();\n\n if (!resourceList || !resourceList.length) {\n return undefined;\n }\n\n return resourceList.map((resource) => ({\n analyticsData: this.getMergedAnalyticsData(resource.analyticsData),\n analyticsMetadata: this.getMergedAnalyticsMetadata(\n resource.analyticsMetadata\n ),\n blockReason: this.getMainChapter().blockReason,\n blockedSegments: this.getMainBlockedSegments(),\n imageUrl: this.getMainChapterImageUrl(),\n chapters: this.getChapters(),\n drmList: resource.drmList,\n dvr: resource.dvr,\n eventData: this.getMainChapter().eventData,\n id: this.getMainChapter().id,\n imageCopyright: this.getMainChapter().imageCopyright,\n intervals: this.getMainTimeIntervals(),\n live: resource.live,\n mediaType: this.getMainChapter().mediaType,\n mimeType: resource.mimeType,\n presentation: resource.presentation,\n quality: resource.quality,\n streaming: resource.streaming,\n streamOffset: resource.streamOffset,\n subtitles: this.getFilteredExternalSubtitles(),\n title: this.getMainChapter().title,\n tokenType: resource.tokenType,\n url: resource.url,\n urn: this.chapterUrn,\n vendor: this.getMainChapter().vendor,\n }));\n }\n\n /**\n * Get segments of the main chapter ordered by markIn.\n *\n * @returns {Array.} of segments\n */\n getMainSegments() {\n const mainChapter = this.getMainChapter();\n\n if (!this.mainSegments && mainChapter && mainChapter.segmentList) {\n this.mainSegments = mainChapter.segmentList;\n }\n\n return this.mainSegments || [];\n }\n\n /**\n * Retrieves an array of time intervals associated with the main chapter.\n *\n * @returns {Array.} An array of time intervals.\n */\n getMainTimeIntervals() {\n const {\n timeIntervalList = []\n } = this.getMainChapter() || {};\n\n return timeIntervalList;\n }\n\n /**\n * Compute a date from which this content is valid. Always return a date object.\n *\n * @returns {Date} date specified in media composition or EPOCH when no date present.\n */\n getMainValidFromDate() {\n const mainChapter = this.getMainChapter();\n\n if (!mainChapter) {\n return new Date(0);\n }\n\n const { validFrom } = mainChapter;\n\n if (validFrom) {\n return new Date(validFrom);\n }\n }\n\n /**\n * Get merged analytics data.\n *\n * @param {Object.} analyticsData\n * @returns {Object.} Merged analytics data.\n */\n getMergedAnalyticsData(analyticsData) {\n return {\n ...this.analyticsData,\n ...this.getMainChapter().analyticsData,\n ...analyticsData,\n };\n }\n\n /**\n * Get merged analytics metadata.\n *\n * @param {Object.} analyticsMetadata\n * @returns {Object.} Merged analytics metadata.\n */\n getMergedAnalyticsMetadata(analyticsMetadata) {\n return {\n ...this.analyticsMetadata,\n ...this.getMainChapter().analyticsMetadata,\n ...analyticsMetadata,\n };\n }\n\n /**\n * Get the chapter's resource list\n * @returns {Array.} of resources\n */\n getResourceList() {\n const { resourceList } = this.getMainChapter();\n\n return resourceList || [];\n }\n}\n\n\n/**\n * @typedef {import('./typedef').Channel} Channel\n * @typedef {import('./typedef').Chapter} Chapter\n * @typedef {import('./typedef').Episode} Episode\n * @typedef {import('./typedef').Resource} Resource\n * @typedef {import('./typedef').Segment} Segment\n * @typedef {import('./typedef').Show} Show\n * @typedef {import('./typedef').Subtitle} Subtitle\n * @typedef {import('./typedef').TimeInterval} TimeInterval\n * @typedef {import('./typedef').Topic} Topic\n * @typedef {import('./typedef').MainResource} MainResource\n */\n\n/**\n * @ignore\n */\nclass DataProvider {\n constructor(hostName = 'il.srgssr.ch') {\n this.setIlHost(hostName);\n }\n\n setIlHost(hostName) {\n this.baseUrl = `${hostName}/integrationlayer/2.1/`;\n }\n\n /**\n * Get media composition by URN.\n *\n * @param {String} urn URN of the media composition.\n * @param {Boolean} [onlyChapters=true] Whether to retrieve only chapters or not.\n *\n * @returns {Promise<{mediaComposition: MediaComposition}>} Promise that resolves with the `mediaComposition` object.\n * @throws {Promise} If the response is not ok.\n */\n async getMediaCompositionByUrn(urn, onlyChapters = true) {\n const url = `https://${this.baseUrl}mediaComposition/byUrn/${urn}?onlyChapters=${onlyChapters}&vector=portalplay`;\n const response = await fetch(url);\n\n if (!response.ok) {\n throw response;\n }\n\n const data = await response.json();\n const mediaComposition = Object.assign(new MediaComposition(), data, {\n onlyChapters,\n });\n\n return {\n mediaComposition,\n };\n }\n}\n\nconst SCALE = {\n WIDTH_240: '240',\n WIDTH_320: '320',\n WIDTH_480: '480',\n WIDTH_960: '960',\n WIDTH_1920: '1920',\n};\n\nconst FORMAT = {\n JPG: 'jpg',\n WEBP: 'webp',\n PNG: 'png',\n};\n\nconst IMAGE_SERVICE_URL = 'https://il.srgssr.ch/images/';\n\n/**\n * @class Image\n */\nclass Image {\n /**\n * Generates the image scaling URL.\n *\n * @property {Object} image is the object representation of an image.\n * @property {String} [image.url] is the image URL.\n * @property {String} [image.width=960] is the width of the image, default value 960.\n * @property {String} [image.format=jpg] is the format of the image, default value jpg.\n * @property {String} [imageServiceUrl] Url of the image service that needs to comply with the specification defined by the IL.\n *\n * @see https://confluence.srg.beecollaboration.com/pages/viewpage.action?spaceKey=SRGPLAY&title=Project+-+Image+Service\n *\n * @returns {String|undefined} the image scaling URL.\n */\n static scale(\n { url, width = SCALE.WIDTH_960, format = FORMAT.JPG } = {},\n imageServiceUrl = IMAGE_SERVICE_URL\n ) {\n if (!url) return;\n\n const scaleUrl = new URL(imageServiceUrl);\n\n scaleUrl.searchParams.set('imageUrl', url);\n scaleUrl.searchParams.set('format', format);\n scaleUrl.searchParams.set('width', width);\n\n return decodeURIComponent(scaleUrl.href);\n }\n\n static get JPG() {\n return FORMAT.JPG;\n }\n\n static get PNG() {\n return FORMAT.PNG;\n }\n\n static get WEBP() {\n return FORMAT.WEBP;\n }\n\n static get WIDTH_240() {\n return SCALE.WIDTH_240;\n }\n\n static get WIDTH_320() {\n return SCALE.WIDTH_320;\n }\n\n static get WIDTH_480() {\n return SCALE.WIDTH_480;\n }\n\n static get WIDTH_960() {\n return SCALE.WIDTH_960;\n }\n\n static get WIDTH_1920() {\n return SCALE.WIDTH_1920;\n }\n}\n\nconst DRM_VENDORS = {\n WIDEVINE: 'com.widevine.alpha',\n FAIRPLAY: 'com.apple.fps.1_0',\n PLAYREADY: 'com.microsoft.playready',\n};\n\n/**\n * @class Drm\n */\nclass Drm {\n /**\n * Build the keySystems object according to the DRM vendor.\n *\n * @param {Array.} drmList The DRM list from the media composition.\n *\n * @returns {import('./typedef').KeySystems} The resulting keySystems.\n */\n static buildKeySystems(drmList = []) {\n const keySystems = {};\n\n drmList.forEach((drmVendor) => {\n const type = Drm.vendors[drmVendor.type];\n\n if (Drm.vendors.FAIRPLAY === type) {\n const { certificateUrl: certificateUri, licenseUrl: licenseUri } =\n drmVendor;\n\n keySystems[type] = {\n certificateUri,\n licenseUri,\n };\n } else {\n keySystems[type] = drmVendor.licenseUrl;\n }\n });\n\n return {\n keySystems,\n };\n }\n\n /**\n * Check if some of the resources have DRM.\n *\n * @param {Array.} resources\n *\n * @returns {boolean} true if some of the resources have DRM, false otherwise.\n */\n static hasDrm(resources) {\n return resources.some(({ drmList }) => drmList && drmList.length > 0);\n }\n\n /**\n * Get DRM vendors.\n */\n static get vendors() {\n return DRM_VENDORS;\n }\n}\n\nconst TOKEN_TYPES = {\n AKAMAI: 'AKAMAI',\n NONE: 'NONE',\n};\n\n/**\n * @class AkamaiTokenService\n */\nclass AkamaiTokenService {\n /**\n * Get the acl path.\n *\n * @param {URL} streamUrl\n *\n * @returns {String}\n */\n static aclPath(streamUrl) {\n const path = streamUrl.pathname;\n\n return `${path.substring(0, path.lastIndexOf('/') + 1)}*`;\n }\n\n /**\n * AKAMAI\n *\n * @type {String}\n */\n static get AKAMAI() {\n return TOKEN_TYPES.AKAMAI;\n }\n\n /**\n * Check if the resources are protected by an Akamai token.\n * Keep in mind, as we are using the 'some' function,\n * if the resources have at least one resource\n * protected by a token it returns true!\n *\n * @param {Array.} resources\n *\n * @returns {Boolean}\n */\n static hasToken(resources) {\n return resources.some((resource) =>\n AkamaiTokenService.isAkamai(resource.tokenType));\n }\n\n /**\n * Check if the token type is AKAMAI.\n *\n * @param {String} tokentype\n *\n * @returns {Boolean}\n */\n static isAkamai(tokentype) {\n return TOKEN_TYPES.AKAMAI === tokentype;\n }\n\n /**\n * Check if the token type is NONE.\n *\n * @param {String} tokentype\n *\n * @returns {Boolean}\n */\n static isNone(tokentype) {\n return TOKEN_TYPES.NONE === tokentype;\n }\n\n /**\n * NONE\n *\n * @type {String}\n */\n static get NONE() {\n return TOKEN_TYPES.NONE;\n }\n\n /**\n * Generate the stream URL with the akamai token.\n *\n * @param {import('../dataProvider/model/typedef').MainResource} source\n * @param {String} tokenServerUrl\n *\n * @returns {Promise.}\n */\n static tokenize(source, tokenServerUrl) {\n const streamUrlToTokenize = new URL(`${source.url}`);\n const acl = AkamaiTokenService.aclPath(streamUrlToTokenize);\n const url = `${tokenServerUrl}${encodeURIComponent(acl)}`;\n\n return fetch(url)\n .then((response) => {\n if (response.ok) {\n return response.json();\n }\n\n return Promise.reject({\n status: response.status,\n statusText: response.statusText,\n });\n })\n .then(({ token: { authparams }}) => {\n const akamaiAuthParams = new URLSearchParams(authparams);\n\n akamaiAuthParams.forEach((v, k) =>\n streamUrlToTokenize.searchParams.set(k, v));\n\n return Object.assign({}, source, {\n url: streamUrlToTokenize.toString(),\n });\n })\n .catch((reason) => {\n return Promise.reject(reason);\n });\n }\n\n /**\n * Generate a token for each source\n *\n * @template {import('../dataProvider/model/typedef').MainResource} T\n * @param {Array.} sources\n * @param {String} tokenServerUrl\n *\n * @returns {Promise.>}\n */\n static tokenizeSources(\n sources,\n tokenServerUrl = 'https://tp.srgssr.ch/akahd/token?acl='\n ) {\n const tokenizedSources = [];\n\n sources.forEach((source) => {\n const tokenizedSource = AkamaiTokenService.tokenize(\n source,\n tokenServerUrl\n );\n\n tokenizedSources.push(tokenizedSource);\n });\n\n return Promise.all(tokenizedSources)\n .then((values) => values)\n .catch((reason) => Promise.reject(reason));\n }\n}\n\n/**\n * Exhaustive list of player events.\n *\n * See below the documentation related to the media events\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement#events\n *\n * @namespace {Object} PlayerEvents\n */\n\n\n/**\n * Triggered when the media element is emptied (e.g., reset as part of the seeking process).\n *\n * @event PlayerEvents#EMPTIED\n * @type {string}\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/emptied_event\n */\nconst EMPTIED = 'emptied';\n\n/**\n * Triggered when the media playback has ended.\n *\n * @event PlayerEvents#ENDED\n * @type {string}\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/ended_event\n */\nconst ENDED = 'ended';\n\n/**\n * Triggered when the media data has been loaded.\n *\n * @event PlayerEvents#LOADED_DATA\n * @type {string}\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/loadeddata_event\n */\nconst LOADED_DATA = 'loadeddata';\n\n/**\n * Triggered when the browser starts looking for media data.\n *\n * @event PlayerEvents#LOAD_START\n * @type {string}\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/loadstart_event\n */\nconst LOAD_START = 'loadstart';\n\n/**\n * Triggered when the media playback is paused.\n *\n * @event PlayerEvents#PAUSE\n * @type {string}\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/pause_event\n */\nconst PAUSE = 'pause';\n\n/**\n * Triggered when the media playback is resumed or started.\n *\n * @event PlayerEvents#PLAY\n * @type {string}\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/play_event\n */\nconst PLAY = 'play';\n\n/**\n * Triggered when the media playback is in progress.\n *\n * @event PlayerEvents#PLAYING\n * @type {string}\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/playing_event\n */\nconst PLAYING = 'playing';\n\n/**\n * Triggered when the playback rate changes.\n *\n * @event PlayerEvents#RATE_CHANGE\n * @type {string}\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/ratechange_event\n */\nconst RATE_CHANGE = 'ratechange';\n\n/**\n * Triggered when a seek operation is in progress.\n *\n * @event PlayerEvents#SEEKING\n * @type {string}\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/seeking_event\n */\nconst SEEKING = 'seeking';\n\n/**\n * Triggered when the current playback position is updated.\n *\n * @event PlayerEvents#TIME_UPDATE\n * @type {string}\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/timeupdate_event\n */\nconst TIME_UPDATE = 'timeupdate';\n\n/**\n * Triggered when the media playback is waiting for data.\n *\n * @event PlayerEvents#WAITING\n * @type {string}\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/waiting_event\n */\nconst WAITING = 'waiting';\n\n/* eslint max-lines-per-function: [\"error\", 200] */\n/* eslint max-statements: [\"error\", 20]*/\n/* eslint complexity: [\"error\", 10]*/\n/**\n * SRG analytics\n * @class SRGAnalytics\n * @ignore\n *\n * ### Script URL\n * JS script : https://colibri-js.akamaized.net/penguin/tc_SRGGD_11.js\n *\n * ### Official documentation\n * Variables list\n * @see https://confluence.srg.beecollaboration.com/display/INTFORSCHUNG/Datalayer+for+media+players\n *\n * Standard event sequences\n * @see https://confluence.srg.beecollaboration.com/display/INTFORSCHUNG/standard+streaming+events%3A+sequence+of+events+for+media+player+actions\n *\n * Review of Standard Media Actions\n * @see https://confluence.srg.beecollaboration.com/display/INTFORSCHUNG/Implementation+Concept+-+draft\n *\n * ComScore Implementation Guide\n * @see https://www.dropbox.com/sh/cdwuikq0abxi21m/AABmSyXYKUTWSAwRZgQA9Ujna/JavaScript%20Latest%20Version?dl=0&preview=Comscore_Library-JavaScript-Streaming_Tag-Implementation_Guide-International.pdf&subfolder_nav_tracking=1\n *\n * ### Variables list\n * - 'event_id', // init | play | stop | pos | pause | seek | uptime | eof\n * - 'event_timestamp', // Seems to be generated automatically from the documentation, but the TP overrides it\n * - 'event_name', // NA TP seems to not sending this variable\n * - 'event_source', // NA TP seems to not sending this variable\n * - 'event_name', // NA TP seems to not sending this variable\n * - 'event_value', // NA TP seems to not sending this variable\n * - 'navigation_environment', // prod | preprod\n * - 'media_subtitles_on', // string true | false\n * - 'media_timeshift', // need better description\n * - 'media_quality', // SD | HD ?\n * - 'media_bandwidth', // NA for the web, 64000\n * - 'media_volume', // from 0 to 100\n * - 'media_embedding_url', //\n * - 'media_player_name', // videojs | letterbox-web ?\n * - 'media_chromecast_selected', // boolean true | false\n * - 'media_player_version', // player's version\n * - 'media_player_display', // is the player mode, on the TP : inline, embed etc..\n * - 'media_audio_track', // NA\n * - 'media_position_real', // NA\n * - 'media_time_spent', // NA\n * - 'device_id', // NA\n * - 'user_id_log_in', // NA only RTS has log in today\n * - 'media_thumbnail', // Not required by the spec but sended by the TP\n * - 'media_bu_distributer', // Not required by the spec but sended by the TP\n *\n *\n * ### Sequence stories\n *\n * __Story 1 (AoD/VOD-basics)__: A VoD is played. The user does not interact with the player. The VoD plays to its end.\n *\n * Hints:\n * - Media sessions always start with PLAY. They end with STOP or EOF (or with PAUSE or last POS)\n * - POS is sent ever 30s\n *\n *\n * __Story 2 (livestream-basics A)__: A Livestream is played. The user does not interact with the player. After 61 seconds, playback is paused.\n *\n * Hints:\n * - Media sessions always start with PLAY. They end with STOP (or, worse for data quailty, with PAUSE or last POS/UPTIME)\n * - UPTIME is sent only for livestreams\n * - POS is sent ever 30s, UPTIME every 60s with inital UPTIME after 30s.\n * - This is the interval: 30s: POS + UPTIME; 60s: POS; 90s: POS + UPTIME; ...\n *\n *\n * __Story 3 (Seeking a VoD/AoD)__: A VoD is played. User seeks in the VoD/AoD.\n *\n * Hints:\n * - Once the Media Player slider is released (seek is over), another action to finish up the seeking is initiated. Typically this is PLAY. For that second PLAY, the media position has altered.\n *\n *\n * __Story 4 (Seeking a livestream)__: A Livestream is played. User goes back in the livestream.\n *\n * Hints:\n * - Once the Media Player slider is released (seek is over), another action to finish up the seeking is initiated. Typically this is PLAY. For that second PLAY, the a new variable, media_timeshift is passed.\n * - For livestreams media_position is always the \"time passed on your watch\" - regardless of the SEEK event. So, if 1 second after PLAY the slider is moved back 600 seconds, then:\n * 1. The the value of media_timeshift is '600'.\n * 2. The value of media_position is '1'.\n */\nclass SRGAnalytics {\n constructor(\n player,\n {\n debug = false,\n environment = 'prod',\n playerVersion = 'none',\n tagCommanderScriptURL = '//colibri-js.akamaized.net/penguin/tc_SRGGD_11.js',\n } = {}\n ) {\n this.isDebugEnabled = debug;\n this.elapsedPlaybackTime = 0;\n this.environment = environment;\n this.hasStarted = false;\n this.heartBeatIntervalId = undefined;\n /* Set to true when 'init' event is sent or queued. */\n this.initialized = false;\n this.isSeeking = false;\n this.isWaiting = false;\n this.mediaSession = 0;\n this.pendingQueue = [];\n this.pendingTagCommanderReload = false;\n this.player = player;\n this.playerVersion = playerVersion;\n this.srcMediaData = undefined;\n this.startPlaybackSession = 0;\n this.tagCommanderScriptURL = tagCommanderScriptURL;\n this.trackedCurrentTime = 0;\n this.uptimeIntervalId = undefined;\n\n this.initScript();\n this.initListeners();\n }\n\n /**\n * Sent when the window, the document and its resources are about to be unloaded.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event\n */\n beforeunload() {\n this.notify('stop');\n }\n\n /**\n * Clear timers used to send uptime and heartbeat.\n */\n clearTimers() {\n clearInterval(this.heartBeatIntervalId);\n clearInterval(this.uptimeIntervalId);\n clearTimeout(this.uptimeTimeoutId);\n }\n\n /**\n * Get the tracked current time in seconds.\n *\n * @returns {Number} current time in seconds\n */\n currentTime() {\n // see PLAYRTS-2771\n return Math.round(this.trackedCurrentTime);\n }\n\n /**\n * Get or set debug mode.\n *\n * @returns {Boolean|undefined}\n */\n debug(enabled) {\n if (enabled === undefined) {\n return this.isDebugEnabled || this.player.debug();\n }\n\n this.isDebugEnabled = Boolean(enabled);\n }\n\n /**\n * Destroy all properties and setIntervals to avoid mixing media sessions.\n */\n destroy() {\n this.clearTimers();\n\n if (!window.tc_vars) {\n window.tc_vars = {};\n }\n this.elapsedPlaybackTime = 0;\n this.hasStarted = false;\n this.heartBeatIntervalId = undefined;\n this.initialized = false;\n this.isWaiting = false;\n this.mediaSession = 0;\n this.pendingQueue = [];\n this.srcMediaData = undefined;\n this.startPlaybackSession = 0;\n this.trackedCurrentTime = 0;\n this.uptimeIntervalId = undefined;\n }\n\n /**\n * Dispose all listeners used to send analytics data to TagCommander.\n *\n * Calls `beforeunload` to send a notify stop.\n * Clear intervals and timeouts.\n *\n * __Used events__\n * - beforeunload\n * - emptied\n * - ended\n * - loadstart\n * - loadeddata\n * - play\n * - pause\n * - timeupdate\n */\n dispose() {\n this.beforeunload();\n this.clearTimers();\n\n window.removeEventListener('beforeunload', this.beforeunloadListener);\n\n this.player.off(EMPTIED, this.emptiedListener);\n this.player.off(ENDED, this.endedListener);\n this.player.off(LOAD_START, this.loadstartListener);\n this.player.off(LOADED_DATA, this.loadeddataListener);\n this.player.off(PLAYING, this.playListener);\n this.player.off(PAUSE, this.pauseListener);\n this.player.off(RATE_CHANGE, this.rateChangeListener);\n this.player.off(SEEKING, this.seekingListener);\n this.player.off(TIME_UPDATE, this.timeUpdateListener);\n this.player.off(WAITING, this.waitingListener);\n }\n\n /**\n * Sent before a new media is loading.\n * - Destroy all properties.\n * - Send a notify stop if the media is not ended and new media is about to be loaded.\n */\n emptied() {\n if (!this.player.ended()) {\n this.notify('stop');\n }\n }\n\n /**\n * Sent when playback completes.\n *\n * @see https://docs.videojs.com/player#event:ended\n */\n ended() {\n this.notify('eof');\n\n this.mediaSession = 0;\n\n this.clearTimers();\n }\n\n /**\n * Flush the queued events when tc event script is loaded.\n */\n flush() {\n if (this.isTrackerDisabled()) return;\n\n if (this.pendingTagCommanderReload && window.tC) {\n window.tC.container.reload();\n this.pendingTagCommanderReload = false;\n }\n\n if (window.tc_events_11 && this.pendingQueue.length > 0) {\n this.pendingQueue.forEach((notification) => {\n window.tc_events_11(\n this.player.el(),\n notification.action,\n notification.labels\n );\n });\n\n this.pendingQueue = [];\n }\n }\n\n /**\n * Get the language of the current audio track.\n *\n * @returns {String} empty string or uppercase language.\n */\n getCurrentAudioTrack() {\n const currentTrack = Array.from(this.player.audioTracks()).find(\n (track) => track.enabled\n );\n let language = 'und';\n\n if (currentTrack && !!currentTrack.language) {\n // eslint-disable-next-line prefer-destructuring\n language = currentTrack.language;\n }\n\n return currentTrack ? language.toUpperCase() : '';\n }\n\n /**\n * Get the language of the current text track.\n *\n * @returns {String} empty string or uppercase language.\n */\n getCurrentTextTrack() {\n const currentTrack = this.player.textTrack();\n let language = 'und';\n\n if (currentTrack && !!currentTrack.language) {\n // eslint-disable-next-line prefer-destructuring\n language = currentTrack.language;\n }\n\n return currentTrack ? language.toUpperCase() : '';\n }\n\n /**\n * Get the position inside the dvr window where the 0 represents the live edge\n *\n * @return {Number} 0 or the position in milliseconds\n */\n getDvrWindowPosition() {\n const { liveTracker } = this.player;\n const ct = (this.currentTime() - liveTracker.seekableStart()) | 0;\n const position = liveTracker.liveWindow() - ct;\n\n return position < 0 || position === Infinity ? 0 : position * 1000;\n }\n\n /**\n * Get the size of the live DVR window in milliseconds.\n *\n * @return {Number} DVR window size in milliseconds\n */\n getDvrWindowSize() {\n const isInfinity = this.player.liveTracker.liveWindow() === Infinity;\n const windowSize = this.player.liveTracker.liveWindow() * 1000;\n\n return isInfinity ? 0 : windowSize;\n }\n\n /**\n * Get the elapsed playback time in seconds.\n *\n * @returns {Number} elapsed time in seconds\n */\n getElapsedPlaybackTime() {\n if (this.startPlaybackSession) {\n return this.getElapsedPlayingTime();\n }\n\n return this.elapsedPlaybackTime;\n }\n\n /**\n * Get the elapsed playing time in seconds.\n *\n * @returns {Number} elapsed time in seconds\n */\n getElapsedPlayingTime() {\n const playingSession = (SRGAnalytics.now() - this.startPlaybackSession) | 0;\n\n return this.elapsedPlaybackTime + playingSession;\n }\n\n /**\n * Set all event labels to be sent to TagCommander. The event labels are updated whenever a new event occurs.\n *\n * @param {String} eventName init | play | stop | pos | pause | seek | uptime | eof\n *\n * @returns {Object} JSON to be sent to TagCommander\n */\n getEventLabels(eventName) {\n const labels = {\n event_id: eventName,\n event_timestamp: SRGAnalytics.now(),\n media_dvr_window_length: 0,\n media_dvr_window_offset: 0,\n media_is_dvr: false,\n media_is_live: false,\n media_mute: this.player.muted() ? '1' : '0',\n media_playback_rate: this.player.playbackRate(),\n media_position: this.currentTime(),\n media_quality: this.srcMediaData.mediaData.quality,\n // TODO use media_is_dvr, media_is_live to define peach media_stream_type\n media_subtitles_on: this.isTextTrackEnabled(),\n media_volume: (this.player.volume() * 100).toFixed(0),\n navigation_environment: this.environment,\n };\n\n if (this.isAudioTrackEnabled()) {\n labels.media_audio_track = this.getCurrentAudioTrack();\n }\n\n if (this.isTextTrackEnabled()) {\n labels.media_subtitle_selection = this.getCurrentTextTrack();\n }\n\n // DVR or Live related labels\n if (!this.isMediaOnDemand()) {\n labels.media_is_live = true;\n labels.media_position = this.getElapsedPlaybackTime();\n }\n\n // DVR related labels\n if (this.isMediaDvr()) {\n labels.media_dvr_window_offset = this.getDvrWindowPosition() | 0;\n labels.media_dvr_window_length = this.getDvrWindowSize() | 0;\n\n labels.media_is_dvr = true;\n\n labels.media_timeshift = [PLAY, PAUSE].includes(\n eventName\n )\n ? this.timeShifted()\n : 0;\n }\n\n return labels;\n }\n\n /**\n * Set all internal labels to be sent to TagCommander. Internal labels are assigned once at initialisation time.\n */\n getInternalLabels() {\n const data = {\n media_bu_distributer: this.srcMediaData.mediaData.vendor,\n media_chromecast_selected: Boolean(this.player.tech(true).isCasting),\n media_embedding_url: document.referrer,\n media_player_display: 'default', // TODO implement if it still relevant\n media_player_name: 'pillarbox-web', // TODO add a property playerName in the constructor with a default value ?\n media_player_version: this.playerVersion,\n media_url: this.srcMediaData.src,\n };\n const analyticsMetadata =\n this.srcMediaData.mediaData.analyticsMetadata || {};\n\n window.tc_vars = Object.assign({}, window.tc_vars, data, analyticsMetadata);\n }\n\n /**\n * Heart beat, current position of a AoD/VoD (every 30s).\n *\n * @description The action pos should be sent regularly every 30 seconds.\n * It is used for tracking the viewed chapters of a video and the last position of the video, in case the user ends the video by closing the browser tab/window.\n *\n * - pos should be sent when the media player is in \"play mode\".\n * - once the video is paused or stopped, the timer for sending these actions must be stopped.\n *\n * @see https://confluence.srg.beecollaboration.com/display/INTFORSCHUNG/standard+streaming+events%3A+sequence+of+events+for+media+player+actions#standardstreamingevents:sequenceofeventsformediaplayeractions-mandatoryplayerevents\n */\n heartBeat() {\n this.heartBeatIntervalId = setInterval(() => {\n // Send only when playing\n if (!this.player.paused()) {\n this.notify('pos');\n }\n }, 30000);\n }\n\n /**\n * Initialize callbacks used to send analytics data to TagCommander.\n *\n * __Used events__\n * - beforeunload\n * - emptied\n * - ended\n * - loadstart\n * - loadeddata\n * - play\n * - pause\n * - ratechange\n * - seeking\n * - timeupdate\n * - waiting\n */\n initCallbacks() {\n this.beforeunloadListener = this.beforeunload.bind(this);\n this.emptiedListener = this.emptied.bind(this);\n this.endedListener = this.ended.bind(this);\n this.loadstartListener = this.loadstart.bind(this);\n this.loadeddataListener = this.loadeddata.bind(this);\n this.playListener = this.play.bind(this);\n this.pauseListener = this.pause.bind(this);\n this.rateChangeListener = this.rateChange.bind(this);\n this.seekingListener = this.seeking.bind(this);\n this.timeUpdateListener = this.timeUpdate.bind(this);\n this.waitingListener = this.waiting.bind(this);\n }\n\n /**\n * Initialize all listeners used to send analytics data to TagCommander.\n *\n * __Used events__\n * - beforeunload\n * - dispose\n * - emptied\n * - ended\n * - loadstart\n * - loadeddata\n * - play\n * - pause\n * - timeupdate\n * - waiting\n */\n initListeners() {\n this.initCallbacks();\n\n window.addEventListener('beforeunload', this.beforeunloadListener);\n\n this.player.on(EMPTIED, this.emptiedListener);\n this.player.on(ENDED, this.endedListener);\n this.player.on(LOAD_START, this.loadstartListener);\n this.player.on(LOADED_DATA, this.loadeddataListener);\n this.player.on(PLAYING, this.playListener);\n this.player.on(PAUSE, this.pauseListener);\n this.player.on(RATE_CHANGE, this.rateChangeListener);\n this.player.on(SEEKING, this.seekingListener);\n this.player.on(TIME_UPDATE, this.timeUpdateListener);\n this.player.on(WAITING, this.waitingListener);\n this.player.one('dispose', this.dispose.bind(this));\n }\n\n /**\n * Initialize TagCommander script dynamically and add it to the DOM\n */\n initScript() {\n const scriptId = 'tc_script__11';\n\n if (!document.querySelector(`#${scriptId}`)) {\n const script = document.createElement('script');\n const src = this.tagCommanderScriptURL;\n\n script.defer = true;\n script.id = scriptId;\n script.src = src;\n script.type = 'text/javascript';\n\n script.onload = (_e) => {\n this.flush();\n };\n\n document.body.appendChild(script);\n }\n }\n\n /**\n * Check if the audio track is enabled.\n *\n * @returns {Boolean} __true__ if enabled __false__ otherwise.\n */\n isAudioTrackEnabled() {\n return !!this.getCurrentAudioTrack();\n }\n\n /**\n * Check if the media is a live with DVR.\n *\n * @returns {Boolean} __true__ if it DVR __false__ otherwise.\n */\n isMediaDvr() {\n const { trackingThreshold } = this.player.liveTracker.options();\n\n return (\n !this.isMediaOnDemand() &&\n trackingThreshold < this.player.liveTracker.liveWindow()\n );\n }\n\n /**\n * Check if the media is a live.\n *\n * @returns {Boolean} __true__ if live __false__ otherwise.\n */\n isMediaLive() {\n const { trackingThreshold } = this.player.liveTracker.options();\n\n return (\n !this.isMediaOnDemand() &&\n trackingThreshold > this.player.liveTracker.liveWindow()\n );\n }\n\n /**\n * Check if the media is an on demand.\n *\n * @returns {Boolean} __true__ if on demand __false__ otherwise.\n */\n isMediaOnDemand() {\n return Number.isFinite(this.player.duration());\n }\n\n /**\n * Check if the text track is enabled.\n *\n * @returns {Boolean} __true__ if enabled __false__ otherwise.\n */\n isTextTrackEnabled() {\n return !!this.getCurrentTextTrack();\n }\n\n /**\n * Check if the tracker is disabled.\n *\n * @returns {Boolean} __true__ if disabled __false__ otherwise.\n */\n isTrackerDisabled() {\n if (!this.srcMediaData || !this.srcMediaData.mediaData)\n return true;\n\n if (!Array.isArray(this.srcMediaData.disableTrackers)) {\n return Boolean(this.srcMediaData.disableTrackers);\n }\n\n return Boolean(\n this.srcMediaData.disableTrackers.find(\n (tracker) => tracker.toLowerCase() === SRGAnalytics.name.toLowerCase()\n )\n );\n }\n\n /**\n * Sent when loading of the media begins.\n *\n * @see https://docs.videojs.com/player#event:loadstart\n */\n loadstart() {\n this.destroy();\n this.updateSrcMediaData(this.player.currentSource());\n\n if (this.isTrackerDisabled()) return;\n\n this.getInternalLabels();\n // Set ComScore labels\n this.reloadTagCommanderContainer();\n\n this.notify('buffer_start');\n this.hasStarted = false;\n }\n\n /**\n * The first frame of the media has finished loading.\n *\n * @see https://docs.videojs.com/player#event:loadeddata\n */\n loadeddata() {\n this.notify('init');\n this.initialized = true;\n\n this.notify('buffer_stop');\n }\n\n /**\n * Event logger that prints the current event, event labels and internal labels in the browser's console.\n *\n * @param {String} eventName init | play | stop | pos | pause | seek | uptime | eof\n * @param {Object} eventMetadata event metadata object\n * @param {String} severity log | warn | error\n */\n log(eventName, eventMetadata, severity = 'log') {\n if (this.debug()) {\n // eslint-disable-next-line\n console[severity](\n `SRGAnalytics:${eventName}`,\n eventMetadata,\n window.tc_vars\n );\n }\n }\n\n /**\n * Notify TagCommander all event and internal labels. If tc script is not available it queues all pending events.\n *\n * @param {String} eventName init | play | stop | pos | pause | seek | uptime | eof\n */\n notify(eventName, eventMetadata) {\n if (this.isTrackerDisabled()) return;\n\n try {\n this.flush();\n } catch (error) {\n this.log(eventName, error, 'error');\n }\n\n const labels = Object.assign(\n {},\n this.getEventLabels(eventName),\n eventMetadata\n );\n\n this.log(eventName, labels);\n\n try {\n if (window.tc_events_11) {\n window.tc_events_11(this.player.el(), eventName, labels);\n } else {\n this.pendingQueue.push({\n action: eventName,\n labels,\n });\n }\n } catch (error) {\n this.log(eventName, error, 'error');\n }\n }\n\n /**\n * Return the current timestamp in seconds.\n *\n * @returns {Number} Timestamp in seconds\n */\n static now() {\n return (Date.now() / 1000).toFixed(0);\n }\n\n /**\n * Sent when the playback state is no longer paused, as a result of the play method, or the autoplay attribute.\n *\n * @see https://docs.videojs.com/player#event:play\n */\n play() {\n if (!this.hasStarted) this.hasStarted = true;\n\n if (!this.startPlaybackSession && !this.isMediaOnDemand()) {\n this.startPlaybackSession = SRGAnalytics.now();\n }\n\n if (this.mediaSession === 0) {\n this.mediaSession = SRGAnalytics.now();\n\n this.heartBeat();\n this.uptime();\n }\n\n this.timeUpdate();\n this.notify('play');\n\n if (this.isSeeking) this.isSeeking = false;\n }\n\n /**\n * Sent when the playback state is changed to paused (paused property is true).\n * Pause event is sent if :\n * - The player is not scrubbing\n * - The stream is not a live only\n * - The current time is strictly inferior to the duration\n *\n * @see https://docs.videojs.com/player#event:pause\n */\n pause() {\n if (!this.isMediaOnDemand()) {\n this.elapsedPlaybackTime = this.getElapsedPlayingTime();\n this.startPlaybackSession = 0;\n }\n\n if (\n !this.player.seeking() &&\n !this.isMediaLive() &&\n this.player.currentTime() < this.player.duration()\n ) {\n this.notify('pause');\n\n return;\n }\n\n if (this.hasStarted && !this.isSeeking) {\n this.notify('seek');\n this.isSeeking = true;\n }\n }\n\n /**\n * Sent to ComScore when the playback rate changes.\n *\n * @see https://github.com/SRGSSR/srgletterbox-web/issues/761\n * @see https://jira.srg.beecollaboration.com/browse/ADI-256\n */\n rateChange() {\n this.notify('change_playback_rate');\n }\n\n /**\n * Reload the tagCommander container and set all ComScore labels\n */\n reloadTagCommanderContainer() {\n if (window.tC) {\n window.tC.container.reload();\n this.pendingTagCommanderReload = false;\n } else {\n this.pendingTagCommanderReload = true;\n }\n }\n\n /**\n * Sent when the current time is modified by the player's currentTime API.\n *\n * @see https://docs.videojs.com/player#event:seeking\n */\n seeking() {\n if (this.hasStarted && !this.player.paused() && !this.isSeeking) {\n this.notify('seek');\n this.isSeeking = true;\n }\n }\n\n /**\n * Track current time updates delayed by a tick.\n *\n * @see https://docs.videojs.com/player#event:timeupdate\n */\n timeUpdate() {\n if (!this.player.paused()) {\n this.trackedCurrentTime = this.player.currentTime();\n }\n }\n\n /**\n * Gets the number of seconds that separate from the live edge that is represented by 0.\n *\n * @returns {String}\n */\n timeShifted() {\n const isAtLiveEdge = this.player.liveTracker.atLiveEdge();\n const liveCurrentTime = this.player.liveTracker.liveCurrentTime();\n const currentTime = this.player.currentTime();\n const timeShifted = isAtLiveEdge\n ? 0\n : (liveCurrentTime - currentTime).toFixed(0);\n\n return timeShifted;\n }\n\n /**\n * Update the src media data.\n */\n updateSrcMediaData(srcMediaData) {\n this.srcMediaData = srcMediaData;\n }\n\n /**\n * Calculate the uptime when playing a live stream with or without DVR\n *\n * __Rules__:\n * - Send the first uptime after 30 seconds\n * - Send uptime each 60 seconds after the 30 seconds\n * - Uptime is sent only when playing\n */\n uptime() {\n const notifyUptime = () => {\n if (!this.player.paused() && !this.isMediaOnDemand()) {\n this.notify('uptime');\n }\n };\n\n // Send the first uptime after 30 seconds\n this.uptimeTimeoutId = setTimeout(() => {\n // Send only when playing\n notifyUptime();\n\n // Initialize the uptime interval after 30 seconds\n this.uptimeIntervalId = setInterval(() => {\n // Send only when playing\n notifyUptime();\n }, 60000);\n }, 30000);\n }\n\n /**\n * __ComScore__:\n * It's expected notifyBufferStart() to be called when the player starts buffering\n * and a call to notifyBufferStop() when content resumes after buffering.\n *\n * @see Item 2: https://jira.srg.beecollaboration.com/browse/PLAY-2628\n *\n * After the issue PLAYRTS-321\n * @see Fix: https://jira.srg.beecollaboration.com/browse/PLAYRTS-321?focusedCommentId=201023&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-201023\n * @see Fix: https://jira.srg.beecollaboration.com/browse/PLAYRTS-3065\n */\n waiting() {\n if (!this.initialized || this.isWaiting) {\n return;\n }\n\n const bufferStop = () => {\n this.isWaiting = false;\n this.notify('buffer_stop');\n };\n\n this.isWaiting = true;\n\n this.notify('buffer_start');\n\n // As Safari is not consistent with its playing event, it is better to use the timeupdate event.\n if (pillarbox.browser.IS_ANY_SAFARI) {\n this.player.one(TIME_UPDATE, bufferStop);\n } else {\n // As Chromium-based browsers are not consistent with their timeupdate event, it is better to use the playing event.\n // Firefox is consistent with its playing event.\n this.player.one(PLAYING, bufferStop);\n }\n }\n}\n\nvar Play$4 = \"Wiedergabe\";\nvar Pause$4 = \"Pause\";\nvar Replay$4 = \"Erneut abspielen\";\nvar Duration$4 = \"Dauer\";\nvar LIVE$4 = \"LIVE\";\nvar Loaded$4 = \"Geladen\";\nvar Progress$4 = \"Status\";\nvar Fullscreen$4 = \"Vollbild\";\nvar Mute$4 = \"Stumm schalten\";\nvar Unmute$4 = \"Ton einschalten\";\nvar Subtitles$4 = \"Untertitel\";\nvar Captions$4 = \"Untertitel\";\nvar Chapters$4 = \"Kapitel\";\nvar Close$4 = \"Schließen\";\nvar Descriptions$4 = \"Beschreibungen\";\nvar Text$4 = \"Schrift\";\nvar White$4 = \"Weiß\";\nvar Black$4 = \"Schwarz\";\nvar Red$4 = \"Rot\";\nvar Green$4 = \"Grün\";\nvar Blue$4 = \"Blau\";\nvar Yellow$4 = \"Gelb\";\nvar Magenta$4 = \"Magenta\";\nvar Cyan$4 = \"Türkis\";\nvar Background$4 = \"Hintergrund\";\nvar Window$4 = \"Fenster\";\nvar Transparent$4 = \"Durchsichtig\";\nvar Opaque$4 = \"Undurchsichtig\";\nvar None$4 = \"Kein\";\nvar Raised$3 = \"Erhoben\";\nvar Depressed$3 = \"Gedrückt\";\nvar Uniform$4 = \"Uniform\";\nvar Casual$3 = \"Zwanglos\";\nvar Script$3 = \"Schreibschrift\";\nvar Reset$4 = \"Zurücksetzen\";\nvar Done$4 = \"Fertig\";\nvar Color$3 = \"Farbe\";\nvar Opacity$3 = \"Deckkraft\";\nvar de$1 = {\n\tPlay: Play$4,\n\tPause: Pause$4,\n\tReplay: Replay$4,\n\t\"Current Time\": \"Aktueller Zeitpunkt\",\n\tDuration: Duration$4,\n\t\"Remaining Time\": \"Verbleibende Zeit\",\n\t\"Stream Type\": \"Streamtyp\",\n\tLIVE: LIVE$4,\n\tLoaded: Loaded$4,\n\tProgress: Progress$4,\n\tFullscreen: Fullscreen$4,\n\t\"Exit Fullscreen\": \"Vollbildmodus beenden\",\n\tMute: Mute$4,\n\tUnmute: Unmute$4,\n\t\"Playback Rate\": \"Wiedergabegeschwindigkeit\",\n\tSubtitles: Subtitles$4,\n\t\"subtitles off\": \"Untertitel aus\",\n\tCaptions: Captions$4,\n\t\"captions off\": \"Untertitel aus\",\n\tChapters: Chapters$4,\n\t\"You aborted the media playback\": \"Sie haben die Videowiedergabe abgebrochen.\",\n\t\"A network error caused the media download to fail part-way.\": \"Der Videodownload ist aufgrund eines Netzwerkfehlers fehlgeschlagen.\",\n\t\"The media could not be loaded, either because the server or network failed or because the format is not supported.\": \"Das Video konnte nicht geladen werden, da entweder ein Server- oder Netzwerkfehler auftrat oder das Format nicht unterstützt wird.\",\n\t\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\": \"Die Videowiedergabe wurde entweder wegen eines Problems mit einem beschädigten Video oder wegen verwendeten Funktionen, die vom Browser nicht unterstützt werden, abgebrochen.\",\n\t\"No compatible source was found for this media.\": \"Für dieses Video wurde keine kompatible Quelle gefunden.\",\n\t\"Play Video\": \"Video abspielen\",\n\tClose: Close$4,\n\t\"Modal Window\": \"Modales Fenster\",\n\t\"This is a modal window\": \"Dies ist ein modales Fenster\",\n\t\"This modal can be closed by pressing the Escape key or activating the close button.\": \"Durch Drücken der Esc-Taste bzw. Betätigung der Schaltfläche \\\"Schließen\\\" wird dieses modale Fenster geschlossen.\",\n\t\", opens captions settings dialog\": \", öffnet Einstellungen für Untertitel\",\n\t\", opens subtitles settings dialog\": \", öffnet Einstellungen für Untertitel\",\n\t\", selected\": \", ausgewählt\",\n\t\"captions settings\": \"Untertiteleinstellungen\",\n\t\"subtitles settings\": \"Untertiteleinstellungen\",\n\t\"descriptions settings\": \"Einstellungen für Beschreibungen\",\n\t\"Close Modal Dialog\": \"Modales Fenster schließen\",\n\tDescriptions: Descriptions$4,\n\t\"descriptions off\": \"Beschreibungen aus\",\n\t\"The media is encrypted and we do not have the keys to decrypt it.\": \"Die Entschlüsselungsschlüssel für den verschlüsselten Medieninhalt sind nicht verfügbar.\",\n\t\", opens descriptions settings dialog\": \", öffnet Einstellungen für Beschreibungen\",\n\t\"Audio Track\": \"Tonspur\",\n\tText: Text$4,\n\tWhite: White$4,\n\tBlack: Black$4,\n\tRed: Red$4,\n\tGreen: Green$4,\n\tBlue: Blue$4,\n\tYellow: Yellow$4,\n\tMagenta: Magenta$4,\n\tCyan: Cyan$4,\n\tBackground: Background$4,\n\tWindow: Window$4,\n\tTransparent: Transparent$4,\n\t\"Semi-Transparent\": \"Halbdurchsichtig\",\n\tOpaque: Opaque$4,\n\t\"Font Size\": \"Schriftgröße\",\n\t\"Text Edge Style\": \"Textkantenstil\",\n\tNone: None$4,\n\tRaised: Raised$3,\n\tDepressed: Depressed$3,\n\tUniform: Uniform$4,\n\t\"Drop shadow\": \"Schlagschatten\",\n\t\"Font Family\": \"Schriftfamilie\",\n\t\"Proportional Sans-Serif\": \"Proportionale Sans-Serif\",\n\t\"Monospace Sans-Serif\": \"Monospace Sans-Serif\",\n\t\"Proportional Serif\": \"Proportionale Serif\",\n\t\"Monospace Serif\": \"Monospace Serif\",\n\tCasual: Casual$3,\n\tScript: Script$3,\n\t\"Small Caps\": \"Small-Caps\",\n\tReset: Reset$4,\n\t\"restore all settings to the default values\": \"Alle Einstellungen auf die Standardwerte zurücksetzen\",\n\tDone: Done$4,\n\t\"Caption Settings Dialog\": \"Einstellungsdialog für Untertitel\",\n\t\"Beginning of dialog window. Escape will cancel and close the window.\": \"Anfang des Dialogfensters. Esc bricht ab und schließt das Fenster.\",\n\t\"End of dialog window.\": \"Ende des Dialogfensters.\",\n\t\"Audio Player\": \"Audio-Player\",\n\t\"Video Player\": \"Video-Player\",\n\t\"Progress Bar\": \"Fortschrittsbalken\",\n\t\"progress bar timing: currentTime={1} duration={2}\": \"{1} von {2}\",\n\t\"Volume Level\": \"Lautstärke\",\n\t\"{1} is loading.\": \"{1} wird geladen.\",\n\t\"Seek to live, currently behind live\": \"Zur Live-Übertragung wechseln. Aktuell wird es nicht live abgespielt.\",\n\t\"Seek to live, currently playing live\": \"Zur Live-Übertragung wechseln. Es wird aktuell live abgespielt.\",\n\t\"Exit Picture-in-Picture\": \"Bild-im-Bild-Modus beenden\",\n\t\"Picture-in-Picture\": \"Bild-im-Bild-Modus\",\n\t\"No content\": \"Kein Inhalt\",\n\tColor: Color$3,\n\tOpacity: Opacity$3,\n\t\"Text Background\": \"Texthintergrund\",\n\t\"Caption Area Background\": \"Hintergrund des Untertitelbereichs\",\n\t\"Playing in Picture-in-Picture\": \"Wird im Bild-im-Bild-Modus wiedergegeben\",\n\t\"Skip forward {1} seconds\": \"{1} Sekunden vorwärts\",\n\t\"Skip backward {1} seconds\": \"{1} Sekunden zurück\"\n};\n\nvar vjsLang$3 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n Background: Background$4,\n Black: Black$4,\n Blue: Blue$4,\n Captions: Captions$4,\n Casual: Casual$3,\n Chapters: Chapters$4,\n Close: Close$4,\n Color: Color$3,\n Cyan: Cyan$4,\n Depressed: Depressed$3,\n Descriptions: Descriptions$4,\n Done: Done$4,\n Duration: Duration$4,\n Fullscreen: Fullscreen$4,\n Green: Green$4,\n LIVE: LIVE$4,\n Loaded: Loaded$4,\n Magenta: Magenta$4,\n Mute: Mute$4,\n None: None$4,\n Opacity: Opacity$3,\n Opaque: Opaque$4,\n Pause: Pause$4,\n Play: Play$4,\n Progress: Progress$4,\n Raised: Raised$3,\n Red: Red$4,\n Replay: Replay$4,\n Reset: Reset$4,\n Script: Script$3,\n Subtitles: Subtitles$4,\n Text: Text$4,\n Transparent: Transparent$4,\n Uniform: Uniform$4,\n Unmute: Unmute$4,\n White: White$4,\n Window: Window$4,\n Yellow: Yellow$4,\n default: de$1\n});\n\nvar AGERATING12$4 = \"Aus Gründen des Jugendschutzes steht dieser Inhalt nur zwischen 20:00 und 06:00 Uhr zur Verfügung.\";\nvar AGERATING18$4 = \"Aus Gründen des Jugendschutzes steht dieser Inhalt nur zwischen 23:00 und 05:00 Uhr zur Verfügung.\";\nvar COMMERCIAL$4 = \"Die Werbung wurde übersprungen.\";\nvar ENDDATE$4 = \"Dieser Inhalt ist nicht mehr verfügbar.\";\nvar GEOBLOCK$4 = \"Dieser Inhalt ist ausserhalb der Schweiz nicht verfügbar.\";\nvar LEGAL$4 = \"Dieser Inhalt ist aus rechtlichen Gründen nicht verfügbar.\";\nvar STARTDATE$4 = \"Dieser Inhalt ist noch nicht verfügbar. Bitte probieren Sie es später noch einmal.\";\nvar UNKNOWN$4 = \"Dieser Inhalt ist nicht verfügbar.\";\nvar de = {\n\tAGERATING12: AGERATING12$4,\n\tAGERATING18: AGERATING18$4,\n\tCOMMERCIAL: COMMERCIAL$4,\n\tENDDATE: ENDDATE$4,\n\tGEOBLOCK: GEOBLOCK$4,\n\tLEGAL: LEGAL$4,\n\tSTARTDATE: STARTDATE$4,\n\tUNKNOWN: UNKNOWN$4\n};\n\nvar pillarboxLang$4 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n AGERATING12: AGERATING12$4,\n AGERATING18: AGERATING18$4,\n COMMERCIAL: COMMERCIAL$4,\n ENDDATE: ENDDATE$4,\n GEOBLOCK: GEOBLOCK$4,\n LEGAL: LEGAL$4,\n STARTDATE: STARTDATE$4,\n UNKNOWN: UNKNOWN$4,\n default: de\n});\n\npillarbox.addLanguage('de', {\n ...vjsLang$3,\n ...pillarboxLang$4,\n});\n\nvar Play$3 = \"Play\";\nvar Pause$3 = \"Pause\";\nvar Replay$3 = \"Replay\";\nvar Duration$3 = \"Duration\";\nvar LIVE$3 = \"LIVE\";\nvar Loaded$3 = \"Loaded\";\nvar Progress$3 = \"Progress\";\nvar Fullscreen$3 = \"Fullscreen\";\nvar Mute$3 = \"Mute\";\nvar Unmute$3 = \"Unmute\";\nvar Subtitles$3 = \"Subtitles\";\nvar Captions$3 = \"Captions\";\nvar Chapters$3 = \"Chapters\";\nvar Descriptions$3 = \"Descriptions\";\nvar Close$3 = \"Close\";\nvar Text$3 = \"Text\";\nvar White$3 = \"White\";\nvar Black$3 = \"Black\";\nvar Red$3 = \"Red\";\nvar Green$3 = \"Green\";\nvar Blue$3 = \"Blue\";\nvar Yellow$3 = \"Yellow\";\nvar Magenta$3 = \"Magenta\";\nvar Cyan$3 = \"Cyan\";\nvar Background$3 = \"Background\";\nvar Window$3 = \"Window\";\nvar Transparent$3 = \"Transparent\";\nvar Opaque$3 = \"Opaque\";\nvar None$3 = \"None\";\nvar Raised$2 = \"Raised\";\nvar Depressed$2 = \"Depressed\";\nvar Uniform$3 = \"Uniform\";\nvar Casual$2 = \"Casual\";\nvar Script$2 = \"Script\";\nvar Reset$3 = \"Reset\";\nvar Done$3 = \"Done\";\nvar Color$2 = \"Color\";\nvar Opacity$2 = \"Opacity\";\nvar en$1 = {\n\t\"Audio Player\": \"Audio Player\",\n\t\"Video Player\": \"Video Player\",\n\tPlay: Play$3,\n\tPause: Pause$3,\n\tReplay: Replay$3,\n\t\"Current Time\": \"Current Time\",\n\tDuration: Duration$3,\n\t\"Remaining Time\": \"Remaining Time\",\n\t\"Stream Type\": \"Stream Type\",\n\tLIVE: LIVE$3,\n\t\"Seek to live, currently behind live\": \"Seek to live, currently behind live\",\n\t\"Seek to live, currently playing live\": \"Seek to live, currently playing live\",\n\tLoaded: Loaded$3,\n\tProgress: Progress$3,\n\t\"Progress Bar\": \"Progress Bar\",\n\t\"progress bar timing: currentTime={1} duration={2}\": \"{1} of {2}\",\n\tFullscreen: Fullscreen$3,\n\t\"Exit Fullscreen\": \"Exit Fullscreen\",\n\tMute: Mute$3,\n\tUnmute: Unmute$3,\n\t\"Playback Rate\": \"Playback Rate\",\n\tSubtitles: Subtitles$3,\n\t\"subtitles off\": \"subtitles off\",\n\tCaptions: Captions$3,\n\t\"captions off\": \"captions off\",\n\tChapters: Chapters$3,\n\tDescriptions: Descriptions$3,\n\t\"descriptions off\": \"descriptions off\",\n\t\"Audio Track\": \"Audio Track\",\n\t\"Volume Level\": \"Volume Level\",\n\t\"You aborted the media playback\": \"You aborted the media playback\",\n\t\"A network error caused the media download to fail part-way.\": \"A network error caused the media download to fail part-way.\",\n\t\"The media could not be loaded, either because the server or network failed or because the format is not supported.\": \"The media could not be loaded, either because the server or network failed or because the format is not supported.\",\n\t\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\": \"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\",\n\t\"No compatible source was found for this media.\": \"No compatible source was found for this media.\",\n\t\"The media is encrypted and we do not have the keys to decrypt it.\": \"The media is encrypted and we do not have the keys to decrypt it.\",\n\t\"Play Video\": \"Play Video\",\n\tClose: Close$3,\n\t\"Close Modal Dialog\": \"Close Modal Dialog\",\n\t\"Modal Window\": \"Modal Window\",\n\t\"This is a modal window\": \"This is a modal window\",\n\t\"This modal can be closed by pressing the Escape key or activating the close button.\": \"This modal can be closed by pressing the Escape key or activating the close button.\",\n\t\", opens captions settings dialog\": \", opens captions settings dialog\",\n\t\", opens subtitles settings dialog\": \", opens subtitles settings dialog\",\n\t\", opens descriptions settings dialog\": \", opens descriptions settings dialog\",\n\t\", selected\": \", selected\",\n\t\"captions settings\": \"captions settings\",\n\t\"subtitles settings\": \"subtitles settings\",\n\t\"descriptions settings\": \"descriptions settings\",\n\tText: Text$3,\n\tWhite: White$3,\n\tBlack: Black$3,\n\tRed: Red$3,\n\tGreen: Green$3,\n\tBlue: Blue$3,\n\tYellow: Yellow$3,\n\tMagenta: Magenta$3,\n\tCyan: Cyan$3,\n\tBackground: Background$3,\n\tWindow: Window$3,\n\tTransparent: Transparent$3,\n\t\"Semi-Transparent\": \"Semi-Transparent\",\n\tOpaque: Opaque$3,\n\t\"Font Size\": \"Font Size\",\n\t\"Text Edge Style\": \"Text Edge Style\",\n\tNone: None$3,\n\tRaised: Raised$2,\n\tDepressed: Depressed$2,\n\tUniform: Uniform$3,\n\t\"Drop shadow\": \"Drop shadow\",\n\t\"Font Family\": \"Font Family\",\n\t\"Proportional Sans-Serif\": \"Proportional Sans-Serif\",\n\t\"Monospace Sans-Serif\": \"Monospace Sans-Serif\",\n\t\"Proportional Serif\": \"Proportional Serif\",\n\t\"Monospace Serif\": \"Monospace Serif\",\n\tCasual: Casual$2,\n\tScript: Script$2,\n\t\"Small Caps\": \"Small Caps\",\n\tReset: Reset$3,\n\t\"restore all settings to the default values\": \"restore all settings to the default values\",\n\tDone: Done$3,\n\t\"Caption Settings Dialog\": \"Caption Settings Dialog\",\n\t\"Beginning of dialog window. Escape will cancel and close the window.\": \"Beginning of dialog window. Escape will cancel and close the window.\",\n\t\"End of dialog window.\": \"End of dialog window.\",\n\t\"{1} is loading.\": \"{1} is loading.\",\n\t\"Exit Picture-in-Picture\": \"Exit Picture-in-Picture\",\n\t\"Picture-in-Picture\": \"Picture-in-Picture\",\n\t\"No content\": \"No content\",\n\tColor: Color$2,\n\tOpacity: Opacity$2,\n\t\"Text Background\": \"Text Background\",\n\t\"Caption Area Background\": \"Caption Area Background\",\n\t\"Playing in Picture-in-Picture\": \"Playing in Picture-in-Picture\",\n\t\"Skip backward {1} seconds\": \"Skip backward {1} seconds\",\n\t\"Skip forward {1} seconds\": \"Skip forward {1} seconds\"\n};\n\nvar vjsLang$2 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n Background: Background$3,\n Black: Black$3,\n Blue: Blue$3,\n Captions: Captions$3,\n Casual: Casual$2,\n Chapters: Chapters$3,\n Close: Close$3,\n Color: Color$2,\n Cyan: Cyan$3,\n Depressed: Depressed$2,\n Descriptions: Descriptions$3,\n Done: Done$3,\n Duration: Duration$3,\n Fullscreen: Fullscreen$3,\n Green: Green$3,\n LIVE: LIVE$3,\n Loaded: Loaded$3,\n Magenta: Magenta$3,\n Mute: Mute$3,\n None: None$3,\n Opacity: Opacity$2,\n Opaque: Opaque$3,\n Pause: Pause$3,\n Play: Play$3,\n Progress: Progress$3,\n Raised: Raised$2,\n Red: Red$3,\n Replay: Replay$3,\n Reset: Reset$3,\n Script: Script$2,\n Subtitles: Subtitles$3,\n Text: Text$3,\n Transparent: Transparent$3,\n Uniform: Uniform$3,\n Unmute: Unmute$3,\n White: White$3,\n Window: Window$3,\n Yellow: Yellow$3,\n default: en$1\n});\n\nvar AGERATING12$3 = \"To protect children this content is only available between 8PM and 6AM.\";\nvar AGERATING18$3 = \"To protect children this content is only available between 10PM and 5AM.\";\nvar COMMERCIAL$3 = \"This commercial content is not available.\";\nvar ENDDATE$3 = \"This content is not available anymore.\";\nvar GEOBLOCK$3 = \"This content is not available outside Switzerland.\";\nvar LEGAL$3 = \"This content is not available due to legal restrictions.\";\nvar STARTDATE$3 = \"This content is not available yet.\";\nvar UNKNOWN$3 = \"This content is not available.\";\nvar en = {\n\tAGERATING12: AGERATING12$3,\n\tAGERATING18: AGERATING18$3,\n\tCOMMERCIAL: COMMERCIAL$3,\n\tENDDATE: ENDDATE$3,\n\tGEOBLOCK: GEOBLOCK$3,\n\tLEGAL: LEGAL$3,\n\tSTARTDATE: STARTDATE$3,\n\tUNKNOWN: UNKNOWN$3\n};\n\nvar pillarboxLang$3 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n AGERATING12: AGERATING12$3,\n AGERATING18: AGERATING18$3,\n COMMERCIAL: COMMERCIAL$3,\n ENDDATE: ENDDATE$3,\n GEOBLOCK: GEOBLOCK$3,\n LEGAL: LEGAL$3,\n STARTDATE: STARTDATE$3,\n UNKNOWN: UNKNOWN$3,\n default: en\n});\n\npillarbox.addLanguage('en', {\n ...vjsLang$2,\n ...pillarboxLang$3,\n});\n\nvar Play$2 = \"Lecture\";\nvar Pause$2 = \"Pause\";\nvar Replay$2 = \"Revoir\";\nvar Duration$2 = \"Durée\";\nvar LIVE$2 = \"EN DIRECT\";\nvar Loaded$2 = \"Chargé\";\nvar Progress$2 = \"Progression\";\nvar Fullscreen$2 = \"Plein écran\";\nvar Mute$2 = \"Mettre en sourdine\";\nvar Unmute$2 = \"Activer le son\";\nvar Subtitles$2 = \"Sous-titres\";\nvar Captions$2 = \"Sous-titres transcrits\";\nvar Chapters$2 = \"Chapitres\";\nvar Descriptions$2 = \"Descriptions\";\nvar Close$2 = \"Fermer\";\nvar Text$2 = \"Texte\";\nvar White$2 = \"Blanc\";\nvar Black$2 = \"Noir\";\nvar Red$2 = \"Rouge\";\nvar Green$2 = \"Vert\";\nvar Blue$2 = \"Bleu\";\nvar Yellow$2 = \"Jaune\";\nvar Magenta$2 = \"Magenta\";\nvar Cyan$2 = \"Cyan\";\nvar Background$2 = \"Arrière-plan\";\nvar Window$2 = \"Fenêtre\";\nvar Transparent$2 = \"Transparent\";\nvar Opaque$2 = \"Opaque\";\nvar None$2 = \"Aucun\";\nvar Raised$1 = \"Élevé\";\nvar Depressed$1 = \"Enfoncé\";\nvar Uniform$2 = \"Uniforme\";\nvar Casual$1 = \"Manuscrite\";\nvar Script$1 = \"Scripte\";\nvar Reset$2 = \"Réinitialiser\";\nvar Done$2 = \"Terminé\";\nvar Color$1 = \"Couleur\";\nvar Opacity$1 = \"Opacité\";\nvar fr$1 = {\n\t\"Audio Player\": \"Lecteur audio\",\n\t\"Video Player\": \"Lecteur vidéo\",\n\tPlay: Play$2,\n\tPause: Pause$2,\n\tReplay: Replay$2,\n\t\"Current Time\": \"Temps actuel\",\n\tDuration: Duration$2,\n\t\"Remaining Time\": \"Temps restant\",\n\t\"Stream Type\": \"Type de flux\",\n\tLIVE: LIVE$2,\n\t\"Seek to live, currently behind live\": \"Rechercher le direct, actuellement après le direct\",\n\t\"Seek to live, currently playing live\": \"Rechercher le direct, le direct actuellement en cours de lecture\",\n\tLoaded: Loaded$2,\n\tProgress: Progress$2,\n\t\"Progress Bar\": \"Barre de progression\",\n\t\"progress bar timing: currentTime={1} duration={2}\": \"{1} de {2}\",\n\tFullscreen: Fullscreen$2,\n\t\"Exit Fullscreen\": \"Fenêtré\",\n\tMute: Mute$2,\n\tUnmute: Unmute$2,\n\t\"Playback Rate\": \"Vitesse de lecture\",\n\tSubtitles: Subtitles$2,\n\t\"subtitles off\": \"Sous-titres désactivés\",\n\tCaptions: Captions$2,\n\t\"captions off\": \"Sous-titres transcrits désactivés\",\n\tChapters: Chapters$2,\n\tDescriptions: Descriptions$2,\n\t\"descriptions off\": \"descriptions désactivées\",\n\t\"Audio Track\": \"Piste audio\",\n\t\"Volume Level\": \"Niveau de volume\",\n\t\"You aborted the media playback\": \"Vous avez interrompu la lecture de la vidéo.\",\n\t\"A network error caused the media download to fail part-way.\": \"Une erreur de réseau a interrompu le téléchargement de la vidéo.\",\n\t\"The media could not be loaded, either because the server or network failed or because the format is not supported.\": \"Cette vidéo n'a pas pu être chargée, soit parce que le serveur ou le réseau a échoué ou parce que le format n'est pas reconnu.\",\n\t\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\": \"La lecture de la vidéo a été interrompue à cause d'un problème de corruption ou parce que la vidéo utilise des fonctionnalités non prises en charge par votre navigateur.\",\n\t\"No compatible source was found for this media.\": \"Aucune source compatible n'a été trouvée pour cette vidéo.\",\n\t\"The media is encrypted and we do not have the keys to decrypt it.\": \"Le média est chiffré et nous n'avons pas les clés pour le déchiffrer.\",\n\t\"Play Video\": \"Lire la vidéo\",\n\tClose: Close$2,\n\t\"Close Modal Dialog\": \"Fermer la boîte de dialogue modale\",\n\t\"Modal Window\": \"Fenêtre modale\",\n\t\"This is a modal window\": \"Ceci est une fenêtre modale\",\n\t\"This modal can be closed by pressing the Escape key or activating the close button.\": \"Ce modal peut être fermé en appuyant sur la touche Échap ou activer le bouton de fermeture.\",\n\t\", opens captions settings dialog\": \", ouvrir les paramètres des sous-titres transcrits\",\n\t\", opens subtitles settings dialog\": \", ouvrir les paramètres des sous-titres\",\n\t\", opens descriptions settings dialog\": \", ouvrir les paramètres des descriptions\",\n\t\", selected\": \", sélectionné\",\n\t\"captions settings\": \"Paramètres des sous-titres transcrits\",\n\t\"subtitles settings\": \"Paramètres des sous-titres\",\n\t\"descriptions settings\": \"Paramètres des descriptions\",\n\tText: Text$2,\n\tWhite: White$2,\n\tBlack: Black$2,\n\tRed: Red$2,\n\tGreen: Green$2,\n\tBlue: Blue$2,\n\tYellow: Yellow$2,\n\tMagenta: Magenta$2,\n\tCyan: Cyan$2,\n\tBackground: Background$2,\n\tWindow: Window$2,\n\tTransparent: Transparent$2,\n\t\"Semi-Transparent\": \"Semi-transparent\",\n\tOpaque: Opaque$2,\n\t\"Font Size\": \"Taille des caractères\",\n\t\"Text Edge Style\": \"Style des contours du texte\",\n\tNone: None$2,\n\tRaised: Raised$1,\n\tDepressed: Depressed$1,\n\tUniform: Uniform$2,\n\t\"Drop shadow\": \"Ombre portée\",\n\t\"Font Family\": \"Famille de polices\",\n\t\"Proportional Sans-Serif\": \"Polices à chasse variable sans empattement (Proportional Sans-Serif)\",\n\t\"Monospace Sans-Serif\": \"Polices à chasse fixe sans empattement (Monospace Sans-Serif)\",\n\t\"Proportional Serif\": \"Polices à chasse variable avec empattement (Proportional Serif)\",\n\t\"Monospace Serif\": \"Polices à chasse fixe avec empattement (Monospace Serif)\",\n\tCasual: Casual$1,\n\tScript: Script$1,\n\t\"Small Caps\": \"Petites capitales\",\n\tReset: Reset$2,\n\t\"restore all settings to the default values\": \"Restaurer tous les paramètres aux valeurs par défaut\",\n\tDone: Done$2,\n\t\"Caption Settings Dialog\": \"Boîte de dialogue des paramètres des sous-titres transcrits\",\n\t\"Beginning of dialog window. Escape will cancel and close the window.\": \"Début de la fenêtre de dialogue. La touche d'échappement annulera et fermera la fenêtre.\",\n\t\"End of dialog window.\": \"Fin de la fenêtre de dialogue.\",\n\t\"Exit Picture-in-Picture\": \"Quitter le mode image dans l'image\",\n\t\"Picture-in-Picture\": \"Image dans l'image\",\n\t\"{1} is loading.\": \"{1} en cours de chargement.\",\n\t\"No content\": \"Aucun contenu\",\n\tColor: Color$1,\n\tOpacity: Opacity$1,\n\t\"Text Background\": \"Arrière-plan du texte\",\n\t\"Caption Area Background\": \"Arrière-plan de la zone de sous-titre\",\n\t\"Skip backward {1} seconds\": \"Reculer de {1} secondes\",\n\t\"Skip forward {1} seconds\": \"Avancer de {1} secondes\"\n};\n\nvar vjsLang$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n Background: Background$2,\n Black: Black$2,\n Blue: Blue$2,\n Captions: Captions$2,\n Casual: Casual$1,\n Chapters: Chapters$2,\n Close: Close$2,\n Color: Color$1,\n Cyan: Cyan$2,\n Depressed: Depressed$1,\n Descriptions: Descriptions$2,\n Done: Done$2,\n Duration: Duration$2,\n Fullscreen: Fullscreen$2,\n Green: Green$2,\n LIVE: LIVE$2,\n Loaded: Loaded$2,\n Magenta: Magenta$2,\n Mute: Mute$2,\n None: None$2,\n Opacity: Opacity$1,\n Opaque: Opaque$2,\n Pause: Pause$2,\n Play: Play$2,\n Progress: Progress$2,\n Raised: Raised$1,\n Red: Red$2,\n Replay: Replay$2,\n Reset: Reset$2,\n Script: Script$1,\n Subtitles: Subtitles$2,\n Text: Text$2,\n Transparent: Transparent$2,\n Uniform: Uniform$2,\n Unmute: Unmute$2,\n White: White$2,\n Window: Window$2,\n Yellow: Yellow$2,\n default: fr$1\n});\n\nvar AGERATING12$2 = \"Pour protéger les enfants, ce contenu est accessible entre 20h et 6h.\";\nvar AGERATING18$2 = \"Pour protéger les enfants, ce contenu est accessible entre 23h et 5h.\";\nvar COMMERCIAL$2 = \"Ce contenu n'est actuellement pas disponible.\";\nvar ENDDATE$2 = \"Ce contenu n'est plus disponible.\";\nvar GEOBLOCK$2 = \"La RTS ne dispose pas des droits de diffusion en dehors de la Suisse.\";\nvar LEGAL$2 = \"Pour des raisons juridiques, ce contenu n'est pas disponible.\";\nvar STARTDATE$2 = \"Ce contenu n'est pas encore disponible. Veuillez réessayer plus tard.\";\nvar UNKNOWN$2 = \"Ce contenu n'est actuellement pas disponible.\";\nvar fr = {\n\tAGERATING12: AGERATING12$2,\n\tAGERATING18: AGERATING18$2,\n\tCOMMERCIAL: COMMERCIAL$2,\n\tENDDATE: ENDDATE$2,\n\tGEOBLOCK: GEOBLOCK$2,\n\tLEGAL: LEGAL$2,\n\tSTARTDATE: STARTDATE$2,\n\tUNKNOWN: UNKNOWN$2\n};\n\nvar pillarboxLang$2 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n AGERATING12: AGERATING12$2,\n AGERATING18: AGERATING18$2,\n COMMERCIAL: COMMERCIAL$2,\n ENDDATE: ENDDATE$2,\n GEOBLOCK: GEOBLOCK$2,\n LEGAL: LEGAL$2,\n STARTDATE: STARTDATE$2,\n UNKNOWN: UNKNOWN$2,\n default: fr\n});\n\npillarbox.addLanguage('fr', {\n ...vjsLang$1,\n ...pillarboxLang$2,\n});\n\nvar Play$1 = \"Play\";\nvar Pause$1 = \"Pausa\";\nvar Replay$1 = \"Replay\";\nvar Duration$1 = \"Durata\";\nvar LIVE$1 = \"LIVE\";\nvar Loaded$1 = \"Caricato\";\nvar Progress$1 = \"Stato\";\nvar Fullscreen$1 = \"Schermo intero\";\nvar Mute$1 = \"Disattiva l’audio\";\nvar Unmute$1 = \"Attiva l’audio\";\nvar Subtitles$1 = \"Sottotitoli\";\nvar Captions$1 = \"Sottotitoli non udenti\";\nvar Chapters$1 = \"Capitolo\";\nvar Descriptions$1 = \"Descrizioni\";\nvar Close$1 = \"Chiudi\";\nvar Text$1 = \"Testo\";\nvar White$1 = \"Bianco\";\nvar Black$1 = \"Nero\";\nvar Red$1 = \"Rosso\";\nvar Green$1 = \"Verde\";\nvar Blue$1 = \"Blu\";\nvar Yellow$1 = \"Giallo\";\nvar Magenta$1 = \"Magenta\";\nvar Cyan$1 = \"Ciano\";\nvar Background$1 = \"Sfondo\";\nvar Window$1 = \"Finestra\";\nvar Transparent$1 = \"Trasparente\";\nvar Opaque$1 = \"Opaco\";\nvar None$1 = \"Nessuno\";\nvar Uniform$1 = \"Uniforme\";\nvar Reset$1 = \"Reinizializza\";\nvar Done$1 = \"Fatto\";\nvar Color = \"Colore\";\nvar Opacity = \"Opacità\";\nvar it$1 = {\n\t\"Audio Player\": \"Lettore audio\",\n\t\"Video Player\": \"Lettore video\",\n\tPlay: Play$1,\n\tPause: Pause$1,\n\tReplay: Replay$1,\n\t\"Current Time\": \"Orario attuale\",\n\tDuration: Duration$1,\n\t\"Remaining Time\": \"Tempo rimanente\",\n\t\"Stream Type\": \"Tipo di streaming\",\n\tLIVE: LIVE$1,\n\tLoaded: Loaded$1,\n\tProgress: Progress$1,\n\t\"Progress Bar\": \"Barra di avanzamento\",\n\t\"progress bar timing: currentTime={1} duration={2}\": \"{1} di {2}\",\n\tFullscreen: Fullscreen$1,\n\t\"Exit Fullscreen\": \"Chiudi Schermo intero\",\n\tMute: Mute$1,\n\tUnmute: Unmute$1,\n\t\"Playback Rate\": \"Velocità di riproduzione\",\n\tSubtitles: Subtitles$1,\n\t\"subtitles off\": \"Senza sottotitoli\",\n\tCaptions: Captions$1,\n\t\"captions off\": \"Senza sottotitoli non udenti\",\n\tChapters: Chapters$1,\n\tDescriptions: Descriptions$1,\n\t\"descriptions off\": \"Descrizioni disattivate\",\n\t\"Audio Track\": \"Traccia audio\",\n\t\"Volume Level\": \"Livello del volume\",\n\t\"You aborted the media playback\": \"La riproduzione del contenuto multimediale è stata interrotta.\",\n\t\"A network error caused the media download to fail part-way.\": \"Il download del contenuto multimediale è stato interrotto a causa di un problema rete.\",\n\t\"The media could not be loaded, either because the server or network failed or because the format is not supported.\": \"Il contenuto multimediale non può essere caricato a causa di un errore nel server o nella rete o perché il formato non viene supportato.\",\n\t\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\": \"La riproduzione del contenuto multimediale è stata interrotta a causa di un file danneggiato o per l’utilizzo di impostazioni non supportate dal browser.\",\n\t\"No compatible source was found for this media.\": \"Non ci sono fonti compatibili per questo contenuto multimediale.\",\n\t\"The media is encrypted and we do not have the keys to decrypt it.\": \"Il contenuto multimediale è criptato e non disponiamo delle chiavi per decifrarlo.\",\n\t\"Play Video\": \"Riproduci il video\",\n\tClose: Close$1,\n\t\"Close Modal Dialog\": \"Chiudi la finestra di dialogo\",\n\t\"Modal Window\": \"Finestra di dialogo\",\n\t\"This is a modal window\": \"Questa è una finestra di dialogo\",\n\t\"This modal can be closed by pressing the Escape key or activating the close button.\": \"Questa finestra di dialogo può essere chiusa premendo sul tasto Esc o attivando il pulsante di chiusura.\",\n\t\", opens captions settings dialog\": \", aprire i parametri della trascrizione dei sottotitoli\",\n\t\", opens subtitles settings dialog\": \", aprire i parametri dei sottotitoli\",\n\t\", opens descriptions settings dialog\": \", aprire i parametri delle descrizioni\",\n\t\", selected\": \", selezionato\",\n\t\"captions settings\": \"Parametri sottotitoli non udenti\",\n\t\"subtitles settings\": \"Parametri sottotitoli\",\n\t\"descriptions settings\": \"Parametri descrizioni\",\n\tText: Text$1,\n\tWhite: White$1,\n\tBlack: Black$1,\n\tRed: Red$1,\n\tGreen: Green$1,\n\tBlue: Blue$1,\n\tYellow: Yellow$1,\n\tMagenta: Magenta$1,\n\tCyan: Cyan$1,\n\tBackground: Background$1,\n\tWindow: Window$1,\n\tTransparent: Transparent$1,\n\t\"Semi-Transparent\": \"Semi-Trasparente\",\n\tOpaque: Opaque$1,\n\t\"Font Size\": \"Dimensione dei caratteri\",\n\t\"Text Edge Style\": \"Stile dei bordi del testo\",\n\tNone: None$1,\n\tUniform: Uniform$1,\n\t\"Drop shadow\": \"Ombra\",\n\t\"Font Family\": \"Carattere\",\n\t\"Proportional Sans-Serif\": \"Sans-Serif proporzionale\",\n\t\"Monospace Sans-Serif\": \"Sans-Serif monospaziato\",\n\t\"Proportional Serif\": \"Serif proporzionale\",\n\t\"Monospace Serif\": \"Serif monospaziato\",\n\t\"Small Caps\": \"Maiuscoletto\",\n\tReset: Reset$1,\n\t\"restore all settings to the default values\": \"Ripristina i valori predefiniti per tutti i parametri\",\n\tDone: Done$1,\n\t\"Caption Settings Dialog\": \"Finestra di dialogo dei parametri della trascrizione dei sottotitoli\",\n\t\"Beginning of dialog window. Escape will cancel and close the window.\": \"Inizio della finestra di dialogo. Il tasto Esc annullerà l’operazione e chiuderà la finestra.\",\n\t\"End of dialog window.\": \"Fine della finestra di dialogo.\",\n\t\"{1} is loading.\": \"{1} in fase di caricamento.\",\n\t\"Exit Picture-in-Picture\": \"Esci dalla modalità Picture-in-Picture\",\n\t\"Picture-in-Picture\": \"Picture-in-Picture\",\n\tColor: Color,\n\tOpacity: Opacity,\n\t\"Text Background\": \"Sfondo testo\",\n\t\"Caption Area Background\": \"Sfondo area sottotitoli\",\n\t\"Skip forward {1} seconds\": \"Avanti {1} secondi\",\n\t\"Skip backward {1} seconds\": \"Indietro {1} secondi\"\n};\n\nvar vjsLang = /*#__PURE__*/Object.freeze({\n __proto__: null,\n Background: Background$1,\n Black: Black$1,\n Blue: Blue$1,\n Captions: Captions$1,\n Chapters: Chapters$1,\n Close: Close$1,\n Color: Color,\n Cyan: Cyan$1,\n Descriptions: Descriptions$1,\n Done: Done$1,\n Duration: Duration$1,\n Fullscreen: Fullscreen$1,\n Green: Green$1,\n LIVE: LIVE$1,\n Loaded: Loaded$1,\n Magenta: Magenta$1,\n Mute: Mute$1,\n None: None$1,\n Opacity: Opacity,\n Opaque: Opaque$1,\n Pause: Pause$1,\n Play: Play$1,\n Progress: Progress$1,\n Red: Red$1,\n Replay: Replay$1,\n Reset: Reset$1,\n Subtitles: Subtitles$1,\n Text: Text$1,\n Transparent: Transparent$1,\n Uniform: Uniform$1,\n Unmute: Unmute$1,\n White: White$1,\n Window: Window$1,\n Yellow: Yellow$1,\n default: it$1\n});\n\nvar AGERATING12$1 = \"Per proteggere i bambini, questo media è disponibile solo fra le 20 e le 6.\";\nvar AGERATING18$1 = \"Per proteggere i bambini, questo media è disponibile solo fra le 23 le 5.\";\nvar COMMERCIAL$1 = \"Questo contenuto commerciale non è disponibile.\";\nvar ENDDATE$1 = \"Questo media non è più disponibile.\";\nvar GEOBLOCK$1 = \"Questo media non è disponibile fuori dalla Svizzera.\";\nvar LEGAL$1 = \"Il contenuto non è fruibile a causa di restrizioni legali.\";\nvar STARTDATE$1 = \"Il contenuto non è ancora disponibile. Per cortesia prova più tardi.\";\nvar UNKNOWN$1 = \"Questo media non è disponibile.\";\nvar it = {\n\tAGERATING12: AGERATING12$1,\n\tAGERATING18: AGERATING18$1,\n\tCOMMERCIAL: COMMERCIAL$1,\n\tENDDATE: ENDDATE$1,\n\tGEOBLOCK: GEOBLOCK$1,\n\tLEGAL: LEGAL$1,\n\tSTARTDATE: STARTDATE$1,\n\tUNKNOWN: UNKNOWN$1\n};\n\nvar pillarboxLang$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n AGERATING12: AGERATING12$1,\n AGERATING18: AGERATING18$1,\n COMMERCIAL: COMMERCIAL$1,\n ENDDATE: ENDDATE$1,\n GEOBLOCK: GEOBLOCK$1,\n LEGAL: LEGAL$1,\n STARTDATE: STARTDATE$1,\n UNKNOWN: UNKNOWN$1,\n default: it\n});\n\npillarbox.addLanguage('it', {\n ...vjsLang,\n ...pillarboxLang$1,\n});\n\nvar Play = \"Laschar ir\";\nvar Pause = \"Pausa\";\nvar Replay = \"Mussar danovamain\";\nvar Duration = \"Durada\";\nvar LIVE = \"LIVE\";\nvar Loaded = \"Chargià\";\nvar Progress = \"Progress\";\nvar Fullscreen = \"Entir visur\";\nvar Mute = \"Senza tun\";\nvar Unmute = \"Cun tun\";\nvar Subtitles = \"Suttitels\";\nvar Captions = \"Suttitels\";\nvar Chapters = \"Chapitels\";\nvar Descriptions = \"Descripziuns\";\nvar Close = \"Serrar\";\nvar Text = \"Text\";\nvar White = \"Alv\";\nvar Black = \"Nair\";\nvar Red = \"Cotschn\";\nvar Green = \"Verd\";\nvar Blue = \"Blau\";\nvar Yellow = \"Mellen\";\nvar Magenta = \"Magenta\";\nvar Cyan = \"Cyan\";\nvar Background = \"Fund\";\nvar Window = \"Fanestra\";\nvar Transparent = \"Transparent\";\nvar Opaque = \"Betg transparent\";\nvar None = \"Nagin\";\nvar Raised = \"Auzà\";\nvar Depressed = \"Sbassà\";\nvar Uniform = \"Uniform\";\nvar Dropshadow = \"Sumbriva\";\nvar Casual = \"Casual\";\nvar Script = \"Script\";\nvar Reset = \"Da nov\";\nvar Done = \"Fatg\";\nvar AGERATING12 = \"Per proteger uffants, è quest cuntegn disponibel mo tranter las 20.00 e las 06.00.\";\nvar AGERATING18 = \"Per proteger uffants, è quest cuntegn disponibel mo tranter las 23.00 e las 05.00.\";\nvar COMMERCIAL = \"Quest medium commerzial n'è betg disponibel.\";\nvar ENDDATE = \"Quest cuntegn n'è betg pli disponibel.\";\nvar GEOBLOCK = \"Quest cuntegn n'è betg disponibel ordaifer la Svizra.\";\nvar LEGAL = \"Quest cuntegn n'è betg disponibel perquai ch'el è scadì.\";\nvar STARTDATE = \"Quest cuntegn n'è betg anc disponibel. Empruvai pli tard.\";\nvar UNKNOWN = \"Quest cuntegn n'è betg disponibel.\";\nvar rm = {\n\t\"Audio Player\": \"Audio-Player\",\n\t\"Video Player\": \"Video-Player\",\n\tPlay: Play,\n\tPause: Pause,\n\tReplay: Replay,\n\t\"Current Time\": \"Temp actual\",\n\tDuration: Duration,\n\t\"Remaining Time\": \"Temp restant\",\n\t\"Stream Type\": \"Tip dal stream\",\n\tLIVE: LIVE,\n\tLoaded: Loaded,\n\tProgress: Progress,\n\t\"Progress Bar\": \"Bar da progessiun\",\n\t\"progress bar timing: currentTime={1} duration={2}\": \"{1} da {2}\",\n\tFullscreen: Fullscreen,\n\t\"Non-Fullscreen\": \"Betg entir visur\",\n\tMute: Mute,\n\tUnmute: Unmute,\n\t\"Playback Rate\": \"Tempo \",\n\tSubtitles: Subtitles,\n\t\"subtitles off\": \"senza suttitels\",\n\tCaptions: Captions,\n\t\"captions off\": \"senza suttitels\",\n\tChapters: Chapters,\n\tDescriptions: Descriptions,\n\t\"descriptions off\": \"senza descripziuns\",\n\t\"Audio Track\": \"Piese audio\",\n\t\"Volume Level\": \"Nivel dal volumen\",\n\t\"You aborted the media playback\": \"Vus avais interrut il vdieo\",\n\t\"A network error caused the media download to fail part-way.\": \"In sbagl en la rait ha impedì il download\",\n\t\"The media could not be loaded, either because the server or network failed or because the format is not supported.\": \"Il video n'è betg chargià - ubain per in sbagl da server / da la rait, ubain ch'il format n'è betg cumpatibel.\",\n\t\"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.\": \"Il video è interrut: Ubain ch'il video è donnegià, ubain che funcziuns n'èn betg cumpatiblas.\",\n\t\"No compatible source was found for this media.\": \"Chattà nagina funtauna cumpatibla per quest video.\",\n\t\"The media is encrypted and we do not have the keys to decrypt it.\": \"Il video è codifitgà da moda nunenconuschenta.\",\n\t\"Play Video\": \"Aviar video\",\n\tClose: Close,\n\t\"Close Modal Dialog\": \"Serrar la fanestra modala\",\n\t\"Modal Window\": \"Fanestra modala\",\n\t\"This is a modal window\": \"Quai è ina fanestra modala\",\n\t\"This modal can be closed by pressing the Escape key or activating the close button.\": \"Questa fanestra modala pudais serrar cun la tasta \\\"Escape\\\" ubain cun il buttun.\",\n\t\", opens captions settings dialog\": \", avra opziuns per ils suttitels\",\n\t\", opens subtitles settings dialog\": \", avra opziuns per ils suttitels\",\n\t\", opens descriptions settings dialog\": \", avra opziuns per la descripziun\",\n\t\", selected\": \", selecziunà\",\n\t\"captions settings\": \"opziuns per ils suttitels\",\n\t\"subtitles settings\": \"opziuns per ils suttitels\",\n\t\"descriptions settings\": \"opziuns per la descripziun\",\n\tText: Text,\n\tWhite: White,\n\tBlack: Black,\n\tRed: Red,\n\tGreen: Green,\n\tBlue: Blue,\n\tYellow: Yellow,\n\tMagenta: Magenta,\n\tCyan: Cyan,\n\tBackground: Background,\n\tWindow: Window,\n\tTransparent: Transparent,\n\t\"Semi-Transparent\": \"Mez transparent\",\n\tOpaque: Opaque,\n\t\"Font Size\": \"Grandezza dal text\",\n\t\"Text Edge Style\": \"Stil dal text\",\n\tNone: None,\n\tRaised: Raised,\n\tDepressed: Depressed,\n\tUniform: Uniform,\n\tDropshadow: Dropshadow,\n\t\"Font Family\": \"Scrittira\",\n\t\"Proportional Sans-Serif\": \"Proportionale Sans-Serif\",\n\t\"Monospace Sans-Serif\": \"Monospace Sans-Serif\",\n\t\"Proportional Serif\": \"Proportionale Serif\",\n\t\"Monospace Serif\": \"Monospace Serif\",\n\tCasual: Casual,\n\tScript: Script,\n\t\"Small Caps\": \"Bustabs pitschens\",\n\tReset: Reset,\n\t\"restore all settings to the default values\": \"Enavos tar las opziuns da standard\",\n\tDone: Done,\n\t\"Caption Settings Dialog\": \"Opziuns per suttitels\",\n\t\"Beginning of dialog window. Escape will cancel and close the window.\": \"Entschatta da la fanestra da dialog. Escape stizza e serra la fanestra.\",\n\t\"End of dialog window.\": \"Fin da la fanestra da dialog.\",\n\tAGERATING12: AGERATING12,\n\tAGERATING18: AGERATING18,\n\tCOMMERCIAL: COMMERCIAL,\n\tENDDATE: ENDDATE,\n\tGEOBLOCK: GEOBLOCK,\n\tLEGAL: LEGAL,\n\tSTARTDATE: STARTDATE,\n\tUNKNOWN: UNKNOWN\n};\n\nvar pillarboxLang = /*#__PURE__*/Object.freeze({\n __proto__: null,\n AGERATING12: AGERATING12,\n AGERATING18: AGERATING18,\n Background: Background,\n Black: Black,\n Blue: Blue,\n COMMERCIAL: COMMERCIAL,\n Captions: Captions,\n Casual: Casual,\n Chapters: Chapters,\n Close: Close,\n Cyan: Cyan,\n Depressed: Depressed,\n Descriptions: Descriptions,\n Done: Done,\n Dropshadow: Dropshadow,\n Duration: Duration,\n ENDDATE: ENDDATE,\n Fullscreen: Fullscreen,\n GEOBLOCK: GEOBLOCK,\n Green: Green,\n LEGAL: LEGAL,\n LIVE: LIVE,\n Loaded: Loaded,\n Magenta: Magenta,\n Mute: Mute,\n None: None,\n Opaque: Opaque,\n Pause: Pause,\n Play: Play,\n Progress: Progress,\n Raised: Raised,\n Red: Red,\n Replay: Replay,\n Reset: Reset,\n STARTDATE: STARTDATE,\n Script: Script,\n Subtitles: Subtitles,\n Text: Text,\n Transparent: Transparent,\n UNKNOWN: UNKNOWN,\n Uniform: Uniform,\n Unmute: Unmute,\n White: White,\n Window: Window,\n Yellow: Yellow,\n default: rm\n});\n\npillarbox.addLanguage('rm', {\n ...pillarboxLang,\n});\n\n/**\n * @class SrgSsr\n */\nclass SrgSsr {\n /**\n * Adds blocked segments to the player.\n *\n * @param {import('video.js/dist/types/player').default} player\n * @param {Array} [segments=[]]\n */\n static addBlockedSegments(player, segments = []) {\n const trackId = 'srgssr-blocked-segments';\n const removeTrack = player.textTracks().getTrackById(trackId);\n\n if (removeTrack) {\n player.textTracks().removeTrack(removeTrack);\n }\n\n if (!Array.isArray(segments) || !segments.length) return;\n\n const blockedSegments = segments.filter(segment => segment.blockReason);\n\n if (!blockedSegments.length) return;\n\n SrgSsr.createTextTrack(player, trackId).then(segmentTrack => {\n blockedSegments.forEach(segment => {\n SrgSsr.addTextTrackCue(segmentTrack, segment);\n });\n\n player.textTracks().addTrack(segmentTrack);\n });\n }\n\n /**\n * Adds remote text tracks from an array of subtitles.\n *\n * @param {import('video.js/dist/types/player').default} player\n * @param {Array} [subtitles=[]]\n */\n static addRemoteTextTracks(player, subtitles = []) {\n if (!Array.isArray(subtitles)) return;\n\n subtitles.forEach(({\n type,\n language: label,\n locale: language,\n url: src\n }) => {\n player.addRemoteTextTrack({\n kind: type === 'SDH' ? 'captions' : 'subtitles',\n label,\n language,\n src\n });\n });\n }\n\n /**\n * Add a new cue to a text track with the given data.\n *\n * @param {TextTrack} textTrack\n * @param {\n * import('../dataProvider/model/typedef').Segment |\n * import('../dataProvider/model/typedef').Chapter |\n * import('../dataProvider/model/typedef').TimeInterval\n * } data SRG SSR's cue-like representation\n */\n static addTextTrackCue(textTrack, data) {\n const startTime = (data.markIn ?? data.fullLengthMarkIn) / 1_000;\n const endTime = (data.markOut ?? data.fullLengthMarkOut) / 1_000;\n\n textTrack.addCue(new VTTCue(\n startTime,\n endTime,\n JSON.stringify(data)\n ));\n }\n\n /**\n * Add multiple text tracks to the player.\n *\n * @param {import('video.js/dist/types/player').default} player\n * @param {import('./typedef').ComposedSrcMediaData} srcMediaObj\n */\n static addTextTracks(player, { mediaData }) {\n SrgSsr.addRemoteTextTracks(player, mediaData.subtitles);\n SrgSsr.addChapters(player, mediaData.urn, mediaData.chapters);\n SrgSsr.addBlockedSegments(player, mediaData.blockedSegments);\n SrgSsr.addIntervals(player, mediaData.intervals);\n }\n\n /**\n * Adds chapters to the player.\n *\n * @param {import('video.js/dist/types/player').default} player\n * @param {string} chapterUrn The URN of the main chapter.\n * @param {Array.} [chapters=[]]\n */\n static addChapters(player, chapterUrn, chapters = []) {\n const trackId = 'srgssr-chapters';\n const removeTrack = player.textTracks().getTrackById(trackId);\n\n if (removeTrack) {\n player.textTracks().removeTrack(removeTrack);\n }\n\n if (!Array.isArray(chapters) || !chapters.length) return;\n\n SrgSsr.createTextTrack(player, trackId).then(chapterTrack => {\n chapters.forEach(chapter => {\n if (chapterUrn !== chapter.fullLengthUrn) return;\n\n SrgSsr.addTextTrackCue(chapterTrack, chapter);\n });\n\n player.textTracks().addTrack(chapterTrack);\n });\n }\n\n /**\n * Adds intervals to the player.\n *\n * @param {import('video.js/dist/types/player').default} player\n * @param {Array.} [intervals=[]]\n */\n static addIntervals(player, intervals = []) {\n const trackId = 'srgssr-intervals';\n const removeTrack = player.textTracks().getTrackById(trackId);\n\n if (removeTrack) {\n player.textTracks().removeTrack(removeTrack);\n }\n\n if (!Array.isArray(intervals) || !intervals.length) return;\n\n SrgSsr.createTextTrack(player, trackId).then(intervalTrack => {\n intervals.forEach(interval => {\n SrgSsr.addTextTrackCue(intervalTrack, interval);\n });\n\n player.textTracks().addTrack(intervalTrack);\n });\n }\n\n /**\n * Set a blocking reason according to the block reason returned\n * by mediaData.\n *\n * @param {import('video.js/dist/types/player').default} player\n * @param {import('./typedef').ComposedSrcMediaData} srcMediaObj\n *\n * @returns {undefined|Boolean}\n */\n static blockingReason(player, srcMediaObj) {\n if (!srcMediaObj.mediaData.blockReason) return;\n\n const message = player.localize(srcMediaObj.mediaData.blockReason);\n\n SrgSsr.error(player, {\n code: MediaError.MEDIA_ERR_ABORTED,\n message,\n metadata: {\n errorType: srcMediaObj.mediaData.blockReason,\n src: srcMediaObj\n },\n });\n\n return true;\n }\n\n /**\n * Add the Akamai token to all resources\n * if at least one of them has tokenType\n * set to Akamai.\n *\n * @param {Array.} resources\n *\n * @returns {Promise>}\n */\n static async composeAkamaiResources(resources = []) {\n if (!AkamaiTokenService.hasToken(resources)) {\n return Promise.resolve(resources);\n }\n\n // TODO allow to modify the Akamai URL\n return AkamaiTokenService.tokenizeSources(resources);\n }\n\n /**\n * Add the keySystems property to all resources\n * if at least one of them has DRM.\n *\n * @param {Array.} resources\n *\n * @returns {Array.}\n */\n static composeKeySystemsResources(resources = []) {\n if (!Drm.hasDrm(resources)) ;\n\n return resources.map((resource) => ({\n ...resource,\n ...Drm.buildKeySystems(resource.drmList),\n }));\n }\n\n /**\n * Get the main resources from a mediaComposition.\n * May add an Akamai token or key systems if required by the resource.\n *\n * @param {MediaComposition} mediaComposition\n *\n * @returns {Promise>}\n */\n static composeMainResources(mediaComposition) {\n return SrgSsr.composeAkamaiResources(\n SrgSsr.composeKeySystemsResources(\n SrgSsr.filterIncompatibleResources(mediaComposition.getMainResources())\n )\n );\n }\n\n /**\n * Compose source options with media data.\n * MediaData properties from source options overwrite mediaData from IL.\n *\n * @param {any} srcObj\n * @param {any} srcObj.mediaData overrides or adds metadata to the composed mediaData.\n * @param {boolean} srcObj.disableTrackers\n * @param {import('./typedef').MainResourceWithKeySystems} resource\n *\n * @returns {import('./typedef').ComposedSrcMediaData}\n */\n static composeSrcMediaData(\n { mediaData: srcMediaData, disableTrackers },\n { url, mimeType, keySystems, ...mediaData }\n ) {\n return {\n src: url,\n type: mimeType,\n keySystems,\n disableTrackers,\n mediaData: pillarbox.obj.merge(mediaData, srcMediaData),\n };\n }\n\n /**\n * Create a new metadata text track.\n *\n * @param {import('video.js/dist/types/player').default} player\n * @param {String} trackId Text track unique ID\n *\n * @returns {Promise}\n */\n static createTextTrack(player, trackId) {\n // See https://github.com/videojs/video.js/issues/8519\n return new Promise((resolve) => {\n setTimeout(() => {\n resolve(new pillarbox.TextTrack({\n id: trackId,\n kind: 'metadata',\n label: trackId,\n tech: player.tech(true),\n }));\n }, 100);\n });\n }\n\n /**\n * Proxy SRG SSR chapters and intervals cuechange events at player level.\n *\n * @param {import('video.js/dist/types/player').default} player\n */\n static cuechangeEventProxy(player) {\n player.textTracks().on('addtrack', ({ track }) => {\n if (!['srgssr-chapters', 'srgssr-intervals'].includes(track.id)) return;\n\n track.on('cuechange', () => {\n const [cue] = Array.from(track.activeCues);\n const type = track.id.includes('srgssr-chapters') ? 'srgssr/chapter' : 'srgssr/interval';\n\n player.trigger({ type, data: cue });\n });\n });\n }\n\n /**\n * SRG SSR data provider singleton.\n *\n * @param {import('video.js/dist/types/player').default} player\n *\n * @returns {DataProvider}\n */\n static dataProvider(player) {\n if (!player.options().srgOptions.dataProvider) {\n const { dataProviderHost } = player.options().srgOptions;\n const dataProvider = new DataProvider(dataProviderHost);\n\n player.options({\n srgOptions: {\n dataProvider,\n },\n });\n }\n\n return player.options().srgOptions.dataProvider;\n }\n\n /**\n * Set an error if something goes wrong with the data provider.\n *\n * @param {import('video.js/dist/types/player').default} player\n * @param {Object} error\n *\n * @returns {undefined|true}\n */\n static dataProviderError(player, error) {\n const hasError =\n error.url && error.url.includes(SrgSsr.dataProvider(player).baseUrl);\n\n if (!hasError) return;\n\n SrgSsr.error(player, {\n code: 0,\n message: player.localize('UNKNOWN'),\n metadata: {\n errorType: 'UNKNOWN',\n urn: player.src(),\n status: error.status,\n statusText: error.statusText,\n url: error.url,\n },\n });\n\n return true;\n }\n\n /**\n * Set player error.\n *\n * @param {import('video.js/dist/types/player').default} player\n * @param {Object} error\n */\n static error(player, { code, message, metadata }) {\n player.error(null);\n\n player.error({\n code,\n message,\n metadata,\n });\n }\n\n /**\n * Filter out incompatible resources such as `RTMP` and `HDS`.\n *\n * @param {Array.} resources Resources to filter\n *\n * @returns {Array.} The filtered resources\n */\n static filterIncompatibleResources(resources = []) {\n return resources.filter(\n (resource) => !['RTMP', 'HDS'].includes(resource.streaming)\n );\n }\n\n /**\n * Get the current blocked segment from the player.\n *\n * @param {import('video.js/dist/types/player').default} player\n *\n * @returns {VTTCue|undefined} The blocked segment cue object, or undefined\n */\n static getBlockedSegment(player) {\n const trackId = 'srgssr-blocked-segments';\n const blockedSegmentsTrack = player.textTracks().getTrackById(trackId);\n\n if (!blockedSegmentsTrack) return;\n\n /** @type {VTTCue} */\n const [blockedCue] = Array.from(blockedSegmentsTrack.activeCues);\n\n return blockedCue;\n }\n\n /**\n * Get the VTT cue of a blocked segment.\n *\n * @param {import('video.js/dist/types/player').default} player\n * @param {Number} currentTime\n *\n * @returns {VTTCue|undefined} The VTT cue of a blocked segment, or undefined\n */\n static getBlockedSegmentByTime(player, currentTime) {\n const blockedSegment = SrgSsr.getBlockedSegment(player);\n\n if (!blockedSegment) return;\n\n const isBlocked = currentTime >= blockedSegment.startTime &&\n currentTime < blockedSegment.endTime;\n\n return isBlocked ? blockedSegment : undefined;\n }\n\n /**\n * Get mediaComposition from an URN.\n *\n * @param {String} urn\n * @param {DataProvider} dataProvider\n *\n * @returns {Promise<{mediaComposition: MediaComposition}>}\n */\n static async getMediaComposition(urn, dataProvider = new DataProvider()) {\n return dataProvider.getMediaCompositionByUrn(urn);\n }\n\n /**\n * Get the mediaData most likely to be compatible depending on the browser.\n *\n * @param {Array.} resources\n *\n * @returns {import('./typedef').MainResourceWithKeySystems} By default, the first entry is used if none is compatible.\n */\n static getMediaData(resources = []) {\n if (AkamaiTokenService.hasToken(resources)) return resources[0];\n\n const type = pillarbox.browser.IS_ANY_SAFARI ? 'HLS' : 'DASH';\n const resource = resources.find(({ streaming }) => streaming === type);\n\n return resource || resources[0];\n }\n\n /**\n * Get the source media object.\n *\n * @param {import('video.js/dist/types/player').default} player\n * @param {any} srcObj\n *\n * @returns {Promise} - The composed source media data.\n */\n static async getSrcMediaObj(player, srcObj) {\n const { src: urn, ...srcOptions } = srcObj;\n const { mediaComposition } = await SrgSsr.getMediaComposition(\n urn,\n SrgSsr.dataProvider(player)\n );\n const mainResources = await SrgSsr.composeMainResources(\n mediaComposition\n );\n const mediaData = SrgSsr.getMediaData(mainResources);\n\n return SrgSsr.composeSrcMediaData(srcOptions, mediaData);\n }\n\n /**\n * Handles the middleware's currentTime function.\n * - If the current time is between the start and end of a blocked segment,\n * the blocked portion will be skipped.\n *\n * _Note_: This function should disappear as soon as this behavior is\n * supported on the packaging side.\n *\n * @param {import('video.js/dist/types/player').default} player\n * @param {number} currentTime\n *\n * @returns {number}\n */\n static handleCurrentTime(player, currentTime) {\n const blockedSegment = SrgSsr\n .getBlockedSegmentByTime(player, currentTime);\n\n if (!blockedSegment || !Number.isFinite(blockedSegment.endTime)) {\n return currentTime;\n }\n\n // proxy for handling cuechange events at the player level\n player.trigger({ type: 'srgssr/blocked-segment', data: blockedSegment });\n player.currentTime(blockedSegment.endTime);\n\n return blockedSegment.endTime;\n }\n\n /**\n * Handles the middleware's setCurrentTime function.\n * - Modify the current time if the value is between the start and end of a\n * blocked segment.\n *\n * _Note_: This function should disappear as soon as this behavior is\n * supported on the packaging side.\n *\n * @param {import('video.js/dist/types/player').default} player\n * @param {number} currentTime\n *\n * @returns {number}\n */\n static handleSetCurrentTime(player, currentTime) {\n const { endTime: blockedSegmentEndTime } = SrgSsr\n .getBlockedSegmentByTime(player, currentTime) || {};\n\n return Number\n .isFinite(blockedSegmentEndTime) ? blockedSegmentEndTime : currentTime;\n }\n\n /**\n * Handles the middleware's setSource function.\n *\n * This function allows to:\n * - resolve a URN into media that can be played by the player\n * - initialize media playback tracking\n * - update the title bar\n * - handle blocking reasons\n * - add remote subtitles\n *\n * @param {import('video.js/dist/types/player').default} player\n * @param {any} srcObj\n * @param {function} next\n *\n * @returns {Promise}\n */\n static async handleSetSource(player, srcObj, next) {\n try {\n const srcMediaObj = await SrgSsr.getSrcMediaObj(player, srcObj);\n\n SrgSsr.srgAnalytics(player);\n SrgSsr.updateTitleBar(player, srcMediaObj);\n SrgSsr.updatePoster(player, srcMediaObj);\n\n if (SrgSsr.blockingReason(player, srcMediaObj)) return;\n\n SrgSsr.addTextTracks(player, srcMediaObj);\n\n return next(null, srcMediaObj);\n } catch (error) {\n if (SrgSsr.dataProviderError(player, error)) return;\n\n return next(error);\n }\n }\n\n /**\n * SRG SSR analytics singleton.\n *\n * @param {import('video.js/dist/types/player').default} player\n */\n static srgAnalytics(player) {\n if (player.options().trackers.srgAnalytics === false) return;\n\n if (!player.options().trackers.srgAnalytics) {\n const srgAnalytics = new SRGAnalytics(player, {\n debug: player.debug(),\n playerVersion: pillarbox.VERSION.pillarbox,\n tagCommanderScriptURL:\n player.options().srgOptions.tagCommanderScriptURL,\n });\n\n player.options({\n trackers: {\n srgAnalytics,\n },\n });\n }\n }\n\n /**\n * Update player's poster.\n *\n * @param {import('video.js/dist/types/player').default} player\n * @param {import('./typedef').ComposedSrcMediaData} srcMediaObj\n * @param {Image} imageService\n */\n static updatePoster(player, srcMediaObj, imageService = Image) {\n player.poster(\n imageService.scale({\n url: srcMediaObj.mediaData.imageUrl,\n })\n );\n }\n\n /**\n * Update player titleBar with title and description.\n *\n * @param {import('video.js/dist/types/player').default} player\n * @param {import('./typedef').ComposedSrcMediaData} srcMediaObj\n */\n static updateTitleBar(player, srcMediaObj) {\n if (!player.titleBar) return;\n\n player.titleBar.update({\n title: srcMediaObj.mediaData.vendor,\n description: srcMediaObj.mediaData.title,\n });\n }\n\n /**\n * Middleware to resolve SRG SSR URNs into playable media.\n *\n * @param {import('video.js/dist/types/player').default} player\n *\n * @returns {Object}\n */\n static middleware(player) {\n\n SrgSsr.cuechangeEventProxy(player);\n\n return {\n currentTime: (currentTime) =>\n SrgSsr.handleCurrentTime(player, currentTime),\n setCurrentTime: (currentTime) =>\n SrgSsr.handleSetCurrentTime(player, currentTime),\n setSource: async (srcObj, next) =>\n SrgSsr.handleSetSource(player, srcObj, next),\n };\n }\n}\n\npillarbox.use('srgssr/urn', SrgSsr.middleware);\n\n// Add Middleware specific options\npillarbox.options.srgOptions = {\n dataProviderHost: undefined,\n tagCommanderScriptURL: undefined,\n};\n\n/**\n * Ignored so that the link is resolved correctly in the API docs.\n * @ignore\n * @typedef {import('../dataProvider/model/MediaComposition.js').default} MediaComposition\n */\n\nexport { Player, SrgSsr, pillarbox as default };\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}export{i as Directive,t as PartType,e as directive};\n//# sourceMappingURL=directive.js.map\n","import{nothing as t,noChange as i}from\"../lit-html.js\";import{Directive as r,PartType as s,directive as n}from\"../directive.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class e extends r{constructor(i){if(super(i),this.it=t,i.type!==s.CHILD)throw Error(this.constructor.directiveName+\"() can only be used in child bindings\")}render(r){if(r===t||null==r)return this._t=void 0,this.it=r;if(r===i)return r;if(\"string\"!=typeof r)throw Error(this.constructor.directiveName+\"() called with a non-string value\");if(r===this.it)return this._t;this.it=r;const s=[r];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}}e.directiveName=\"unsafeHTML\",e.resultType=1;const o=n(e);export{e as UnsafeHTMLDirective,o as unsafeHTML};\n//# sourceMappingURL=unsafe-html.js.map\n","import router from './router';\nimport { html, LitElement } from 'lit';\nimport { animations, theme } from '../theme/theme';\n\nexport class RouteLinkCompenent extends LitElement {\n static properties = {\n href: { type: String },\n title: { type: String },\n selected: { type: Boolean, state: true }\n };\n\n static styles = [theme, animations];\n\n #updateSelected() {\n const url = new URL(`${window.location.origin}/${this.href}`);\n\n this.selected = router.isActiveRoute(url.pathname);\n }\n\n constructor() {\n super();\n\n router.addEventListener('routechanged', () => {\n this.#updateSelected();\n });\n }\n\n #onClick = (event) => {\n event.preventDefault();\n\n const url = new URL(`${window.location.origin}/${this.href}`);\n const queryParams = Object.fromEntries(url.searchParams.entries());\n\n router.navigateTo(url.pathname, queryParams);\n };\n\n connectedCallback() {\n super.connectedCallback();\n\n this.#updateSelected();\n this.addEventListener('click', this.#onClick);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener('click', this.#onClick);\n }\n\n render() {\n return html`\n \n \n \n `;\n }\n}\n\ncustomElements.define('route-link', RouteLinkCompenent);\n","export default \"\\n \\n\\n\"","export default \"__VITE_ASSET__B9u6$ZGB__\"","import{directive as s}from\"../directive.js\";import{UnsafeHTMLDirective as e}from\"./unsafe-html.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class t extends e{}t.directiveName=\"unsafeSVG\",t.resultType=2;const o=s(t);export{o as unsafeSVG};\n//# sourceMappingURL=unsafe-svg.js.map\n","import githubLogoSvg from '../../../img/github-logo.svg?raw';\nimport srgssrLogo from '../../../img/srgssr-logo.png';\nimport { html, LitElement, unsafeCSS } from 'lit';\nimport { unsafeSVG } from 'lit/directives/unsafe-svg.js';\nimport '../../router/route-link-component';\nimport { theme } from '../../theme/theme';\nimport coreHeaderCss from './core-demo-header-component.scss?inline';\n\n/**\n * A web component that represents the header element of the demo page. This element\n * contains only the branding and a link to the GitHub page, it can be extended\n * with a custom action.\n *\n * @element core-demo-header\n *\n * @slot actions - Allows for the insertion of custom content at the end of the header.\n *\n * @example\n * \n * \n * \n */\nexport class CoreDemoHeaderComponent extends LitElement {\n static styles = [theme, unsafeCSS(coreHeaderCss)];\n\n render() {\n return html`\n
\n

\n \n Pillarbox\n

\n \n
`;\n }\n}\n\ncustomElements.define('core-demo-header', CoreDemoHeaderComponent);\n"],"names":["t","e","s","o","n$2","r","n","i","S","c","h","a","l","p","d","u","f","y","b","_a","v","_","m","g","$","x","w","T","A","E","C","P","V","k","H","I","R","N","_b","M","L","Z","j","theme","unsafeCSS","themeCSS","animations","animationsCSS","balancedMatch","balanced","str","maybeMatch","range","reg","begs","beg","left","right","result","ai","bi","require$$0","braceExpansion","expandTop","escSlash","escOpen","escClose","escComma","escPeriod","numeric","escapeBraces","unescapeBraces","parseCommaParts","parts","pre","body","post","postParts","expand","embrace","isPadded","el","lte","gte","isTop","expansions","expansion","isNumericSequence","isAlphaSequence","isSequence","isOptions","width","incr","test","reverse","pad","need","z","MAX_PATTERN_LENGTH","assertValidPattern","pattern","posixClasses","braceEscape","regexpEscape","rangesToString","ranges","parseClass","glob","position","pos","negs","sawStart","uflag","escaping","negate","endPos","rangeStart","WHILE","cls","unip","neg","sranges","snegs","unescape","windowsPathsNoEscape","types","isExtglobType","startNoTraversal","startNoDot","addPatternStart","justDots","reSpecials","regExpEscape","qmark","star","starNoEmpty","_AST","type","parent","options","__privateAdd","_fillNegs","_partsToRegExp","__publicField","_root","_hasMagic","_uflag","_parts","_parent","_parentIndex","_negs","_filledNegs","_options","_toString","_emptyExt","__privateSet","__privateGet","ret","pp","_c","pl","part","ast","__privateMethod","_parseAST","parseAST_fn","re","hasMagic","flags","allowDot","dot","fillNegs_fn","noEmpty","src","_parseGlob","parseGlob_fn","start","aps","needNoTrav","needNoDot","end","repeated","partsToRegExp_fn","bodyDotAllowed","final","close","opt","inBrace","braceStart","braceNeg","acc","ext","needUflag","consumed","magic","AST","escape","define_process_env_default","Router","_handleRouteChange","_matchCurrentParams","_updateCurrentRoute","_defaultPath","_currentRoute","_currentQueryParams","_routes","entries","queryParams","handleRouteChange_fn","component","destroy","path","Minimatch","url","normalizedPath","keysToRemove","filteredParams","key","newParams","defaultPath","popstate","matchCurrentParams_fn","route","updateCurrentRoute_fn","params","paramsKeys","router","win","global","window_1","__viteBrowserExternal","topLevel","minDoc","doccy","document_1","keyCode","searchInput","hasKeyCode","names","search","foundNamedKey","codes","aliases","event","nameOrCode","exports","module","alias","tuple","SafeParseTuple","obj","reviver","json","error","err","_extends","target","source","isFunction_1","isFunction","toString","fn","string","window","httpResponseHandler","callback","decodeResponseBody","response","responseBody","cause","charset","getCharset","contentTypeHeader","contentType","_contentType$split","value","httpHandler","require$$1","require$$2","createXHR","require$$3","parseHeaders","headers","row","index","libModule","noop","forEachArray","method","uri","initParams","_createXHR","array","iterator","isEmpty","called","readystatechange","xhr","loadFunc","getBody","getXml","isJson","errorFunc","evt","timeoutTimer","failureResponse","aborted","status","sync","firefoxBugTakenEffect","document","_objCreate","F","ParsingError","errorData","message","parseTimeStamp","input","computeSeconds","Settings","dflt","defaultKey","parseOptions","keyValueDelim","groupDelim","groups","kv","parseCue","cue","regionList","oInput","consumeTimeStamp","ts","consumeCueSettings","settings","vals","vals0","skipWhitespace","TEXTAREA_ELEMENT","TAG_NAME","DEFAULT_COLOR_CLASS","TAG_ANNOTATION","NEEDS_PARENT","parseContent","nextToken","consume","shouldAdd","current","element","createElement","annotation","tagName","name","rootDiv","tagStack","node","classes","cl","bgColor","colorName","propName","propValue","strongRTLRanges","isStrongRTLChar","charCode","currentRange","determineBidi","cueDiv","nodeStack","text","pushNodes","nextTextNode","computeLinePos","track","trackList","count","StyleBox","styles","div","prop","val","unit","CueStyleBox","styleOptions","textPos","box","BoxPosition","lh","height","top","rects","axis","toMove","b2","boxes","container","intersectArea","reference","moveBoxToLinePosition","styleBox","containerBox","boxPositions","findBestPosition","bestPosition","specifiedPosition","percentage","boxPosition","linePos","size","step","maxPosition","initialAxis","calculatedPercentage","WebVTT","data","cuetext","FONT_SIZE_PERCENT","FONT_STYLE","CUE_BACKGROUND_PADDING","cues","overlay","paddedOverlay","shouldCompute","fontSize","vttjs","decoder","self","collectNextLine","buffer","line","parseRegion","xy","anchor","region","parseTimestampMap","parseHeader","alreadyCollectedLine","hasSubstring","vtt","autoKeyword","directionSetting","alignSetting","findDirectionSetting","dir","findAlignSetting","align","VTTCue","startTime","endTime","_id","_pauseOnExit","_startTime","_endTime","_text","_region","_vertical","_snapToLines","_line","_lineAlign","_position","_positionAlign","_size","_align","setting","vttcue","scrollSetting","findScrollSetting","scroll","isValidPercentValue","VTTRegion","_width","_lines","_regionAnchorX","_regionAnchorY","_viewportAnchorX","_viewportAnchorY","_scroll","vttregion","browserIndexModule","cueShim","regionShim","nativeVTTCue","nativeVTTRegion","root","URL_REGEX","FIRST_SEGMENT_REGEX","SLASH_DOT_REGEX","SLASH_DOT_DOT_REGEX","URLToolkit","baseURL","relativeURL","opts","basePartsForNormalise","relativeParts","baseParts","pathParts","builtParts","baseURLPath","newPath","DEFAULT_LOCATION","resolveUrl","baseUrl","relativeUrl","nativeURL","protocolLess","removeLocation","newUrl","Stream","_proto","listener","callbacks","length","args","_length","_i","destination","atob","decodeB64ToUint8Array","b64Text","decodedString","LineStream","nextNewline","TAB","parseByterange","byterangeString","match","attributeSeparator","keyvalue","parseAttributes","attributes","attrs","attr","ParseStream","mapper","mappedLine","newLine","split","resolution","subkey","clientAttributePattern","isHexaDecimal","isDecimalFloating","expression","customType","dataParser","segment","map","mapFn","camelCase","camelCaseKeys","setHoldBack","manifest","serverControl","targetDuration","partTargetDuration","tag","hb","phb","minTargetDuration","minPartDuration","Parser","uris","currentUri","currentMap","hasParts","defaultMediaGroups","widevineUuid","currentTimeline","lastByterangeEnd","lastPartByterangeEnd","dateRangeTags","entry","mediaGroup","rendition","byterange","mediaGroupType","lastProgramDateTime","programDateTime","segmentIndex","partIndex","hint","isPart","otherHint","report","required","dateRange","endOnNextYes","newDateInSeconds","attribute","dateRangeWithSameId","dateRangeToFind","identifier","missing","chunk","regexs","mediaTypes","upperMediaTypes","translateLegacyCodec","codec","orig","profile","avcLevel","profileHex","avcLevelHex","parseCodecs","codecString","codecs","codecType","details","codecsFromDefault","master","audioGroupId","audioGroup","audioType","isAudioCodec","isTextCodec","getMimeForCodec","browserSupportsCodec","muxerSupportsCodec","DEFAULT_AUDIO_CODEC","DEFAULT_VIDEO_CODEC","MPEGURL_REGEX","DASH_REGEX","simpleTypeFromSourceType","countBits","countBytes","isArrayBufferView","isTypedArray","toUint8","bytes","BigInt","BYTE_TABLE","bytesToNumber","_temp","_ref","_ref$signed","signed","_ref$le","le","number","total","byte","exponent","max","numberToBytes","_temp2","_ref2","_ref2$le","byteCount","byteIndex","stringToBytes","stringIsBytes","view","concatTypedArrays","_len","buffers","_key","totalLen","buf","tempBuffer","offset","bytesMatch","_temp3","_ref3","_ref3$offset","_ref3$mask","mask","bByte","aByte","forEachMediaGroup","mediaType","groupKey","labelKey","mediaProperties","find","list","predicate","ac","item","freeze","object","oc","assign","MIME_TYPE","NAMESPACE","conventions","notEmptyString","splitOnASCIIWhitespace","orderedSetReducer","toOrderedSet","arrayIncludes","copy","dest","Class","Super","pt","NodeType","ELEMENT_NODE","ATTRIBUTE_NODE","TEXT_NODE","CDATA_SECTION_NODE","ENTITY_REFERENCE_NODE","ENTITY_NODE","PROCESSING_INSTRUCTION_NODE","COMMENT_NODE","DOCUMENT_NODE","DOCUMENT_TYPE_NODE","DOCUMENT_FRAGMENT_NODE","NOTATION_NODE","ExceptionCode","ExceptionMessage","HIERARCHY_REQUEST_ERR","NOT_FOUND_ERR","INUSE_ATTRIBUTE_ERR","DOMException","code","NodeList","isHTML","nodeFilter","serializeToString","LiveNodeList","refresh","_updateLiveList","inc","ls","__set__","NamedNodeMap","_findNodeIndex","_addNamedNode","newAttr","oldAttr","doc","_onRemoveAttribute","_onAddAttribute","_removeNamedNode","lastIndex","namespaceURI","localName","DOMImplementation","feature","version","qualifiedName","doctype","Document","publicId","systemId","DocumentType","Node","newChild","refChild","_insertBefore","oldChild","assertPreReplacementValidityInDocument","_removeChild","deep","cloneNode","child","next","prefix","_xmlEncoder","_visitNode","ns","remove","_onUpdateChild","cs","parentNode","previous","hasValidParentNodeType","hasInsertableNodeType","isElementNode","isTextNode","isDocTypeNode","isElementInsertionPossible","parentChildNodes","docTypeNode","isElementReplacementPossible","hasElementChildThatIsNotChild","assertPreInsertionValidity1to5","assertPreInsertionValidityInDocument","nodeChildNodes","nodeChildElements","parentElementChild","_inDocumentAssertion","cp","newFirst","newLast","_appendSingleChild","importedNode","importNode","id","rtv","classNames","classNamesSet","base","nodeClassNames","matches","nodeClassNamesSet","Element","DocumentFragment","Text","Comment","CDATASection","ProcessingInstruction","Attr","EntityReference","old","CharacterData","newText","newNode","Notation","Entity","XMLSerializer","isHtml","nodeSerializeToString","refNode","visibleNamespaces","needNamespaceDefine","addSerializedAttribute","len","nodeName","prefixedNodeName","defaultNS","nsi","namespace","pubid","sysid","sub","node2","attrs2","getTextContent","dom","nameStartChar","nameChar","tagNamePattern","S_TAG","S_ATTR","S_ATTR_SPACE","S_EQ","S_ATTR_NOQUOT_VALUE","S_ATTR_END","S_TAG_SPACE","S_TAG_CLOSE","ParseError","locator","XMLReader","defaultNSMap","entityMap","domBuilder","_copy","parse","defaultNSMapCopy","errorHandler","fixedFromCharCode","surrogate1","surrogate2","entityReplacer","appendText","xt","lineEnd","linePattern","lineStart","parseStack","closeMap","tagStart","config","localNSMap","endMatch","endIgnoreCaseMach","parseInstruction","parseDCC","ElementAttributes","currentNSMap","parseElementStartPart","fixSelfClosed","locator2","copyLocator","appendElement","parseHtmlSpecialContent","addAttribute","qname","startIndex","attrName","qName","nsp","nsPrefix","elStartEnd","elEndStart","matchs","lastMatch","sax","entities","normalizeLineEndings","DOMParser","mimeType","DOMHandler","buildErrorHandler","normalize","errorImpl","isCallback","build","msg","_locator","ins","ch","chars","charNode","comm","impl","dt","hander","domParser","isObject","merge","objects","values","flatten","lists","from","findIndexes","union","keyFunction","errors","urlTypeToSegment","indexRange","startRange","endRange","byteRangeToString","parseEndNumber","endNumber","segmentRange","duration","timescale","sourceDuration","periodDuration","segmentDuration","NOW","clientOffset","availabilityStartTime","periodStart","minimumUpdatePeriod","timeShiftBufferDepth","now","periodStartWC","segmentCount","availableStart","availableEnd","toSegments","startNumber","parseByDuration","segments","sectionDuration","segmentsFromBase","initialization","presentationTime","initSegment","segmentTimeInfo","addSidxSegmentsToPlaylist$1","playlist","sidx","timeline","sidxByteRange","sidxEnd","mediaReferences","endIndex","SUPPORTED_MEDIA_TYPES","TIME_FUDGE","getUniqueTimelineStarts","timelineStarts","findPlaylistWithName","playlists","getMediaGroupPlaylists","mediaGroupPlaylists","properties","group","label","updateMediaSequenceForPlaylist","mediaSequence","updateSequenceNumbers","oldPlaylists","newPlaylists","oldPlaylist","firstNewSegment","oldMatchingSegmentIndex","oldSegment","positionManifestOnTimeline","oldManifest","newManifest","generateSidxKey","mergeDiscontiguousPlaylists","playlistsByBaseUrl","cur","allPlaylists","playlistGroup","mergedPlaylists","addSidxSegmentsToPlaylist","sidxMapping","sidxKey","sidxMatch","addSidxSegmentsToPlaylists","formatAudioPlaylist","discontinuitySequence","discontinuityStarts","isAudioOnly","formatVttPlaylist","m3u8Attributes","vttPlaylist","organizeAudioPlaylists","mainPlaylist","formattedPlaylists","role","language","roleLabel","formatted","firstLabel","organizeVttPlaylists","organizeCaptionServices","captionServices","svcObj","svc","service","channel","formatVideoPlaylist","videoOnly","audioOnly","vttOnly","addMediaSequenceValues","flattenMediaGroupPlaylists","mediaGroupObject","labelContents","toM3u8","dashPlaylists","locations","contentSteering","previousManifest","eventStream","suggestedPresentationDelay","videoPlaylists","audioPlaylists","vttPlaylists","captions","organizedAudioGroup","organizedVttGroup","playlistTimelineStarts","getLiveRValue","time","parseByTimeline","segmentTimeline","media","sIndex","repeat","segmentTime","nextS","identifierPattern","identifierReplacement","format","constructTemplateUrl","parseTemplateInfo","segmentsFromTemplate","templateValues","mapSegment","presentationTimeOffset","SegmentURLToSegmentObject","segmentUrl","segmentsFromList","segmentUrls","segmentUrlMap","segmentUrlObject","generateSegments","segmentInfo","segmentAttributes","segmentsFn","segmentsInfo","toPlaylists","representations","findChildren","getContent","parseDivisionValue","prev","parseDuration","year","month","day","hour","minute","second","parseDate","parsers","parsedValue","parseFn","keySystemsMap","buildBaseUrls","references","baseUrlElements","baseUrlElement","initialBaseUrl","resolvedBaseUrl","finalBaseUrl","getSegmentInformation","adaptationSet","segmentTemplate","segmentList","segmentBase","segmentTimelineParentNode","segmentInitializationParentNode","segmentInitialization","template","inheritBaseUrls","adaptationSetAttributes","adaptationSetBaseUrls","adaptationSetSegmentInfo","representation","repBaseUrlElements","repBaseUrls","representationSegmentInfo","generateKeySystemInformation","contentProtectionNodes","keySystem","psshNode","pssh","parseCaptionServiceMetadata","toEventStream","period","eventStreamAttributes","schemeIdUri","eventAttributes","toRepresentations","periodAttributes","periodBaseUrls","periodSegmentInfo","roleAttributes","accessibility","labelVal","contentProtection","toAdaptationSets","mpdAttributes","mpdBaseUrls","adaptationSets","generateContentSteeringInformation","contentSteeringNodes","eventHandler","infoFromContentSteeringTag","getPeriodStart","priorPeriodAttributes","mpdType","inheritAttributes","mpd","manifestUri","periodNodes","periods","priorPeriod","stringToMpdXml","manifestString","parser","xml","parseUTCTimingScheme","UTCTimingNode","parsedManifestInfo","parseUTCTiming","MAX_UINT32","getUint64","uint8","dv","numbers","parseSidx","referenceCount","parseSidx_1","ID3","getId3Size","returnSize","footerPresent","getId3Offset","normalizePath","normalizePaths","paths","findBox","complete","results","EBML_TAGS","LENGTH_TABLE","getLength","getvint","removeLength","valueBytes","getInfinityDataSize","innerid","dataHeader","findEbml","dataStart","dataEnd","totalLength","NAL_TYPE_ONE","NAL_TYPE_TWO","EMULATION_PREVENTION","discardEmulationPreventionBytes","positions","newLength","newData","sourceIndex","findNal","dataType","nalLimit","nalStart","nalsFound","nalOffset","nalType","findH264Nal","findH265Nal","CONSTANTS","_isLikely","docType","isLikelyTypes","isLikelyFn","isLikely","detectContainerForBytes","isLikelyFmp4MediaSegment","ONE_SECOND_IN_TS","secondsToVideoTs","secondsToAudioTs","videoTsToSeconds","audioTsToSeconds","audioTsToVideoTs","videoTsToAudioTs","metadataTsToSeconds","seconds","sampleRate","timestamp","timelineStartPts","keepOriginalTimestamps","clock","version$6","hooks_","hooks","hook","removeHook","hookOnce","original","wrapper","FullscreenApi","apiMap","specApi","browserApi","history","LogByTypeFactory","log","level","lvl","lvlRegExp","resultName","splice","window$1","createLogger$1","delimiter","logByType","subName","subDelimiter","subStyles","resultDelimiter","resultStyles","newName","newDelimiter","newStyles","fname","historyItem","log$1","createLogger","keys","each","reduce","initial","accum","isPlain","merge$1","sources","defineLazyProperty","getValue","setter","set","Obj","IS_IPOD","IOS_VERSION","IS_ANDROID","ANDROID_VERSION","IS_FIREFOX","IS_EDGE","IS_CHROMIUM","IS_CHROME","CHROMIUM_VERSION","CHROME_VERSION","IE_VERSION","IS_SAFARI","IS_WINDOWS","IS_IPAD","IS_IPHONE","IS_TIZEN","IS_WEBOS","TOUCH_ENABLED","isReal","UAD","USER_AGENT","major","minor","IS_IOS","IS_ANY_SAFARI","browser","isNonBlankString","throwIfWhitespace","isEl","isInFrame","createQuerier","selector","context","ctx","createEl","content","textContent","appendContent","prependTo","hasClass","classToCheck","addClass","classesToAdd","removeClass","classesToRemove","toggleClass","classToToggle","className","setAttributes","attrValue","getAttributes","knownBooleans","attrVal","getAttribute","setAttribute","removeAttribute","blockTextSelection","unblockTextSelection","getBoundingClientRect","rect","computedStyle","findPosition","getPointerPosition","translated","transform","boxTarget","boxW","boxH","offsetY","offsetX","emptyEl","normalizeContent","insertContent","isSingleLeftClick","$$","computedStyleValue","copyStyleSheetsToWindow","styleSheet","cssRules","rule","style","link","Dom","_windowLoaded","videojs$1","autoSetup","vids","audios","divs","mediaEls","mediaEl","autoSetupTimeout","wait","vjs","setWindowLoaded","createStyleElement","setTextContent","DomData","_initialGuid","_guid","newGUID","_cleanUpEvents","elem","_handleMultipleEvents","fixEvent","returnTrue","returnFalse","_supportsPassive","supportsPassive","passiveEvents","on","hash","handlers","handlersCopy","off","removeType","trigger","elemData","targetData","one","func","any","Events","UPDATE_REFRESH_INTERVAL","bind_","uid","bound","throttle","last","debounce","immediate","timeout","cancel","debounced","later","Fn","EVENT_MAP","EventTarget$2","ael","oldTimeout","objName","isEvented","addEventedCallback","isValidEventType","validateTarget","fnName","validateEventType","validateListener","normalizeListenArgs","isTargetingSelf","listen","EventedMixin","removeListenerOnDispose","removeRemoverOnTargetDispose","largs","targetOrType","typeOrListener","evented","eventBusKey","StatefulMixin","stateUpdates","changes","stateful","defaultState","toLowerCase","toTitleCase$1","titleCaseEquals","str1","str2","Str","Component$1","player","ready","tokens","defaultValue","languages","primaryCode","primaryLang","localizedString","currentChild","iconName","xmlnsURL","iconContainer","svgEl","useEl","componentName","componentClassName","ComponentClass","childFound","compEl","children","parentOptions","handleAdd","workingChildren","Tech","wchild","readyQueue","num","skipListeners","widthOrHeight","pxIndex","computedWidthOrHeight","keycode","touchStart","firstTouch","tapMovementThreshold","touchTimeThreshold","couldBeTap","xdiff","ydiff","noTap","touchHolding","touchEnd","timeoutId","interval","intervalId","idName","cancelName","ComponentToRegister","isTech","isComp","reason","Player","players","playerNames","pname","rangeCheck","maxIndex","getRange","valueIndex","rangeIndex","createTimeRangesObj","timeRangesObj","createTimeRanges$1","defaultImplementation","guide","gm","gh","implementation","setFormatTime","customImplementation","resetFormatTime","formatTime","Time","bufferedPercent","buffered","bufferedDuration","MediaError","isPromise","silencePromise","trackToJson_","textTracksToJson","tech","trackEls","trackObjs","trackEl","jsonToTextTracks","addedTrack","textTrackConverter","MODAL_CLASS_NAME","ModalDialog","desc","closeable","temp","contentEl","parentEl","nextSiblingEl","closeButton","activeEl","playerEl","focusableEls","focusIndex","allChildren","TrackList","tracks","rtrack","disableOthers$1","AudioTrackList","disableOthers","VideoTrackList","TextTrackList","HtmlTrackElementList","trackElements","trackElement","trackElement_","TextTrackCueList","oldLength","defineProp","VideoTrackKind","AudioTrackKind","TextTrackKind","TextTrackMode","Track","trackProps","newLabel","parseUrl","props","getAbsoluteURL","getFileExtension","isCrossOrigin","winLoc","urlInfo","Url","parseCues","srcContent","loadTrack","crossOrigin","withCredentials","XHR","TextTrack","mode","default_","activeCues","changed","disposeHandler","newMode","ct","active","originalCue","removeCue","AudioTrack","enabled","newEnabled","VideoTrack","selected","newSelected","HTMLTrackElement","readyState","NORMAL","REMOTE","ALL","createTrackHelper","kind","numBufferedPercent","_isScrubbing","_seconds","trackListChanges","script","remoteTracks","handleAddTrack","handleRemoveTrack","updateDisplay","textTracksChanges","manualCleanup","htmlTrackElement","cb","override","_type","srcObj","_Tech","handler","can","sh","originalFn","middlewares","middlewareInstances","TERMINATOR","use","middleware","setSource","setSourceHelper","setTech","mw","get","middlewareIterator","arg","mediate","callMethod","middlewareValue","terminated","returnValue","executeRight","allowedGetters","allowedSetters","allowedMediators","mws","clearCacheForPlayer","getOrCreateFactory","mwFactory","mwf","mwi","lastRun","mwrest","_src","MimetypesKind","getMimetype","findMimetype","matchingSources","filterSource","newsrc","srcobj","fixSource","mimetype","icons","MediaLoader","options_","techName","ClickableComponent","localizedText","PosterImage","darkGray","lightGray","fontMap","constructColor","color","opacity","hex","tryUpdateStyle","getCSSPositionValue","TextTrackDisplay","updateDisplayTextHandler","updateDisplayHandler","screenOrientation","changeOrientationEvent","modes","userPref","firstDesc","firstCaptions","preferredTrack","allowMultipleShowingTracks","showingTracks","descriptionsTrack","captionsSubtitlesTrack","playerWidth","playerHeight","playerAspectRatio","videoAspectRatio","insetInlineMatch","insetBlockMatch","overrides","cueEl","LoadingSpinner","isAudio","playerType","controlText","Button","BigPlayButton","playPromise","playToggle","playFocus","CloseButton","PlayToggle","TimeDisplay","span","oldNode","CurrentTimeDisplay","DurationDisplay","updateContent","TimeDivider","RemainingTimeDisplay","LiveDisplay","SeekToLive","clamp","min","Num","Slider","progress","sizeKey","bool","percentify","LoadProgressBar","loadedText","separator","liveTracker","bufferedEnd","percent","TimeTooltip","seekBarRect","seekBarPoint","tooltipRect","playerRect","seekBarPointPx","spaceLeftOfPoint","spaceRightOfPoint","pullTooltipBy","liveWindow","secondsBehind","PlayProgressBar","timeTooltip","MouseTimeDisplay","STEP_SECONDS","PAGE_KEY_MULTIPLIER","SeekBar","currentTime","mouseDown","newTime","distance","seekableStart","seekableEnd","mouseTimeDisplay","gotoFraction","ProgressControl","seekBar","playProgressBar","seekBarEl","PictureInPictureToggle","FullscreenToggle","checkVolumeSupport","VolumeLevel","VolumeLevelTooltip","rangeBarRect","rangeBarPoint","vertical","volumeBarPointPx","volume","MouseVolumeLevelDisplay","VolumeBar","mouseVolumeLevelDisplay","volumeBarEl","volumeBarRect","volumeBarPoint","ariaValue","volumeBeforeDrag","VolumeControl","orientationClass","checkMuteSupport","MuteToggle","vol","lastVolume","volumeToSet","VolumePanel","SkipForward","playerOptions","currentVideoTime","SkipBackward","Menu","childComponent","contentElType","relatedTarget","btn","childComponents","foundComponent","stepChild","MenuButton","buttonClass","handleClick","menu","titleEl","titleComponent","menuButtonClass","TrackButton","updateHandler","MenuKeys","MenuItem","menuItemEl","TextTrackMenuItem","changeHandler","selectedLanguageChangeHandler","referenceTrack","shouldBeSelected","selectedLanguage","OffTextTrackMenuItem","allHidden","TextTrackButton","items","TrackMenuItem","ChaptersTrackMenuItem","ChaptersButton","remoteTextTrackEl","mi","DescriptionsButton","disabled","SubtitlesButton","CaptionSettingsMenuItem","CaptionsButton","SubsCapsMenuItem","parentSpan","SubsCapsButton","AudioTrackMenuItem","AudioTrackButton","PlaybackRateMenuItem","rate","PlaybackRateMenuButton","rates","Spacer","CustomControlSpacer","ControlBar","ErrorDisplay","LOCAL_STORAGE_KEY$1","COLOR_BLACK","COLOR_BLUE","COLOR_CYAN","COLOR_GREEN","COLOR_MAGENTA","COLOR_RED","COLOR_WHITE","COLOR_YELLOW","OPACITY_OPAQUE","OPACITY_SEMI","OPACITY_TRANS","selectConfigs","parseOptionValue","getSelectedOptionValue","setSelectedOption","TextTrackSettings","legendId","selectLabelledbyIds","guid","optionId","defaultsDescription","ttDisplay","subsCapsBtn","ccBtn","ResizeManager","RESIZE_OBSERVER_AVAILABLE","debouncedHandler_","unloadListener_","defaults","LiveTracker","seekable","deltaTime","liveCurrentTime","isBehind","timeDiff","seekableEnds","seekableStarts","TitleBar","techEl","techAriaAttrs","techAriaAttr","sourcesetLoad","srcUrls","innerHTMLDescriptorPolyfill","dummy","docFrag","getDescriptor","priority","descriptor","getInnerHTMLDescriptor","firstSourceWatch","innerDescriptor","appendWrapper","appendFn","retval","srcDescriptorPolyfill","getSrcDescriptor","setupSourceset","srcDescriptor","oldSetAttribute","oldLoad","Html5","crossoriginTracks","nodes","nodesLength","removeNodes","textTracks","metadataTracksPreFullscreenState","takeMetadataTrackSnapshot","restoreTrackMode","storedTrack","lowerCaseType","eventName","elTracks","techTracks","listeners","removeOldTracks","removeTracks","found","clone","tagAttributes","settingsAttrs","loadstartFired","setLoadstartFired","triggerLoadstart","eventsToTrigger","isScrubbing","checkProgress","endFn","beginFn","video","videoPlaybackQuality","canControl","muted","playbackRate","TECH_EVENTS_RETRIGGER","TECH_EVENTS_QUEUE","BREAKPOINT_ORDER","BREAKPOINT_CLASSES","DEFAULT_BREAKPOINTS","closest","languagesToLower","playerOptionsCopy","parsedSVG","sprite","majorVersion","playerElIngest","divEmbed","defaultsStyleEl","head","links","linkEl","dimension","privDimension","parsedVal","ratio","aspectRatio","idClass","ratioParts","ratioMultiplier","titleTechName","camelTechName","autoplay","techOptions","TechClass","eventObj","safety","resolveMuted","previouslyMuted","restoreMuted","mutedPromise","promise","sourceElSources","sourceEls","matchingSourceEls","sourceObj","updateSourceCaches","playerSrc","eventSrc","techSrc","request","queued","timeWhenWaiting","timeUpdateListener","targetPlayer","isFs","resolve","isSrcReady","isSafariOrIOS","queue","q","percentAsDecimal","defaultMuted","isFS","oldValue","fullscreenOptions","reject","offHandler","fsOptions","isPiP","pipContainer","pipWindow","pipVideo","userActions","allowedInputTypes","hotkeys","fullscreenKey","keydownEvent","muteKey","playPauseKey","FSToggle","techs","findFirstPassingTechSourcePair","outerArray","innerArray","tester","outerChoice","innerChoice","foundSourceAndTech","flip","finder","isRetry","middlewareSource","retry","stopListeningForErrors","sourceTech","currentTimeDisplay","durationDisplay","progressControl","remainingTimeDisplay","techAutoplay","newPoster","hookFunction","newErr","triggerSuppressedError","mouseInProgress","lastMoveX","lastMoveY","handleActivity","handleMouseMove","handleMouseDown","handleMouseUpAndMouseLeave","controlBar","inactivityTimeout","activityCheck","playerChildren","controlBarHeight","exitPromises","modal","currentBreakpoint","currentWidth","candidateBreakpoint","maxWidth","breakpoints","artist","artwork","description","poster","title","tt","baseOptions","tagOptions","dataSetup","safeParseTuple","childName","newRates","navigator","BASE_PLUGIN_NAME","PLUGIN_CACHE_KEY","pluginStorage","pluginExists","getPlugin","markPluginAsActive","triggerSetupEvent","before","createBasicPlugin","plugin","basicPluginWrapper","instance","createPluginFactory","PluginSubClass","Plugin","deprecate","warned","deprecateForMajor","oldName","VjsErrors","normalizeId","videojs","rootNode","PlayerComponent","nId","playerId","comp","QualityLevel","enable","QualityLevelList","qualityLevel","removed","version$5","initPlugin$1","originalPluginFn","qualityLevelList","qualityLevels","_resolveUrl","resolveManifestRedirect","req","logger","createTimeRanges","TIME_FUDGE_FACTOR","SAFE_TIME_DELTA","filterRanges","timeRanges","findRange","findNextRange","findGaps","bufferIntersection","bufferA","bufferB","arity","extents","printableRange","strArr","timeUntilRebuffer","timeRangesToArray","timeRangesList","isRangeDifferent","lastBufferedEnd","timeAheadOf","segmentDurationWithParts","getPartsAndSegments","si","pi","getLastParts","lastSegment","getKnownPartCount","preloadSegment","preloadHints","partCount","liveEdgeDelay","main","backwardDuration","endSequence","forwardDuration","intervalDuration","expired","backward","forward","sumDurations","defaultDuration","durationList","durations","playlistEnd","useSafeLiveEnd","liveEdgePadding","lastSegmentEndTime","getMediaInfoForTime","startingSegmentIndex","startingPartIndex","exactManifestTimings","partsAndSegments","partAndSegment","canUseFudgeFactor","isExactlyAtTheEnd","isExtremelyCloseToTheEnd","isExcluded","isIncompatible","isEnabled","excluded","isDisabled","isAes","hasAttribute","estimateSegmentRequestTime","bandwidth","bytesReceived","isLowestEnabledRendition","currentBandwidth","playlistMatch","someAudioVariant","AUDIO","groupName","variant","CODECS","Playlist","createPlaylistID","groupID","parseManifest","onwarn","oninfo","customTagParsers","customTagMappers","llhls","customParser","setupMediaPlaylist","setupMediaPlaylists","resolveMediaGroupUris","mainForMedia","addPropertiesToMain","createGroupID","phonyUri","audioOnlyMain","groupId","DateRangesStorage","firstSegment","dateRanges","pendingDateRange","dateRangeClasses","dateRangesToProcess","classList","EventTarget$1","addLLHLSQueryDirectives","parameters","nextMSN","nextPart","parsedUri","updateSegment","updateSegments","update","oldSegments","newSegments","newIndex","newSegment","resolveSegmentUris","baseUri","getAllSegments","isPlaylistUnchanged","updateMain$1","newMedia","unchangedCheck","oldMedia","mergedPlaylist","refreshDelay","lastPart","lastDuration","PlaylistLoader","vhs","vhsOptions","mediaPlaylist","availableDateRanges","startingState","playlistString","playlistObject","oldRequest","shouldDelay","delay","mediaChange","mainPlaylistRef","isUpdate","pathway","oldPlaylistUri","oldPlaylistId","newPlaylistUri","newPlaylistId","updatedPlaylist","oldMediaPlaylist","basePlaylist","playlistId","baseID","newUri","newPlaylistID","newMediaPlaylist","newProps","baseURI","oldAttributes","keyIds","keysystem","keyId","callbackWrapper","reqResponse","callAllRequestHooks","requestSet","newOptions","requestCallback","callAllResponseHooks","responseSet","responseCallback","xhrFactory","XhrFunction","beforeRequest","_requestCallbackSet","_responseCallbackSet","xhrMethod","beforeRequestOptions","originalAbort","byterangeStr","byterangeEnd","byterangeStart","segmentXhrHeaders","textRange","formatHexString","formatAsciiString","createTransferableMessage","transferable","initSegmentId","segmentKeyId","hexDump","ascii","tagDump","textRanges","utils","SEGMENT_END_FUDGE_PERCENT","playerTimeToProgramTime","playerTime","transmuxerPrependedSeconds","startOfSegment","offsetFromSegmentStart","originalSegmentVideoDuration","videoTimingInfo","findSegmentForProgramTime","programTime","dateTimeObject","nextSegmentStart","lastSegmentStart","lastSegmentDuration","lastSegmentEnd","findSegmentForPlayerTime","segmentEnd","getOffsetFromTimestamp","comparisonTimeStamp","segmentDateTime","segmentTimeEpoch","verifyProgramDateTimeTags","getProgramTime","matchedSegment","programTimeObject","seekToProgramTime","retryCount","seekTo","pauseAfterSeek","mediaOffset","seekToTime","seekedCallback","callbackOnCompleted","containerRequest","id3Offset","finished","endRequestAndCallback","_bytes","progressListener","newPart","loaded","EventTarget","dashPlaylistUnchanged","aSegment","bSegment","aByterange","bByterange","dashGroupId","parseMainXml","mainXml","srcUrl","removeOldMediaGroupLabels","newMain","updateMain","oldMain","noChanges","playlistUpdate","equivalentSidx","compareSidxEntry","oldSidxMapping","newSidxMapping","currentSidxInfo","savedSidxInfo","filterChangedSidxMappings","mediaGroupSidx","DashPlaylistLoader","srcUrlOrPlaylist","mainPlaylistLoader","fin","sidxContainer","sidxChanged","isFinalRendition","mainChanged","done","utcTiming","serverTime","location","mpl","mup","mediaID","mediaChanged","createMediaUpdateTimeout","metadataArray","eventStreamNode","defaultKID","Config","stringToArrayBuffer","browserWorkerPolyFill","workerObj","createObjectURL","blob","factory","objectUrl","worker","terminate","getWorkerString","workerCode$1","commonjsGlobal","Stream$8","flushSource","stream","MAX_UINT32$1","getUint64$3","dinf","esds","ftyp","mdat","mfhd","minf","moof","moov","mvex","mvhd","trak","tkhd","mdia","mdhd","hdlr","sdtp","stbl","stsd","traf","trex","trun$1","MAJOR_BRAND","MINOR_VERSION","AVC1_BRAND","VIDEO_HDLR","AUDIO_HDLR","HDLR_TYPES","VMHD","SMHD","DREF","STCO","STSC","STSZ","STTS","payload","sequenceNumber","trackFragments","samples","videoSample","audioSample","sps","pps","sequenceParameterSets","pictureParameterSets","avc1Box","hSpacing","vSpacing","trackFragmentHeader","trackFragmentDecodeTime","trackFragmentRun","sampleDependencyTable","dataOffset","upperWordBaseMediaDecodeTime","lowerWordBaseMediaDecodeTime","audioTrun","videoTrun","trunHeader","durationPresent","sizePresent","flagsPresent","compositionTimeOffset","bytesOffest","header","sample","mp4Generator","fileType","movie","groupNalsIntoFrames","nalUnits","currentNal","currentFrame","frames","groupFramesIntoGops","currentGop","gops","extendFirstKeyFrame","createDefaultSample","sampleForFrame","frame","generateSampleTable$1","baseDataOffset","concatenateNalData","nalsByteLength","numberOfNals","totalByteLength","generateSampleTableForFrame","concatenateNalDataForFrame","frameUtils$1","highPrefix","lowPrefix","zeroFill","makeTable","metaTable","arr","silence","silence_1","coneOfSilence","ONE_SECOND_IN_TS$4","clock$2","clock$1","sumFrameByteLengths","currentObj","sum","prefixWithSilence","audioAppendStartTs","videoBaseMediaDecodeTime","baseMediaDecodeTimeTs","frameDuration","audioGapDuration","audioFillFrameCount","audioFillDuration","silentFrame","firstFrame","trimAdtsFramesByEarliestDts","adtsFrames","earliestAllowedDts","generateSampleTable","concatenateFrameData","audioFrameUtils$1","ONE_SECOND_IN_TS$3","collectDtsInfo","clearDtsInfo","calculateTrackBaseMediaDecodeTime","baseMediaDecodeTime","scale","minSegmentDts","trackDecodeInfo$1","USER_DATA_REGISTERED_ITU_T_T35","RBSP_TRAILING_BITS","parseSei","payloadType","payloadSize","userIdentifier","parseUserData","sei","parseCaptionPackets","pts","userData","discardEmulationPreventionBytes$1","emulationPreventionBytesPositions","captionPacketParser","Stream$7","cea708Parser","CaptionStream$2","Cea608Stream","Cea708Stream","cc","newCaptionPackets","flushType","idx","packet","ccStream","CHARACTER_TRANSLATION_708","get708CharFromCode","newCode","within708TextBlock","Cea708Window","windowNum","Cea708Service","serviceNum","encoding","beforeRowOverflow","captionServiceEncodings","serviceProps","serviceName","byte0","byte1","packet708","packetData","blockSize","isExtended","isMultiByte","extended","currentByte","nextByte","char","charCodeArray","toHexString","byteArray","unicode","firstByte","secondByte","winAttr","displayedText","winId","penAttr","penColor","penLoc","CHARACTER_TRANSLATION","getCharFromCode","BOTTOM_ROW","ROWS","createDisplayBuffer","field","dataChannel","swap","char0","char1","indentations","logWarning","newBaseRow","baseRow","captionStream","streamTypes","Stream$6","MAX_TS","RO_THRESH","TYPE_SHARED","handleRollover$1","direction","TimestampRolloverStream$1","lastDTS","referenceDTS","timestampRolloverStream","typedArrayIndexOf$1","typedArray","fromIndex","currentIndex","typedArrayIndexOf","textEncodingDescriptionByte","percentEncode$1","parseUtf8","parseIso88591$1","parseSyncSafeInteger$1","frameParsers","mimeTypeEndIndex","descriptionEndIndex","LINK_MIME_TYPE","parseId3Frames$1","frameSize","frameHeader","frameStart","tagSize","hasExtendedHeader","parseId3","Stream$5","StreamTypes$3","id3","MetadataStream","bufferSize","metadataStream","Stream$4","CaptionStream$1","StreamTypes$2","TimestampRolloverStream","TransportPacketStream","TransportParseStream","ElementaryStream","MP2T_PACKET_LENGTH$1","SYNC_BYTE$1","bytesInBuffer","everything","parsePsi","parsePat","parsePmt","psi","pat","pmt","sectionLength","tableEnd","programInfoLength","streamType","pid","segmentHadPmt","audio","timedMetadata","programMapTable","parsePes","pes","ptsDtsFlags","startPrefix","flushStream","forceFlush","packetFlushable","fragment","m2ts$1","m2ts_1","Stream$3","ONE_SECOND_IN_TS$2","AdtsStream$1","ADTS_SAMPLING_FREQUENCIES$1","handlePartialSegments","frameNum","frameLength","protectionSkipBytes","oldBuffer","sampleCount","adtsFrameDuration","skip","adts","ExpGolomb$1","workingData","workingBytesAvailable","workingWord","workingBitsAvailable","workingBytes","availableBytes","skipBytes","bits","valu","leadingZeroCount","clz","expGolomb","Stream$2","ExpGolomb","H264Stream$1","NalByteStream","PROFILES_WITH_OPTIONAL_SPS_DATA","syncPoint","swapBuffer","nalByteStream","trackId","currentPts","currentDts","readSequenceParameterSet","skipScalingList","expGolombDecoder","lastScale","nextScale","deltaScale","frameCropLeftOffset","frameCropRightOffset","frameCropTopOffset","frameCropBottomOffset","profileIdc","levelIdc","profileCompatibility","chromaFormatIdc","picOrderCntType","numRefFramesInPicOrderCntCycle","picWidthInMbsMinus1","picHeightInMapUnitsMinus1","frameMbsOnlyFlag","scalingListCount","sarRatio","aspectRatioIdc","h264","ADTS_SAMPLING_FREQUENCIES","parseId3TagSize","isLikelyAacData$1","parseSyncSafeInteger","percentEncode","parseIso88591","parseAdtsSize","lowThree","middle","highTwo","parseType$4","parseSampleRate","parseAacTimestamp","owner","Stream$1","aacUtils","AacStream$1","timeStamp","bytesLeft","tempLength","aac","AUDIO_PROPERTIES$1","audioProperties","VIDEO_PROPERTIES$1","videoProperties","mp4","frameUtils","audioFrameUtils","trackDecodeInfo","m2ts","AdtsStream","H264Stream","AacStream","isLikelyAacData","ONE_SECOND_IN_TS$1","AUDIO_PROPERTIES","VIDEO_PROPERTIES","VideoSegmentStream","AudioSegmentStream","Transmuxer","CoalesceStream","retriggerForStream","addPipelineLogRetriggers","transmuxer","pipeline","arrayEquals","generateSegmentTimingInfo","startDts","startPts","endDts","endPts","prependedContentDuration","ptsOffsetFromDts","decodeDuration","presentationDuration","earliestDts","videoClockCyclesOfSilencePrefixed","gopsToAlignWith","nalUnit","gopForFusion","firstGop","lastGop","alignedGops","gop","halfSecond","allowableOverlap","nearestDistance","dtsDistance","nearestGopObj","currentGopObj","alignIndex","gopIndex","byteLength","nalCount","alignEndIndex","matchFound","trimIndex","metadata","newGopsToAlignWith","output","caption","hasFlushed","videoTrack","audioTrack","timelineStartInfo","id3Frame","isAac","toUnsigned$3","toHexString$1","bin","parseType$3","parseType_1","toUnsigned$2","parseType$2","findBox$2","subresults","findBox_1","toUnsigned$1","getUint64$2","tfdt","parseTfdt$2","parseSampleFlags$1","parseSampleFlags_1","parseSampleFlags","trun","dataOffsetPresent","firstSampleFlagsPresent","sampleDurationPresent","sampleSizePresent","sampleFlagsPresent","sampleCompositionTimeOffsetPresent","parseTrun$2","tfhd","baseDataOffsetPresent","sampleDescriptionIndexPresent","defaultSampleDurationPresent","defaultSampleSizePresent","defaultSampleFlagsPresent","durationIsEmpty","defaultBaseIsMoof","parseTfhd$2","CaptionStream","findBox$1","parseTfdt$1","parseTrun$1","parseTfhd$1","window$2","mapToSample","approximateOffset","findSeiNals","avcStream","avcView","seiNal","lastMatchedSample","matchingSample","parseSamples","truns","defaultSampleDuration","defaultSampleSize","allSamples","trackRun","parseCaptionNals","videoTrackId","trafs","mdats","captionNals","mdatTrafPairs","matchingTraf","pair","headerInfo","parseEmbeddedCaptions","trackNals","CaptionParser","isInitialized","segmentCache","parsedCaptions","parsingPartial","videoTrackIds","timescales","parsedData","cachedSegment","nals","nal","captionParser","uint8ToCString$1","curChar","retString","uint8ToCString","getUint64$1","parseEmsgBox","boxData","scheme_id_uri","presentation_time","presentation_time_delta","event_duration","message_data","emsgBox","isValidEmsgBox","scaleTime","timeDelta","emsg","hasScheme","isValidV0Box","isDefined","isValidV1Box","emsg$1","toUnsigned","parseType$1","parseTfhd","parseTrun","parseTfdt","compositionStartTime","getVideoTrackIds","getTracks","getTimescaleFromMediaHeader","getEmsgID3","parseId3Frames","init","traks","lowestTime","baseTime","trafBoxes","parsedTfhd","parsedTfdt","parsedTrun","hdlrs","tkhds","handlerType","tkhdVersion","sampleDescriptions","codecBox","codecConfig","codecConfigType","segmentData","emsgBoxes","parsedBox","parsedId3Frames","probe$2","StreamTypes$1","parsePid","parsePayloadUnitStartIndicator","parseAdaptionField","parseType","pmtPid","pusi","payloadOffset","parsePesType","parsePesTime","parseNalUnitType","videoPacketContainsKeyFrame","frameBuffer","frameI","frameSyncPoint","foundKeyFrame","probe$1","StreamTypes","handleRollover","probe","MP2T_PACKET_LENGTH","SYNC_BYTE","parsePsi_","table","parseAudioPes_","pesType","parsed","endLoop","parseVideoPes_","firstKeyFrame","adjustTimestamp_","baseTimestamp","audioBaseTimestamp","info","videoBaseTimestamp","inspectAac_","audioCount","audioTimescale","inspectTs_","inspect","isAacData","tsInspector","wireTransmuxerEvents","initArray","gopInfo","timingInfo","videoSegmentTimingInfo","audioSegmentTimingInfo","trackInfo","audioTimingInfo","MessageHandlers","id3Frames","baseStartTime","tsStartTime","timeInfo","timestampOffset","TransmuxWorker","handleData_","transmuxedData","captionStreams","videoFrameDtsTime","videoFramePtsTime","handleDone_","handleGopInfo_","processTransmux","audioAppendStart","remux","onData","onTrackInfo","onAudioTimingInfo","onVideoTimingInfo","onVideoSegmentTimingInfo","onAudioSegmentTimingInfo","onId3","onCaptions","onDone","onEndedTimeline","onTransmuxerLog","isEndOfTimeline","waitForEndedTimelineEvent","handleMessage","dequeue","byteOffset","processAction","action","enqueueAction","reset","endTimeline","transmux","createTransmuxer","term","segmentTransmuxer","workerCallback","endAction","listenForEndEvent","isArrayBuffer","transfers","REQUEST_ERRORS","abortAll","activeXhrs","getRequestStats","getProgressStats","progressEvent","stats","handleErrors","handleKeyResponse","finishProcessingFn","errorObj","parseInitSegment","handleInitSegmentResponse","parseError","handleSegmentResponse","responseType","newBytes","transmuxAndNotify","trackInfoFn","timingInfoFn","videoSegmentTimingInfoFn","audioSegmentTimingInfoFn","id3Fn","captionsFn","endedTimelineFn","dataFn","doneFn","fmp4Tracks","isMuxed","audioStartFn","audioEndFn","videoStartFn","videoEndFn","finish","dispatchType","probeResult","handleSegmentBytes","bytesAsUint8Array","finishLoading","emsgData","decrypt","encryptedBytes","decryptionWorker","decryptionHandler","decrypted","keyBytes","decryptSegment","decryptedBytes","waitForCompletion","didError","segmentFinish","handleLoadEnd","loadendState","abortFn","handleProgress","progressFn","mediaSegmentRequest","xhrOptions","keyRequestOptions","keyRequestCallback","keyXhr","mapKeyRequestOptions","mapKeyRequestCallback","mapKeyXhr","initSegmentOptions","initSegmentRequestCallback","initSegmentXhr","segmentRequestOptions","segmentRequestCallback","segmentXhr","activeXhr","logFn$1","getCodecs","mediaAttributes","isMaat","unwrapCodecList","codecList","codecCount","codecObj","codecsForPlaylist","codecInfo","defaultCodecs","logFn","representationToString","safeGetComputedStyle","property","stableSort","sortFn","newArray","cmp","comparePlaylistBandwidth","leftBandwidth","rightBandwidth","comparePlaylistResolution","leftWidth","rightWidth","simpleSelector","playerBandwidth","limitRenditionByPlayerDimensions","playlistController","sortedPlaylistReps","rep","enabledPlaylistReps","bandwidthPlaylistReps","highestRemainingBandwidthRep","bandwidthBestRep","chosenRep","haveResolution","resolutionBestRepList","resolutionBestRep","resolutionPlusOneList","resolutionPlusOneSmallest","resolutionPlusOneRep","leastPixelDiffRep","leastPixelDiffList","lastBandwidthSelector","pixelRatio","movingAverageBandwidthSelector","decay","average","lastSystemBandwidth","minRebufferMaxBandwidthSelector","syncController","compatiblePlaylists","enabledPlaylists","rebufferingEstimates","numRequests","rebufferingImpact","noRebufferingPlaylists","estimate","lowestBitrateCompatibleVariantSelector","concatSegments","segmentObj","createCaptionsTrackIfNotExists","inbandTextTracks","instreamId","def","captionService","addCaptionData","captionArray","Cue","deprecateOldCue","addMetadata","videoDuration","metadataTrack","cuesArray","cuesGroupedByStartTime","timeSlot","sortedStartTimes","cueGroup","finiteDuration","nextTime","dateRangeAttr","dateRangeKeysToOmit","addDateRangeMetadata","createMetadataTrackIfNotExists","removeCuesFromTrack","removeDuplicateCuesFromTrack","uniqueCues","cueKey","gopsSafeToAlignWith","mapping","currentTimePts","updateGopBuffer","replace","removeGopBuffer","updatedBuffer","shallowEqual","akeys","bkeys","QUOTA_EXCEEDED_ERR","getSyncSegmentCandidate","targetTime","timelineSegments","MIN_BACK_BUFFER","CHECK_BUFFER_DELAY","finite","MIN_SEGMENT_DURATION_TO_SAVE_STATS","illegalMediaSwitch","loaderType","startingMedia","safeBackBufferTrimTime","trimTime","maxTrimTime","segmentInfoString","seq","segmentLen","selection","hasPartIndex","zeroBasedPartCount","timingInfoPropertyForMedia","timestampOffsetForSegment","overrideCheck","shouldWaitForTimelineChange","timelineChangeController","audioDisabled","lastMainTimelineChange","pendingAudioTimelineChange","mediaDuration","timingInfos","maxDuration","typeTimingInfo","segmentTooLong","getTroublesomeSegmentDurationMessage","sourceType","isSegmentWayTooLong","isSegmentSlightlyTooLong","segmentTooLongMessage","SegmentLoader","newState","requestId","hasAudio","hasVideo","storedMap","storedKey","newPlaylist","oldId","mediaSequenceDiff","mediaIndex","force","removesRemaining","removeFinished","appendedLastSegment","appendedLastPart","bufferedTime","preloaded","haveEnoughBuffer","mediaInfo","difference","extendedFudgeFactor","nextSegment","hasIndependentSegments","lastSegmentLastPart","ended","independent","isSyncRequest","forceTimestampOffset","audioBufferedEnd","measuredBandwidth","requestTimeRemaining","timeUntilRebuffer$1","switchCandidate","timeSavedBySwitching","minimumTimeSaving","simpleSegment","timeType","timingInfoProperty","captionData","captionTracks","captionTrack","trackName","callQueue","fun","loadQueue","useVideoTimingInfo","firstVideoFrameTimeForData","audioBuffered","videoBuffered","audioBufferStart","audioBufferEnd","videoBufferStart","videoBufferEnd","timeToRemoveUntil","segmentTimingInfo","isEndOfStream","isWalkingForward","isDiscontinuity","removeToTime","previousSegment","iv","timelineMapping","currentStart","currentVideoTimestampOffset","waitForVideo","waitForAudio","illegalMediaSwitchError","didChange","prioritizedTimingInfo","segmentDurationMessage","badSegmentGuess","badPartGuess","segmentProcessingTime","segmentProcessingThroughput","toTitleCase","bufferTypes","updating","sourceUpdater","sourceBuffer","nextQueueIndexOfType","queueEntry","shiftQueue","queueIndex","cleanupBuffer","titleType","inSourceBuffers","mediaSource","actions","onError","mime","newCodecBase","oldCodec","pushQueue","onUpdateend","SourceUpdater","que","uint8ToUtf8","uintArray","bufferToHexString","uInt8Buffer","VTT_LINE_TERMINATORS","NoVttJsError","VTTSegmentLoader","combinedByteLength","combinedSegment","checkTimestampOffset","decodeBytesToString","mapData","mappingObj","MPEGTS","LOCAL","diff","firstStart","lastStart","valueIn90khz","referenceIn90khz","findAdCue","mediaTime","updateAdCues","adOffset","adTotal","MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC","syncPointStrategies","mediaSequenceMap","currentMediaSequence","currentPartStart","lastDistance","datetimeMapping","discontinuity","discontinuitySync","SyncController","currentBaseTime","syncPoints","syncPointInfo","strategy","selectedSegment","bestSyncPoint","bestDistance","bestStrategy","newDistance","lastRemovedSegment","playlistTimestamp","shouldSaveTimelineMapping","didCalculateSegmentTimeMapping","dateTime","mediaIndexDiff","accuracy","TimelineChangeController","to","workerCode","unpad","padded","precompute","tables","encTable","decTable","sbox","sboxInv","xInv","th","x2","x4","x8","tEnc","tDec","aesTables","AES","tmp","keyLen","rcon","encKey","decKey","encrypted0","encrypted1","encrypted2","encrypted3","out","a2","c2","nInnerRounds","kIndex","table0","table1","table2","table3","AsyncStream","job","ntoh","word","encrypted","initVector","encrypted32","decipher","decrypted32","init0","init1","init2","init3","wordIx","Decrypter","audioTrackKind_","stopLoaders","segmentLoader","startLoaders","playlistLoader","onGroupChanged","mainSegmentLoader","activeTrack","activeGroup","previousActiveLoader","lastGroup","onGroupChanging","onTrackChanged","lastTrack","pc","excludePlaylist","defaultTrack","setupListeners","requestOptions","initialize","mediaGroups","logger_","variantLabel","groupMatch","variants","groupKeys","groupPropertyList","getActiveGroup","activeTrack_","setupMediaGroups","audioSegmentLoader","onAudioTrackChanged","createMediaTypes","SteeringManifest","ContentSteeringController","steeringTag","steeringUri","reloadUri","errorInfo","retrySeconds","steeringManifestJson","steeringUrl","steeringUrlObject","proxyServerUrlObject","dataUri","urlObject","networkThroughput","pathwayKey","throughputKey","steeringJson","nextPathway","pathwaysByPriority","proxyURI","steeringURI","ttl","ttlMS","newTag","ABORT_EARLY_EXCLUSION_SECONDS","Vhs$1","loaderStats","sumLoaderStat","stat","shouldSwitchToMedia","currentPlaylist","nextPlaylist","bufferLowWaterLine","bufferHighWaterLine","bufferBasedABR","sharedLogLine","isBuffered","forwardBuffer","maxBufferLowWaterLine","nextBandwidth","currBandwidth","logLine","PlaylistController","externVhs","useCueTags","playlistExclusionDuration","enableLowInitialPlaylist","cacheEncryptionKeys","leastPixelDiffSelector","maxPlaylistRetries","segmentLoaderSettings","onLoad","getBandwidth","timeToLoadedDataStart","newId","dashMediaPlaylists","defaultPlaylists","defaultGroup","requestTimeout","selectedMedia","defaultDemuxed","audioGroupKeys","updateCodecs","startPoint","mainMediaInfo","absolutePlaylistEnd","playlistToExclude","reIncludeDelay","reincluded","excludeUntil","errorMessage","delayDuration","filter","fnNames","loaders","dontFilterPlaylist","loader","audioSeekable","mainSeekable","oldEnd","oldStart","isLive","usingAudioLoader","hasMainMediaInfo","hasAudioMediaInfo","playlistCodecs","supportFunction","isFmp4","unsupportedCodecs","unsupportedAudio","supporter","switchMessages","newCodec","ids","unsupported","codecCount_","videoDetails","audioDetails","exclusionReasons","variantCodecs","variantCodecCount","variantVideoDetails","variantAudioDetails","newMax","availablePathways","newPathways","serviceLocation","currentPathway","didEnablePlaylists","pathwayId","differentPathwayId","noExcludeUntil","currentPathwayClones","nextPathwayClones","oldClone","aParams","bParams","nonUsableKeyStatusCount","NON_USABLE","keyIdSet","USABLE","hasUsableKeyStatus","nonUsableExclusion","isNonHD","excludedForNonUsableKey","formattedKeyIdString","enableFunction","playlistID","changePlaylistFn","incompatible","currentlyEnabled","Representation","vhsHandler","qualityChangeFunction","renditionSelectionMixin","timerCancelEvents","PlaybackWatcher","playHandler","canPlayHandler","waitingHandler","cancelTimerHandler","loaderTypes","loaderChecks","setSeekingHandlers","isBufferedDifferent","isAfterSeekableRange","minAppendedDuration","bufferedToCheck","nextRange","livePoint","allowSeeksWithinUnsafeLiveWindow","allowedEnd","isLLHLS","gap","lastVideoRange","videoRange","audioRange","scheduledCurrentTime","gaps","defaultOptions","initPlugin","lastCalled","localOptions","loadedMetadataHandler","cleanupEvents","reinitPlugin","reloadSourceOnError","version$4","version$3","version$2","version$1","Vhs","LOCAL_STORAGE_KEY","handleVhsMediaChange","selectedIndex","handleVhsLoadedMetadata","emeKeySystems","keySystemOptions","audioPlaylist","videoContentType","audioContentType","keySystemContentTypes","getAllPsshKeySystemsOptions","keySystems","keySystemsArr","keySystemsOptions","keySystemsObj","waitForKeySessionCreation","sourceKeySystems","audioMedia","mainPlaylists","keySystemsOptionsArr","initializationFinishedPromises","keySessionCreatedPromises","setupEmeOptions","sourceOptions","getVhsLocalStorage","storedObject","updateVhsLocalStorage","objectToStore","expandDataUri","addOnRequestHook","addOnResponseHook","removeOnRequestHook","removeOnResponseHook","canItPlay","Component","VhsHandler","_player","fullscreenElement","option","playbackWatcherOptions","defaultSelector","selectPlaylist","throughput","playerBandwidthEst","networkInformation","tenMbpsAsBitsPerSecond","networkInfoBandwidthEstBitsPerSec","invBandwidth","invThroughput","audioPlaylistLoader","didSetupEmeOptions","VhsSourceHandler","simpleType","overrideNative","defaultOverrideNative","supportsNativeMediaSources","stringToUint16Array","uint8ArrayToString","getHostnameFromUri","arrayBuffersEqual","arrayBuffer1","arrayBuffer2","dataView1","dataView2","arrayBufferFrom","bufferOrTypedArray","mergeAndRemoveNull","getMessageContents","xmlString","headersElement","headerNames","headerValues","challengeElement","challenge","requestPlayreadyLicense","messageBuffer","emeOptions","messageContents","getSupportedConfigurations","supportedConfiguration","audioRobustness","videoRobustness","persistentState","getSupportedKeySystem","supportedConfigurations","makeNewRequest","mediaKeys","initDataType","initData","getLicense","removeSession","eventBus","keySession","license","addSession","addPendingSessions","certificate","createdMediaKeys","promises","defaultPlayreadyGetLicense","keyMessage","defaultGetLicense","promisifyGetLicense","getLicenseFn","standardizeKeySystemOptions","standard5July2016","keySystemAccess","keySystemPromise","cert","_standardizeKeySystem","FAIRPLAY_KEY_SYSTEM","concatInitDataIdAndCertificate","dataView","initDataArray","idArray","certArray","addKey","contentId","defaultGetCertificate","fairplayOptions","defaultGetContentId","defaultGetLicense$1","fairplay","getCertificate","getContentId","PLAYREADY_KEY_SYSTEM","addKeyToSession","session","playreadyOptions","createSession","msPrefixed","hasSession","sessions","sessionBuffer","initDataBuffer","handleEncryptedEvent","handleWebKitNeedKeyEvent","handleMsNeedKeyEvent","getOptions","setupSessions","emeErrorHandler","objOrErr","onPlayerReady","emeError","handleFn","firstWebkitneedkeyTimeout","eme","suppressErrorIfPossible","mergedEmeOptions","mockEncryptedEvent","msKeyHandler","vjsPlayer","trackSelector","audioTracks","textTrack","pillarbox","MediaComposition","urn","chapter","chapterByUrn","subtitleList","subtitleInformationList","onlyHasExternalSubtitles","subtitles","subtitle","subtitleInformation","mainChapter","blockReason","resourceList","resource","timeIntervalList","validFrom","analyticsData","analyticsMetadata","DataProvider","hostName","onlyChapters","SCALE","FORMAT","IMAGE_SERVICE_URL","Image","imageServiceUrl","scaleUrl","DRM_VENDORS","Drm","drmList","drmVendor","certificateUri","licenseUri","resources","TOKEN_TYPES","AkamaiTokenService","streamUrl","tokentype","tokenServerUrl","streamUrlToTokenize","acl","authparams","tokenizedSources","tokenizedSource","EMPTIED","ENDED","LOADED_DATA","LOAD_START","PAUSE","PLAY","PLAYING","RATE_CHANGE","SEEKING","TIME_UPDATE","WAITING","SRGAnalytics","debug","environment","playerVersion","tagCommanderScriptURL","notification","currentTrack","isInfinity","windowSize","playingSession","labels","scriptId","_e","trackingThreshold","tracker","eventMetadata","severity","isAtLiveEdge","srcMediaData","notifyUptime","bufferStop","Play$4","Pause$4","Replay$4","Duration$4","LIVE$4","Loaded$4","Progress$4","Fullscreen$4","Mute$4","Unmute$4","Subtitles$4","Captions$4","Chapters$4","Close$4","Descriptions$4","Text$4","White$4","Black$4","Red$4","Green$4","Blue$4","Yellow$4","Magenta$4","Cyan$4","Background$4","Window$4","Transparent$4","Opaque$4","None$4","Raised$3","Depressed$3","Uniform$4","Casual$3","Script$3","Reset$4","Done$4","Color$3","Opacity$3","de$1","vjsLang$3","AGERATING12$4","AGERATING18$4","COMMERCIAL$4","ENDDATE$4","GEOBLOCK$4","LEGAL$4","STARTDATE$4","UNKNOWN$4","de","pillarboxLang$4","Play$3","Pause$3","Replay$3","Duration$3","LIVE$3","Loaded$3","Progress$3","Fullscreen$3","Mute$3","Unmute$3","Subtitles$3","Captions$3","Chapters$3","Descriptions$3","Close$3","Text$3","White$3","Black$3","Red$3","Green$3","Blue$3","Yellow$3","Magenta$3","Cyan$3","Background$3","Window$3","Transparent$3","Opaque$3","None$3","Raised$2","Depressed$2","Uniform$3","Casual$2","Script$2","Reset$3","Done$3","Color$2","Opacity$2","en$1","vjsLang$2","AGERATING12$3","AGERATING18$3","COMMERCIAL$3","ENDDATE$3","GEOBLOCK$3","LEGAL$3","STARTDATE$3","UNKNOWN$3","en","pillarboxLang$3","Play$2","Pause$2","Replay$2","Duration$2","LIVE$2","Loaded$2","Progress$2","Fullscreen$2","Mute$2","Unmute$2","Subtitles$2","Captions$2","Chapters$2","Descriptions$2","Close$2","Text$2","White$2","Black$2","Red$2","Green$2","Blue$2","Yellow$2","Magenta$2","Cyan$2","Background$2","Window$2","Transparent$2","Opaque$2","None$2","Raised$1","Depressed$1","Uniform$2","Casual$1","Script$1","Reset$2","Done$2","Color$1","Opacity$1","fr$1","vjsLang$1","AGERATING12$2","AGERATING18$2","COMMERCIAL$2","ENDDATE$2","GEOBLOCK$2","LEGAL$2","STARTDATE$2","UNKNOWN$2","fr","pillarboxLang$2","Play$1","Pause$1","Replay$1","Duration$1","LIVE$1","Loaded$1","Progress$1","Fullscreen$1","Mute$1","Unmute$1","Subtitles$1","Captions$1","Chapters$1","Descriptions$1","Close$1","Text$1","White$1","Black$1","Red$1","Green$1","Blue$1","Yellow$1","Magenta$1","Cyan$1","Background$1","Window$1","Transparent$1","Opaque$1","None$1","Uniform$1","Reset$1","Done$1","Color","Opacity","it$1","vjsLang","AGERATING12$1","AGERATING18$1","COMMERCIAL$1","ENDDATE$1","GEOBLOCK$1","LEGAL$1","STARTDATE$1","UNKNOWN$1","it","pillarboxLang$1","Play","Pause","Replay","Duration","LIVE","Loaded","Progress","Fullscreen","Mute","Unmute","Subtitles","Captions","Chapters","Descriptions","Close","White","Black","Red","Green","Blue","Yellow","Magenta","Cyan","Background","Window","Transparent","Opaque","None","Raised","Depressed","Uniform","Dropshadow","Casual","Script","Reset","Done","AGERATING12","AGERATING18","COMMERCIAL","ENDDATE","GEOBLOCK","LEGAL","STARTDATE","UNKNOWN","rm","pillarboxLang","SrgSsr","removeTrack","blockedSegments","segmentTrack","mediaData","chapterUrn","chapters","chapterTrack","intervals","intervalTrack","srcMediaObj","mediaComposition","disableTrackers","dataProviderHost","dataProvider","blockedSegmentsTrack","blockedCue","blockedSegment","streaming","srcOptions","mainResources","blockedSegmentEndTime","srgAnalytics","imageService","RouteLinkCompenent","LitElement","_updateSelected","_onClick","updateSelected_fn","html","githubLogoSvg","srgssrLogo","CoreDemoHeaderComponent","unsafeSVG","coreHeaderCss"],"mappings":"2vCAAA;AAAA;AAAA;AAAA;AAAA,GAKA,MAAMA,GAAE,WAAWC,GAAED,GAAE,aAAsBA,GAAE,WAAX,QAAqBA,GAAE,SAAS,eAAe,uBAAuB,SAAS,WAAW,YAAY,cAAc,UAAUE,GAAE,OAAM,EAAGC,GAAE,IAAI,QAAQ,IAAAC,GAAA,KAAO,CAAC,YAAYJ,EAAEC,EAAEE,EAAE,CAAC,GAAG,KAAK,aAAa,GAAGA,IAAID,GAAE,MAAM,MAAM,mEAAmE,EAAE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AAS,MAAO,EAAM,CAC5C,GAEEz8H,GAPWy8H,GAOJ,SAAS,CAAC7iI,GAAOG,EAAU,GAiDpC,eAAe,OAAO,aAAc0iI,EAAkB,EC5DtD,MAAeM,GAAA;AAAA;AAAA;AAAA,ECAAC,GAAA,GAAA,IAAA,IAAA,2BAAA,YAAA,GAAA,EAAA,KCCf;AAAA;AAAA;AAAA;AAAA,GAIG,MAAM/lI,WAAUC,EAAC,EAAED,GAAE,cAAc,YAAYA,GAAE,WAAW,EAAE,MAAMG,GAAED,GAAEF,EAAC,uWCiBrE,MAAMgmI,WAAgCP,EAAW,CAGtD,QAAS,CACP,OAAOI;AAAAA;AAAAA;AAAAA,uCAG4BE,EAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAMnCE,GAAUH,EAAa,CAAC;AAAA;AAAA;AAAA;AAAA,gBAKnC,CACH,CAlBE/8H,GADWi9H,GACJ,SAAS,CAACrjI,GAAOC,GAAUsjI,EAAa,CAAC,GAoBlD,eAAe,OAAO,mBAAoBF,EAAuB","x_google_ignoreList":[0,1,2,3,5,6,7,8,9,10,11,12,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,60]} \ No newline at end of file diff --git a/pr-preview/pr-26/assets/favicon-BQGqil3k.ico b/pr-preview/pr-26/assets/favicon-BQGqil3k.ico new file mode 100644 index 0000000..21fa14c Binary files /dev/null and b/pr-preview/pr-26/assets/favicon-BQGqil3k.ico differ diff --git a/pr-preview/pr-26/assets/index-DU_ycwcZ.css b/pr-preview/pr-26/assets/index-DU_ycwcZ.css new file mode 100644 index 0000000..27b6583 --- /dev/null +++ b/pr-preview/pr-26/assets/index-DU_ycwcZ.css @@ -0,0 +1 @@ +:where(html){--font-sans:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;--font-serif:ui-serif,serif;--font-mono:Dank Mono,Operator Mono,Inconsolata,Fira Mono,ui-monospace,SF Mono,Monaco,Droid Sans Mono,Source Code Pro,monospace;--font-weight-1:100;--font-weight-2:200;--font-weight-3:300;--font-weight-4:400;--font-weight-5:500;--font-weight-6:600;--font-weight-7:700;--font-weight-8:800;--font-weight-9:900;--font-lineheight-00:.95;--font-lineheight-0:1.1;--font-lineheight-1:1.25;--font-lineheight-2:1.375;--font-lineheight-3:1.5;--font-lineheight-4:1.75;--font-lineheight-5:2;--font-letterspacing-0:-.05em;--font-letterspacing-1:.025em;--font-letterspacing-2:.05em;--font-letterspacing-3:.075em;--font-letterspacing-4:.15em;--font-letterspacing-5:.5em;--font-letterspacing-6:.75em;--font-letterspacing-7:1em;--font-size-00:.5rem;--font-size-0:.75rem;--font-size-1:1rem;--font-size-2:1.1rem;--font-size-3:1.25rem;--font-size-4:1.5rem;--font-size-5:2rem;--font-size-6:2.5rem;--font-size-7:3rem;--font-size-8:3.5rem;--font-size-fluid-0:clamp(.75rem,2vw,1rem);--font-size-fluid-1:clamp(1rem,4vw,1.5rem);--font-size-fluid-2:clamp(1.5rem,6vw,2.5rem);--font-size-fluid-3:clamp(2rem,9vw,3.5rem);--size-000:-.5rem;--size-00:-.25rem;--size-1:.25rem;--size-2:.5rem;--size-3:1rem;--size-4:1.25rem;--size-5:1.5rem;--size-6:1.75rem;--size-7:2rem;--size-8:3rem;--size-9:4rem;--size-10:5rem;--size-11:7.5rem;--size-12:10rem;--size-13:15rem;--size-14:20rem;--size-15:30rem;--size-fluid-1:clamp(.5rem,1vw,1rem);--size-fluid-2:clamp(1rem,2vw,1.5rem);--size-fluid-3:clamp(1.5rem,3vw,2rem);--size-fluid-4:clamp(2rem,4vw,3rem);--size-fluid-5:clamp(4rem,5vw,5rem);--size-fluid-6:clamp(5rem,7vw,7.5rem);--size-fluid-7:clamp(7.5rem,10vw,10rem);--size-fluid-8:clamp(10rem,20vw,15rem);--size-fluid-9:clamp(15rem,30vw,20rem);--size-fluid-10:clamp(20rem,40vw,30rem);--size-content-1:20ch;--size-content-2:45ch;--size-content-3:60ch;--size-header-1:20ch;--size-header-2:25ch;--size-header-3:35ch;--size-xxs:240px;--size-xs:360px;--size-sm:480px;--size-md:768px;--size-lg:1024px;--size-xl:1440px;--size-xxl:1920px;--size-relative-000:-.5ch;--size-relative-00:-.25ch;--size-relative-1:.25ch;--size-relative-2:.5ch;--size-relative-3:1ch;--size-relative-4:1.25ch;--size-relative-5:1.5ch;--size-relative-6:1.75ch;--size-relative-7:2ch;--size-relative-8:3ch;--size-relative-9:4ch;--size-relative-10:5ch;--size-relative-11:7.5ch;--size-relative-12:10ch;--size-relative-13:15ch;--size-relative-14:20ch;--size-relative-15:30ch;--ease-1:cubic-bezier(.25,0,.5,1);--ease-2:cubic-bezier(.25,0,.4,1);--ease-3:cubic-bezier(.25,0,.3,1);--ease-4:cubic-bezier(.25,0,.2,1);--ease-5:cubic-bezier(.25,0,.1,1);--ease-in-1:cubic-bezier(.25,0,1,1);--ease-in-2:cubic-bezier(.5,0,1,1);--ease-in-3:cubic-bezier(.7,0,1,1);--ease-in-4:cubic-bezier(.9,0,1,1);--ease-in-5:cubic-bezier(1,0,1,1);--ease-out-1:cubic-bezier(0,0,.75,1);--ease-out-2:cubic-bezier(0,0,.5,1);--ease-out-3:cubic-bezier(0,0,.3,1);--ease-out-4:cubic-bezier(0,0,.1,1);--ease-out-5:cubic-bezier(0,0,0,1);--ease-in-out-1:cubic-bezier(.1,0,.9,1);--ease-in-out-2:cubic-bezier(.3,0,.7,1);--ease-in-out-3:cubic-bezier(.5,0,.5,1);--ease-in-out-4:cubic-bezier(.7,0,.3,1);--ease-in-out-5:cubic-bezier(.9,0,.1,1);--ease-elastic-out-1:cubic-bezier(.5,.75,.75,1.25);--ease-elastic-out-2:cubic-bezier(.5,1,.75,1.25);--ease-elastic-out-3:cubic-bezier(.5,1.25,.75,1.25);--ease-elastic-out-4:cubic-bezier(.5,1.5,.75,1.25);--ease-elastic-out-5:cubic-bezier(.5,1.75,.75,1.25);--ease-elastic-in-1:cubic-bezier(.5,-.25,.75,1);--ease-elastic-in-2:cubic-bezier(.5,-.5,.75,1);--ease-elastic-in-3:cubic-bezier(.5,-.75,.75,1);--ease-elastic-in-4:cubic-bezier(.5,-1,.75,1);--ease-elastic-in-5:cubic-bezier(.5,-1.25,.75,1);--ease-elastic-in-out-1:cubic-bezier(.5,-.1,.1,1.5);--ease-elastic-in-out-2:cubic-bezier(.5,-.3,.1,1.5);--ease-elastic-in-out-3:cubic-bezier(.5,-.5,.1,1.5);--ease-elastic-in-out-4:cubic-bezier(.5,-.7,.1,1.5);--ease-elastic-in-out-5:cubic-bezier(.5,-.9,.1,1.5);--ease-step-1:steps(2);--ease-step-2:steps(3);--ease-step-3:steps(4);--ease-step-4:steps(7);--ease-step-5:steps(10);--ease-elastic-1:var(--ease-elastic-out-1);--ease-elastic-2:var(--ease-elastic-out-2);--ease-elastic-3:var(--ease-elastic-out-3);--ease-elastic-4:var(--ease-elastic-out-4);--ease-elastic-5:var(--ease-elastic-out-5);--ease-squish-1:var(--ease-elastic-in-out-1);--ease-squish-2:var(--ease-elastic-in-out-2);--ease-squish-3:var(--ease-elastic-in-out-3);--ease-squish-4:var(--ease-elastic-in-out-4);--ease-squish-5:var(--ease-elastic-in-out-5);--ease-spring-1:linear(0,.006,.025 2.8%,.101 6.1%,.539 18.9%,.721 25.3%,.849 31.5%,.937 38.1%,.968 41.8%,.991 45.7%,1.006 50.1%,1.015 55%,1.017 63.9%,1.001);--ease-spring-2:linear(0,.007,.029 2.2%,.118 4.7%,.625 14.4%,.826 19%,.902,.962,1.008 26.1%,1.041 28.7%,1.064 32.1%,1.07 36%,1.061 40.5%,1.015 53.4%,.999 61.6%,.995 71.2%,1);--ease-spring-3:linear(0,.009,.035 2.1%,.141 4.4%,.723 12.9%,.938 16.7%,1.017,1.077,1.121,1.149 24.3%,1.159,1.163,1.161,1.154 29.9%,1.129 32.8%,1.051 39.6%,1.017 43.1%,.991,.977 51%,.974 53.8%,.975 57.1%,.997 69.8%,1.003 76.9%,1);--ease-spring-4:linear(0,.009,.037 1.7%,.153 3.6%,.776 10.3%,1.001,1.142 16%,1.185,1.209 19%,1.215 19.9% 20.8%,1.199,1.165 25%,1.056 30.3%,1.008 33%,.973,.955 39.2%,.953 41.1%,.957 43.3%,.998 53.3%,1.009 59.1% 63.7%,.998 78.9%,1);--ease-spring-5:linear(0,.01,.04 1.6%,.161 3.3%,.816 9.4%,1.046,1.189 14.4%,1.231,1.254 17%,1.259,1.257 18.6%,1.236,1.194 22.3%,1.057 27%,.999 29.4%,.955 32.1%,.942,.935 34.9%,.933,.939 38.4%,1 47.3%,1.011,1.017 52.6%,1.016 56.4%,1 65.2%,.996 70.2%,1.001 87.2%,1);--ease-bounce-1:linear(0,.004,.016,.035,.063,.098,.141,.191,.25,.316,.391 36.8%,.563,.766,1 58.8%,.946,.908 69.1%,.895,.885,.879,.878,.879,.885,.895,.908 89.7%,.946,1);--ease-bounce-2:linear(0,.004,.016,.035,.063,.098,.141 15.1%,.25,.391,.562,.765,1,.892 45.2%,.849,.815,.788,.769,.757,.753,.757,.769,.788,.815,.85,.892 75.2%,1 80.2%,.973,.954,.943,.939,.943,.954,.973,1);--ease-bounce-3:linear(0,.004,.016,.035,.062,.098,.141 11.4%,.25,.39,.562,.764,1 30.3%,.847 34.8%,.787,.737,.699,.672,.655,.65,.656,.672,.699,.738,.787,.847 61.7%,1 66.2%,.946,.908,.885 74.2%,.879,.878,.879,.885 79.5%,.908,.946,1 87.4%,.981,.968,.96,.957,.96,.968,.981,1);--ease-bounce-4:linear(0,.004,.016 3%,.062,.141,.25,.391,.562 18.2%,1 24.3%,.81,.676 32.3%,.629,.595,.575,.568,.575,.595,.629,.676 48.2%,.811,1 56.2%,.918,.86,.825,.814,.825,.86,.918,1 77.2%,.94 80.6%,.925,.92,.925,.94 87.5%,1 90.9%,.974,.965,.974,1);--ease-bounce-5:linear(0,.004,.016 2.5%,.063,.141,.25 10.1%,.562,1 20.2%,.783,.627,.534 30.9%,.511,.503,.511,.534 38%,.627,.782,1 48.7%,.892,.815,.769 56.3%,.757,.753,.757,.769 61.3%,.815,.892,1 68.8%,.908 72.4%,.885,.878,.885,.908 79.4%,1 83%,.954 85.5%,.943,.939,.943,.954 90.5%,1 93%,.977,.97,.977,1);--layer-1:1;--layer-2:2;--layer-3:3;--layer-4:4;--layer-5:5;--layer-important:2147483647;--shadow-color:220 3% 15%;--shadow-strength:1%;--inner-shadow-highlight:inset 0 -.5px 0 0 #fff,inset 0 .5px 0 0 rgba(0,0,0,.067);--shadow-1:0 1px 2px -1px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 9%));--shadow-2:0 3px 5px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 3%)),0 7px 14px -5px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 5%));--shadow-3:0 -1px 3px 0 hsl(var(--shadow-color)/calc(var(--shadow-strength) + 2%)),0 1px 2px -5px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 2%)),0 2px 5px -5px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 4%)),0 4px 12px -5px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 5%)),0 12px 15px -5px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 7%));--shadow-4:0 -2px 5px 0 hsl(var(--shadow-color)/calc(var(--shadow-strength) + 2%)),0 1px 1px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 3%)),0 2px 2px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 3%)),0 5px 5px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 4%)),0 9px 9px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 5%)),0 16px 16px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 6%));--shadow-5:0 -1px 2px 0 hsl(var(--shadow-color)/calc(var(--shadow-strength) + 2%)),0 2px 1px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 3%)),0 5px 5px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 3%)),0 10px 10px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 4%)),0 20px 20px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 5%)),0 40px 40px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 7%));--shadow-6:0 -1px 2px 0 hsl(var(--shadow-color)/calc(var(--shadow-strength) + 2%)),0 3px 2px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 3%)),0 7px 5px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 3%)),0 12px 10px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 4%)),0 22px 18px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 5%)),0 41px 33px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 6%)),0 100px 80px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 7%));--inner-shadow-0:inset 0 0 0 1px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 9%));--inner-shadow-1:inset 0 1px 2px 0 hsl(var(--shadow-color)/calc(var(--shadow-strength) + 9%)),var(--inner-shadow-highlight);--inner-shadow-2:inset 0 1px 4px 0 hsl(var(--shadow-color)/calc(var(--shadow-strength) + 9%)),var(--inner-shadow-highlight);--inner-shadow-3:inset 0 2px 8px 0 hsl(var(--shadow-color)/calc(var(--shadow-strength) + 9%)),var(--inner-shadow-highlight);--inner-shadow-4:inset 0 2px 14px 0 hsl(var(--shadow-color)/calc(var(--shadow-strength) + 9%)),var(--inner-shadow-highlight);--ratio-square:1;--ratio-landscape:4/3;--ratio-portrait:3/4;--ratio-widescreen:16/9;--ratio-ultrawide:18/5;--ratio-golden:1.618/1;--gray-0:#f8f9fa;--gray-1:#f1f3f5;--gray-2:#e9ecef;--gray-3:#dee2e6;--gray-4:#ced4da;--gray-5:#adb5bd;--gray-6:#868e96;--gray-7:#495057;--gray-8:#343a40;--gray-9:#212529;--gray-10:#16191d;--gray-11:#0d0f12;--gray-12:#030507;--stone-0:#f8fafb;--stone-1:#f2f4f6;--stone-2:#ebedef;--stone-3:#e0e4e5;--stone-4:#d1d6d8;--stone-5:#b1b6b9;--stone-6:#979b9d;--stone-7:#7e8282;--stone-8:#666968;--stone-9:#50514f;--stone-10:#3a3a37;--stone-11:#252521;--stone-12:#121210;--red-0:#fff5f5;--red-1:#ffe3e3;--red-2:#ffc9c9;--red-3:#ffa8a8;--red-4:#ff8787;--red-5:#ff6b6b;--red-6:#fa5252;--red-7:#f03e3e;--red-8:#e03131;--red-9:#c92a2a;--red-10:#b02525;--red-11:#962020;--red-12:#7d1a1a;--pink-0:#fff0f6;--pink-1:#ffdeeb;--pink-2:#fcc2d7;--pink-3:#faa2c1;--pink-4:#f783ac;--pink-5:#f06595;--pink-6:#e64980;--pink-7:#d6336c;--pink-8:#c2255c;--pink-9:#a61e4d;--pink-10:#8c1941;--pink-11:#731536;--pink-12:#59102a;--purple-0:#f8f0fc;--purple-1:#f3d9fa;--purple-2:#eebefa;--purple-3:#e599f7;--purple-4:#da77f2;--purple-5:#cc5de8;--purple-6:#be4bdb;--purple-7:#ae3ec9;--purple-8:#9c36b5;--purple-9:#862e9c;--purple-10:#702682;--purple-11:#5a1e69;--purple-12:#44174f;--violet-0:#f3f0ff;--violet-1:#e5dbff;--violet-2:#d0bfff;--violet-3:#b197fc;--violet-4:#9775fa;--violet-5:#845ef7;--violet-6:#7950f2;--violet-7:#7048e8;--violet-8:#6741d9;--violet-9:#5f3dc4;--violet-10:#5235ab;--violet-11:#462d91;--violet-12:#3a2578;--indigo-0:#edf2ff;--indigo-1:#dbe4ff;--indigo-2:#bac8ff;--indigo-3:#91a7ff;--indigo-4:#748ffc;--indigo-5:#5c7cfa;--indigo-6:#4c6ef5;--indigo-7:#4263eb;--indigo-8:#3b5bdb;--indigo-9:#364fc7;--indigo-10:#2f44ad;--indigo-11:#283a94;--indigo-12:#21307a;--blue-0:#e7f5ff;--blue-1:#d0ebff;--blue-2:#a5d8ff;--blue-3:#74c0fc;--blue-4:#4dabf7;--blue-5:#339af0;--blue-6:#228be6;--blue-7:#1c7ed6;--blue-8:#1971c2;--blue-9:#1864ab;--blue-10:#145591;--blue-11:#114678;--blue-12:#0d375e;--cyan-0:#e3fafc;--cyan-1:#c5f6fa;--cyan-2:#99e9f2;--cyan-3:#66d9e8;--cyan-4:#3bc9db;--cyan-5:#22b8cf;--cyan-6:#15aabf;--cyan-7:#1098ad;--cyan-8:#0c8599;--cyan-9:#0b7285;--cyan-10:#095c6b;--cyan-11:#074652;--cyan-12:#053038;--teal-0:#e6fcf5;--teal-1:#c3fae8;--teal-2:#96f2d7;--teal-3:#63e6be;--teal-4:#38d9a9;--teal-5:#20c997;--teal-6:#12b886;--teal-7:#0ca678;--teal-8:#099268;--teal-9:#087f5b;--teal-10:#066649;--teal-11:#054d37;--teal-12:#033325;--green-0:#ebfbee;--green-1:#d3f9d8;--green-2:#b2f2bb;--green-3:#8ce99a;--green-4:#69db7c;--green-5:#51cf66;--green-6:#40c057;--green-7:#37b24d;--green-8:#2f9e44;--green-9:#2b8a3e;--green-10:#237032;--green-11:#1b5727;--green-12:#133d1b;--lime-0:#f4fce3;--lime-1:#e9fac8;--lime-2:#d8f5a2;--lime-3:#c0eb75;--lime-4:#a9e34b;--lime-5:#94d82d;--lime-6:#82c91e;--lime-7:#74b816;--lime-8:#66a80f;--lime-9:#5c940d;--lime-10:#4c7a0b;--lime-11:#3c6109;--lime-12:#2c4706;--yellow-0:#fff9db;--yellow-1:#fff3bf;--yellow-2:#ffec99;--yellow-3:#ffe066;--yellow-4:#ffd43b;--yellow-5:#fcc419;--yellow-6:#fab005;--yellow-7:#f59f00;--yellow-8:#f08c00;--yellow-9:#e67700;--yellow-10:#b35c00;--yellow-11:#804200;--yellow-12:#663500;--orange-0:#fff4e6;--orange-1:#ffe8cc;--orange-2:#ffd8a8;--orange-3:#ffc078;--orange-4:#ffa94d;--orange-5:#ff922b;--orange-6:#fd7e14;--orange-7:#f76707;--orange-8:#e8590c;--orange-9:#d9480f;--orange-10:#bf400d;--orange-11:#99330b;--orange-12:#802b09;--choco-0:#fff8dc;--choco-1:#fce1bc;--choco-2:#f7ca9e;--choco-3:#f1b280;--choco-4:#e99b62;--choco-5:#df8545;--choco-6:#d46e25;--choco-7:#bd5f1b;--choco-8:#a45117;--choco-9:#8a4513;--choco-10:#703a13;--choco-11:#572f12;--choco-12:#3d210d;--brown-0:#faf4eb;--brown-1:#ede0d1;--brown-2:#e0cab7;--brown-3:#d3b79e;--brown-4:#c5a285;--brown-5:#b78f6d;--brown-6:#a87c56;--brown-7:#956b47;--brown-8:#825b3a;--brown-9:#6f4b2d;--brown-10:#5e3a21;--brown-11:#4e2b15;--brown-12:#422412;--sand-0:#f8fafb;--sand-1:#e6e4dc;--sand-2:#d5cfbd;--sand-3:#c2b9a0;--sand-4:#aea58c;--sand-5:#9a9178;--sand-6:#867c65;--sand-7:#736a53;--sand-8:#5f5746;--sand-9:#4b4639;--sand-10:#38352d;--sand-11:#252521;--sand-12:#121210;--camo-0:#f9fbe7;--camo-1:#e8ed9c;--camo-2:#d2df4e;--camo-3:#c2ce34;--camo-4:#b5bb2e;--camo-5:#a7a827;--camo-6:#999621;--camo-7:#8c851c;--camo-8:#7e7416;--camo-9:#6d6414;--camo-10:#5d5411;--camo-11:#4d460e;--camo-12:#36300a;--jungle-0:#ecfeb0;--jungle-1:#def39a;--jungle-2:#d0e884;--jungle-3:#c2dd6e;--jungle-4:#b5d15b;--jungle-5:#a8c648;--jungle-6:#9bbb36;--jungle-7:#8fb024;--jungle-8:#84a513;--jungle-9:#7a9908;--jungle-10:#658006;--jungle-11:#516605;--jungle-12:#3d4d04;--gradient-1:linear-gradient(to bottom right,#1f005c,#5b0060,#870160,#ac255e,#ca485c,#e16b5c,#f39060,#ffb56b);--gradient-2:linear-gradient(to bottom right,#48005c,#8300e2,#a269ff);--gradient-3:radial-gradient(circle at top right,#0ff,rgba(0,255,255,0)),radial-gradient(circle at bottom left,#ff1492,rgba(255,20,146,0));--gradient-4:linear-gradient(to bottom right,#00f5a0,#00d9f5);--gradient-5:conic-gradient(from -270deg at 75% 110%,#f0f,#fffaf0);--gradient-6:conic-gradient(from -90deg at top left,#000,#fff);--gradient-7:linear-gradient(to bottom right,#72c6ef,#004e8f);--gradient-8:conic-gradient(from 90deg at 50% 0%,#111,50%,#222,#111);--gradient-9:conic-gradient(from .5turn at bottom center,#add8e6,#fff);--gradient-10:conic-gradient(from 90deg at 40% -25%,gold,#f79d03,#ee6907,#e6390a,#de0d0d,#d61039,#cf1261,#c71585,#cf1261,#d61039,#de0d0d,#ee6907,#f79d03,gold,gold,gold);--gradient-11:conic-gradient(at bottom left,#ff1493,cyan);--gradient-12:conic-gradient(from 90deg at 25% -10%,#ff4500,#d3f340,#7bee85,#afeeee,#7bee85);--gradient-13:radial-gradient(circle at 50% 200%,#000142,#3b0083,#b300c3,#ff059f,#ff4661,#ffad86,#fff3c7);--gradient-14:conic-gradient(at top right,lime,cyan);--gradient-15:linear-gradient(to bottom right,#c7d2fe,#fecaca,#fef3c7);--gradient-16:radial-gradient(circle at 50% -250%,#374151,#111827,#000);--gradient-17:conic-gradient(from -90deg at 50% -25%,blue,#8a2be2);--gradient-18:linear-gradient(0deg,rgba(255,0,0,.8),rgba(255,0,0,0) 75%),linear-gradient(60deg,rgba(255,255,0,.8),rgba(255,255,0,0) 75%),linear-gradient(120deg,rgba(0,255,0,.8),rgba(0,255,0,0) 75%),linear-gradient(180deg,rgba(0,255,255,.8),rgba(0,255,255,0) 75%),linear-gradient(240deg,rgba(0,0,255,.8),rgba(0,0,255,0) 75%),linear-gradient(300deg,rgba(255,0,255,.8),rgba(255,0,255,0) 75%);--gradient-19:linear-gradient(to bottom right,#ffe259,#ffa751);--gradient-20:conic-gradient(from -135deg at -10% center,orange,#ff7715,#ff522a,#ff3f47,#ff5482,#ff69b4);--gradient-21:conic-gradient(from -90deg at 25% 115%,red,#f06,#f0c,#c0f,#60f,#00f,#00f,#00f,#00f);--gradient-22:linear-gradient(to bottom right,#acb6e5,#86fde8);--gradient-23:linear-gradient(to bottom right,#536976,#292e49);--gradient-24:conic-gradient(from .5turn at 0% 0%,#00c476,10%,#82b0ff,90%,#00c476);--gradient-25:conic-gradient(at 125% 50%,#b78cf7,#ff7c94,#ffcf0d,#ff7c94,#b78cf7);--gradient-26:linear-gradient(to bottom right,#9796f0,#fbc7d4);--gradient-27:conic-gradient(from .5turn at bottom left,#ff1493,#639);--gradient-28:conic-gradient(from -90deg at 50% 105%,#fff,orchid);--gradient-29:radial-gradient(circle at top right,#bfb3ff,rgba(191,179,255,0)),radial-gradient(circle at bottom left,#86acf9,rgba(134,172,249,0));--gradient-30:radial-gradient(circle at top right,#00ff80,rgba(0,255,128,0)),radial-gradient(circle at bottom left,#adffd6,rgba(173,255,214,0));--noise-1:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.005' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");--noise-2:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.05' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");--noise-3:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.25' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");--noise-4:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 2056 2056' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");--noise-5:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 2056 2056' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");--noise-filter-1:contrast(300%) brightness(100%);--noise-filter-2:contrast(200%) brightness(150%);--noise-filter-3:contrast(200%) brightness(250%);--noise-filter-4:contrast(200%) brightness(500%);--noise-filter-5:contrast(200%) brightness(1000%);--animation-fade-in:fade-in .5s var(--ease-3);--animation-fade-in-bloom:fade-in-bloom 2s var(--ease-3);--animation-fade-out:fade-out .5s var(--ease-3);--animation-fade-out-bloom:fade-out-bloom 2s var(--ease-3);--animation-scale-up:scale-up .5s var(--ease-3);--animation-scale-down:scale-down .5s var(--ease-3);--animation-slide-out-up:slide-out-up .5s var(--ease-3);--animation-slide-out-down:slide-out-down .5s var(--ease-3);--animation-slide-out-right:slide-out-right .5s var(--ease-3);--animation-slide-out-left:slide-out-left .5s var(--ease-3);--animation-slide-in-up:slide-in-up .5s var(--ease-3);--animation-slide-in-down:slide-in-down .5s var(--ease-3);--animation-slide-in-right:slide-in-right .5s var(--ease-3);--animation-slide-in-left:slide-in-left .5s var(--ease-3);--animation-shake-x:shake-x .75s var(--ease-out-5);--animation-shake-y:shake-y .75s var(--ease-out-5);--animation-spin:spin 2s linear infinite;--animation-ping:ping 5s var(--ease-out-3) infinite;--animation-blink:blink 1s var(--ease-out-3) infinite;--animation-float:float 3s var(--ease-in-out-3) infinite;--animation-bounce:bounce 2s var(--ease-squish-2) infinite;--animation-pulse:pulse 2s var(--ease-out-3) infinite;--border-size-1:1px;--border-size-2:2px;--border-size-3:5px;--border-size-4:10px;--border-size-5:25px;--radius-1:2px;--radius-2:5px;--radius-3:1rem;--radius-4:2rem;--radius-5:4rem;--radius-6:8rem;--radius-round:1e5px;--radius-blob-1:30% 70% 70% 30%/53% 30% 70% 47%;--radius-blob-2:53% 47% 34% 66%/63% 46% 54% 37%;--radius-blob-3:37% 63% 56% 44%/49% 56% 44% 51%;--radius-blob-4:63% 37% 37% 63%/43% 37% 63% 57%;--radius-blob-5:49% 51% 48% 52%/57% 44% 56% 43%;--radius-conditional-1:clamp(0px, calc(100vw - 100%) * 1e5,var(--radius-1));--radius-conditional-2:clamp(0px, calc(100vw - 100%) * 1e5,var(--radius-2));--radius-conditional-3:clamp(0px, calc(100vw - 100%) * 1e5,var(--radius-3));--radius-conditional-4:clamp(0px, calc(100vw - 100%) * 1e5,var(--radius-4));--radius-conditional-5:clamp(0px, calc(100vw - 100%) * 1e5,var(--radius-5));--radius-conditional-6:clamp(0px, calc(100vw - 100%) * 1e5,var(--radius-6))}@media (prefers-color-scheme:dark){:where(html){--shadow-color:220 40% 2%;--shadow-strength:25%;--inner-shadow-highlight:inset 0 -.5px 0 0 hsla(0,0%,100%,.067),inset 0 .5px 0 0 rgba(0,0,0,.467)}}@keyframes fade-in{to{opacity:1}}@keyframes fade-in-bloom{0%{filter:brightness(1) blur(20px);opacity:0}10%{filter:brightness(2) blur(10px);opacity:1}to{filter:brightness(1) blur(0);opacity:1}}@keyframes fade-out{to{opacity:0}}@keyframes fade-out-bloom{to{filter:brightness(1) blur(20px);opacity:0}10%{filter:brightness(2) blur(10px);opacity:1}0%{filter:brightness(1) blur(0);opacity:1}}@keyframes scale-up{to{transform:scale(1.25)}}@keyframes scale-down{to{transform:scale(.75)}}@keyframes slide-out-up{to{transform:translateY(-100%)}}@keyframes slide-out-down{to{transform:translateY(100%)}}@keyframes slide-out-right{to{transform:translate(100%)}}@keyframes slide-out-left{to{transform:translate(-100%)}}@keyframes slide-in-up{0%{transform:translateY(100%)}}@keyframes slide-in-down{0%{transform:translateY(-100%)}}@keyframes slide-in-right{0%{transform:translate(-100%)}}@keyframes slide-in-left{0%{transform:translate(100%)}}@keyframes shake-x{0%,to{transform:translate(0)}20%{transform:translate(-5%)}40%{transform:translate(5%)}60%{transform:translate(-5%)}80%{transform:translate(5%)}}@keyframes shake-y{0%,to{transform:translateY(0)}20%{transform:translateY(-5%)}40%{transform:translateY(5%)}60%{transform:translateY(-5%)}80%{transform:translateY(5%)}}@keyframes spin{to{transform:rotate(1turn)}}@keyframes ping{90%,to{opacity:0;transform:scale(2)}}@keyframes blink{0%,to{opacity:1}50%{opacity:.5}}@keyframes float{50%{transform:translateY(-25%)}}@keyframes bounce{25%{transform:translateY(-20%)}40%{transform:translateY(-3%)}0%,60%,to{transform:translateY(0)}}@keyframes pulse{50%{transform:scale(.9)}}@media (prefers-color-scheme:dark){@keyframes fade-in-bloom{0%{filter:brightness(1) blur(20px);opacity:0}10%{filter:brightness(.5) blur(10px);opacity:1}to{filter:brightness(1) blur(0);opacity:1}}}@media (prefers-color-scheme:dark){@keyframes fade-out-bloom{to{filter:brightness(1) blur(20px);opacity:0}10%{filter:brightness(.5) blur(10px);opacity:1}0%{filter:brightness(1) blur(0);opacity:1}}}@font-face{font-family:Material Icons;font-style:normal;font-weight:400;font-display:block;src:url(./material-icons-kAwBdRge.woff2) format("woff2"),url(./material-icons-Dr0goTwe.woff) format("woff")}.material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}@font-face{font-family:Material Icons Outlined;font-style:normal;font-weight:400;font-display:block;src:url(./material-icons-outlined-DZhiGvEA.woff2) format("woff2"),url(./material-icons-outlined-BpWbwl2n.woff) format("woff")}.material-icons-outlined{font-family:Material Icons Outlined;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}@font-face{font-family:Material Icons Round;font-style:normal;font-weight:400;font-display:block;src:url(./material-icons-round-DrirKXBx.woff2) format("woff2"),url(./material-icons-round-BDlwx-sv.woff) format("woff")}.material-icons-round{font-family:Material Icons Round;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}@font-face{font-family:Material Icons Sharp;font-style:normal;font-weight:400;font-display:block;src:url(./material-icons-sharp-gidztirS.woff2) format("woff2"),url(./material-icons-sharp-CH1KkVu7.woff) format("woff")}.material-icons-sharp{font-family:Material Icons Sharp;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}@font-face{font-family:Material Icons Two Tone;font-style:normal;font-weight:400;font-display:block;src:url(./material-icons-two-tone-DuNIpaEj.woff2) format("woff2"),url(./material-icons-two-tone-B7wz7mED.woff) format("woff")}.material-icons-two-tone{font-family:Material Icons Two Tone;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}.vjs-svg-icon{display:inline-block;background-repeat:no-repeat;background-position:center;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-svg-icon:hover,.vjs-control:focus .vjs-svg-icon{filter:drop-shadow(0 0 .25em #fff)}.vjs-modal-dialog .vjs-modal-dialog-content,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.video-js .vjs-big-play-button .vjs-icon-placeholder:before{position:absolute;top:0;left:0;width:100%;height:100%}.vjs-button>.vjs-icon-placeholder:before,.video-js .vjs-big-play-button .vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABUgAAsAAAAAItAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV33Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADwwAABdk9R/WHmhlYWQAABGcAAAAKwAAADYn8kSnaGhlYQAAEcgAAAAdAAAAJA+RCL1obXR4AAAR6AAAABMAAAC8Q44AAGxvY2EAABH8AAAAYAAAAGB7SIHGbWF4cAAAElwAAAAfAAAAIAFAAI9uYW1lAAASfAAAASUAAAIK1cf1oHBvc3QAABOkAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7xDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADbZCycAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h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ZwBqwG9gdOB4oH0ggqCHAIhgicCMgJJAlWCYgJrAnyCkAKdgrkC7J4nGNgZGBg0GdoZmBnAAEmIOYCQgaG/2A+AwAaqwHQAHicXZBNaoNAGIZfE5PQCKFQ2lUps2oXBfOzzAESyDKBQJdGR2NQR3QSSE/QE/QEPUUPUHqsvsrXjTMw83zPvPMNCuAWP3DQDAejdm1GjzwS7pMmwi75XngAD4/CQ/oX4TFe4Qt7uMMbOzjuDc0EmXCP/C7cJ38Iu+RP4QEe8CU8pP8WHmOPX2EPz87TPo202ey2OjlnQSXV/6arOjWFmvszMWtd6CqwOlKHq6ovycLaWMWVydXKFFZnmVFlZU46tP7R2nI5ncbi/dDkfDtFBA2DDXbYkhKc+V0Bqs5Zt9JM1HQGBRTm/EezTmZNKtpcAMs9Yu6AK9caF76zoLWIWcfMGOSkVduvSWechqZsz040Ib2PY3urxBJTzriT95lipz+TN1fmAAAAeJxtkXlT2zAQxf1C4thJAwRajt4HRy8VMwwfSJHXsQZZcnUQ+PYoTtwpM+wf2t9brWZ2n5JBsol58nJcYYAdDDFCijEy5JhgileYYRd72MccBzjEa7zBEY5xglO8xTu8xwd8xCd8xhd8xTec4RwXuMR3/MBP/MJvMPzBFYpk2Cr+OF0fTEgrFI1aHhxN740KDbEmeJpsWZlVj40s+45aLuv9KijlhCXSjLQnu/d/4UH6sWul1mRzFxZeekUuE7z10mg3qMtM1FGQddPSrLQyvJR6OaukItYXDp6pCJrmz0umqkau5pZ2hFmm7m+ImG5W2t0kZoJXUtPhVnYTbbdOBdeCVGqpJe7XKTqSbRK7zbdwXfR0U+SVsStuS3Y76em6+Ic3xYiHUppc04Nn0lMzay3dSxNcp8auDlWlaCi48yetFD7Y9USsx87G45cuop1ZxQUtjLnL4j53FO0a+5X08UXqQ7NQNo92R0XOz7sxWEnxN2TneJI8Acttu4Q=) format("woff");font-weight:400;font-style:normal}.vjs-icon-play,.video-js .vjs-play-control .vjs-icon-placeholder,.video-js .vjs-big-play-button .vjs-icon-placeholder:before{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-play:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.video-js .vjs-big-play-button .vjs-icon-placeholder:before{content:""}.vjs-icon-play-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-play-circle:before{content:""}.vjs-icon-pause,.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-pause:before,.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before{content:""}.vjs-icon-volume-mute,.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-mute:before,.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before{content:""}.vjs-icon-volume-low,.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-low:before,.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before{content:""}.vjs-icon-volume-mid,.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-mid:before,.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before{content:""}.vjs-icon-volume-high,.video-js .vjs-mute-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-high:before,.video-js .vjs-mute-control .vjs-icon-placeholder:before{content:""}.vjs-icon-fullscreen-enter,.video-js .vjs-fullscreen-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-fullscreen-enter:before,.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before{content:""}.vjs-icon-fullscreen-exit,.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-fullscreen-exit:before,.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before{content:""}.vjs-icon-spinner{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-spinner:before{content:""}.vjs-icon-subtitles,.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-subtitles:before,.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before{content:""}.vjs-icon-captions,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-captions-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-captions:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-captions-button .vjs-icon-placeholder:before{content:""}.vjs-icon-hd{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-hd:before{content:""}.vjs-icon-chapters,.video-js .vjs-chapters-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-chapters:before,.video-js .vjs-chapters-button .vjs-icon-placeholder:before{content:""}.vjs-icon-downloading{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-downloading:before{content:""}.vjs-icon-file-download{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-file-download:before{content:""}.vjs-icon-file-download-done{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-file-download-done:before{content:""}.vjs-icon-file-download-off{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-file-download-off:before{content:""}.vjs-icon-share{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-share:before{content:""}.vjs-icon-cog{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cog:before{content:""}.vjs-icon-square{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-square:before{content:""}.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder,.video-js .vjs-volume-level,.video-js .vjs-play-progress{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before,.video-js .vjs-volume-level:before,.video-js .vjs-play-progress:before{content:""}.vjs-icon-circle-outline{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-outline:before{content:""}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-inner-circle:before{content:""}.vjs-icon-cancel,.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cancel:before,.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before{content:""}.vjs-icon-repeat{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-repeat:before{content:""}.vjs-icon-replay,.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-replay:before,.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before{content:""}.vjs-icon-replay-5,.video-js .vjs-skip-backward-5 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-replay-5:before,.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before{content:""}.vjs-icon-replay-10,.video-js .vjs-skip-backward-10 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-replay-10:before,.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before{content:""}.vjs-icon-replay-30,.video-js .vjs-skip-backward-30 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-replay-30:before,.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before{content:""}.vjs-icon-forward-5,.video-js .vjs-skip-forward-5 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-forward-5:before,.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before{content:""}.vjs-icon-forward-10,.video-js .vjs-skip-forward-10 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-forward-10:before,.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before{content:""}.vjs-icon-forward-30,.video-js .vjs-skip-forward-30 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-forward-30:before,.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before{content:""}.vjs-icon-audio,.video-js .vjs-audio-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-audio:before,.video-js .vjs-audio-button .vjs-icon-placeholder:before{content:""}.vjs-icon-next-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-next-item:before{content:""}.vjs-icon-previous-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-previous-item:before{content:""}.vjs-icon-shuffle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-shuffle:before{content:""}.vjs-icon-cast{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cast:before{content:""}.vjs-icon-picture-in-picture-enter,.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-picture-in-picture-enter:before,.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before{content:""}.vjs-icon-picture-in-picture-exit,.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-picture-in-picture-exit:before,.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before{content:""}.vjs-icon-facebook{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-facebook:before{content:""}.vjs-icon-linkedin{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-linkedin:before{content:""}.vjs-icon-twitter{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-twitter:before{content:""}.vjs-icon-tumblr{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-tumblr:before{content:""}.vjs-icon-pinterest{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-pinterest:before{content:""}.vjs-icon-audio-description,.video-js .vjs-descriptions-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-audio-description:before,.video-js .vjs-descriptions-button .vjs-icon-placeholder:before{content:""}.video-js{display:inline-block;vertical-align:top;box-sizing:border-box;color:#fff;background-color:#000;position:relative;padding:0;font-size:10px;line-height:1;font-weight:400;font-style:normal;font-family:Arial,Helvetica,sans-serif;word-break:initial}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{width:100%!important;height:100%!important}.video-js[tabindex="-1"]{outline:none}.video-js *,.video-js *:before,.video-js *:after{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-fluid,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-1-1{width:100%;max-width:100%}.video-js.vjs-fluid:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-1-1:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js.vjs-fill:not(.vjs-audio-only-mode){width:100%;height:100%}.video-js .vjs-tech{position:absolute;top:0;left:0;width:100%;height:100%}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{padding:0;margin:0;height:100%}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{position:fixed;overflow:hidden;z-index:1000;left:0;top:0;bottom:0;right:0}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{width:100%!important;height:100%!important;padding-top:0!important;display:block}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{position:absolute;bottom:10%;font-size:2em;background-color:#000000b3;padding:.5em;text-align:center;width:100%}.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text,.vjs-layout-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{opacity:.5;cursor:default}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{padding:20px;color:#fff;background-color:#000;font-size:18px;font-family:Arial,Helvetica,sans-serif;text-align:center;width:300px;height:150px;margin:0 auto}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{font-size:3em;line-height:1.5em;height:1.63332em;width:3em;display:block;position:absolute;top:50%;left:50%;padding:0;margin-top:-.81666em;margin-left:-1.5em;cursor:pointer;opacity:1;border:.06666em solid #fff;background-color:#2b333f;background-color:#2b333fb3;border-radius:.3em;transition:all .4s}.vjs-big-play-button .vjs-svg-icon{width:1em;height:1em;position:absolute;top:50%;left:50%;line-height:1;transform:translate(-50%,-50%)}.video-js:hover .vjs-big-play-button,.video-js .vjs-big-play-button:focus{border-color:#fff;background-color:#73859f;background-color:#73859f80;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button,.vjs-error .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause:not(.vjs-seeking,.vjs-scrubbing,.vjs-error) .vjs-big-play-button{display:block}.video-js button{background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-transform:none;text-decoration:none;transition:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.vjs-control .vjs-button{width:100%;height:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:#000c;background:linear-gradient(180deg,#000c,#fff0);overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;padding:0;margin:0;font-family:Arial,Helvetica,sans-serif;overflow:auto}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;justify-content:center;list-style:none;margin:0;padding:.2em 0;line-height:1.4em;font-size:1.2em;text-align:center;text-transform:lowercase}.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover,.js-focus-visible .vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:#73859f80}.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover,.js-focus-visible .vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon,.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.video-js .vjs-menu *:not(.vjs-selected):focus:not(:focus-visible),.js-focus-visible .vjs-menu *:not(.vjs-selected):focus:not(.focus-visible){background:none}.vjs-menu li.vjs-menu-title{text-align:center;text-transform:uppercase;font-size:1em;line-height:2em;padding:0;margin:0 0 .3em;font-weight:700;cursor:default}.vjs-menu-button-popup .vjs-menu{display:none;position:absolute;bottom:0;width:10em;left:-3em;height:0em;margin-bottom:1.5em;border-top-color:#2b333fb3}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:#2b333fb3;position:absolute;width:100%;bottom:1.5em;max-height:15em}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu,.vjs-menu-button-popup .vjs-menu.vjs-lock-showing{display:block}.video-js .vjs-menu-button-inline{transition:all .4s;overflow:hidden}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline:hover,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline.vjs-slider-active{width:12em}.vjs-menu-button-inline .vjs-menu{opacity:0;height:100%;width:auto;position:absolute;left:4em;top:0;padding:0;margin:0;transition:all .4s}.vjs-menu-button-inline:hover .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline.vjs-slider-active .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{width:auto;height:100%;margin:0;overflow:hidden}.video-js .vjs-control-bar{display:none;width:100%;position:absolute;bottom:0;left:0;right:0;height:3em;background-color:#2b333f;background-color:#2b333fb3}.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-has-started .vjs-control-bar,.vjs-audio-only-mode .vjs-control-bar{display:flex;visibility:visible;opacity:1;transition:visibility .1s,opacity .1s}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{visibility:visible;opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s}.vjs-controls-disabled .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar,.vjs-error .vjs-control-bar{display:none!important}.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;visibility:visible;pointer-events:auto}.video-js .vjs-control{position:relative;text-align:center;margin:0;padding:0;height:100%;width:4em;flex:none}.video-js .vjs-control.vjs-visible-text{width:auto;padding-left:1em;padding-right:1em}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before,.video-js .vjs-control:focus{text-shadow:0em 0em 1em white}.video-js *:not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{cursor:pointer;flex:auto;display:flex;align-items:center;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{display:flex;align-items:center}.video-js .vjs-progress-holder{flex:auto;transition:all .2s;height:.3em}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-play-progress,.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div{position:absolute;display:block;height:100%;margin:0;padding:0;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;position:absolute;right:-.5em;line-height:.35em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{position:absolute;top:-.35em;right:-.4em;width:.9em;height:.9em;pointer-events:none;line-height:.15em;z-index:1}.video-js .vjs-load-progress{background:#73859f80}.video-js .vjs-load-progress div{background:#73859fbf}.video-js .vjs-time-tooltip{background-color:#fff;background-color:#fffc;border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{display:none;position:absolute;width:1px;height:100%;background-color:#000;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{visibility:hidden;opacity:0;transition:visibility 1s,opacity 1s}.vjs-mouse-display .vjs-time-tooltip{color:#fff;background-color:#000;background-color:#000c}.video-js .vjs-slider{position:relative;cursor:pointer;padding:0;margin:0 .45em;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:#73859f;background-color:#73859f80}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{text-shadow:0em 0em 1em white;box-shadow:0 0 1em #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;margin-right:1em;display:flex}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{visibility:visible;opacity:0;width:1px;height:1px;margin-left:-1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active{visibility:visible;opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s}.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal{width:5em;height:3em;margin-right:0}.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active{width:10em;transition:width .1s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;width:3em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{width:5em;height:.3em}.vjs-volume-bar.vjs-slider-vertical{width:.3em;height:5em;margin:1.35em auto}.video-js .vjs-volume-level{position:absolute;bottom:0;left:0;background-color:#fff}.video-js .vjs-volume-level:before{position:absolute;font-size:.9em;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{top:-.5em;left:-.3em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{position:absolute;width:.9em;height:.9em;pointer-events:none;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;transform:translate(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{width:3em;height:8em;bottom:8em;background-color:#2b333f;background-color:#2b333fb3}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:#fffc;border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{display:none;position:absolute;width:100%;height:1px;background-color:#000;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{width:1px;height:100%}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{visibility:hidden;opacity:0;transition:visibility 1s,opacity 1s}.vjs-mouse-display .vjs-volume-tooltip{color:#fff;background-color:#000;background-color:#000c}.vjs-poster{display:inline-block;vertical-align:middle;cursor:pointer;margin:0;padding:0;position:absolute;top:0;right:0;bottom:0;left:0;height:100%}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.video-js .vjs-live-control{display:flex;align-items:flex-start;flex:auto;font-size:1em;line-height:3em}.video-js:not(.vjs-live) .vjs-live-control,.video-js.vjs-liveui .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;flex:none;display:inline-flex;height:100%;padding-left:.5em;padding-right:.5em;font-size:1em;line-height:3em;width:auto;min-width:4em}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{margin-right:.5em;color:#888}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{width:1em;height:1em;pointer-events:none;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;width:auto;padding-left:1em;padding-right:1em}.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider,.video-js .vjs-current-time,.video-js .vjs-duration{display:none}.vjs-time-divider{display:none;line-height:3em}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{position:absolute;bottom:3em;left:0;right:0;top:0;pointer-events:none}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;text-align:center;margin-bottom:.1em}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate>.vjs-menu-button,.vjs-playback-rate .vjs-playback-rate-value{position:absolute;top:0;left:0;width:100%;height:100%}.vjs-playback-rate .vjs-playback-rate-value{pointer-events:none;font-size:1.5em;line-height:2;text-align:center}.vjs-playback-rate .vjs-menu{width:4em;left:0}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-loading-spinner{display:none;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);opacity:.85;text-align:left;border:.6em solid rgba(43,51,63,.7);box-sizing:border-box;background-clip:padding-box;width:5em;height:5em;border-radius:50%;visibility:hidden}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{display:flex;justify-content:center;align-items:center;animation:vjs-spinner-show 0s linear .3s forwards}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:before,.vjs-loading-spinner:after{content:"";position:absolute;box-sizing:inherit;width:inherit;height:inherit;border-radius:inherit;opacity:1;border:inherit;border-color:transparent;border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:before,.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{border-top-color:#fff;animation-delay:.44s}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(360deg)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{width:1.5em;height:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:"";font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-description-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-audio-button+.vjs-menu .vjs-description-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:" ";font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover{width:auto;width:initial}.video-js.vjs-layout-x-small .vjs-progress-control,.video-js.vjs-layout-tiny .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{flex:auto;display:block}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:#2b333fbf;color:#fff;height:70%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-font,.vjs-text-track-settings .vjs-track-settings-controls{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display: grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-right:1em;margin-bottom:.5em}.vjs-text-track-settings fieldset{margin:10px;border:none}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-weight:700;font-size:1.2em}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:focus,.vjs-track-settings-controls button:active{outline-style:solid;outline-width:medium;background-image:linear-gradient(0deg,#fff 88%,#73859f)}.vjs-track-settings-controls button:hover{color:#2b333fbf}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);color:#2b333f;cursor:pointer;border-radius:2px}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:#000000e6;background:linear-gradient(180deg,#000000e6,#000000b3 60%,#0000);font-size:1.2em;line-height:1.5;transition:opacity .1s;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-title,.vjs-title-bar-description{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-forward-5,.video-js .vjs-skip-forward-10,.video-js .vjs-skip-forward-30,.video-js .vjs-skip-backward-5,.video-js .vjs-skip-backward-10,.video-js .vjs-skip-backward-30{cursor:pointer}@media print{.video-js>*:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{position:absolute;top:0;left:0;width:100%;height:100%;border:none;z-index:-1000}.js-focus-visible .video-js *:focus:not(.focus-visible){outline:none}.video-js *:focus:not(:focus-visible){outline:none}.pillarbox-js:hover .vjs-big-play-button{background-color:#16161688;transition:background-color .25s ease}.pillarbox-js .vjs-big-play-button{width:2em;height:2em;margin:0;font-size:2.25em;background:#0000;border:.1em solid #fff;border-radius:50%;transform:translate(-50%,-50%);transition:background-color .25s ease}.pillarbox-js .vjs-big-play-button .vjs-icon-placeholder:before{position:initial;display:flex;align-items:center;justify-content:center;font-size:1.75em}.pillarbox-js .vjs-modal-dialog.vjs-text-track-settings{top:50%;left:50%;max-width:25em;max-height:50em;background:#161616f2;border-radius:.5em;box-shadow:2px 2px 3px #0005;transform:translate(-50%,-50%);overscroll-behavior:contain}.pillarbox-js .vjs-text-track-settings .vjs-modal-dialog-content{display:flex;flex-direction:column;padding:1em 1.5em 0}.pillarbox-js .vjs-text-track-settings legend{font-size:1em}.pillarbox-js .vjs-text-track-settings fieldset span{padding-inline:0}.pillarbox-js .vjs-text-track-settings fieldset{display:flex;margin:0 0 1em;padding:0}.pillarbox-js.video-js .vjs-text-track-settings select{margin:.25em 0 0;padding:.5em;color:#fff;background:#3f3f3f;border:none;-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}.pillarbox-js.video-js .vjs-text-track-settings select:focus-within{outline:solid}.pillarbox-js .vjs-track-settings-controls{display:flex;flex-direction:row;gap:1em;justify-content:end}.pillarbox-js .vjs-track-settings-controls button{margin-block:1em;padding:.25em .5em;color:#fff;background:#3f3f3f}.pillarbox-js .vjs-track-settings-controls button:hover{background:#5c5c5c}.pillarbox-js .vjs-track-settings-controls .vjs-default-button{margin-right:0}.pillarbox-js .vjs-control{height:3em}.pillarbox-js:not(.vjs-audio-only-mode) .vjs-control-bar{align-items:end;height:6em;padding-inline:1em;background:linear-gradient(#000,#0000 0%,#000000b3)}.pillarbox-js.vjs-audio-only-mode .vjs-control-bar{background-color:#1e232c}.pillarbox-js:not(.vjs-audio-only-mode) .vjs-custom-control-spacer{display:block;flex:auto}.pillarbox-js .vjs-error-display .vjs-modal-dialog-content{display:flex;align-items:center;justify-content:center}.pillarbox-js.vjs-layout-tiny{font-size:8px}.pillarbox-js.vjs-layout-x-small{font-size:10px}.pillarbox-js.vjs-layout-small{font-size:12px}.pillarbox-js.vjs-layout-medium{font-size:14px}.pillarbox-js.vjs-layout-large{font-size:16px}.pillarbox-js.vjs-layout-x-large{font-size:18px}.pillarbox-js.vjs-layout-huge{font-size:20px}.pillarbox-js:not(.vjs-layout-tiny,.vjs-layout-x-small,.vjs-live) .vjs-time-divider,.pillarbox-js:not(.vjs-layout-tiny,.vjs-layout-x-small,.vjs-live) .vjs-current-time,.pillarbox-js:not(.vjs-layout-tiny,.vjs-layout-x-small,.vjs-live) .vjs-duration{display:block;padding:0;font-weight:700}.pillarbox-js.vjs-layout-tiny .vjs-progress-control,.pillarbox-js.vjs-layout-x-small .vjs-progress-control{display:flex}.pillarbox-js.vjs-layout-x-small.vjs-audio-only-mode .vjs-custom-control-spacer{display:none}.pillarbox-js .vjs-loading-spinner{border:.25em solid rgba(0,0,0,0)}.pillarbox-js .vjs-loading-spinner{display:flex;align-items:center;justify-content:center}@keyframes vjs-spinner-fade{0%{border-top-color:#333}20%{border-top-color:#333}35%{border-top-color:#fff}60%{border-top-color:#333}to{border-top-color:#333}}.pillarbox-js .vjs-menu .vjs-menu-item{border-radius:.25em}.pillarbox-js .vjs-menu .vjs-menu-item:not(.vjs-selected):focus,.pillarbox-js .vjs-menu .vjs-menu-item:not(.vjs-selected):hover{background-color:#3f3f3f}.pillarbox-js .vjs-menu .vjs-menu-item.vjs-texttrack-settings:focus,.pillarbox-js .vjs-menu .vjs-menu-item.vjs-texttrack-settings:hover{background-color:#0000}.pillarbox-js .vjs-menu .vjs-menu-item .vjs-selected{color:#222;background-color:#fff;pointer-events:none}.pillarbox-js .vjs-menu-button-popup.vjs-hover .vjs-menu{display:none}.pillarbox-js .vjs-menu-button-popup .vjs-menu{right:0;bottom:0;left:unset;width:100%;margin:0}.pillarbox-js .vjs-menu-button-popup .vjs-menu .vjs-menu-content{right:50%;bottom:5em;display:grid;gap:.25em;min-width:13em;padding:1em .5em;background:#161616f2;border-radius:.5em;transform:translate(50%);overscroll-behavior:contain}.pillarbox-js .vjs-slider{background-color:#ffffff4d;border-radius:1em}.pillarbox-js .vjs-text-track-display{top:0;right:0;bottom:4em;left:0}.pillarbox-js .vjs-current-time{margin-left:1em}.pillarbox-js .vjs-time-divider{min-width:1em;text-align:center}.pillarbox-js .vjs-remaining-time{display:none}.pillarbox-js.vjs-audio-only-mode .vjs-current-time,.pillarbox-js.vjs-audio-only-mode .vjs-time-divider,.pillarbox-js.vjs-audio-only-mode .vjs-duration{order:1}.pillarbox-js.vjs-audio-only-mode .vjs-duration{margin-right:1em}.pillarbox-js .vjs-title-bar{padding-bottom:2em;background:linear-gradient(rgba(0,0,0,.6) 0%,transparent 100%)}.pillarbox-js:not(.vjs-audio-only-mode) .vjs-progress-control{position:absolute;bottom:3em;width:calc(100% - 2em);height:1em}.pillarbox-js .vjs-progress-holder{margin:0}.pillarbox-js .vjs-load-progress{background:#ffffff4d;border-radius:1em}.pillarbox-js .vjs-load-progress div{background:#0000}.pillarbox-js.vjs-scrubbing .vjs-play-progress .vjs-time-tooltip,.pillarbox-js.vjs-seeking .vjs-play-progress .vjs-time-tooltip{display:none}.pillarbox-js .vjs-play-progress{color:#af001e;background:#af001e;border-radius:1em}.pillarbox-js .vjs-play-progress:before{font-size:0px;text-shadow:0px 0px 1px #000}.pillarbox-js .vjs-progress-control:hover .vjs-play-progress:before{font-size:.9em}.pillarbox-js .vjs-progress-control:hover .vjs-time-tooltip{right:0%!important;transform:translate(50%)}.pillarbox-js .vjs-progress-holder:focus-visible .vjs-play-progress:before{font-size:.9em}.pillarbox-js .vjs-time-tooltip,.pillarbox-js .vjs-mouse-display .vjs-time-tooltip{top:-3em;padding:.4em;color:#fff;font-weight:700;text-shadow:1px 1px 3px #000,1px 1px 2px #000;background-color:#0000}.pillarbox-js .vjs-volume-level{border-radius:1em}.pillarbox-js .vjs-volume-tooltip{top:-2em;padding:.4em;font-weight:700;text-shadow:1px 1px 3px #000;background-color:#0000}*,*:before,*:after{box-sizing:border-box}html{overflow-y:scroll;--color-1: var(--gray-1);--color-2: var(--gray-2);--color-3: var(--gray-3);--color-4: var(--gray-4);--color-5: var(--gray-5);--color-6: var(--gray-6);--color-7: var(--gray-7);--color-8: var(--gray-8);--color-9: var(--gray-9);--color-10: var(--gray-10);--color-11: var(--gray-11);--color-12: var(--gray-12)}@media (prefers-color-scheme: light){html{--color-1: var(--gray-12);--color-2: var(--gray-11);--color-3: var(--gray-10);--color-4: var(--gray-9);--color-5: var(--gray-8);--color-6: var(--gray-7);--color-7: var(--gray-6);--color-8: var(--gray-5);--color-9: var(--gray-4);--color-10: var(--gray-3);--color-11: var(--gray-2);--color-12: var(--gray-1)}}body{max-width:var(--size-md);margin:0 auto;padding:0 var(--size-2);color:var(--color-4);font-size:var(--size-5);font-family:var(--font-sans);background-color:var(--color-11)} diff --git a/pr-preview/pr-26/assets/index-a-5YWSrH.js b/pr-preview/pr-26/assets/index-a-5YWSrH.js new file mode 100644 index 0000000..b62b724 --- /dev/null +++ b/pr-preview/pr-26/assets/index-a-5YWSrH.js @@ -0,0 +1,921 @@ +var li=Object.defineProperty;var mi=(t,n,e)=>n in t?li(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e;var x=(t,n,e)=>(mi(t,typeof n!="symbol"?n+"":n,e),e),Yt=(t,n,e)=>{if(!n.has(t))throw TypeError("Cannot "+e)};var y=(t,n,e)=>(Yt(t,n,"read from private field"),e?e.call(t):n.get(t)),b=(t,n,e)=>{if(n.has(t))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(t):n.set(t,e)},Z=(t,n,e,o)=>(Yt(t,n,"write to private field"),o?o.call(t,e):n.set(t,e),e);var l=(t,n,e)=>(Yt(t,n,"access private method"),e);import{s as A,t as P,a as U,r as O,x as u,p as yn,b as w,e as fi,i as bi,c as di,w as pi,d as Pn,v as wn,g as ui,o as Un}from"./core-demo-header-component-76S4-KyJ.js";const hi="[part=container]{block-size:480px;aspect-ratio:var(--ratio-widescreen);padding:0;overflow:visible;background-color:var(--color-12)}[part=close-btn]{position:absolute;top:calc(var(--size-3) * -1);right:0;z-index:2;width:var(--size-7);height:var(--size-7);font-size:var(--size-4);text-align:center;background:var(--gray-6);border-radius:var(--radius-round)}";var Q,tt,Bn,nt,Hn;class tn extends A{constructor(){super();b(this,tt);b(this,nt);b(this,Q,void 0);this.open=!1}updated(e){super.updated(e),e.has("open")&&(this.open?(y(this,Q).showModal(),y(this,Q).classList.toggle("slide-up-fade-in",!0)):y(this,Q).close())}firstUpdated(e){super.firstUpdated(e),Z(this,Q,this.shadowRoot.querySelector("dialog"))}render(){return u` + + + + + `}}Q=new WeakMap,tt=new WeakSet,Bn=function(){this.dispatchEvent(new CustomEvent("close"))},nt=new WeakSet,Hn=function(e){y(this,Q)===e.target&&(this.open=!1)},x(tn,"properties",{open:{type:Boolean,reflect:!0}}),x(tn,"styles",[P,U,O(hi)]);customElements.define("demo-dialog",tn);class he{static loadPreferences(){return JSON.parse(localStorage.getItem("preferences"))||{}}static savePreferences(n){localStorage.setItem("preferences",JSON.stringify(n))}}const nn="il.srgssr.ch",J={vector:"srgplay"},gi={includeAggregations:!1,includeSuggestions:!1,sortBy:"default",sortDir:"desc",pageSize:50,...J},vi={onlyActiveShows:!0,...J},re=({title:t,urn:n,mediaType:e,date:o,duration:i})=>({title:t,urn:n,mediaType:e,date:o,duration:i});var Te,N,D,V,Y;class yi{constructor(n=nn){b(this,N);b(this,V);b(this,Te,void 0);this.host=n}get host(){return y(this,Te)}set host(n){Z(this,Te,n||nn)}async search(n,e,o=void 0){const i=await l(this,N,D).call(this,`/${n.toLowerCase()}/searchResultMediaList`,{...gi,q:e},o),a=r=>r.searchResultMediaList.map(re);return{results:a(i),next:i.next?l(this,V,Y).call(this,i.next,a):void 0}}async topics(n,e="tv"){return(await l(this,N,D).call(this,`/${n.toLowerCase()}/topicList/${e}`)).topicList.map(({title:i,urn:a})=>({title:i,urn:a}))}async latestByTopic(n,e=30){const o=await l(this,N,D).call(this,`/mediaList/latest/byTopicUrn/${n}`,{pageSize:e}),i=a=>a.mediaList.map(re);return{results:i(o),next:o.next?l(this,V,Y).call(this,o.next,i):void 0}}async shows(n,e="unlimited",o="tv"){return(await l(this,N,D).call(this,`/${n.toLowerCase()}/showList/${o}/alphabetical`,{...vi,pageSize:e})).showList.map(({title:a,urn:r})=>({title:a,urn:r}))}async latestByShow(n,e=30){const o=await l(this,N,D).call(this,`/episodeComposition/latestByShow/byUrn/${n}`,{...J,pageSize:e}),i=a=>a.episodeList.map(({mediaList:r})=>r[0]).map(re);return{results:i(o),next:o.next?l(this,V,Y).call(this,o.next,i):void 0}}async editorial(n,e=30){const o=await l(this,N,D).call(this,`/${n.toLowerCase()}/mediaList/video/editorial`,{...J,pageSize:e}),i=a=>a.mediaList.map(re);return{results:i(o),next:o.next?l(this,V,Y).call(this,o.next,i):void 0}}async livestreams(n,e="video"){return(await l(this,N,D).call(this,`/${n.toLowerCase()}/mediaList/${e}/livestreams`)).mediaList.map(re)}async scheduledLivestream(n,e=10){const o=await l(this,N,D).call(this,`/${n.toLowerCase()}/mediaList/video/scheduledLivestreams`,{...J,pageSize:e}),i=a=>a.mediaList.map(re);return{results:i(o),next:o.next?l(this,V,Y).call(this,o.next,i):void 0}}async livecenter(n,e=10){const o=await l(this,N,D).call(this,`/${n.toLowerCase()}/mediaList/video/scheduledLivestreams/livecenter`,{...J,pageSize:e}),i=a=>a.mediaList.map(re);return{results:i(o),next:o.next?l(this,V,Y).call(this,o.next,i):void 0}}async channels(n,e="radio"){return(await l(this,N,D).call(this,`/${n.toLowerCase()}/channelList/${e}`)).channelList.map(({title:i,id:a})=>({title:i,id:a}))}async radioShowByChannel(n,e,o="unlimited"){return(await l(this,N,D).call(this,`/${n.toLowerCase()}/showList/radio/alphabeticalByChannel/${e}`,{...J,pageSize:o})).showList.map(({title:a,urn:r})=>({title:a,urn:r}))}}Te=new WeakMap,N=new WeakSet,D=async function(n,e=J,o=void 0){const i=new URLSearchParams(e).toString(),a=`https://${this.host}/integrationlayer/2.0/${n.replace(/^\/+/,"")}?${i}`;return fetch(a,{signal:o}).then(r=>r.ok?r.json():Promise.reject(r)).catch(r=>Promise.reject(r))},V=new WeakSet,Y=function(n,e){return async(o=void 0)=>{const i=await fetch(n,{signal:o}).then(r=>r.ok?r.json():Promise.reject(r)).catch(r=>Promise.reject(r));return{results:e(i),next:l(this,V,Y).call(this,i.next,e)}}};const I=new yi,qn="player",wi={fill:!0,restoreEl:!0},ki=(t={})=>{const n=he.loadPreferences();return window.player=new yn(qn,{...wi,muted:n.muted??!0,autoplay:n.autoplay??!1,debug:n.debug??!1,srgOptions:{dataProviderHost:n.dataProviderHost??nn},...t}),window.player},xi=()=>{yn.getPlayer(qn).dispose(),window.player=null};window.pillarbox=yn;const Fn=document.querySelector("demo-dialog"),Gn=t=>{const n=Object.keys(t??{})[0];return n?{vendor:n,...t[n]}:{}},Si=t=>{if(!t.vendor)return;const n={},{certificateUrl:e,licenseUrl:o}=t;return n[t.vendor]={certificateUrl:e,licenseUrl:o},n},Ei=({src:t,type:n,keySystems:e})=>new URLSearchParams({src:t,type:n,...Gn(e)}).toString();Fn.addEventListener("close",()=>{xi(),w.updateState({},["src","type","vendor","certificateUrl","licenseUrl"])});const Vn=t=>{const n=t.detail.queryParams;if("src"in n){const{src:e,type:o}=n,i=Si(n);Wn({src:e,type:o,keySystems:i})}};w.addEventListener("routechanged",Vn);w.addEventListener("queryparams",Vn);const Wn=({src:t,type:n,keySystems:e,playerOptions:o},i=!0)=>{const a=ki(o??{});return Fn.open=!0,a.src({src:t,type:n,keySystems:e}),i&&w.updateState({src:t,...n?{type:n}:{},...Gn(e)}),a},Ri=".load-bar-container{display:flex;align-items:center;padding:0 var(--size-3);background-color:var(--color-8);border-radius:var(--radius-2)}.load-bar-container input{width:90%}.load-bar-container button{background-color:var(--color-8);border:0}.drm-settings-container{display:none}.drm-settings-container input{border-radius:var(--radius-2)}.drm-settings-container select{border-right:var(--size-5) solid var(--color-8)}.drm-settings-container.active{display:flex;flex-direction:column}.load-bar-action{width:100%}";/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const Je=fi(class extends bi{constructor(t){var n;if(super(t),t.type!==di.ATTRIBUTE||t.name!=="class"||((n=t.strings)==null?void 0:n.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(n=>t[n]).join(" ")+" "}update(t,[n]){var o,i;if(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(const a in n)n[a]&&!((o=this.nt)!=null&&o.has(a))&&this.st.add(a);return this.render(n)}const e=t.element.classList;for(const a of this.st)a in n||(e.remove(a),this.st.delete(a));for(const a in n){const r=!!n[a];r===this.st.has(a)||(i=this.nt)!=null&&i.has(a)||(r?(e.add(a),this.st.add(a)):(e.remove(a),this.st.delete(a)))}return pi}});var Ae,rn,Me,cn,ot,Kn,it,Zn,rt,Xn,ct,Yn,at,Jn;class on extends A{constructor(){super();b(this,Ae);b(this,Me);b(this,ot);b(this,it);b(this,rt);b(this,ct);b(this,at);this.src="",l(this,Ae,rn).call(this)}render(){const e={spin:this.drmSettingsShown===!0,"spin-back":this.drmSettingsShown===!1};return u` +
+
+ insert_link + + +
+ + ${l(this,at,Jn).call(this)} + + +
+ `}updated(e){super.updated(e),e.has("drmSettingsShown")&&this.drmSettingsShown&&this.shadowRoot.querySelector(".drm-settings-container").classList.add("active")}}Ae=new WeakSet,rn=function(){this.drmSettings={vendor:"",certificateUrl:"",licenseUrl:""}},Me=new WeakSet,cn=function(){const e=this.src,o=e.startsWith("urn:")?"srgssr/urn":void 0,i=y(this,it,Zn);this.dispatchEvent(new CustomEvent("submit-media",{detail:{src:e,type:o,keySystems:i}}))},ot=new WeakSet,Kn=function(e){this.src=e.target.value,e.key==="Enter"&&this.src&&l(this,Me,cn).call(this)},it=new WeakSet,Zn=function(){var i;if(!((i=this.drmSettings)!=null&&i.vendor))return;const e=this.drmSettings.certificateUrl,o=this.drmSettings.licenseUrl;return this.drmSettings.vendor==="com.apple.fps.1_0"?{[this.drmSettings.vendor]:{certificateUrl:e,licenseUrl:o}}:{[this.drmSettings.vendor]:{licenseUrl:o}}},rt=new WeakSet,Xn=function(e){e.target.classList.toggle("active",!e.target.classList.contains("fade-out-shrink")),e.target.classList.remove("fade-in-grow","fade-out-shrink")},ct=new WeakSet,Yn=function(){return{"fade-in-grow":this.drmSettingsShown===!0,"fade-out-shrink":this.drmSettingsShown===!1}},at=new WeakSet,Jn=function(){return u` +
+

DRM Settings

+ + + + +
+
+ `},x(on,"properties",{src:{type:String},drmSettings:{type:Object},drmSettingsShown:{state:!0,type:Boolean}}),x(on,"styles",[P,U,O(Ri)]);customElements.define("load-media-form",on);const _i="[part=a]{display:flex;flex-direction:column;gap:var(--size-2);justify-content:center;min-height:var(--size-10);margin:0;color:var(--color-0);font-weight:var(--font-weight-6);font-size:var(--size-3);text-align:justify;text-decoration:none;background-color:var(--color-9);border:1px solid var(--color-10);transition:background-color .4s,border-color .4s;padding-inline:var(--size-3)}[part=a]:hover{text-decoration:none;background-color:var(--color-8);border-color:var(--color-9)}[part=title]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}::slotted([slot=description]){display:flex;align-items:center;color:var(--color-6);font-weight:var(--font-weight-5);font-size:var(--size-3);font-style:italic}";var $e;class an extends A{constructor(){super(...arguments);b(this,$e,e=>{e.preventDefault();const o=new URL(`${window.location.origin}/${this.href}`),i=Object.fromEntries(o.searchParams.entries());w.navigateTo(o.pathname,i)})}connectedCallback(){super.connectedCallback(),this.addEventListener("click",y(this,$e))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",y(this,$e))}render(){return u` + + ${this.title} + + + `}}$e=new WeakMap,x(an,"properties",{href:{}}),x(an,"styles",O(_i));customElements.define("content-link",an);const Li={SRGSSR:[{title:"Horizontal video",src:"urn:rts:video:6820736",type:"srgssr/urn"},{title:"Square video",src:"urn:rts:video:8393241",type:"srgssr/urn"},{title:"Vertical video",src:"urn:rts:video:13444390",type:"srgssr/urn"},{title:"Token-protected video",description:"Ski alpin, Slalom Messieurs",src:"urn:swisstxt:video:rts:c56ea781-99ad-40c3-8d9b-444cc5ac3aea",type:"srgssr/urn"},{title:"Superfluously token-protected video",description:"Telegiornale flash",src:"urn:rsi:video:15916771",type:"srgssr/urn"},{title:"DRM-protected video",description:"Top Models 8870",src:"urn:rts:video:13639837",type:"srgssr/urn"},{title:"Live video",description:"SRF 1",src:"urn:srf:video:c4927fcf-e1a0-0001-7edd-1ef01d441651",type:"srgssr/urn"},{title:"DVR video livestream",description:"RTS 1",src:"urn:rts:video:3608506",type:"srgssr/urn"},{title:"DVR audio livestream",description:"Couleur 3 (DVR)",src:"urn:rts:audio:3262363",type:"srgssr/urn"},{title:"On-demand audio stream",description:"Il lavoro di TerraProject per una fotografia documentaria",src:"urn:rsi:audio:8833144",type:"srgssr/urn"},{title:"Expired URN",description:"Content that is not available anymore",src:"urn:rts:video:13382911",type:"srgssr/urn"},{title:"Unknown URN",description:"Content that does not exist",src:"urn:srf:video:unknown",type:"srgssr/urn"}],HLS:[{title:"VOD - HLS",description:"Switzerland says sorry! The fondue invasion",src:"https://swi-vod.akamaized.net/videoJson/47603186/master.m3u8",type:"application/x-mpegURL"},{title:"VOD - HLS (short)",description:"Des violents orages ont touché Ajaccio, chef-lieu de la Corse, jeudi",src:"https://rts-vod-amd.akamaized.net/ww/13317145/f1d49f18-f302-37ce-866c-1c1c9b76a824/master.m3u8",type:"application/x-mpegURL"},{title:"Brain Farm Skate Phantom Flex",description:"4K video",src:"https://sample.vodobox.net/skate_phantom_flex_4k/skate_phantom_flex_4k.m3u8",type:"application/x-mpegURL"},{title:"Video livestream - HLS",description:"Couleur 3 en vidéo (live)",src:"https://rtsc3video.akamaized.net/hls/live/2042837/c3video/3/playlist.m3u8?dw=0",type:"application/x-mpegURL"},{title:"Video livestream with DVR - HLS",description:"Couleur 3 en vidéo (DVR)",src:"https://rtsc3video.akamaized.net/hls/live/2042837/c3video/3/playlist.m3u8",type:"application/x-mpegURL"},{title:"Video livestream with DVR and timestamps - HLS",description:"Tageschau",src:"https://tagesschau.akamaized.net/hls/live/2020115/tagesschau/tagesschau_1/master.m3u8",type:"application/x-mpegURL"},{title:"Audio livestream - HLS",description:"Couleur 3 (DVR)",src:"https://lsaplus.swisstxt.ch/audio/couleur3_96.stream/playlist.m3u8",type:"application/x-mpegURL"},{title:"Apple Basic 4:3",description:"4x3 aspect ratio, H.264 @ 30Hz",src:"https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8",type:"application/x-mpegURL"},{title:"Apple Basic 16:9",description:"16x9 aspect ratio, H.264 @ 30Hz",src:"https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8",type:"application/x-mpegURL"},{title:"Apple Advanced 16:9 (TS)",description:"16x9 aspect ratio, H.264 @ 30Hz and 60Hz, Transport stream",src:"https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/master.m3u8",type:"application/x-mpegURL"},{title:"Apple Advanced 16:9 (fMP4)",description:"16x9 aspect ratio, H.264 @ 30Hz and 60Hz, Fragmented MP4",src:"https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8",type:"application/x-mpegURL"},{title:"Apple Advanced 16:9 (HEVC/H.264)",description:"16x9 aspect ratio, H.264 and HEVC @ 30Hz and 60Hz",src:"https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_adv_example_hevc/master.m3u8",type:"application/x-mpegURL"},{title:"Apple Atmos",src:"https://devstreaming-cdn.apple.com/videos/streaming/examples/adv_dv_atmos/main.m3u8",type:"application/x-mpegURL"},{title:"Apple WWDC Keynote 2023",src:"https://events-delivery.apple.com/0105cftwpxxsfrpdwklppzjhjocakrsk/m3u8/vod_index-PQsoJoECcKHTYzphNkXohHsQWACugmET.m3u8",type:"application/x-mpegURL"},{title:"Apple tv trailer",description:"Lot of audios and subtitles choices",src:`https://play-edge.itunes.apple.com/WebObjects/MZPlayLocal.woa/hls/subscription/playlist.m3u8?cc=CH&svcId=tvs.vds.4021&a=1522121579&isExternal=true&brandId=tvs.sbd.4000&id=518077009&l=en-GB&aec=UHD +`,type:"application/x-mpegURL"},{title:"Multiple subtitles and audio tracks",description:"On some devices codec may crash",src:"https://bitmovin-a.akamaihd.net/content/sintel/hls/playlist.m3u8",type:"application/x-mpegURL"},{title:"4K, HEVC",src:"https://cdn.bitmovin.com/content/encoding_test_dash_hls/4k/hls/4k_profile/master.m3u8",type:"application/x-mpegURL"},{title:"VoD, single audio track",src:"https://bitmovin-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8",type:"application/x-mpegURL"},{title:"AES-128",src:"https://bitmovin-a.akamaihd.net/content/art-of-motion_drm/m3u8s/11331.m3u8",type:"application/x-mpegURL"},{title:"HLS - Fragmented MP4",src:"https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel.ism/.m3u8",type:"application/x-mpegURL"},{title:"HLS - Alternate audio language",src:"https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel-multi-lang.ism/.m3u8",type:"application/x-mpegURL"},{title:"HLS - Audio only",src:"https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel-multi-lang.ism/.m3u8?filter=(type!=%22video%22)",type:"application/x-mpegURL"},{title:"HLS - Trickplay",src:"https://demo.unified-streaming.com/k8s/features/stable/no-handler-origin/tears-of-steel/tears-of-steel-trickplay.m3u8",type:"application/x-mpegURL"},{title:"Limiting bandwidth use",src:"https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel.ism/.m3u8?max_bitrate=800000",type:"application/x-mpegURL"},{title:"Dynamic Track Selection",src:"https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel.ism/.m3u8?filter=%28type%3D%3D%22audio%22%26%26systemBitrate%3C100000%29%7C%7C%28type%3D%3D%22video%22%26%26systemBitrate%3C1024000%29",type:"application/x-mpegURL"},{title:"Pure live",src:"https://demo.unified-streaming.com/k8s/live/stable/live.isml/.m3u8",type:"application/x-mpegURL"},{title:"Timeshift (5 minutes)",src:"https://demo.unified-streaming.com/k8s/live/stable/live.isml/.m3u8?time_shift=300",type:"application/x-mpegURL"},{title:"Live audio",src:"https://demo.unified-streaming.com/k8s/live/stable/live.isml/.m3u8?filter=(type!=%22video%22)",type:"application/x-mpegURL"},{title:"Pure live (scte35)",src:"https://demo.unified-streaming.com/k8s/live/stable/scte35.isml/.m3u8",type:"application/x-mpegURL"},{title:"fMP4, clear",src:"https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel-fmp4.ism/.m3u8",type:"application/x-mpegURL"},{title:"fMP4, HEVC 4K",src:"https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel-hevc.ism/.m3u8",type:"application/x-mpegURL"},{title:"Test1",description:"Forced subtitles",src:"https://prd.vod-srgssr.ch/origin/1053457/fr/master.m3u8?complexSubs=true",type:"application/x-mpegURL"}],DASH:[{title:"VoD - Dash (H264)",src:"https://storage.googleapis.com/wvmedia/clear/h264/tears/tears.mpd",type:"application/dash+xml"},{title:"VoD - Dash Widewine cenc (H264)",src:"https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears.mpd",type:"application/dash+xml",keySystems:{"com.widevine.alpha":"https://proxy.uat.widevine.com/proxy?video_id=2015_tears&provider=widevine_test"}},{title:"VoD - Dash (H265)",src:"https://storage.googleapis.com/wvmedia/clear/hevc/tears/tears.mpd",type:"application/dash+xml"},{title:"VoD - Dash widewine cenc (H265)",src:"https://storage.googleapis.com/wvmedia/cenc/hevc/tears/tears.mpd",type:"application/dash+xml",keySystems:{"com.widevine.alpha":"https://proxy.uat.widevine.com/proxy?video_id=2015_tears&provider=widevine_test"}},{title:"VoD - Dash - MP4",src:"https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel.mp4/.mpd",type:"application/dash+xml"},{title:"Dash - Fragmented MP4",src:"https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel.ism/.mpd",type:"application/dash+xml"},{title:"Dash - TrickPlay",src:"https://demo.unified-streaming.com/k8s/features/stable/no-handler-origin/tears-of-steel/tears-of-steel-trickplay.mpd",type:"application/dash+xml"},{title:"Dash - Tiled thumbnails (live/timeline)",src:"https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel-tiled-thumbnails-timeline.ism/.mpd",type:"application/dash+xml"},{title:"Dash - Accessibility - hard of hearing",src:"https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel-hoh-subs.ism/.mpd",type:"application/dash+xml"},{title:"Dash - Single - fragmented TTML",src:"https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel-en.ism/.mpd",type:"application/dash+xml"},{title:"Dash - Multiple - RFC 5646 language tags",src:"https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel-rfc5646.ism/.mpd",type:"application/dash+xml"},{title:"Dash - Multiple - fragmented TTML",src:"https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel-ttml.ism/.mpd",type:"application/dash+xml"},{title:"Dash - Audio only",src:"https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel-multi-lang.ism/.mpd?filter=(type!=%22video%22)",type:"application/dash+xml"},{title:"Dash - Multiple audio codecs",src:"https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel-multi-codec.ism/.mpd",type:"application/dash+xml"},{title:"Dash - Alternate audio language",src:"https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel-multi-lang.ism/.mpd",type:"application/dash+xml"},{title:"Dash - Accessibility - audio description",src:"https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel-desc-aud.ism/.mpd",type:"application/dash+xml"},{title:"Dash - Pure live",src:"https://demo.unified-streaming.com/k8s/live/stable/live.isml/.mpd",type:"application/dash+xml"},{title:"Dash - Timeshift (5 minutes)",src:"https://demo.unified-streaming.com/k8s/live/stable/live.isml/.mpd?time_shift=300",type:"application/dash+xml"},{title:"Dash - DVB DASH low latency",src:"https://demo.unified-streaming.com/k8s/live/stable/live-low-latency.isml/.mpd",type:"application/dash+xml"}],MP4:[{title:"VOD - MP4",description:"The dig",src:"https://media.swissinfo.ch/media/video/dddaff93-c2cd-4b6e-bdad-55f75a519480/rendition/154a844b-de1d-4854-93c1-5c61cd07e98c.mp4",type:"video/mp4"},{title:"AVC Progressive",src:"https://bitmovin-a.akamaihd.net/content/MI201109210084_1/MI201109210084_mpeg-4_hd_high_1080p25_10mbits.mp4",type:"video/mp4"}],AOD:[{title:"Audio HLS",description:"Content with PTS rollover",src:"https://cdn.rts.ch/audio-sample/playlist.m3u8",type:"application/x-mpegURL"}]};/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function*ge(t,n){if(t!==void 0){let e=0;for(const o of t)yield n(o,e++)}}/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function W(t,n,e){return t?n(t):e==null?void 0:e(t)}class Qn extends A{render(){return u` + + + + +
+ ${ge(Object.entries(Li),([n,e])=>u` +
+

${n}

+ ${ge(e,o=>u` + + ${W(o.description,()=>u` + ${o.title} + `)} + + `)} +
+ `)} +
+ `}}x(Qn,"styles",[P,U,Pn` + .example-section p { + margin-bottom: 0; + color: var(--color-5); + font-size: var(--size-3); + text-align: left; + }`]);customElements.define("examples-page",Qn);w.addRoute("examples","examples-page");const Ci=".tree-navigation-container{display:flex;align-items:end}.tree-navigation-container button{padding:0;color:var(--color-6);background:transparent;border:none}.tree-navigation-container button:hover{color:inherit}.tree-navigation-container i{font-size:var(--size-3)}intersection-observer::part(sentinel){width:100%;height:var(--size-9);margin-top:var(--size-4);background-color:var(--color-9);border:1px solid var(--color-10);border-radius:var(--radius-3);animation:var(--animation-blink)}",Ti=".spinner{display:block;width:var(--size-7);height:var(--size-7);border:3px solid var(--color-2);border-bottom-color:transparent;border-radius:var(--radius-round);animation:var(--animation-spin)}.spinner-container{display:grid;place-content:center;margin:var(--size-10)}.spinner-container.hidden{display:none}";class sn extends A{constructor(){super(),this.loading=!1}render(){return u` +
+
+
+ `}}x(sn,"properties",{loading:{type:Boolean,reflect:!0}}),x(sn,"styles",[U,O(Ti)]);customElements.define("loading-spinner",sn);const Ai={root:null,rootMargin:"0px",threshold:.1},Mi=(t,n,e=Ai)=>{new IntersectionObserver(o=>{o.forEach(i=>{i.isIntersecting&&n()})},e).observe(t)};class eo extends A{firstUpdated(n){super.firstUpdated(n),Mi(this.renderRoot.querySelector("div"),()=>{this.dispatchEvent(new CustomEvent("intersecting"))})}render(){return u` +
+ `}}x(eo,"styles",[U]);customElements.define("intersection-observer",eo);class to extends A{render(){return u` + + `}}x(to,"styles",[P,U,Pn` + .scroll-to-top-button { + position: fixed; + right: 20px; + bottom: 20px; + z-index: 1; + display: flex; + align-items: center; + justify-content: center; + width: var(--size-7); + height: var(--size-7); + padding: 0; + border: none; + border-radius: var(--radius-round); + } + + .scroll-to-top-button i { + font-size: var(--size-8); + } + `]);customElements.define("scroll-to-top-button",to);const Jt=t=>t.replace(/\s+/g,"-").toLowerCase();var Ie,ln,st,no,Ne,mn;const _e=class _e{constructor(n){b(this,st);b(this,Ne);this.stack=[],this.level=n}async initialize(n,e,o){if(!n||!e)return;const i=l(this,st,no).call(this,n),a=l(this,Ne,mn).call(this,this.level[i].nodes,e);await this.fetchNextState(i,a);for(const r of(o==null?void 0:o.split(","))||[]){const s=l(this,Ne,mn).call(this,this.level[0].nodes,r);await this.fetchNextState(0,s)}}async fetchNextState(n,e){const o=this.level[n];this.stack.push({level:this.level,sectionIndex:n,nodeIndex:e}),this.level=[await o.resolve(o.nodes[e])]}fetchPreviousState(n){this.level=this.stack[n].level,this.stack.splice(n)}isLeafSection(n){var e;return(e=this.level[n])==null?void 0:e.isLeaf()}retrieveNode(n,e){var o;return(o=this.level[n])==null?void 0:o.nodes[e]}get root(){var n;return((n=this.stack[0])==null?void 0:n.level)||this.level}get params(){var n;return l(n=_e,Ie,ln).call(n,this.stack)}paramsAt(n,e){var o;return l(o=_e,Ie,ln).call(o,[...this.stack,{level:this.level,sectionIndex:n,nodeIndex:e}])}};Ie=new WeakSet,ln=function(n){if(n.length===0)return{};const e=n[0],o=e.level[e.sectionIndex],i=n.slice(1).map(r=>{const s=r.level[r.sectionIndex].nodes[r.nodeIndex];return s.id||s.urn}),a={section:Jt(o.title),bu:o.nodes[e.nodeIndex].toLowerCase()};return i&&i.length&&(a.nodes=i.join(",")),a},st=new WeakSet,no=function(n){const e=Jt(n).toLowerCase();return this.level.map(o=>Jt(o.title).toLowerCase()).findIndex(o=>o===e)},Ne=new WeakSet,mn=function(n,e){const o=e.toLowerCase();return n.map(i=>(i.urn||i.id||i.toString()).toLowerCase()).findIndex(i=>i===o)},b(_e,Ie);let Qe=_e;class C{constructor({title:n,nodes:e,resolve:o=void 0,next:i=void 0}){this.title=n,this.nodes=e,this.resolve=o,this.next=i}isLeaf(){return!this.resolve}async fetchNext(n=void 0){if(!this.next)return;const e=await this.next(n);return this.next=e.next,this.nodes.push(...e.results),e.results}}const Re=t=>({nodes:t.results,next:t.next}),$i=[new C({title:"TV Topics",nodes:["RSI","RTR","RTS","SRF","SWI"],resolve:async t=>new C({title:`${t} TV Topics`,nodes:await I.topics(t),resolve:async n=>new C({title:n.title,...Re(await I.latestByTopic(n.urn))})})}),new C({title:"TV Shows",nodes:["RSI","RTR","RTS","SRF","SWI"],resolve:async t=>new C({title:`${t} TV Shows`,nodes:await I.shows(t),resolve:async n=>new C({title:n.title,...Re(await I.latestByShow(n.urn))})})}),new C({title:"TV Latest Videos",nodes:["RSI","RTR","RTS","SRF"],resolve:async t=>new C({title:`${t} TV Latest Videos`,...Re(await I.editorial(t))})}),new C({title:"TV Livestreams",nodes:["RSI","RTR","RTS","SRF"],resolve:async t=>new C({title:`${t} TV Livestreams`,nodes:await I.livestreams(t)})}),new C({title:"Live web",nodes:["RSI","RTR","RTS","SRF"],resolve:async t=>new C({title:`${t} Live web`,...Re(await I.scheduledLivestream(t))})}),new C({title:"Live center",nodes:["RSI","RTR","RTS","SRF"],resolve:async t=>new C({title:`${t} Live center`,nodes:await I.livecenter(t)})}),new C({title:"Radio Shows",nodes:["RSI","RTR","RTS","SRF"],resolve:async t=>new C({title:`${t} Radio Channels`,nodes:await I.channels(t),resolve:async n=>new C({title:`${n.title} Radio shows`,nodes:await I.radioShowByChannel(t,n.id),resolve:async e=>new C({title:e.title,...Re(await I.latestByShow(e.urn))})})})}),new C({title:"Radio Livestreams",nodes:["RSI","RTR","RTS","SRF"],resolve:async t=>new C({title:`${t} Radio Livestreams`,nodes:await I.livestreams(t,"audio")})})];var ve,z,ce,ee,ue,lt,oo,mt,io,ft,ro,bt,co,dt,ao,pt,so,ut,lo,ht,mo,gt,fo,vt,bo,yt,po,wt,uo;class fn extends A{constructor(){super();b(this,ee);b(this,lt);b(this,mt);b(this,ft);b(this,bt);b(this,dt);b(this,pt);b(this,ut);b(this,ht);b(this,gt);b(this,vt);b(this,yt);b(this,wt);b(this,ve,new AbortController);b(this,z,void 0);b(this,ce,void 0);this.loading=!1,Z(this,z,new Qe($i)),l(this,ee,ue).call(this)}connectedCallback(){super.connectedCallback(),Z(this,ce,async e=>{if(!e.detail.popstate)return;this.abortFetch();const o=new Qe(y(this,z).root),{section:i,bu:a,nodes:r}=e.detail.queryParams;this.loading=!0;try{await o.initialize(i,a,r),Z(this,z,o),l(this,ee,ue).call(this)}finally{this.loading=!1}}),w.addEventListener("queryparams",y(this,ce))}disconnectedCallback(){super.disconnectedCallback(),this.abortFetch(),w.removeEventListener("queryparams",y(this,ce))}firstUpdated(e){super.firstUpdated(e),y(this,ce).call(this,{detail:{popstate:!0,queryParams:w.queryParams}})}async navigateTo(e,o){if(!y(this,z).isLeafSection(e)){this.abortFetch(),this.loading=!0;try{await y(this,z).fetchNextState(e,o),l(this,ee,ue).call(this)}finally{this.loading=!1}}}abortFetch(){var e;return(e=y(this,ve))==null||e.abort("New search launched"),Z(this,ve,new AbortController),y(this,ve).signal}render(){const e=this.level.length===1&&this.level[0].next;return u` + ${l(this,wt,uo).call(this)} + ${W(this.loading,l(this,gt,fo).bind(this),l(this,ht,mo).bind(this))} + ${W(e,l(this,vt,bo).bind(this))} + `}}ve=new WeakMap,z=new WeakMap,ce=new WeakMap,ee=new WeakSet,ue=function(){this.stack=[...y(this,z).stack],this.level=[...y(this,z).level]},lt=new WeakSet,oo=function(e){return new URLSearchParams({...w.queryParams,src:e.urn,type:"srgssr/urn"}).toString()},mt=new WeakSet,io=function(e){const o=new Intl.DateTimeFormat("fr-CH").format(new Date(e.date)),i=wn.formatTime(e.duration/1e3);return u` + +
+ ${e.mediaType==="VIDEO"?"movie":"audiotrack"} +  | ${o} | ${i} +
+
+ `},ft=new WeakSet,ro=function(e,o){const i=y(this,z).paramsAt(e,o);return new URLSearchParams(i).toString()},bt=new WeakSet,co=function(e,o,i){return u` + + + `},dt=new WeakSet,ao=async function(e){const o=this.abortFetch();await e.fetchNext(o),l(this,ee,ue).call(this)},pt=new WeakSet,so=function(e,o){const i=this.level[0],a=this.level.length===1&&i.next;return u` + ${ge(e,(r,s)=>u` + ${W(r.mediaType,()=>l(this,mt,io).call(this,r,s),()=>l(this,bt,co).call(this,r,o,s))} + `)} + ${W(a,()=>u` + + + `)} + `},ut=new WeakSet,lo=async function(e){const o=e.target.closest("content-link");if(this.loading||!("nodeIdx"in o.dataset))return;const i=o.dataset.sectionIdx,a=o.dataset.nodeIdx;await this.navigateTo(i,a)},ht=new WeakSet,mo=function(){return u` +
+ ${ge(this.level,(e,o)=>u` +
+

${e.title}

+ ${l(this,pt,so).call(this,e.nodes,o)} +
+ `)} +
+ `},gt=new WeakSet,fo=function(){return u` + + + `},vt=new WeakSet,bo=function(){return u` + `},yt=new WeakSet,po=function(e){e.target.tagName.toLowerCase()==="button"&&(this.abortFetch(),y(this,z).fetchPreviousState(e.target.dataset.navigationIdx),l(this,ee,ue).call(this),w.updateState(y(this,z).params,["section","bu","nodes"]))},wt=new WeakSet,uo=function(){return u` +
+ ${W(this.stack.length>0,()=>u` + + `)} + ${ge(this.stack.slice(1),(e,o)=>u` + chevron_right + + `)} +
+ `},x(fn,"properties",{loading:{state:!0,type:Boolean},stack:{state:!0,type:Array},level:{state:!0,type:Object},nextPage:{state:!0,type:Function}}),x(fn,"styles",[P,U,O(Ci)]);customElements.define("lists-page",fn);w.addRoute("lists","lists-page");const Ii="@font-face{font-family:Material Icons;font-style:normal;font-weight:400;font-display:block;src:url("+new URL("material-icons-kAwBdRge.woff2",import.meta.url).href+') format("woff2"),url('+new URL("material-icons-Dr0goTwe.woff",import.meta.url).href+') format("woff")}.material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}@font-face{font-family:Material Icons Outlined;font-style:normal;font-weight:400;font-display:block;src:url('+new URL("material-icons-outlined-DZhiGvEA.woff2",import.meta.url).href+') format("woff2"),url('+new URL("material-icons-outlined-BpWbwl2n.woff",import.meta.url).href+') format("woff")}.material-icons-outlined{font-family:Material Icons Outlined;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}@font-face{font-family:Material Icons Round;font-style:normal;font-weight:400;font-display:block;src:url('+new URL("material-icons-round-DrirKXBx.woff2",import.meta.url).href+') format("woff2"),url('+new URL("material-icons-round-BDlwx-sv.woff",import.meta.url).href+') format("woff")}.material-icons-round{font-family:Material Icons Round;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}@font-face{font-family:Material Icons Sharp;font-style:normal;font-weight:400;font-display:block;src:url('+new URL("material-icons-sharp-gidztirS.woff2",import.meta.url).href+') format("woff2"),url('+new URL("material-icons-sharp-CH1KkVu7.woff",import.meta.url).href+') format("woff")}.material-icons-sharp{font-family:Material Icons Sharp;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}@font-face{font-family:Material Icons Two Tone;font-style:normal;font-weight:400;font-display:block;src:url('+new URL("material-icons-two-tone-DuNIpaEj.woff2",import.meta.url).href+') format("woff2"),url('+new URL("material-icons-two-tone-B7wz7mED.woff",import.meta.url).href+') format("woff")}.material-icons-two-tone{font-family:Material Icons Two Tone;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}.mi{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}.mi-outlined{font-family:Material Icons Outlined;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}.mi-round{font-family:Material Icons Round;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}.mi-sharp{font-family:Material Icons Sharp;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}.mi-two-tone{font-family:Material Icons Two Tone;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}.mi-123:before{content:""}.mi-360:before{content:""}.mi-10k:before{content:""}.mi-10mp:before{content:""}.mi-11mp:before{content:""}.mi-12mp:before{content:""}.mi-13mp:before{content:""}.mi-14mp:before{content:""}.mi-15mp:before{content:""}.mi-16mp:before{content:""}.mi-17mp:before{content:""}.mi-18-up-rating:before{content:""}.mi-18mp:before{content:""}.mi-19mp:before{content:""}.mi-1k:before{content:""}.mi-1k-plus:before{content:""}.mi-1x-mobiledata:before{content:""}.mi-20mp:before{content:""}.mi-21mp:before{content:""}.mi-22mp:before{content:""}.mi-23mp:before{content:""}.mi-24mp:before{content:""}.mi-2k:before{content:""}.mi-2k-plus:before{content:""}.mi-2mp:before{content:""}.mi-30fps:before{content:""}.mi-30fps-select:before{content:""}.mi-3d-rotation:before{content:""}.mi-3g-mobiledata:before{content:""}.mi-3k:before{content:""}.mi-3k-plus:before{content:""}.mi-3mp:before{content:""}.mi-3p:before{content:""}.mi-4g-mobiledata:before{content:""}.mi-4g-plus-mobiledata:before{content:""}.mi-4k:before{content:""}.mi-4k-plus:before{content:""}.mi-4mp:before{content:""}.mi-5g:before{content:""}.mi-5k:before{content:""}.mi-5k-plus:before{content:""}.mi-5mp:before{content:""}.mi-60fps:before{content:""}.mi-60fps-select:before{content:""}.mi-6-ft-apart:before{content:""}.mi-6k:before{content:""}.mi-6k-plus:before{content:""}.mi-6mp:before{content:""}.mi-7k:before{content:""}.mi-7k-plus:before{content:""}.mi-7mp:before{content:""}.mi-8k:before{content:""}.mi-8k-plus:before{content:""}.mi-8mp:before{content:""}.mi-9k:before{content:""}.mi-9k-plus:before{content:""}.mi-9mp:before{content:""}.mi-abc:before{content:""}.mi-ac-unit:before{content:""}.mi-access-alarm:before{content:""}.mi-access-alarms:before{content:""}.mi-access-time:before{content:""}.mi-access-time-filled:before{content:""}.mi-accessibility:before{content:""}.mi-accessibility-new:before{content:""}.mi-accessible:before{content:""}.mi-accessible-forward:before{content:""}.mi-account-balance:before{content:""}.mi-account-balance-wallet:before{content:""}.mi-account-box:before{content:""}.mi-account-circle:before{content:""}.mi-account-tree:before{content:""}.mi-ad-units:before{content:""}.mi-adb:before{content:""}.mi-add:before{content:""}.mi-add-a-photo:before{content:""}.mi-add-alarm:before{content:""}.mi-add-alert:before{content:""}.mi-add-box:before{content:""}.mi-add-business:before{content:""}.mi-add-call:before{content:""}.mi-add-card:before{content:""}.mi-add-chart:before{content:""}.mi-add-circle:before{content:""}.mi-add-circle-outline:before{content:""}.mi-add-comment:before{content:""}.mi-add-home:before{content:""}.mi-add-home-work:before{content:""}.mi-add-ic-call:before{content:""}.mi-add-link:before{content:""}.mi-add-location:before{content:""}.mi-add-location-alt:before{content:""}.mi-add-moderator:before{content:""}.mi-add-photo-alternate:before{content:""}.mi-add-reaction:before{content:""}.mi-add-road:before{content:""}.mi-add-shopping-cart:before{content:""}.mi-add-task:before{content:""}.mi-add-to-drive:before{content:""}.mi-add-to-home-screen:before{content:""}.mi-add-to-photos:before{content:""}.mi-add-to-queue:before{content:""}.mi-addchart:before{content:""}.mi-adf-scanner:before{content:""}.mi-adjust:before{content:""}.mi-admin-panel-settings:before{content:""}.mi-adobe:before{content:""}.mi-ads-click:before{content:""}.mi-agriculture:before{content:""}.mi-air:before{content:""}.mi-airline-seat-flat:before{content:""}.mi-airline-seat-flat-angled:before{content:""}.mi-airline-seat-individual-suite:before{content:""}.mi-airline-seat-legroom-extra:before{content:""}.mi-airline-seat-legroom-normal:before{content:""}.mi-airline-seat-legroom-reduced:before{content:""}.mi-airline-seat-recline-extra:before{content:""}.mi-airline-seat-recline-normal:before{content:""}.mi-airline-stops:before{content:""}.mi-airlines:before{content:""}.mi-airplane-ticket:before{content:""}.mi-airplanemode-active:before{content:""}.mi-airplanemode-inactive:before{content:""}.mi-airplanemode-off:before{content:""}.mi-airplanemode-on:before{content:""}.mi-airplay:before{content:""}.mi-airport-shuttle:before{content:""}.mi-alarm:before{content:""}.mi-alarm-add:before{content:""}.mi-alarm-off:before{content:""}.mi-alarm-on:before{content:""}.mi-album:before{content:""}.mi-align-horizontal-center:before{content:""}.mi-align-horizontal-left:before{content:""}.mi-align-horizontal-right:before{content:""}.mi-align-vertical-bottom:before{content:""}.mi-align-vertical-center:before{content:""}.mi-align-vertical-top:before{content:""}.mi-all-inbox:before{content:""}.mi-all-inclusive:before{content:""}.mi-all-out:before{content:""}.mi-alt-route:before{content:""}.mi-alternate-email:before{content:""}.mi-amp-stories:before{content:""}.mi-analytics:before{content:""}.mi-anchor:before{content:""}.mi-android:before{content:""}.mi-animation:before{content:""}.mi-announcement:before{content:""}.mi-aod:before{content:""}.mi-apartment:before{content:""}.mi-api:before{content:""}.mi-app-blocking:before{content:""}.mi-app-registration:before{content:""}.mi-app-settings-alt:before{content:""}.mi-app-shortcut:before{content:""}.mi-apple:before{content:""}.mi-approval:before{content:""}.mi-apps:before{content:""}.mi-apps-outage:before{content:""}.mi-architecture:before{content:""}.mi-archive:before{content:""}.mi-area-chart:before{content:""}.mi-arrow-back:before{content:""}.mi-arrow-back-ios:before{content:""}.mi-arrow-back-ios-new:before{content:""}.mi-arrow-circle-down:before{content:""}.mi-arrow-circle-left:before{content:""}.mi-arrow-circle-right:before{content:""}.mi-arrow-circle-up:before{content:""}.mi-arrow-downward:before{content:""}.mi-arrow-drop-down:before{content:""}.mi-arrow-drop-down-circle:before{content:""}.mi-arrow-drop-up:before{content:""}.mi-arrow-forward:before{content:""}.mi-arrow-forward-ios:before{content:""}.mi-arrow-left:before{content:""}.mi-arrow-outward:before{content:""}.mi-arrow-right:before{content:""}.mi-arrow-right-alt:before{content:""}.mi-arrow-upward:before{content:""}.mi-art-track:before{content:""}.mi-article:before{content:""}.mi-aspect-ratio:before{content:""}.mi-assessment:before{content:""}.mi-assignment:before{content:""}.mi-assignment-add:before{content:""}.mi-assignment-ind:before{content:""}.mi-assignment-late:before{content:""}.mi-assignment-return:before{content:""}.mi-assignment-returned:before{content:""}.mi-assignment-turned-in:before{content:""}.mi-assist-walker:before{content:""}.mi-assistant:before{content:""}.mi-assistant-direction:before{content:""}.mi-assistant-navigation:before{content:""}.mi-assistant-photo:before{content:""}.mi-assured-workload:before{content:""}.mi-atm:before{content:""}.mi-attach-email:before{content:""}.mi-attach-file:before{content:""}.mi-attach-money:before{content:""}.mi-attachment:before{content:""}.mi-attractions:before{content:""}.mi-attribution:before{content:""}.mi-audio-file:before{content:""}.mi-audiotrack:before{content:""}.mi-auto-awesome:before{content:""}.mi-auto-awesome-mosaic:before{content:""}.mi-auto-awesome-motion:before{content:""}.mi-auto-delete:before{content:""}.mi-auto-fix-high:before{content:""}.mi-auto-fix-normal:before{content:""}.mi-auto-fix-off:before{content:""}.mi-auto-graph:before{content:""}.mi-auto-mode:before{content:""}.mi-auto-stories:before{content:""}.mi-autofps-select:before{content:""}.mi-autorenew:before{content:""}.mi-av-timer:before{content:""}.mi-baby-changing-station:before{content:""}.mi-back-hand:before{content:""}.mi-backpack:before{content:""}.mi-backspace:before{content:""}.mi-backup:before{content:""}.mi-backup-table:before{content:""}.mi-badge:before{content:""}.mi-bakery-dining:before{content:""}.mi-balance:before{content:""}.mi-balcony:before{content:""}.mi-ballot:before{content:""}.mi-bar-chart:before{content:""}.mi-barcode-reader:before{content:""}.mi-batch-prediction:before{content:""}.mi-bathroom:before{content:""}.mi-bathtub:before{content:""}.mi-battery-0-bar:before{content:""}.mi-battery-1-bar:before{content:""}.mi-battery-20:before{content:""}.mi-battery-2-bar:before{content:""}.mi-battery-30:before{content:""}.mi-battery-3-bar:before{content:""}.mi-battery-4-bar:before{content:""}.mi-battery-50:before{content:""}.mi-battery-5-bar:before{content:""}.mi-battery-60:before{content:""}.mi-battery-6-bar:before{content:""}.mi-battery-80:before{content:""}.mi-battery-90:before{content:""}.mi-battery-alert:before{content:""}.mi-battery-charging-20:before{content:""}.mi-battery-charging-30:before{content:""}.mi-battery-charging-50:before{content:""}.mi-battery-charging-60:before{content:""}.mi-battery-charging-80:before{content:""}.mi-battery-charging-90:before{content:""}.mi-battery-charging-full:before{content:""}.mi-battery-full:before{content:""}.mi-battery-saver:before{content:""}.mi-battery-std:before{content:""}.mi-battery-unknown:before{content:""}.mi-beach-access:before{content:""}.mi-bed:before{content:""}.mi-bedroom-baby:before{content:""}.mi-bedroom-child:before{content:""}.mi-bedroom-parent:before{content:""}.mi-bedtime:before{content:""}.mi-bedtime-off:before{content:""}.mi-beenhere:before{content:""}.mi-bento:before{content:""}.mi-bike-scooter:before{content:""}.mi-biotech:before{content:""}.mi-blender:before{content:""}.mi-blind:before{content:""}.mi-blinds:before{content:""}.mi-blinds-closed:before{content:""}.mi-block:before{content:""}.mi-block-flipped:before{content:""}.mi-bloodtype:before{content:""}.mi-bluetooth:before{content:""}.mi-bluetooth-audio:before{content:""}.mi-bluetooth-connected:before{content:""}.mi-bluetooth-disabled:before{content:""}.mi-bluetooth-drive:before{content:""}.mi-bluetooth-searching:before{content:""}.mi-blur-circular:before{content:""}.mi-blur-linear:before{content:""}.mi-blur-off:before{content:""}.mi-blur-on:before{content:""}.mi-bolt:before{content:""}.mi-book:before{content:""}.mi-book-online:before{content:""}.mi-bookmark:before{content:""}.mi-bookmark-add:before{content:""}.mi-bookmark-added:before{content:""}.mi-bookmark-border:before{content:""}.mi-bookmark-outline:before{content:""}.mi-bookmark-remove:before{content:""}.mi-bookmarks:before{content:""}.mi-border-all:before{content:""}.mi-border-bottom:before{content:""}.mi-border-clear:before{content:""}.mi-border-color:before{content:""}.mi-border-horizontal:before{content:""}.mi-border-inner:before{content:""}.mi-border-left:before{content:""}.mi-border-outer:before{content:""}.mi-border-right:before{content:""}.mi-border-style:before{content:""}.mi-border-top:before{content:""}.mi-border-vertical:before{content:""}.mi-boy:before{content:""}.mi-branding-watermark:before{content:""}.mi-breakfast-dining:before{content:""}.mi-brightness-1:before{content:""}.mi-brightness-2:before{content:""}.mi-brightness-3:before{content:""}.mi-brightness-4:before{content:""}.mi-brightness-5:before{content:""}.mi-brightness-6:before{content:""}.mi-brightness-7:before{content:""}.mi-brightness-auto:before{content:""}.mi-brightness-high:before{content:""}.mi-brightness-low:before{content:""}.mi-brightness-medium:before{content:""}.mi-broadcast-on-home:before{content:""}.mi-broadcast-on-personal:before{content:""}.mi-broken-image:before{content:""}.mi-browse-gallery:before{content:""}.mi-browser-not-supported:before{content:""}.mi-browser-updated:before{content:""}.mi-brunch-dining:before{content:""}.mi-brush:before{content:""}.mi-bubble-chart:before{content:""}.mi-bug-report:before{content:""}.mi-build:before{content:""}.mi-build-circle:before{content:""}.mi-bungalow:before{content:""}.mi-burst-mode:before{content:""}.mi-bus-alert:before{content:""}.mi-business:before{content:""}.mi-business-center:before{content:""}.mi-cabin:before{content:""}.mi-cable:before{content:""}.mi-cached:before{content:""}.mi-cake:before{content:""}.mi-calculate:before{content:""}.mi-calendar-month:before{content:""}.mi-calendar-today:before{content:""}.mi-calendar-view-day:before{content:""}.mi-calendar-view-month:before{content:""}.mi-calendar-view-week:before{content:""}.mi-call:before{content:""}.mi-call-end:before{content:""}.mi-call-made:before{content:""}.mi-call-merge:before{content:""}.mi-call-missed:before{content:""}.mi-call-missed-outgoing:before{content:""}.mi-call-received:before{content:""}.mi-call-split:before{content:""}.mi-call-to-action:before{content:""}.mi-camera:before{content:""}.mi-camera-alt:before{content:""}.mi-camera-enhance:before{content:""}.mi-camera-front:before{content:""}.mi-camera-indoor:before{content:""}.mi-camera-outdoor:before{content:""}.mi-camera-rear:before{content:""}.mi-camera-roll:before{content:""}.mi-cameraswitch:before{content:""}.mi-campaign:before{content:""}.mi-cancel:before{content:""}.mi-cancel-presentation:before{content:""}.mi-cancel-schedule-send:before{content:""}.mi-candlestick-chart:before{content:""}.mi-car-crash:before{content:""}.mi-car-rental:before{content:""}.mi-car-repair:before{content:""}.mi-card-giftcard:before{content:""}.mi-card-membership:before{content:""}.mi-card-travel:before{content:""}.mi-carpenter:before{content:""}.mi-cases:before{content:""}.mi-casino:before{content:""}.mi-cast:before{content:""}.mi-cast-connected:before{content:""}.mi-cast-for-education:before{content:""}.mi-castle:before{content:""}.mi-catching-pokemon:before{content:""}.mi-category:before{content:""}.mi-celebration:before{content:""}.mi-cell-tower:before{content:""}.mi-cell-wifi:before{content:""}.mi-center-focus-strong:before{content:""}.mi-center-focus-weak:before{content:""}.mi-chair:before{content:""}.mi-chair-alt:before{content:""}.mi-chalet:before{content:""}.mi-change-circle:before{content:""}.mi-change-history:before{content:""}.mi-charging-station:before{content:""}.mi-chat:before{content:""}.mi-chat-bubble:before{content:""}.mi-chat-bubble-outline:before{content:""}.mi-check:before{content:""}.mi-check-box:before{content:""}.mi-check-box-outline-blank:before{content:""}.mi-check-circle:before{content:""}.mi-check-circle-outline:before{content:""}.mi-checklist:before{content:""}.mi-checklist-rtl:before{content:""}.mi-checkroom:before{content:""}.mi-chevron-left:before{content:""}.mi-chevron-right:before{content:""}.mi-child-care:before{content:""}.mi-child-friendly:before{content:""}.mi-chrome-reader-mode:before{content:""}.mi-church:before{content:""}.mi-circle:before{content:""}.mi-circle-notifications:before{content:""}.mi-class:before{content:""}.mi-clean-hands:before{content:""}.mi-cleaning-services:before{content:""}.mi-clear:before{content:""}.mi-clear-all:before{content:""}.mi-close:before{content:""}.mi-close-fullscreen:before{content:""}.mi-closed-caption:before{content:""}.mi-closed-caption-disabled:before{content:""}.mi-closed-caption-off:before{content:""}.mi-cloud:before{content:""}.mi-cloud-circle:before{content:""}.mi-cloud-done:before{content:""}.mi-cloud-download:before{content:""}.mi-cloud-off:before{content:""}.mi-cloud-queue:before{content:""}.mi-cloud-sync:before{content:""}.mi-cloud-upload:before{content:""}.mi-cloudy-snowing:before{content:""}.mi-co2:before{content:""}.mi-co-present:before{content:""}.mi-code:before{content:""}.mi-code-off:before{content:""}.mi-coffee:before{content:""}.mi-coffee-maker:before{content:""}.mi-collections:before{content:""}.mi-collections-bookmark:before{content:""}.mi-color-lens:before{content:""}.mi-colorize:before{content:""}.mi-comment:before{content:""}.mi-comment-bank:before{content:""}.mi-comments-disabled:before{content:""}.mi-commit:before{content:""}.mi-commute:before{content:""}.mi-compare:before{content:""}.mi-compare-arrows:before{content:""}.mi-compass-calibration:before{content:""}.mi-compost:before{content:""}.mi-compress:before{content:""}.mi-computer:before{content:""}.mi-confirmation-num:before{content:""}.mi-confirmation-number:before{content:""}.mi-connect-without-contact:before{content:""}.mi-connected-tv:before{content:""}.mi-connecting-airports:before{content:""}.mi-construction:before{content:""}.mi-contact-emergency:before{content:""}.mi-contact-mail:before{content:""}.mi-contact-page:before{content:""}.mi-contact-phone:before{content:""}.mi-contact-support:before{content:""}.mi-contactless:before{content:""}.mi-contacts:before{content:""}.mi-content-copy:before{content:""}.mi-content-cut:before{content:""}.mi-content-paste:before{content:""}.mi-content-paste-go:before{content:""}.mi-content-paste-off:before{content:""}.mi-content-paste-search:before{content:""}.mi-contrast:before{content:""}.mi-control-camera:before{content:""}.mi-control-point:before{content:""}.mi-control-point-duplicate:before{content:""}.mi-conveyor-belt:before{content:""}.mi-cookie:before{content:""}.mi-copy:before{content:""}.mi-copy-all:before{content:""}.mi-copyright:before{content:""}.mi-coronavirus:before{content:""}.mi-corporate-fare:before{content:""}.mi-cottage:before{content:""}.mi-countertops:before{content:""}.mi-create:before{content:""}.mi-create-new-folder:before{content:""}.mi-credit-card:before{content:""}.mi-credit-card-off:before{content:""}.mi-credit-score:before{content:""}.mi-crib:before{content:""}.mi-crisis-alert:before{content:""}.mi-crop:before{content:""}.mi-crop-16-9:before{content:""}.mi-crop-3-2:before{content:""}.mi-crop-5-4:before{content:""}.mi-crop-7-5:before{content:""}.mi-crop-din:before{content:""}.mi-crop-free:before{content:""}.mi-crop-landscape:before{content:""}.mi-crop-original:before{content:""}.mi-crop-portrait:before{content:""}.mi-crop-rotate:before{content:""}.mi-crop-square:before{content:""}.mi-cruelty-free:before{content:""}.mi-css:before{content:""}.mi-currency-bitcoin:before{content:""}.mi-currency-exchange:before{content:""}.mi-currency-franc:before{content:""}.mi-currency-lira:before{content:""}.mi-currency-pound:before{content:""}.mi-currency-ruble:before{content:""}.mi-currency-rupee:before{content:""}.mi-currency-yen:before{content:""}.mi-currency-yuan:before{content:""}.mi-curtains:before{content:""}.mi-curtains-closed:before{content:""}.mi-cut:before{content:""}.mi-cyclone:before{content:""}.mi-dangerous:before{content:""}.mi-dark-mode:before{content:""}.mi-dashboard:before{content:""}.mi-dashboard-customize:before{content:""}.mi-data-array:before{content:""}.mi-data-exploration:before{content:""}.mi-data-object:before{content:""}.mi-data-saver-off:before{content:""}.mi-data-saver-on:before{content:""}.mi-data-thresholding:before{content:""}.mi-data-usage:before{content:""}.mi-dataset:before{content:""}.mi-dataset-linked:before{content:""}.mi-date-range:before{content:""}.mi-deblur:before{content:""}.mi-deck:before{content:""}.mi-dehaze:before{content:""}.mi-delete:before{content:""}.mi-delete-forever:before{content:""}.mi-delete-outline:before{content:""}.mi-delete-sweep:before{content:""}.mi-delivery-dining:before{content:""}.mi-density-large:before{content:""}.mi-density-medium:before{content:""}.mi-density-small:before{content:""}.mi-departure-board:before{content:""}.mi-description:before{content:""}.mi-deselect:before{content:""}.mi-design-services:before{content:""}.mi-desk:before{content:""}.mi-desktop-access-disabled:before{content:""}.mi-desktop-mac:before{content:""}.mi-desktop-windows:before{content:""}.mi-details:before{content:""}.mi-developer-board:before{content:""}.mi-developer-board-off:before{content:""}.mi-developer-mode:before{content:""}.mi-device-hub:before{content:""}.mi-device-thermostat:before{content:""}.mi-device-unknown:before{content:""}.mi-devices:before{content:""}.mi-devices-fold:before{content:""}.mi-devices-other:before{content:""}.mi-dew-point:before{content:""}.mi-dialer-sip:before{content:""}.mi-dialpad:before{content:""}.mi-diamond:before{content:""}.mi-difference:before{content:""}.mi-dining:before{content:""}.mi-dinner-dining:before{content:""}.mi-directions:before{content:""}.mi-directions-bike:before{content:""}.mi-directions-boat:before{content:""}.mi-directions-boat-filled:before{content:""}.mi-directions-bus:before{content:""}.mi-directions-bus-filled:before{content:""}.mi-directions-car:before{content:""}.mi-directions-car-filled:before{content:""}.mi-directions-ferry:before{content:""}.mi-directions-off:before{content:""}.mi-directions-railway:before{content:""}.mi-directions-railway-filled:before{content:""}.mi-directions-run:before{content:""}.mi-directions-subway:before{content:""}.mi-directions-subway-filled:before{content:""}.mi-directions-train:before{content:""}.mi-directions-transit:before{content:""}.mi-directions-transit-filled:before{content:""}.mi-directions-walk:before{content:""}.mi-dirty-lens:before{content:""}.mi-disabled-by-default:before{content:""}.mi-disabled-visible:before{content:""}.mi-disc-full:before{content:""}.mi-discord:before{content:""}.mi-discount:before{content:""}.mi-display-settings:before{content:""}.mi-diversity-1:before{content:""}.mi-diversity-2:before{content:""}.mi-diversity-3:before{content:""}.mi-dnd-forwardslash:before{content:""}.mi-dns:before{content:""}.mi-do-disturb:before{content:""}.mi-do-disturb-alt:before{content:""}.mi-do-disturb-off:before{content:""}.mi-do-disturb-on:before{content:""}.mi-do-not-disturb:before{content:""}.mi-do-not-disturb-alt:before{content:""}.mi-do-not-disturb-off:before{content:""}.mi-do-not-disturb-on:before{content:""}.mi-do-not-disturb-on-total-silence:before{content:""}.mi-do-not-step:before{content:""}.mi-do-not-touch:before{content:""}.mi-dock:before{content:""}.mi-document-scanner:before{content:""}.mi-domain:before{content:""}.mi-domain-add:before{content:""}.mi-domain-disabled:before{content:""}.mi-domain-verification:before{content:""}.mi-done:before{content:""}.mi-done-all:before{content:""}.mi-done-outline:before{content:""}.mi-donut-large:before{content:""}.mi-donut-small:before{content:""}.mi-door-back:before{content:""}.mi-door-front:before{content:""}.mi-door-sliding:before{content:""}.mi-doorbell:before{content:""}.mi-double-arrow:before{content:""}.mi-downhill-skiing:before{content:""}.mi-download:before{content:""}.mi-download-done:before{content:""}.mi-download-for-offline:before{content:""}.mi-downloading:before{content:""}.mi-drafts:before{content:""}.mi-drag-handle:before{content:""}.mi-drag-indicator:before{content:""}.mi-draw:before{content:""}.mi-drive-eta:before{content:""}.mi-drive-file-move:before{content:""}.mi-drive-file-move-outline:before{content:""}.mi-drive-file-move-rtl:before{content:""}.mi-drive-file-rename-outline:before{content:""}.mi-drive-folder-upload:before{content:""}.mi-dry:before{content:""}.mi-dry-cleaning:before{content:""}.mi-duo:before{content:""}.mi-dvr:before{content:""}.mi-dynamic-feed:before{content:""}.mi-dynamic-form:before{content:""}.mi-e-mobiledata:before{content:""}.mi-earbuds:before{content:""}.mi-earbuds-battery:before{content:""}.mi-east:before{content:""}.mi-eco:before{content:""}.mi-edgesensor-high:before{content:""}.mi-edgesensor-low:before{content:""}.mi-edit:before{content:""}.mi-edit-attributes:before{content:""}.mi-edit-calendar:before{content:""}.mi-edit-document:before{content:""}.mi-edit-location:before{content:""}.mi-edit-location-alt:before{content:""}.mi-edit-note:before{content:""}.mi-edit-notifications:before{content:""}.mi-edit-off:before{content:""}.mi-edit-road:before{content:""}.mi-edit-square:before{content:""}.mi-egg:before{content:""}.mi-egg-alt:before{content:""}.mi-eject:before{content:""}.mi-elderly:before{content:""}.mi-elderly-woman:before{content:""}.mi-electric-bike:before{content:""}.mi-electric-bolt:before{content:""}.mi-electric-car:before{content:""}.mi-electric-meter:before{content:""}.mi-electric-moped:before{content:""}.mi-electric-rickshaw:before{content:""}.mi-electric-scooter:before{content:""}.mi-electrical-services:before{content:""}.mi-elevator:before{content:""}.mi-email:before{content:""}.mi-emergency:before{content:""}.mi-emergency-recording:before{content:""}.mi-emergency-share:before{content:""}.mi-emoji-emotions:before{content:""}.mi-emoji-events:before{content:""}.mi-emoji-flags:before{content:""}.mi-emoji-food-beverage:before{content:""}.mi-emoji-nature:before{content:""}.mi-emoji-objects:before{content:""}.mi-emoji-people:before{content:""}.mi-emoji-symbols:before{content:""}.mi-emoji-transportation:before{content:""}.mi-energy-savings-leaf:before{content:""}.mi-engineering:before{content:""}.mi-enhance-photo-translate:before{content:""}.mi-enhanced-encryption:before{content:""}.mi-equalizer:before{content:""}.mi-error:before{content:""}.mi-error-outline:before{content:""}.mi-escalator:before{content:""}.mi-escalator-warning:before{content:""}.mi-euro:before{content:""}.mi-euro-symbol:before{content:""}.mi-ev-station:before{content:""}.mi-event:before{content:""}.mi-event-available:before{content:""}.mi-event-busy:before{content:""}.mi-event-note:before{content:""}.mi-event-repeat:before{content:""}.mi-event-seat:before{content:""}.mi-exit-to-app:before{content:""}.mi-expand:before{content:""}.mi-expand-circle-down:before{content:""}.mi-expand-less:before{content:""}.mi-expand-more:before{content:""}.mi-explicit:before{content:""}.mi-explore:before{content:""}.mi-explore-off:before{content:""}.mi-exposure:before{content:""}.mi-exposure-minus-1:before{content:""}.mi-exposure-minus-2:before{content:""}.mi-exposure-neg-1:before{content:""}.mi-exposure-neg-2:before{content:""}.mi-exposure-plus-1:before{content:""}.mi-exposure-plus-2:before{content:""}.mi-exposure-zero:before{content:""}.mi-extension:before{content:""}.mi-extension-off:before{content:""}.mi-face:before{content:""}.mi-face-2:before{content:""}.mi-face-3:before{content:""}.mi-face-4:before{content:""}.mi-face-5:before{content:""}.mi-face-6:before{content:""}.mi-face-retouching-natural:before{content:""}.mi-face-retouching-off:before{content:""}.mi-face-unlock:before{content:""}.mi-facebook:before{content:""}.mi-fact-check:before{content:""}.mi-factory:before{content:""}.mi-family-restroom:before{content:""}.mi-fast-forward:before{content:""}.mi-fast-rewind:before{content:""}.mi-fastfood:before{content:""}.mi-favorite:before{content:""}.mi-favorite-border:before{content:""}.mi-favorite-outline:before{content:""}.mi-fax:before{content:""}.mi-featured-play-list:before{content:""}.mi-featured-video:before{content:""}.mi-feed:before{content:""}.mi-feedback:before{content:""}.mi-female:before{content:""}.mi-fence:before{content:""}.mi-festival:before{content:""}.mi-fiber-dvr:before{content:""}.mi-fiber-manual-record:before{content:""}.mi-fiber-new:before{content:""}.mi-fiber-pin:before{content:""}.mi-fiber-smart-record:before{content:""}.mi-file-copy:before{content:""}.mi-file-download:before{content:""}.mi-file-download-done:before{content:""}.mi-file-download-off:before{content:""}.mi-file-open:before{content:""}.mi-file-present:before{content:""}.mi-file-upload:before{content:""}.mi-file-upload-off:before{content:""}.mi-filter:before{content:""}.mi-filter-1:before{content:""}.mi-filter-2:before{content:""}.mi-filter-3:before{content:""}.mi-filter-4:before{content:""}.mi-filter-5:before{content:""}.mi-filter-6:before{content:""}.mi-filter-7:before{content:""}.mi-filter-8:before{content:""}.mi-filter-9:before{content:""}.mi-filter-9-plus:before{content:""}.mi-filter-alt:before{content:""}.mi-filter-alt-off:before{content:""}.mi-filter-b-and-w:before{content:""}.mi-filter-center-focus:before{content:""}.mi-filter-drama:before{content:""}.mi-filter-frames:before{content:""}.mi-filter-hdr:before{content:""}.mi-filter-list:before{content:""}.mi-filter-list-alt:before{content:""}.mi-filter-list-off:before{content:""}.mi-filter-none:before{content:""}.mi-filter-tilt-shift:before{content:""}.mi-filter-vintage:before{content:""}.mi-find-in-page:before{content:""}.mi-find-replace:before{content:""}.mi-fingerprint:before{content:""}.mi-fire-extinguisher:before{content:""}.mi-fire-hydrant:before{content:""}.mi-fire-hydrant-alt:before{content:""}.mi-fire-truck:before{content:""}.mi-fireplace:before{content:""}.mi-first-page:before{content:""}.mi-fit-screen:before{content:""}.mi-fitbit:before{content:""}.mi-fitness-center:before{content:""}.mi-flag:before{content:""}.mi-flag-circle:before{content:""}.mi-flaky:before{content:""}.mi-flare:before{content:""}.mi-flash-auto:before{content:""}.mi-flash-off:before{content:""}.mi-flash-on:before{content:""}.mi-flashlight-off:before{content:""}.mi-flashlight-on:before{content:""}.mi-flatware:before{content:""}.mi-flight:before{content:""}.mi-flight-class:before{content:""}.mi-flight-land:before{content:""}.mi-flight-takeoff:before{content:""}.mi-flip:before{content:""}.mi-flip-camera-android:before{content:""}.mi-flip-camera-ios:before{content:""}.mi-flip-to-back:before{content:""}.mi-flip-to-front:before{content:""}.mi-flood:before{content:""}.mi-flourescent:before{content:""}.mi-fluorescent:before{content:""}.mi-flutter-dash:before{content:""}.mi-fmd-bad:before{content:""}.mi-fmd-good:before{content:""}.mi-foggy:before{content:""}.mi-folder:before{content:""}.mi-folder-copy:before{content:""}.mi-folder-delete:before{content:""}.mi-folder-off:before{content:""}.mi-folder-open:before{content:""}.mi-folder-shared:before{content:""}.mi-folder-special:before{content:""}.mi-folder-zip:before{content:""}.mi-follow-the-signs:before{content:""}.mi-font-download:before{content:""}.mi-font-download-off:before{content:""}.mi-food-bank:before{content:""}.mi-forest:before{content:""}.mi-fork-left:before{content:""}.mi-fork-right:before{content:""}.mi-forklift:before{content:""}.mi-format-align-center:before{content:""}.mi-format-align-justify:before{content:""}.mi-format-align-left:before{content:""}.mi-format-align-right:before{content:""}.mi-format-bold:before{content:""}.mi-format-clear:before{content:""}.mi-format-color-fill:before{content:""}.mi-format-color-reset:before{content:""}.mi-format-color-text:before{content:""}.mi-format-indent-decrease:before{content:""}.mi-format-indent-increase:before{content:""}.mi-format-italic:before{content:""}.mi-format-line-spacing:before{content:""}.mi-format-list-bulleted:before{content:""}.mi-format-list-bulleted-add:before{content:""}.mi-format-list-numbered:before{content:""}.mi-format-list-numbered-rtl:before{content:""}.mi-format-overline:before{content:""}.mi-format-paint:before{content:""}.mi-format-quote:before{content:""}.mi-format-shapes:before{content:""}.mi-format-size:before{content:""}.mi-format-strikethrough:before{content:""}.mi-format-textdirection-l-to-r:before{content:""}.mi-format-textdirection-r-to-l:before{content:""}.mi-format-underline:before{content:""}.mi-format-underlined:before{content:""}.mi-fort:before{content:""}.mi-forum:before{content:""}.mi-forward:before{content:""}.mi-forward-10:before{content:""}.mi-forward-30:before{content:""}.mi-forward-5:before{content:""}.mi-forward-to-inbox:before{content:""}.mi-foundation:before{content:""}.mi-free-breakfast:before{content:""}.mi-free-cancellation:before{content:""}.mi-front-hand:before{content:""}.mi-front-loader:before{content:""}.mi-fullscreen:before{content:""}.mi-fullscreen-exit:before{content:""}.mi-functions:before{content:""}.mi-g-mobiledata:before{content:""}.mi-g-translate:before{content:""}.mi-gamepad:before{content:""}.mi-games:before{content:""}.mi-garage:before{content:""}.mi-gas-meter:before{content:""}.mi-gavel:before{content:""}.mi-generating-tokens:before{content:""}.mi-gesture:before{content:""}.mi-get-app:before{content:""}.mi-gif:before{content:""}.mi-gif-box:before{content:""}.mi-girl:before{content:""}.mi-gite:before{content:""}.mi-goat:before{content:"􏿽"}.mi-golf-course:before{content:""}.mi-gpp-bad:before{content:""}.mi-gpp-good:before{content:""}.mi-gpp-maybe:before{content:""}.mi-gps-fixed:before{content:""}.mi-gps-not-fixed:before{content:""}.mi-gps-off:before{content:""}.mi-grade:before{content:""}.mi-gradient:before{content:""}.mi-grading:before{content:""}.mi-grain:before{content:""}.mi-graphic-eq:before{content:""}.mi-grass:before{content:""}.mi-grid-3x3:before{content:""}.mi-grid-4x4:before{content:""}.mi-grid-goldenratio:before{content:""}.mi-grid-off:before{content:""}.mi-grid-on:before{content:""}.mi-grid-view:before{content:""}.mi-group:before{content:""}.mi-group-add:before{content:""}.mi-group-off:before{content:""}.mi-group-remove:before{content:""}.mi-group-work:before{content:""}.mi-groups:before{content:""}.mi-groups-2:before{content:""}.mi-groups-3:before{content:""}.mi-h-mobiledata:before{content:""}.mi-h-plus-mobiledata:before{content:""}.mi-hail:before{content:""}.mi-handshake:before{content:""}.mi-handyman:before{content:""}.mi-hardware:before{content:""}.mi-hd:before{content:""}.mi-hdr-auto:before{content:""}.mi-hdr-auto-select:before{content:""}.mi-hdr-enhanced-select:before{content:""}.mi-hdr-off:before{content:""}.mi-hdr-off-select:before{content:""}.mi-hdr-on:before{content:""}.mi-hdr-on-select:before{content:""}.mi-hdr-plus:before{content:""}.mi-hdr-strong:before{content:""}.mi-hdr-weak:before{content:""}.mi-headphones:before{content:""}.mi-headphones-battery:before{content:""}.mi-headset:before{content:""}.mi-headset-mic:before{content:""}.mi-headset-off:before{content:""}.mi-healing:before{content:""}.mi-health-and-safety:before{content:""}.mi-hearing:before{content:""}.mi-hearing-disabled:before{content:""}.mi-heart-broken:before{content:""}.mi-heat-pump:before{content:""}.mi-height:before{content:""}.mi-help:before{content:""}.mi-help-center:before{content:""}.mi-help-outline:before{content:""}.mi-hevc:before{content:""}.mi-hexagon:before{content:""}.mi-hide-image:before{content:""}.mi-hide-source:before{content:""}.mi-high-quality:before{content:""}.mi-highlight:before{content:""}.mi-highlight-alt:before{content:""}.mi-highlight-off:before{content:""}.mi-highlight-remove:before{content:""}.mi-hiking:before{content:""}.mi-history:before{content:""}.mi-history-edu:before{content:""}.mi-history-toggle-off:before{content:""}.mi-hive:before{content:""}.mi-hls:before{content:""}.mi-hls-off:before{content:""}.mi-holiday-village:before{content:""}.mi-home:before{content:""}.mi-home-filled:before{content:""}.mi-home-max:before{content:""}.mi-home-mini:before{content:""}.mi-home-repair-service:before{content:""}.mi-home-work:before{content:""}.mi-horizontal-distribute:before{content:""}.mi-horizontal-rule:before{content:""}.mi-horizontal-split:before{content:""}.mi-hot-tub:before{content:""}.mi-hotel:before{content:""}.mi-hotel-class:before{content:""}.mi-hourglass-bottom:before{content:""}.mi-hourglass-disabled:before{content:""}.mi-hourglass-empty:before{content:""}.mi-hourglass-full:before{content:""}.mi-hourglass-top:before{content:""}.mi-house:before{content:""}.mi-house-siding:before{content:""}.mi-houseboat:before{content:""}.mi-how-to-reg:before{content:""}.mi-how-to-vote:before{content:""}.mi-html:before{content:""}.mi-http:before{content:""}.mi-https:before{content:""}.mi-hub:before{content:""}.mi-hvac:before{content:""}.mi-ice-skating:before{content:""}.mi-icecream:before{content:""}.mi-image:before{content:""}.mi-image-aspect-ratio:before{content:""}.mi-image-not-supported:before{content:""}.mi-image-search:before{content:""}.mi-imagesearch-roller:before{content:""}.mi-import-contacts:before{content:""}.mi-import-export:before{content:""}.mi-important-devices:before{content:""}.mi-inbox:before{content:""}.mi-incomplete-circle:before{content:""}.mi-indeterminate-check-box:before{content:""}.mi-info:before{content:""}.mi-info-outline:before{content:""}.mi-input:before{content:""}.mi-insert-chart:before{content:""}.mi-insert-chart-outlined:before{content:""}.mi-insert-comment:before{content:""}.mi-insert-drive-file:before{content:""}.mi-insert-emoticon:before{content:""}.mi-insert-invitation:before{content:""}.mi-insert-link:before{content:""}.mi-insert-page-break:before{content:""}.mi-insert-photo:before{content:""}.mi-insights:before{content:""}.mi-install-desktop:before{content:""}.mi-install-mobile:before{content:""}.mi-integration-instructions:before{content:""}.mi-interests:before{content:""}.mi-interpreter-mode:before{content:""}.mi-inventory:before{content:""}.mi-inventory-2:before{content:""}.mi-invert-colors:before{content:""}.mi-invert-colors-off:before{content:""}.mi-invert-colors-on:before{content:""}.mi-ios-share:before{content:""}.mi-iron:before{content:""}.mi-iso:before{content:""}.mi-javascript:before{content:""}.mi-join-full:before{content:""}.mi-join-inner:before{content:""}.mi-join-left:before{content:""}.mi-join-right:before{content:""}.mi-kayaking:before{content:""}.mi-kebab-dining:before{content:""}.mi-key:before{content:""}.mi-key-off:before{content:""}.mi-keyboard:before{content:""}.mi-keyboard-alt:before{content:""}.mi-keyboard-arrow-down:before{content:""}.mi-keyboard-arrow-left:before{content:""}.mi-keyboard-arrow-right:before{content:""}.mi-keyboard-arrow-up:before{content:""}.mi-keyboard-backspace:before{content:""}.mi-keyboard-capslock:before{content:""}.mi-keyboard-command:before{content:""}.mi-keyboard-command-key:before{content:""}.mi-keyboard-control:before{content:""}.mi-keyboard-control-key:before{content:""}.mi-keyboard-double-arrow-down:before{content:""}.mi-keyboard-double-arrow-left:before{content:""}.mi-keyboard-double-arrow-right:before{content:""}.mi-keyboard-double-arrow-up:before{content:""}.mi-keyboard-hide:before{content:""}.mi-keyboard-option:before{content:""}.mi-keyboard-option-key:before{content:""}.mi-keyboard-return:before{content:""}.mi-keyboard-tab:before{content:""}.mi-keyboard-voice:before{content:""}.mi-king-bed:before{content:""}.mi-kitchen:before{content:""}.mi-kitesurfing:before{content:""}.mi-label:before{content:""}.mi-label-important:before{content:""}.mi-label-important-outline:before{content:""}.mi-label-off:before{content:""}.mi-label-outline:before{content:""}.mi-lan:before{content:""}.mi-landscape:before{content:""}.mi-landslide:before{content:""}.mi-language:before{content:""}.mi-laptop:before{content:""}.mi-laptop-chromebook:before{content:""}.mi-laptop-mac:before{content:""}.mi-laptop-windows:before{content:""}.mi-last-page:before{content:""}.mi-launch:before{content:""}.mi-layers:before{content:""}.mi-layers-clear:before{content:""}.mi-leaderboard:before{content:""}.mi-leak-add:before{content:""}.mi-leak-remove:before{content:""}.mi-leave-bags-at-home:before{content:""}.mi-legend-toggle:before{content:""}.mi-lens:before{content:""}.mi-lens-blur:before{content:""}.mi-library-add:before{content:""}.mi-library-add-check:before{content:""}.mi-library-books:before{content:""}.mi-library-music:before{content:""}.mi-light:before{content:""}.mi-light-mode:before{content:""}.mi-lightbulb:before{content:""}.mi-lightbulb-circle:before{content:""}.mi-lightbulb-outline:before{content:""}.mi-line-axis:before{content:""}.mi-line-style:before{content:""}.mi-line-weight:before{content:""}.mi-linear-scale:before{content:""}.mi-link:before{content:""}.mi-link-off:before{content:""}.mi-linked-camera:before{content:""}.mi-liquor:before{content:""}.mi-list:before{content:""}.mi-list-alt:before{content:""}.mi-live-help:before{content:""}.mi-live-tv:before{content:""}.mi-living:before{content:""}.mi-local-activity:before{content:""}.mi-local-airport:before{content:""}.mi-local-atm:before{content:""}.mi-local-attraction:before{content:""}.mi-local-bar:before{content:""}.mi-local-cafe:before{content:""}.mi-local-car-wash:before{content:""}.mi-local-convenience-store:before{content:""}.mi-local-dining:before{content:""}.mi-local-drink:before{content:""}.mi-local-fire-department:before{content:""}.mi-local-florist:before{content:""}.mi-local-gas-station:before{content:""}.mi-local-grocery-store:before{content:""}.mi-local-hospital:before{content:""}.mi-local-hotel:before{content:""}.mi-local-laundry-service:before{content:""}.mi-local-library:before{content:""}.mi-local-mall:before{content:""}.mi-local-movies:before{content:""}.mi-local-offer:before{content:""}.mi-local-parking:before{content:""}.mi-local-pharmacy:before{content:""}.mi-local-phone:before{content:""}.mi-local-pizza:before{content:""}.mi-local-play:before{content:""}.mi-local-police:before{content:""}.mi-local-post-office:before{content:""}.mi-local-print-shop:before{content:""}.mi-local-printshop:before{content:""}.mi-local-restaurant:before{content:""}.mi-local-see:before{content:""}.mi-local-shipping:before{content:""}.mi-local-taxi:before{content:""}.mi-location-city:before{content:""}.mi-location-disabled:before{content:""}.mi-location-history:before{content:""}.mi-location-off:before{content:""}.mi-location-on:before{content:""}.mi-location-pin:before{content:""}.mi-location-searching:before{content:""}.mi-lock:before{content:""}.mi-lock-clock:before{content:""}.mi-lock-open:before{content:""}.mi-lock-outline:before{content:""}.mi-lock-person:before{content:""}.mi-lock-reset:before{content:""}.mi-login:before{content:""}.mi-logo-dev:before{content:""}.mi-logout:before{content:""}.mi-looks:before{content:""}.mi-looks-3:before{content:""}.mi-looks-4:before{content:""}.mi-looks-5:before{content:""}.mi-looks-6:before{content:""}.mi-looks-one:before{content:""}.mi-looks-two:before{content:""}.mi-loop:before{content:""}.mi-loupe:before{content:""}.mi-low-priority:before{content:""}.mi-loyalty:before{content:""}.mi-lte-mobiledata:before{content:""}.mi-lte-plus-mobiledata:before{content:""}.mi-luggage:before{content:""}.mi-lunch-dining:before{content:""}.mi-lyrics:before{content:""}.mi-macro-off:before{content:""}.mi-mail:before{content:""}.mi-mail-lock:before{content:""}.mi-mail-outline:before{content:""}.mi-male:before{content:""}.mi-man:before{content:""}.mi-man-2:before{content:""}.mi-man-3:before{content:""}.mi-man-4:before{content:""}.mi-manage-accounts:before{content:""}.mi-manage-history:before{content:""}.mi-manage-search:before{content:""}.mi-map:before{content:""}.mi-maps-home-work:before{content:""}.mi-maps-ugc:before{content:""}.mi-margin:before{content:""}.mi-mark-as-unread:before{content:""}.mi-mark-chat-read:before{content:""}.mi-mark-chat-unread:before{content:""}.mi-mark-email-read:before{content:""}.mi-mark-email-unread:before{content:""}.mi-mark-unread-chat-alt:before{content:""}.mi-markunread:before{content:""}.mi-markunread-mailbox:before{content:""}.mi-masks:before{content:""}.mi-maximize:before{content:""}.mi-media-bluetooth-off:before{content:""}.mi-media-bluetooth-on:before{content:""}.mi-mediation:before{content:""}.mi-medical-information:before{content:""}.mi-medical-services:before{content:""}.mi-medication:before{content:""}.mi-medication-liquid:before{content:""}.mi-meeting-room:before{content:""}.mi-memory:before{content:""}.mi-menu:before{content:""}.mi-menu-book:before{content:""}.mi-menu-open:before{content:""}.mi-merge:before{content:""}.mi-merge-type:before{content:""}.mi-message:before{content:""}.mi-messenger:before{content:""}.mi-messenger-outline:before{content:""}.mi-mic:before{content:""}.mi-mic-external-off:before{content:""}.mi-mic-external-on:before{content:""}.mi-mic-none:before{content:""}.mi-mic-off:before{content:""}.mi-microwave:before{content:""}.mi-military-tech:before{content:""}.mi-minimize:before{content:""}.mi-minor-crash:before{content:""}.mi-miscellaneous-services:before{content:""}.mi-missed-video-call:before{content:""}.mi-mms:before{content:""}.mi-mobile-friendly:before{content:""}.mi-mobile-off:before{content:""}.mi-mobile-screen-share:before{content:""}.mi-mobiledata-off:before{content:""}.mi-mode:before{content:""}.mi-mode-comment:before{content:""}.mi-mode-edit:before{content:""}.mi-mode-edit-outline:before{content:""}.mi-mode-fan-off:before{content:""}.mi-mode-night:before{content:""}.mi-mode-of-travel:before{content:""}.mi-mode-standby:before{content:""}.mi-model-training:before{content:""}.mi-monetization-on:before{content:""}.mi-money:before{content:""}.mi-money-off:before{content:""}.mi-money-off-csred:before{content:""}.mi-monitor:before{content:""}.mi-monitor-heart:before{content:""}.mi-monitor-weight:before{content:""}.mi-monochrome-photos:before{content:""}.mi-mood:before{content:""}.mi-mood-bad:before{content:""}.mi-moped:before{content:""}.mi-more:before{content:""}.mi-more-horiz:before{content:""}.mi-more-time:before{content:""}.mi-more-vert:before{content:""}.mi-mosque:before{content:""}.mi-motion-photos-auto:before{content:""}.mi-motion-photos-off:before{content:""}.mi-motion-photos-on:before{content:""}.mi-motion-photos-pause:before{content:""}.mi-motion-photos-paused:before{content:""}.mi-motorcycle:before{content:""}.mi-mouse:before{content:""}.mi-move-down:before{content:""}.mi-move-to-inbox:before{content:""}.mi-move-up:before{content:""}.mi-movie:before{content:""}.mi-movie-creation:before{content:""}.mi-movie-edit:before{content:""}.mi-movie-filter:before{content:""}.mi-moving:before{content:""}.mi-mp:before{content:""}.mi-multiline-chart:before{content:""}.mi-multiple-stop:before{content:""}.mi-multitrack-audio:before{content:""}.mi-museum:before{content:""}.mi-music-note:before{content:""}.mi-music-off:before{content:""}.mi-music-video:before{content:""}.mi-my-library-add:before{content:""}.mi-my-library-books:before{content:""}.mi-my-library-music:before{content:""}.mi-my-location:before{content:""}.mi-nat:before{content:""}.mi-nature:before{content:""}.mi-nature-people:before{content:""}.mi-navigate-before:before{content:""}.mi-navigate-next:before{content:""}.mi-navigation:before{content:""}.mi-near-me:before{content:""}.mi-near-me-disabled:before{content:""}.mi-nearby-error:before{content:""}.mi-nearby-off:before{content:""}.mi-nest-cam-wired-stand:before{content:""}.mi-network-cell:before{content:""}.mi-network-check:before{content:""}.mi-network-locked:before{content:""}.mi-network-ping:before{content:""}.mi-network-wifi:before{content:""}.mi-network-wifi-1-bar:before{content:""}.mi-network-wifi-2-bar:before{content:""}.mi-network-wifi-3-bar:before{content:""}.mi-new-label:before{content:""}.mi-new-releases:before{content:""}.mi-newspaper:before{content:""}.mi-next-plan:before{content:""}.mi-next-week:before{content:""}.mi-nfc:before{content:""}.mi-night-shelter:before{content:""}.mi-nightlife:before{content:""}.mi-nightlight:before{content:""}.mi-nightlight-round:before{content:""}.mi-nights-stay:before{content:""}.mi-no-accounts:before{content:""}.mi-no-adult-content:before{content:""}.mi-no-backpack:before{content:""}.mi-no-cell:before{content:""}.mi-no-crash:before{content:""}.mi-no-drinks:before{content:""}.mi-no-encryption:before{content:""}.mi-no-encryption-gmailerrorred:before{content:""}.mi-no-flash:before{content:""}.mi-no-food:before{content:""}.mi-no-luggage:before{content:""}.mi-no-meals:before{content:""}.mi-no-meals-ouline:before{content:""}.mi-no-meeting-room:before{content:""}.mi-no-photography:before{content:""}.mi-no-sim:before{content:""}.mi-no-stroller:before{content:""}.mi-no-transfer:before{content:""}.mi-noise-aware:before{content:""}.mi-noise-control-off:before{content:""}.mi-nordic-walking:before{content:""}.mi-north:before{content:""}.mi-north-east:before{content:""}.mi-north-west:before{content:""}.mi-not-accessible:before{content:""}.mi-not-interested:before{content:""}.mi-not-listed-location:before{content:""}.mi-not-started:before{content:""}.mi-note:before{content:""}.mi-note-add:before{content:""}.mi-note-alt:before{content:""}.mi-notes:before{content:""}.mi-notification-add:before{content:""}.mi-notification-important:before{content:""}.mi-notifications:before{content:""}.mi-notifications-active:before{content:""}.mi-notifications-none:before{content:""}.mi-notifications-off:before{content:""}.mi-notifications-on:before{content:""}.mi-notifications-paused:before{content:""}.mi-now-wallpaper:before{content:""}.mi-now-widgets:before{content:""}.mi-numbers:before{content:""}.mi-offline-bolt:before{content:""}.mi-offline-pin:before{content:""}.mi-offline-share:before{content:""}.mi-oil-barrel:before{content:""}.mi-on-device-training:before{content:""}.mi-ondemand-video:before{content:""}.mi-online-prediction:before{content:""}.mi-opacity:before{content:""}.mi-open-in-browser:before{content:""}.mi-open-in-full:before{content:""}.mi-open-in-new:before{content:""}.mi-open-in-new-off:before{content:""}.mi-open-with:before{content:""}.mi-other-houses:before{content:""}.mi-outbond:before{content:""}.mi-outbound:before{content:""}.mi-outbox:before{content:""}.mi-outdoor-grill:before{content:""}.mi-outgoing-mail:before{content:""}.mi-outlet:before{content:""}.mi-outlined-flag:before{content:""}.mi-output:before{content:""}.mi-padding:before{content:""}.mi-pages:before{content:""}.mi-pageview:before{content:""}.mi-paid:before{content:""}.mi-palette:before{content:""}.mi-pallet:before{content:""}.mi-pan-tool:before{content:""}.mi-pan-tool-alt:before{content:""}.mi-panorama:before{content:""}.mi-panorama-fish-eye:before{content:""}.mi-panorama-fisheye:before{content:""}.mi-panorama-horizontal:before{content:""}.mi-panorama-horizontal-select:before{content:""}.mi-panorama-photosphere:before{content:""}.mi-panorama-photosphere-select:before{content:""}.mi-panorama-vertical:before{content:""}.mi-panorama-vertical-select:before{content:""}.mi-panorama-wide-angle:before{content:""}.mi-panorama-wide-angle-select:before{content:""}.mi-paragliding:before{content:""}.mi-park:before{content:""}.mi-party-mode:before{content:""}.mi-password:before{content:""}.mi-paste:before{content:""}.mi-pattern:before{content:""}.mi-pause:before{content:""}.mi-pause-circle:before{content:""}.mi-pause-circle-filled:before{content:""}.mi-pause-circle-outline:before{content:""}.mi-pause-presentation:before{content:""}.mi-payment:before{content:""}.mi-payments:before{content:""}.mi-paypal:before{content:""}.mi-pedal-bike:before{content:""}.mi-pending:before{content:""}.mi-pending-actions:before{content:""}.mi-pentagon:before{content:""}.mi-people:before{content:""}.mi-people-alt:before{content:""}.mi-people-outline:before{content:""}.mi-percent:before{content:""}.mi-perm-camera-mic:before{content:""}.mi-perm-contact-cal:before{content:""}.mi-perm-contact-calendar:before{content:""}.mi-perm-data-setting:before{content:""}.mi-perm-device-info:before{content:""}.mi-perm-device-information:before{content:""}.mi-perm-identity:before{content:""}.mi-perm-media:before{content:""}.mi-perm-phone-msg:before{content:""}.mi-perm-scan-wifi:before{content:""}.mi-person:before{content:""}.mi-person-2:before{content:""}.mi-person-3:before{content:""}.mi-person-4:before{content:""}.mi-person-add:before{content:""}.mi-person-add-alt:before{content:""}.mi-person-add-alt-1:before{content:""}.mi-person-add-disabled:before{content:""}.mi-person-off:before{content:""}.mi-person-outline:before{content:""}.mi-person-pin:before{content:""}.mi-person-pin-circle:before{content:""}.mi-person-remove:before{content:""}.mi-person-remove-alt-1:before{content:""}.mi-person-search:before{content:""}.mi-personal-injury:before{content:""}.mi-personal-video:before{content:""}.mi-pest-control:before{content:""}.mi-pest-control-rodent:before{content:""}.mi-pets:before{content:""}.mi-phishing:before{content:""}.mi-phone:before{content:""}.mi-phone-android:before{content:""}.mi-phone-bluetooth-speaker:before{content:""}.mi-phone-callback:before{content:""}.mi-phone-disabled:before{content:""}.mi-phone-enabled:before{content:""}.mi-phone-forwarded:before{content:""}.mi-phone-in-talk:before{content:""}.mi-phone-iphone:before{content:""}.mi-phone-locked:before{content:""}.mi-phone-missed:before{content:""}.mi-phone-paused:before{content:""}.mi-phonelink:before{content:""}.mi-phonelink-erase:before{content:""}.mi-phonelink-lock:before{content:""}.mi-phonelink-off:before{content:""}.mi-phonelink-ring:before{content:""}.mi-phonelink-setup:before{content:""}.mi-photo:before{content:""}.mi-photo-album:before{content:""}.mi-photo-camera:before{content:""}.mi-photo-camera-back:before{content:""}.mi-photo-camera-front:before{content:""}.mi-photo-filter:before{content:""}.mi-photo-library:before{content:""}.mi-photo-size-select-actual:before{content:""}.mi-photo-size-select-large:before{content:""}.mi-photo-size-select-small:before{content:""}.mi-php:before{content:""}.mi-piano:before{content:""}.mi-piano-off:before{content:""}.mi-picture-as-pdf:before{content:""}.mi-picture-in-picture:before{content:""}.mi-picture-in-picture-alt:before{content:""}.mi-pie-chart:before{content:""}.mi-pie-chart-outline:before{content:""}.mi-pie-chart-outlined:before{content:""}.mi-pin:before{content:""}.mi-pin-drop:before{content:""}.mi-pin-end:before{content:""}.mi-pin-invoke:before{content:""}.mi-pinch:before{content:""}.mi-pivot-table-chart:before{content:""}.mi-pix:before{content:""}.mi-place:before{content:""}.mi-plagiarism:before{content:""}.mi-play-arrow:before{content:""}.mi-play-circle:before{content:""}.mi-play-circle-fill:before{content:""}.mi-play-circle-filled:before{content:""}.mi-play-circle-outline:before{content:""}.mi-play-disabled:before{content:""}.mi-play-for-work:before{content:""}.mi-play-lesson:before{content:""}.mi-playlist-add:before{content:""}.mi-playlist-add-check:before{content:""}.mi-playlist-add-check-circle:before{content:""}.mi-playlist-add-circle:before{content:""}.mi-playlist-play:before{content:""}.mi-playlist-remove:before{content:""}.mi-plumbing:before{content:""}.mi-plus-one:before{content:""}.mi-podcasts:before{content:""}.mi-point-of-sale:before{content:""}.mi-policy:before{content:""}.mi-poll:before{content:""}.mi-polyline:before{content:""}.mi-polymer:before{content:""}.mi-pool:before{content:""}.mi-portable-wifi-off:before{content:""}.mi-portrait:before{content:""}.mi-post-add:before{content:""}.mi-power:before{content:""}.mi-power-input:before{content:""}.mi-power-off:before{content:""}.mi-power-settings-new:before{content:""}.mi-precision-manufacturing:before{content:""}.mi-pregnant-woman:before{content:""}.mi-present-to-all:before{content:""}.mi-preview:before{content:""}.mi-price-change:before{content:""}.mi-price-check:before{content:""}.mi-print:before{content:""}.mi-print-disabled:before{content:""}.mi-priority-high:before{content:""}.mi-privacy-tip:before{content:""}.mi-private-connectivity:before{content:""}.mi-production-quantity-limits:before{content:""}.mi-propane:before{content:""}.mi-propane-tank:before{content:""}.mi-psychology:before{content:""}.mi-psychology-alt:before{content:""}.mi-public:before{content:""}.mi-public-off:before{content:""}.mi-publish:before{content:""}.mi-published-with-changes:before{content:""}.mi-punch-clock:before{content:""}.mi-push-pin:before{content:""}.mi-qr-code:before{content:""}.mi-qr-code-2:before{content:""}.mi-qr-code-scanner:before{content:""}.mi-query-builder:before{content:""}.mi-query-stats:before{content:""}.mi-question-answer:before{content:""}.mi-question-mark:before{content:""}.mi-queue:before{content:""}.mi-queue-music:before{content:""}.mi-queue-play-next:before{content:""}.mi-quick-contacts-dialer:before{content:""}.mi-quick-contacts-mail:before{content:""}.mi-quickreply:before{content:""}.mi-quiz:before{content:""}.mi-quora:before{content:""}.mi-r-mobiledata:before{content:""}.mi-radar:before{content:""}.mi-radio:before{content:""}.mi-radio-button-checked:before{content:""}.mi-radio-button-off:before{content:""}.mi-radio-button-on:before{content:""}.mi-radio-button-unchecked:before{content:""}.mi-railway-alert:before{content:""}.mi-ramen-dining:before{content:""}.mi-ramp-left:before{content:""}.mi-ramp-right:before{content:""}.mi-rate-review:before{content:""}.mi-raw-off:before{content:""}.mi-raw-on:before{content:""}.mi-read-more:before{content:""}.mi-real-estate-agent:before{content:""}.mi-rebase-edit:before{content:""}.mi-receipt:before{content:""}.mi-receipt-long:before{content:""}.mi-recent-actors:before{content:""}.mi-recommend:before{content:""}.mi-record-voice-over:before{content:""}.mi-rectangle:before{content:""}.mi-recycling:before{content:""}.mi-reddit:before{content:""}.mi-redeem:before{content:""}.mi-redo:before{content:""}.mi-reduce-capacity:before{content:""}.mi-refresh:before{content:""}.mi-remember-me:before{content:""}.mi-remove:before{content:""}.mi-remove-circle:before{content:""}.mi-remove-circle-outline:before{content:""}.mi-remove-done:before{content:""}.mi-remove-from-queue:before{content:""}.mi-remove-moderator:before{content:""}.mi-remove-red-eye:before{content:""}.mi-remove-road:before{content:""}.mi-remove-shopping-cart:before{content:""}.mi-reorder:before{content:""}.mi-repartition:before{content:""}.mi-repeat:before{content:""}.mi-repeat-on:before{content:""}.mi-repeat-one:before{content:""}.mi-repeat-one-on:before{content:""}.mi-replay:before{content:""}.mi-replay-10:before{content:""}.mi-replay-30:before{content:""}.mi-replay-5:before{content:""}.mi-replay-circle-filled:before{content:""}.mi-reply:before{content:""}.mi-reply-all:before{content:""}.mi-report:before{content:""}.mi-report-gmailerrorred:before{content:""}.mi-report-off:before{content:""}.mi-report-problem:before{content:""}.mi-request-page:before{content:""}.mi-request-quote:before{content:""}.mi-reset-tv:before{content:""}.mi-restart-alt:before{content:""}.mi-restaurant:before{content:""}.mi-restaurant-menu:before{content:""}.mi-restore:before{content:""}.mi-restore-from-trash:before{content:""}.mi-restore-page:before{content:""}.mi-reviews:before{content:""}.mi-rice-bowl:before{content:""}.mi-ring-volume:before{content:""}.mi-rocket:before{content:""}.mi-rocket-launch:before{content:""}.mi-roller-shades:before{content:""}.mi-roller-shades-closed:before{content:""}.mi-roller-skating:before{content:""}.mi-roofing:before{content:""}.mi-room:before{content:""}.mi-room-preferences:before{content:""}.mi-room-service:before{content:""}.mi-rotate-90-degrees-ccw:before{content:""}.mi-rotate-90-degrees-cw:before{content:""}.mi-rotate-left:before{content:""}.mi-rotate-right:before{content:""}.mi-roundabout-left:before{content:""}.mi-roundabout-right:before{content:""}.mi-rounded-corner:before{content:""}.mi-route:before{content:""}.mi-router:before{content:""}.mi-rowing:before{content:""}.mi-rss-feed:before{content:""}.mi-rsvp:before{content:""}.mi-rtt:before{content:""}.mi-rule:before{content:""}.mi-rule-folder:before{content:""}.mi-run-circle:before{content:""}.mi-running-with-errors:before{content:""}.mi-rv-hookup:before{content:""}.mi-safety-check:before{content:""}.mi-safety-divider:before{content:""}.mi-sailing:before{content:""}.mi-sanitizer:before{content:""}.mi-satellite:before{content:""}.mi-satellite-alt:before{content:""}.mi-save:before{content:""}.mi-save-alt:before{content:""}.mi-save-as:before{content:""}.mi-saved-search:before{content:""}.mi-savings:before{content:""}.mi-scale:before{content:""}.mi-scanner:before{content:""}.mi-scatter-plot:before{content:""}.mi-schedule:before{content:""}.mi-schedule-send:before{content:""}.mi-schema:before{content:""}.mi-school:before{content:""}.mi-science:before{content:""}.mi-score:before{content:""}.mi-scoreboard:before{content:""}.mi-screen-lock-landscape:before{content:""}.mi-screen-lock-portrait:before{content:""}.mi-screen-lock-rotation:before{content:""}.mi-screen-rotation:before{content:""}.mi-screen-rotation-alt:before{content:""}.mi-screen-search-desktop:before{content:""}.mi-screen-share:before{content:""}.mi-screenshot:before{content:""}.mi-screenshot-monitor:before{content:""}.mi-scuba-diving:before{content:""}.mi-sd:before{content:""}.mi-sd-card:before{content:""}.mi-sd-card-alert:before{content:""}.mi-sd-storage:before{content:""}.mi-search:before{content:""}.mi-search-off:before{content:""}.mi-security:before{content:""}.mi-security-update:before{content:""}.mi-security-update-good:before{content:""}.mi-security-update-warning:before{content:""}.mi-segment:before{content:""}.mi-select-all:before{content:""}.mi-self-improvement:before{content:""}.mi-sell:before{content:""}.mi-send:before{content:""}.mi-send-and-archive:before{content:""}.mi-send-time-extension:before{content:""}.mi-send-to-mobile:before{content:""}.mi-sensor-door:before{content:""}.mi-sensor-occupied:before{content:""}.mi-sensor-window:before{content:""}.mi-sensors:before{content:""}.mi-sensors-off:before{content:""}.mi-sentiment-dissatisfied:before{content:""}.mi-sentiment-neutral:before{content:""}.mi-sentiment-satisfied:before{content:""}.mi-sentiment-satisfied-alt:before{content:""}.mi-sentiment-very-dissatisfied:before{content:""}.mi-sentiment-very-satisfied:before{content:""}.mi-set-meal:before{content:""}.mi-settings:before{content:""}.mi-settings-accessibility:before{content:""}.mi-settings-applications:before{content:""}.mi-settings-backup-restore:before{content:""}.mi-settings-bluetooth:before{content:""}.mi-settings-brightness:before{content:""}.mi-settings-cell:before{content:""}.mi-settings-display:before{content:""}.mi-settings-ethernet:before{content:""}.mi-settings-input-antenna:before{content:""}.mi-settings-input-component:before{content:""}.mi-settings-input-composite:before{content:""}.mi-settings-input-hdmi:before{content:""}.mi-settings-input-svideo:before{content:""}.mi-settings-overscan:before{content:""}.mi-settings-phone:before{content:""}.mi-settings-power:before{content:""}.mi-settings-remote:before{content:""}.mi-settings-suggest:before{content:""}.mi-settings-system-daydream:before{content:""}.mi-settings-voice:before{content:""}.mi-severe-cold:before{content:""}.mi-shape-line:before{content:""}.mi-share:before{content:""}.mi-share-arrival-time:before{content:""}.mi-share-location:before{content:""}.mi-shelves:before{content:""}.mi-shield:before{content:""}.mi-shield-moon:before{content:""}.mi-shop:before{content:""}.mi-shop-2:before{content:""}.mi-shop-two:before{content:""}.mi-shopify:before{content:""}.mi-shopping-bag:before{content:""}.mi-shopping-basket:before{content:""}.mi-shopping-cart:before{content:""}.mi-shopping-cart-checkout:before{content:""}.mi-short-text:before{content:""}.mi-shortcut:before{content:""}.mi-show-chart:before{content:""}.mi-shower:before{content:""}.mi-shuffle:before{content:""}.mi-shuffle-on:before{content:""}.mi-shutter-speed:before{content:""}.mi-sick:before{content:""}.mi-sign-language:before{content:""}.mi-signal-cellular-0-bar:before{content:""}.mi-signal-cellular-1-bar:before{content:""}.mi-signal-cellular-2-bar:before{content:""}.mi-signal-cellular-3-bar:before{content:""}.mi-signal-cellular-4-bar:before{content:""}.mi-signal-cellular-alt:before{content:""}.mi-signal-cellular-alt-1-bar:before{content:""}.mi-signal-cellular-alt-2-bar:before{content:""}.mi-signal-cellular-connected-no-internet-0-bar:before{content:""}.mi-signal-cellular-connected-no-internet-1-bar:before{content:""}.mi-signal-cellular-connected-no-internet-2-bar:before{content:""}.mi-signal-cellular-connected-no-internet-3-bar:before{content:""}.mi-signal-cellular-connected-no-internet-4-bar:before{content:""}.mi-signal-cellular-no-sim:before{content:""}.mi-signal-cellular-nodata:before{content:""}.mi-signal-cellular-null:before{content:""}.mi-signal-cellular-off:before{content:""}.mi-signal-wifi-0-bar:before{content:""}.mi-signal-wifi-1-bar:before{content:""}.mi-signal-wifi-1-bar-lock:before{content:""}.mi-signal-wifi-2-bar:before{content:""}.mi-signal-wifi-2-bar-lock:before{content:""}.mi-signal-wifi-3-bar:before{content:""}.mi-signal-wifi-3-bar-lock:before{content:""}.mi-signal-wifi-4-bar:before{content:""}.mi-signal-wifi-4-bar-lock:before{content:""}.mi-signal-wifi-bad:before{content:""}.mi-signal-wifi-connected-no-internet-0:before{content:""}.mi-signal-wifi-connected-no-internet-1:before{content:""}.mi-signal-wifi-connected-no-internet-2:before{content:""}.mi-signal-wifi-connected-no-internet-3:before{content:""}.mi-signal-wifi-connected-no-internet-4:before{content:""}.mi-signal-wifi-off:before{content:""}.mi-signal-wifi-statusbar-1-bar:before{content:""}.mi-signal-wifi-statusbar-2-bar:before{content:""}.mi-signal-wifi-statusbar-3-bar:before{content:""}.mi-signal-wifi-statusbar-4-bar:before{content:""}.mi-signal-wifi-statusbar-connected-no-internet:before{content:""}.mi-signal-wifi-statusbar-connected-no-internet-1:before{content:""}.mi-signal-wifi-statusbar-connected-no-internet-2:before{content:""}.mi-signal-wifi-statusbar-connected-no-internet-3:before{content:""}.mi-signal-wifi-statusbar-connected-no-internet-4:before{content:""}.mi-signal-wifi-statusbar-not-connected:before{content:""}.mi-signal-wifi-statusbar-null:before{content:""}.mi-signpost:before{content:""}.mi-sim-card:before{content:""}.mi-sim-card-alert:before{content:""}.mi-sim-card-download:before{content:""}.mi-single-bed:before{content:""}.mi-sip:before{content:""}.mi-skateboarding:before{content:""}.mi-skip-next:before{content:""}.mi-skip-previous:before{content:""}.mi-sledding:before{content:""}.mi-slideshow:before{content:""}.mi-slow-motion-video:before{content:""}.mi-smart-button:before{content:""}.mi-smart-display:before{content:""}.mi-smart-screen:before{content:""}.mi-smart-toy:before{content:""}.mi-smartphone:before{content:""}.mi-smoke-free:before{content:""}.mi-smoking-rooms:before{content:""}.mi-sms:before{content:""}.mi-sms-failed:before{content:""}.mi-snapchat:before{content:""}.mi-snippet-folder:before{content:""}.mi-snooze:before{content:""}.mi-snowboarding:before{content:""}.mi-snowing:before{content:""}.mi-snowmobile:before{content:""}.mi-snowshoeing:before{content:""}.mi-soap:before{content:""}.mi-social-distance:before{content:""}.mi-solar-power:before{content:""}.mi-sort:before{content:""}.mi-sort-by-alpha:before{content:""}.mi-sos:before{content:""}.mi-soup-kitchen:before{content:""}.mi-source:before{content:""}.mi-south:before{content:""}.mi-south-america:before{content:""}.mi-south-east:before{content:""}.mi-south-west:before{content:""}.mi-spa:before{content:""}.mi-space-bar:before{content:""}.mi-space-dashboard:before{content:""}.mi-spatial-audio:before{content:""}.mi-spatial-audio-off:before{content:""}.mi-spatial-tracking:before{content:""}.mi-speaker:before{content:""}.mi-speaker-group:before{content:""}.mi-speaker-notes:before{content:""}.mi-speaker-notes-off:before{content:""}.mi-speaker-phone:before{content:""}.mi-speed:before{content:""}.mi-spellcheck:before{content:""}.mi-splitscreen:before{content:""}.mi-spoke:before{content:""}.mi-sports:before{content:""}.mi-sports-bar:before{content:""}.mi-sports-baseball:before{content:""}.mi-sports-basketball:before{content:""}.mi-sports-cricket:before{content:""}.mi-sports-esports:before{content:""}.mi-sports-football:before{content:""}.mi-sports-golf:before{content:""}.mi-sports-gymnastics:before{content:""}.mi-sports-handball:before{content:""}.mi-sports-hockey:before{content:""}.mi-sports-kabaddi:before{content:""}.mi-sports-martial-arts:before{content:""}.mi-sports-mma:before{content:""}.mi-sports-motorsports:before{content:""}.mi-sports-rugby:before{content:""}.mi-sports-score:before{content:""}.mi-sports-soccer:before{content:""}.mi-sports-tennis:before{content:""}.mi-sports-volleyball:before{content:""}.mi-square:before{content:""}.mi-square-foot:before{content:""}.mi-ssid-chart:before{content:""}.mi-stacked-bar-chart:before{content:""}.mi-stacked-line-chart:before{content:""}.mi-stadium:before{content:""}.mi-stairs:before{content:""}.mi-star:before{content:""}.mi-star-border:before{content:""}.mi-star-border-purple500:before{content:""}.mi-star-half:before{content:""}.mi-star-outline:before{content:""}.mi-star-purple500:before{content:""}.mi-star-rate:before{content:""}.mi-stars:before{content:""}.mi-start:before{content:""}.mi-stay-current-landscape:before{content:""}.mi-stay-current-portrait:before{content:""}.mi-stay-primary-landscape:before{content:""}.mi-stay-primary-portrait:before{content:""}.mi-sticky-note-2:before{content:""}.mi-stop:before{content:""}.mi-stop-circle:before{content:""}.mi-stop-screen-share:before{content:""}.mi-storage:before{content:""}.mi-store:before{content:""}.mi-store-mall-directory:before{content:""}.mi-storefront:before{content:""}.mi-storm:before{content:""}.mi-straight:before{content:""}.mi-straighten:before{content:""}.mi-stream:before{content:""}.mi-streetview:before{content:""}.mi-strikethrough-s:before{content:""}.mi-stroller:before{content:""}.mi-style:before{content:""}.mi-subdirectory-arrow-left:before{content:""}.mi-subdirectory-arrow-right:before{content:""}.mi-subject:before{content:""}.mi-subscript:before{content:""}.mi-subscriptions:before{content:""}.mi-subtitles:before{content:""}.mi-subtitles-off:before{content:""}.mi-subway:before{content:""}.mi-summarize:before{content:""}.mi-sunny:before{content:""}.mi-sunny-snowing:before{content:""}.mi-superscript:before{content:""}.mi-supervised-user-circle:before{content:""}.mi-supervisor-account:before{content:""}.mi-support:before{content:""}.mi-support-agent:before{content:""}.mi-surfing:before{content:""}.mi-surround-sound:before{content:""}.mi-swap-calls:before{content:""}.mi-swap-horiz:before{content:""}.mi-swap-horizontal-circle:before{content:""}.mi-swap-vert:before{content:""}.mi-swap-vert-circle:before{content:""}.mi-swap-vertical-circle:before{content:""}.mi-swipe:before{content:""}.mi-swipe-down:before{content:""}.mi-swipe-down-alt:before{content:""}.mi-swipe-left:before{content:""}.mi-swipe-left-alt:before{content:""}.mi-swipe-right:before{content:""}.mi-swipe-right-alt:before{content:""}.mi-swipe-up:before{content:""}.mi-swipe-up-alt:before{content:""}.mi-swipe-vertical:before{content:""}.mi-switch-access-shortcut:before{content:""}.mi-switch-access-shortcut-add:before{content:""}.mi-switch-account:before{content:""}.mi-switch-camera:before{content:""}.mi-switch-left:before{content:""}.mi-switch-right:before{content:""}.mi-switch-video:before{content:""}.mi-synagogue:before{content:""}.mi-sync:before{content:""}.mi-sync-alt:before{content:""}.mi-sync-disabled:before{content:""}.mi-sync-lock:before{content:""}.mi-sync-problem:before{content:""}.mi-system-security-update:before{content:""}.mi-system-security-update-good:before{content:""}.mi-system-security-update-warning:before{content:""}.mi-system-update:before{content:""}.mi-system-update-alt:before{content:""}.mi-system-update-tv:before{content:""}.mi-tab:before{content:""}.mi-tab-unselected:before{content:""}.mi-table-bar:before{content:""}.mi-table-chart:before{content:""}.mi-table-restaurant:before{content:""}.mi-table-rows:before{content:""}.mi-table-view:before{content:""}.mi-tablet:before{content:""}.mi-tablet-android:before{content:""}.mi-tablet-mac:before{content:""}.mi-tag:before{content:""}.mi-tag-faces:before{content:""}.mi-takeout-dining:before{content:""}.mi-tap-and-play:before{content:""}.mi-tapas:before{content:""}.mi-task:before{content:""}.mi-task-alt:before{content:""}.mi-taxi-alert:before{content:""}.mi-telegram:before{content:""}.mi-temple-buddhist:before{content:""}.mi-temple-hindu:before{content:""}.mi-terminal:before{content:""}.mi-terrain:before{content:""}.mi-text-decrease:before{content:""}.mi-text-fields:before{content:""}.mi-text-format:before{content:""}.mi-text-increase:before{content:""}.mi-text-rotate-up:before{content:""}.mi-text-rotate-vertical:before{content:""}.mi-text-rotation-angledown:before{content:""}.mi-text-rotation-angleup:before{content:""}.mi-text-rotation-down:before{content:""}.mi-text-rotation-none:before{content:""}.mi-text-snippet:before{content:""}.mi-textsms:before{content:""}.mi-texture:before{content:""}.mi-theater-comedy:before{content:""}.mi-theaters:before{content:""}.mi-thermostat:before{content:""}.mi-thermostat-auto:before{content:""}.mi-thumb-down:before{content:""}.mi-thumb-down-alt:before{content:""}.mi-thumb-down-off-alt:before{content:""}.mi-thumb-up:before{content:""}.mi-thumb-up-alt:before{content:""}.mi-thumb-up-off-alt:before{content:""}.mi-thumbs-up-down:before{content:""}.mi-thunderstorm:before{content:""}.mi-tiktok:before{content:""}.mi-time-to-leave:before{content:""}.mi-timelapse:before{content:""}.mi-timeline:before{content:""}.mi-timer:before{content:""}.mi-timer-10:before{content:""}.mi-timer-10-select:before{content:""}.mi-timer-3:before{content:""}.mi-timer-3-select:before{content:""}.mi-timer-off:before{content:""}.mi-tips-and-updates:before{content:""}.mi-tire-repair:before{content:""}.mi-title:before{content:""}.mi-toc:before{content:""}.mi-today:before{content:""}.mi-toggle-off:before{content:""}.mi-toggle-on:before{content:""}.mi-token:before{content:""}.mi-toll:before{content:""}.mi-tonality:before{content:""}.mi-topic:before{content:""}.mi-tornado:before{content:""}.mi-touch-app:before{content:""}.mi-tour:before{content:""}.mi-toys:before{content:""}.mi-track-changes:before{content:""}.mi-traffic:before{content:""}.mi-train:before{content:""}.mi-tram:before{content:""}.mi-transcribe:before{content:""}.mi-transfer-within-a-station:before{content:""}.mi-transform:before{content:""}.mi-transgender:before{content:""}.mi-transit-enterexit:before{content:""}.mi-translate:before{content:""}.mi-travel-explore:before{content:""}.mi-trending-down:before{content:""}.mi-trending-flat:before{content:""}.mi-trending-neutral:before{content:""}.mi-trending-up:before{content:""}.mi-trip-origin:before{content:""}.mi-trolley:before{content:""}.mi-troubleshoot:before{content:""}.mi-try:before{content:""}.mi-tsunami:before{content:""}.mi-tty:before{content:""}.mi-tune:before{content:""}.mi-tungsten:before{content:""}.mi-turn-left:before{content:""}.mi-turn-right:before{content:""}.mi-turn-sharp-left:before{content:""}.mi-turn-sharp-right:before{content:""}.mi-turn-slight-left:before{content:""}.mi-turn-slight-right:before{content:""}.mi-turned-in:before{content:""}.mi-turned-in-not:before{content:""}.mi-tv:before{content:""}.mi-tv-off:before{content:""}.mi-two-wheeler:before{content:""}.mi-type-specimen:before{content:""}.mi-u-turn-left:before{content:""}.mi-u-turn-right:before{content:""}.mi-umbrella:before{content:""}.mi-unarchive:before{content:""}.mi-undo:before{content:""}.mi-unfold-less:before{content:""}.mi-unfold-less-double:before{content:""}.mi-unfold-more:before{content:""}.mi-unfold-more-double:before{content:""}.mi-unpublished:before{content:""}.mi-unsubscribe:before{content:""}.mi-upcoming:before{content:""}.mi-update:before{content:""}.mi-update-disabled:before{content:""}.mi-upgrade:before{content:""}.mi-upload:before{content:""}.mi-upload-file:before{content:""}.mi-usb:before{content:""}.mi-usb-off:before{content:""}.mi-vaccines:before{content:""}.mi-vape-free:before{content:""}.mi-vaping-rooms:before{content:""}.mi-verified:before{content:""}.mi-verified-user:before{content:""}.mi-vertical-align-bottom:before{content:""}.mi-vertical-align-center:before{content:""}.mi-vertical-align-top:before{content:""}.mi-vertical-distribute:before{content:""}.mi-vertical-shades:before{content:""}.mi-vertical-shades-closed:before{content:""}.mi-vertical-split:before{content:""}.mi-vibration:before{content:""}.mi-video-call:before{content:""}.mi-video-camera-back:before{content:""}.mi-video-camera-front:before{content:""}.mi-video-chat:before{content:""}.mi-video-collection:before{content:""}.mi-video-file:before{content:""}.mi-video-label:before{content:""}.mi-video-library:before{content:""}.mi-video-settings:before{content:""}.mi-video-stable:before{content:""}.mi-videocam:before{content:""}.mi-videocam-off:before{content:""}.mi-videogame-asset:before{content:""}.mi-videogame-asset-off:before{content:""}.mi-view-agenda:before{content:""}.mi-view-array:before{content:""}.mi-view-carousel:before{content:""}.mi-view-column:before{content:""}.mi-view-comfortable:before{content:""}.mi-view-comfy:before{content:""}.mi-view-comfy-alt:before{content:""}.mi-view-compact:before{content:""}.mi-view-compact-alt:before{content:""}.mi-view-cozy:before{content:""}.mi-view-day:before{content:""}.mi-view-headline:before{content:""}.mi-view-in-ar:before{content:""}.mi-view-kanban:before{content:""}.mi-view-list:before{content:""}.mi-view-module:before{content:""}.mi-view-quilt:before{content:""}.mi-view-sidebar:before{content:""}.mi-view-stream:before{content:""}.mi-view-timeline:before{content:""}.mi-view-week:before{content:""}.mi-vignette:before{content:""}.mi-villa:before{content:""}.mi-visibility:before{content:""}.mi-visibility-off:before{content:""}.mi-voice-chat:before{content:""}.mi-voice-over-off:before{content:""}.mi-voicemail:before{content:""}.mi-volcano:before{content:""}.mi-volume-down:before{content:""}.mi-volume-down-alt:before{content:""}.mi-volume-mute:before{content:""}.mi-volume-off:before{content:""}.mi-volume-up:before{content:""}.mi-volunteer-activism:before{content:""}.mi-vpn-key:before{content:""}.mi-vpn-key-off:before{content:""}.mi-vpn-lock:before{content:""}.mi-vrpano:before{content:""}.mi-wallet:before{content:""}.mi-wallet-giftcard:before{content:""}.mi-wallet-membership:before{content:""}.mi-wallet-travel:before{content:""}.mi-wallpaper:before{content:""}.mi-warehouse:before{content:""}.mi-warning:before{content:""}.mi-warning-amber:before{content:""}.mi-wash:before{content:""}.mi-watch:before{content:""}.mi-watch-later:before{content:""}.mi-watch-off:before{content:""}.mi-water:before{content:""}.mi-water-damage:before{content:""}.mi-water-drop:before{content:""}.mi-waterfall-chart:before{content:""}.mi-waves:before{content:""}.mi-waving-hand:before{content:""}.mi-wb-auto:before{content:""}.mi-wb-cloudy:before{content:""}.mi-wb-incandescent:before{content:""}.mi-wb-iridescent:before{content:""}.mi-wb-shade:before{content:""}.mi-wb-sunny:before{content:""}.mi-wb-twighlight:before{content:""}.mi-wb-twilight:before{content:""}.mi-wc:before{content:""}.mi-web:before{content:""}.mi-web-asset:before{content:""}.mi-web-asset-off:before{content:""}.mi-web-stories:before{content:""}.mi-webhook:before{content:""}.mi-wechat:before{content:""}.mi-weekend:before{content:""}.mi-west:before{content:""}.mi-whatshot:before{content:""}.mi-wheelchair-pickup:before{content:""}.mi-where-to-vote:before{content:""}.mi-widgets:before{content:""}.mi-width-full:before{content:""}.mi-width-normal:before{content:""}.mi-width-wide:before{content:""}.mi-wifi:before{content:""}.mi-wifi-1-bar:before{content:""}.mi-wifi-2-bar:before{content:""}.mi-wifi-calling:before{content:""}.mi-wifi-calling-1:before{content:""}.mi-wifi-calling-2:before{content:""}.mi-wifi-calling-3:before{content:""}.mi-wifi-channel:before{content:""}.mi-wifi-find:before{content:""}.mi-wifi-lock:before{content:""}.mi-wifi-off:before{content:""}.mi-wifi-password:before{content:""}.mi-wifi-protected-setup:before{content:""}.mi-wifi-tethering:before{content:""}.mi-wifi-tethering-error:before{content:""}.mi-wifi-tethering-error-rounded:before{content:""}.mi-wifi-tethering-off:before{content:""}.mi-wind-power:before{content:""}.mi-window:before{content:""}.mi-wine-bar:before{content:""}.mi-woman:before{content:""}.mi-woman-2:before{content:""}.mi-woo-commerce:before{content:""}.mi-wordpress:before{content:""}.mi-work:before{content:""}.mi-work-history:before{content:""}.mi-work-off:before{content:""}.mi-work-outline:before{content:""}.mi-workspace-premium:before{content:""}.mi-workspaces:before{content:""}.mi-workspaces-filled:before{content:""}.mi-workspaces-outline:before{content:""}.mi-wrap-text:before{content:""}.mi-wrong-location:before{content:""}.mi-wysiwyg:before{content:""}.mi-yard:before{content:""}.mi-youtube-searched-for:before{content:""}.mi-zoom-in:before{content:""}.mi-zoom-in-map:before{content:""}.mi-zoom-out:before{content:""}.mi-zoom-out-map:before{content:""}.results-container{display:flex;flex-direction:column;margin-top:var(--size-3)}.results-container.empty,.results-container.no-results{gap:var(--size-3);align-items:center;justify-content:center;min-height:var(--size-12);margin-top:var(--size-10);color:var(--gray-8)}.results-container.empty:before,.results-container.no-results:before{font-size:var(--size-9)}.results-container.empty:after,.results-container.no-results:after{font-family:var(--font-sans)}.results-container.empty:before{content:""}.results-container.empty:after{content:"Enter something to search"}.results-container.no-results:before{content:""}.results-container.no-results:after{content:"No results"}intersection-observer::part(sentinel){width:100%;height:var(--size-9);margin-top:var(--size-4);background-color:var(--color-9);border:1px solid var(--color-10);border-radius:var(--radius-3);animation:var(--animation-blink)}',Ni=".search-bar-container{display:flex;align-items:center;margin:0 0 var(--size-1) 0;padding:0 var(--size-2);background-color:var(--color-8);border-radius:var(--radius-2)}.search-bar-container input{width:90%}.search-bar-container button{display:flex;align-items:center;background-color:var(--color-8);border:0}",Qt="rsi";var kt,ho,xt,go,St,vo;class bn extends A{constructor(){super();b(this,kt);b(this,xt);b(this,St);this.bu=Qt,this.query=""}updated(e){if(super.updated(e),["bu","query"].some(o=>e.has(o))){const o=this.query??"",i=this.bu??Qt;this.dispatchEvent(new CustomEvent("change",{detail:{query:o,bu:i}}))}}render(){return u` +
+ + + +
+ `}}kt=new WeakSet,ho=function(){this.query=this.renderRoot.querySelector("input").value},xt=new WeakSet,go=function(e){this.bu=e.target.value},St=new WeakSet,vo=function(){this.query="",this.renderRoot.querySelector("input").value=""},x(bn,"properties",{bu:{type:String},query:{type:String}}),x(bn,"styles",[P,U,O(Ni)]);customElements.define("search-bar",bn);var ye,ae,Et,yo,je,pn,Rt,wo,_t,ko,Lt,xo,Ct,So,Tt,Eo,At,Ro;class dn extends A{constructor(){super();b(this,Et);b(this,je);b(this,Rt);b(this,_t);b(this,Lt);b(this,Ct);b(this,Tt);b(this,At);b(this,ye,new AbortController);b(this,ae,void 0);this.loading=!1,this.results=null,this.nextPage=null}connectedCallback(){super.connectedCallback(),Z(this,ae,()=>{const e=this.renderRoot.querySelector("search-bar");e.query=w.queryParams.query??"",e.bu=w.queryParams.bu??"rsi"}),w.addEventListener("queryparams",y(this,ae))}disconnectedCallback(){super.disconnectedCallback(),this.abortSearch(),w.removeEventListener("queryparams",y(this,ae))}async firstUpdated(e){super.firstUpdated(e);const o=this.renderRoot.querySelector("search-bar");y(this,ae).call(this),await l(this,je,pn).call(this,o.bu,o.query)}abortSearch(){var e;return(e=y(this,ye))==null||e.abort("New search launched"),Z(this,ye,new AbortController),y(this,ye).signal}render(){var e;return u` + + + + + ${W(this.loading,l(this,Tt,Eo).bind(this),l(this,Ct,So).bind(this))} + ${W(((e=this.results)==null?void 0:e.length)>0,l(this,At,Ro).bind(this))} + `}}ye=new WeakMap,ae=new WeakMap,Et=new WeakSet,yo=async function(e,o){w.updateState({bu:e,...o?{query:o}:{}}),await l(this,je,pn).call(this,e,o)},je=new WeakSet,pn=async function(e,o){const i=this.abortSearch();if(!o){[this.results,this.nextPage]=[null,null];return}this.loading=!0;try{const a=await I.search(e,o,i);[this.results,this.nextPage]=[a.results,a.next]}finally{this.loading=!1}},Rt=new WeakSet,wo=async function(){const e=this.abortSearch(),o=await this.nextPage(e);this.nextPage=o.next,this.results=[...this.results,...o.results]},_t=new WeakSet,ko=function(e){return new URLSearchParams({...w.queryParams,src:e.urn,type:"srgssr/urn"}).toString()},Lt=new WeakSet,xo=function(e){const o=new Intl.DateTimeFormat("fr-CH").format(new Date(e.date)),i=wn.formatTime(e.duration/1e3);return u` + +
+ ${e.mediaType==="VIDEO"?"movie":"audiotrack"} +  | ${o} | ${i} +
+
+ `},Ct=new WeakSet,So=function(){const e={empty:this.results==null,"no-results":this.results&&this.results.length===0,"material-icons":!this.results||this.results.length===0};return u` +
+ ${ge(this.results??[],l(this,Lt,xo).bind(this))} + ${W(this.nextPage,()=>u` + + + `)} +
+ `},Tt=new WeakSet,Eo=function(){return u` + + + `},At=new WeakSet,Ro=function(){return u` + `},x(dn,"properties",{loading:{state:!0,type:Boolean},results:{state:!0,type:Array},nextPage:{state:!0,type:Function}}),x(dn,"styles",[P,U,O(Ii)]);customElements.define("search-page",dn);w.addRoute("search","search-page");const ji=':host{display:inline-block;cursor:pointer}[part=switch]{display:flex;align-items:center;width:var(--size-9);height:var(--size-7);background-color:var(--gray-6);border-radius:var(--radius-4);transition:.4s}[part=slider]{display:block;width:var(--size-5);height:var(--size-5);margin-left:var(--size-2);background-color:var(--gray-1);border-radius:var(--radius-round);transition:.4s;content:""}:host([checked]) [part=switch]{background-color:var(--green-8)}:host([checked]) [part=slider]{transform:translate(var(--size-5))}:host([disabled]) [part=switch]{cursor:not-allowed;opacity:.5}';var ze,Oe;class Ze extends A{constructor(){super();b(this,ze,e=>{e.key===" "&&(e.preventDefault(),this.toggle())});b(this,Oe,()=>{this.toggle()});this.checked=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","switch"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.addEventListener("click",y(this,Oe)),this.addEventListener("keydown",y(this,ze))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",y(this,Oe)),this.removeEventListener("keydown",y(this,ze))}toggle(e){this.disabled||(this.checked=e??!this.checked)}updated(e){super.updated(e),e.has("checked")&&(this.setAttribute("aria-checked",this.checked.toString()),this.dispatchEvent(new CustomEvent("change",{detail:{checked:this.checked}})))}render(){return u` +
+
+
+ `}}ze=new WeakMap,Oe=new WeakMap,x(Ze,"formAssociated",!0),x(Ze,"properties",{checked:{type:Boolean,reflect:!0},disabled:{type:Boolean}}),x(Ze,"styles",[P,O(ji)]);customElements.define("toggle-switch",Ze);const zi="[part=title]{margin:0;padding:var(--size-3) 0}[part=toggle-container],[part=input-container]{display:flex;align-items:center;justify-content:space-between;margin:0;color:var(--color-0);font-weight:var(--font-weight-6);font-size:var(--size-3);text-align:justify;background-color:var(--color-9);border:1px solid var(--color-10)}[part=toggle-container]:first-of-type,[part=input-container]:first-of-type{border-radius:var(--radius-3) var(--radius-3) 0 0}[part=toggle-container]:last-of-type,[part=input-container]:last-of-type{border-radius:0 0 var(--radius-3) var(--radius-3)}[part=label]{line-height:var(--size-8);padding-inline:var(--size-3)}[part=toggle-container] [part=label]{flex:1;cursor:pointer}[part=toggle-switch]{display:flex;align-items:center;height:var(--size-8);padding-inline:var(--size-3)}[part=input]{flex:1;margin:0;padding:var(--size-1) var(--size-3);text-align:right;background-color:var(--color-9);border-bottom-right-radius:var(--radius-3)}";var we,Xe,Mt,_o;class un extends A{constructor(){super();b(this,we);b(this,Mt);const e=he.loadPreferences();this.autoplay=e.autoplay??!1,this.muted=e.muted??!0,this.debug=e.debug??!1,this.dataProviderHost=e.dataProviderHost}updated(e){super.updated(e);const o=he.loadPreferences();[...e.keys()].filter(i=>["autoplay","muted","debug","dataProviderHost"].includes(i)).forEach(i=>{o[i]=this[i]}),he.savePreferences(o),e.has("debug")&&w.replaceState(this.debug?{debug:"true"}:{}),e.has("dataProviderHost")&&(I.host=this.dataProviderHost)}render(){return u` +
+

Player Settings

+ ${l(this,we,Xe).call(this,"autoplay","Autoplay")} + ${l(this,we,Xe).call(this,"muted","Player starts muted")} + ${l(this,we,Xe).call(this,"debug","Enable debug mode")} + ${l(this,Mt,_o).call(this,"dataProviderHost","Data provider host")} +
+ `}}we=new WeakSet,Xe=function(e,o){return u` +
+ + + +
+ `},Mt=new WeakSet,_o=function(e,o){return u` +
+ + +
+ `},x(un,"properties",{autoplay:{type:Boolean,state:!0},muted:{type:Boolean,state:!0},debug:{type:Boolean,state:!0},dataProviderHost:{type:String,state:!0}}),x(un,"styles",[P,U,O(zi)]);customElements.define("settings-page",un);w.addRoute("settings","settings-page");const Oi=`@media screen and (prefers-color-scheme: dark){pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*! + Theme: GitHub Dark Dimmed + Description: Dark dimmed theme as seen on github.com + Author: github.com + Maintainer: @Hirse + Updated: 2021-05-15 + + Colors taken from GitHub's CSS +*/.hljs{color:#adbac7;background:#22272e}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#f47067}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#dcbdfb}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#6cb6ff}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#96d0ff}.hljs-built_in,.hljs-symbol{color:#f69d50}.hljs-comment,.hljs-code,.hljs-formula{color:#768390}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#8ddb8c}.hljs-subst{color:#adbac7}.hljs-section{color:#316dca;font-weight:700}.hljs-bullet{color:#eac55f}.hljs-emphasis{color:#adbac7;font-style:italic}.hljs-strong{color:#adbac7;font-weight:700}.hljs-addition{color:#b4f1b4;background-color:#1b4721}.hljs-deletion{color:#ffd8d3;background-color:#78191b}}@media screen and (prefers-color-scheme: light){pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*! + Theme: GitHub + Description: Light theme as seen on github.com + Author: github.com + Maintainer: @Hirse + Updated: 2021-05-15 + + Outdated base version: https://github.com/primer/github-syntax-light + Current colors taken from GitHub's CSS +*/.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#005cc5}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-comment,.hljs-code,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}}[part=container]{overflow-x:auto;font-size:var(--font-size-0)}slot{display:none}`;function Lo(t){return t instanceof Map?t.clear=t.delete=t.set=function(){throw new Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=function(){throw new Error("set is read-only")}),Object.freeze(t),Object.getOwnPropertyNames(t).forEach(n=>{const e=t[n],o=typeof e;(o==="object"||o==="function")&&!Object.isFrozen(e)&&Lo(e)}),t}class Mn{constructor(n){n.data===void 0&&(n.data={}),this.data=n.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Co(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function te(t,...n){const e=Object.create(null);for(const o in t)e[o]=t[o];return n.forEach(function(o){for(const i in o)e[i]=o[i]}),e}const Di="",$n=t=>!!t.scope,Pi=(t,{prefix:n})=>{if(t.startsWith("language:"))return t.replace("language:","language-");if(t.includes(".")){const e=t.split(".");return[`${n}${e.shift()}`,...e.map((o,i)=>`${o}${"_".repeat(i+1)}`)].join(" ")}return`${n}${t}`};class Ui{constructor(n,e){this.buffer="",this.classPrefix=e.classPrefix,n.walk(this)}addText(n){this.buffer+=Co(n)}openNode(n){if(!$n(n))return;const e=Pi(n.scope,{prefix:this.classPrefix});this.span(e)}closeNode(n){$n(n)&&(this.buffer+=Di)}value(){return this.buffer}span(n){this.buffer+=``}}const In=(t={})=>{const n={children:[]};return Object.assign(n,t),n};class kn{constructor(){this.rootNode=In(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(n){this.top.children.push(n)}openNode(n){const e=In({scope:n});this.add(e),this.stack.push(e)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(n){return this.constructor._walk(n,this.rootNode)}static _walk(n,e){return typeof e=="string"?n.addText(e):e.children&&(n.openNode(e),e.children.forEach(o=>this._walk(n,o)),n.closeNode(e)),n}static _collapse(n){typeof n!="string"&&n.children&&(n.children.every(e=>typeof e=="string")?n.children=[n.children.join("")]:n.children.forEach(e=>{kn._collapse(e)}))}}class Bi extends kn{constructor(n){super(),this.options=n}addText(n){n!==""&&this.add(n)}startScope(n){this.openNode(n)}endScope(){this.closeNode()}__addSublanguage(n,e){const o=n.root;e&&(o.scope=`language:${e}`),this.add(o)}toHTML(){return new Ui(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Le(t){return t?typeof t=="string"?t:t.source:null}function To(t){return me("(?=",t,")")}function Hi(t){return me("(?:",t,")*")}function qi(t){return me("(?:",t,")?")}function me(...t){return t.map(e=>Le(e)).join("")}function Fi(t){const n=t[t.length-1];return typeof n=="object"&&n.constructor===Object?(t.splice(t.length-1,1),n):{}}function xn(...t){return"("+(Fi(t).capture?"":"?:")+t.map(o=>Le(o)).join("|")+")"}function Ao(t){return new RegExp(t.toString()+"|").exec("").length-1}function Gi(t,n){const e=t&&t.exec(n);return e&&e.index===0}const Vi=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Sn(t,{joinWith:n}){let e=0;return t.map(o=>{e+=1;const i=e;let a=Le(o),r="";for(;a.length>0;){const s=Vi.exec(a);if(!s){r+=a;break}r+=a.substring(0,s.index),a=a.substring(s.index+s[0].length),s[0][0]==="\\"&&s[1]?r+="\\"+String(Number(s[1])+i):(r+=s[0],s[0]==="("&&e++)}return r}).map(o=>`(${o})`).join(n)}const Wi=/\b\B/,Mo="[a-zA-Z]\\w*",En="[a-zA-Z_]\\w*",$o="\\b\\d+(\\.\\d+)?",Io="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",No="\\b(0b[01]+)",Ki="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Zi=(t={})=>{const n=/^#![ ]*\//;return t.binary&&(t.begin=me(n,/.*\b/,t.binary,/\b.*/)),te({scope:"meta",begin:n,end:/$/,relevance:0,"on:begin":(e,o)=>{e.index!==0&&o.ignoreMatch()}},t)},Ce={begin:"\\\\[\\s\\S]",relevance:0},Xi={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Ce]},Yi={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Ce]},Ji={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},qt=function(t,n,e={}){const o=te({scope:"comment",begin:t,end:n,contains:[]},e);o.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=xn("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return o.contains.push({begin:me(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),o},Qi=qt("//","$"),er=qt("/\\*","\\*/"),tr=qt("#","$"),nr={scope:"number",begin:$o,relevance:0},or={scope:"number",begin:Io,relevance:0},ir={scope:"number",begin:No,relevance:0},rr={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Ce,{begin:/\[/,end:/\]/,relevance:0,contains:[Ce]}]},cr={scope:"title",begin:Mo,relevance:0},ar={scope:"title",begin:En,relevance:0},sr={begin:"\\.\\s*"+En,relevance:0},lr=function(t){return Object.assign(t,{"on:begin":(n,e)=>{e.data._beginMatch=n[1]},"on:end":(n,e)=>{e.data._beginMatch!==n[1]&&e.ignoreMatch()}})};var Ke=Object.freeze({__proto__:null,APOS_STRING_MODE:Xi,BACKSLASH_ESCAPE:Ce,BINARY_NUMBER_MODE:ir,BINARY_NUMBER_RE:No,COMMENT:qt,C_BLOCK_COMMENT_MODE:er,C_LINE_COMMENT_MODE:Qi,C_NUMBER_MODE:or,C_NUMBER_RE:Io,END_SAME_AS_BEGIN:lr,HASH_COMMENT_MODE:tr,IDENT_RE:Mo,MATCH_NOTHING_RE:Wi,METHOD_GUARD:sr,NUMBER_MODE:nr,NUMBER_RE:$o,PHRASAL_WORDS_MODE:Ji,QUOTE_STRING_MODE:Yi,REGEXP_MODE:rr,RE_STARTERS_RE:Ki,SHEBANG:Zi,TITLE_MODE:cr,UNDERSCORE_IDENT_RE:En,UNDERSCORE_TITLE_MODE:ar});function mr(t,n){t.input[t.index-1]==="."&&n.ignoreMatch()}function fr(t,n){t.className!==void 0&&(t.scope=t.className,delete t.className)}function br(t,n){n&&t.beginKeywords&&(t.begin="\\b("+t.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",t.__beforeBegin=mr,t.keywords=t.keywords||t.beginKeywords,delete t.beginKeywords,t.relevance===void 0&&(t.relevance=0))}function dr(t,n){Array.isArray(t.illegal)&&(t.illegal=xn(...t.illegal))}function pr(t,n){if(t.match){if(t.begin||t.end)throw new Error("begin & end are not supported with match");t.begin=t.match,delete t.match}}function ur(t,n){t.relevance===void 0&&(t.relevance=1)}const hr=(t,n)=>{if(!t.beforeMatch)return;if(t.starts)throw new Error("beforeMatch cannot be used with starts");const e=Object.assign({},t);Object.keys(t).forEach(o=>{delete t[o]}),t.keywords=e.keywords,t.begin=me(e.beforeMatch,To(e.begin)),t.starts={relevance:0,contains:[Object.assign(e,{endsParent:!0})]},t.relevance=0,delete e.beforeMatch},gr=["of","and","for","in","not","or","if","then","parent","list","value"],vr="keyword";function jo(t,n,e=vr){const o=Object.create(null);return typeof t=="string"?i(e,t.split(" ")):Array.isArray(t)?i(e,t):Object.keys(t).forEach(function(a){Object.assign(o,jo(t[a],n,a))}),o;function i(a,r){n&&(r=r.map(s=>s.toLowerCase())),r.forEach(function(s){const p=s.split("|");o[p[0]]=[a,yr(p[0],p[1])]})}}function yr(t,n){return n?Number(n):wr(t)?0:1}function wr(t){return gr.includes(t.toLowerCase())}const Nn={},le=t=>{console.error(t)},jn=(t,...n)=>{console.log(`WARN: ${t}`,...n)},pe=(t,n)=>{Nn[`${t}/${n}`]||(console.log(`Deprecated as of ${t}. ${n}`),Nn[`${t}/${n}`]=!0)},et=new Error;function zo(t,n,{key:e}){let o=0;const i=t[e],a={},r={};for(let s=1;s<=n.length;s++)r[s+o]=i[s],a[s+o]=!0,o+=Ao(n[s-1]);t[e]=r,t[e]._emit=a,t[e]._multi=!0}function kr(t){if(Array.isArray(t.begin)){if(t.skip||t.excludeBegin||t.returnBegin)throw le("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),et;if(typeof t.beginScope!="object"||t.beginScope===null)throw le("beginScope must be object"),et;zo(t,t.begin,{key:"beginScope"}),t.begin=Sn(t.begin,{joinWith:""})}}function xr(t){if(Array.isArray(t.end)){if(t.skip||t.excludeEnd||t.returnEnd)throw le("skip, excludeEnd, returnEnd not compatible with endScope: {}"),et;if(typeof t.endScope!="object"||t.endScope===null)throw le("endScope must be object"),et;zo(t,t.end,{key:"endScope"}),t.end=Sn(t.end,{joinWith:""})}}function Sr(t){t.scope&&typeof t.scope=="object"&&t.scope!==null&&(t.beginScope=t.scope,delete t.scope)}function Er(t){Sr(t),typeof t.beginScope=="string"&&(t.beginScope={_wrap:t.beginScope}),typeof t.endScope=="string"&&(t.endScope={_wrap:t.endScope}),kr(t),xr(t)}function Rr(t){function n(r,s){return new RegExp(Le(r),"m"+(t.case_insensitive?"i":"")+(t.unicodeRegex?"u":"")+(s?"g":""))}class e{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(s,p){p.position=this.position++,this.matchIndexes[this.matchAt]=p,this.regexes.push([p,s]),this.matchAt+=Ao(s)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const s=this.regexes.map(p=>p[1]);this.matcherRe=n(Sn(s,{joinWith:"|"}),!0),this.lastIndex=0}exec(s){this.matcherRe.lastIndex=this.lastIndex;const p=this.matcherRe.exec(s);if(!p)return null;const _=p.findIndex((X,H)=>H>0&&X!==void 0),L=this.matchIndexes[_];return p.splice(0,_),Object.assign(p,L)}}class o{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(s){if(this.multiRegexes[s])return this.multiRegexes[s];const p=new e;return this.rules.slice(s).forEach(([_,L])=>p.addRule(_,L)),p.compile(),this.multiRegexes[s]=p,p}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(s,p){this.rules.push([s,p]),p.type==="begin"&&this.count++}exec(s){const p=this.getMatcher(this.regexIndex);p.lastIndex=this.lastIndex;let _=p.exec(s);if(this.resumingScanAtSamePosition()&&!(_&&_.index===this.lastIndex)){const L=this.getMatcher(0);L.lastIndex=this.lastIndex+1,_=L.exec(s)}return _&&(this.regexIndex+=_.position+1,this.regexIndex===this.count&&this.considerAll()),_}}function i(r){const s=new o;return r.contains.forEach(p=>s.addRule(p.begin,{rule:p,type:"begin"})),r.terminatorEnd&&s.addRule(r.terminatorEnd,{type:"end"}),r.illegal&&s.addRule(r.illegal,{type:"illegal"}),s}function a(r,s){const p=r;if(r.isCompiled)return p;[fr,pr,Er,hr].forEach(L=>L(r,s)),t.compilerExtensions.forEach(L=>L(r,s)),r.__beforeBegin=null,[br,dr,ur].forEach(L=>L(r,s)),r.isCompiled=!0;let _=null;return typeof r.keywords=="object"&&r.keywords.$pattern&&(r.keywords=Object.assign({},r.keywords),_=r.keywords.$pattern,delete r.keywords.$pattern),_=_||/\w+/,r.keywords&&(r.keywords=jo(r.keywords,t.case_insensitive)),p.keywordPatternRe=n(_,!0),s&&(r.begin||(r.begin=/\B|\b/),p.beginRe=n(p.begin),!r.end&&!r.endsWithParent&&(r.end=/\B|\b/),r.end&&(p.endRe=n(p.end)),p.terminatorEnd=Le(p.end)||"",r.endsWithParent&&s.terminatorEnd&&(p.terminatorEnd+=(r.end?"|":"")+s.terminatorEnd)),r.illegal&&(p.illegalRe=n(r.illegal)),r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map(function(L){return _r(L==="self"?r:L)})),r.contains.forEach(function(L){a(L,p)}),r.starts&&a(r.starts,s),p.matcher=i(p),p}if(t.compilerExtensions||(t.compilerExtensions=[]),t.contains&&t.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return t.classNameAliases=te(t.classNameAliases||{}),a(t)}function Oo(t){return t?t.endsWithParent||Oo(t.starts):!1}function _r(t){return t.variants&&!t.cachedVariants&&(t.cachedVariants=t.variants.map(function(n){return te(t,{variants:null},n)})),t.cachedVariants?t.cachedVariants:Oo(t)?te(t,{starts:t.starts?te(t.starts):null}):Object.isFrozen(t)?te(t):t}var Lr="11.9.0";class Cr extends Error{constructor(n,e){super(n),this.name="HTMLInjectionError",this.html=e}}const en=Co,zn=te,On=Symbol("nomatch"),Tr=7,Do=function(t){const n=Object.create(null),e=Object.create(null),o=[];let i=!0;const a="Could not find the language '{}', did you forget to load/include a language module?",r={disableAutodetect:!0,name:"Plain text",contains:[]};let s={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Bi};function p(c){return s.noHighlightRe.test(c)}function _(c){let f=c.className+" ";f+=c.parentNode?c.parentNode.className:"";const g=s.languageDetectRe.exec(f);if(g){const k=q(g[1]);return k||(jn(a.replace("{}",g[1])),jn("Falling back to no-highlight mode for this block.",c)),k?g[1]:"no-highlight"}return f.split(/\s+/).find(k=>p(k)||q(k))}function L(c,f,g){let k="",R="";typeof f=="object"?(k=c,g=f.ignoreIllegals,R=f.language):(pe("10.7.0","highlight(lang, code, ...args) has been deprecated."),pe("10.7.0",`Please use highlight(code, options) instead. +https://github.com/highlightjs/highlight.js/issues/2277`),R=c,k=f),g===void 0&&(g=!0);const $={code:k,language:R};de("before:highlight",$);const B=$.result?$.result:X($.language,$.code,g);return B.code=$.code,de("after:highlight",B),B}function X(c,f,g,k){const R=Object.create(null);function $(m,d){return m.keywords[d]}function B(){if(!h.keywords){T.addText(E);return}let m=0;h.keywordPatternRe.lastIndex=0;let d=h.keywordPatternRe.exec(E),v="";for(;d;){v+=E.substring(m,d.index);const S=G.case_insensitive?d[0].toLowerCase():d[0],M=$(h,S);if(M){const[K,ai]=M;if(T.addText(v),v="",R[S]=(R[S]||0)+1,R[S]<=Tr&&(We+=ai),K.startsWith("_"))v+=d[0];else{const si=G.classNameAliases[K]||K;F(d[0],si)}}else v+=d[0];m=h.keywordPatternRe.lastIndex,d=h.keywordPatternRe.exec(E)}v+=E.substring(m),T.addText(v)}function Ge(){if(E==="")return;let m=null;if(typeof h.subLanguage=="string"){if(!n[h.subLanguage]){T.addText(E);return}m=X(h.subLanguage,E,!0,An[h.subLanguage]),An[h.subLanguage]=m._top}else m=fe(E,h.subLanguage.length?h.subLanguage:null);h.relevance>0&&(We+=m.relevance),T.__addSublanguage(m._emitter,m.language)}function j(){h.subLanguage!=null?Ge():B(),E=""}function F(m,d){m!==""&&(T.startScope(d),T.addText(m),T.endScope())}function _n(m,d){let v=1;const S=d.length-1;for(;v<=S;){if(!m._emit[v]){v++;continue}const M=G.classNameAliases[m[v]]||m[v],K=d[v];M?F(K,M):(E=K,B(),E=""),v++}}function Ln(m,d){return m.scope&&typeof m.scope=="string"&&T.openNode(G.classNameAliases[m.scope]||m.scope),m.beginScope&&(m.beginScope._wrap?(F(E,G.classNameAliases[m.beginScope._wrap]||m.beginScope._wrap),E=""):m.beginScope._multi&&(_n(m.beginScope,d),E="")),h=Object.create(m,{parent:{value:h}}),h}function Cn(m,d,v){let S=Gi(m.endRe,v);if(S){if(m["on:end"]){const M=new Mn(m);m["on:end"](d,M),M.isMatchIgnored&&(S=!1)}if(S){for(;m.endsParent&&m.parent;)m=m.parent;return m}}if(m.endsWithParent)return Cn(m.parent,d,v)}function ni(m){return h.matcher.regexIndex===0?(E+=m[0],1):(Xt=!0,0)}function oi(m){const d=m[0],v=m.rule,S=new Mn(v),M=[v.__beforeBegin,v["on:begin"]];for(const K of M)if(K&&(K(m,S),S.isMatchIgnored))return ni(d);return v.skip?E+=d:(v.excludeBegin&&(E+=d),j(),!v.returnBegin&&!v.excludeBegin&&(E=d)),Ln(v,m),v.returnBegin?0:d.length}function ii(m){const d=m[0],v=f.substring(m.index),S=Cn(h,m,v);if(!S)return On;const M=h;h.endScope&&h.endScope._wrap?(j(),F(d,h.endScope._wrap)):h.endScope&&h.endScope._multi?(j(),_n(h.endScope,m)):M.skip?E+=d:(M.returnEnd||M.excludeEnd||(E+=d),j(),M.excludeEnd&&(E=d));do h.scope&&T.closeNode(),!h.skip&&!h.subLanguage&&(We+=h.relevance),h=h.parent;while(h!==S.parent);return S.starts&&Ln(S.starts,m),M.returnEnd?0:d.length}function ri(){const m=[];for(let d=h;d!==G;d=d.parent)d.scope&&m.unshift(d.scope);m.forEach(d=>T.openNode(d))}let Ve={};function Tn(m,d){const v=d&&d[0];if(E+=m,v==null)return j(),0;if(Ve.type==="begin"&&d.type==="end"&&Ve.index===d.index&&v===""){if(E+=f.slice(d.index,d.index+1),!i){const S=new Error(`0 width match regex (${c})`);throw S.languageName=c,S.badRule=Ve.rule,S}return 1}if(Ve=d,d.type==="begin")return oi(d);if(d.type==="illegal"&&!g){const S=new Error('Illegal lexeme "'+v+'" for mode "'+(h.scope||"")+'"');throw S.mode=h,S}else if(d.type==="end"){const S=ii(d);if(S!==On)return S}if(d.type==="illegal"&&v==="")return 1;if(Zt>1e5&&Zt>d.index*3)throw new Error("potential infinite loop, way more iterations than matches");return E+=v,v.length}const G=q(c);if(!G)throw le(a.replace("{}",c)),new Error('Unknown language: "'+c+'"');const ci=Rr(G);let Kt="",h=k||ci;const An={},T=new s.__emitter(s);ri();let E="",We=0,ie=0,Zt=0,Xt=!1;try{if(G.__emitTokens)G.__emitTokens(f,T);else{for(h.matcher.considerAll();;){Zt++,Xt?Xt=!1:h.matcher.considerAll(),h.matcher.lastIndex=ie;const m=h.matcher.exec(f);if(!m)break;const d=f.substring(ie,m.index),v=Tn(d,m);ie=m.index+v}Tn(f.substring(ie))}return T.finalize(),Kt=T.toHTML(),{language:c,value:Kt,relevance:We,illegal:!1,_emitter:T,_top:h}}catch(m){if(m.message&&m.message.includes("Illegal"))return{language:c,value:en(f),illegal:!0,relevance:0,_illegalBy:{message:m.message,index:ie,context:f.slice(ie-100,ie+100),mode:m.mode,resultSoFar:Kt},_emitter:T};if(i)return{language:c,value:en(f),illegal:!1,relevance:0,errorRaised:m,_emitter:T,_top:h};throw m}}function H(c){const f={value:en(c),illegal:!1,relevance:0,_top:r,_emitter:new s.__emitter(s)};return f._emitter.addText(c),f}function fe(c,f){f=f||s.languages||Object.keys(n);const g=H(c),k=f.filter(q).filter(qe).map(j=>X(j,c,!1));k.unshift(g);const R=k.sort((j,F)=>{if(j.relevance!==F.relevance)return F.relevance-j.relevance;if(j.language&&F.language){if(q(j.language).supersetOf===F.language)return 1;if(q(F.language).supersetOf===j.language)return-1}return 0}),[$,B]=R,Ge=$;return Ge.secondBest=B,Ge}function Pe(c,f,g){const k=f&&e[f]||g;c.classList.add("hljs"),c.classList.add(`language-${k}`)}function be(c){let f=null;const g=_(c);if(p(g))return;if(de("before:highlightElement",{el:c,language:g}),c.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",c);return}if(c.children.length>0&&(s.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(c)),s.throwUnescapedHTML))throw new Cr("One of your code blocks includes unescaped HTML.",c.innerHTML);f=c;const k=f.textContent,R=g?L(k,{language:g,ignoreIllegals:!0}):fe(k);c.innerHTML=R.value,c.dataset.highlighted="yes",Pe(c,g,R.language),c.result={language:R.language,re:R.relevance,relevance:R.relevance},R.secondBest&&(c.secondBest={language:R.secondBest.language,relevance:R.secondBest.relevance}),de("after:highlightElement",{el:c,result:R,text:k})}function Ue(c){s=zn(s,c)}const Rn=()=>{ne(),pe("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function xe(){ne(),pe("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Se=!1;function ne(){if(document.readyState==="loading"){Se=!0;return}document.querySelectorAll(s.cssSelector).forEach(be)}function Ee(){Se&&ne()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",Ee,!1);function oe(c,f){let g=null;try{g=f(t)}catch(k){if(le("Language definition for '{}' could not be registered.".replace("{}",c)),i)le(k);else throw k;g=r}g.name||(g.name=c),n[c]=g,g.rawDefinition=f.bind(null,t),g.aliases&&He(g.aliases,{languageName:c})}function Ft(c){delete n[c];for(const f of Object.keys(e))e[f]===c&&delete e[f]}function Be(){return Object.keys(n)}function q(c){return c=(c||"").toLowerCase(),n[c]||n[e[c]]}function He(c,{languageName:f}){typeof c=="string"&&(c=[c]),c.forEach(g=>{e[g.toLowerCase()]=f})}function qe(c){const f=q(c);return f&&!f.disableAutodetect}function Gt(c){c["before:highlightBlock"]&&!c["before:highlightElement"]&&(c["before:highlightElement"]=f=>{c["before:highlightBlock"](Object.assign({block:f.el},f))}),c["after:highlightBlock"]&&!c["after:highlightElement"]&&(c["after:highlightElement"]=f=>{c["after:highlightBlock"](Object.assign({block:f.el},f))})}function Vt(c){Gt(c),o.push(c)}function Wt(c){const f=o.indexOf(c);f!==-1&&o.splice(f,1)}function de(c,f){const g=c;o.forEach(function(k){k[g]&&k[g](f)})}function Fe(c){return pe("10.7.0","highlightBlock will be removed entirely in v12.0"),pe("10.7.0","Please use highlightElement now."),be(c)}Object.assign(t,{highlight:L,highlightAuto:fe,highlightAll:ne,highlightElement:be,highlightBlock:Fe,configure:Ue,initHighlighting:Rn,initHighlightingOnLoad:xe,registerLanguage:oe,unregisterLanguage:Ft,listLanguages:Be,getLanguage:q,registerAliases:He,autoDetection:qe,inherit:zn,addPlugin:Vt,removePlugin:Wt}),t.debugMode=function(){i=!1},t.safeMode=function(){i=!0},t.versionString=Lr,t.regex={concat:me,lookahead:To,either:xn,optional:qi,anyNumberOfTimes:Hi};for(const c in Ke)typeof Ke[c]=="object"&&Lo(Ke[c]);return Object.assign(t,Ke),t},ke=Do({});ke.newInstance=()=>Do({});var Ar=ke;ke.HighlightJS=ke;ke.default=ke;const Po=ui(Ar),Dn="[A-Za-z$_][0-9A-Za-z$_]*",Mr=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],$r=["true","false","null","undefined","NaN","Infinity"],Uo=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Bo=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Ho=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Ir=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Nr=[].concat(Ho,Uo,Bo);function jr(t){const n=t.regex,e=(f,{after:g})=>{const k="",end:""},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,r={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(f,g)=>{const k=f[0].length+f.index,R=f.input[k];if(R==="<"||R===","){g.ignoreMatch();return}R===">"&&(e(f,{after:k})||g.ignoreMatch());let $;const B=f.input.substring(k);if($=B.match(/^\s*=/)){g.ignoreMatch();return}if(($=B.match(/^\s+extends\s+/))&&$.index===0){g.ignoreMatch();return}}},s={$pattern:Dn,keyword:Mr,literal:$r,built_in:Nr,"variable.language":Ir},p="[0-9](_?[0-9])*",_=`\\.(${p})`,L="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",X={className:"number",variants:[{begin:`(\\b(${L})((${_})|\\.)?|(${_}))[eE][+-]?(${p})\\b`},{begin:`\\b(${L})\\b((${_})\\b|\\.)?|(${_})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},H={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},fe={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,H],subLanguage:"xml"}},Pe={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,H],subLanguage:"css"}},be={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,H],subLanguage:"graphql"}},Ue={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,H]},xe={className:"comment",variants:[t.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:o+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},Se=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,fe,Pe,be,Ue,{match:/\$\d+/},X];H.contains=Se.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(Se)});const ne=[].concat(xe,H.contains),Ee=ne.concat([{begin:/\(/,end:/\)/,keywords:s,contains:["self"].concat(ne)}]),oe={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:Ee},Ft={variants:[{match:[/class/,/\s+/,o,/\s+/,/extends/,/\s+/,n.concat(o,"(",n.concat(/\./,o),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,o],scope:{1:"keyword",3:"title.class"}}]},Be={relevance:0,match:n.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Uo,...Bo]}},q={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},He={variants:[{match:[/function/,/\s+/,o,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[oe],illegal:/%/},qe={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Gt(f){return n.concat("(?!",f.join("|"),")")}const Vt={match:n.concat(/\b/,Gt([...Ho,"super","import"]),o,n.lookahead(/\(/)),className:"title.function",relevance:0},Wt={begin:n.concat(/\./,n.lookahead(n.concat(o,/(?![0-9A-Za-z$_(])/))),end:o,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},de={match:[/get|set/,/\s+/,o,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},oe]},Fe="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",c={match:[/const|var|let/,/\s+/,o,/\s*/,/=\s*/,/(async\s*)?/,n.lookahead(Fe)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[oe]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:Ee,CLASS_REFERENCE:Be},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),q,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,fe,Pe,be,Ue,xe,{match:/\$\d+/},X,Be,{className:"attr",begin:o+n.lookahead(":"),relevance:0},c,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[xe,t.REGEXP_MODE,{className:"function",begin:Fe,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:Ee}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:r.begin,"on:begin":r.isTrulyOpeningTag,end:r.end}],subLanguage:"xml",contains:[{begin:r.begin,end:r.end,skip:!0,contains:["self"]}]}]},He,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[oe,t.inherit(t.TITLE_MODE,{begin:o,className:"title.function"})]},{match:/\.\.\./,relevance:0},Wt,{match:"\\$"+o,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[oe]},Vt,qe,Ft,de,{match:/\$[(.]/}]}}Po.registerLanguage("javascript",jr);var $t,qo;class hn extends A{constructor(e){super(e);b(this,$t);this.language="javascript"}render(){return u` +
${Un(this.code)}
+ + `}}$t=new WeakSet,qo=function(){const o=this.shadowRoot.querySelector("slot").assignedNodes()[0].textContent;this.code=Po.highlight(o,{language:this.language}).value},x(hn,"styles",[O(Oi)]),x(hn,"properties",{language:{type:String},code:{tyoe:String,state:!0}});customElements.define("code-block",hn);const zr="::slotted([slot=demo]){aspect-ratio:var(--ratio-widescreen)}::slotted([slot=description]){padding-left:var(--size-2);color:var(--color-4);font-weight:var(--font-weight-3);font-size:var(--font-size-1);text-align:justify;border-left:3px solid var(--color-5)}[part=implementation-toggle]{display:flex;align-items:center;cursor:pointer}[part=implementation-toggle] i{margin-right:var(--size-1)}[part=implementation]{display:none;margin-bottom:var(--size-4);background-color:var(--color-10);border:2px solid var(--color-5);border-radius:var(--radius-1);box-shadow:var(--inner-shadow-4)}[part=implementation].active{display:block}[part=implementation-code]{padding-inline:var(--size-3)}[part=implementation-footer]{display:flex;align-items:center;justify-content:end;border-top:1px solid var(--color-6);padding-inline:var(--size-2)}[part=implementation-link]{padding:var(--size-2);font-size:var(--font-size-0)}.hidden{display:none}";var It,Fo,Nt,Go,jt,Vo;class gn extends A{constructor(){super(...arguments);b(this,It);b(this,Nt);b(this,jt)}connectedCallback(){super.connectedCallback(),this.collapsed=!0,this.shadowRoot.addEventListener("slotchange",()=>{this.hasCodeExample=l(this,It,Fo).call(this,"code")})}updated(e){super.updated(e),e.has("collapsed")&&!this.collapsed&&this.shadowRoot.querySelector('[part="implementation"]').classList.add("active")}render(){return u` + + + +
+

+ ${this.collapsed?"visibility":"visibility_off"} + ${this.collapsed?"See the Implementation":"Hide the Implementation"} +

+
+
+ +
+ ${W(this.href,()=>u` + + `)} +
+
+ `}}It=new WeakSet,Fo=function(e){return this.shadowRoot.querySelector(`slot[name="${e}"]`).assignedNodes().length>0},Nt=new WeakSet,Go=function(e){e.target.classList.toggle("active",!e.target.classList.contains("fade-out-shrink")),e.target.classList.remove("fade-in-grow","fade-out-shrink")},jt=new WeakSet,Vo=function(){return{"fade-in-grow":this.collapsed===!1,"fade-out-shrink":this.collapsed===!0}},x(gn,"styles",[P,U,O(zr)]),x(gn,"properties",{collapsed:{type:Boolean},hasCodeExample:{type:Boolean,state:!0},exampleLanguage:{type:String},href:{type:String}});customElements.define("showcase-component",gn);const Or="a{display:flex;flex-direction:column;gap:var(--size-2);justify-content:center;min-height:var(--size-9);margin:0;color:var(--color-0);font-weight:var(--font-weight-6);font-size:var(--size-3);text-align:center;text-decoration:none;background-color:var(--color-9);border:1px solid var(--color-10);border-radius:var(--radius-2);transition:background-color .4s,border-color .4s;padding-inline:var(--size-3)}a:hover{text-decoration:none;background-color:var(--color-8);border-color:var(--color-9)}div{margin-top:var(--size-7)}",Dr=` + + + + + + Pillarbox Demo - Start Time Showcase + + + + + + +
+

Start the player at a given position

+
+ +
+ + +
+ +\\n\\n\\n\\n\\n\\n\"","export default \"\\n\\n\\n \\n \\n \\n Pillarbox Demo - Multi Player Showcase\\n \\n \\n\\n\\n\\n\\n
\\n

Multiple players

\\n\\n
\\n \\n
\\n\\n \\n\\n
\\n \\n
\\n\\n \\n
\\n\\n\\n\\n\\n\\n\\n\"","export default \"\\n\\n\\n \\n \\n \\n Pillarbox Demo - Detect blocked segment\\n \\n \\n \\n\\n\\n\\n\\n
\\n

Detect blocked segment

\\n
\\n \\n
\\n\\n \\n
\\n\\n\\n\\n\\n\\n\\n\\n\"","export default \"\\n\\n\\n \\n \\n \\n Pillarbox Demo - Display Current Chapter\\n \\n \\n \\n\\n\\n\\n\\n
\\n

Display Current Chapter

\\n
\\n \\n
\\n\\n \\n
\\n\\n\\n\\n\\n\\n\\n\\n\"","export default \"\\n\\n\\n \\n \\n \\n Pillarbox Demo - Skip Credits\\n \\n \\n \\n\\n\\n\\n\\n
\\n

Skip Credits

\\n
\\n \\n
\\n\\n \\n
\\n\\n\\n\\n\\n\\n\\n\\n\"","/**\n * Aligns the lines of a block of code by removing leading spaces.\n *\n * This function calculates the number of leading spaces on the first line of the code,\n * then creates a regular expression that matches this number of leading spaces.\n * It finally replaces these leading spaces in each line of the code.\n *\n * @param {string} code - The block of code to align.\n * @returns {string} The aligned block of code.\n */\nfunction alignLines(code) {\n // Remove leading and trailing new lines.\n const normalizeCode = code.replace(/^[\\r\\n]+|[\\r\\n]+$/g, '');\n // Calculate the number of leading spaces on the first line\n const firstLine = normalizeCode.split('\\n')[0];\n const leadingSpaces = firstLine.match(/^ */)[0].length;\n // Create a regular expression that matches 'leadingSpaces' number of leading spaces\n const regex = new RegExp(`^ {${leadingSpaces}}`, 'gm');\n\n // Replace leading spaces in each line\n return normalizeCode.replace(regex, '');\n}\n\nconst parser = new DOMParser();\n\n/**\n * Parses an HTML string and returns the text content of the first element that matches the provided selector.\n *\n * @param {string} html - The HTML string to parse.\n * @param {string} [selector='[data-implementation]'] - The CSS selector to match elements. Defaults to '[data-example]'.\n * @returns {string} The text content of the first matching element. If no elements match the selector, it returns an empty string.\n *\n * @example\n * const html = '
Hello, world!
';\n * const content = parseHTML(html);\n * console.log(content); // Logs: 'Hello, world!'\n */\nexport function getTextFromHTML(html, selector = '[data-implementation]') {\n return alignLines(\n parser.parseFromString(html, 'text/html').querySelector(selector).textContent\n );\n}\n","import router from '../../../router/router';\nimport { html, LitElement, unsafeCSS } from 'lit';\nimport { animations, theme } from '../../../theme/theme';\nimport './showcase-component.js';\nimport '../../../components/code-block/code-block';\nimport showcasePageCss from './showcase-page.scss?inline';\nimport rawStartTimeExample from '../../../../static/showcases/start-time.html?raw';\nimport rawMultiPlayerExample from '../../../../static/showcases/multi-player.html?raw';\nimport rawDetectBlockedSegmentsExample from '../../../../static/showcases/blocked-segment.html?raw';\nimport rawDisplayCurrentChapterExample from '../../../../static/showcases/chapters.html?raw';\nimport rawSkipCreditsExample from '../../../../static/showcases/skip-credits.html?raw';\nimport { getTextFromHTML } from './example-parser.js';\n\nconst startTimeExampleTxt = getTextFromHTML(rawStartTimeExample);\nconst multiPlayerExampleTxt = getTextFromHTML(rawMultiPlayerExample);\nconst detectBlockedSegmentsExampleTxt =\n getTextFromHTML(rawDetectBlockedSegmentsExample);\nconst displayCurrentChapterExampleTxt =\n getTextFromHTML(rawDisplayCurrentChapterExample);\nconst skipCreditsExampleTxt = getTextFromHTML(rawSkipCreditsExample);\n\nexport class ShowCasePage extends LitElement {\n static styles = [theme, animations, unsafeCSS(showcasePageCss)];\n\n render() {\n return html`\n ${this.#renderStartTime()}\n ${this.#renderMultiplePlayers()}\n ${this.#renderDetectBlockedSegments()}\n ${this.#renderDisplayCurrentChapter()}\n ${this.#renderSkipCredits()}\n `;\n }\n\n #renderStartTime() {\n return html`\n
e.target.classList.remove('fade-in')}\">\n \n

Start the player at a given position

\n

\n In this showcase, we'll demonstrate how to load a video source and\n start playback at a specific position using Pillarbox. This can be\n useful when you want to provide users with the option to begin\n watching a video from a predefined timestamp. To achieve this\n functionality, follow the code snippet below:\n

\n ${startTimeExampleTxt}\n
\n \n Open this showcase\n \n
\n `;\n }\n\n #renderMultiplePlayers() {\n return html`\n
e.target.classList.remove('fade-in')}\">\n \n

Multiple Players

\n

\n This example demonstrates how to incorporate multiple video players\n on a webpage.In this showcase, two players are initialized, each\n with its own configuration, a button allows to toggle the mute state\n for both players.\n

\n ${multiPlayerExampleTxt}\n
\n \n Open this showcase\n \n
\n `;\n }\n\n #renderDetectBlockedSegments() {\n return html`\n
e.target.classList.remove('fade-in')}\">\n \n

Detect Blocked Segments

\n

\n This tutorial covers how to use pillarbox to create a plugin that\n detects and notifies when a blocked segment is skipped.\n

\n ${detectBlockedSegmentsExampleTxt}\n
\n \n Open this showcase\n \n
\n `;\n }\n\n #renderDisplayCurrentChapter() {\n return html`\n
e.target.classList.remove('fade-in')}\">\n \n

Display Current Chapter

\n

\n This showcase explains how to use pillarbox to create a plugin that\n displays the currently playing chapter in a box above the progress\n bar.\n

\n ${displayCurrentChapterExampleTxt}\n
\n \n Open this showcase\n \n
\n `;\n }\n\n #renderSkipCredits() {\n return html`\n
e.target.classList.remove('fade-in')}\">\n \n

Skip Credits

\n

\n This example shows how to use pillarbox to create a plugin that adds\n a \"Skip\" button during detected credit intervals.\n

\n ${skipCreditsExampleTxt}\n
\n \n Open this showcase\n \n
\n `;\n }\n}\n\ncustomElements.define('showcase-page', ShowCasePage);\nrouter.addRoute('showcase', 'showcase-page');\n","import { html, LitElement, unsafeCSS } from 'lit';\nimport '../../router/route-link-component';\nimport { theme } from '../../theme/theme';\nimport headerCSS from './demo-header-component.scss?inline';\nimport router from '../../router/router';\nimport './core-demo-header-component.js';\n\n/**\n * A web component that represents the header of the demo page. This header contains\n * the {@link CoreDemoHeaderComponent} as well as the navigation menu of the\n * different demo app sections.\n *\n * @element demo-header\n *\n * @prop {Boolean} debug - Indicates whether the debug mode is enabled.\n *\n * @example\n * \n */\nexport class DemoHeaderElement extends LitElement {\n static properties = {\n debug: { type: Boolean, state: true }\n };\n\n static styles = [theme, unsafeCSS(headerCSS)];\n\n #onRouteUpdated = ({ detail: { queryParams } }) => {\n this.debug = queryParams.debug === 'true';\n };\n\n connectedCallback() {\n super.connectedCallback();\n\n this.debug = router.queryParams.debug === 'true';\n router.addEventListener('routechanged', this.#onRouteUpdated);\n router.addEventListener('queryparams', this.#onRouteUpdated);\n }\n\n disconnectedCallback() {\n router.removeEventListener('routechanged', this.#onRouteUpdated);\n router.removeEventListener('queryparams', this.#onRouteUpdated);\n }\n\n render() {\n return html`\n ${this.#renderHeaderElement()}\n ${this.#renderNavElement()}\n `;\n }\n\n #renderHeaderElement() {\n return html`\n \n \n settings\n \n \n `;\n }\n\n #renderNavElement() {\n return html`\n `;\n }\n}\n\ncustomElements.define('demo-header', DemoHeaderElement);\n","import router from './router';\nimport { LitElement } from 'lit';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\n\nexport class RouteOutletComponent extends LitElement {\n static properties = {\n route: { state: true }\n };\n\n constructor() {\n super();\n\n this.route = router.currentRoute;\n router.addEventListener('routechanged', ({ detail: { route } }) => {\n this.route?.destroy();\n this.route = route;\n });\n }\n\n render() {\n return unsafeHTML(`<${this.route.component}>`);\n }\n}\n\ncustomElements.define('route-outlet', RouteOutletComponent);\n","/**\n * Main module to import and initialize the demo as a single page application.\n *\n * @module\n */\nimport './components/dialog/demo-dialog-component';\nimport './components/player/player';\nimport './layout/content/examples/examples-page';\nimport './layout/content/lists/lists-page';\nimport './layout/content/search/search-page';\nimport './layout/content/settings/settings-page';\nimport './layout/content/showcase/showcase-page';\nimport './layout/header/demo-header-component.js';\nimport './router/route-outlet-component';\nimport router from './router/router';\nimport PreferencesProvider\n from './layout/content/settings/preferences-provider';\nimport ilProvider from './utils/il-provider.js';\n\n// Load preferences and initializes il host\nconst preferences = PreferencesProvider.loadPreferences();\n\nilProvider.host = preferences.dataProviderHost;\n\n// Initialize the router with the current path or 'examples' if none is found\nrouter.start({ defaultPath: 'examples' });\n\nif (router.queryParams.debug) {\n preferences.debug = router.queryParams.debug === 'true';\n PreferencesProvider.savePreferences(preferences);\n} else if (preferences.debug) {\n router.updateState({ debug: 'true' });\n}\n"],"names":["DemoDialog","LitElement","__privateAdd","_onDialogClosed","_onDialogClicked","_dialog","_changedProperties","__privateGet","__privateSet","html","__privateMethod","onDialogClicked_fn","onDialogClosed_fn","__publicField","theme","animations","unsafeCSS","componentCSS","PreferencesProvider","preferences","IL_DEFAULT_HOST","DEFAULT_QUERY_PARAMS","DEFAULT_SEARCH_PARAMS","DEFAULT_SHOWLIST_PARAMS","toMedia","title","urn","mediaType","date","duration","ILProvider","host","_fetch","_nextProvider","_host","bu","query","signal","data","fetch_fn","toResults","nextProvider_fn","transmission","topicUrn","pageSize","showUrn","mediaList","id","channelId","path","params","queryParams","url","response","reason","nextUrl","resultMapper","nextData","ilProvider","DEMO_PLAYER_ID","DEFAULT_OPTIONS","createPlayer","options","Pillarbox","destroyPlayer","playerDialog","toParams","keySystems","vendor","toKeySystem","keySystem","certificateUrl","licenseUrl","asQueryParams","src","type","router","loadPlayerFromRouter","e","openPlayerModal","playerOptions","shouldUpdateRouter","player","s","i","t","r","_a","_b","LoadMediaFormComponent","_initDrmSettings","_submitMedia","_handleLoadBarKeyUp","_keySystems","_onFormAnimationEnd","_formAnimationClassMap","_drmSettingsTemplate","initDrmSettings_fn","btnSettingsClassMap","handleLoadBarKeyUp_fn","classMap","drmSettingsTemplate_fn","submitMedia_fn","keySystems_get","event","onFormAnimationEnd_fn","formAnimationClassMap_fn","ContentLinkComponent","_onClick","EXAMPLES","o","f","n","ExamplesPage","map","Examples","section","examples","example","when","css","SpinnerComponent","spinnerCss","DEFAULT_INT_OPTIONS","onIntersecting","target","callback","entries","entry","IntersectionObserverComponent","ScrollToTopComponent","toKebabCase","str","_ListsPageStateManager","root","_findSectionIndex","_findNodeIndex","nodes","sectionIndex","findSectionIndex_fn","nodeIndex","findNodeIndex_fn","nodeStr","stackIndex","_params","params_fn","stack","rootSection","node","sectionStr","normalizedSectionStr","normalizedStr","ListsPageStateManager","Section","resolve","next","toNodesAndNext","listsSections","topic","show","channel","ListsPage","_updateState","_toMediaButtonParams","_renderMediaButton","_toLevelParams","_renderLevelButton","_nextPage","_renderNodes","_onSectionsClicked","_renderResults","_renderSpinner","_renderScrollToTopBtn","_onNavigationClicked","_renderNavigation","_abortController","_stateManager","_onQueryParamsChanged","updateState_fn","manager","renderScrollBtn","renderNavigation_fn","renderSpinner_fn","renderResults_fn","renderScrollToTopBtn_fn","toMediaButtonParams_fn","renderMediaButton_fn","toLevelParams_fn","sectionIdx","nodeIdx","renderLevelButton_fn","nextPage_fn","renderNodes_fn","firstSection","hasIntesectionObserver","idx","onSectionsClicked_fn","button","onNavigationClicked_fn","step","DEFAULT_BU","SearchBarComponent","_handleSearchBarKeyUp","_handleSelectChange","_clearSearchBar","property","handleSelectChange_fn","handleSearchBarKeyUp_fn","clearSearchBar_fn","SearchPage","_onSearchBarChanged","_search","_fetchNextPage","_toQueryParams","_renderButton","searchBar","search_fn","onSearchBarChanged_fn","fetchNextPage_fn","toQueryParams_fn","renderButton_fn","resultsClassMap","ToggleSwitchComponent","_onKeyDown","force","SettingsPage","_renderToggle","_renderInput","renderToggle_fn","renderInput_fn","label","componentCss","deepFreeze","obj","name","prop","Response","mode","escapeHTML","value","inherit$1","original","objects","result","key","SPAN_CLOSE","emitsWrappingTags","scopeToCSSClass","prefix","pieces","x","HTMLRenderer","parseTree","text","className","newNode","opts","TokenTree","scope","builder","child","el","TokenTreeEmitter","emitter","source","re","lookahead","concat","anyNumberOfTimes","optional","args","stripOptionsFromArgs","either","countMatchGroups","startsWith","lexeme","match","BACKREF_RE","_rewriteBackreferences","regexps","joinWith","numCaptures","regex","offset","out","MATCH_NOTHING_RE","IDENT_RE","UNDERSCORE_IDENT_RE","NUMBER_RE","C_NUMBER_RE","BINARY_NUMBER_RE","RE_STARTERS_RE","SHEBANG","beginShebang","m","resp","BACKSLASH_ESCAPE","APOS_STRING_MODE","QUOTE_STRING_MODE","PHRASAL_WORDS_MODE","COMMENT","begin","end","modeOptions","ENGLISH_WORD","C_LINE_COMMENT_MODE","C_BLOCK_COMMENT_MODE","HASH_COMMENT_MODE","NUMBER_MODE","C_NUMBER_MODE","BINARY_NUMBER_MODE","REGEXP_MODE","TITLE_MODE","UNDERSCORE_TITLE_MODE","METHOD_GUARD","END_SAME_AS_BEGIN","MODES","skipIfHasPrecedingDot","scopeClassName","_parent","beginKeywords","parent","compileIllegal","compileMatch","compileRelevance","beforeMatchExt","originalMode","COMMON_KEYWORDS","DEFAULT_KEYWORD_SCOPE","compileKeywords","rawKeywords","caseInsensitive","scopeName","compiledKeywords","compileList","keywordList","keyword","pair","scoreForKeyword","providedScore","commonKeyword","seenDeprecations","error","message","warn","deprecated","version","MultiClassError","remapScopeNames","regexes","scopeNames","emit","positions","beginMultiClass","endMultiClass","scopeSugar","MultiClass","compileLanguage","language","langRe","global","MultiRegex","terminators","matchData","ResumableMultiRegex","index","matcher","m2","buildModeRegex","mm","term","compileMode","cmode","ext","keywordPattern","c","expandOrCloneMode","dependencyOnParent","variant","HTMLInjectionError","escape","inherit","NO_MATCH","MAX_KEYWORD_HITS","HLJS","hljs","languages","aliases","plugins","SAFE_MODE","LANGUAGE_NOT_FOUND","PLAINTEXT_LANGUAGE","shouldNotHighlight","languageName","blockLanguage","block","classes","getLanguage","_class","highlight","codeOrLanguageName","optionsOrCode","ignoreIllegals","code","context","fire","_highlight","codeToHighlight","continuation","keywordHits","keywordData","matchText","processKeywords","top","modeBuffer","lastIndex","buf","word","kind","keywordRelevance","relevance","cssClass","emitKeyword","processSubLanguage","continuations","highlightAuto","processBuffer","emitMultiClass","max","klass","startNewMode","endOfMode","matchPlusRemainder","matched","doIgnore","resumeScanAtSamePosition","doBeginMatch","newMode","beforeCallbacks","cb","doEndMatch","endMode","origin","processContinuations","list","current","item","lastMatch","processLexeme","textBeforeMatch","err","processed","iterations","md","beforeMatch","processedCount","justTextHighlightResult","languageSubset","plaintext","results","autoDetection","sorted","a","b","best","secondBest","updateClassName","element","currentLang","resultLang","highlightElement","configure","userOptions","initHighlighting","highlightAll","initHighlightingOnLoad","wantsHighlight","boot","registerLanguage","languageDefinition","lang","error$1","registerAliases","unregisterLanguage","alias","listLanguages","aliasList","upgradePluginAPI","plugin","addPlugin","removePlugin","deprecateHighlightBlock","core","KEYWORDS","LITERALS","TYPES","ERROR_TYPES","BUILT_IN_GLOBALS","BUILT_IN_VARIABLES","BUILT_INS","javascript","hasClosingTag","after","tag","IDENT_RE$1","FRAGMENT","XML_SELF_CLOSING","XML_TAG","afterMatchIndex","nextChar","afterMatch","KEYWORDS$1","decimalDigits","frac","decimalInteger","NUMBER","SUBST","HTML_TEMPLATE","CSS_TEMPLATE","GRAPHQL_TEMPLATE","TEMPLATE_STRING","SUBST_INTERNALS","SUBST_AND_COMMENTS","PARAMS_CONTAINS","PARAMS","CLASS_OR_EXTENDS","CLASS_REFERENCE","USE_STRICT","FUNCTION_DEFINITION","UPPER_CASE_CONSTANT","noneOf","FUNCTION_CALL","PROPERTY_ACCESS","GETTER_OR_SETTER","FUNC_LEAD_IN_RE","FUNCTION_VARIABLE","CodeBlock","props","_onCodeChanged","unsafeHTML","onCodeChanged_fn","codeStr","ShowcaseComponent","_hasSlot","_implementationSectionAnimationEnd","_implementationSectionClassMap","hasSlot_fn","implementationSectionClassMap_fn","implementationSectionAnimationEnd_fn","showcaseComponentCss","rawStartTimeExample","rawMultiPlayerExample","rawDetectBlockedSegmentsExample","rawDisplayCurrentChapterExample","rawSkipCreditsExample","alignLines","normalizeCode","leadingSpaces","parser","getTextFromHTML","selector","startTimeExampleTxt","multiPlayerExampleTxt","detectBlockedSegmentsExampleTxt","displayCurrentChapterExampleTxt","skipCreditsExampleTxt","ShowCasePage","_renderStartTime","_renderMultiplePlayers","_renderDetectBlockedSegments","_renderDisplayCurrentChapter","_renderSkipCredits","renderStartTime_fn","renderMultiplePlayers_fn","renderDetectBlockedSegments_fn","renderDisplayCurrentChapter_fn","renderSkipCredits_fn","showcasePageCss","DemoHeaderElement","_renderHeaderElement","_renderNavElement","_onRouteUpdated","renderHeaderElement_fn","renderNavElement_fn","headerCSS","RouteOutletComponent","route"],"mappings":"0lCASO,MAAMA,WAAmBC,CAAW,CAWzC,aAAc,CACZ,QAsBFC,EAAA,KAAAC,IAIAD,EAAA,KAAAE,IA7BAF,EAAA,KAAAG,EAAA,QAIE,KAAK,KAAO,EACb,CAED,QAAQC,EAAoB,CAC1B,MAAM,QAAQA,CAAkB,EAE5BA,EAAmB,IAAI,MAAM,IAC3B,KAAK,MACPC,EAAA,KAAKF,GAAQ,YACbE,EAAA,KAAKF,GAAQ,UAAU,OAAO,mBAAoB,EAAI,GAEtDE,EAAA,KAAKF,GAAQ,QAGlB,CAED,aAAaC,EAAoB,CAC/B,MAAM,aAAaA,CAAkB,EACrCE,EAAA,KAAKH,EAAU,KAAK,WAAW,cAAc,QAAQ,EACtD,CAWD,QAAS,CACP,OAAOI;AAAAA;AAAAA,wBAEaC,EAAA,KAAKN,GAAAO,IAAiB,KAAK,IAAI,CAAC;AAAA,wBAChCD,EAAA,KAAKP,GAAAS,IAAgB,KAAK,IAAI,CAAC;AAAA,+BACxB,GAAK,EAAE,OAAO,UAAU,OAAO,kBAAkB,CAAC;AAAA;AAAA,0BAEvD,IAAM,CAAE,KAAK,KAAO,EAAM,CAAE;AAAA;AAAA;AAAA;AAAA,KAKnD,CACH,CA/CEP,EAAA,YAyBAF,GAAA,YAAAS,GAAe,UAAG,CAChB,KAAK,cAAc,IAAI,YAAY,OAAO,CAAC,CAC5C,EAEDR,GAAA,YAAAO,GAAgB,SAAC,EAAG,CACdJ,EAAA,KAAKF,KAAY,EAAE,SACvB,KAAK,KAAO,GACb,EAxCDQ,EADWb,GACJ,aAAa,CAClB,KAAM,CAAE,KAAM,QAAS,QAAS,EAAM,CAC1C,GAEEa,EALWb,GAKJ,SAAS,CACdc,EAAOC,EAAYC,EAAUC,EAAY,CAC7C,GAmDA,eAAe,OAAO,cAAejB,EAAU,EC9D/C,MAAMkB,EA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D,CACE,MAAO,uBACP,YAAa,QACb,IAAK,wBACL,KAAM,YACP,EACD,CACE,MAAO,uBACP,YAAa,kBACb,IAAK,wBACL,KAAM,YACP,EACD,CACE,MAAO,yBACP,YAAa,4DACb,IAAK,wBACL,KAAM,YACP,EACD,CACE,MAAO,cACP,YAAa,wCACb,IAAK,yBACL,KAAM,YACP,EACD,CACE,MAAO,cACP,YAAa,8BACb,IAAK,wBACL,KAAM,YACP,CACF,EACD,IAAK,CACH,CACE,MAAO,YACP,YAAa,8CACb,IAAK,+DACL,KAAM,uBACP,EACD,CACE,MAAO,oBACP,YAAa,uEACb,IAAK,iGACL,KAAM,uBACP,EACD,CACE,MAAO,gCACP,YAAa,WACb,IAAK,8EACL,KAAM,uBACP,EACD,CACE,MAAO,yBACP,YAAa,4BACb,IAAK,iFACL,KAAM,uBACP,EACD,CACE,MAAO,kCACP,YAAa,2BACb,IAAK,4EACL,KAAM,uBACP,EACD,CACE,MAAO,iDACP,YAAa,YACb,IAAK,wFACL,KAAM,uBACP,EACD,CACE,MAAO,yBACP,YAAa,kBACb,IAAK,qEACL,KAAM,uBACP,EACD,CACE,MAAO,kBACP,YAAa,iCACb,IAAK,kGACL,KAAM,uBACP,EACD,CACE,MAAO,mBACP,YAAa,kCACb,IAAK,oGACL,KAAM,uBACP,EACD,CACE,MAAO,2BACP,YAAa,6DACb,IAAK,qGACL,KAAM,uBACP,EACD,CACE,MAAO,6BACP,YAAa,2DACb,IAAK,uGACL,KAAM,uBACP,EACD,CACE,MAAO,mCACP,YAAa,oDACb,IAAK,mGACL,KAAM,uBACP,EACD,CACE,MAAO,cACP,IAAK,sFACL,KAAM,uBACP,EACD,CACE,MAAO,0BACP,IAAK,0HACL,KAAM,uBACP,EACD,CACE,MAAO,mBACP,YAAa,sCACb,IAAK;AAAA,EACL,KAAM,uBACP,EACD,CACE,MAAO,sCACP,YAAa,kCACb,IAAK,mEACL,KAAM,uBACP,EACD,CACE,MAAO,WACP,IAAK,wFACL,KAAM,uBACP,EACD,CACE,MAAO,0BACP,IAAK,2GACL,KAAM,uBACP,EACD,CACE,MAAO,UACP,IAAK,6EACL,KAAM,uBACP,EACD,CACE,MAAO,uBACP,IAAK,uGACL,KAAM,uBACP,EACD,CACE,MAAO,iCACP,IAAK,kHACL,KAAM,uBACP,EACD,CACE,MAAO,mBACP,IAAK,6IACL,KAAM,uBACP,EACD,CACE,MAAO,kBACP,IAAK,wHACL,KAAM,uBACP,EACD,CACE,MAAO,yBACP,IAAK,0HACL,KAAM,uBACP,EACD,CACE,MAAO,0BACP,IAAK,oOACL,KAAM,uBACP,EACD,CACE,MAAO,YACP,IAAK,qEACL,KAAM,uBACP,EACD,CACE,MAAO,wBACP,IAAK,oFACL,KAAM,uBACP,EACD,CACE,MAAO,aACP,IAAK,gGACL,KAAM,uBACP,EACD,CACE,MAAO,qBACP,IAAK,uEACL,KAAM,uBACP,EACD,CACE,MAAO,cACP,IAAK,4GACL,KAAM,uBACP,EACD,CACE,MAAO,gBACP,IAAK,4GACL,KAAM,uBACP,EACD,CACE,MAAO,QACP,YAAa,mBACb,IAAK,2EACL,KAAM,uBACP,CACF,EACD,KAAM,CACJ,CACE,MAAO,oBACP,IAAK,oEACL,KAAM,sBACP,EACD,CACE,MAAO,kCACP,IAAK,mEACL,KAAM,uBACN,WAAY,CACV,qBAAsB,iFACvB,CACF,EACD,CACE,MAAO,oBACP,IAAK,oEACL,KAAM,sBACP,EACD,CACE,MAAO,kCACP,IAAK,mEACL,KAAM,uBACN,WAAY,CACV,qBAAsB,iFACvB,CACF,EACD,CACE,MAAO,mBACP,IAAK,sGACL,KAAM,sBACP,EACD,CACE,MAAO,wBACP,IAAK,sGACL,KAAM,sBACP,EACD,CACE,MAAO,mBACP,IAAK,uHACL,KAAM,sBACP,EACD,CACE,MAAO,0CACP,IAAK,gIACL,KAAM,sBACP,EACD,CACE,MAAO,yCACP,IAAK,+GACL,KAAM,sBACP,EACD,CACE,MAAO,kCACP,IAAK,yGACL,KAAM,sBACP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goTwe.woff b/pr-preview/pr-26/assets/material-icons-Dr0goTwe.woff new file mode 100644 index 0000000..88fdf4d Binary files /dev/null and b/pr-preview/pr-26/assets/material-icons-Dr0goTwe.woff differ diff --git a/pr-preview/pr-26/assets/material-icons-kAwBdRge.woff2 b/pr-preview/pr-26/assets/material-icons-kAwBdRge.woff2 new file mode 100644 index 0000000..5492a6e Binary files /dev/null and b/pr-preview/pr-26/assets/material-icons-kAwBdRge.woff2 differ diff --git a/pr-preview/pr-26/assets/material-icons-outlined-BpWbwl2n.woff b/pr-preview/pr-26/assets/material-icons-outlined-BpWbwl2n.woff new file mode 100644 index 0000000..edeb9df Binary files /dev/null and b/pr-preview/pr-26/assets/material-icons-outlined-BpWbwl2n.woff differ diff --git a/pr-preview/pr-26/assets/material-icons-outlined-DZhiGvEA.woff2 b/pr-preview/pr-26/assets/material-icons-outlined-DZhiGvEA.woff2 new file mode 100644 index 0000000..d44b948 Binary files /dev/null and b/pr-preview/pr-26/assets/material-icons-outlined-DZhiGvEA.woff2 differ diff --git a/pr-preview/pr-26/assets/material-icons-round-BDlwx-sv.woff b/pr-preview/pr-26/assets/material-icons-round-BDlwx-sv.woff new file mode 100644 index 0000000..bc0002b Binary files /dev/null and b/pr-preview/pr-26/assets/material-icons-round-BDlwx-sv.woff differ diff --git a/pr-preview/pr-26/assets/material-icons-round-DrirKXBx.woff2 b/pr-preview/pr-26/assets/material-icons-round-DrirKXBx.woff2 new file mode 100644 index 0000000..e9e305f Binary files /dev/null and b/pr-preview/pr-26/assets/material-icons-round-DrirKXBx.woff2 differ diff --git a/pr-preview/pr-26/assets/material-icons-sharp-CH1KkVu7.woff b/pr-preview/pr-26/assets/material-icons-sharp-CH1KkVu7.woff new file mode 100644 index 0000000..80d8c99 Binary files /dev/null and b/pr-preview/pr-26/assets/material-icons-sharp-CH1KkVu7.woff differ diff --git a/pr-preview/pr-26/assets/material-icons-sharp-gidztirS.woff2 b/pr-preview/pr-26/assets/material-icons-sharp-gidztirS.woff2 new file mode 100644 index 0000000..4062685 Binary files /dev/null and b/pr-preview/pr-26/assets/material-icons-sharp-gidztirS.woff2 differ diff --git a/pr-preview/pr-26/assets/material-icons-two-tone-B7wz7mED.woff b/pr-preview/pr-26/assets/material-icons-two-tone-B7wz7mED.woff new file mode 100644 index 0000000..ddf106c Binary files /dev/null and b/pr-preview/pr-26/assets/material-icons-two-tone-B7wz7mED.woff differ diff --git a/pr-preview/pr-26/assets/material-icons-two-tone-DuNIpaEj.woff2 b/pr-preview/pr-26/assets/material-icons-two-tone-DuNIpaEj.woff2 new file mode 100644 index 0000000..8f79990 Binary files /dev/null and b/pr-preview/pr-26/assets/material-icons-two-tone-DuNIpaEj.woff2 differ diff --git a/pr-preview/pr-26/assets/multi-player-BZ4YHEUS.js b/pr-preview/pr-26/assets/multi-player-BZ4YHEUS.js new file mode 100644 index 0000000..3a13e43 --- /dev/null +++ b/pr-preview/pr-26/assets/multi-player-BZ4YHEUS.js @@ -0,0 +1,2 @@ +import{p as e}from"./core-demo-header-component-76S4-KyJ.js";/* empty css */const t=e("main-player",{fill:!0,debug:!0});t.src({src:"urn:rts:video:6820736",type:"srgssr/urn"});const s=e("second-player",{fill:!0,muted:!0,debug:!0});s.src({src:"urn:rts:video:6735513",type:"srgssr/urn",disableTrackers:!0});document.querySelector("#toggle-player").addEventListener("click",()=>{e.getAllPlayers().forEach(r=>{r.muted(!r.muted())})});document.querySelector("#close-btn").addEventListener("click",()=>{window.close()});window.pillarbox=e; +//# sourceMappingURL=multi-player-BZ4YHEUS.js.map diff --git a/pr-preview/pr-26/assets/multi-player-BZ4YHEUS.js.map b/pr-preview/pr-26/assets/multi-player-BZ4YHEUS.js.map new file mode 100644 index 0000000..c787976 --- /dev/null +++ b/pr-preview/pr-26/assets/multi-player-BZ4YHEUS.js.map @@ -0,0 +1 @@ +{"version":3,"file":"multi-player-BZ4YHEUS.js","sources":["../../static/showcases/multi-player.html?html-proxy&index=0.js","../../static/showcases/multi-player.html?html-proxy&index=1.js"],"sourcesContent":["\n import pillarbox from '@srgssr/pillarbox-web';\n\n // Initialize the Main Player\n const mainPlayer = pillarbox('main-player', { fill: true, debug: true });\n mainPlayer.src({ src: 'urn:rts:video:6820736', type: 'srgssr/urn' });\n\n // Initialize the Second Player\n const secondPlayer = pillarbox('second-player', { fill: true, muted: true, debug: true });\n // Tracking is disabled for this source, only one source can be tracked at a time.\n secondPlayer.src({ src: 'urn:rts:video:6735513', type: 'srgssr/urn', disableTrackers: true });\n\n // Add an event listener to a button with the id 'toggle-player'\n document.querySelector('#toggle-player').addEventListener('click', () => {\n // Toggle the mute state for both mainPlayer and secondPlayer\n pillarbox.getAllPlayers().forEach(player => {\n player.muted(!player.muted());\n });\n });\n","\n import pillarbox from '@srgssr/pillarbox-web';\n import '../../src/layout/header/core-demo-header-component.js';\n\n document.querySelector('#close-btn').addEventListener('click', () => {\n window.close();\n });\n\n window.pillarbox = pillarbox;\n"],"names":["mainPlayer","pillarbox","secondPlayer","player"],"mappings":"mGAIE,MAAMA,EAAaC,EAAU,cAAe,CAAE,KAAM,GAAM,MAAO,EAAI,CAAE,EACvED,EAAW,IAAI,CAAE,IAAK,wBAAyB,KAAM,YAAY,CAAE,EAGnE,MAAME,EAAeD,EAAU,gBAAiB,CAAE,KAAM,GAAM,MAAO,GAAM,MAAO,EAAM,CAAA,EAExFC,EAAa,IAAI,CAAE,IAAK,wBAAyB,KAAM,aAAc,gBAAiB,EAAI,CAAE,EAG5F,SAAS,cAAc,gBAAgB,EAAE,iBAAiB,QAAS,IAAM,CAEvED,EAAU,cAAa,EAAG,QAAQE,GAAU,CAC1CA,EAAO,MAAM,CAACA,EAAO,MAAO,CAAA,CAClC,CAAK,CACL,CAAG,ECdD,SAAS,cAAc,YAAY,EAAE,iBAAiB,QAAS,IAAM,CACnE,OAAO,MAAK,CAChB,CAAG,EAED,OAAO,UAAYF"} \ No newline at end of file diff --git a/pr-preview/pr-26/assets/skip-credits-BAUCl8qw.css b/pr-preview/pr-26/assets/skip-credits-BAUCl8qw.css new file mode 100644 index 0000000..bb7d51c --- /dev/null +++ b/pr-preview/pr-26/assets/skip-credits-BAUCl8qw.css @@ -0,0 +1 @@ +.vjs-control.vjs-button.pbw-skip-btn{position:absolute;right:var(--size-5);bottom:var(--size-9);height:var(--size-6);color:#fff;background-color:#000000b3;border-radius:var(--radius-3);box-shadow:var(--shadow-3);cursor:pointer;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)} diff --git a/pr-preview/pr-26/assets/skip-credits-BcZI_jsh.js b/pr-preview/pr-26/assets/skip-credits-BcZI_jsh.js new file mode 100644 index 0000000..8dde698 --- /dev/null +++ b/pr-preview/pr-26/assets/skip-credits-BcZI_jsh.js @@ -0,0 +1,2 @@ +var d=(t,s,e)=>{if(!s.has(t))throw TypeError("Cannot "+e)};var c=(t,s,e)=>(d(t,s,"read from private field"),e?e.call(t):s.get(t)),n=(t,s,e)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,e)},u=(t,s,e,r)=>(d(t,s,"write to private field"),r?r.call(t,e):s.set(t,e),e);var p=(t,s,e)=>(d(t,s,"access private method"),e);import{p as i}from"./core-demo-header-component-76S4-KyJ.js";/* empty css */const m=i.getPlugin("plugin");var a,l,g,o,h;class v extends m{constructor(e,r){super(e,r);n(this,l);n(this,o);n(this,a,void 0);this.player.ready(()=>p(this,l,g).call(this)),this.player.on("loadeddata",()=>p(this,o,h).call(this))}}a=new WeakMap,l=new WeakSet,g=function(){u(this,a,this.player.addChild("button",{clickHandler:()=>{const r=this.player.textTracks().getTrackById("srgssr-intervals").activeCues[0];this.player.currentTime(r.endTime)},className:"pbw-skip-btn vjs-hidden vjs-visible-text",controlText:`${this.player.localize("skip")} >>`}))},o=new WeakSet,h=function(){const e=k.textTracks().getTrackById("srgssr-intervals");e==null||e.on("cuechange",()=>{if(!e.activeCues.length){c(this,a).hide();return}c(this,a).show()})};i.registerPlugin("skipButton",v);i.addLanguage("en",{skip:"Skip"});i.addLanguage("fr",{skip:"Passer"});i.addLanguage("de",{skip:"Überspringen"});i.addLanguage("it",{skip:"Saltare"});i.addLanguage("rm",{skip:"Sursiglir"});const k=i("video-element-id",{fill:!0,plugins:{skipButton:!0}});k.src({src:"urn:rts:video:14683290",type:"srgssr/urn"});document.querySelector("#close-btn").addEventListener("click",()=>{window.close()});window.pillarbox=i; +//# sourceMappingURL=skip-credits-BcZI_jsh.js.map diff --git a/pr-preview/pr-26/assets/skip-credits-BcZI_jsh.js.map b/pr-preview/pr-26/assets/skip-credits-BcZI_jsh.js.map new file mode 100644 index 0000000..b059473 --- /dev/null +++ b/pr-preview/pr-26/assets/skip-credits-BcZI_jsh.js.map @@ -0,0 +1 @@ +{"version":3,"file":"skip-credits-BcZI_jsh.js","sources":["../../static/showcases/skip-credits.html?html-proxy&index=0.js","../../static/showcases/skip-credits.html?html-proxy&index=1.js"],"sourcesContent":["\n // Import the pillarbox library\n import pillarbox from '@srgssr/pillarbox-web';\n\n const Plugin = pillarbox.getPlugin('plugin');\n\n // A Pillarbox plugin to display a skip button.\n class SkipButton extends Plugin {\n // Reference to the component used to display the skip button.\n #component;\n\n constructor(player, options) {\n super(player, options);\n\n // Attach the DOM element when the player is ready,\n this.player.ready(() => this.#attachComponent());\n // Wait for the 'loadeddata' event to handle the time intervals change\n this.player.on('loadeddata', () => this.#timeIntervalsChange());\n }\n\n #attachComponent() {\n this.#component = this.player.addChild('button', {\n // Define the click handler for the button\n clickHandler: () => {\n // Get the text track with the ID 'srgssr-intervals'\n const timeIntervals = this.player.textTracks().getTrackById('srgssr-intervals');\n // Get the active time interval cue\n const timeInterval = timeIntervals.activeCues[0];\n\n // Set the player's current time to the 'markOut' value of the time interval\n this.player.currentTime(timeInterval.endTime);\n },\n // Set the class for styling and hide the element with 'vjs-hidden'\n // 'vjs-visible-text' allows to show the controlText, otherwise it is hidden by default\n className: 'pbw-skip-btn vjs-hidden vjs-visible-text',\n // Set the control text\n controlText: `${this.player.localize('skip')} >>`\n });\n }\n\n #timeIntervalsChange() {\n // Get the text track with the ID 'srgssr-intervals'\n const timeIntervals = player.textTracks().getTrackById('srgssr-intervals');\n\n // Add a listener for the 'cuechange' event on the time intervals text track\n timeIntervals?.on('cuechange', () => {\n // Check if there are active cues in the time intervals text track\n if (!timeIntervals.activeCues.length) {\n // Hide the skip button if there are no active cues\n this.#component.hide();\n return;\n }\n\n // Show the skip button if there are active cues\n this.#component.show();\n });\n }\n }\n\n // Register a plugin to skip credits\n pillarbox.registerPlugin('skipButton', SkipButton);\n\n // Add the translations for the button\n pillarbox.addLanguage('en', { 'skip': 'Skip' });\n pillarbox.addLanguage('fr', { 'skip': 'Passer' });\n pillarbox.addLanguage('de', { 'skip': 'Überspringen' });\n pillarbox.addLanguage('it', { 'skip': 'Saltare' });\n pillarbox.addLanguage('rm', { 'skip': 'Sursiglir' });\n\n // Create a pillarbox player instance with the skipButton plugin\n const player = pillarbox(\n 'video-element-id',\n { fill: true, plugins: { skipButton: true } }\n );\n\n // Load the video source for the player\n player.src({ src: 'urn:rts:video:14683290', type: 'srgssr/urn' });\n","\n import pillarbox from '@srgssr/pillarbox-web';\n import '../../src/layout/header/core-demo-header-component.js';\n\n document.querySelector('#close-btn').addEventListener('click', () => {\n window.close();\n });\n\n window.pillarbox = pillarbox;\n"],"names":["Plugin","pillarbox","SkipButton","player","options","__privateAdd","_attachComponent","_timeIntervalsChange","_component","__privateMethod","attachComponent_fn","timeIntervalsChange_fn","__privateSet","timeInterval","timeIntervals","__privateGet"],"mappings":"weAIE,MAAMA,EAASC,EAAU,UAAU,QAAQ,gBAG3C,MAAMC,UAAmBF,CAAO,CAI9B,YAAYG,EAAQC,EAAS,CAC3B,MAAMD,EAAQC,CAAO,EAQvBC,EAAA,KAAAC,GAoBAD,EAAA,KAAAE,GA/BAF,EAAA,KAAAG,EAAA,QAME,KAAK,OAAO,MAAM,IAAMC,EAAA,KAAKH,EAAAI,GAAL,UAAuB,EAE/C,KAAK,OAAO,GAAG,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ets/srgssr-logo-DTU79MZS.png new file mode 100644 index 0000000..79d1166 Binary files /dev/null and b/pr-preview/pr-26/assets/srgssr-logo-DTU79MZS.png differ diff --git a/pr-preview/pr-26/assets/start-time-_M03O93c.js b/pr-preview/pr-26/assets/start-time-_M03O93c.js new file mode 100644 index 0000000..b1cf317 --- /dev/null +++ b/pr-preview/pr-26/assets/start-time-_M03O93c.js @@ -0,0 +1,2 @@ +import{p as r}from"./core-demo-header-component-76S4-KyJ.js";/* empty css */const e=r("video-element-id",{fill:!0});e.src({src:"urn:rts:video:6820736",type:"srgssr/urn"});e.on("loadeddata",()=>{e.currentTime(300)});document.querySelector("#close-btn").addEventListener("click",()=>{window.close()});window.pillarbox=r; +//# sourceMappingURL=start-time-_M03O93c.js.map diff --git a/pr-preview/pr-26/assets/start-time-_M03O93c.js.map b/pr-preview/pr-26/assets/start-time-_M03O93c.js.map new file mode 100644 index 0000000..e1b153d --- /dev/null +++ b/pr-preview/pr-26/assets/start-time-_M03O93c.js.map @@ -0,0 +1 @@ +{"version":3,"file":"start-time-_M03O93c.js","sources":["../../static/showcases/start-time.html?html-proxy&index=0.js","../../static/showcases/start-time.html?html-proxy&index=1.js"],"sourcesContent":["\n import pillarbox from '@srgssr/pillarbox-web';\n\n // Create by referencing the video element with its unique ID\n const player = pillarbox('video-element-id', { fill: true });\n\n // Load the video source\n player.src({ src: 'urn:rts:video:6820736', type: 'srgssr/urn' });\n\n // Listen for the 'loadeddata' event, indicating that the video data has loaded\n player.on('loadeddata', () => {\n // Set the desired start position in seconds (e.g., start at 5 minutes)\n player.currentTime(300);\n });\n","\n import pillarbox from '@srgssr/pillarbox-web';\n import '../../src/layout/header/core-demo-header-component.js';\n\n document.querySelector('#close-btn').addEventListener('click', () => {\n window.close();\n });\n\n window.pillarbox = pillarbox;\n"],"names":["player","pillarbox"],"mappings":"mGAIE,MAAMA,EAASC,EAAU,mBAAoB,CAAE,KAAM,EAAI,CAAE,EAG3DD,EAAO,IAAI,CAAE,IAAK,wBAAyB,KAAM,YAAY,CAAE,EAG/DA,EAAO,GAAG,aAAc,IAAM,CAE5BA,EAAO,YAAY,GAAG,CAC1B,CAAG,ECTD,SAAS,cAAc,YAAY,EAAE,iBAAiB,QAAS,IAAM,CACnE,OAAO,MAAK,CAChB,CAAG,EAED,OAAO,UAAYC"} \ No newline at end of file diff --git a/pr-preview/pr-26/assets/static-showcase-BDDv0y5M.css b/pr-preview/pr-26/assets/static-showcase-BDDv0y5M.css new file mode 100644 index 0000000..714c695 --- /dev/null +++ b/pr-preview/pr-26/assets/static-showcase-BDDv0y5M.css @@ -0,0 +1 @@ +:where(html){--font-sans:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;--font-serif:ui-serif,serif;--font-mono:Dank Mono,Operator Mono,Inconsolata,Fira Mono,ui-monospace,SF Mono,Monaco,Droid Sans Mono,Source Code Pro,monospace;--font-weight-1:100;--font-weight-2:200;--font-weight-3:300;--font-weight-4:400;--font-weight-5:500;--font-weight-6:600;--font-weight-7:700;--font-weight-8:800;--font-weight-9:900;--font-lineheight-00:.95;--font-lineheight-0:1.1;--font-lineheight-1:1.25;--font-lineheight-2:1.375;--font-lineheight-3:1.5;--font-lineheight-4:1.75;--font-lineheight-5:2;--font-letterspacing-0:-.05em;--font-letterspacing-1:.025em;--font-letterspacing-2:.05em;--font-letterspacing-3:.075em;--font-letterspacing-4:.15em;--font-letterspacing-5:.5em;--font-letterspacing-6:.75em;--font-letterspacing-7:1em;--font-size-00:.5rem;--font-size-0:.75rem;--font-size-1:1rem;--font-size-2:1.1rem;--font-size-3:1.25rem;--font-size-4:1.5rem;--font-size-5:2rem;--font-size-6:2.5rem;--font-size-7:3rem;--font-size-8:3.5rem;--font-size-fluid-0:clamp(.75rem,2vw,1rem);--font-size-fluid-1:clamp(1rem,4vw,1.5rem);--font-size-fluid-2:clamp(1.5rem,6vw,2.5rem);--font-size-fluid-3:clamp(2rem,9vw,3.5rem);--size-000:-.5rem;--size-00:-.25rem;--size-1:.25rem;--size-2:.5rem;--size-3:1rem;--size-4:1.25rem;--size-5:1.5rem;--size-6:1.75rem;--size-7:2rem;--size-8:3rem;--size-9:4rem;--size-10:5rem;--size-11:7.5rem;--size-12:10rem;--size-13:15rem;--size-14:20rem;--size-15:30rem;--size-fluid-1:clamp(.5rem,1vw,1rem);--size-fluid-2:clamp(1rem,2vw,1.5rem);--size-fluid-3:clamp(1.5rem,3vw,2rem);--size-fluid-4:clamp(2rem,4vw,3rem);--size-fluid-5:clamp(4rem,5vw,5rem);--size-fluid-6:clamp(5rem,7vw,7.5rem);--size-fluid-7:clamp(7.5rem,10vw,10rem);--size-fluid-8:clamp(10rem,20vw,15rem);--size-fluid-9:clamp(15rem,30vw,20rem);--size-fluid-10:clamp(20rem,40vw,30rem);--size-content-1:20ch;--size-content-2:45ch;--size-content-3:60ch;--size-header-1:20ch;--size-header-2:25ch;--size-header-3:35ch;--size-xxs:240px;--size-xs:360px;--size-sm:480px;--size-md:768px;--size-lg:1024px;--size-xl:1440px;--size-xxl:1920px;--size-relative-000:-.5ch;--size-relative-00:-.25ch;--size-relative-1:.25ch;--size-relative-2:.5ch;--size-relative-3:1ch;--size-relative-4:1.25ch;--size-relative-5:1.5ch;--size-relative-6:1.75ch;--size-relative-7:2ch;--size-relative-8:3ch;--size-relative-9:4ch;--size-relative-10:5ch;--size-relative-11:7.5ch;--size-relative-12:10ch;--size-relative-13:15ch;--size-relative-14:20ch;--size-relative-15:30ch;--ease-1:cubic-bezier(.25,0,.5,1);--ease-2:cubic-bezier(.25,0,.4,1);--ease-3:cubic-bezier(.25,0,.3,1);--ease-4:cubic-bezier(.25,0,.2,1);--ease-5:cubic-bezier(.25,0,.1,1);--ease-in-1:cubic-bezier(.25,0,1,1);--ease-in-2:cubic-bezier(.5,0,1,1);--ease-in-3:cubic-bezier(.7,0,1,1);--ease-in-4:cubic-bezier(.9,0,1,1);--ease-in-5:cubic-bezier(1,0,1,1);--ease-out-1:cubic-bezier(0,0,.75,1);--ease-out-2:cubic-bezier(0,0,.5,1);--ease-out-3:cubic-bezier(0,0,.3,1);--ease-out-4:cubic-bezier(0,0,.1,1);--ease-out-5:cubic-bezier(0,0,0,1);--ease-in-out-1:cubic-bezier(.1,0,.9,1);--ease-in-out-2:cubic-bezier(.3,0,.7,1);--ease-in-out-3:cubic-bezier(.5,0,.5,1);--ease-in-out-4:cubic-bezier(.7,0,.3,1);--ease-in-out-5:cubic-bezier(.9,0,.1,1);--ease-elastic-out-1:cubic-bezier(.5,.75,.75,1.25);--ease-elastic-out-2:cubic-bezier(.5,1,.75,1.25);--ease-elastic-out-3:cubic-bezier(.5,1.25,.75,1.25);--ease-elastic-out-4:cubic-bezier(.5,1.5,.75,1.25);--ease-elastic-out-5:cubic-bezier(.5,1.75,.75,1.25);--ease-elastic-in-1:cubic-bezier(.5,-.25,.75,1);--ease-elastic-in-2:cubic-bezier(.5,-.5,.75,1);--ease-elastic-in-3:cubic-bezier(.5,-.75,.75,1);--ease-elastic-in-4:cubic-bezier(.5,-1,.75,1);--ease-elastic-in-5:cubic-bezier(.5,-1.25,.75,1);--ease-elastic-in-out-1:cubic-bezier(.5,-.1,.1,1.5);--ease-elastic-in-out-2:cubic-bezier(.5,-.3,.1,1.5);--ease-elastic-in-out-3:cubic-bezier(.5,-.5,.1,1.5);--ease-elastic-in-out-4:cubic-bezier(.5,-.7,.1,1.5);--ease-elastic-in-out-5:cubic-bezier(.5,-.9,.1,1.5);--ease-step-1:steps(2);--ease-step-2:steps(3);--ease-step-3:steps(4);--ease-step-4:steps(7);--ease-step-5:steps(10);--ease-elastic-1:var(--ease-elastic-out-1);--ease-elastic-2:var(--ease-elastic-out-2);--ease-elastic-3:var(--ease-elastic-out-3);--ease-elastic-4:var(--ease-elastic-out-4);--ease-elastic-5:var(--ease-elastic-out-5);--ease-squish-1:var(--ease-elastic-in-out-1);--ease-squish-2:var(--ease-elastic-in-out-2);--ease-squish-3:var(--ease-elastic-in-out-3);--ease-squish-4:var(--ease-elastic-in-out-4);--ease-squish-5:var(--ease-elastic-in-out-5);--ease-spring-1:linear(0,.006,.025 2.8%,.101 6.1%,.539 18.9%,.721 25.3%,.849 31.5%,.937 38.1%,.968 41.8%,.991 45.7%,1.006 50.1%,1.015 55%,1.017 63.9%,1.001);--ease-spring-2:linear(0,.007,.029 2.2%,.118 4.7%,.625 14.4%,.826 19%,.902,.962,1.008 26.1%,1.041 28.7%,1.064 32.1%,1.07 36%,1.061 40.5%,1.015 53.4%,.999 61.6%,.995 71.2%,1);--ease-spring-3:linear(0,.009,.035 2.1%,.141 4.4%,.723 12.9%,.938 16.7%,1.017,1.077,1.121,1.149 24.3%,1.159,1.163,1.161,1.154 29.9%,1.129 32.8%,1.051 39.6%,1.017 43.1%,.991,.977 51%,.974 53.8%,.975 57.1%,.997 69.8%,1.003 76.9%,1);--ease-spring-4:linear(0,.009,.037 1.7%,.153 3.6%,.776 10.3%,1.001,1.142 16%,1.185,1.209 19%,1.215 19.9% 20.8%,1.199,1.165 25%,1.056 30.3%,1.008 33%,.973,.955 39.2%,.953 41.1%,.957 43.3%,.998 53.3%,1.009 59.1% 63.7%,.998 78.9%,1);--ease-spring-5:linear(0,.01,.04 1.6%,.161 3.3%,.816 9.4%,1.046,1.189 14.4%,1.231,1.254 17%,1.259,1.257 18.6%,1.236,1.194 22.3%,1.057 27%,.999 29.4%,.955 32.1%,.942,.935 34.9%,.933,.939 38.4%,1 47.3%,1.011,1.017 52.6%,1.016 56.4%,1 65.2%,.996 70.2%,1.001 87.2%,1);--ease-bounce-1:linear(0,.004,.016,.035,.063,.098,.141,.191,.25,.316,.391 36.8%,.563,.766,1 58.8%,.946,.908 69.1%,.895,.885,.879,.878,.879,.885,.895,.908 89.7%,.946,1);--ease-bounce-2:linear(0,.004,.016,.035,.063,.098,.141 15.1%,.25,.391,.562,.765,1,.892 45.2%,.849,.815,.788,.769,.757,.753,.757,.769,.788,.815,.85,.892 75.2%,1 80.2%,.973,.954,.943,.939,.943,.954,.973,1);--ease-bounce-3:linear(0,.004,.016,.035,.062,.098,.141 11.4%,.25,.39,.562,.764,1 30.3%,.847 34.8%,.787,.737,.699,.672,.655,.65,.656,.672,.699,.738,.787,.847 61.7%,1 66.2%,.946,.908,.885 74.2%,.879,.878,.879,.885 79.5%,.908,.946,1 87.4%,.981,.968,.96,.957,.96,.968,.981,1);--ease-bounce-4:linear(0,.004,.016 3%,.062,.141,.25,.391,.562 18.2%,1 24.3%,.81,.676 32.3%,.629,.595,.575,.568,.575,.595,.629,.676 48.2%,.811,1 56.2%,.918,.86,.825,.814,.825,.86,.918,1 77.2%,.94 80.6%,.925,.92,.925,.94 87.5%,1 90.9%,.974,.965,.974,1);--ease-bounce-5:linear(0,.004,.016 2.5%,.063,.141,.25 10.1%,.562,1 20.2%,.783,.627,.534 30.9%,.511,.503,.511,.534 38%,.627,.782,1 48.7%,.892,.815,.769 56.3%,.757,.753,.757,.769 61.3%,.815,.892,1 68.8%,.908 72.4%,.885,.878,.885,.908 79.4%,1 83%,.954 85.5%,.943,.939,.943,.954 90.5%,1 93%,.977,.97,.977,1);--layer-1:1;--layer-2:2;--layer-3:3;--layer-4:4;--layer-5:5;--layer-important:2147483647;--shadow-color:220 3% 15%;--shadow-strength:1%;--inner-shadow-highlight:inset 0 -.5px 0 0 #fff,inset 0 .5px 0 0 rgba(0,0,0,.067);--shadow-1:0 1px 2px -1px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 9%));--shadow-2:0 3px 5px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 3%)),0 7px 14px -5px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 5%));--shadow-3:0 -1px 3px 0 hsl(var(--shadow-color)/calc(var(--shadow-strength) + 2%)),0 1px 2px -5px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 2%)),0 2px 5px -5px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 4%)),0 4px 12px -5px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 5%)),0 12px 15px -5px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 7%));--shadow-4:0 -2px 5px 0 hsl(var(--shadow-color)/calc(var(--shadow-strength) + 2%)),0 1px 1px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 3%)),0 2px 2px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 3%)),0 5px 5px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 4%)),0 9px 9px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 5%)),0 16px 16px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 6%));--shadow-5:0 -1px 2px 0 hsl(var(--shadow-color)/calc(var(--shadow-strength) + 2%)),0 2px 1px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 3%)),0 5px 5px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 3%)),0 10px 10px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 4%)),0 20px 20px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 5%)),0 40px 40px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 7%));--shadow-6:0 -1px 2px 0 hsl(var(--shadow-color)/calc(var(--shadow-strength) + 2%)),0 3px 2px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 3%)),0 7px 5px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 3%)),0 12px 10px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 4%)),0 22px 18px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 5%)),0 41px 33px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 6%)),0 100px 80px -2px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 7%));--inner-shadow-0:inset 0 0 0 1px hsl(var(--shadow-color)/calc(var(--shadow-strength) + 9%));--inner-shadow-1:inset 0 1px 2px 0 hsl(var(--shadow-color)/calc(var(--shadow-strength) + 9%)),var(--inner-shadow-highlight);--inner-shadow-2:inset 0 1px 4px 0 hsl(var(--shadow-color)/calc(var(--shadow-strength) + 9%)),var(--inner-shadow-highlight);--inner-shadow-3:inset 0 2px 8px 0 hsl(var(--shadow-color)/calc(var(--shadow-strength) + 9%)),var(--inner-shadow-highlight);--inner-shadow-4:inset 0 2px 14px 0 hsl(var(--shadow-color)/calc(var(--shadow-strength) + 9%)),var(--inner-shadow-highlight);--ratio-square:1;--ratio-landscape:4/3;--ratio-portrait:3/4;--ratio-widescreen:16/9;--ratio-ultrawide:18/5;--ratio-golden:1.618/1;--gray-0:#f8f9fa;--gray-1:#f1f3f5;--gray-2:#e9ecef;--gray-3:#dee2e6;--gray-4:#ced4da;--gray-5:#adb5bd;--gray-6:#868e96;--gray-7:#495057;--gray-8:#343a40;--gray-9:#212529;--gray-10:#16191d;--gray-11:#0d0f12;--gray-12:#030507;--stone-0:#f8fafb;--stone-1:#f2f4f6;--stone-2:#ebedef;--stone-3:#e0e4e5;--stone-4:#d1d6d8;--stone-5:#b1b6b9;--stone-6:#979b9d;--stone-7:#7e8282;--stone-8:#666968;--stone-9:#50514f;--stone-10:#3a3a37;--stone-11:#252521;--stone-12:#121210;--red-0:#fff5f5;--red-1:#ffe3e3;--red-2:#ffc9c9;--red-3:#ffa8a8;--red-4:#ff8787;--red-5:#ff6b6b;--red-6:#fa5252;--red-7:#f03e3e;--red-8:#e03131;--red-9:#c92a2a;--red-10:#b02525;--red-11:#962020;--red-12:#7d1a1a;--pink-0:#fff0f6;--pink-1:#ffdeeb;--pink-2:#fcc2d7;--pink-3:#faa2c1;--pink-4:#f783ac;--pink-5:#f06595;--pink-6:#e64980;--pink-7:#d6336c;--pink-8:#c2255c;--pink-9:#a61e4d;--pink-10:#8c1941;--pink-11:#731536;--pink-12:#59102a;--purple-0:#f8f0fc;--purple-1:#f3d9fa;--purple-2:#eebefa;--purple-3:#e599f7;--purple-4:#da77f2;--purple-5:#cc5de8;--purple-6:#be4bdb;--purple-7:#ae3ec9;--purple-8:#9c36b5;--purple-9:#862e9c;--purple-10:#702682;--purple-11:#5a1e69;--purple-12:#44174f;--violet-0:#f3f0ff;--violet-1:#e5dbff;--violet-2:#d0bfff;--violet-3:#b197fc;--violet-4:#9775fa;--violet-5:#845ef7;--violet-6:#7950f2;--violet-7:#7048e8;--violet-8:#6741d9;--violet-9:#5f3dc4;--violet-10:#5235ab;--violet-11:#462d91;--violet-12:#3a2578;--indigo-0:#edf2ff;--indigo-1:#dbe4ff;--indigo-2:#bac8ff;--indigo-3:#91a7ff;--indigo-4:#748ffc;--indigo-5:#5c7cfa;--indigo-6:#4c6ef5;--indigo-7:#4263eb;--indigo-8:#3b5bdb;--indigo-9:#364fc7;--indigo-10:#2f44ad;--indigo-11:#283a94;--indigo-12:#21307a;--blue-0:#e7f5ff;--blue-1:#d0ebff;--blue-2:#a5d8ff;--blue-3:#74c0fc;--blue-4:#4dabf7;--blue-5:#339af0;--blue-6:#228be6;--blue-7:#1c7ed6;--blue-8:#1971c2;--blue-9:#1864ab;--blue-10:#145591;--blue-11:#114678;--blue-12:#0d375e;--cyan-0:#e3fafc;--cyan-1:#c5f6fa;--cyan-2:#99e9f2;--cyan-3:#66d9e8;--cyan-4:#3bc9db;--cyan-5:#22b8cf;--cyan-6:#15aabf;--cyan-7:#1098ad;--cyan-8:#0c8599;--cyan-9:#0b7285;--cyan-10:#095c6b;--cyan-11:#074652;--cyan-12:#053038;--teal-0:#e6fcf5;--teal-1:#c3fae8;--teal-2:#96f2d7;--teal-3:#63e6be;--teal-4:#38d9a9;--teal-5:#20c997;--teal-6:#12b886;--teal-7:#0ca678;--teal-8:#099268;--teal-9:#087f5b;--teal-10:#066649;--teal-11:#054d37;--teal-12:#033325;--green-0:#ebfbee;--green-1:#d3f9d8;--green-2:#b2f2bb;--green-3:#8ce99a;--green-4:#69db7c;--green-5:#51cf66;--green-6:#40c057;--green-7:#37b24d;--green-8:#2f9e44;--green-9:#2b8a3e;--green-10:#237032;--green-11:#1b5727;--green-12:#133d1b;--lime-0:#f4fce3;--lime-1:#e9fac8;--lime-2:#d8f5a2;--lime-3:#c0eb75;--lime-4:#a9e34b;--lime-5:#94d82d;--lime-6:#82c91e;--lime-7:#74b816;--lime-8:#66a80f;--lime-9:#5c940d;--lime-10:#4c7a0b;--lime-11:#3c6109;--lime-12:#2c4706;--yellow-0:#fff9db;--yellow-1:#fff3bf;--yellow-2:#ffec99;--yellow-3:#ffe066;--yellow-4:#ffd43b;--yellow-5:#fcc419;--yellow-6:#fab005;--yellow-7:#f59f00;--yellow-8:#f08c00;--yellow-9:#e67700;--yellow-10:#b35c00;--yellow-11:#804200;--yellow-12:#663500;--orange-0:#fff4e6;--orange-1:#ffe8cc;--orange-2:#ffd8a8;--orange-3:#ffc078;--orange-4:#ffa94d;--orange-5:#ff922b;--orange-6:#fd7e14;--orange-7:#f76707;--orange-8:#e8590c;--orange-9:#d9480f;--orange-10:#bf400d;--orange-11:#99330b;--orange-12:#802b09;--choco-0:#fff8dc;--choco-1:#fce1bc;--choco-2:#f7ca9e;--choco-3:#f1b280;--choco-4:#e99b62;--choco-5:#df8545;--choco-6:#d46e25;--choco-7:#bd5f1b;--choco-8:#a45117;--choco-9:#8a4513;--choco-10:#703a13;--choco-11:#572f12;--choco-12:#3d210d;--brown-0:#faf4eb;--brown-1:#ede0d1;--brown-2:#e0cab7;--brown-3:#d3b79e;--brown-4:#c5a285;--brown-5:#b78f6d;--brown-6:#a87c56;--brown-7:#956b47;--brown-8:#825b3a;--brown-9:#6f4b2d;--brown-10:#5e3a21;--brown-11:#4e2b15;--brown-12:#422412;--sand-0:#f8fafb;--sand-1:#e6e4dc;--sand-2:#d5cfbd;--sand-3:#c2b9a0;--sand-4:#aea58c;--sand-5:#9a9178;--sand-6:#867c65;--sand-7:#736a53;--sand-8:#5f5746;--sand-9:#4b4639;--sand-10:#38352d;--sand-11:#252521;--sand-12:#121210;--camo-0:#f9fbe7;--camo-1:#e8ed9c;--camo-2:#d2df4e;--camo-3:#c2ce34;--camo-4:#b5bb2e;--camo-5:#a7a827;--camo-6:#999621;--camo-7:#8c851c;--camo-8:#7e7416;--camo-9:#6d6414;--camo-10:#5d5411;--camo-11:#4d460e;--camo-12:#36300a;--jungle-0:#ecfeb0;--jungle-1:#def39a;--jungle-2:#d0e884;--jungle-3:#c2dd6e;--jungle-4:#b5d15b;--jungle-5:#a8c648;--jungle-6:#9bbb36;--jungle-7:#8fb024;--jungle-8:#84a513;--jungle-9:#7a9908;--jungle-10:#658006;--jungle-11:#516605;--jungle-12:#3d4d04;--gradient-1:linear-gradient(to bottom right,#1f005c,#5b0060,#870160,#ac255e,#ca485c,#e16b5c,#f39060,#ffb56b);--gradient-2:linear-gradient(to bottom right,#48005c,#8300e2,#a269ff);--gradient-3:radial-gradient(circle at top right,#0ff,rgba(0,255,255,0)),radial-gradient(circle at bottom left,#ff1492,rgba(255,20,146,0));--gradient-4:linear-gradient(to bottom right,#00f5a0,#00d9f5);--gradient-5:conic-gradient(from -270deg at 75% 110%,#f0f,#fffaf0);--gradient-6:conic-gradient(from -90deg at top left,#000,#fff);--gradient-7:linear-gradient(to bottom right,#72c6ef,#004e8f);--gradient-8:conic-gradient(from 90deg at 50% 0%,#111,50%,#222,#111);--gradient-9:conic-gradient(from .5turn at bottom center,#add8e6,#fff);--gradient-10:conic-gradient(from 90deg at 40% -25%,gold,#f79d03,#ee6907,#e6390a,#de0d0d,#d61039,#cf1261,#c71585,#cf1261,#d61039,#de0d0d,#ee6907,#f79d03,gold,gold,gold);--gradient-11:conic-gradient(at bottom left,#ff1493,cyan);--gradient-12:conic-gradient(from 90deg at 25% -10%,#ff4500,#d3f340,#7bee85,#afeeee,#7bee85);--gradient-13:radial-gradient(circle at 50% 200%,#000142,#3b0083,#b300c3,#ff059f,#ff4661,#ffad86,#fff3c7);--gradient-14:conic-gradient(at top right,lime,cyan);--gradient-15:linear-gradient(to bottom right,#c7d2fe,#fecaca,#fef3c7);--gradient-16:radial-gradient(circle at 50% -250%,#374151,#111827,#000);--gradient-17:conic-gradient(from -90deg at 50% -25%,blue,#8a2be2);--gradient-18:linear-gradient(0deg,rgba(255,0,0,.8),rgba(255,0,0,0) 75%),linear-gradient(60deg,rgba(255,255,0,.8),rgba(255,255,0,0) 75%),linear-gradient(120deg,rgba(0,255,0,.8),rgba(0,255,0,0) 75%),linear-gradient(180deg,rgba(0,255,255,.8),rgba(0,255,255,0) 75%),linear-gradient(240deg,rgba(0,0,255,.8),rgba(0,0,255,0) 75%),linear-gradient(300deg,rgba(255,0,255,.8),rgba(255,0,255,0) 75%);--gradient-19:linear-gradient(to bottom right,#ffe259,#ffa751);--gradient-20:conic-gradient(from -135deg at -10% center,orange,#ff7715,#ff522a,#ff3f47,#ff5482,#ff69b4);--gradient-21:conic-gradient(from -90deg at 25% 115%,red,#f06,#f0c,#c0f,#60f,#00f,#00f,#00f,#00f);--gradient-22:linear-gradient(to bottom right,#acb6e5,#86fde8);--gradient-23:linear-gradient(to bottom right,#536976,#292e49);--gradient-24:conic-gradient(from .5turn at 0% 0%,#00c476,10%,#82b0ff,90%,#00c476);--gradient-25:conic-gradient(at 125% 50%,#b78cf7,#ff7c94,#ffcf0d,#ff7c94,#b78cf7);--gradient-26:linear-gradient(to bottom right,#9796f0,#fbc7d4);--gradient-27:conic-gradient(from .5turn at bottom left,#ff1493,#639);--gradient-28:conic-gradient(from -90deg at 50% 105%,#fff,orchid);--gradient-29:radial-gradient(circle at top right,#bfb3ff,rgba(191,179,255,0)),radial-gradient(circle at bottom left,#86acf9,rgba(134,172,249,0));--gradient-30:radial-gradient(circle at top right,#00ff80,rgba(0,255,128,0)),radial-gradient(circle at bottom left,#adffd6,rgba(173,255,214,0));--noise-1:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.005' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");--noise-2:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.05' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");--noise-3:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.25' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");--noise-4:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 2056 2056' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");--noise-5:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 2056 2056' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");--noise-filter-1:contrast(300%) brightness(100%);--noise-filter-2:contrast(200%) brightness(150%);--noise-filter-3:contrast(200%) brightness(250%);--noise-filter-4:contrast(200%) brightness(500%);--noise-filter-5:contrast(200%) brightness(1000%);--animation-fade-in:fade-in .5s var(--ease-3);--animation-fade-in-bloom:fade-in-bloom 2s var(--ease-3);--animation-fade-out:fade-out .5s var(--ease-3);--animation-fade-out-bloom:fade-out-bloom 2s var(--ease-3);--animation-scale-up:scale-up .5s var(--ease-3);--animation-scale-down:scale-down .5s var(--ease-3);--animation-slide-out-up:slide-out-up .5s var(--ease-3);--animation-slide-out-down:slide-out-down .5s var(--ease-3);--animation-slide-out-right:slide-out-right .5s var(--ease-3);--animation-slide-out-left:slide-out-left .5s var(--ease-3);--animation-slide-in-up:slide-in-up .5s var(--ease-3);--animation-slide-in-down:slide-in-down .5s var(--ease-3);--animation-slide-in-right:slide-in-right .5s var(--ease-3);--animation-slide-in-left:slide-in-left .5s var(--ease-3);--animation-shake-x:shake-x .75s var(--ease-out-5);--animation-shake-y:shake-y .75s var(--ease-out-5);--animation-spin:spin 2s linear infinite;--animation-ping:ping 5s var(--ease-out-3) infinite;--animation-blink:blink 1s var(--ease-out-3) infinite;--animation-float:float 3s var(--ease-in-out-3) infinite;--animation-bounce:bounce 2s var(--ease-squish-2) infinite;--animation-pulse:pulse 2s var(--ease-out-3) infinite;--border-size-1:1px;--border-size-2:2px;--border-size-3:5px;--border-size-4:10px;--border-size-5:25px;--radius-1:2px;--radius-2:5px;--radius-3:1rem;--radius-4:2rem;--radius-5:4rem;--radius-6:8rem;--radius-round:1e5px;--radius-blob-1:30% 70% 70% 30%/53% 30% 70% 47%;--radius-blob-2:53% 47% 34% 66%/63% 46% 54% 37%;--radius-blob-3:37% 63% 56% 44%/49% 56% 44% 51%;--radius-blob-4:63% 37% 37% 63%/43% 37% 63% 57%;--radius-blob-5:49% 51% 48% 52%/57% 44% 56% 43%;--radius-conditional-1:clamp(0px, calc(100vw - 100%) * 1e5,var(--radius-1));--radius-conditional-2:clamp(0px, calc(100vw - 100%) * 1e5,var(--radius-2));--radius-conditional-3:clamp(0px, calc(100vw - 100%) * 1e5,var(--radius-3));--radius-conditional-4:clamp(0px, calc(100vw - 100%) * 1e5,var(--radius-4));--radius-conditional-5:clamp(0px, calc(100vw - 100%) * 1e5,var(--radius-5));--radius-conditional-6:clamp(0px, calc(100vw - 100%) * 1e5,var(--radius-6))}@media (prefers-color-scheme:dark){:where(html){--shadow-color:220 40% 2%;--shadow-strength:25%;--inner-shadow-highlight:inset 0 -.5px 0 0 hsla(0,0%,100%,.067),inset 0 .5px 0 0 rgba(0,0,0,.467)}}@keyframes fade-in{to{opacity:1}}@keyframes fade-in-bloom{0%{filter:brightness(1) blur(20px);opacity:0}10%{filter:brightness(2) blur(10px);opacity:1}to{filter:brightness(1) blur(0);opacity:1}}@keyframes fade-out{to{opacity:0}}@keyframes fade-out-bloom{to{filter:brightness(1) blur(20px);opacity:0}10%{filter:brightness(2) blur(10px);opacity:1}0%{filter:brightness(1) blur(0);opacity:1}}@keyframes scale-up{to{transform:scale(1.25)}}@keyframes scale-down{to{transform:scale(.75)}}@keyframes slide-out-up{to{transform:translateY(-100%)}}@keyframes slide-out-down{to{transform:translateY(100%)}}@keyframes slide-out-right{to{transform:translate(100%)}}@keyframes slide-out-left{to{transform:translate(-100%)}}@keyframes slide-in-up{0%{transform:translateY(100%)}}@keyframes slide-in-down{0%{transform:translateY(-100%)}}@keyframes slide-in-right{0%{transform:translate(-100%)}}@keyframes slide-in-left{0%{transform:translate(100%)}}@keyframes shake-x{0%,to{transform:translate(0)}20%{transform:translate(-5%)}40%{transform:translate(5%)}60%{transform:translate(-5%)}80%{transform:translate(5%)}}@keyframes shake-y{0%,to{transform:translateY(0)}20%{transform:translateY(-5%)}40%{transform:translateY(5%)}60%{transform:translateY(-5%)}80%{transform:translateY(5%)}}@keyframes spin{to{transform:rotate(1turn)}}@keyframes ping{90%,to{opacity:0;transform:scale(2)}}@keyframes blink{0%,to{opacity:1}50%{opacity:.5}}@keyframes float{50%{transform:translateY(-25%)}}@keyframes bounce{25%{transform:translateY(-20%)}40%{transform:translateY(-3%)}0%,60%,to{transform:translateY(0)}}@keyframes pulse{50%{transform:scale(.9)}}@media (prefers-color-scheme:dark){@keyframes fade-in-bloom{0%{filter:brightness(1) blur(20px);opacity:0}10%{filter:brightness(.5) blur(10px);opacity:1}to{filter:brightness(1) blur(0);opacity:1}}}@media (prefers-color-scheme:dark){@keyframes fade-out-bloom{to{filter:brightness(1) blur(20px);opacity:0}10%{filter:brightness(.5) blur(10px);opacity:1}0%{filter:brightness(1) blur(0);opacity:1}}}@font-face{font-family:Material Icons;font-style:normal;font-weight:400;font-display:block;src:url(./material-icons-kAwBdRge.woff2) format("woff2"),url(./material-icons-Dr0goTwe.woff) format("woff")}.material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}@font-face{font-family:Material Icons Outlined;font-style:normal;font-weight:400;font-display:block;src:url(./material-icons-outlined-DZhiGvEA.woff2) format("woff2"),url(./material-icons-outlined-BpWbwl2n.woff) format("woff")}.material-icons-outlined{font-family:Material Icons Outlined;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}@font-face{font-family:Material Icons Round;font-style:normal;font-weight:400;font-display:block;src:url(./material-icons-round-DrirKXBx.woff2) format("woff2"),url(./material-icons-round-BDlwx-sv.woff) format("woff")}.material-icons-round{font-family:Material Icons Round;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}@font-face{font-family:Material Icons Sharp;font-style:normal;font-weight:400;font-display:block;src:url(./material-icons-sharp-gidztirS.woff2) format("woff2"),url(./material-icons-sharp-CH1KkVu7.woff) format("woff")}.material-icons-sharp{font-family:Material Icons Sharp;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}@font-face{font-family:Material Icons Two Tone;font-style:normal;font-weight:400;font-display:block;src:url(./material-icons-two-tone-DuNIpaEj.woff2) format("woff2"),url(./material-icons-two-tone-B7wz7mED.woff) format("woff")}.material-icons-two-tone{font-family:Material Icons Two Tone;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}.vjs-svg-icon{display:inline-block;background-repeat:no-repeat;background-position:center;fill:currentColor;height:1.8em;width:1.8em}.vjs-svg-icon:before{content:none!important}.vjs-svg-icon:hover,.vjs-control:focus .vjs-svg-icon{filter:drop-shadow(0 0 .25em #fff)}.vjs-modal-dialog .vjs-modal-dialog-content,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.video-js .vjs-big-play-button .vjs-icon-placeholder:before{position:absolute;top:0;left:0;width:100%;height:100%}.vjs-button>.vjs-icon-placeholder:before,.video-js .vjs-big-play-button .vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABUgAAsAAAAAItAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV33Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADwwAABdk9R/WHmhlYWQAABGcAAAAKwAAADYn8kSnaGhlYQAAEcgAAAAdAAAAJA+RCL1obXR4AAAR6AAAABMAAAC8Q44AAGxvY2EAABH8AAAAYAAAAGB7SIHGbWF4cAAAElwAAAAfAAAAIAFAAI9uYW1lAAASfAAAASUAAAIK1cf1oHBvc3QAABOkAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJ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MR3/MBP/MJvMPzBFYpk2Cr+OF0fTEgrFI1aHhxN740KDbEmeJpsWZlVj40s+45aLuv9KijlhCXSjLQnu/d/4UH6sWul1mRzFxZeekUuE7z10mg3qMtM1FGQddPSrLQyvJR6OaukItYXDp6pCJrmz0umqkau5pZ2hFmm7m+ImG5W2t0kZoJXUtPhVnYTbbdOBdeCVGqpJe7XKTqSbRK7zbdwXfR0U+SVsStuS3Y76em6+Ic3xYiHUppc04Nn0lMzay3dSxNcp8auDlWlaCi48yetFD7Y9USsx87G45cuop1ZxQUtjLnL4j53FO0a+5X08UXqQ7NQNo92R0XOz7sxWEnxN2TneJI8Acttu4Q=) format("woff");font-weight:400;font-style:normal}.vjs-icon-play,.video-js .vjs-play-control .vjs-icon-placeholder,.video-js .vjs-big-play-button .vjs-icon-placeholder:before{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-play:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.video-js .vjs-big-play-button .vjs-icon-placeholder:before{content:""}.vjs-icon-play-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-play-circle:before{content:""}.vjs-icon-pause,.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-pause:before,.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before{content:""}.vjs-icon-volume-mute,.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-mute:before,.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before{content:""}.vjs-icon-volume-low,.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-low:before,.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before{content:""}.vjs-icon-volume-mid,.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-mid:before,.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before{content:""}.vjs-icon-volume-high,.video-js .vjs-mute-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-high:before,.video-js .vjs-mute-control .vjs-icon-placeholder:before{content:""}.vjs-icon-fullscreen-enter,.video-js .vjs-fullscreen-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-fullscreen-enter:before,.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before{content:""}.vjs-icon-fullscreen-exit,.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-fullscreen-exit:before,.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before{content:""}.vjs-icon-spinner{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-spinner:before{content:""}.vjs-icon-subtitles,.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-subtitles:before,.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before{content:""}.vjs-icon-captions,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-captions-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-captions:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-captions-button .vjs-icon-placeholder:before{content:""}.vjs-icon-hd{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-hd:before{content:""}.vjs-icon-chapters,.video-js .vjs-chapters-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-chapters:before,.video-js .vjs-chapters-button .vjs-icon-placeholder:before{content:""}.vjs-icon-downloading{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-downloading:before{content:""}.vjs-icon-file-download{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-file-download:before{content:""}.vjs-icon-file-download-done{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-file-download-done:before{content:""}.vjs-icon-file-download-off{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-file-download-off:before{content:""}.vjs-icon-share{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-share:before{content:""}.vjs-icon-cog{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cog:before{content:""}.vjs-icon-square{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-square:before{content:""}.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder,.video-js .vjs-volume-level,.video-js .vjs-play-progress{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before,.video-js .vjs-volume-level:before,.video-js .vjs-play-progress:before{content:""}.vjs-icon-circle-outline{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-outline:before{content:""}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-inner-circle:before{content:""}.vjs-icon-cancel,.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cancel:before,.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before{content:""}.vjs-icon-repeat{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-repeat:before{content:""}.vjs-icon-replay,.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-replay:before,.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before{content:""}.vjs-icon-replay-5,.video-js .vjs-skip-backward-5 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-replay-5:before,.video-js .vjs-skip-backward-5 .vjs-icon-placeholder:before{content:""}.vjs-icon-replay-10,.video-js .vjs-skip-backward-10 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-replay-10:before,.video-js .vjs-skip-backward-10 .vjs-icon-placeholder:before{content:""}.vjs-icon-replay-30,.video-js .vjs-skip-backward-30 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-replay-30:before,.video-js .vjs-skip-backward-30 .vjs-icon-placeholder:before{content:""}.vjs-icon-forward-5,.video-js .vjs-skip-forward-5 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-forward-5:before,.video-js .vjs-skip-forward-5 .vjs-icon-placeholder:before{content:""}.vjs-icon-forward-10,.video-js .vjs-skip-forward-10 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-forward-10:before,.video-js .vjs-skip-forward-10 .vjs-icon-placeholder:before{content:""}.vjs-icon-forward-30,.video-js .vjs-skip-forward-30 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-forward-30:before,.video-js .vjs-skip-forward-30 .vjs-icon-placeholder:before{content:""}.vjs-icon-audio,.video-js .vjs-audio-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-audio:before,.video-js .vjs-audio-button .vjs-icon-placeholder:before{content:""}.vjs-icon-next-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-next-item:before{content:""}.vjs-icon-previous-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-previous-item:before{content:""}.vjs-icon-shuffle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-shuffle:before{content:""}.vjs-icon-cast{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cast:before{content:""}.vjs-icon-picture-in-picture-enter,.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-picture-in-picture-enter:before,.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before{content:""}.vjs-icon-picture-in-picture-exit,.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-picture-in-picture-exit:before,.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before{content:""}.vjs-icon-facebook{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-facebook:before{content:""}.vjs-icon-linkedin{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-linkedin:before{content:""}.vjs-icon-twitter{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-twitter:before{content:""}.vjs-icon-tumblr{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-tumblr:before{content:""}.vjs-icon-pinterest{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-pinterest:before{content:""}.vjs-icon-audio-description,.video-js .vjs-descriptions-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-audio-description:before,.video-js .vjs-descriptions-button .vjs-icon-placeholder:before{content:""}.video-js{display:inline-block;vertical-align:top;box-sizing:border-box;color:#fff;background-color:#000;position:relative;padding:0;font-size:10px;line-height:1;font-weight:400;font-style:normal;font-family:Arial,Helvetica,sans-serif;word-break:initial}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{width:100%!important;height:100%!important}.video-js[tabindex="-1"]{outline:none}.video-js *,.video-js *:before,.video-js *:after{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-fluid,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-1-1{width:100%;max-width:100%}.video-js.vjs-fluid:not(.vjs-audio-only-mode),.video-js.vjs-16-9:not(.vjs-audio-only-mode),.video-js.vjs-4-3:not(.vjs-audio-only-mode),.video-js.vjs-9-16:not(.vjs-audio-only-mode),.video-js.vjs-1-1:not(.vjs-audio-only-mode){height:0}.video-js.vjs-16-9:not(.vjs-audio-only-mode){padding-top:56.25%}.video-js.vjs-4-3:not(.vjs-audio-only-mode){padding-top:75%}.video-js.vjs-9-16:not(.vjs-audio-only-mode){padding-top:177.7777777778%}.video-js.vjs-1-1:not(.vjs-audio-only-mode){padding-top:100%}.video-js.vjs-fill:not(.vjs-audio-only-mode){width:100%;height:100%}.video-js .vjs-tech{position:absolute;top:0;left:0;width:100%;height:100%}.video-js.vjs-audio-only-mode .vjs-tech{display:none}body.vjs-full-window,body.vjs-pip-window{padding:0;margin:0;height:100%}.vjs-full-window .video-js.vjs-fullscreen,body.vjs-pip-window .video-js{position:fixed;overflow:hidden;z-index:1000;left:0;top:0;bottom:0;right:0}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs),body.vjs-pip-window .video-js{width:100%!important;height:100%!important;padding-top:0!important;display:block}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-pip-container .vjs-pip-text{position:absolute;bottom:10%;font-size:2em;background-color:#000000b3;padding:.5em;text-align:center;width:100%}.vjs-layout-tiny.vjs-pip-container .vjs-pip-text,.vjs-layout-x-small.vjs-pip-container .vjs-pip-text,.vjs-layout-small.vjs-pip-container .vjs-pip-text{bottom:0;font-size:1.4em}.vjs-hidden{display:none!important}.vjs-disabled{opacity:.5;cursor:default}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{padding:20px;color:#fff;background-color:#000;font-size:18px;font-family:Arial,Helvetica,sans-serif;text-align:center;width:300px;height:150px;margin:0 auto}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{font-size:3em;line-height:1.5em;height:1.63332em;width:3em;display:block;position:absolute;top:50%;left:50%;padding:0;margin-top:-.81666em;margin-left:-1.5em;cursor:pointer;opacity:1;border:.06666em solid #fff;background-color:#2b333f;background-color:#2b333fb3;border-radius:.3em;transition:all .4s}.vjs-big-play-button .vjs-svg-icon{width:1em;height:1em;position:absolute;top:50%;left:50%;line-height:1;transform:translate(-50%,-50%)}.video-js:hover .vjs-big-play-button,.video-js .vjs-big-play-button:focus{border-color:#fff;background-color:#73859f;background-color:#73859f80;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button,.vjs-error .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause:not(.vjs-seeking,.vjs-scrubbing,.vjs-error) .vjs-big-play-button{display:block}.video-js button{background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-transform:none;text-decoration:none;transition:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.vjs-control .vjs-button{width:100%;height:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:#000c;background:linear-gradient(180deg,#000c,#fff0);overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;padding:0;margin:0;font-family:Arial,Helvetica,sans-serif;overflow:auto}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{display:flex;justify-content:center;list-style:none;margin:0;padding:.2em 0;line-height:1.4em;font-size:1.2em;text-align:center;text-transform:lowercase}.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover,.js-focus-visible .vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:#73859f80}.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover,.js-focus-visible .vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.vjs-menu li.vjs-selected .vjs-svg-icon,.vjs-menu li.vjs-selected:focus .vjs-svg-icon,.vjs-menu li.vjs-selected:hover .vjs-svg-icon,.js-focus-visible .vjs-menu li.vjs-selected:hover .vjs-svg-icon{fill:#000}.video-js .vjs-menu *:not(.vjs-selected):focus:not(:focus-visible),.js-focus-visible .vjs-menu *:not(.vjs-selected):focus:not(.focus-visible){background:none}.vjs-menu li.vjs-menu-title{text-align:center;text-transform:uppercase;font-size:1em;line-height:2em;padding:0;margin:0 0 .3em;font-weight:700;cursor:default}.vjs-menu-button-popup .vjs-menu{display:none;position:absolute;bottom:0;width:10em;left:-3em;height:0em;margin-bottom:1.5em;border-top-color:#2b333fb3}.vjs-pip-window .vjs-menu-button-popup .vjs-menu{left:unset;right:1em}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:#2b333fb3;position:absolute;width:100%;bottom:1.5em;max-height:15em}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu,.vjs-menu-button-popup .vjs-menu.vjs-lock-showing{display:block}.video-js .vjs-menu-button-inline{transition:all .4s;overflow:hidden}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline:hover,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline.vjs-slider-active{width:12em}.vjs-menu-button-inline .vjs-menu{opacity:0;height:100%;width:auto;position:absolute;left:4em;top:0;padding:0;margin:0;transition:all .4s}.vjs-menu-button-inline:hover .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline.vjs-slider-active .vjs-menu{display:block;opacity:1}.vjs-menu-button-inline .vjs-menu-content{width:auto;height:100%;margin:0;overflow:hidden}.video-js .vjs-control-bar{display:none;width:100%;position:absolute;bottom:0;left:0;right:0;height:3em;background-color:#2b333f;background-color:#2b333fb3}.video-js:not(.vjs-controls-disabled,.vjs-using-native-controls,.vjs-error) .vjs-control-bar.vjs-lock-showing{display:flex!important}.vjs-has-started .vjs-control-bar,.vjs-audio-only-mode .vjs-control-bar{display:flex;visibility:visible;opacity:1;transition:visibility .1s,opacity .1s}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{visibility:visible;opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s}.vjs-controls-disabled .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar,.vjs-error .vjs-control-bar{display:none!important}.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;visibility:visible;pointer-events:auto}.video-js .vjs-control{position:relative;text-align:center;margin:0;padding:0;height:100%;width:4em;flex:none}.video-js .vjs-control.vjs-visible-text{width:auto;padding-left:1em;padding-right:1em}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.vjs-button>.vjs-svg-icon{display:inline-block}.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before,.video-js .vjs-control:focus{text-shadow:0em 0em 1em white}.video-js *:not(.vjs-visible-text)>.vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{cursor:pointer;flex:auto;display:flex;align-items:center;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{display:flex;align-items:center}.video-js .vjs-progress-holder{flex:auto;transition:all .2s;height:.3em}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-play-progress,.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div{position:absolute;display:block;height:100%;margin:0;padding:0;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;position:absolute;right:-.5em;line-height:.35em;z-index:1}.vjs-svg-icons-enabled .vjs-play-progress:before{content:none!important}.vjs-play-progress .vjs-svg-icon{position:absolute;top:-.35em;right:-.4em;width:.9em;height:.9em;pointer-events:none;line-height:.15em;z-index:1}.video-js .vjs-load-progress{background:#73859f80}.video-js .vjs-load-progress div{background:#73859fbf}.video-js .vjs-time-tooltip{background-color:#fff;background-color:#fffc;border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{display:none;position:absolute;width:1px;height:100%;background-color:#000;z-index:1}.video-js .vjs-progress-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{visibility:hidden;opacity:0;transition:visibility 1s,opacity 1s}.vjs-mouse-display .vjs-time-tooltip{color:#fff;background-color:#000;background-color:#000c}.video-js .vjs-slider{position:relative;cursor:pointer;padding:0;margin:0 .45em;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:#73859f;background-color:#73859f80}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{text-shadow:0em 0em 1em white;box-shadow:0 0 1em #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;margin-right:1em;display:flex}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{visibility:visible;opacity:0;width:1px;height:1px;margin-left:-1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active{visibility:visible;opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s}.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal{width:5em;height:3em;margin-right:0}.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active{width:10em;transition:width .1s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;width:3em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{width:5em;height:.3em}.vjs-volume-bar.vjs-slider-vertical{width:.3em;height:5em;margin:1.35em auto}.video-js .vjs-volume-level{position:absolute;bottom:0;left:0;background-color:#fff}.video-js .vjs-volume-level:before{position:absolute;font-size:.9em;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{top:-.5em;left:-.3em;z-index:1}.vjs-svg-icons-enabled .vjs-volume-level:before{content:none}.vjs-volume-level .vjs-svg-icon{position:absolute;width:.9em;height:.9em;pointer-events:none;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{line-height:.35em;right:-.5em}.vjs-slider-horizontal .vjs-volume-level .vjs-svg-icon{right:-.3em;transform:translateY(-50%)}.vjs-slider-vertical .vjs-volume-level .vjs-svg-icon{top:-.55em;transform:translate(-50%)}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{width:3em;height:8em;bottom:8em;background-color:#2b333f;background-color:#2b333fb3}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:#fffc;border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{display:none;position:absolute;width:100%;height:1px;background-color:#000;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{width:1px;height:100%}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{visibility:hidden;opacity:0;transition:visibility 1s,opacity 1s}.vjs-mouse-display .vjs-volume-tooltip{color:#fff;background-color:#000;background-color:#000c}.vjs-poster{display:inline-block;vertical-align:middle;cursor:pointer;margin:0;padding:0;position:absolute;top:0;right:0;bottom:0;left:0;height:100%}.vjs-has-started .vjs-poster,.vjs-using-native-controls .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster,.vjs-has-started.vjs-audio-poster-mode .vjs-poster,.vjs-pip-container.vjs-has-started .vjs-poster{display:block}.vjs-poster img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.video-js .vjs-live-control{display:flex;align-items:flex-start;flex:auto;font-size:1em;line-height:3em}.video-js:not(.vjs-live) .vjs-live-control,.video-js.vjs-liveui .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;flex:none;display:inline-flex;height:100%;padding-left:.5em;padding-right:.5em;font-size:1em;line-height:3em;width:auto;min-width:4em}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{margin-right:.5em;color:#888}.vjs-svg-icons-enabled .vjs-seek-to-live-control{line-height:0}.vjs-seek-to-live-control .vjs-svg-icon{width:1em;height:1em;pointer-events:none;fill:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-svg-icon{fill:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;width:auto;padding-left:1em;padding-right:1em}.vjs-live .vjs-time-control,.vjs-live .vjs-time-divider,.video-js .vjs-current-time,.video-js .vjs-duration{display:none}.vjs-time-divider{display:none;line-height:3em}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{position:absolute;bottom:3em;left:0;right:0;top:0;pointer-events:none}.vjs-error .vjs-text-track-display{display:none}.video-js.vjs-controls-disabled .vjs-text-track-display,.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;text-align:center;margin-bottom:.1em}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control,.vjs-pip-window .vjs-picture-in-picture-control{display:none}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.video-js.vjs-audio-only-mode .vjs-fullscreen-control,.vjs-pip-window .vjs-fullscreen-control{display:none}.vjs-playback-rate>.vjs-menu-button,.vjs-playback-rate .vjs-playback-rate-value{position:absolute;top:0;left:0;width:100%;height:100%}.vjs-playback-rate .vjs-playback-rate-value{pointer-events:none;font-size:1.5em;line-height:2;text-align:center}.vjs-playback-rate .vjs-menu{width:4em;left:0}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-loading-spinner{display:none;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);opacity:.85;text-align:left;border:.6em solid rgba(43,51,63,.7);box-sizing:border-box;background-clip:padding-box;width:5em;height:5em;border-radius:50%;visibility:hidden}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{display:flex;justify-content:center;align-items:center;animation:vjs-spinner-show 0s linear .3s forwards}.vjs-error .vjs-loading-spinner{display:none}.vjs-loading-spinner:before,.vjs-loading-spinner:after{content:"";position:absolute;box-sizing:inherit;width:inherit;height:inherit;border-radius:inherit;opacity:1;border:inherit;border-color:transparent;border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:before,.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{border-top-color:#fff;animation-delay:.44s}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(360deg)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.video-js.vjs-audio-only-mode .vjs-captions-button{display:none}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-audio-only-mode .vjs-descriptions-button{display:none}.vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-svg-icon{width:1.5em;height:1.5em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:"";font-size:1.5em;line-height:inherit}.video-js.vjs-audio-only-mode .vjs-subs-caps-button{display:none}.video-js .vjs-audio-button+.vjs-menu .vjs-description-menu-item .vjs-menu-item-text .vjs-icon-placeholder,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-audio-button+.vjs-menu .vjs-description-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:" ";font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover{width:auto;width:initial}.video-js.vjs-layout-x-small .vjs-progress-control,.video-js.vjs-layout-tiny .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{flex:auto;display:block}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:#2b333fbf;color:#fff;height:70%}.vjs-error .vjs-text-track-settings{display:none}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-font,.vjs-text-track-settings .vjs-track-settings-controls{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display: grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-text-track-settings select{font-size:inherit}.vjs-track-setting>select{margin-right:1em;margin-bottom:.5em}.vjs-text-track-settings fieldset{margin:10px;border:none}.vjs-text-track-settings fieldset span{display:inline-block;padding:0 .6em .8em}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;font-weight:700;font-size:1.2em}.vjs-text-track-settings .vjs-label{margin:0 .5em .5em 0}.vjs-track-settings-controls button:focus,.vjs-track-settings-controls button:active{outline-style:solid;outline-width:medium;background-image:linear-gradient(0deg,#fff 88%,#73859f)}.vjs-track-settings-controls button:hover{color:#2b333fbf}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);color:#2b333f;cursor:pointer;border-radius:2px}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}.vjs-title-bar{background:#000000e6;background:linear-gradient(180deg,#000000e6,#000000b3 60%,#0000);font-size:1.2em;line-height:1.5;transition:opacity .1s;padding:.666em 1.333em 4em;pointer-events:none;position:absolute;top:0;width:100%}.vjs-error .vjs-title-bar{display:none}.vjs-title-bar-title,.vjs-title-bar-description{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vjs-title-bar-title{font-weight:700;margin-bottom:.333em}.vjs-playing.vjs-user-inactive .vjs-title-bar{opacity:0;transition:opacity 1s}.video-js .vjs-skip-forward-5,.video-js .vjs-skip-forward-10,.video-js .vjs-skip-forward-30,.video-js .vjs-skip-backward-5,.video-js .vjs-skip-backward-10,.video-js .vjs-skip-backward-30{cursor:pointer}@media print{.video-js>*:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{position:absolute;top:0;left:0;width:100%;height:100%;border:none;z-index:-1000}.js-focus-visible .video-js *:focus:not(.focus-visible){outline:none}.video-js *:focus:not(:focus-visible){outline:none}.pillarbox-js:hover .vjs-big-play-button{background-color:#16161688;transition:background-color .25s ease}.pillarbox-js .vjs-big-play-button{width:2em;height:2em;margin:0;font-size:2.25em;background:#0000;border:.1em solid #fff;border-radius:50%;transform:translate(-50%,-50%);transition:background-color .25s ease}.pillarbox-js .vjs-big-play-button .vjs-icon-placeholder:before{position:initial;display:flex;align-items:center;justify-content:center;font-size:1.75em}.pillarbox-js .vjs-modal-dialog.vjs-text-track-settings{top:50%;left:50%;max-width:25em;max-height:50em;background:#161616f2;border-radius:.5em;box-shadow:2px 2px 3px #0005;transform:translate(-50%,-50%);overscroll-behavior:contain}.pillarbox-js .vjs-text-track-settings .vjs-modal-dialog-content{display:flex;flex-direction:column;padding:1em 1.5em 0}.pillarbox-js .vjs-text-track-settings legend{font-size:1em}.pillarbox-js .vjs-text-track-settings fieldset span{padding-inline:0}.pillarbox-js .vjs-text-track-settings fieldset{display:flex;margin:0 0 1em;padding:0}.pillarbox-js.video-js .vjs-text-track-settings select{margin:.25em 0 0;padding:.5em;color:#fff;background:#3f3f3f;border:none;-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}.pillarbox-js.video-js .vjs-text-track-settings select:focus-within{outline:solid}.pillarbox-js .vjs-track-settings-controls{display:flex;flex-direction:row;gap:1em;justify-content:end}.pillarbox-js .vjs-track-settings-controls button{margin-block:1em;padding:.25em .5em;color:#fff;background:#3f3f3f}.pillarbox-js .vjs-track-settings-controls button:hover{background:#5c5c5c}.pillarbox-js .vjs-track-settings-controls .vjs-default-button{margin-right:0}.pillarbox-js .vjs-control{height:3em}.pillarbox-js:not(.vjs-audio-only-mode) .vjs-control-bar{align-items:end;height:6em;padding-inline:1em;background:linear-gradient(#000,#0000 0%,#000000b3)}.pillarbox-js.vjs-audio-only-mode .vjs-control-bar{background-color:#1e232c}.pillarbox-js:not(.vjs-audio-only-mode) .vjs-custom-control-spacer{display:block;flex:auto}.pillarbox-js .vjs-error-display .vjs-modal-dialog-content{display:flex;align-items:center;justify-content:center}.pillarbox-js.vjs-layout-tiny{font-size:8px}.pillarbox-js.vjs-layout-x-small{font-size:10px}.pillarbox-js.vjs-layout-small{font-size:12px}.pillarbox-js.vjs-layout-medium{font-size:14px}.pillarbox-js.vjs-layout-large{font-size:16px}.pillarbox-js.vjs-layout-x-large{font-size:18px}.pillarbox-js.vjs-layout-huge{font-size:20px}.pillarbox-js:not(.vjs-layout-tiny,.vjs-layout-x-small,.vjs-live) .vjs-time-divider,.pillarbox-js:not(.vjs-layout-tiny,.vjs-layout-x-small,.vjs-live) .vjs-current-time,.pillarbox-js:not(.vjs-layout-tiny,.vjs-layout-x-small,.vjs-live) .vjs-duration{display:block;padding:0;font-weight:700}.pillarbox-js.vjs-layout-tiny .vjs-progress-control,.pillarbox-js.vjs-layout-x-small .vjs-progress-control{display:flex}.pillarbox-js.vjs-layout-x-small.vjs-audio-only-mode .vjs-custom-control-spacer{display:none}.pillarbox-js .vjs-loading-spinner{border:.25em solid rgba(0,0,0,0)}.pillarbox-js .vjs-loading-spinner{display:flex;align-items:center;justify-content:center}@keyframes vjs-spinner-fade{0%{border-top-color:#333}20%{border-top-color:#333}35%{border-top-color:#fff}60%{border-top-color:#333}to{border-top-color:#333}}.pillarbox-js .vjs-menu .vjs-menu-item{border-radius:.25em}.pillarbox-js .vjs-menu .vjs-menu-item:not(.vjs-selected):focus,.pillarbox-js .vjs-menu .vjs-menu-item:not(.vjs-selected):hover{background-color:#3f3f3f}.pillarbox-js .vjs-menu .vjs-menu-item.vjs-texttrack-settings:focus,.pillarbox-js .vjs-menu .vjs-menu-item.vjs-texttrack-settings:hover{background-color:#0000}.pillarbox-js .vjs-menu .vjs-menu-item .vjs-selected{color:#222;background-color:#fff;pointer-events:none}.pillarbox-js .vjs-menu-button-popup.vjs-hover .vjs-menu{display:none}.pillarbox-js .vjs-menu-button-popup .vjs-menu{right:0;bottom:0;left:unset;width:100%;margin:0}.pillarbox-js .vjs-menu-button-popup .vjs-menu .vjs-menu-content{right:50%;bottom:5em;display:grid;gap:.25em;min-width:13em;padding:1em .5em;background:#161616f2;border-radius:.5em;transform:translate(50%);overscroll-behavior:contain}.pillarbox-js .vjs-slider{background-color:#ffffff4d;border-radius:1em}.pillarbox-js .vjs-text-track-display{top:0;right:0;bottom:4em;left:0}.pillarbox-js .vjs-current-time{margin-left:1em}.pillarbox-js .vjs-time-divider{min-width:1em;text-align:center}.pillarbox-js .vjs-remaining-time{display:none}.pillarbox-js.vjs-audio-only-mode .vjs-current-time,.pillarbox-js.vjs-audio-only-mode .vjs-time-divider,.pillarbox-js.vjs-audio-only-mode .vjs-duration{order:1}.pillarbox-js.vjs-audio-only-mode .vjs-duration{margin-right:1em}.pillarbox-js .vjs-title-bar{padding-bottom:2em;background:linear-gradient(rgba(0,0,0,.6) 0%,transparent 100%)}.pillarbox-js:not(.vjs-audio-only-mode) .vjs-progress-control{position:absolute;bottom:3em;width:calc(100% - 2em);height:1em}.pillarbox-js .vjs-progress-holder{margin:0}.pillarbox-js .vjs-load-progress{background:#ffffff4d;border-radius:1em}.pillarbox-js .vjs-load-progress div{background:#0000}.pillarbox-js.vjs-scrubbing .vjs-play-progress .vjs-time-tooltip,.pillarbox-js.vjs-seeking .vjs-play-progress .vjs-time-tooltip{display:none}.pillarbox-js .vjs-play-progress{color:#af001e;background:#af001e;border-radius:1em}.pillarbox-js .vjs-play-progress:before{font-size:0px;text-shadow:0px 0px 1px #000}.pillarbox-js .vjs-progress-control:hover .vjs-play-progress:before{font-size:.9em}.pillarbox-js .vjs-progress-control:hover .vjs-time-tooltip{right:0%!important;transform:translate(50%)}.pillarbox-js .vjs-progress-holder:focus-visible .vjs-play-progress:before{font-size:.9em}.pillarbox-js .vjs-time-tooltip,.pillarbox-js .vjs-mouse-display .vjs-time-tooltip{top:-3em;padding:.4em;color:#fff;font-weight:700;text-shadow:1px 1px 3px #000,1px 1px 2px #000;background-color:#0000}.pillarbox-js .vjs-volume-level{border-radius:1em}.pillarbox-js .vjs-volume-tooltip{top:-2em;padding:.4em;font-weight:700;text-shadow:1px 1px 3px #000;background-color:#0000}*,*:before,*:after{box-sizing:border-box}html{overflow-y:scroll;--color-1: var(--gray-1);--color-2: var(--gray-2);--color-3: var(--gray-3);--color-4: var(--gray-4);--color-5: var(--gray-5);--color-6: var(--gray-6);--color-7: var(--gray-7);--color-8: var(--gray-8);--color-9: var(--gray-9);--color-10: var(--gray-10);--color-11: var(--gray-11);--color-12: var(--gray-12)}@media (prefers-color-scheme: light){html{--color-1: var(--gray-12);--color-2: var(--gray-11);--color-3: var(--gray-10);--color-4: var(--gray-9);--color-5: var(--gray-8);--color-6: var(--gray-7);--color-7: var(--gray-6);--color-8: var(--gray-5);--color-9: var(--gray-4);--color-10: var(--gray-3);--color-11: var(--gray-2);--color-12: var(--gray-1)}}body{max-width:var(--size-md);margin:0 auto;padding:0 var(--size-2);color:var(--color-4);font-size:var(--size-5);font-family:var(--font-sans);background-color:var(--color-11)}body{max-width:var(--size-md)}.showcase-content{padding:0}.video-container{width:100%;height:auto;aspect-ratio:var(--ratio-widescreen);padding:0}h2{padding-left:var(--size-2);font-size:var(--size-4)}.showcase-btn{width:100%;margin:var(--size-3) 0;padding:var(--size-4) var(--size-3);color:var(--color-0);font-weight:var(--font-weight-6);font-size:var(--size-3);text-align:center;text-decoration:none;background-color:var(--color-9);border:0;border-radius:var(--radius-2);cursor:pointer;transition:background-color .4s,border-color .4s}.showcase-btn:hover{background-color:var(--color-8);border-color:var(--color-9)} diff --git a/pr-preview/pr-26/index.html b/pr-preview/pr-26/index.html new file mode 100644 index 0000000..1901f33 --- /dev/null +++ b/pr-preview/pr-26/index.html @@ -0,0 +1,47 @@ + + + + + + + Pillarbox Demo + + + + + + + + + + + + + + + + + + + diff --git a/pr-preview/pr-26/static/showcases/blocked-segment.html b/pr-preview/pr-26/static/showcases/blocked-segment.html new file mode 100644 index 0000000..cc2f98d --- /dev/null +++ b/pr-preview/pr-26/static/showcases/blocked-segment.html @@ -0,0 +1,29 @@ + + + + + + + Pillarbox Demo - Detect blocked segment + + + + + + + + + +
+

Detect blocked segment

+
+ +
+ + +
+ + + + + diff --git a/pr-preview/pr-26/static/showcases/chapters.html b/pr-preview/pr-26/static/showcases/chapters.html new file mode 100644 index 0000000..36664fd --- /dev/null +++ b/pr-preview/pr-26/static/showcases/chapters.html @@ -0,0 +1,29 @@ + + + + + + + Pillarbox Demo - Display Current Chapter + + + + + + + + + +
+

Display Current Chapter

+
+ +
+ + +
+ + + + + diff --git a/pr-preview/pr-26/static/showcases/multi-player.html b/pr-preview/pr-26/static/showcases/multi-player.html new file mode 100644 index 0000000..72903f6 --- /dev/null +++ b/pr-preview/pr-26/static/showcases/multi-player.html @@ -0,0 +1,34 @@ + + + + + + + Pillarbox Demo - Multi Player Showcase + + + + + + + + +
+

Multiple players

+ +
+ +
+ + + +
+ +
+ + +
+ + + + diff --git a/pr-preview/pr-26/static/showcases/skip-credits.html b/pr-preview/pr-26/static/showcases/skip-credits.html new file mode 100644 index 0000000..0912cd3 --- /dev/null +++ b/pr-preview/pr-26/static/showcases/skip-credits.html @@ -0,0 +1,29 @@ + + + + + + + Pillarbox Demo - Skip Credits + + + + + + + + + +
+

Skip Credits

+
+ +
+ + +
+ + + + + diff --git a/pr-preview/pr-26/static/showcases/start-time.html b/pr-preview/pr-26/static/showcases/start-time.html new file mode 100644 index 0000000..3f886b4 --- /dev/null +++ b/pr-preview/pr-26/static/showcases/start-time.html @@ -0,0 +1,28 @@ + + + + + + + Pillarbox Demo - Start Time Showcase + + + + + + + + +
+

Start the player at a given position

+
+ +
+ + +
+ + + + +