/*! For license information please see app.js.LICENSE.txt */ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=0)}({"+924":function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}));n("9AQC");function r(e,t){return void 0===t&&(t=0),"string"!=typeof e||0===t||e.length<=t?e:e.substr(0,t)+"..."}function i(e,t){var n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);var i=Math.max(t-60,0);i<5&&(i=0);var a=Math.min(i+140,r);return a>r-5&&(a=r),a===r&&(i=Math.max(a-140,0)),n=n.slice(i,a),i>0&&(n="'{snip} "+n),an;){var a=e[n],s=0,o=0,u=e[++o];for(o++;128&u;)s=(127&u)<<7,u=e[o],o++;s+=127&u;for(var l=0;l>>0,l=t.subarray(o+4,o+8);if(0===u)break;var c=o+u;if(c>t.length){if(r)break;c=t.length}var d=t.subarray(o+8,c);Object(i.a)(l,n[0])&&(1===n.length?s.push(d):s.push.apply(s,e(d,n.slice(1),r))),o=c}return s},u={EBML:Object(i.k)([26,69,223,163]),DocType:Object(i.k)([66,130]),Segment:Object(i.k)([24,83,128,103]),SegmentInfo:Object(i.k)([21,73,169,102]),Tracks:Object(i.k)([22,84,174,107]),Track:Object(i.k)([174]),TrackNumber:Object(i.k)([215]),DefaultDuration:Object(i.k)([35,227,131]),TrackEntry:Object(i.k)([174]),TrackType:Object(i.k)([131]),FlagDefault:Object(i.k)([136]),CodecID:Object(i.k)([134]),CodecPrivate:Object(i.k)([99,162]),VideoTrack:Object(i.k)([224]),AudioTrack:Object(i.k)([225]),Cluster:Object(i.k)([31,67,182,117]),Timestamp:Object(i.k)([231]),TimestampScale:Object(i.k)([42,215,177]),BlockGroup:Object(i.k)([160]),BlockDuration:Object(i.k)([155]),Block:Object(i.k)([161]),SimpleBlock:Object(i.k)([163])},l=[128,64,32,16,8,4,2,1],c=function(e,t,n,r){void 0===n&&(n=!0),void 0===r&&(r=!1);var a=function(e){for(var t=1,n=0;n=n.length)return n.length;var a=c(n,r,!1);if(Object(i.a)(t.bytes,a.bytes))return r;var s=c(n,r+a.length);return e(t,n,r+s.length+s.value+a.length)},p=function e(t,n){n=function(e){return Array.isArray(e)?e.map((function(e){return d(e)})):[d(e)]}(n),t=Object(i.k)(t);var r=[];if(!n.length)return r;for(var a=0;at.length?t.length:u+o.value,p=t.subarray(u,l);Object(i.a)(n[0],s.bytes)&&(1===n.length?r.push(p):r=r.concat(e(p,n.slice(1)))),a+=s.length+o.length+p.length}return r},f=n("Mh8q"),m=Object(i.k)([0,0,0,1]),g=Object(i.k)([0,0,1]),y=Object(i.k)([0,0,3]),v=function(e){for(var t=[],n=1;n>1&63),-1!==n.indexOf(l)&&(a=s+u),s+=u+("h264"===t?1:2)}else s++}return e.subarray(0,0)},b={webm:Object(i.k)([119,101,98,109]),matroska:Object(i.k)([109,97,116,114,111,115,107,97]),flac:Object(i.k)([102,76,97,67]),ogg:Object(i.k)([79,103,103,83]),ac3:Object(i.k)([11,119]),riff:Object(i.k)([82,73,70,70]),avi:Object(i.k)([65,86,73]),wav:Object(i.k)([87,65,86,69]),"3gp":Object(i.k)([102,116,121,112,51,103]),mp4:Object(i.k)([102,116,121,112]),fmp4:Object(i.k)([115,116,121,112]),mov:Object(i.k)([102,116,121,112,113,116]),moov:Object(i.k)([109,111,111,118]),moof:Object(i.k)([109,111,111,102])},T={aac:function(e){var t=Object(f.a)(e);return Object(i.a)(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Object(f.a)(e);return Object(i.a)(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=p(e,[u.EBML,u.DocType])[0];return Object(i.a)(t,b.webm)},mkv:function(e){var t=p(e,[u.EBML,u.DocType])[0];return Object(i.a)(t,b.matroska)},mp4:function(e){return!T["3gp"](e)&&!T.mov(e)&&(!(!Object(i.a)(e,b.mp4,{offset:4})&&!Object(i.a)(e,b.fmp4,{offset:4}))||(!(!Object(i.a)(e,b.moof,{offset:4})&&!Object(i.a)(e,b.moov,{offset:4}))||void 0))},mov:function(e){return Object(i.a)(e,b.mov,{offset:4})},"3gp":function(e){return Object(i.a)(e,b["3gp"],{offset:4})},ac3:function(e){var t=Object(f.a)(e);return Object(i.a)(e,b.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+1880}},"+Sp6":function(e,t){!function(){var e=document.querySelector("[data-popup-container]"),t=document.querySelector("[data-popup-hidden-content]"),n=document.querySelector("[data-icon-container]"),r=document.querySelector("[data-map-container]"),i=document.querySelector("[data-user-name]"),a=document.querySelector("[data-user-location]"),s=document.querySelector("[data-user-products]"),o=["Emma","Liam","Olivia","Noah","Ava","Isabella","Sophia","Mia","Jackson","Aiden","Lucas","Elijah","Harper","Charlotte","Amelia","Benjamin","William","James","Evelyn","Abigail"],u=["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland"],l=[e.getAttribute("data-prodname-7"),e.getAttribute("data-prodname-8"),e.getAttribute("data-prodname-9")];function c(){var e=o[Math.floor(Math.random()*o.length)],t=u[Math.floor(Math.random()*u.length)],n=l[Math.floor(Math.random()*l.length)];i.textContent=e,a.textContent=t,s.textContent=n}function d(){var i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];i&&c(),e.classList.toggle("animate-popup"),t.classList.toggle("animate-hidden-content"),n.classList.toggle("display-none"),r.classList.toggle("animate-map-container")}var h=null;var p=window._debounce((function(){for(var e=document.querySelectorAll("[data-package]"),t=!1,n=0;n=0&&e<=100}e.exports=function(){var e=100,t=3,i=0,a=100,s=0,o=100,u="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!r(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return a},set:function(e){if(!r(e))throw new Error("RegionAnchorX must be between 0 and 100.");a=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!r(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!r(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return s},set:function(e){if(!r(e))throw new Error("ViewportAnchorX must be between 0 and 100.");s=e}},scroll:{enumerable:!0,get:function(){return u},set:function(e){var t=function(e){return"string"==typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}(e);!1===t?console.warn("Scroll: an invalid or illegal string was specified."):u=t}}})}},"/9/d":function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a}));var r=n("vgmO"),i=n.n(r);function a(t){for(var n,r=(n=t,i.a.atob?i.a.atob(n):e.from(n,"base64").toString("binary")),a=new Uint8Array(r.length),s=0;s59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function o(){this.values=i(null)}function u(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var s=i[a].split(n);if(2===s.length)t(s[0].trim(),s[1].trim())}}function l(e,t,n){var r=e;function i(){var t=s(e);if(null===t)throw new a(a.Errors.BadTimeStamp,"Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function l(){e=e.replace(/^\s+/,"")}if(l(),t.startTime=i(),l(),"--\x3e"!==e.substr(0,3))throw new a(a.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),l(),t.endTime=i(),l(),function(e,t){var r=new o;u(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),s=a[0];r.integer(e,s),r.percent(e,s)&&r.set("snapToLines",!1),r.alt(e,s,["auto"]),2===a.length&&r.alt("lineAlign",a[1],["start","center","end"]);break;case"position":a=t.split(","),r.percent(e,a[0]),2===a.length&&r.alt("positionAlign",a[1],["start","center","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");try{t.line=r.get("line","auto")}catch(e){}t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100);try{t.align=r.get("align","center")}catch(e){t.align=r.get("align","middle")}try{t.position=r.get("position","auto")}catch(e){t.position=r.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=r.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}a.prototype=i(Error.prototype),a.prototype.constructor=a,a.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},o.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r=0&&t<=100)&&(this.set(e,t),!0)}};var c=r.createElement&&r.createElement("textarea"),d={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},h={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)"},p={v:"title",lang:"lang"},f={rt:"ruby"};function m(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]*>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function r(e,t){return!f[t.localName]||f[t.localName]===e.localName}function i(t,n){var r=d[t];if(!r)return null;var i=e.document.createElement(r),a=p[t];return a&&n&&(i[a]=n.trim()),i}for(var a,o,u=e.document.createElement("div"),l=u,m=[];null!==(a=n());)if("<"!==a[0])l.appendChild(e.document.createTextNode((o=a,c.innerHTML=o,o=c.textContent,c.textContent="",o)));else{if("/"===a[1]){m.length&&m[m.length-1]===a.substr(2).replace(">","")&&(m.pop(),l=l.parentNode);continue}var g,y=s(a.substr(1,a.length-2));if(y){g=e.document.createProcessingInstruction("timestamp",y),l.appendChild(g);continue}var v=a.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!v)continue;if(!(g=i(v[1],v[3])))continue;if(!r(l,g))continue;if(v[2]){var _=v[2].split(".");_.forEach((function(e){var t=/^bg_/.test(e),n=t?e.slice(3):e;if(h.hasOwnProperty(n)){var r=t?"background-color":"color",i=h[n];g.style[r]=i}})),g.className=_.join(" ")}m.push(v[1]),l.appendChild(g),l=g}return u}var g=[[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 y(e){for(var t=0;t=n[0]&&e<=n[1])return!0}return!1}function v(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function i(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var a=n.match(/^.*(\n|\r)/);return a?(e.length=0,a[0]):n}return"ruby"===t.tagName?i(e):t.childNodes?(r(e,t),i(e)):void 0}for(r(t,e);n=i(t);)for(var a=0;a=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,i=0;id&&(c=c<0?-1:1,c*=Math.ceil(d/l)*l),s<0&&(c+=""===a.vertical?n.height:n.width,o=o.reverse()),i.move(h,c)}else{var p=i.lineHeight/n.height*100;switch(a.lineAlign){case"center":s-=p/2;break;case"end":s-=p}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(s,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(s,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(s,"%")})}o=["+y","-x","+x","-y"],i=new T(t)}var f=function(e,t){for(var i,a=new T(e),s=1,o=0;ou&&(i=new T(e),s=u),e=new T(a)}return i||a}(i,o);t.move(f.toCSSCompatValues(n))}function S(){}_.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},_.prototype.formatStyle=function(e,t){return 0===e?0:e+t},b.prototype=i(_.prototype),b.prototype.constructor=b,T.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},T.prototype.overlaps=function(e){return this.lefte.left&&this.tope.top},T.prototype.overlapsAny=function(e){for(var t=0;t=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},T.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.lefte.right;case"+y":return this.tope.bottom}},T.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},T.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},T.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},S.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},S.convertCueToDOMTree=function(e,t){return e&&t?m(e,t):null};S.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=e.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(e){for(var t=0;t-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,r=0;r-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},t}(a),h=String.fromCharCode(9),p=function(e){var t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),n={};return t[1]&&(n.length=parseInt(t[1],10)),t[2]&&(n.offset=parseInt(t[2],10)),n},f=function(e){for(var t,n=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),r={},i=n.length;i--;)""!==n[i]&&((t=/([^=]*)=(.*)/.exec(n[i]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),r[t[0]]=t[1]);return r},m=function(e){function t(){var t;return(t=e.call(this)||this).customParsers=[],t.tagMappers=[],t}i()(t,e);var n=t.prototype;return n.push=function(e){var t,n,r=this;0!==(e=e.trim()).length&&("#"===e[0]?this.tagMappers.reduce((function(t,n){var r=n(e);return r===e?t:t.concat([r])}),[e]).forEach((function(e){for(var i=0;i0&&(s.duration=e.duration),0===e.duration&&(s.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=a},key:function(){if(e.attributes)if("NONE"!==e.attributes.METHOD)if(e.attributes.URI){if("com.apple.streamingkeydelivery"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:e.attributes});if("com.microsoft.playready"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.microsoft.playready"]={uri:e.attributes.URI});if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===e.attributes.KEYFORMAT){return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(e.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===e.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==e.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):e.attributes.KEYID&&"0x"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Object(c.a)(e.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),r={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void 0!==e.attributes.IV&&(r.iv=e.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else r=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence":function(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,f=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type":function(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map:function(){n={},e.uri&&(n.uri=e.uri),e.byterange&&(n.byterange=e.byterange),r&&(n.key=r)},"stream-inf":function(){this.manifest.playlists=a,this.manifest.mediaGroups=this.manifest.mediaGroups||p,e.attributes?(s.attributes||(s.attributes={}),o()(s.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||p,e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME){var n=this.manifest.mediaGroups[e.attributes.TYPE];n[e.attributes["GROUP-ID"]]=n[e.attributes["GROUP-ID"]]||{},t=n[e.attributes["GROUP-ID"]],(l={default:/yes/i.test(e.attributes.DEFAULT)}).default?l.autoselect=!0:l.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(l.language=e.attributes.LANGUAGE),e.attributes.URI&&(l.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(l.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(l.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(l.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=l}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){f+=1,s.discontinuity=!0,this.manifest.discontinuityStarts.push(a.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),s.dateTimeString=e.dateTimeString,s.dateTimeObject=e.dateTimeObject},targetduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):(this.manifest.targetDuration=e.duration,y.call(this,this.manifest))},start:function(){e.attributes&&!isNaN(e.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:e.attributes["TIME-OFFSET"],precise:e.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){s.cueOut=e.data},"cue-out-cont":function(){s.cueOutCont=e.data},"cue-in":function(){s.cueIn=e.data},skip:function(){this.manifest.skip=g(e.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",e.attributes,["SKIPPED-SEGMENTS"])},part:function(){var t=this;u=!0;var n=this.manifest.segments.length,r=g(e.attributes);s.parts=s.parts||[],s.parts.push(r),r.byterange&&(r.byterange.hasOwnProperty("offset")||(r.byterange.offset=_),_=r.byterange.offset+r.byterange.length);var i=s.parts.length-1;this.warnOnMissingAttributes_("#EXT-X-PART #"+i+" for segment #"+n,e.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((function(e,n){e.hasOwnProperty("lastPart")||t.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+n+" lacks required attribute(s): LAST-PART"})}))},"server-control":function(){var t=this.manifest.serverControl=g(e.attributes);t.hasOwnProperty("canBlockReload")||(t.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),y.call(this,this.manifest),t.canSkipDateranges&&!t.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":function(){var t=this.manifest.segments.length,n=g(e.attributes),r=n.type&&"PART"===n.type;s.preloadHints=s.preloadHints||[],s.preloadHints.push(n),n.byterange&&(n.byterange.hasOwnProperty("offset")||(n.byterange.offset=r?_:0,r&&(_=n.byterange.offset+n.byterange.length)));var i=s.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+i+" for segment #"+t,e.attributes,["TYPE","URI"]),n.type)for(var a=0;ac&&(l-=c,l-=c,l-=d(2))}return Number(l)}),f=function(e,t){var n=(void 0===t?{}:t).le,r=void 0!==n&&n;("bigint"!=typeof e&&"number"!=typeof e||"number"==typeof e&&e!=e)&&(e=0),e=d(e);for(var i,a=(i=e,Math.ceil(function(e){return e.toString(2).length}(i)/8)),s=new Uint8Array(new ArrayBuffer(a)),o=0;o=t.length&&l.call(t,(function(t,n){return t===(o[n]?o[n]&e[a+n]:e[a+n])}))}},"3zPy":function(e,t){function n(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return s[e];var n,a=String(e);return(n=r[a.toLowerCase()])?n:(n=i[a.toLowerCase()])||(1===a.length?a.charCodeAt(0):void 0)}n.isEventKey=function(e,t){if(e&&"object"==typeof e){var n=e.which||e.keyCode||e.charCode;if(null==n)return!1;if("string"==typeof t){var a;if(a=r[t.toLowerCase()])return a===n;if(a=i[t.toLowerCase()])return a===n}else if("number"==typeof t)return t===n;return!1}};var r=(t=e.exports=n).code=t.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},i=t.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};for(a=97;a<123;a++)r[String.fromCharCode(a)]=a-32;for(var a=48;a<58;a++)r[a-48]=a;for(a=1;a<13;a++)r["f"+a]=a+111;for(a=0;a<10;a++)r["numpad "+a]=a+96;var s=t.names=t.title={};for(a in r)s[r[a]]=a;for(var o in i)r[o]=i[o]},"49sm":function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},"4ANG":function(e,t,n){var r=n("iadd").NAMESPACE,i=/[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]/,a=new RegExp("[\\-\\.0-9"+i.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),s=new RegExp("^"+i.source+a.source+"*(?::"+i.source+a.source+"*)?$");function o(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,o)}function u(){}function l(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function c(e,t,n,i,a,s){function o(e,t,r){n.attributeNames.hasOwnProperty(e)&&s.fatalError("Attribute "+e+" redefined"),n.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),r)}for(var u,l=++t,c=0;;){var d=e.charAt(l);switch(d){case"=":if(1===c)u=e.slice(t,l),c=3;else{if(2!==c)throw new Error("attribute equal must after attrName");c=3}break;case"'":case'"':if(3===c||1===c){if(1===c&&(s.warning('attribute value must after "="'),u=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error("attribute value no end '"+d+"' match");o(u,h=e.slice(t,l),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after "="');o(u,h=e.slice(t,l),t),s.warning('attribute "'+u+'" missed start quot('+d+")!!"),t=l+1,c=5}break;case"/":switch(c){case 0:n.setTagName(e.slice(t,l));case 5:case 6:case 7:c=7,n.closed=!0;case 4:case 1:break;case 2:n.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return s.error("unexpected end of input"),0==c&&n.setTagName(e.slice(t,l)),l;case">":switch(c){case 0:n.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:"/"===(h=e.slice(t,l)).slice(-1)&&(n.closed=!0,h=h.slice(0,-1));case 2:2===c&&(h=u),4==c?(s.warning('attribute "'+h+'" missed quot(")!'),o(u,h,t)):(r.isHTML(i[""])&&h.match(/^(?:disabled|checked|selected)$/i)||s.warning('attribute "'+h+'" missed value!! "'+h+'" instead!!'),o(h,h,t));break;case 3:throw new Error("attribute value missed!!")}return l;case"€":d=" ";default:if(d<=" ")switch(c){case 0:n.setTagName(e.slice(t,l)),c=6;break;case 1:u=e.slice(t,l),c=2;break;case 4:var h=e.slice(t,l);s.warning('attribute "'+h+'" missed quot(")!!'),o(u,h,t);case 5:c=6}else switch(c){case 2:n.tagName;r.isHTML(i[""])&&u.match(/^(?:disabled|checked|selected)$/i)||s.warning('attribute "'+u+'" missed value!! "'+u+'" instead2!!'),o(u,u,t),t=l,c=1;break;case 5:s.warning('attribute space is required"'+u+'"!!');case 6:c=1,t=l;break;case 3:c=4,t=l;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}l++}}function d(e,t,n){for(var i=e.tagName,a=null,s=e.length;s--;){var o=e[s],u=o.qName,l=o.value;if((p=u.indexOf(":"))>0)var c=o.prefix=u.slice(0,p),d=u.slice(p+1),h="xmlns"===c&&d;else d=u,c=null,h="xmlns"===u&&"";o.localName=d,!1!==h&&(null==a&&(a={},f(n,n={})),n[h]=a[h]=l,o.uri=r.XMLNS,t.startPrefixMapping(h,l))}for(s=e.length;s--;){(c=(o=e[s]).prefix)&&("xml"===c&&(o.uri=r.XML),"xmlns"!==c&&(o.uri=n[c||""]))}var p;(p=i.indexOf(":"))>0?(c=e.prefix=i.slice(0,p),d=e.localName=i.slice(p+1)):(c=null,d=e.localName=i);var m=e.uri=n[c||""];if(t.startElement(m,d,i,e),!e.closed)return e.currentNSMap=n,e.localNSMap=a,!0;if(t.endElement(m,d,i),a)for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&t.endPrefixMapping(c)}function h(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf("",t),s=e.substring(t+1,a);if(/[&<]/.test(s))return/^script$/i.test(n)?(i.characters(s,0,s.length),a):(s=s.replace(/&#?\w+;/g,r),i.characters(s,0,s.length),a)}return t+1}function p(e,t,n,r){var i=r[n];return null==i&&((i=e.lastIndexOf(""))t?(n.comment(e,t+4,i-t-4),i+3):(r.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var i=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,i-t-9),n.endCDATA(),i+3}var a=function(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;i.lastIndex=t,i.exec(e);for(;n=i.exec(e);)if(r.push(n),n[1])return r}(e,t),s=a.length;if(s>1&&/!doctype/i.test(a[0][0])){var o=a[1][0],u=!1,l=!1;s>3&&(/^public$/i.test(a[2][0])?(u=a[3][0],l=s>4&&a[4][0]):/^system$/i.test(a[2][0])&&(l=a[3][0]));var c=a[s-1];return n.startDTD(o,u,l),n.endDTD(),c.index+c[0].length}}return-1}function g(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function y(){this.attributeNames={}}o.prototype=new Error,o.prototype.name=o.name,u.prototype={parse:function(e,t,n){var i=this.domBuilder;i.startDocument(),f(t,t={}),function(e,t,n,i,a){function s(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(n,t)?n[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(a.error("entity not found:"+e),e)}function u(t){if(t>E){var n=e.substring(E,t).replace(/&#?\w+;/g,s);T&&f(E),i.characters(n,0,t-E),E=t}}function f(t,n){for(;t>=_&&(n=b.exec(e));)v=n.index,_=v+n[0].length,T.lineNumber++;T.columnNumber=t-v+1}var v=0,_=0,b=/.*(?:\r\n?|\n)|.*$/g,T=i.locator,w=[{currentNSMap:t}],S={},E=0;for(;;){try{var k=e.indexOf("<",E);if(k<0){if(!e.substr(E).match(/^\s*$/)){var C=i.doc,x=C.createTextNode(e.substr(E));C.appendChild(x),i.currentElement=x}return}switch(k>E&&u(k),e.charAt(k+1)){case"/":var A=e.indexOf(">",k+3),O=e.substring(k+2,A).replace(/[ \t\n\r]+$/g,""),I=w.pop();A<0?(O=e.substring(k+2).replace(/[\s<].*/,""),a.error("end tag name: "+O+" is not complete:"+I.tagName),A=k+1+O.length):O.match(/\sE?E=A:u(Math.max(k,E)+1)}}(e,t,n,i,this.errorHandler),i.endDocument()}},y.prototype={setTagName:function(e){if(!s.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!s.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=u,t.ParseError=o},"4ciW":function(e,t,n){var r=n("iadd"),i=r.find,a=r.NAMESPACE;function s(e){return""!==e}function o(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function u(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(s):[]}(e);return Object.keys(t.reduce(o,{}))}function l(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}function c(e,t){var n=e.prototype;if(!(n instanceof t)){function r(){}r.prototype=t.prototype,l(n,r=new r),e.prototype=n=r}n.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),n.constructor=e)}var d={},h=d.ELEMENT_NODE=1,p=d.ATTRIBUTE_NODE=2,f=d.TEXT_NODE=3,m=d.CDATA_SECTION_NODE=4,g=d.ENTITY_REFERENCE_NODE=5,y=d.ENTITY_NODE=6,v=d.PROCESSING_INSTRUCTION_NODE=7,_=d.COMMENT_NODE=8,b=d.DOCUMENT_NODE=9,T=d.DOCUMENT_TYPE_NODE=10,w=d.DOCUMENT_FRAGMENT_NODE=11,S=d.NOTATION_NODE=12,E={},k={},C=(E.INDEX_SIZE_ERR=(k[1]="Index size error",1),E.DOMSTRING_SIZE_ERR=(k[2]="DOMString size error",2),E.HIERARCHY_REQUEST_ERR=(k[3]="Hierarchy request error",3)),x=(E.WRONG_DOCUMENT_ERR=(k[4]="Wrong document",4),E.INVALID_CHARACTER_ERR=(k[5]="Invalid character",5),E.NO_DATA_ALLOWED_ERR=(k[6]="No data allowed",6),E.NO_MODIFICATION_ALLOWED_ERR=(k[7]="No modification allowed",7),E.NOT_FOUND_ERR=(k[8]="Not found",8)),A=(E.NOT_SUPPORTED_ERR=(k[9]="Not supported",9),E.INUSE_ATTRIBUTE_ERR=(k[10]="Attribute in use",10));E.INVALID_STATE_ERR=(k[11]="Invalid state",11),E.SYNTAX_ERR=(k[12]="Syntax error",12),E.INVALID_MODIFICATION_ERR=(k[13]="Invalid modification",13),E.NAMESPACE_ERR=(k[14]="Invalid namespace",14),E.INVALID_ACCESS_ERR=(k[15]="Invalid access",15);function O(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,k[e]),this.message=k[e],Error.captureStackTrace&&Error.captureStackTrace(this,O);return n.code=e,t&&(this.message=this.message+": "+t),n}function I(){}function P(e,t){this._node=e,this._refresh=t,L(this)}function L(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var n=e._refresh(e._node);ye(e,"length",n.length),l(n,e),e._inc=t}}function D(){}function R(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function N(e,t,n,r){if(r?t[R(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&H(i,e,r),function(e,t,n){e&&e._inc++,n.namespaceURI===a.XMLNS&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(i,e,n))}}function M(e,t,n){var r=R(t,n);if(!(r>=0))throw new O(x,new Error(e.tagName+"@"+n));for(var i=t.length-1;r"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function q(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(q(e,t))return!0}while(e=e.nextSibling)}function F(){this.ownerDocument=this}function H(e,t,n,r){e&&e._inc++,n.namespaceURI===a.XMLNS&&delete t._nsMap[n.prefix?n.localName:""]}function V(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,a=0;i;)r[a++]=i,i=i.nextSibling;r.length=a,delete r[r.length]}}}function W(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,V(e.ownerDocument,e),t}function z(e){return e&&e.nodeType===j.DOCUMENT_TYPE_NODE}function G(e){return e&&e.nodeType===j.ELEMENT_NODE}function X(e){return e&&e.nodeType===j.TEXT_NODE}function Y(e,t){var n=e.childNodes||[];if(i(n,G)||z(t))return!1;var r=i(n,z);return!(t&&r&&n.indexOf(r)>n.indexOf(t))}function K(e,t){var n=e.childNodes||[];if(i(n,(function(e){return G(e)&&e!==t})))return!1;var r=i(n,z);return!(t&&r&&n.indexOf(r)>n.indexOf(t))}function $(e,t,n){if(!function(e){return e&&(e.nodeType===j.DOCUMENT_NODE||e.nodeType===j.DOCUMENT_FRAGMENT_NODE||e.nodeType===j.ELEMENT_NODE)}(e))throw new O(C,"Unexpected parent node type "+e.nodeType);if(n&&n.parentNode!==e)throw new O(x,"child not in parent");if(!function(e){return e&&(G(e)||X(e)||z(e)||e.nodeType===j.DOCUMENT_FRAGMENT_NODE||e.nodeType===j.COMMENT_NODE||e.nodeType===j.PROCESSING_INSTRUCTION_NODE)}(t)||z(t)&&e.nodeType!==j.DOCUMENT_NODE)throw new O(C,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function Q(e,t,n){var r=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===j.DOCUMENT_FRAGMENT_NODE){var s=a.filter(G);if(s.length>1||i(a,X))throw new O(C,"More than one element or text in fragment");if(1===s.length&&!Y(e,n))throw new O(C,"Element in fragment can not be inserted before doctype")}if(G(t)&&!Y(e,n))throw new O(C,"Only one element can be added and only after doctype");if(z(t)){if(i(r,z))throw new O(C,"Only one doctype is allowed");var o=i(r,G);if(n&&r.indexOf(o)1||i(a,X))throw new O(C,"More than one element or text in fragment");if(1===s.length&&!K(e,n))throw new O(C,"Element in fragment can not be inserted before doctype")}if(G(t)&&!K(e,n))throw new O(C,"Only one element can be added and only after doctype");if(z(t)){if(i(r,(function(e){return z(e)&&e!==n})))throw new O(C,"Only one doctype is allowed");var o=i(r,G);if(n&&r.indexOf(o)=0;S--){if(""===(E=i[S]).prefix&&E.namespace===e.namespaceURI){d=E.namespace;break}}if(d!==e.namespaceURI)for(S=i.length-1;S>=0;S--){var E;if((E=i[S]).namespace===e.namespaceURI){E.prefix&&(c=E.prefix+":"+l);break}}}t.push("<",c);for(var k=0;k"),n&&/^script$/i.test(l))for(;u;)u.data?t.push(u.data):ge(u,t,n,r,i.slice()),u=u.nextSibling;else for(;u;)ge(u,t,n,r,i.slice()),u=u.nextSibling;t.push("")}else t.push("/>");return;case b:case w:for(u=e.firstChild;u;)ge(u,t,n,r,i.slice()),u=u.nextSibling;return;case p:return me(t,e.name,e.value);case f:return t.push(e.data.replace(/[<&>]/g,B));case m:return t.push("");case _:return t.push("\x3c!--",e.data,"--\x3e");case T:var O=e.publicId,I=e.systemId;if(t.push("");else if(I&&"."!=I)t.push(" SYSTEM ",I,">");else{var P=e.internalSubset;P&&t.push(" [",P,"]"),t.push(">")}return;case v:return t.push("");case g:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function ye(e,t,n){e[t]=n}O.prototype=Error.prototype,l(E,O),I.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],r=0;r0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)&&n[r]===e)return r;t=t.nodeType==p?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&Object.prototype.hasOwnProperty.call(n,e))return n[e];t=t.nodeType==p?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},l(d,j),l(d,j.prototype),F.prototype={nodeName:"#document",nodeType:b,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==w){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return Z(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===h&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),W(this,e)},replaceChild:function(e,t){Z(this,e,t,J),e.ownerDocument=this,t&&this.removeChild(t),G(e)&&(this.documentElement=e)},importNode:function(e,t){return function e(t,n,r){var i;switch(n.nodeType){case h:(i=n.cloneNode(!1)).ownerDocument=t;case w:break;case p:r=!0}i||(i=n.cloneNode(!1));if(i.ownerDocument=t,i.parentNode=null,r)for(var a=n.firstChild;a;)i.appendChild(e(t,a,r)),a=a.nextSibling;return i}(this,e,t)},getElementById:function(e){var t=null;return q(this.documentElement,(function(n){if(n.nodeType==h&&n.getAttribute("id")==e)return t=n,!0})),t},getElementsByClassName:function(e){var t=u(e);return new P(this,(function(n){var r=[];return t.length>0&&q(n.documentElement,(function(i){if(i!==n&&i.nodeType===h){var a=i.getAttribute("class");if(a){var s=e===a;if(!s){var o=u(a);s=t.every((l=o,function(e){return l&&-1!==l.indexOf(e)}))}s&&r.push(i)}}var l})),r}))},createElement:function(e){var t=new ee;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new I,(t.attributes=new D)._ownerElement=t,t},createDocumentFragment:function(){var e=new ce;return e.ownerDocument=this,e.childNodes=new I,e},createTextNode:function(e){var t=new re;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ie;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new ae;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new de;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new te;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new le;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new ee,r=t.split(":"),i=n.attributes=new D;return n.childNodes=new I,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new te,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},c(F,j),ee.prototype={nodeType:h,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===w?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,V(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new P(this,(function(t){var n=[];return q(t,(function(r){r===t||r.nodeType!=h||"*"!==e&&r.tagName!=e||n.push(r)})),n}))},getElementsByTagNameNS:function(e,t){return new P(this,(function(n){var r=[];return q(n,(function(i){i===n||i.nodeType!==h||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)})),r}))}},F.prototype.getElementsByTagName=ee.prototype.getElementsByTagName,F.prototype.getElementsByTagNameNS=ee.prototype.getElementsByTagNameNS,c(ee,j),te.prototype.nodeType=p,c(te,j),ne.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(k[C])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},c(ne,j),re.prototype={nodeName:"#text",nodeType:f,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},c(re,ne),ie.prototype={nodeName:"#comment",nodeType:_},c(ie,ne),ae.prototype={nodeName:"#cdata-section",nodeType:m},c(ae,ne),se.prototype.nodeType=T,c(se,j),oe.prototype.nodeType=S,c(oe,j),ue.prototype.nodeType=y,c(ue,j),le.prototype.nodeType=g,c(le,j),ce.prototype.nodeName="#document-fragment",ce.prototype.nodeType=w,c(ce,j),de.prototype.nodeType=v,c(de,j),he.prototype.serializeToString=function(e,t,n){return pe.call(e,t,n)},j.prototype.toString=pe;try{if(Object.defineProperty){Object.defineProperty(P.prototype,"length",{get:function(){return L(this),this.$$length}}),Object.defineProperty(j.prototype,"textContent",{get:function(){return function e(t){switch(t.nodeType){case h:case w:var n=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&n.push(e(t)),t=t.nextSibling;return n.join("");default:return t.nodeValue}}(this)},set:function(e){switch(this.nodeType){case h:case w:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),ye=function(e,t,n){e["$$"+t]=n}}}catch(e){}t.DocumentType=se,t.DOMException=O,t.DOMImplementation=U,t.Element=ee,t.Node=j,t.NodeList=I,t.XMLSerializer=he},"5oMp":function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},"6NT9":function(e,t){window.getStarted=function(){hideTranscriptButton(),resizePlayers(document.querySelector("#cta")),document.querySelector(".vsl-container").classList.remove("full-height");var e=new Event("wheel");window.dispatchEvent(e)}},"6PXS":function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return h}));var r=n("mrSG"),i=n("vFt6"),a=n("9AQC"),s=n("wCA9"),o=n("pRiV");n("+924");function u(e){if(Object(a.b)(e)){var t=e,n={message:t.message,name:t.name,stack:t.stack};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}if(Object(a.c)(e)){var s=e,o={};o.type=s.type;try{o.target=Object(a.a)(s.target)?Object(i.a)(s.target):Object.prototype.toString.call(s.target)}catch(e){o.target=""}try{o.currentTarget=Object(a.a)(s.currentTarget)?Object(i.a)(s.currentTarget):Object.prototype.toString.call(s.currentTarget)}catch(e){o.currentTarget=""}for(var r in"undefined"!=typeof CustomEvent&&Object(a.d)(e,CustomEvent)&&(o.detail=s.detail),s)Object.prototype.hasOwnProperty.call(s,r)&&(o[r]=s);return o}return e}function l(t,n){return"domain"===n&&t&&"object"==typeof t&&t._events?"[Domain]":"domainEmitter"===n?"[DomainEmitter]":void 0!==e&&t===e?"[Global]":"undefined"!=typeof window&&t===window?"[Window]":"undefined"!=typeof document&&t===document?"[Document]":Object(a.i)(t)?"[SyntheticEvent]":"number"==typeof t&&t!=t?"[NaN]":void 0===t?"[undefined]":"function"==typeof t?"[Function: "+Object(o.a)(t)+"]":"symbol"==typeof t?"["+String(t)+"]":"bigint"==typeof t?"[BigInt: "+String(t)+"]":t}function c(e,t,n,r){if(void 0===n&&(n=1/0),void 0===r&&(r=new s.a),0===n)return function(e){var t=Object.prototype.toString.call(e);if("string"==typeof e)return e;if("[object Object]"===t)return"[Object]";if("[object Array]"===t)return"[Array]";var n=l(e);return Object(a.f)(n)?n:t}(t);if(null!=t&&"function"==typeof t.toJSON)return t.toJSON();var i=l(t,e);if(Object(a.f)(i))return i;var o=u(t),d=Array.isArray(t)?[]:{};if(r.memoize(t))return"[Circular ~]";for(var h in o)Object.prototype.hasOwnProperty.call(o,h)&&(d[h]=c(h,o[h],n-1,r));return r.unmemoize(t),d}function d(e,t){try{return JSON.parse(JSON.stringify(e,(function(e,n){return c(e,n,t)})))}catch(e){return"**non-serializable**"}}function h(e){var t,n;if(Object(a.e)(e)){var i=e,s={};try{for(var o=Object(r.c)(Object.keys(i)),u=o.next();!u.done;u=o.next()){var l=u.value;void 0!==i[l]&&(s[l]=h(i[l]))}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return s}return Array.isArray(e)?e.map(h):e}}).call(this,n("yLpj"))},"7MRW":function(e,t){!function(){if("performance"in window==0&&(window.performance={}),Date.now=Date.now||function(){return(new Date).getTime()},"now"in window.performance==0){var e=Date.now();performance.timing&&performance.timing.navigationStart&&(e=performance.timing.navigationStart),window.performance.now=function(){return Date.now()-e}}}()},"7W2i":function(e,t,n){var r=n("SksO");e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},"7zRj":function(e,t,n){(function(t){var r,i=void 0!==t?t:"undefined"!=typeof window?window:{},a=n(1);"undefined"!=typeof document?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"])||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=a),e.exports=r}).call(this,n("yLpj"))},"8OJ3":function(e,t,n){"use strict";n.r(t),function(e){for(var r,i=n("vgmO"),a=n.n(i),s=n("7zRj"),o=n.n(s),u=n("pVnL"),l=n.n(u),c=n("3zPy"),d=n.n(c),h=n("PJYZ"),p=n.n(h),f=n("VbXa"),m=n.n(f),g=n("jBAH"),y=n.n(g),v=n("NgPB"),_=n.n(v),b=n("K4wu"),T=n.n(b),w=n("sXyB"),S=n.n(w),E=n("7W2i"),k=n.n(E),C=n("Y+wj"),x=n("10ky"),A=n("F6NX"),O=n("i1Oy"),I=n("3mbX"),P=n("hIRe"),L=n("gcCN"),D=n.n(L),R=n("Mh8q"),N=n("+Kib"),M=n("NsZL"),U=n("oShl"),j=n.n(U),B={},q=function(e,t){return B[e]=B[e]||[],t&&(B[e]=B[e].concat(t)),B[e]},F=function(e,t){var n=q(e).indexOf(t);return!(n<=-1)&&(B[e]=B[e].slice(),B[e].splice(n,1),!0)},H={prefixed:!0},V=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],W=V[0],z=0;z0?u:0)}if(a.a.console){var l=a.a.console[n];l||"debug"!==n||(l=a.a.console.info||a.a.console.log),l&&s&&o.test(n)&&l[Array.isArray(i)?"apply":"call"](a.a.console,i)}}}(t,i),i.createLogger=function(n){return e(t+": "+n)},i.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},i.level=function(e){if("string"==typeof e){if(!i.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');r=e}return r},(i.history=function(){return X?[].concat(X):[]}).filter=function(e){return(X||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))},i.history.clear=function(){X&&(X.length=0)},i.history.disable=function(){null!==X&&(X.length=0,X=null)},i.history.enable=function(){null===X&&(X=[])},i.error=function(){for(var e=arguments.length,t=new Array(e),i=0;i1?t-1:0),r=1;r=0)throw new Error("class has illegal whitespace characters")}function xe(){return o.a===a.a.document}function Ae(e){return ee(e)&&1===e.nodeType}function Oe(){try{return a.a.parent!==a.a.self}catch(e){return!0}}function Ie(e){return function(t,n){if(!ke(t))return o.a[e](null);ke(n)&&(n=o.a.querySelector(n));var r=Ae(n)?n:o.a;return r[e]&&r[e](t)}}function Pe(e,t,n,r){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={});var i=o.a.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var n=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(Y.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+e+" to "+n+"."),i.setAttribute(e,n)):"textContent"===e?Le(i,n):i[e]===n&&"tabIndex"!==e||(i[e]=n)})),Object.getOwnPropertyNames(n).forEach((function(e){i.setAttribute(e,n[e])})),r&&Qe(i,r),i}function Le(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function De(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function Re(e,t){return Ce(t),e.classList?e.classList.contains(t):(n=t,new RegExp("(^|\\s)"+n+"($|\\s)")).test(e.className);var n}function Ne(e,t){return e.classList?e.classList.add(t):Re(e,t)||(e.className=(e.className+" "+t).trim()),e}function Me(e,t){return e?(e.classList?e.classList.remove(t):(Ce(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e):(Y.warn("removeClass was called with an element that doesn't exist"),null)}function Ue(e,t,n){var r=Re(e,t);if("function"==typeof n&&(n=n(e,t)),"boolean"!=typeof n&&(n=!r),n!==r)return n?Ne(e,t):Me(e,t),e}function je(e,t){Object.getOwnPropertyNames(t).forEach((function(n){var r=t[n];null==r||!1===r?e.removeAttribute(n):e.setAttribute(n,!0===r?"":r)}))}function Be(e){var t={},n=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&e.attributes.length>0)for(var r=e.attributes,i=r.length-1;i>=0;i--){var a=r[i].name,s=r[i].value;"boolean"!=typeof e[a]&&-1===n.indexOf(","+a+",")||(s=null!==s),t[a]=s}return t}function qe(e,t){return e.getAttribute(t)}function Fe(e,t,n){e.setAttribute(t,n)}function He(e,t){e.removeAttribute(t)}function Ve(){o.a.body.focus(),o.a.onselectstart=function(){return!1}}function We(){o.a.onselectstart=function(){return!0}}function ze(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach((function(e){void 0!==t[e]&&(n[e]=t[e])})),n.height||(n.height=parseFloat(ne(e,"height"))),n.width||(n.width=parseFloat(ne(e,"width"))),n}}function Ge(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};for(var t=e.offsetWidth,n=e.offsetHeight,r=0,i=0;e.offsetParent&&e!==o.a[H.fullscreenElement];)r+=e.offsetLeft,i+=e.offsetTop,e=e.offsetParent;return{left:r,top:i,width:t,height:n}}function Xe(e,t){var n={x:0,y:0};if(we)for(var r=e;r&&"html"!==r.nodeName.toLowerCase();){var i=ne(r,"transform");if(/^matrix/.test(i)){var a=i.slice(7,-1).split(/,\s/).map(Number);n.x+=a[4],n.y+=a[5]}else if(/^matrix3d/.test(i)){var s=i.slice(9,-1).split(/,\s/).map(Number);n.x+=s[12],n.y+=s[13]}r=r.parentNode}var o={},u=Ge(t.target),l=Ge(e),c=l.width,d=l.height,h=t.offsetY-(l.top-u.top),p=t.offsetX-(l.left-u.left);return t.changedTouches&&(p=t.changedTouches[0].pageX-l.left,h=t.changedTouches[0].pageY+l.top,we&&(p-=n.x,h-=n.y)),o.y=1-Math.max(0,Math.min(1,h/d)),o.x=Math.max(0,Math.min(1,p/c)),o}function Ye(e){return ee(e)&&3===e.nodeType}function Ke(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function $e(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"==typeof e&&(e=e()),Ae(e)||Ye(e)?e:"string"==typeof e&&/\S/.test(e)?o.a.createTextNode(e):void 0})).filter((function(e){return e}))}function Qe(e,t){return $e(t).forEach((function(t){return e.appendChild(t)})),e}function Je(e,t){return Qe(Ke(e),t)}function Ze(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||("mouseup"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons))}var et,tt=Ie("querySelector"),nt=Ie("querySelectorAll"),rt=Object.freeze({__proto__:null,isReal:xe,isEl:Ae,isInFrame:Oe,createEl:Pe,textContent:Le,prependTo:De,hasClass:Re,addClass:Ne,removeClass:Me,toggleClass:Ue,setAttributes:je,getAttributes:Be,getAttribute:qe,setAttribute:Fe,removeAttribute:He,blockTextSelection:Ve,unblockTextSelection:We,getBoundingClientRect:ze,findPosition:Ge,getPointerPosition:Xe,isTextNode:Ye,emptyEl:Ke,normalizeContent:$e,appendContent:Qe,insertContent:Je,isSingleLeftClick:Ze,$:tt,$$:nt}),it=!1,at=function(){if(!1!==et.options.autoSetup){var e=Array.prototype.slice.call(o.a.getElementsByTagName("video")),t=Array.prototype.slice.call(o.a.getElementsByTagName("audio")),n=Array.prototype.slice.call(o.a.getElementsByTagName("video-js")),r=e.concat(t,n);if(r&&r.length>0)for(var i=0,a=r.length;i-1&&(i={passive:!0}),e.addEventListener(t,r.dispatcher,i)}else e.attachEvent&&e.attachEvent("on"+t,r.dispatcher)}function bt(e,t,n){if(ft.has(e)){var r=ft.get(e);if(r.handlers){if(Array.isArray(t))return gt(bt,e,t,n);var i=function(e,t){r.handlers[t]=[],mt(e,t)};if(void 0!==t){var a=r.handlers[t];if(a)if(n){if(n.guid)for(var s=0;s=t&&(e.apply(void 0,arguments),n=r)}},At=function(){};At.prototype.allowedEvents_={},At.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},_t(this,e,t),this.addEventListener=n},At.prototype.addEventListener=At.prototype.on,At.prototype.off=function(e,t){bt(this,e,t)},At.prototype.removeEventListener=At.prototype.off,At.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},wt(this,e,t),this.addEventListener=n},At.prototype.any=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},St(this,e,t),this.addEventListener=n},At.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=yt(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),Tt(this,e)},At.prototype.dispatchEvent=At.prototype.trigger,At.prototype.queueTrigger=function(e){var t=this;Et||(Et=new Map);var n=e.type||e,r=Et.get(this);r||(r=new Map,Et.set(this,r));var i=r.get(n);r.delete(n),a.a.clearTimeout(i);var s=a.a.setTimeout((function(){r.delete(n),0===r.size&&(r=null,Et.delete(t)),t.trigger(e)}),0);r.set(n,s)};var Ot=function(e){return"function"==typeof e.name?e.name():"string"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e},It=function(e){return e instanceof At||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"==typeof e[t]}))},Pt=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},Lt=function(e,t,n){if(!e||!e.nodeName&&!It(e))throw new Error("Invalid target for "+Ot(t)+"#"+n+"; must be a DOM node or evented object.")},Dt=function(e,t,n){if(!Pt(e))throw new Error("Invalid event type for "+Ot(t)+"#"+n+"; must be a non-empty string or array.")},Rt=function(e,t,n){if("function"!=typeof e)throw new Error("Invalid listener for "+Ot(t)+"#"+n+"; must be a function.")},Nt=function(e,t,n){var r,i,a,s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return s?(r=e.eventBusEl_,t.length>=3&&t.shift(),i=t[0],a=t[1]):(r=t[0],i=t[1],a=t[2]),Lt(r,e,n),Dt(i,e,n),Rt(a,e,n),{isTargetingSelf:s,target:r,type:i,listener:a=Ct(e,a)}},Mt=function(e,t,n,r){Lt(e,e,t),e.nodeName?kt[t](e,n,r):e[t](n,r)},Ut={on:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r=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}},t.isDisposed=function(){return Boolean(this.isDisposed_)},t.player=function(){return this.player_},t.options=function(e){return e?(this.options_=Vt(this.options_,e),this.options_):this.options_},t.el=function(){return this.el_},t.createEl=function(e,t,n){return Pe(e,t,n)},t.localize=function(e,t,n){void 0===n&&(n=e);var r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),a=i&&i[r],s=r&&r.split("-")[0],o=i&&i[s],u=n;return a&&a[e]?u=a[e]:o&&o[e]&&(u=o[e]),t&&(u=u.replace(/\{(\d+)\}/g,(function(e,n){var r=t[n-1],i=r;return void 0===r&&(i=e),i}))),u},t.handleLanguagechange=function(){},t.contentEl=function(){return this.contentEl_||this.el_},t.id=function(){return this.id_},t.name=function(){return this.name_},t.children=function(){return this.children_},t.getChildById=function(e){return this.childIndex_[e]},t.getChild=function(e){if(e)return this.childNameIndex_[e]},t.getDescendant=function(){for(var e=arguments.length,t=new Array(e),n=0;n=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[Ht(e.name())]=null,this.childNameIndex_[Ft(e.name())]=null;var r=e.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},t.initChildren=function(){var t=this,n=this.options_.children;if(n){var r,i=this.options_,a=e.getComponent("Tech");(r=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter((function(e){return!r.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((function(e){var r,i;return"string"==typeof e?i=n[r=e]||t.options_[r]||{}:(r=e.name,i=e),{name:r,opts:i}})).filter((function(t){var n=e.getComponent(t.opts.componentClass||Ht(t.name));return n&&!a.isTech(n)})).forEach((function(e){var n=e.name,r=e.opts;if(void 0!==i[n]&&(r=i[n]),!1!==r){!0===r&&(r={}),r.playerOptions=t.options_.playerOptions;var a=t.addChild(n,r);a&&(t[n]=a)}}))}},t.buildCSSClass=function(){return""},t.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},t.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)},t.$=function(e,t){return tt(e,t||this.contentEl())},t.$$=function(e,t){return nt(e,t||this.contentEl())},t.hasClass=function(e){return Re(this.el_,e)},t.addClass=function(e){Ne(this.el_,e)},t.removeClass=function(e){Me(this.el_,e)},t.toggleClass=function(e,t){Ue(this.el_,e,t)},t.show=function(){this.removeClass("vjs-hidden")},t.hide=function(){this.addClass("vjs-hidden")},t.lockShowing=function(){this.addClass("vjs-lock-showing")},t.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.getAttribute=function(e){return qe(this.el_,e)},t.setAttribute=function(e,t){Fe(this.el_,e,t)},t.removeAttribute=function(e){He(this.el_,e)},t.width=function(e,t){return this.dimension("width",e,t)},t.height=function(e,t){return this.dimension("height",e,t)},t.dimensions=function(e,t){this.width(e,!0),this.height(t)},t.dimension=function(e,t,n){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[e],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+Ht(e)],10)},t.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=ne(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var n="offset"+Ht(e);t=this.el_[n]}return t},t.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.currentWidth=function(){return this.currentDimension("width")},t.currentHeight=function(){return this.currentDimension("height")},t.focus=function(){this.el_.focus()},t.blur=function(){this.el_.blur()},t.handleKeyDown=function(e){this.player_&&(d.a.isEventKey(e,"Tab")||e.stopPropagation(),this.player_.handleKeyDown(e))},t.handleKeyPress=function(e){this.handleKeyDown(e)},t.emitTapEvents=function(){var e,t=0,n=null;this.on("touchstart",(function(r){1===r.touches.length&&(n={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},t=a.a.performance.now(),e=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)e=!1;else if(n){var r=t.touches[0].pageX-n.pageX,i=t.touches[0].pageY-n.pageY;Math.sqrt(r*r+i*i)>10&&(e=!1)}}));var r=function(){e=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",(function(r){(n=null,!0===e)&&(a.a.performance.now()-t<200&&(r.preventDefault(),this.trigger("tap")))}))},t.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=Ct(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){t(),this.clearInterval(e),e=this.setInterval(t,250)}));var n=function(n){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",n),this.on("touchcancel",n)}},t.setTimeout=function(e,t){var n,r=this;return e=Ct(this,e),this.clearTimersOnDispose_(),n=a.a.setTimeout((function(){r.setTimeoutIds_.has(n)&&r.setTimeoutIds_.delete(n),e()}),t),this.setTimeoutIds_.add(n),n},t.clearTimeout=function(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),a.a.clearTimeout(e)),e},t.setInterval=function(e,t){e=Ct(this,e),this.clearTimersOnDispose_();var n=a.a.setInterval(e,t);return this.setIntervalIds_.add(n),n},t.clearInterval=function(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),a.a.clearInterval(e)),e},t.requestAnimationFrame=function(e){var t,n=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),e=Ct(this,e),t=a.a.requestAnimationFrame((function(){n.rafIds_.has(t)&&n.rafIds_.delete(t),e()})),this.rafIds_.add(t),t):this.setTimeout(e,1e3/60)},t.requestNamedAnimationFrame=function(e,t){var n=this;if(!this.namedRafs_.has(e)){this.clearTimersOnDispose_(),t=Ct(this,t);var r=this.requestAnimationFrame((function(){t(),n.namedRafs_.has(e)&&n.namedRafs_.delete(e)}));return this.namedRafs_.set(e,r),e}},t.cancelNamedAnimationFrame=function(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))},t.cancelAnimationFrame=function(e){return this.supportsRaf_?(this.rafIds_.has(e)&&(this.rafIds_.delete(e),a.a.cancelAnimationFrame(e)),e):this.clearTimeout(e)},t.clearTimersOnDispose_=function(){var e=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach((function(t){var n=t[0],r=t[1];e[n].forEach((function(t,n){return e[r](n)}))})),e.clearingTimersOnDispose_=!1})))},e.registerComponent=function(t,n){if("string"!=typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var r,i=e.getComponent("Tech"),a=i&&i.isTech(n),s=e===n||e.prototype.isPrototypeOf(n.prototype);if(a||!s)throw r=a?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+t+'"; '+r+".");t=Ht(t),e.components_||(e.components_={});var o=e.getComponent("Player");if("Player"===t&&o&&o.players){var u=o.players,l=Object.keys(u);if(u&&l.length>0&&l.map((function(e){return u[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=n,e.components_[Ft(t)]=n,n},e.getComponent=function(t){if(t&&e.components_)return e.components_[t]},e}();function Kt(e,t,n,r){return function(e,t,n){if("number"!=typeof t||t<0||t>n)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+n+").")}(e,r,n.length-1),n[r][t]}function $t(e){var t;return t=void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:Kt.bind(null,"start",0,e),end:Kt.bind(null,"end",1,e)},a.a.Symbol&&a.a.Symbol.iterator&&(t[a.a.Symbol.iterator]=function(){return(e||[]).values()}),t}function Qt(e,t){return Array.isArray(e)?$t(e):void 0===e||void 0===t?$t():$t([[e,t]])}function Jt(e,t){var n,r,i=0;if(!t)return 0;e&&e.length||(e=Qt(0,0));for(var a=0;at&&(r=t),i+=r-n;return i/t}function Zt(e){if(e instanceof Zt)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:ee(e)&&("number"==typeof e.code&&(this.code=e.code),Z(this,e)),this.message||(this.message=Zt.defaultMessages[this.code]||"")}Yt.prototype.supportsRaf_="function"==typeof a.a.requestAnimationFrame&&"function"==typeof a.a.cancelAnimationFrame,Yt.registerComponent("Component",Yt),Zt.prototype.code=0,Zt.prototype.message="",Zt.prototype.status=null,Zt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Zt.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."};for(var en=0;en=0;r--)if(t[r].enabled){cn(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,n}m()(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.enabled&&cn(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){n.changing_||(n.changing_=!0,cn(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},t}(un),hn=function(e,t){for(var n=0;n=0;r--)if(t[r].selected){hn(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,Object.defineProperty(p()(n),"selectedIndex",{get:function(){for(var e=0;e0&&(a.a.console&&a.a.console.groupCollapsed&&a.a.console.groupCollapsed("Text Track parsing errors for "+t.src),r.forEach((function(e){return Y.error(e)})),a.a.console&&a.a.console.groupEnd&&a.a.console.groupEnd()),n.flush()},An=function(e,t){var n={uri:e},r=kn(e);r&&(n.cors=r);var i="use-credentials"===t.tech_.crossOrigin();i&&(n.withCredentials=i),_()(n,Ct(this,(function(e,n,r){if(e)return Y.error(e,n);t.loaded_=!0,"function"!=typeof a.a.WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],(function(e){if("vttjserror"!==e.type)return xn(r,t);Y.error("vttjs failed to load, stopping trying to process "+t.src)})):xn(r,t)})))},On=function(e){function t(t){var n;if(void 0===t&&(t={}),!t.tech)throw new Error("A tech was not provided.");var r=Vt(t,{kind:_n[t.kind]||"subtitles",language:t.language||t.srclang||""}),i=bn[r.mode]||"disabled",a=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(i="hidden"),(n=e.call(this,r)||this).tech_=r.tech,n.cues_=[],n.activeCues_=[],n.preload_=!1!==n.tech_.preloadTextTracks;var s=new gn(n.cues_),o=new gn(n.activeCues_),u=!1;n.timeupdateHandler=Ct(p()(n),(function(e){void 0===e&&(e={}),this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,u&&(this.trigger("cuechange"),u=!1),"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))}));return n.tech_.one("dispose",(function(){n.stopTracking()})),"disabled"!==i&&n.startTracking(),Object.defineProperties(p()(n),{default:{get:function(){return a},set:function(){}},mode:{get:function(){return i},set:function(e){bn[e]&&i!==e&&(i=e,this.preload_||"disabled"===i||0!==this.cues.length||An(this.src,this),this.stopTracking(),"disabled"!==i&&this.startTracking(),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?s:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return o;for(var e=this.tech_.currentTime(),t=[],n=0,r=this.cues.length;n=e||i.startTime===i.endTime&&i.startTime<=e&&i.startTime+.5>=e)&&t.push(i)}if(u=!1,t.length!==this.activeCues_.length)u=!0;else for(var a=0;a0)return void this.trigger("vttjsloaded");var t=o.a.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",(function(){t.onload=null,t.onerror=null})),a.a.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},n.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),r=function(e){return t.addTrack(e.track)},i=function(e){return t.removeTrack(e.track)};n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();var a=function(){return e.trigger("texttrackchange")},s=function(){a();for(var e=0;e=0;i--){var a=e[i];a[t]&&a[t](r,n)}}(e,n,o,s),o}var Hn={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},Vn={setCurrentTime:1,setMuted:1,setVolume:1},Wn={play:1,pause:1};function zn(e){return function(t,n){return t===Bn?Bn:n[e]?n[e](t):t}}var Gn={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},Xn=function(e){void 0===e&&(e="");var t=En(e);return Gn[t.toLowerCase()]||""};function Yn(e){if(!e.type){var t=Xn(e.src);t&&(e.type=t)}return e}var Kn=function(e){function t(t,n,r){var i,a=Vt({createEl:!1},n);if(i=e.call(this,t,a,r)||this,n.playerOptions.sources&&0!==n.playerOptions.sources.length)t.src(n.playerOptions.sources);else for(var s=0,o=n.playerOptions.techOrder;s0;!this.player_.tech(!0)||(ge||pe)&&t||this.player_.tech(!0).focus(),this.player_.paused()?nn(this.player_.play()):this.player_.pause()}},t}($n);Yt.registerComponent("PosterImage",Qn);var Jn={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 Zn(e,t){var n;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function er(e,t,n){try{e.style[t]=n}catch(e){return}}var tr=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var s=function(e){return i.updateDisplay(e)};return t.on("loadstart",(function(e){return i.toggleDisplay(e)})),t.on("texttrackchange",s),t.on("loadedmetadata",(function(e){return i.preselectTrack(e)})),t.ready(Ct(p()(i),(function(){if(t.tech_&&t.tech_.featuresNativeTextTracks)this.hide();else{t.on("fullscreenchange",s),t.on("playerresize",s),a.a.addEventListener("orientationchange",s),t.on("dispose",(function(){return a.a.removeEventListener("orientationchange",s)}));for(var e=this.options_.playerOptions.tracks||[],n=0;n0;return nn(t),void(!this.player_.tech(!0)||(ge||pe)&&n||this.player_.tech(!0).focus())}var r=this.player_.getChild("controlBar"),i=r&&r.getChild("playToggle");if(i){var a=function(){return i.focus()};tn(t)?t.then(a,(function(){})):this.setTimeout(a,1)}else this.player_.tech(!0).focus()},n.handleKeyDown=function(t){this.mouseused_=!1,e.prototype.handleKeyDown.call(this,t)},n.handleMouseDown=function(e){this.mouseused_=!0},t}(rr);ir.prototype.controlText_="Play Video",Yt.registerComponent("BigPlayButton",ir);var ar=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).controlText(n&&n.controlText||r.localize("Close")),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},n.handleKeyDown=function(t){d.a.isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(rr);Yt.registerComponent("CloseButton",ar);var sr=function(e){function t(t,n){var r;return void 0===n&&(n={}),r=e.call(this,t,n)||this,n.replay=void 0===n.replay||n.replay,r.on(t,"play",(function(e){return r.handlePlay(e)})),r.on(t,"pause",(function(e){return r.handlePause(e)})),n.replay&&r.on(t,"ended",(function(e){return r.handleEnded(e)})),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.player_.paused()?nn(this.player_.play()):this.player_.pause()},n.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},n.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},n.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},n.handleEnded=function(e){var t=this;this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",(function(e){return t.handleSeeked(e)}))},t}(rr);sr.prototype.controlText_="Play",Yt.registerComponent("PlayToggle",sr);var or=function(e,t){e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),a=Math.floor(t/60%60),s=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||s>0?i+":":"")+(r=((i||a>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)},ur=or;function lr(e,t){return void 0===t&&(t=e),ur(e,t)}var cr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,["timeupdate","ended"],(function(e){return r.updateContent(e)})),r.updateTextNode_(),r}m()(t,e);var n=t.prototype;return n.createEl=function(){var t=this.buildCSSClass(),n=e.prototype.createEl.call(this,"div",{className:t+" vjs-time-control vjs-control"}),r=Pe("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+" "},{role:"presentation"});return n.appendChild(r),this.contentEl_=Pe("span",{className:t+"-display"},{"aria-live":"off",role:"presentation"}),n.appendChild(this.contentEl_),n},n.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},n.updateTextNode_=function(e){var t=this;void 0===e&&(e=0),e=lr(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",(function(){if(t.contentEl_){var e=t.textNode_;e&&t.contentEl_.firstChild!==e&&(e=null,Y.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),t.textNode_=o.a.createTextNode(t.formattedTime_),t.textNode_&&(e?t.contentEl_.replaceChild(t.textNode_,e):t.contentEl_.appendChild(t.textNode_))}})))},n.updateContent=function(e){},t}(Yt);cr.prototype.labelText_="Time",cr.prototype.controlText_="Time",Yt.registerComponent("TimeDisplay",cr);var dr=function(e){function t(){return e.apply(this,arguments)||this}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-current-time"},n.updateContent=function(e){var t;t=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)},t}(cr);dr.prototype.labelText_="Current Time",dr.prototype.controlText_="Current Time",Yt.registerComponent("CurrentTimeDisplay",dr);var hr=function(e){function t(t,n){var r,i=function(e){return r.updateContent(e)};return(r=e.call(this,t,n)||this).on(t,"durationchange",i),r.on(t,"loadstart",i),r.on(t,"loadedmetadata",i),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-duration"},n.updateContent=function(e){var t=this.player_.duration();this.updateTextNode_(t)},t}(cr);hr.prototype.labelText_="Duration",hr.prototype.controlText_="Duration",Yt.registerComponent("DurationDisplay",hr);var pr=function(e){function t(){return e.apply(this,arguments)||this}return m()(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),n=e.prototype.createEl.call(this,"div"),r=e.prototype.createEl.call(this,"span",{textContent:"/"});return n.appendChild(r),t.appendChild(n),t},t}(Yt);Yt.registerComponent("TimeDivider",pr);var fr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"durationchange",(function(e){return r.updateContent(e)})),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-remaining-time"},n.createEl=function(){var t=e.prototype.createEl.call(this);return!1!==this.options_.displayNegative&&t.insertBefore(Pe("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t},n.updateContent=function(e){var t;"number"==typeof this.player_.duration()&&(t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t))},t}(cr);fr.prototype.labelText_="Remaining Time",fr.prototype.controlText_="Remaining Time",Yt.registerComponent("RemainingTimeDisplay",fr);var mr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateShowing(),r.on(r.player(),"durationchange",(function(e){return r.updateShowing(e)})),r}m()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Pe("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Pe("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+" "})),this.contentEl_.appendChild(o.a.createTextNode(this.localize("LIVE"))),t.appendChild(this.contentEl_),t},n.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},n.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(Yt);Yt.registerComponent("LiveDisplay",mr);var gr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateLiveEdgeStatus(),r.player_.liveTracker&&(r.updateLiveEdgeStatusHandler_=function(e){return r.updateLiveEdgeStatus(e)},r.on(r.player_.liveTracker,"liveedgechange",r.updateLiveEdgeStatusHandler_)),r}m()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=Pe("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),t.appendChild(this.textEl_),t},n.updateLiveEdgeStatus=function(){!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"))},n.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},n.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,e.prototype.dispose.call(this)},t}(rr);gr.prototype.controlText_="Seek to live, currently playing live",Yt.registerComponent("SeekToLive",gr);var yr=function(e,t,n){return e=Number(e),Math.min(n,Math.max(t,isNaN(e)?t:e))},vr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseDown_=function(e){return r.handleMouseDown(e)},r.handleMouseUp_=function(e){return r.handleMouseUp(e)},r.handleKeyDown_=function(e){return r.handleKeyDown(e)},r.handleClick_=function(e){return r.handleClick(e)},r.handleMouseMove_=function(e){return r.handleMouseMove(e)},r.update_=function(e){return r.update(e)},r.bar=r.getChild(r.options_.barName),r.vertical(!!r.options_.vertical),r.enable(),r}m()(t,e);var n=t.prototype;return n.enabled=function(){return this.enabled_},n.enable=function(){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)},n.disable=function(){if(this.enabled()){var 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}},n.createEl=function(t,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),n.className=n.className+" vjs-slider",n=Z({tabIndex:0},n),r=Z({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),e.prototype.createEl.call(this,t,n,r)},n.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||fe||e.preventDefault(),Ve(),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)},n.handleMouseMove=function(e){},n.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;We(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),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.update()},n.update=function(){var e=this;if(this.el_&&this.bar){var t=this.getProgress();return t===this.progress_||(this.progress_=t,this.requestNamedAnimationFrame("Slider#update",(function(){var n=e.vertical()?"height":"width";e.bar.el().style[n]=(100*t).toFixed(2)+"%"}))),t}},n.getProgress=function(){return Number(yr(this.getPercent(),0,1).toFixed(4))},n.calculateDistance=function(e){var t=Xe(this.el_,e);return this.vertical()?t.y:t.x},n.handleKeyDown=function(t){d.a.isEventKey(t,"Left")||d.a.isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):d.a.isEventKey(t,"Right")||d.a.isEventKey(t,"Up")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){e.stopPropagation(),e.preventDefault()},n.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(Yt);Yt.registerComponent("Slider",vr);var _r=function(e,t){return yr(e/t*100,0,100).toFixed(2)+"%"},br=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).partEls_=[],r.on(t,"progress",(function(e){return r.update(e)})),r}m()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),n=Pe("span",{className:"vjs-control-text"}),r=Pe("span",{textContent:this.localize("Loaded")}),i=o.a.createTextNode(": ");return this.percentageEl_=Pe("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),t.appendChild(n),n.appendChild(r),n.appendChild(i),n.appendChild(this.percentageEl_),t},n.dispose=function(){this.partEls_=null,this.percentageEl_=null,e.prototype.dispose.call(this)},n.update=function(e){var t=this;this.requestNamedAnimationFrame("LoadProgressBar#update",(function(){var e=t.player_.liveTracker,n=t.player_.buffered(),r=e&&e.isLive()?e.seekableEnd():t.player_.duration(),i=t.player_.bufferedEnd(),a=t.partEls_,s=_r(i,r);t.percent_!==s&&(t.el_.style.width=s,Le(t.percentageEl_,s),t.percent_=s);for(var o=0;on.length;d--)t.el_.removeChild(a[d-1]);a.length=n.length}))},t}(Yt);Yt.registerComponent("LoadProgressBar",br);var Tr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=xt(Ct(p()(r),r.update),30),r}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n){var r=Ge(this.el_),i=ze(this.player_.el()),a=e.width*t;if(i&&r){var s=e.left-i.left+a,o=e.width-a+(i.right-e.right),u=r.width/2;sr.width&&(u=r.width),u=Math.round(u),this.el_.style.right="-"+u+"px",this.write(n)}},n.write=function(e){Le(this.el_,e)},n.updateTime=function(e,t,n,r){var i=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",(function(){var a,s=i.player_.duration();if(i.player_.liveTracker&&i.player_.liveTracker.isLive()){var o=i.player_.liveTracker.liveWindow(),u=o-t*o;a=(u<1?"":"-")+lr(u,o)}else a=lr(n,s);i.update(e,t,a),r&&r()}))},t}(Yt);Yt.registerComponent("TimeTooltip",Tr);var wr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=xt(Ct(p()(r),r.update),30),r}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},n.update=function(e,t){var n=this.getChild("timeTooltip");if(n){var r=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.updateTime(e,t,r)}},t}(Yt);wr.prototype.options_={children:[]},we||le||wr.prototype.options_.children.push("timeTooltip"),Yt.registerComponent("PlayProgressBar",wr);var Sr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=xt(Ct(p()(r),r.update),30),r}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t){var n=this,r=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,r,(function(){n.el_.style.left=e.width*t+"px"}))},t}(Yt);Sr.prototype.options_={children:["timeTooltip"]},Yt.registerComponent("MouseTimeDisplay",Sr);var Er=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).setEventHandlers_(),r}m()(t,e);var n=t.prototype;return n.setEventHandlers_=function(){var e=this;this.update_=Ct(this,this.update),this.update=xt(this.update_,30),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_=function(t){return e.enableInterval_(t)},this.disableIntervalHandler_=function(t){return e.disableInterval_(t)},this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in o.a&&"visibilityState"in o.a&&this.on(o.a,"visibilitychange",this.toggleVisibility_)},n.toggleVisibility_=function(e){"hidden"===o.a.visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())},n.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30))},n.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},n.update=function(t){var n=this;if("hidden"!==o.a.visibilityState){var r=e.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",(function(){var e=n.player_.ended()?n.player_.duration():n.getCurrentTime_(),t=n.player_.liveTracker,i=n.player_.duration();t&&t.isLive()&&(i=n.player_.liveTracker.liveCurrentTime()),n.percent_!==r&&(n.el_.setAttribute("aria-valuenow",(100*r).toFixed(2)),n.percent_=r),n.currentTime_===e&&n.duration_===i||(n.el_.setAttribute("aria-valuetext",n.localize("progress bar timing: currentTime={1} duration={2}",[lr(e,i),lr(i,i)],"{1} of {2}")),n.currentTime_=e,n.duration_=i),n.bar&&n.bar.update(ze(n.el()),n.getProgress())})),r}},n.userSeek_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)},n.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},n.getPercent=function(){var e,t=this.getCurrentTime_(),n=this.player_.liveTracker;return n&&n.isLive()?(e=(t-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e},n.handleMouseDown=function(t){Ze(t)&&(t.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},n.handleMouseMove=function(e,t){if(void 0===t&&(t=!1),Ze(e)){var n;t||this.player_.scrubbing()||this.player_.scrubbing(!0);var r=this.calculateDistance(e),i=this.player_.liveTracker;if(i&&i.isLive()){if(r>=.99)return void i.seekToLiveEdge();var a=i.seekableStart(),s=i.liveCurrentTime();if((n=a+r*i.liveWindow())>=s&&(n=s),n<=a&&(n=a+.1),n===1/0)return}else(n=r*this.player_.duration())===this.player_.duration()&&(n-=.1);this.userSeek_(n)}},n.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},n.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},n.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?nn(this.player_.play()):this.update_()},n.stepForward=function(){this.userSeek_(this.player_.currentTime()+5)},n.stepBack=function(){this.userSeek_(this.player_.currentTime()-5)},n.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},n.handleKeyDown=function(t){var n=this.player_.liveTracker;if(d.a.isEventKey(t,"Space")||d.a.isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(d.a.isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.userSeek_(0);else if(d.a.isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),n&&n.isLive()?this.userSeek_(n.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(d()(t))){t.preventDefault(),t.stopPropagation();var r=10*(d.a.codes[d()(t)]-d.a.codes[0])/100;n&&n.isLive()?this.userSeek_(n.seekableStart()+n.liveWindow()*r):this.userSeek_(this.player_.duration()*r)}else d.a.isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):d.a.isEventKey(t,"PgUp")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()+60)):e.prototype.handleKeyDown.call(this,t)},n.dispose=function(){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 o.a&&"visibilityState"in o.a&&this.off(o.a,"visibilitychange",this.toggleVisibility_),e.prototype.dispose.call(this)},t}(vr);Er.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},we||le||Er.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Yt.registerComponent("SeekBar",Er);var kr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseMove=xt(Ct(p()(r),r.handleMouseMove),30),r.throttledHandleMouseSeek=xt(Ct(p()(r),r.handleMouseSeek),30),r.handleMouseUpHandler_=function(e){return r.handleMouseUp(e)},r.handleMouseDownHandler_=function(e){return r.handleMouseDown(e)},r.enable(),r}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},n.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var n=t.getChild("playProgressBar"),r=t.getChild("mouseTimeDisplay");if(n||r){var i=t.el(),a=Ge(i),s=Xe(i,e).x;s=yr(s,0,1),r&&r.update(a,s),n&&n.update(a,t.getProgress())}}},n.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},n.enabled=function(){return this.enabled_},n.disable=function(){if(this.children().forEach((function(e){return 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())){var e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&nn(this.player_.play())}},n.enable=function(){this.children().forEach((function(e){return 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)},n.removeListenersAddedOnMousedownAndTouchstart=function(){var 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_)},n.handleMouseDown=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.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_)},n.handleMouseUp=function(e){var t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()},t}(Yt);kr.prototype.options_={children:["seekBar"]},Yt.registerComponent("ProgressControl",kr);var Cr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,["enterpictureinpicture","leavepictureinpicture"],(function(e){return r.handlePictureInPictureChange(e)})),r.on(t,["disablepictureinpicturechanged","loadedmetadata"],(function(e){return r.handlePictureInPictureEnabledChange(e)})),r.on(t,["loadedmetadata","audioonlymodechange","audiopostermodechange"],(function(){"audio"===t.currentType().substring(0,5)||t.audioPosterMode()||t.audioOnlyMode()?(t.isInPictureInPicture()&&t.exitPictureInPicture(),r.hide()):r.show()})),r.disable(),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)},n.handlePictureInPictureEnabledChange=function(){o.a.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},n.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},n.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},t}(rr);Cr.prototype.controlText_="Picture-in-Picture",Yt.registerComponent("PictureInPictureToggle",Cr);var xr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"fullscreenchange",(function(e){return r.handleFullscreenChange(e)})),!1===o.a[t.fsApi_.fullscreenEnabled]&&r.disable(),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},n.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},n.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(rr);xr.prototype.controlText_="Fullscreen",Yt.registerComponent("FullscreenToggle",xr);var Ar=function(e){function t(){return e.apply(this,arguments)||this}return m()(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-volume-level"});return t.appendChild(e.prototype.createEl.call(this,"span",{className:"vjs-control-text"})),t},t}(Yt);Yt.registerComponent("VolumeLevel",Ar);var Or=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=xt(Ct(p()(r),r.update),30),r}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n,r){if(!n){var i=ze(this.el_),a=ze(this.player_.el()),s=e.width*t;if(!a||!i)return;var o=e.left-a.left+s,u=e.width-s+(a.right-e.right),l=i.width/2;oi.width&&(l=i.width),this.el_.style.right="-"+l+"px"}this.write(r+"%")},n.write=function(e){Le(this.el_,e)},n.updateVolume=function(e,t,n,r,i){var a=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",(function(){a.update(e,t,n,r.toFixed(0)),i&&i()}))},t}(Yt);Yt.registerComponent("VolumeLevelTooltip",Or);var Ir=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=xt(Ct(p()(r),r.update),30),r}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t,n){var r=this,i=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,n,i,(function(){n?r.el_.style.bottom=e.height*t+"px":r.el_.style.left=e.width*t+"px"}))},t}(Yt);Ir.prototype.options_={children:["volumeLevelTooltip"]},Yt.registerComponent("MouseVolumeLevelDisplay",Ir);var Pr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on("slideractive",(function(e){return r.updateLastVolume_(e)})),r.on(t,"volumechange",(function(e){return r.updateARIAAttributes(e)})),t.ready((function(){return r.updateARIAAttributes()})),r}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},n.handleMouseDown=function(t){Ze(t)&&e.prototype.handleMouseDown.call(this,t)},n.handleMouseMove=function(e){var t=this.getChild("mouseVolumeLevelDisplay");if(t){var n=this.el(),r=ze(n),i=this.vertical(),a=Xe(n,e);a=i?a.y:a.x,a=yr(a,0,1),t.update(r,a,i)}Ze(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},n.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},n.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},n.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},n.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},n.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},n.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},n.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",(function(){0===e.player_.volume()&&e.player_.lastVolume_(t)}))},t}(vr);Pr.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},we||le||Pr.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),Pr.prototype.playerEvent="volumechange",Yt.registerComponent("VolumeBar",Pr);var Lr=function(e){function t(t,n){var r;return void 0===n&&(n={}),n.vertical=n.vertical||!1,(void 0===n.volumeBar||te(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),r=e.call(this,t,n)||this,function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(p()(r),t),r.throttledHandleMouseMove=xt(Ct(p()(r),r.handleMouseMove),30),r.handleMouseUpHandler_=function(e){return r.handleMouseUp(e)},r.on("mousedown",(function(e){return r.handleMouseDown(e)})),r.on("touchstart",(function(e){return r.handleMouseDown(e)})),r.on("mousemove",(function(e){return r.handleMouseMove(e)})),r.on(r.volumeBar,["focus","slideractive"],(function(){r.volumeBar.addClass("vjs-slider-active"),r.addClass("vjs-slider-active"),r.trigger("slideractive")})),r.on(r.volumeBar,["blur","sliderinactive"],(function(){r.volumeBar.removeClass("vjs-slider-active"),r.removeClass("vjs-slider-active"),r.trigger("sliderinactive")})),r}m()(t,e);var n=t.prototype;return n.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},n.handleMouseDown=function(e){var 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_)},n.handleMouseUp=function(e){var 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_)},n.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(Yt);Lr.prototype.options_={children:["volumeBar"]},Yt.registerComponent("VolumeControl",Lr);var Dr=function(e){function t(t,n){var r;return r=e.call(this,t,n)||this,function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(p()(r),t),r.on(t,["loadstart","volumechange"],(function(e){return r.update(e)})),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},n.update=function(e){this.updateIcon_(),this.updateControlText_()},n.updateIcon_=function(){var e=this.player_.volume(),t=3;we&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var n=0;n<4;n++)Me(this.el_,"vjs-vol-"+n);Ne(this.el_,"vjs-vol-"+t)},n.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},t}(rr);Dr.prototype.controlText_="Mute",Yt.registerComponent("MuteToggle",Dr);var Rr=function(e){function t(t,n){var r;return void 0===n&&(n={}),void 0!==n.inline?n.inline=n.inline:n.inline=!0,(void 0===n.volumeControl||te(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),(r=e.call(this,t,n)||this).handleKeyPressHandler_=function(e){return r.handleKeyPress(e)},r.on(t,["loadstart"],(function(e){return r.volumePanelState_(e)})),r.on(r.muteToggle,"keyup",(function(e){return r.handleKeyPress(e)})),r.on(r.volumeControl,"keyup",(function(e){return r.handleVolumeControlKeyUp(e)})),r.on("keydown",(function(e){return r.handleKeyPress(e)})),r.on("mouseover",(function(e){return r.handleMouseOver(e)})),r.on("mouseout",(function(e){return r.handleMouseOut(e)})),r.on(r.volumeControl,["slideractive"],r.sliderActive_),r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_),r}m()(t,e);var n=t.prototype;return n.sliderActive_=function(){this.addClass("vjs-slider-active")},n.sliderInactive_=function(){this.removeClass("vjs-slider-active")},n.volumePanelState_=function(){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")},n.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},n.dispose=function(){this.handleMouseOut(),e.prototype.dispose.call(this)},n.handleVolumeControlKeyUp=function(e){d.a.isEventKey(e,"Esc")&&this.muteToggle.focus()},n.handleMouseOver=function(e){this.addClass("vjs-hover"),_t(o.a,"keyup",this.handleKeyPressHandler_)},n.handleMouseOut=function(e){this.removeClass("vjs-hover"),bt(o.a,"keyup",this.handleKeyPressHandler_)},n.handleKeyPress=function(e){d.a.isEventKey(e,"Esc")&&this.handleMouseOut()},t}(Yt);Rr.prototype.options_={children:["muteToggle","volumeControl"]},Yt.registerComponent("VolumePanel",Rr);var Nr=function(e){function t(t,n){var r;return r=e.call(this,t,n)||this,n&&(r.menuButton_=n.menuButton),r.focusedChild_=-1,r.on("keydown",(function(e){return r.handleKeyDown(e)})),r.boundHandleBlur_=function(e){return r.handleBlur(e)},r.boundHandleTapClick_=function(e){return r.handleTapClick(e)},r}m()(t,e);var n=t.prototype;return n.addEventListenerForItem=function(e){e instanceof Yt&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},n.removeEventListenerForItem=function(e){e instanceof Yt&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},n.removeChild=function(t){"string"==typeof t&&(t=this.getChild(t)),this.removeEventListenerForItem(t),e.prototype.removeChild.call(this,t)},n.addItem=function(e){var t=this.addChild(e);t&&this.addEventListenerForItem(t)},n.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=Pe(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),_t(n,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),n},n.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,e.prototype.dispose.call(this)},n.handleBlur=function(e){var t=e.relatedTarget||o.a.activeElement;if(!this.children().some((function(e){return e.el()===t}))){var n=this.menuButton_;n&&n.buttonPressed_&&t!==n.el().firstChild&&n.unpressButton()}},n.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();var t=this.children();if(!Array.isArray(t))return;var n=t.filter((function(t){return t.el()===e.target}))[0];if(!n)return;"CaptionSettingsMenuItem"!==n.name()&&this.menuButton_.focus()}},n.handleKeyDown=function(e){d.a.isEventKey(e,"Left")||d.a.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(d.a.isEventKey(e,"Right")||d.a.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},n.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},n.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},n.focus=function(e){void 0===e&&(e=0);var 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())},t}(Yt);Yt.registerComponent("Menu",Nr);var Mr=function(e){function t(t,n){var r;void 0===n&&(n={}),(r=e.call(this,t,n)||this).menuButton_=new rr(t,n),r.menuButton_.controlText(r.controlText_),r.menuButton_.el_.setAttribute("aria-haspopup","true");var i=rr.prototype.buildCSSClass();r.menuButton_.el_.className=r.buildCSSClass()+" "+i,r.menuButton_.removeClass("vjs-control"),r.addChild(r.menuButton_),r.update(),r.enabled_=!0;var a=function(e){return r.handleClick(e)};return r.handleMenuKeyUp_=function(e){return r.handleMenuKeyUp(e)},r.on(r.menuButton_,"tap",a),r.on(r.menuButton_,"click",a),r.on(r.menuButton_,"keydown",(function(e){return r.handleKeyDown(e)})),r.on(r.menuButton_,"mouseenter",(function(){r.addClass("vjs-hover"),r.menu.show(),_t(o.a,"keyup",r.handleMenuKeyUp_)})),r.on("mouseleave",(function(e){return r.handleMouseLeave(e)})),r.on("keydown",(function(e){return r.handleSubmenuKeyDown(e)})),r}m()(t,e);var n=t.prototype;return n.update=function(){var 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"))},n.createMenu=function(){var e=new Nr(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=Pe("li",{className:"vjs-menu-title",textContent:Ht(this.options_.title),tabIndex:-1}),n=new Yt(this.player_,{el:t});e.addItem(n)}if(this.items=this.createItems(),this.items)for(var r=0;r-1&&"showing"===a.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},n.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r-1&&"showing"===a.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(qr);Yt.registerComponent("OffTextTrackMenuItem",Fr);var Hr=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.textTracks(),e.call(this,t,n)||this}return m()(t,e),t.prototype.createItems=function(e,t){var n;void 0===e&&(e=[]),void 0===t&&(t=qr),this.label_&&(n=this.label_+" off"),e.push(new Fr(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i-1){var s=new t(this.player_,{track:a,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});s.addClass("vjs-"+a.kind+"-menu-item"),e.push(s)}}return e},t}(Ur);Yt.registerComponent("TextTrackButton",Hr);var Vr=function(e){function t(t,n){var r,i=n.track,a=n.cue,s=t.currentTime();return n.selectable=!0,n.multiSelectable=!1,n.label=a.text,n.selected=a.startTime<=s&&s=0;t--){var n=e[t];if(n.kind===this.kind_)return n}},n.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(Ht(this.kind_))},n.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},n.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n-1&&(r.label_="captions"),r.menuButton_.controlText(Ht(r.label_)),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new Xr(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,Kr)},t}(Hr);$r.prototype.kinds_=["captions","subtitles"],$r.prototype.controlText_="Subtitles",Yt.registerComponent("SubsCapsButton",$r);var Qr=function(e){function t(t,n){var r,i=n.track,a=t.audioTracks();n.label=i.label||i.language||"Unknown",n.selected=i.enabled,(r=e.call(this,t,n)||this).track=i,r.addClass("vjs-"+i.kind+"-menu-item");var s=function(){for(var e=arguments.length,t=new Array(e),n=0;n=0;n--)t.push(new Zr(this.player(),{rate:e[n]+"x"}));return t},n.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},n.handleClick=function(e){var t=this.player().playbackRate(),n=this.playbackRates(),r=(n.indexOf(t)+1)%n.length;this.player().playbackRate(n[r])},n.handlePlaybackRateschange=function(e){this.update()},n.playbackRates=function(){var e=this.player();return e.playbackRates&&e.playbackRates()||[]},n.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},n.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},n.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")},t}(Mr);ei.prototype.controlText_="Playback Rate",Yt.registerComponent("PlaybackRateMenuButton",ei);var ti=function(e){function t(){return e.apply(this,arguments)||this}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(t,n,r){return void 0===t&&(t="div"),void 0===n&&(n={}),void 0===r&&(r={}),n.className||(n.className=this.buildCSSClass()),e.prototype.createEl.call(this,t,n,r)},t}(Yt);Yt.registerComponent("Spacer",ti);var ni=function(e){function t(){return e.apply(this,arguments)||this}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),textContent:" "})},t}(ti);Yt.registerComponent("CustomControlSpacer",ni);var ri=function(e){function t(){return e.apply(this,arguments)||this}return m()(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(Yt);ri.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in o.a&&ri.prototype.options_.children.splice(ri.prototype.options_.children.length-1,0,"pictureInPictureToggle"),Yt.registerComponent("ControlBar",ri);var ii=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"error",(function(e){return r.open(e)})),r}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},n.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(on);ii.prototype.options_=l()({},on.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Yt.registerComponent("ErrorDisplay",ii);var ai=["#000","Black"],si=["#00F","Blue"],oi=["#0FF","Cyan"],ui=["#0F0","Green"],li=["#F0F","Magenta"],ci=["#F00","Red"],di=["#FFF","White"],hi=["#FF0","Yellow"],pi=["1","Opaque"],fi=["0.5","Semi-Transparent"],mi=["0","Transparent"],gi={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[ai,di,ci,ui,si,hi,li,oi]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[pi,fi,mi]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[di,ai,ci,ui,si,hi,li,oi]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},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:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[pi,fi]},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:"Transparency",options:[mi,fi,pi]}};function yi(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}gi.windowColor.options=gi.backgroundColor.options;var vi=function(e){function t(t,n){var r;return n.temporary=!1,(r=e.call(this,t,n)||this).updateDisplay=r.updateDisplay.bind(p()(r)),r.fill(),r.hasBeenOpened_=r.hasBeenFilled_=!0,r.endDialog=Pe("p",{className:"vjs-control-text",textContent:r.localize("End of dialog window.")}),r.el().appendChild(r.endDialog),r.setDefaults(),void 0===n.persistTextTrackSettings&&(r.options_.persistTextTrackSettings=r.options_.playerOptions.persistTextTrackSettings),r.on(r.$(".vjs-done-button"),"click",(function(){r.saveSettings(),r.close()})),r.on(r.$(".vjs-default-button"),"click",(function(){r.setDefaults(),r.updateDisplay()})),J(gi,(function(e){r.on(r.$(e.selector),"change",r.updateDisplay)})),r.options_.persistTextTrackSettings&&r.restoreSettings(),r}m()(t,e);var n=t.prototype;return n.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},n.createElSelect_=function(e,t,n){var r=this;void 0===t&&(t=""),void 0===n&&(n="label");var i=gi[e],a=i.id.replace("%s",this.id_),s=[t,a].join(" ").trim();return["<"+n+' id="'+a+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(i.label),"",'").join("")},n.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['
','',this.localize("Text"),"",this.createElSelect_("color",e),'',this.createElSelect_("textOpacity",e),"","
"].join("")},n.createElBgColor_=function(){var e="captions-background-"+this.id_;return['
','',this.localize("Background"),"",this.createElSelect_("backgroundColor",e),'',this.createElSelect_("backgroundOpacity",e),"","
"].join("")},n.createElWinColor_=function(){var e="captions-window-"+this.id_;return['
','',this.localize("Window"),"",this.createElSelect_("windowColor",e),'',this.createElSelect_("windowOpacity",e),"","
"].join("")},n.createElColors_=function(){return Pe("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},n.createElFont_=function(){return Pe("div",{className:"vjs-track-settings-font",innerHTML:['
',this.createElSelect_("fontPercent","","legend"),"
",'
',this.createElSelect_("edgeStyle","","legend"),"
",'
',this.createElSelect_("fontFamily","","legend"),"
"].join("")})},n.createElControls_=function(){var e=this.localize("restore all settings to the default values");return Pe("div",{className:"vjs-track-settings-controls",innerHTML:['",'"].join("")})},n.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},n.label=function(){return this.localize("Caption Settings Dialog")},n.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},n.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},n.getValues=function(){var e,t,n,r=this;return t=function(e,t,n){var i,a,s=(i=r.$(t.selector),a=t.parser,yi(i.options[i.options.selectedIndex].value,a));return void 0!==s&&(e[n]=s),e},void 0===(n={})&&(n=0),Q(e=gi).reduce((function(n,r){return t(n,e[r],r)}),n)},n.setValues=function(e){var t=this;J(gi,(function(n,r){!function(e,t,n){if(t)for(var r=0;rthis.options_.liveTolerance;this.timeupdateSeen_&&r!==1/0||(s=!1),s!==this.behindLiveEdge_&&(this.behindLiveEdge_=s,this.trigger("liveedgechange"))}},n.handleDurationchange=function(){this.toggleTracking()},n.toggleTracking=function(){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())},n.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,30),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_)))},n.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)},n.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()},n.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)},n.reset_=function(){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_)},n.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0},n.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},n.seekableEnd=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.end(n));return t.length?t.sort()[t.length-1]:1/0},n.seekableStart=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.start(n));return t.length?t.sort()[0]:0},n.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},n.isLive=function(){return this.isTracking()},n.atLiveEdge=function(){return!this.behindLiveEdge()},n.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},n.pastSeekEnd=function(){var e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},n.behindLiveEdge=function(){return this.behindLiveEdge_},n.isTracking=function(){return"number"==typeof this.trackingInterval_},n.seekToLiveEdge=function(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))},n.dispose=function(){this.off(o.a,"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),e.prototype.dispose.call(this)},t}(Yt);Yt.registerComponent("LiveTracker",Ti);var wi,Si=function(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var n=e.$$("source"),r=[],i="";if(!n.length)return!1;for(var a=0;a=2&&i.push("loadeddata"),e.readyState>=3&&i.push("canplay"),e.readyState>=4&&i.push("canplaythrough"),this.ready((function(){i.forEach((function(e){this.trigger(e)}),this)}))}},n.setScrubbing=function(e){this.isScrubbing_=e},n.scrubbing=function(){return this.isScrubbing_},n.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&Se?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){Y(e,"Video is not ready. (Video.js)")}},n.duration=function(){var e=this;if(this.el_.duration===1/0&&le&&fe&&0===this.el_.currentTime){return this.on("timeupdate",(function t(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))})),NaN}return this.el_.duration||NaN},n.width=function(){return this.el_.offsetWidth},n.height=function(){return this.el_.offsetHeight},n.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",(function(){e.off("webkitbeginfullscreen",n),e.off("webkitendfullscreen",t)}))}},n.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=a.a.navigator&&a.a.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},n.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)nn(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},n.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},n.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},n.requestVideoFrameCallback=function(t){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(t):e.prototype.requestVideoFrameCallback.call(this,t)},n.cancelVideoFrameCallback=function(t){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(t):e.prototype.cancelVideoFrameCallback.call(this,t)},n.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},n.reset=function(){t.resetMediaElement(this.el_)},n.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},n.setControls=function(e){this.el_.controls=!!e},n.addTextTrack=function(t,n,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,n,r):e.prototype.addTextTrack.call(this,t,n,r)},n.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var n=o.a.createElement("track");return t.kind&&(n.kind=t.kind),t.label&&(n.label=t.label),(t.language||t.srclang)&&(n.srclang=t.language||t.srclang),t.default&&(n.default=t.default),t.id&&(n.id=t.id),t.src&&(n.src=t.src),n},n.addRemoteTextTrack=function(t,n){var r=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},n.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var n=this.$$("track"),r=n.length;r--;)t!==n[r]&&t!==n[r].track||this.el().removeChild(n[r])},n.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),a.a.performance&&"function"==typeof a.a.performance.now?e.creationTime=a.a.performance.now():a.a.performance&&a.a.performance.timing&&"number"==typeof a.a.performance.timing.navigationStart&&(e.creationTime=a.a.Date.now()-a.a.performance.timing.navigationStart),e},t}(Mn);Oi(Ii,"TEST_VID",(function(){if(xe()){var e=o.a.createElement("video"),t=o.a.createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e}})),Ii.isSupported=function(){try{Ii.TEST_VID.volume=.5}catch(e){return!1}return!(!Ii.TEST_VID||!Ii.TEST_VID.canPlayType)},Ii.canPlayType=function(e){return Ii.TEST_VID.canPlayType(e)},Ii.canPlaySource=function(e,t){return Ii.canPlayType(e.type)},Ii.canControlVolume=function(){try{var e=Ii.TEST_VID.volume;Ii.TEST_VID.volume=e/2+.1;var t=e!==Ii.TEST_VID.volume;return t&&we?(a.a.setTimeout((function(){Ii&&Ii.prototype&&(Ii.prototype.featuresVolumeControl=e!==Ii.TEST_VID.volume)})),!1):t}catch(e){return!1}},Ii.canMuteVolume=function(){try{var e=Ii.TEST_VID.muted;return Ii.TEST_VID.muted=!e,Ii.TEST_VID.muted?Fe(Ii.TEST_VID,"muted","muted"):He(Ii.TEST_VID,"muted"),e!==Ii.TEST_VID.muted}catch(e){return!1}},Ii.canControlPlaybackRate=function(){if(le&&fe&&me<58)return!1;try{var e=Ii.TEST_VID.playbackRate;return Ii.TEST_VID.playbackRate=e/2+.1,e!==Ii.TEST_VID.playbackRate}catch(e){return!1}},Ii.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(o.a.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(o.a.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(o.a.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(o.a.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},Ii.supportsNativeTextTracks=function(){return Se||we&&fe},Ii.supportsNativeVideoTracks=function(){return!(!Ii.TEST_VID||!Ii.TEST_VID.videoTracks)},Ii.supportsNativeAudioTracks=function(){return!(!Ii.TEST_VID||!Ii.TEST_VID.audioTracks)},Ii.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(e){var t=e[0],n=e[1];Oi(Ii.prototype,t,(function(){return Ii[n]()}),!0)})),Ii.prototype.featuresVolumeControl=Ii.canControlVolume(),Ii.prototype.movingMediaElementInDOM=!we,Ii.prototype.featuresFullscreenResize=!0,Ii.prototype.featuresProgressEvents=!0,Ii.prototype.featuresTimeupdateEvents=!0,Ii.prototype.featuresVideoFrameCallback=!(!Ii.TEST_VID||!Ii.TEST_VID.requestVideoFrameCallback),Ii.patchCanPlayType=function(){ce>=4&&!he&&!fe&&(wi=Ii.TEST_VID&&Ii.TEST_VID.constructor.prototype.canPlayType,Ii.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(e)?"maybe":wi.call(this,e)})},Ii.unpatchCanPlayType=function(){var e=Ii.TEST_VID.constructor.prototype.canPlayType;return wi&&(Ii.TEST_VID.constructor.prototype.canPlayType=wi),e},Ii.patchCanPlayType(),Ii.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},Ii.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),n=t.length;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){Ii.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){Ii.prototype["set"+Ht(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach((function(e){Ii.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){Ii.prototype["set"+Ht(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){Ii.prototype[e]=function(){return this.el_[e]()}})),Mn.withSourceHandlers(Ii),Ii.nativeSourceHandler={},Ii.nativeSourceHandler.canPlayType=function(e){try{return Ii.TEST_VID.canPlayType(e)}catch(e){return""}},Ii.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Ii.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=En(e.src);return Ii.nativeSourceHandler.canPlayType("video/"+n)}return""},Ii.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},Ii.nativeSourceHandler.dispose=function(){},Ii.registerSourceHandler(Ii.nativeSourceHandler),Mn.registerTech("Html5",Ii);var Pi=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Li={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Di=["tiny","xsmall","small","medium","large","xlarge","huge"],Ri={};Di.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;Ri[e]="vjs-layout-"+t}));var Ni={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Mi=function(e){function t(n,r,i){var a;if(n.id=n.id||r.id||"vjs_video_"+ht(),(r=Z(t.getTagSettings(n),r)).initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"==typeof n.closest){var s=n.closest("[lang]");s&&s.getAttribute&&(r.language=s.getAttribute("lang"))}else for(var u=n;u&&1===u.nodeType;){if(Be(u).hasOwnProperty("lang")){r.language=u.getAttribute("lang");break}u=u.parentNode}if((a=e.call(this,null,r,i)||this).boundDocumentFullscreenChange_=function(e){return a.documentFullscreenChange_(e)},a.boundFullWindowOnEscKey_=function(e){return a.fullWindowOnEscKey(e)},a.boundUpdateStyleEl_=function(e){return a.updateStyleEl_(e)},a.boundApplyInitTime_=function(e){return a.applyInitTime_(e)},a.boundUpdateCurrentBreakpoint_=function(e){return a.updateCurrentBreakpoint_(e)},a.boundHandleTechClick_=function(e){return a.handleTechClick_(e)},a.boundHandleTechDoubleClick_=function(e){return a.handleTechDoubleClick_(e)},a.boundHandleTechTouchStart_=function(e){return a.handleTechTouchStart_(e)},a.boundHandleTechTouchMove_=function(e){return a.handleTechTouchMove_(e)},a.boundHandleTechTouchEnd_=function(e){return a.handleTechTouchEnd_(e)},a.boundHandleTechTap_=function(e){return a.handleTechTap_(e)},a.isFullscreen_=!1,a.log=K(a.id_),a.fsApi_=H,a.isPosterFromTech_=!1,a.queuedCallbacks_=[],a.isReady_=!1,a.hasStarted_=!1,a.userActive_=!1,a.debugEnabled_=!1,a.audioOnlyMode_=!1,a.audioPosterMode_=!1,a.audioOnlyCache_={playerHeight:null,hiddenChildren:[]},!a.options_||!a.options_.techOrder||!a.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(a.tag=n,a.tagAttributes=n&&Be(n),a.language(a.options_.language),r.languages){var l={};Object.getOwnPropertyNames(r.languages).forEach((function(e){l[e.toLowerCase()]=r.languages[e]})),a.languages_=l}else a.languages_=t.prototype.options_.languages;a.resetCache_(),a.poster_=r.poster||"",a.controls_=!!r.controls,n.controls=!1,n.removeAttribute("controls"),a.changingSrc_=!1,a.playCallbacks_=[],a.playTerminatedQueue_=[],n.hasAttribute("autoplay")?a.autoplay(!0):a.autoplay(a.options_.autoplay),r.plugins&&Object.keys(r.plugins).forEach((function(e){if("function"!=typeof a[e])throw new Error('plugin "'+e+'" does not exist')})),a.scrubbing_=!1,a.el_=a.createEl(),jt(p()(a),{eventBusKey:"el_"}),a.fsApi_.requestFullscreen&&(_t(o.a,a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_),a.on(a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_)),a.fluid_&&a.on(["playerreset","resize"],a.boundUpdateStyleEl_);var c=Vt(a.options_);r.plugins&&Object.keys(r.plugins).forEach((function(e){a[e](r.plugins[e])})),r.debug&&a.debug(!0),a.options_.playerOptions=c,a.middleware_=[],a.playbackRates(r.playbackRates),a.initChildren(),a.isAudio("audio"===n.nodeName.toLowerCase()),a.controls()?a.addClass("vjs-controls-enabled"):a.addClass("vjs-controls-disabled"),a.el_.setAttribute("role","region"),a.isAudio()?a.el_.setAttribute("aria-label",a.localize("Audio Player")):a.el_.setAttribute("aria-label",a.localize("Video Player")),a.isAudio()&&a.addClass("vjs-audio"),a.flexNotSupported_()&&a.addClass("vjs-no-flex"),_e&&a.addClass("vjs-touch-enabled"),we||a.addClass("vjs-workinghover"),t.players[a.id_]=p()(a);var d="7.21.4".split(".")[0];return a.addClass("vjs-v"+d),a.userActive(!0),a.reportUserActivity(),a.one("play",(function(e){return a.listenForUserActivity_(e)})),a.on("stageclick",(function(e){return a.handleStageClick_(e)})),a.on("keydown",(function(e){return a.handleKeyDown(e)})),a.on("languagechange",(function(e){return a.handleLanguagechange(e)})),a.breakpoints(a.options_.breakpoints),a.responsive(a.options_.responsive),a.on("ready",(function(){a.audioPosterMode(a.options_.audioPosterMode),a.audioOnlyMode(a.options_.audioOnlyMode)})),a}m()(t,e);var n=t.prototype;return n.dispose=function(){var n=this;this.trigger("dispose"),this.off("dispose"),bt(o.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),bt(o.a,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.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),function(e){jn[e.id()]=null}(this),Nn.names.forEach((function(e){var t=Nn[e],r=n[t.getterName]();r&&r.off&&r.off()})),e.prototype.dispose.call(this,{restoreEl:this.options_.restoreEl})},n.createEl=function(){var t,n=this.tag,r=this.playerElIngest_=n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player"),i="video-js"===this.tag.tagName.toLowerCase();r?t=this.el_=n.parentNode:i||(t=this.el_=e.prototype.createEl.call(this,"div"));var s=Be(n);if(i){for(t=this.el_=n,n=this.tag=o.a.createElement("video");t.children.length;)n.appendChild(t.firstChild);Re(t,"video-js")||Ne(t,"video-js"),t.appendChild(n),r=this.playerElIngest_=t,Object.keys(t).forEach((function(e){try{n[e]=t[e]}catch(e){}}))}if(n.setAttribute("tabindex","-1"),s.tabindex="-1",(ge||fe&&ve)&&(n.setAttribute("role","application"),s.role="application"),n.removeAttribute("width"),n.removeAttribute("height"),"width"in s&&delete s.width,"height"in s&&delete s.height,Object.getOwnPropertyNames(s).forEach((function(e){i&&"class"===e||t.setAttribute(e,s[e]),i&&n.setAttribute(e,s[e])})),n.playerId=n.id,n.id+="_html5_api",n.className="vjs-tech",n.player=t.player=this,this.addClass("vjs-paused"),!0!==a.a.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=lt("vjs-styles-dimensions");var u=tt(".vjs-styles-defaults"),l=tt("head");l.insertBefore(this.styleEl_,u?u.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);for(var c=n.getElementsByTagName("a"),d=0;d0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),i=r[1]/r[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/i:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*i,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),ct(this.styleEl_,"\n ."+n+" {\n width: "+e+"px;\n height: "+t+"px;\n }\n\n ."+n+".vjs-fluid:not(.vjs-audio-only-mode) {\n padding-top: "+100*i+"%;\n }\n ")}else{var s="number"==typeof this.width_?this.width_:this.options_.width,o="number"==typeof this.height_?this.height_:this.options_.height,u=this.tech_&&this.tech_.el();u&&(s>=0&&(u.width=s),o>=0&&(u.height=o))}},n.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var r=Ht(e),i=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==r&&this.tag&&(Mn.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var a=this.autoplay();("string"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(a=!1);var s={source:t,autoplay:a,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+i+"_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,Promise:this.options_.Promise};Nn.names.forEach((function(e){var t=Nn[e];s[t.getterName]=n[t.privateName]})),Z(s,this.options_[r]),Z(s,this.options_[i]),Z(s,this.options_[e.toLowerCase()]),this.tag&&(s.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(s.startTime=this.cache_.currentTime);var o=Mn.getTech(e);if(!o)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new o(s),this.tech_.ready(Ct(this,this.handleTechReady_),!0),sn(this.textTracksJson_||[],this.tech_),Pi.forEach((function(e){n.on(n.tech_,e,(function(t){return n["handleTech"+Ht(e)+"_"](t)}))})),Object.keys(Li).forEach((function(e){n.on(n.tech_,e,(function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+Li[e]+"_"].bind(n),event:t}):n["handleTech"+Li[e]+"_"](t)}))})),this.on(this.tech_,"loadstart",(function(e){return n.handleTechLoadStart_(e)})),this.on(this.tech_,"sourceset",(function(e){return n.handleTechSourceset_(e)})),this.on(this.tech_,"waiting",(function(e){return n.handleTechWaiting_(e)})),this.on(this.tech_,"ended",(function(e){return n.handleTechEnded_(e)})),this.on(this.tech_,"seeking",(function(e){return n.handleTechSeeking_(e)})),this.on(this.tech_,"play",(function(e){return n.handleTechPlay_(e)})),this.on(this.tech_,"firstplay",(function(e){return n.handleTechFirstPlay_(e)})),this.on(this.tech_,"pause",(function(e){return n.handleTechPause_(e)})),this.on(this.tech_,"durationchange",(function(e){return n.handleTechDurationChange_(e)})),this.on(this.tech_,"fullscreenchange",(function(e,t){return n.handleTechFullscreenChange_(e,t)})),this.on(this.tech_,"fullscreenerror",(function(e,t){return n.handleTechFullscreenError_(e,t)})),this.on(this.tech_,"enterpictureinpicture",(function(e){return n.handleTechEnterPictureInPicture_(e)})),this.on(this.tech_,"leavepictureinpicture",(function(e){return n.handleTechLeavePictureInPicture_(e)})),this.on(this.tech_,"error",(function(e){return n.handleTechError_(e)})),this.on(this.tech_,"posterchange",(function(e){return n.handleTechPosterChange_(e)})),this.on(this.tech_,"textdata",(function(e){return n.handleTechTextData_(e)})),this.on(this.tech_,"ratechange",(function(e){return n.handleTechRateChange_(e)})),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===r&&this.tag||De(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},n.unloadTech_=function(){var e=this;Nn.names.forEach((function(t){var n=Nn[t];e[n.privateName]=e[n.getterName]()})),this.textTracksJson_=an(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},n.tech=function(e){return void 0===e&&Y.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},n.addTechControlsListeners_=function(){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_)},n.removeTechControlsListeners_=function(){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_)},n.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},n.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())},n.manualAutoplay_=function(e){var t=this;if(this.tech_&&"string"==typeof e){var n,r=function(){var e=t.muted();t.muted(!0);var n=function(){t.muted(e)};t.playTerminatedQueue_.push(n);var r=t.play();if(tn(r))return r.catch((function(e){throw n(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(e||""))}))};if("any"!==e||this.muted()?n="muted"!==e||this.muted()?this.play():r():tn(n=this.play())&&(n=n.catch(r)),tn(n))return n.then((function(){t.trigger({type:"autoplay-success",autoplay:e})})).catch((function(){t.trigger({type:"autoplay-failure",autoplay:e})}))}},n.updateSourceCaches_=function(e){void 0===e&&(e="");var t=e,n="";"string"!=typeof t&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var n=e.cache_.sources.filter((function(e){return e.src===t}));if(n.length)return n[0].type;for(var r=e.$$("source"),i=0;i0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((function(e){return e.callback(e.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},n.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting");var t=this.currentTime();this.on("timeupdate",(function n(){t!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",n))}))},n.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},n.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},n.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},n.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},n.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},n.handleTechFirstPlay_=function(){this.options_.starttime&&(Y.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},n.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},n.handleTechEnded_=function(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},n.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},n.handleTechClick_=function(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?nn(this.play()):this.pause()))},n.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),(function(t){return t.contains(e.target)}))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},n.handleTechTap_=function(){this.userActive(!this.userActive())},n.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},n.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},n.handleTechTouchEnd_=function(e){e.cancelable&&e.preventDefault()},n.handleStageClick_=function(){this.reportUserActivity()},n.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},n.documentFullscreenChange_=function(e){var t=e.target.player;if(!t||t===this){var n=this.el(),r=o.a[this.fsApi_.fullscreenElement]===n;!r&&n.matches?r=n.matches(":"+this.fsApi_.fullscreen):!r&&n.msMatchesSelector&&(r=n.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(r)}},n.handleTechFullscreenChange_=function(e,t){var n=this;t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",(function(){n.removeClass("vjs-ios-native-fs")}))),this.isFullscreen(t.isFullscreen))},n.handleTechFullscreenError_=function(e,t){this.trigger("fullscreenerror",t)},n.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},n.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},n.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},n.handleTechError_=function(){var e=this.tech_.error();this.error(e)},n.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},n.getCache=function(){return this.cache_},n.resetCache_=function(){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}},n.techCall_=function(e,t){this.ready((function(){if(e in Vn)return function(e,t,n,r){return t[n](e.reduce(zn(n),r))}(this.middleware_,this.tech_,e,t);if(e in Wn)return Fn(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw Y(e),e}}),!0)},n.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in Hn)return function(e,t,n){return e.reduceRight(zn(n),t[n]())}(this.middleware_,this.tech_,e);if(e in Wn)return Fn(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw Y("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw Y("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw Y(t),t}}},n.play=function(){var e=this,t=this.options_.Promise||a.a.Promise;return t?new t((function(t){e.play_(t)})):this.play_()},n.play_=function(e){var t=this;void 0===e&&(e=nn),this.playCallbacks_.push(e);var n=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),r=Boolean(Se||we);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!n)return this.waitToPlay_=function(e){t.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(!n&&r&&this.load());var i=this.techGet_("play");r&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),null===i?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(i)},n.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))},n.runPlayCallbacks_=function(e){var t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))},n.pause=function(){this.techCall_("pause")},n.paused=function(){return!1!==this.techGet_("paused")},n.played=function(){return this.techGet_("played")||Qt(0,0)},n.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},n.currentTime=function(e){return void 0!==e?(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),void(this.cache_.initTime=0)):(this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},n.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},n.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(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"))},n.remainingTime=function(){return this.duration()-this.currentTime()},n.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},n.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=Qt(0,0)),e},n.bufferedPercent=function(){return Jt(this.buffered(),this.duration())},n.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),n=e.end(e.length-1);return n>t&&(n=t),n},n.volume=function(e){var t;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},n.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},n.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},n.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},n.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},n.isFullscreen=function(e){if(void 0!==e){var t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_},n.requestFullscreen=function(e){var t=this.options_.Promise||a.a.Promise;if(t){var n=this;return new t((function(t,r){function i(){n.off("fullscreenerror",s),n.off("fullscreenchange",a)}function a(){i(),t()}function s(e,t){i(),r(t)}n.one("fullscreenchange",a),n.one("fullscreenerror",s);var o=n.requestFullscreenHelper_(e);o&&(o.then(i,i),o.then(t,r))}))}return this.requestFullscreenHelper_()},n.requestFullscreenHelper_=function(e){var t,n=this;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){var r=this.el_[this.fsApi_.requestFullscreen](t);return r&&r.then((function(){return n.isFullscreen(!0)}),(function(){return n.isFullscreen(!1)})),r}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()},n.exitFullscreen=function(){var e=this.options_.Promise||a.a.Promise;if(e){var t=this;return new e((function(e,n){function r(){t.off("fullscreenerror",a),t.off("fullscreenchange",i)}function i(){r(),e()}function a(e,t){r(),n(t)}t.one("fullscreenchange",i),t.one("fullscreenerror",a);var s=t.exitFullscreenHelper_();s&&(s.then(r,r),s.then(e,n))}))}return this.exitFullscreenHelper_()},n.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var t=o.a[this.fsApi_.exitFullscreen]();return t&&nn(t.then((function(){return e.isFullscreen(!1)}))),t}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()},n.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=o.a.documentElement.style.overflow,_t(o.a,"keydown",this.boundFullWindowOnEscKey_),o.a.documentElement.style.overflow="hidden",Ne(o.a.body,"vjs-full-window"),this.trigger("enterFullWindow")},n.fullWindowOnEscKey=function(e){d.a.isEventKey(e,"Esc")&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())},n.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,bt(o.a,"keydown",this.boundFullWindowOnEscKey_),o.a.documentElement.style.overflow=this.docOrigOverflow,Me(o.a.body,"vjs-full-window"),this.trigger("exitFullWindow")},n.disablePictureInPicture=function(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")},n.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},n.requestPictureInPicture=function(){if("pictureInPictureEnabled"in o.a&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},n.exitPictureInPicture=function(){if("pictureInPictureEnabled"in o.a)return o.a.exitPictureInPicture()},n.handleKeyDown=function(e){var t=this.options_.userActions;if(t&&t.hotkeys){(function(e){var t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if("input"===t)return-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(e.type);return-1!==["textarea"].indexOf(t)})(this.el_.ownerDocument.activeElement)||("function"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}},n.handleHotkeys=function(e){var t=this.options_.userActions?this.options_.userActions.hotkeys:{},n=t.fullscreenKey,r=void 0===n?function(e){return d.a.isEventKey(e,"f")}:n,i=t.muteKey,a=void 0===i?function(e){return d.a.isEventKey(e,"m")}:i,s=t.playPauseKey,u=void 0===s?function(e){return d.a.isEventKey(e,"k")||d.a.isEventKey(e,"Space")}:s;if(r.call(this,e)){e.preventDefault(),e.stopPropagation();var l=Yt.getComponent("FullscreenToggle");!1!==o.a[this.fsApi_.fullscreenEnabled]&&l.prototype.handleClick.call(this,e)}else if(a.call(this,e)){e.preventDefault(),e.stopPropagation(),Yt.getComponent("MuteToggle").prototype.handleClick.call(this,e)}else if(u.call(this,e)){e.preventDefault(),e.stopPropagation(),Yt.getComponent("PlayToggle").prototype.handleClick.call(this,e)}},n.canPlayType=function(e){for(var t,n=0,r=this.options_.techOrder;n1?n.handleSrc_(r.slice(1)):(n.changingSrc_=!1,n.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void n.triggerReady());a=i,s=n.tech_,a.forEach((function(e){return e.setTech&&e.setTech(s)}))})),this.options_.retryOnError&&r.length>1){var i=function(){n.error(null),n.handleSrc_(r.slice(1),!0)},a=function(){n.off("error",i)};this.one("error",i),this.one("playing",a),this.resetRetryOnError_=function(){n.off("error",i),n.off("playing",a)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)},n.src=function(e){return this.handleSrc_(e,!1)},n.src_=function(e){var t,n,r=this,i=this.selectSource([e]);return!i||(t=i.tech,n=this.techName_,Ht(t)!==Ht(n)?(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready((function(){r.changingSrc_=!1})),!1):(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1))},n.load=function(){this.techCall_("load")},n.reset=function(){var e=this,t=this.options_.Promise||a.a.Promise;this.paused()||!t?this.doReset_():nn(this.play().then((function(){return e.doReset_()})))},n.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),It(this)&&this.trigger("playerreset")},n.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},n.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar||{},t=e.durationDisplay,n=e.remainingTimeDisplay;t&&t.updateContent(),n&&n.updateContent()},n.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},n.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},n.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},n.currentSource=function(){return this.cache_.source||{}},n.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},n.currentType=function(){return this.currentSource()&&this.currentSource().type||""},n.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},n.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t;"string"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_("string"==typeof e?e:"play"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)},n.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},n.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},n.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},n.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},n.controls=function(e){if(void 0===e)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_()))},n.usingNativeControls=function(e){if(void 0===e)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")))},n.error=function(e){var t=this;if(void 0===e)return this.error_||null;if(q("beforeerror").forEach((function(n){var r=n(t,e);ee(r)&&!Array.isArray(r)||"string"==typeof r||"number"==typeof r||null===r?e=r:t.log.error("please return a value that MediaError expects in beforeerror hooks")})),this.options_.suppressNotSupportedError&&e&&4===e.code){var n=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],n),void this.one("loadstart",(function(){this.off(["click","touchstart"],n)}))}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Zt(e),this.addClass("vjs-error"),Y.error("(CODE:"+this.error_.code+" "+Zt.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),q("error").forEach((function(e){return e(t,t.error_)}))},n.reportUserActivity=function(e){this.userActivity_=!0},n.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},n.listenForUserActivity_=function(){var e,t,n,r=Ct(this,this.reportUserActivity),i=function(t){r(),this.clearInterval(e)};this.on("mousedown",(function(){r(),this.clearInterval(e),e=this.setInterval(r,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,r())})),this.on("mouseup",i),this.on("mouseleave",i);var a,s=this.getChild("controlBar");!s||we||le||(s.on("mouseenter",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),s.on("mouseleave",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",r),this.on("keyup",r),this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);var e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}}),250)},n.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},n.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},n.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},n.enableAudioOnlyUI_=function(){var e=this;this.addClass("vjs-audio-only-mode");var t=this.children(),n=this.getChild("ControlBar"),r=n&&n.currentHeight();t.forEach((function(t){t!==n&&t.el_&&!t.hasClass("vjs-hidden")&&(t.hide(),e.audioOnlyCache_.hiddenChildren.push(t))})),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.height(r),this.trigger("audioonlymodechange")},n.disableAudioOnlyUI_=function(){this.removeClass("vjs-audio-only-mode"),this.audioOnlyCache_.hiddenChildren.forEach((function(e){return e.show()})),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")},n.audioOnlyMode=function(e){var t=this;if("boolean"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;this.audioOnlyMode_=e;var n=this.options_.Promise||a.a.Promise;if(n){if(e){var r=[];return this.isInPictureInPicture()&&r.push(this.exitPictureInPicture()),this.isFullscreen()&&r.push(this.exitFullscreen()),this.audioPosterMode()&&r.push(this.audioPosterMode(!1)),n.all(r).then((function(){return t.enableAudioOnlyUI_()}))}return n.resolve().then((function(){return t.disableAudioOnlyUI_()}))}e?(this.isInPictureInPicture()&&this.exitPictureInPicture(),this.isFullscreen()&&this.exitFullscreen(),this.enableAudioOnlyUI_()):this.disableAudioOnlyUI_()},n.enablePosterModeUI_=function(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},n.disablePosterModeUI_=function(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},n.audioPosterMode=function(e){var t=this;if("boolean"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;this.audioPosterMode_=e;var n=this.options_.Promise||a.a.Promise;return n?e?this.audioOnlyMode()?this.audioOnlyMode(!1).then((function(){t.enablePosterModeUI_()})):n.resolve().then((function(){t.enablePosterModeUI_()})):n.resolve().then((function(){t.disablePosterModeUI_()})):e?(this.audioOnlyMode()&&this.audioOnlyMode(!1),void this.enablePosterModeUI_()):void this.disablePosterModeUI_()},n.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},n.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},n.removeRemoteTextTrack=function(e){void 0===e&&(e={});var t=e.track;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)},n.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},n.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},n.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},n.language=function(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),It(this)&&this.trigger("languagechange"))},n.languages=function(){return Vt(t.prototype.options_.languages,this.languages_)},n.toJSON=function(){var e=Vt(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n"):function(){}},Zi=function(e,t){var n,r=[];if(e&&e.length)for(n=0;n=t}))},ta=function(e,t){return Zi(e,(function(e){return e-1/30>=t}))},na=function(e){var t=[];if(!e||!e.length)return"";for(var n=0;n "+e.end(n));return t.join(", ")},ra=function(e){for(var t=[],n=0;na||(n+=t>i&&t<=a?a-t:a-i)}return n},sa=Xi.createTimeRange,oa=function(e,t){if(!t.preload)return t.duration;var n=0;return(t.parts||[]).forEach((function(e){n+=e.duration})),(t.preloadHints||[]).forEach((function(t){"PART"===t.type&&(n+=e.partTargetDuration)})),n},ua=function(e){return(e.segments||[]).reduce((function(e,t,n){return t.parts?t.parts.forEach((function(r,i){e.push({duration:r.duration,segmentIndex:n,partIndex:i,part:r,segment:t})})):e.push({duration:t.duration,segmentIndex:n,partIndex:null,segment:t,part:null}),e}),[])},la=function(e){var t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},ca=function(e){var t=e.preloadSegment;if(t){var n=t.parts,r=(t.preloadHints||[]).reduce((function(e,t){return e+("PART"===t.type?1:0)}),0);return r+=n&&n.length?n.length:0}},da=function(e,t){if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;var n=la(t).length>0;return n&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:n&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},ha=function(e,t,n){if(void 0===t&&(t=e.mediaSequence+e.segments.length),ti){var s=[i,r];r=s[0],i=s[1]}if(r<0){for(var o=r;oDate.now()},ya=function(e){return e.excludeUntil&&e.excludeUntil===1/0},va=function(e){var t=ga(e);return!e.disabled&&!t},_a=function(e,t){return t.attributes&&t.attributes[e]},ba=function(e,t){if(1===e.playlists.length)return!0;var n=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((function(e){return!!va(e)&&(e.attributes.BANDWIDTH||0)0)for(var h=l-1;h>=0;h--){var p=u[h];if(o+=p.duration,s){if(o<0)continue}else if(o+1/30<=0)continue;return{partIndex:p.partIndex,segmentIndex:p.segmentIndex,startTime:a-fa({defaultDuration:t.targetDuration,durationList:u,startIndex:l,endIndex:h})}}return{partIndex:u[0]&&u[0].partIndex||null,segmentIndex:u[0]&&u[0].segmentIndex||0,startTime:n}}if(l<0){for(var f=l;f<0;f++)if((o-=t.targetDuration)<0)return{partIndex:u[0]&&u[0].partIndex||null,segmentIndex:u[0]&&u[0].segmentIndex||0,startTime:n};l=0}for(var m=l;m0)continue}else if(o-1/30>=0)continue;return{partIndex:g.partIndex,segmentIndex:g.segmentIndex,startTime:a+fa({defaultDuration:t.targetDuration,durationList:u,startIndex:l,endIndex:m})}}return{segmentIndex:u[u.length-1].segmentIndex,partIndex:u[u.length-1].partIndex,startTime:n}},isEnabled:va,isDisabled:function(e){return e.disabled},isBlacklisted:ga,isIncompatible:ya,playlistEnd:ma,isAes:function(e){for(var t=0;t-1&&o!==s.length-1&&(n._HLS_part=o),(o>-1||s.length)&&i--}n._HLS_msn=i}if(t.serverControl&&t.serverControl.canSkipUntil&&(n._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(n).length){var u=new a.a.URL(e);["_HLS_skip","_HLS_msn","_HLS_part"].forEach((function(e){n.hasOwnProperty(e)&&u.searchParams.set(e,n[e])})),e=u.toString()}return e}(n,t)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:n,withCredentials:this.withCredentials},(function(t,n){if(e.request)return t?e.playlistRequestError(e.request,e.media(),"HAVE_METADATA"):void e.haveMetadata({playlistString:e.request.responseText,url:e.media().uri,id:e.media().id})}))}},n.playlistRequestError=function(e,t,n){var r=t.uri,i=t.id;this.request=null,n&&(this.state=n),this.error={playlist:this.master.playlists[i],status:e.status,message:"HLS playlist request error at URL: "+r+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")},n.parseManifest_=function(e){var t=this,n=e.url;return function(e){var t=e.onwarn,n=e.oninfo,r=e.manifestString,i=e.customTagParsers,a=void 0===i?[]:i,s=e.customTagMappers,o=void 0===s?[]:s,u=e.experimentalLLHLS,l=new x.a;t&&l.on("warn",t),n&&l.on("info",n),a.forEach((function(e){return l.addParser(e)})),o.forEach((function(e){return l.addTagMapper(e)})),l.push(r),l.end();var c=l.manifest;if(u||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach((function(e){c.hasOwnProperty(e)&&delete c[e]})),c.segments&&c.segments.forEach((function(e){["parts","preloadHints"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!c.targetDuration){var d=10;c.segments&&c.segments.length&&(d=c.segments.reduce((function(e,t){return Math.max(e,t.duration)}),0)),t&&t("manifest has no targetDuration defaulting to "+d),c.targetDuration=d}var h=la(c);if(h.length&&!c.partTargetDuration){var p=h.reduce((function(e,t){return Math.max(e,t.duration)}),0);t&&(t("manifest has no partTargetDuration defaulting to "+p),ka.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.")),c.partTargetDuration=p}return c}({onwarn:function(e){var r=e.message;return t.logger_("m3u8-parser warn for "+n+": "+r)},oninfo:function(e){var r=e.message;return t.logger_("m3u8-parser info for "+n+": "+r)},manifestString:e.manifestString,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS})},n.haveMetadata=function(e){var t=e.playlistString,n=e.playlistObject,r=e.url,i=e.id;this.request=null,this.state="HAVE_METADATA";var a=n||this.parseManifest_({url:r,manifestString:t});a.lastRequest=Date.now(),Oa({playlist:a,uri:r,id:i});var s=Ua(this.master,a);this.targetDuration=a.partTargetDuration||a.targetDuration,this.pendingMedia_=null,s?(this.master=s,this.media_=this.master.playlists[i]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(ja(this.media(),!!s)),this.trigger("loadedplaylist")},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),a.a.clearTimeout(this.mediaUpdateTimeout),a.a.clearTimeout(this.finalRenditionTimeout),this.off()},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.media=function(e,t){var n=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}if(a.a.clearTimeout(this.finalRenditionTimeout),t){var r=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=a.a.setTimeout(this.media.bind(this,e,!1),r)}else{var i=this.state,s=!this.media_||e.id!==this.media_.id,o=this.master.playlists[e.id];if(o&&o.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(s&&(this.trigger("mediachanging"),"HAVE_MASTER"===i?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(this.updateMediaUpdateTimeout_(ja(e,!0)),s){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},(function(t,r){if(n.request){if(e.lastRequest=Date.now(),e.resolvedUri=Qi(n.handleManifestRedirects,e.resolvedUri,r),t)return n.playlistRequestError(n.request,e,i);n.haveMetadata({playlistString:r.responseText,url:e.uri,id:e.id}),"HAVE_MASTER"===i?n.trigger("loadedmetadata"):n.trigger("mediachange")}}))}}},n.pause=function(){this.mediaUpdateTimeout&&(a.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")},n.load=function(e){var t=this;this.mediaUpdateTimeout&&(a.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);var n=this.media();if(e){var r=n?(n.partTargetDuration||n.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=a.a.setTimeout((function(){t.mediaUpdateTimeout=null,t.load()}),r)}else this.started?n&&!n.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},n.updateMediaUpdateTimeout_=function(e){var t=this;this.mediaUpdateTimeout&&(a.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=a.a.setTimeout((function(){t.mediaUpdateTimeout=null,t.trigger("mediaupdatetimeout"),t.updateMediaUpdateTimeout_(e)}),e))},n.start=function(){var e=this;if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=a.a.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((function(){e.setupInitialPlaylist(e.src)}),0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},(function(t,n){if(e.request){if(e.request=null,t)return e.error={status:n.status,message:"HLS playlist request error at URL: "+e.src+".",responseText:n.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.src=Qi(e.handleManifestRedirects,e.src,n);var r=e.parseManifest_({manifestString:n.responseText,url:e.src});e.setupInitialPlaylist(r)}}))},n.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},n.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists)return this.master=e,Ia(this.master,this.srcUri()),e.playlists.forEach((function(e){e.segments=Na(e),e.segments.forEach((function(t){Ra(t,e.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var t=this.srcUri()||a.a.location.href;this.master=function(e,t){var n=Ca(0,t),r={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:a.a.location.href,resolvedUri:a.a.location.href,playlists:[{uri:t,id:n,resolvedUri:t,attributes:{}}]};return r.playlists[n]=r.playlists[0],r.playlists[t]=r.playlists[0],r}(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},t}(La),qa=Xi.xhr,Fa=Xi.mergeOptions,Ha=function(e,t,n,r){var i="arraybuffer"===e.responseType?e.response:e.responseText;!t&&i&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=i.byteLength||i.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),n.headers&&(e.responseHeaders=n.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===n.statusCode||206===n.statusCode||0===n.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(i||e.responseText)))),r(t,e)},Va=function(){var e=function e(t,n){t=Fa({timeout:45e3},t);var r=e.beforeRequest||Xi.Vhs.xhr.beforeRequest;if(r&&"function"==typeof r){var i=r(t);i&&(t=i)}var a=(!0===Xi.Vhs.xhr.original?qa:Xi.Vhs.xhr)(t,(function(e,t){return Ha(a,e,t,n)})),s=a.abort;return a.abort=function(){return a.aborted=!0,s.apply(a,arguments)},a.uri=t.uri,a.requestTime=Date.now(),a};return e.original=!0,e},Wa=function(e){var t,n={};return e.byterange&&(n.Range="bytes="+(t=e.byterange).offset+"-"+("bigint"==typeof t.offset||"bigint"==typeof t.length?a.a.BigInt(t.offset)+a.a.BigInt(t.length)-a.a.BigInt(1):t.offset+t.length-1)),n},za=function(e,t){return e.start(t)+"-"+e.end(t)},Ga=function(e,t){var n=e.toString(16);return"00".substring(0,2-n.length)+n+(t%2?" ":"")},Xa=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},Ya=function(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n];Object(I.e)(r)?t[n]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:t[n]=r})),t},Ka=function(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},$a=function(e){return e.resolvedUri},Qa=function(e){for(var t=Array.prototype.slice.call(e),n="",r=0;rr){if(e>r+.25*a.duration)return null;n=a}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:r-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}}(r,t);if(!a)return i({message:"valid programTime was not found"});if("estimate"===a.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:a.estimatedStart});var s={mediaSeconds:r},o=function(e,t){if(!t.dateTimeObject)return null;var n=t.videoTimingInfo.transmuxerPrependedSeconds,r=e-(t.videoTimingInfo.transmuxedPresentationStart+n);return new Date(t.dateTimeObject.getTime()+1e3*r)}(r,a.segment);return o&&(s.programDateTime=o.toISOString()),i(null,s)},es=function e(t){var n=t.programTime,r=t.playlist,i=t.retryCount,a=void 0===i?2:i,s=t.seekTo,o=t.pauseAfterSeek,u=void 0===o||o,l=t.tech,c=t.callback;if(!c)throw new Error("seekToProgramTime: callback must be provided");if(void 0===n||!r||!s)return c({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!r.endList&&!l.hasStarted_)return c({message:"player must be playing a live stream to start buffering"});if(!function(e){if(!e.segments||0===e.segments.length)return!1;for(var t=0;tnew Date(o.getTime()+1e3*u)?null:(n>o&&(r=s),{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:Ea.duration(t,t.mediaSequence+t.segments.indexOf(r)),type:r.videoTimingInfo?"accurate":"estimate"})}(n,r);if(!d)return c({message:n+" was not found in the stream"});var h=d.segment,p=function(e,t){var n,r;try{n=new Date(e),r=new Date(t)}catch(e){}var i=n.getTime();return(r.getTime()-i)/1e3}(h.dateTimeObject,n);if("estimate"===d.type)return 0===a?c({message:n+" is not buffered yet. Try again"}):(s(d.estimatedStart+p),void l.one("seeked",(function(){e({programTime:n,playlist:r,retryCount:a-1,seekTo:s,pauseAfterSeek:u,tech:l,callback:c})})));var f=h.start+p;l.one("seeked",(function(){return c(null,l.currentTime())})),u&&l.pause(),s(f)},ts=function(e,t){if(4===e.readyState)return t()},ns=Xi.EventTarget,rs=Xi.mergeOptions,is=function(e,t){if(!Ma(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(var n=0;n=c+l)return o(t,{response:a.subarray(l,l+c),status:n.status,uri:n.uri});r.request=r.vhs_.xhr({uri:s,responseType:"arraybuffer",headers:Wa({byterange:e.sidx.byterange})},o)}))}else this.mediaRequest_=a.a.setTimeout((function(){return n(!1)}),0)},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},a.a.clearTimeout(this.minimumUpdatePeriodTimeout_),a.a.clearTimeout(this.mediaRequest_),a.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off()},n.hasPendingRequest=function(){return this.request||this.mediaRequest_},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.media=function(e){var t=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var n=this.state;if("string"==typeof e){if(!this.masterPlaylistLoader_.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.masterPlaylistLoader_.master.playlists[e]}var r=!this.media_||e.id!==this.media_.id;if(r&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(r&&(this.trigger("mediachanging"),this.trigger("mediachange")));r&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,n,(function(r){t.haveMetadata({startingState:n,playlist:e})})))},n.haveMetadata=function(e){var t=e.startingState,n=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[n.id]=n,this.mediaRequest_=null,this.refreshMedia_(n.id),"HAVE_MASTER"===t?this.trigger("loadedmetadata"):this.trigger("mediachange")},n.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),a.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(a.a.clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)},n.load=function(e){var t=this;a.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var n=this.media();if(e){var r=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=a.a.setTimeout((function(){return t.load()}),r)}else this.started?n&&!n.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()},n.start=function(){var e=this;this.started=!0,this.isMaster_?this.requestMaster_((function(t,n){e.haveMaster_(),e.hasPendingRequest()||e.media_||e.media(e.masterPlaylistLoader_.master.playlists[0])})):this.mediaRequest_=a.a.setTimeout((function(){return e.haveMaster_()}),0)},n.requestMaster_=function(e){var t=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},(function(n,r){if(!t.requestErrored_(n,r)){var i=r.responseText!==t.masterPlaylistLoader_.masterXml_;return t.masterPlaylistLoader_.masterXml_=r.responseText,r.responseHeaders&&r.responseHeaders.date?t.masterLoaded_=Date.parse(r.responseHeaders.date):t.masterLoaded_=Date.now(),t.masterPlaylistLoader_.srcUrl=Qi(t.handleManifestRedirects,t.masterPlaylistLoader_.srcUrl,r),i?(t.handleMaster_(),void t.syncClientServerClock_((function(){return e(r,i)}))):e(r,i)}"HAVE_NOTHING"===t.state&&(t.started=!1)}))},n.syncClientServerClock_=function(e){var t=this,n=Object(P.d)(this.masterPlaylistLoader_.masterXml_);return null===n?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===n.method?(this.masterPlaylistLoader_.clientOffset_=n.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:$i(this.masterPlaylistLoader_.srcUrl,n.value),method:n.method,withCredentials:this.withCredentials},(function(r,i){if(t.request){if(r)return t.masterPlaylistLoader_.clientOffset_=t.masterLoaded_-Date.now(),e();var a;a="HEAD"===n.method?i.responseHeaders&&i.responseHeaders.date?Date.parse(i.responseHeaders.date):t.masterLoaded_:Date.parse(i.responseText),t.masterPlaylistLoader_.clientOffset_=a-Date.now(),e()}})))},n.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},n.handleMaster_=function(){this.mediaRequest_=null;var e,t,n,r,i,a,s,o=this.masterPlaylistLoader_.master,u=(e={masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_,previousManifest:o},t=e.masterXml,n=e.srcUrl,r=e.clientOffset,i=e.sidxMapping,a=e.previousManifest,s=Object(P.c)(t,{manifestUri:n,clientOffset:r,sidxMapping:i,previousManifest:a}),Ia(s,n,as),s);o&&(u=ss(o,u,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=u||o;var l=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return l&&l!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=l),(!o||u&&u.minimumUpdatePeriod!==o.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(u)},n.updateMinimumUpdatePeriodTimeout_=function(){var e=this.masterPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(a.a.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);var t=e.master&&e.master.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),"number"!=typeof t||t<=0?t<0&&this.logger_("found invalid minimumUpdatePeriod of "+t+", not setting a timeout"):this.createMUPTimeout_(t)},n.createMUPTimeout_=function(e){var t=this.masterPlaylistLoader_;t.minimumUpdatePeriodTimeout_=a.a.setTimeout((function(){t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)}),e)},n.refreshXml_=function(){var e=this;this.requestMaster_((function(t,n){var r,i,a;n&&(e.media_&&(e.media_=e.masterPlaylistLoader_.master.playlists[e.media_.id]),e.masterPlaylistLoader_.sidxMapping_=(r=e.masterPlaylistLoader_.master,i=e.masterPlaylistLoader_.sidxMapping_,a=os(r.playlists,i),Aa(r,(function(e,t,n,r){if(e.playlists&&e.playlists.length){var s=e.playlists;a=rs(a,os(s,i))}})),a),e.addSidxSegments_(e.media(),e.state,(function(t){e.refreshMedia_(e.media().id)})))}))},n.refreshMedia_=function(e){var t=this;if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var n=this.masterPlaylistLoader_.master.playlists,r=!this.media_||this.media_!==n[e];if(r?this.media_=n[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){!function e(){t.media().endList||(t.mediaUpdateTimeout=a.a.setTimeout((function(){t.trigger("mediaupdatetimeout"),e()}),ja(t.media(),Boolean(r))))}()}this.trigger("loadedplaylist")},t}(ns),ls={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},cs=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},ds=function(e){return function(){var t=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(n){var t=new BlobBuilder;return t.append(e),URL.createObjectURL(t.getBlob())}}(e),n=cs(new Worker(t));n.objURL=t;var r=n.terminate;return n.on=n.addEventListener,n.off=n.removeEventListener,n.terminate=function(){return URL.revokeObjectURL(t),r.call(this)},n}},hs=function(e){return"var browserWorkerPolyFill = "+cs.toString()+";\nbrowserWorkerPolyFill(self);\n"+e},ps=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},fs=ds(hs(ps((function(){var t=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var r;return!!e[t]&&(r=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(r,1),r>-1)},this.trigger=function(t){var n,r,i,a;if(n=e[t])if(2===arguments.length)for(i=n.length,r=0;r>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},g=function(e){return n(S.hdlr,O[e])},m=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),n(S.mdhd,t)},f=function(e){return n(S.mdia,m(e),g(e.type),o(e))},s=function(e){return n(S.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return n(S.minf,"video"===e.type?n(S.vmhd,I):n(S.smhd,P),r(),v(e))},u=function(e,t){for(var r=[],i=t.length;i--;)r[i]=b(t[i]);return n.apply(null,[S.moof,s(e)].concat(r))},l=function(e){for(var t=e.length,r=[];t--;)r[t]=h(e[t]);return n.apply(null,[S.moov,d(4294967295)].concat(r).concat(c(e)))},c=function(e){for(var t=e.length,r=[];t--;)r[t]=T(e[t]);return n.apply(null,[S.mvex].concat(r))},d=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,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 n(S.mvhd,t)},y=function(e){var t,r,i=e.samples||[],a=new Uint8Array(4+i.length);for(r=0;r>>8),s.push(255&i[t].byteLength),s=s.concat(Array.prototype.slice.call(i[t]));for(t=0;t>>8),o.push(255&a[t].byteLength),o=o.concat(Array.prototype.slice.call(a[t]));if(r=[S.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,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,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]),n(S.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([i.length],s,[a.length],o))),n(S.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var u=e.sarRatio[0],l=e.sarRatio[1];r.push(n(S.pasp,new Uint8Array([(4278190080&u)>>24,(16711680&u)>>16,(65280&u)>>8,255&u,(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l])))}return n.apply(null,r)},j=function(e){return n(S.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),i(e))},p=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,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,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return n(S.tkhd,t)},b=function(e){var t,r,i,a,s,o;return t=n(S.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),s=Math.floor(e.baseMediaDecodeTime/z),o=Math.floor(e.baseMediaDecodeTime%z),r=n(S.tfdt,new Uint8Array([1,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),92,"audio"===e.type?(i=w(e,92),n(S.traf,t,r,i)):(a=y(e),i=w(e,a.length+92),n(S.traf,t,r,i,a))},h=function(e){return e.duration=e.duration||4294967295,n(S.trak,p(e),f(e))},T=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),n(S.trex,t)},F=function(e,t){var n=0,r=0,i=0,a=0;return e.length&&(void 0!==e[0].duration&&(n=1),void 0!==e[0].size&&(r=2),void 0!==e[0].flags&&(i=4),void 0!==e[0].compositionTimeOffset&&(a=8)),[0,0,n|r|i|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},q=function(e,t){var r,i,a,s,o,u;for(t+=20+16*(s=e.samples||[]).length,a=F(s,t),(i=new Uint8Array(a.length+16*s.length)).set(a),r=a.length,u=0;u>>24,i[r++]=(16711680&o.duration)>>>16,i[r++]=(65280&o.duration)>>>8,i[r++]=255&o.duration,i[r++]=(4278190080&o.size)>>>24,i[r++]=(16711680&o.size)>>>16,i[r++]=(65280&o.size)>>>8,i[r++]=255&o.size,i[r++]=o.flags.isLeading<<2|o.flags.dependsOn,i[r++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,i[r++]=61440&o.flags.degradationPriority,i[r++]=15&o.flags.degradationPriority,i[r++]=(4278190080&o.compositionTimeOffset)>>>24,i[r++]=(16711680&o.compositionTimeOffset)>>>16,i[r++]=(65280&o.compositionTimeOffset)>>>8,i[r++]=255&o.compositionTimeOffset;return n(S.trun,i)},B=function(e,t){var r,i,a,s,o,u;for(t+=20+8*(s=e.samples||[]).length,a=F(s,t),(r=new Uint8Array(a.length+8*s.length)).set(a),i=a.length,u=0;u>>24,r[i++]=(16711680&o.duration)>>>16,r[i++]=(65280&o.duration)>>>8,r[i++]=255&o.duration,r[i++]=(4278190080&o.size)>>>24,r[i++]=(16711680&o.size)>>>16,r[i++]=(65280&o.size)>>>8,r[i++]=255&o.size;return n(S.trun,r)},w=function(e,t){return"audio"===e.type?B(e,t):q(e,t)};a=function(){return n(S.ftyp,E,k,E,C)};var G,X,Y,K,$,Q,J,Z,ee=function(e){return n(S.mdat,e)},te=u,ne=function(e){var t,n=a(),r=l(e);return(t=new Uint8Array(n.byteLength+r.byteLength)).set(n),t.set(r,n.byteLength),t},re=function(e,t){var n={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return n.dataOffset=t,n.compositionTimeOffset=e.pts-e.dts,n.duration=e.duration,n.size=4*e.length,n.size+=e.byteLength,e.keyFrame&&(n.flags.dependsOn=2,n.flags.isNonSyncSample=0),n},ie=function(e){var t,n,r=[],i=[];for(i.byteLength=0,i.nalCount=0,i.duration=0,r.byteLength=0,t=0;t1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},oe=function(e,t){var n,r,i,a,s,o=t||0,u=[];for(n=0;npe/2))){for((s=he()[e.samplerate])||(s=t[0].data),o=0;o=n?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=n&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},Te=function(e){var t,n,r=[];for(t=0;t=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Ne.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},Ne.prototype.addText=function(e){this.rows[this.rowIdx]+=e},Ne.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var Me=function(e,t,n){this.serviceNum=e,this.text="",this.currentWindow=new Ne(-1),this.windows=[],this.stream=n,"string"==typeof t&&this.createTextDecoder(t)};Me.prototype.init=function(e,t){this.startPts=e;for(var n=0;n<8;n++)this.windows[n]=new Ne(n),"function"==typeof t&&(this.windows[n].beforeRowOverflow=t)},Me.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},Me.prototype.createTextDecoder=function(e){if("undefined"==typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+e+" encoding. "+t})}};var Ue=function e(t){t=t||{},e.prototype.init.call(this);var n,r=this,i=t.captionServices||{},a={};Object.keys(i).forEach((function(e){n=i[e],/^SERVICE/.test(e)&&(a[e]=n.encoding)})),this.serviceEncodings=a,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(r.new708Packet(),r.add708Bytes(e)):(null===r.current708Packet&&r.new708Packet(),r.add708Bytes(e))}};Ue.prototype=new H,Ue.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Ue.prototype.add708Bytes=function(e){var t=e.ccData,n=t>>>8,r=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(n),this.current708Packet.data.push(r)},Ue.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,n=null,r=null,i=0,a=t[i++];for(e.seq=a>>6,e.sizeCode=63&a;i>5)&&r>0&&(n=a=t[i++]),this.pushServiceBlock(n,i,r),r>0&&(i+=r-1)},Ue.prototype.pushServiceBlock=function(e,t,n){var r,i=t,a=this.current708Packet.data,s=this.services[e];for(s||(s=this.initService(e,i));i>5,a.rowLock=(16&r)>>4,a.columnLock=(8&r)>>3,a.priority=7&r,r=n[++e],a.relativePositioning=(128&r)>>7,a.anchorVertical=127&r,r=n[++e],a.anchorHorizontal=r,r=n[++e],a.anchorPoint=(240&r)>>4,a.rowCount=15&r,r=n[++e],a.columnCount=63&r,r=n[++e],a.windowStyle=(56&r)>>3,a.penStyle=7&r,a.virtualRowCount=a.rowCount+1,e},Ue.prototype.setWindowAttributes=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.winAttr;return r=n[++e],i.fillOpacity=(192&r)>>6,i.fillRed=(48&r)>>4,i.fillGreen=(12&r)>>2,i.fillBlue=3&r,r=n[++e],i.borderType=(192&r)>>6,i.borderRed=(48&r)>>4,i.borderGreen=(12&r)>>2,i.borderBlue=3&r,r=n[++e],i.borderType+=(128&r)>>5,i.wordWrap=(64&r)>>6,i.printDirection=(48&r)>>4,i.scrollDirection=(12&r)>>2,i.justify=3&r,r=n[++e],i.effectSpeed=(240&r)>>4,i.effectDirection=(12&r)>>2,i.displayEffect=3&r,e},Ue.prototype.flushDisplayed=function(e,t){for(var n=[],r=0;r<8;r++)t.windows[r].visible&&!t.windows[r].isEmpty()&&n.push(t.windows[r].getText());t.endPts=e,t.text=n.join("\n\n"),this.pushCaption(t),t.startPts=e},Ue.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},Ue.prototype.displayWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<>4,i.offset=(12&r)>>2,i.penSize=3&r,r=n[++e],i.italics=(128&r)>>7,i.underline=(64&r)>>6,i.edgeType=(56&r)>>3,i.fontStyle=7&r,e},Ue.prototype.setPenColor=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penColor;return r=n[++e],i.fgOpacity=(192&r)>>6,i.fgRed=(48&r)>>4,i.fgGreen=(12&r)>>2,i.fgBlue=3&r,r=n[++e],i.bgOpacity=(192&r)>>6,i.bgRed=(48&r)>>4,i.bgGreen=(12&r)>>2,i.bgBlue=3&r,r=n[++e],i.edgeRed=(48&r)>>4,i.edgeGreen=(12&r)>>2,i.edgeBlue=3&r,e},Ue.prototype.setPenLocation=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,r=n[++e],i.row=15&r,r=n[++e],i.column=63&r,e},Ue.prototype.reset=function(e,t){var n=this.getPts(e);return this.flushDisplayed(n,t),this.initService(t.serviceNum,e)};var je={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},Be=function(e){return null===e?"":(e=je[e]||e,String.fromCharCode(e))},qe=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Fe=function(){for(var e=[],t=15;t--;)e.push("");return e},He=function e(t,n){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=n||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,n,r,i,a;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),r=t>>>8,i=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=Fe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Fe();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=Fe()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(r,i))a=Be((r=(3&r)<<8)|i),this[this.mode_](e.pts,a),this.column_++;else if(this.isExtCharacter(r,i))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),a=Be((r=(3&r)<<8)|i),this[this.mode_](e.pts,a),this.column_++;else if(this.isMidRowCode(r,i))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&i)&&this.addFormatting(e.pts,["i"]),1==(1&i)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(r,i))this.column_+=3&i;else if(this.isPAC(r,i)){var s=qe.indexOf(7968&t);"rollUp"===this.mode_&&(s-this.rollUpRows_+1<0&&(s=this.rollUpRows_-1),this.setRollUp(e.pts,s)),s!==this.row_&&(this.clearFormatting(e.pts),this.row_=s),1&i&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(i)&&14==(14&i)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(r)&&(0===i&&(i=null),a=Be(r),a+=Be(i),this[this.mode_](e.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};He.prototype=new H,He.prototype.flushDisplayed=function(e){var t=this.displayed_.map((function(e,t){try{return e.trim()}catch(e){return this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+t+"."}),""}}),this).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},He.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Fe(),this.nonDisplayed_=Fe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},He.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},He.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},He.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},He.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},He.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},He.prototype.isPAC=function(e,t){return e>=this.BASE_&&e=64&&t<=127},He.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},He.prototype.isNormalChar=function(e){return e>=32&&e<=127},He.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=Fe(),this.displayed_=Fe()),void 0!==t&&t!==this.row_)for(var n=0;n"}),"");this[this.mode_](e,n)},He.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+""}),"");this.formatting_=[],this[this.mode_](e,t)}},He.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_];n+=t,this.nonDisplayed_[this.row_]=n},He.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},He.prototype.shiftRowsUp_=function(){var e;for(e=0;et&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},Ge=function e(t){var n,r;e.prototype.init.call(this),this.type_=t||"shared",this.push=function(e){"shared"!==this.type_&&e.type!==this.type_||(void 0===r&&(r=e.dts),e.dts=ze(e.dts,r),e.pts=ze(e.pts,r),n=e.dts,this.trigger("data",e))},this.flush=function(){r=n,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){r=void 0,n=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Ge.prototype=new H;var Xe,Ye=Ge,Ke=ze,$e=function(e,t,n){var r,i="";for(r=t;r>>2;c*=4,c+=3&l[7],o.timeStamp=c,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger("timestamp",o)}t.frames.push(o),n+=10,n+=s}while(n>>4>1&&(r+=t[r]+1),0===n.pid)n.type="pat",e(t.subarray(r),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",e(t.subarray(r),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,r,n]):this.processPes_(t,r,n)},this.processPes_=function(e,t,n){n.pid===this.programMapTable.video?n.streamType=We.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=We.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}}).prototype=new H,tt.STREAM_TYPES={h264:27,adts:15},(nt=function(){var e,t=this,n=!1,r={data:[],size:0},i={data:[],size:0},a={data:[],size:0},s=function(e,n,r){var i,a,s=new Uint8Array(e.size),o={type:n},u=0,l=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,u=0;u>>3,d.pts*=4,d.pts+=(6&c[13])>>>1,d.dts=d.pts,64&h&&(d.dts=(14&c[14])<<27|(255&c[15])<<20|(254&c[16])<<12|(255&c[17])<<5|(254&c[18])>>>3,d.dts*=4,d.dts+=(6&c[18])>>>1)),d.data=c.subarray(9+c[8])),i="video"===n||o.packetLength<=e.size,(r||i)&&(e.size=0,e.data.length=0),i&&t.trigger("data",o)}};nt.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case We.H264_STREAM_TYPE:e=r,t="video";break;case We.ADTS_STREAM_TYPE:e=i,t="audio";break;case We.METADATA_STREAM_TYPE:e=a,t="timed-metadata";break;default:return}o.payloadUnitStartIndicator&&s(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var r={type:"metadata",tracks:[]};null!==(e=o.programMapTable).video&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),n=!0,t.trigger("data",r)}})[o.type]()},this.reset=function(){r.size=0,r.data.length=0,i.size=0,i.data.length=0,this.trigger("reset")},this.flushStreams_=function(){s(r,"video"),s(i,"audio"),s(a,"timed-metadata")},this.flush=function(){if(!n&&e){var r={type:"metadata",tracks:[]};null!==e.video&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",r)}n=!1,this.flushStreams_(),this.trigger("done")}}).prototype=new H;var at={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:et,TransportParseStream:tt,ElementaryStream:nt,TimestampRolloverStream:it,CaptionStream:Ve.CaptionStream,Cea608Stream:Ve.Cea608Stream,Cea708Stream:Ve.Cea708Stream,MetadataStream:rt};for(var st in We)We.hasOwnProperty(st)&&(at[st]=We[st]);var ot,ut=at,lt=pe,ct=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(ot=function(e){var t,n=0;ot.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger("log",{level:"warn",message:"adts skiping bytes "+e+" to "+t+" in frame "+n+" outside syncword"})},this.push=function(r){var i,a,s,o,u,l=0;if(e||(n=0),"audio"===r.type){var c;for(t&&t.length?(s=t,(t=new Uint8Array(s.byteLength+r.data.byteLength)).set(s),t.set(r.data,s.byteLength)):t=r.data;l+7>5,u=(o=1024*(1+(3&t[l+6])))*lt/ct[(60&t[l+2])>>>2],t.byteLength-l>>6&3),channelcount:(1&t[l+2])<<2|(192&t[l+3])>>>6,samplerate:ct[(60&t[l+2])>>>2],samplingfrequencyindex:(60&t[l+2])>>>2,samplesize:16,data:t.subarray(l+7+a,l+i)}),n++,l+=i}else"number"!=typeof c&&(c=l),l++;"number"==typeof c&&(this.skipWarn_(c,l),c=null),t=t.subarray(l)}},this.flush=function(){n=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}}).prototype=new H;var dt,ht,pt,ft=ot,mt=function(e){var t=e.byteLength,n=0,r=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+r},this.loadWord=function(){var i=e.byteLength-t,a=new Uint8Array(4),s=Math.min(4,t);if(0===s)throw new Error("no bytes available");a.set(e.subarray(i,i+s)),n=new DataView(a.buffer).getUint32(0),r=8*s,t-=s},this.skipBits=function(e){var i;r>e?(n<<=e,r-=e):(e-=r,e-=8*(i=Math.floor(e/8)),t-=i,this.loadWord(),n<<=e,r-=e)},this.readBits=function(e){var i=Math.min(r,e),a=n>>>32-i;return(r-=i)>0?n<<=i:t>0&&this.loadWord(),(i=e-i)>0?a<>>e))return n<<=e,r-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(ht=function(){var e,t,n=0;ht.prototype.init.call(this),this.push=function(r){var i;t?((i=new Uint8Array(t.byteLength+r.data.byteLength)).set(t),i.set(r.data,t.byteLength),t=i):t=r.data;for(var a=t.byteLength;n3&&this.trigger("data",t.subarray(n+3)),t=null,n=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}}).prototype=new H,pt={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(dt=function(){var e,t,n,r,i,a,s,o=new ht;dt.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,n=e.pts,r=e.dts,o.push(e))},o.on("data",(function(s){var o={trackId:t,pts:n,dts:r,data:s,nalUnitTypeCode:31&s[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp",o.escapedRBSP=i(s.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp",o.escapedRBSP=i(s.subarray(1)),o.config=a(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",o)})),o.on("done",(function(){e.trigger("done")})),o.on("partialdone",(function(){e.trigger("partialdone")})),o.on("reset",(function(){e.trigger("reset")})),o.on("endedtimeline",(function(){e.trigger("endedtimeline")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},s=function(e,t){var n,r=8,i=8;for(n=0;n=0?n:0,(16&e[t+5])>>4?n+20:n+10},bt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Tt={isLikelyAacData:function(e){var t=function e(t,n){return t.length-n<10||t[n]!=="I".charCodeAt(0)||t[n+1]!=="D".charCodeAt(0)||t[n+2]!=="3".charCodeAt(0)?n:e(t,n+=_t(t,n))}(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},parseId3TagSize:_t,parseAdtsSize:function(e,t){var n=(224&e[t+5])>>5,r=e[t+4]<<3;return 6144&e[t+3]|r|n},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5>>2];t++}return null},parseAacTimestamp:function(e){var t,n,r;t=10,64&e[5]&&(t+=4,t+=bt(e.subarray(10,14)));do{if((n=bt(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){r=e.subarray(t+10,t+n+10);for(var i=0;i>>2;return s*=4,s+=3&a[7]}break}}t+=10,t+=n}while(t=3;)if(e[u]!=="I".charCodeAt(0)||e[u+1]!=="D".charCodeAt(0)||e[u+2]!=="3".charCodeAt(0))if(255!=(255&e[u])||240!=(240&e[u+1]))u++;else{if(e.length-u<7)break;if(u+(o=Tt.parseAdtsSize(e,u))>e.length)break;a={type:"audio",data:e.subarray(u,u+o),pts:t,dts:t},this.trigger("data",a),u+=o}else{if(e.length-u<10)break;if(u+(o=Tt.parseId3TagSize(e,u))>e.length)break;i={type:"timed-metadata",data:e.subarray(u,u+o)},this.trigger("data",i),u+=o}r=e.length-u,e=r>0?e.subarray(u):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new H;var wt,St,Et,kt,Ct=gt,xt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],At=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Ot=yt.H264Stream,It=Tt.isLikelyAacData,Pt=pe,Lt=function(e,t){t.stream=e,this.trigger("log",t)},Dt=function(e,t){for(var n=Object.keys(t),r=0;r=-1e4&&n<=45e3&&(!r||o>n)&&(r=a,o=n));return r?r.gop:null},this.alignGopsAtStart_=function(e){var t,n,r,i,a,o,u,l;for(a=e.byteLength,o=e.nalCount,u=e.duration,t=n=0;tr.pts?t++:(n++,a-=i.byteLength,o-=i.nalCount,u-=i.duration);return 0===n?e:n===e.length?null:((l=e.slice(n)).byteLength=a,l.duration=u,l.nalCount=o,l.pts=l[0].pts,l.dts=l[0].dts,l)},this.alignGopsAtEnd_=function(e){var t,n,r,i,a,o,u;for(t=s.length-1,n=e.length-1,a=null,o=!1;t>=0&&n>=0;){if(r=s[t],i=e[n],r.pts===i.pts){o=!0;break}r.pts>i.pts?t--:(t===s.length-1&&(a=n),n--)}if(!o&&null===a)return null;if(0===(u=o?n:a))return e;var l=e.slice(u),c=l.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return l.byteLength=c.byteLength,l.duration=c.duration,l.nalCount=c.nalCount,l.pts=l[0].pts,l.dts=l[0].dts,l},this.alignGopsWith=function(e){s=e}}).prototype=new H,(kt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,kt.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}}).prototype=new H,kt.prototype.flush=function(e){var t,n,r,i,a=0,s={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,At.forEach((function(e){s.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,xt.forEach((function(e){s.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?s.type=this.pendingTracks[0].type:s.type="combined",this.emittedTracks+=this.pendingTracks.length,r=ne(this.pendingTracks),s.initSegment=new Uint8Array(r.byteLength),s.initSegment.set(r),s.data=new Uint8Array(this.pendingBytes),i=0;i=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},kt.prototype.setRemux=function(e){this.remuxTracks=e},(Et=function(e){var t,n,r=this,i=!0;Et.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="aac",i.metadataStream=new ut.MetadataStream,i.aacStream=new Ct,i.audioTimestampRolloverStream=new ut.TimestampRolloverStream("audio"),i.timedMetadataTimestampRolloverStream=new ut.TimestampRolloverStream("timed-metadata"),i.adtsStream=new ft,i.coalesceStream=new kt(e,i.metadataStream),i.headOfPipeline=i.aacStream,i.aacStream.pipe(i.audioTimestampRolloverStream).pipe(i.adtsStream),i.aacStream.pipe(i.timedMetadataTimestampRolloverStream).pipe(i.metadataStream).pipe(i.coalesceStream),i.metadataStream.on("timestamp",(function(e){i.aacStream.setTimestamp(e.timeStamp)})),i.aacStream.on("data",(function(a){"timed-metadata"!==a.type&&"audio"!==a.type||i.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new St(n,e),i.audioSegmentStream.on("log",r.getLogTrigger_("audioSegmentStream")),i.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream),r.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t}))})),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("done",this.trigger.bind(this,"done")),Dt(this,i)},this.setupTsPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="ts",i.metadataStream=new ut.MetadataStream,i.packetStream=new ut.TransportPacketStream,i.parseStream=new ut.TransportParseStream,i.elementaryStream=new ut.ElementaryStream,i.timestampRolloverStream=new ut.TimestampRolloverStream,i.adtsStream=new ft,i.h264Stream=new Ot,i.captionStream=new ut.CaptionStream(e),i.coalesceStream=new kt(e,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream).pipe(i.timestampRolloverStream),i.timestampRolloverStream.pipe(i.h264Stream),i.timestampRolloverStream.pipe(i.adtsStream),i.timestampRolloverStream.pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",(function(a){var s;if("metadata"===a.type){for(s=a.tracks.length;s--;)t||"video"!==a.tracks[s].type?n||"audio"!==a.tracks[s].type||((n=a.tracks[s]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime):(t=a.tracks[s]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime;t&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new wt(t,e),i.videoSegmentStream.on("log",r.getLogTrigger_("videoSegmentStream")),i.videoSegmentStream.on("timelineStartInfo",(function(t){n&&!e.keepOriginalTimestamps&&(n.timelineStartInfo=t,i.audioSegmentStream.setEarliestDts(t.dts-r.baseMediaDecodeTime))})),i.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo")),i.videoSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"videoSegmentTimingInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",(function(e){n&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),i.videoSegmentStream.on("timingInfo",r.trigger.bind(r,"videoTimingInfo")),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),n&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new St(n,e),i.audioSegmentStream.on("log",r.getLogTrigger_("audioSegmentStream")),i.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),i.audioSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"audioSegmentTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream)),r.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t})}})),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("id3Frame",(function(e){e.dispatchType=i.metadataStream.dispatchType,r.trigger("id3Frame",e)})),i.coalesceStream.on("caption",this.trigger.bind(this,"caption")),i.coalesceStream.on("done",this.trigger.bind(this,"done")),Dt(this,i)},this.setBaseMediaDecodeTime=function(r){var i=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=r),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,Ee(n),i.audioTimestampRolloverStream&&i.audioTimestampRolloverStream.discontinuity()),t&&(i.videoSegmentStream&&(i.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,Ee(t),i.captionStream.reset()),i.timestampRolloverStream&&i.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var n=this.transmuxPipeline_;e.remux=t,n&&n.coalesceStream&&n.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(n){n.stream=e,t.trigger("log",n)}},this.push=function(e){if(i){var t=It(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){i=!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()}}).prototype=new H;var Mt,Ut,jt,Bt={Transmuxer:Et,VideoSegmentStream:wt,AudioSegmentStream:St,AUDIO_PROPERTIES:xt,VIDEO_PROPERTIES:At,generateSegmentTimingInfo:Nt},qt=function(e){return e>>>0},Ft=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},Ht=qt,Vt=function e(t,n){var r,i,a,s,o,u=[];if(!n.length)return null;for(r=0;r1?r+i:t.byteLength,a===n[0]&&(1===n.length?u.push(t.subarray(r+8,s)):(o=e(t.subarray(r+8,s),n.slice(1))).length&&(u=u.concat(o))),r=s;return u},Wt=qt,zt=W.getUint64,Gt=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=zt(e.subarray(4)):t.baseMediaDecodeTime=Wt(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},Xt=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},Yt=function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},r=new DataView(e.buffer,e.byteOffset,e.byteLength),i=1&n.flags[2],a=4&n.flags[2],s=1&n.flags[1],o=2&n.flags[1],u=4&n.flags[1],l=8&n.flags[1],c=r.getUint32(4),d=8;for(i&&(n.dataOffset=r.getInt32(d),d+=4),a&&c&&(t={flags:Xt(e.subarray(d,d+4))},d+=4,s&&(t.duration=r.getUint32(d),d+=4),o&&(t.size=r.getUint32(d),d+=4),l&&(1===n.version?t.compositionTimeOffset=r.getInt32(d):t.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(t),c--);c--;)t={},s&&(t.duration=r.getUint32(d),d+=4),o&&(t.size=r.getUint32(d),d+=4),u&&(t.flags=Xt(e.subarray(d,d+4)),d+=4),l&&(1===n.version?t.compositionTimeOffset=r.getInt32(d):t.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(t);return n},Kt=function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},i=1&r.flags[2],a=2&r.flags[2],s=8&r.flags[2],o=16&r.flags[2],u=32&r.flags[2],l=65536&r.flags[0],c=131072&r.flags[0];return t=8,i&&(t+=4,r.baseDataOffset=n.getUint32(12),t+=4),a&&(r.sampleDescriptionIndex=n.getUint32(t),t+=4),s&&(r.defaultSampleDuration=n.getUint32(t),t+=4),o&&(r.defaultSampleSize=n.getUint32(t),t+=4),u&&(r.defaultSampleFlags=n.getUint32(t)),l&&(r.durationIsEmpty=!0),!i&&c&&(r.baseDataOffsetIsMoof=!0),r},$t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},Qt="undefined"!=typeof window?window:void 0!==$t?$t:"undefined"!=typeof self?self:{},Jt=Ie,Zt=Ve.CaptionStream,en=function(e,t){for(var n=e,r=0;r0?Gt(l[0]).baseMediaDecodeTime:0,d=Vt(a,["trun"]);t===u&&d.length>0&&(n=function(e,t,n){var r,i,a,s,o=new DataView(e.buffer,e.byteOffset,e.byteLength),u={logs:[],seiNals:[]};for(i=0;i+40;){var u=t.shift();this.parse(u,a,s)}return(o=function(e,t,n){if(null===t)return null;var r=tn(e,t)[t]||{};return{seiNals:r.seiNals,logs:r.logs,timescale:n}}(e,n,r))&&o.logs&&(i.logs=i.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),i):i.logs.length?{logs:i.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;a?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){i.captions=[],i.captionStreams={},i.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],n=null,r=null,i?this.clearParsedCaptions():i={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},rn=qt,an=function(e){return("00"+e.toString(16)).slice(-2)},sn=W.getUint64;Mt=function(e,t){var n=Vt(t,["moof","traf"]).reduce((function(t,n){var r,i,a=Vt(n,["tfhd"])[0],s=rn(a[4]<<24|a[5]<<16|a[6]<<8|a[7]),o=e[s]||9e4,u=Vt(n,["tfdt"])[0],l=new DataView(u.buffer,u.byteOffset,u.byteLength);return"bigint"==typeof(r=1===u[0]?sn(u.subarray(4,12)):l.getUint32(4))?i=r/Qt.BigInt(o):"number"!=typeof r||isNaN(r)||(i=r/o),i11?(i.codec+=".",i.codec+=an(c[9]),i.codec+=an(c[10]),i.codec+=an(c[11])):i.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(i.codec)?(c=d.subarray(28),"esds"===Ft(c.subarray(4,8))&&c.length>20&&0!==c[19]?(i.codec+="."+an(c[19]),i.codec+="."+an(c[20]>>>2&63).replace(/^0/,"")):i.codec="mp4a.40.2"):i.codec=i.codec.toLowerCase())}var h=Vt(e,["mdia","mdhd"])[0];h&&(i.timescale=jt(h)),n.push(i)})),n};var on=Mt,un=Ut,ln=(jt=function(e){var t=0===e[0]?12:20;return rn(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},function(e){var t=31&e[1];return t<<=8,t|=e[2]}),cn=function(e){return!!(64&e[1])},dn=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},hn=function(e){switch(e){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}},pn={parseType:function(e,t){var n=ln(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=cn(e),n=4+dn(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=cn(e),r=4+dn(e);if(n&&(r+=e[r]+1),1&e[r+5]){var i;i=3+((15&e[r+1])<<8|e[r+2])-4;for(var a=12+((15&e[r+10])<<8|e[r+11]);a=e.byteLength)return null;var n,r=null;return 192&(n=e[t+7])&&((r={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,r.pts*=4,r.pts+=(6&e[t+13])>>>1,r.dts=r.pts,64&n&&(r.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,r.dts*=4,r.dts+=(6&e[t+18])>>>1)),r},videoPacketContainsKeyFrame:function(e){for(var t=4+dn(e),n=e.subarray(t),r=0,i=0,a=!1;i3&&"slice_layer_without_partitioning_rbsp_idr"===hn(31&n[i+3])&&(a=!0),a}},fn=Ke,mn={};mn.ts=pn,mn.aac=Tt;var gn=pe,yn=function(e,t,n){for(var r,i,a,s,o=0,u=188,l=!1;u<=e.byteLength;)if(71!==e[o]||71!==e[u]&&u!==e.byteLength)o++,u++;else{switch(r=e.subarray(o,u),mn.ts.parseType(r,t.pid)){case"pes":i=mn.ts.parsePesType(r,t.table),a=mn.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=mn.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),l=!0)}if(l)break;o+=188,u+=188}for(o=(u=e.byteLength)-188,l=!1;o>=0;)if(71!==e[o]||71!==e[u]&&u!==e.byteLength)o--,u--;else{switch(r=e.subarray(o,u),mn.ts.parseType(r,t.pid)){case"pes":i=mn.ts.parsePesType(r,t.table),a=mn.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=mn.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),l=!0)}if(l)break;o-=188,u-=188}},vn=function(e,t,n){for(var r,i,a,s,o,u,l,c=0,d=188,h=!1,p={data:[],size:0};d=0;)if(71!==e[c]||71!==e[d])c--,d--;else{switch(r=e.subarray(c,d),mn.ts.parseType(r,t.pid)){case"pes":i=mn.ts.parsePesType(r,t.table),a=mn.ts.parsePayloadUnitStartIndicator(r),"video"===i&&a&&(s=mn.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),h=!0)}if(h)break;c-=188,d-=188}},_n=function(e){var t={pid:null,table:null},n={};for(var r in function(e,t){for(var n,r=0,i=188;i=3;){switch(mn.aac.parseType(e,o)){case"timed-metadata":if(e.length-o<10){n=!0;break}if((s=mn.aac.parseId3TagSize(e,o))>e.length){n=!0;break}null===a&&(t=e.subarray(o,o+s),a=mn.aac.parseAacTimestamp(t)),o+=s;break;case"audio":if(e.length-o<7){n=!0;break}if((s=mn.aac.parseAdtsSize(e,o))>e.length){n=!0;break}null===i&&(t=e.subarray(o,o+s),i=mn.aac.parseSampleRate(t)),r++,o+=s;break;default:o++}if(n)return null}if(null===i||null===a)return null;var u=gn/i;return{audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+1024*r*u,pts:a+1024*r*u}]}}(e):_n(e))&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;(void 0===n||isNaN(n))&&(n=e.audio[0].dts),e.audio.forEach((function(e){e.dts=fn(e.dts,n),e.pts=fn(e.pts,n),e.dtsTime=e.dts/gn,e.ptsTime=e.pts/gn}))}if(e.video&&e.video.length){var r=t;if((void 0===r||isNaN(r))&&(r=e.video[0].dts),e.video.forEach((function(e){e.dts=fn(e.dts,r),e.pts=fn(e.pts,r),e.dtsTime=e.dts/gn,e.ptsTime=e.pts/gn})),e.firstKeyFrame){var i=e.firstKeyFrame;i.dts=fn(i.dts,r),i.pts=fn(i.pts,r),i.dtsTime=i.dts/gn,i.ptsTime=i.pts/gn}}}(n,t),n):null},Tn=function(){function e(e,t){this.options=t||{},this.self=e,this.init()}var t=e.prototype;return t.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Bt.Transmuxer(this.options),function(e,t){t.on("data",(function(t){var n=t.initSegment;t.initSegment={data:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength};var r=t.data;t.data=r.buffer,e.postMessage({action:"data",segment:t,byteOffset:r.byteOffset,byteLength:r.byteLength},[t.data])})),t.on("done",(function(t){e.postMessage({action:"done"})})),t.on("gopInfo",(function(t){e.postMessage({action:"gopInfo",gopInfo:t})})),t.on("videoSegmentTimingInfo",(function(t){var n={start:{decode:me(t.start.dts),presentation:me(t.start.pts)},end:{decode:me(t.end.dts),presentation:me(t.end.pts)},baseMediaDecodeTime:me(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=me(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:n})})),t.on("audioSegmentTimingInfo",(function(t){var n={start:{decode:me(t.start.dts),presentation:me(t.start.pts)},end:{decode:me(t.end.dts),presentation:me(t.end.pts)},baseMediaDecodeTime:me(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=me(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:n})})),t.on("id3Frame",(function(t){e.postMessage({action:"id3Frame",id3Frame:t})})),t.on("caption",(function(t){e.postMessage({action:"caption",caption:t})})),t.on("trackinfo",(function(t){e.postMessage({action:"trackinfo",trackInfo:t})})),t.on("audioTimingInfo",(function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:me(t.start),end:me(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:me(t.start),end:me(t.end)}})})),t.on("log",(function(t){e.postMessage({action:"log",log:t})}))}(this.self,this.transmuxer)},t.pushMp4Captions=function(e){this.captionParser||(this.captionParser=new nn,this.captionParser.init());var t=new Uint8Array(e.data,e.byteOffset,e.byteLength),n=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:n&&n.captions||[],logs:n&&n.logs||[],data:t.buffer},[t.buffer])},t.probeMp4StartTime=function(e){var t=e.timescales,n=e.data,r=on(t,n);this.self.postMessage({action:"probeMp4StartTime",startTime:r,data:n},[n.buffer])},t.probeMp4Tracks=function(e){var t=e.data,n=un(t);this.self.postMessage({action:"probeMp4Tracks",tracks:n,data:t},[t.buffer])},t.probeTs=function(e){var t=e.data,n=e.baseStartTime,r="number"!=typeof n||isNaN(n)?void 0:n*pe,i=bn(t,r),a=null;i&&((a={hasVideo:i.video&&2===i.video.length||!1,hasAudio:i.audio&&2===i.audio.length||!1}).hasVideo&&(a.videoStart=i.video[0].ptsTime),a.hasAudio&&(a.audioStart=i.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:a,data:t},[t.buffer])},t.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},t.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},t.push=function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)},t.reset=function(){this.transmuxer.reset()},t.setTimestampOffset=function(e){var t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(fe(t)))},t.setAudioAppendStart=function(e){this.transmuxer.setAudioAppendStart(Math.ceil(fe(e.appendStart)))},t.setRemux=function(e){this.transmuxer.setRemux(e.remux)},t.flush=function(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})},t.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})},t.alignGopsWith=function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())},e}();self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new Tn(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new Tn(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})))),ms=function(e){var t=e.transmuxer,n=e.bytes,r=e.audioAppendStart,i=e.gopsToAlignWith,a=e.remux,s=e.onData,o=e.onTrackInfo,u=e.onAudioTimingInfo,l=e.onVideoTimingInfo,c=e.onVideoSegmentTimingInfo,d=e.onAudioSegmentTimingInfo,h=e.onId3,p=e.onCaptions,f=e.onDone,m=e.onEndedTimeline,g=e.onTransmuxerLog,y=e.isEndOfTimeline,v={buffer:[]},_=y;if(t.onmessage=function(n){t.currentTransmux===e&&("data"===n.data.action&&function(e,t,n){var r=e.data.segment,i=r.type,a=r.initSegment,s=r.captions,o=r.captionStreams,u=r.metadata,l=r.videoFrameDtsTime,c=r.videoFramePtsTime;t.buffer.push({captions:s,captionStreams:o,metadata:u});var d=e.data.segment.boxes||{data:e.data.segment.data},h={type:i,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(a.data,a.byteOffset,a.byteLength)};void 0!==l&&(h.videoFrameDtsTime=l),void 0!==c&&(h.videoFramePtsTime=c),n(h)}(n,v,s),"trackinfo"===n.data.action&&o(n.data.trackInfo),"gopInfo"===n.data.action&&function(e,t){t.gopInfo=e.data.gopInfo}(n,v),"audioTimingInfo"===n.data.action&&u(n.data.audioTimingInfo),"videoTimingInfo"===n.data.action&&l(n.data.videoTimingInfo),"videoSegmentTimingInfo"===n.data.action&&c(n.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===n.data.action&&d(n.data.audioSegmentTimingInfo),"id3Frame"===n.data.action&&h([n.data.id3Frame],n.data.id3Frame.dispatchType),"caption"===n.data.action&&p(n.data.caption),"endedtimeline"===n.data.action&&(_=!1,m()),"log"===n.data.action&&g(n.data.log),"transmuxed"===n.data.type&&(_||(t.onmessage=null,function(e){var t=e.transmuxedData,n=e.callback;t.buffer=[],n(t)}({transmuxedData:v,callback:f}),gs(t))))},r&&t.postMessage({action:"setAudioAppendStart",appendStart:r}),Array.isArray(i)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:i}),void 0!==a&&t.postMessage({action:"setRemux",remux:a}),n.byteLength){var b=n instanceof ArrayBuffer?n:n.buffer,T=n instanceof ArrayBuffer?0:n.byteOffset;t.postMessage({action:"push",data:b,byteOffset:T,byteLength:n.byteLength},[b])}y&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},gs=function(e){e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"==typeof e.currentTransmux?e.currentTransmux():ms(e.currentTransmux))},ys=function(e,t){e.postMessage({action:t}),gs(e)},vs=function(e,t){if(!t.currentTransmux)return t.currentTransmux=e,void ys(t,e);t.transmuxQueue.push(ys.bind(null,t,e))},_s=function(e){if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ms(e);e.transmuxer.transmuxQueue.push(e)},bs=function(e){vs("reset",e)},Ts=function(e){var t=new fs;t.currentTransmux=null,t.transmuxQueue=[];var n=t.terminate;return t.terminate=function(){return t.currentTransmux=null,t.transmuxQueue.length=0,n.call(t)},t.postMessage({action:"init",options:e}),t},ws=function(e){var t=e.transmuxer,n=e.endAction||e.action,r=e.callback,i=l()({},e,{endAction:null,transmuxer:null,callback:null});if(t.addEventListener("message",(function i(a){a.data.action===n&&(t.removeEventListener("message",i),a.data.data&&(a.data.data=new Uint8Array(a.data.data,e.byteOffset||0,e.byteLength||a.data.data.byteLength),e.data&&(e.data=a.data.data)),r(a.data))})),e.data){var a=e.data instanceof ArrayBuffer;i.byteOffset=a?0:e.data.byteOffset,i.byteLength=e.data.byteLength;var s=[a?e.data:e.data.buffer];t.postMessage(i,s)}else t.postMessage(i)},Ss=2,Es=-101,ks=-102,Cs=function(e){e.forEach((function(e){e.abort()}))},xs=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:Es,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:ks,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:Ss,xhr:t}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:Ss,xhr:t}:null},As=function(e,t,n){return function(r,i){var a=i.response,s=xs(r,i);if(s)return n(s,e);if(16!==a.byteLength)return n({status:i.status,message:"Invalid HLS key at URL: "+i.uri,code:Ss,xhr:i},e);for(var o=new DataView(a),u=new Uint32Array([o.getUint32(0),o.getUint32(4),o.getUint32(8),o.getUint32(12)]),l=0;l1)return Us("multiple "+e+" codecs found as attributes: "+t[e].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs."),void(t[e]=null);t[e]=t[e][0]})),t},qs=function(e){var t=0;return e.audio&&t++,e.video&&t++,t},Fs=function(e,t){var n=t.attributes||{},r=Bs(function(e){var t=e.attributes||{};if(t.CODECS)return Object(A.h)(t.CODECS)}(t)||[]);if(js(e,t)&&!r.audio&&!function(e,t){if(!js(e,t))return!0;var n=t.attributes||{},r=e.mediaGroups.AUDIO[n.AUDIO];for(var i in r)if(!r[i].uri&&!r[i].playlists)return!0;return!1}(e,t)){var i=Bs(Object(A.d)(e,n.AUDIO)||[]);i.audio&&(r.audio=i.audio)}return r},Hs=Ji("PlaylistSelector"),Vs=function(e){if(e&&e.playlist){var t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})}},Ws=function(e,t){if(!e)return"";var n=a.a.getComputedStyle(e);return n?n[t]:""},zs=function(e,t){var n=e.slice();e.sort((function(e,r){var i=t(e,r);return 0===i?n.indexOf(e)-n.indexOf(r):i}))},Gs=function(e,t){var n,r;return e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||a.a.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(r=t.attributes.BANDWIDTH),n-(r=r||a.a.Number.MAX_VALUE)},Xs=function(e,t,n,r,i,s){if(e){var o={bandwidth:t,width:n,height:r,limitRenditionByPlayerDimensions:i},u=e.playlists;Ea.isAudioOnly(e)&&(u=s.getAudioTrackPlaylists_(),o.audioOnly=!0);var l=u.map((function(e){var t=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,n=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return{bandwidth:e.attributes&&e.attributes.BANDWIDTH||a.a.Number.MAX_VALUE,width:t,height:n,playlist:e}}));zs(l,(function(e,t){return e.bandwidth-t.bandwidth}));var c=(l=l.filter((function(e){return!Ea.isIncompatible(e.playlist)}))).filter((function(e){return Ea.isEnabled(e.playlist)}));c.length||(c=l.filter((function(e){return!Ea.isDisabled(e.playlist)})));var d=c.filter((function(e){return e.bandwidth*ls.BANDWIDTH_VARIANCEn||e.height>r}))).filter((function(e){return e.width===v[0].width&&e.height===v[0].height})),h=_[_.length-1],b=_.filter((function(e){return e.bandwidth===h.bandwidth}))[0]),s.experimentalLeastPixelDiffSelector){var S=g.map((function(e){return e.pixelDiff=Math.abs(e.width-n)+Math.abs(e.height-r),e}));zs(S,(function(e,t){return e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff})),T=S[0]}var E=T||b||w||p||c[0]||l[0];if(E&&E.playlist){var k="sortedPlaylistReps";return T?k="leastPixelDiffRep":b?k="resolutionPlusOneRep":w?k="resolutionBestRep":p?k="bandwidthBestRep":c[0]&&(k="enabledPlaylistReps"),Hs("choosing "+Vs(E)+" using "+k+" with options",o),E.playlist}return Hs("could not choose a playlist with options",o),null}},Ys=function(){var e=this.useDevicePixelRatio&&a.a.devicePixelRatio||1;return Xs(this.playlists.master,this.systemBandwidth,parseInt(Ws(this.tech_.el(),"width"),10)*e,parseInt(Ws(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},Ks=function(e){var t=e.inbandTextTracks,n=e.metadataArray,r=e.timestampOffset,i=e.videoDuration;if(n){var s=a.a.WebKitDataCue||a.a.VTTCue,o=t.metadataTrack_;if(o&&(n.forEach((function(e){var t=e.cueTime+r;!("number"!=typeof t||a.a.isNaN(t)||t<0)&&t<1/0&&e.frames.forEach((function(e){var n=new s(t,t,e.value||e.url||e.data||"");n.frame=e,n.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){return Xi.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return Xi.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return Xi.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(n),o.addCue(n)}))})),o.cues&&o.cues.length)){for(var u=o.cues,l=[],c=0;c=e&&i.endTime<=t&&n.removeCue(i)},Qs=function(e){return"number"==typeof e&&isFinite(e)},Js=function(e){var t=e.startOfSegment,n=e.duration,r=e.segment,i=e.part,a=e.playlist,s=a.mediaSequence,o=a.id,u=a.segments,l=void 0===u?[]:u,c=e.mediaIndex,d=e.partIndex,h=e.timeline,p=l.length-1,f="mediaIndex/partIndex increment";e.getMediaInfoForTime?f="getMediaInfoForTime ("+e.getMediaInfoForTime+")":e.isSyncRequest&&(f="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(f+=" with independent "+e.independent);var m="number"==typeof d,g=e.segment.uri?"segment":"pre-segment",y=m?ca({preloadSegment:r})-1:0;return g+" ["+(s+c)+"/"+(s+p)+"]"+(m?" part ["+d+"/"+y+"]":"")+" segment start/end ["+r.start+" => "+r.end+"]"+(m?" part start/end ["+i.start+" => "+i.end+"]":"")+" startOfSegment ["+t+"] duration ["+n+"] timeline ["+h+"] selected by ["+f+"] playlist ["+o+"]"},Zs=function(e){return e+"TimingInfo"},eo=function(e){var t=e.timelineChangeController,n=e.currentTimeline,r=e.segmentTimeline,i=e.loaderType,a=e.audioDisabled;if(n===r)return!1;if("audio"===i){var s=t.lastTimelineChange({type:"main"});return!s||s.to!==r}if("main"===i&&a){var o=t.pendingTimelineChange({type:"audio"});return!o||o.to!==r}return!1},to=function(e){var t=e.segmentDuration,n=e.maxDuration;return!!t&&Math.round(t)>n+1/30},no=function(e,t){if("hls"!==t)return null;var n,r,i=(n={audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo},r=0,["video","audio"].forEach((function(e){var t=n[e+"TimingInfo"];if(t){var i,s=t.start,o=t.end;"bigint"==typeof s||"bigint"==typeof o?i=a.a.BigInt(o)-a.a.BigInt(s):"number"==typeof s&&"number"==typeof o&&(i=o-s),void 0!==i&&i>r&&(r=i)}})),"bigint"==typeof r&&r=11,r.appendInitSegment_={audio:!0,video:!0},r.playlistOfLastInitSegment_={audio:null,video:null},r.callQueue_=[],r.loadQueue_=[],r.metadataQueue_={id3:[],caption:[]},r.waitingOnRemove_=!1,r.quotaExceededErrorRetryTimeout_=null,r.activeInitSegmentId_=null,r.initSegments_={},r.cacheEncryptionKeys_=t.cacheEncryptionKeys,r.keyCache_={},r.decrypter_=t.decrypter,r.syncController_=t.syncController,r.syncPoint_={segmentIndex:0,time:0},r.transmuxer_=r.createTransmuxer_(),r.triggerSyncInfoUpdate_=function(){return r.trigger("syncinfoupdate")},r.syncController_.on("syncinfoupdate",r.triggerSyncInfoUpdate_),r.mediaSource_.addEventListener("sourceopen",(function(){r.isEndOfStream_()||(r.ended_=!1)})),r.fetchAtBuffer_=!1,r.logger_=Ji("SegmentLoader["+r.loaderType_+"]"),Object.defineProperty(p()(r),"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e,this.trigger("statechange"))}}),r.sourceUpdater_.on("ready",(function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),"main"===r.loaderType_&&r.timelineChangeController_.on("pendingtimelinechange",(function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),"audio"===r.loaderType_&&r.timelineChangeController_.on("timelinechange",(function(){r.hasEnoughInfoToLoad_()&&r.processLoadQueue_(),r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),r}m()(t,e);var n=t.prototype;return n.createTransmuxer_=function(){return Ts({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})},n.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0},n.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&a.a.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},n.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},n.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},n.abort_=function(){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,a.a.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},n.checkForAbort_=function(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)},n.error=function(e){return void 0!==e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},n.endOfStream=function(){this.ended_=!0,this.transmuxer_&&bs(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},n.buffered_=function(){var e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Xi.createTimeRanges();if("main"===this.loaderType_){var t=e.hasAudio,n=e.hasVideo,r=e.isMuxed;if(n&&t&&!this.audioDisabled_&&!r)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=Ka(e),r=this.initSegments_[n];return t&&!r&&e.bytes&&(this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),r||e},n.segmentKey=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=$a(e),r=this.keyCache_[n];this.cacheEncryptionKeys_&&t&&!r&&e.bytes&&(this.keyCache_[n]=r={resolvedUri:e.resolvedUri,bytes:e.bytes});var i={resolvedUri:(r||e).resolvedUri};return r&&(i.bytes=r.bytes),i},n.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},n.load=function(){if(this.monitorBuffer_(),this.playlist_)return"INIT"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY"))},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.playlist=function(e,t){if(void 0===t&&(t={}),e){var n=this.playlist_,r=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));var i=null;if(n&&(n.id?i=n.id:n.uri&&(i=n.uri)),this.logger_("playlist update ["+i+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!n||n.uri!==e.uri)return null!==this.mediaIndex&&(e.endList?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");var a=e.mediaSequence-n.mediaSequence;if(this.logger_("live window shift ["+a+"]"),null!==this.mediaIndex)if(this.mediaIndex-=a,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var s=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!s.parts||!s.parts.length||!s.parts[this.partIndex])){var o=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=o}}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(n,e)}},n.pause=function(){this.checkBufferTimeout_&&(a.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},n.paused=function(){return null===this.checkBufferTimeout_},n.resetEverything=function(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"}))},n.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},n.resyncLoader=function(){this.transmuxer_&&bs(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},n.remove=function(e,t,n,r){if(void 0===n&&(n=function(){}),void 0===r&&(r=!1),t===1/0&&(t=this.duration_()),t<=e)this.logger_("skipping remove because end ${end} is <= start ${start}");else if(this.sourceUpdater_&&this.getMediaInfo_()){var i=1,a=function(){0===--i&&n()};for(var s in!r&&this.audioDisabled_||(i++,this.sourceUpdater_.removeAudio(e,t,a)),(r||"main"===this.loaderType_)&&(this.gopBuffer_=function(e,t,n,r){for(var i=Math.ceil((t-r)*M.ONE_SECOND_IN_TS),a=Math.ceil((n-r)*M.ONE_SECOND_IN_TS),s=e.slice(),o=e.length;o--&&!(e[o].pts<=a););if(-1===o)return s;for(var u=o+1;u--&&!(e[u].pts<=i););return u=Math.max(u,0),s.splice(u,o-u+1),s}(this.gopBuffer_,e,t,this.timeMapping_),i++,this.sourceUpdater_.removeVideo(e,t,a)),this.inbandTextTracks_)$s(e,t,this.inbandTextTracks_[s]);$s(e,t,this.segmentMetadataTrack_),a()}else this.logger_("skipping remove because no source updater or starting media info")},n.monitorBuffer_=function(){this.checkBufferTimeout_&&a.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=a.a.setTimeout(this.monitorBufferTick_.bind(this),1)},n.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&a.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=a.a.setTimeout(this.monitorBufferTick_.bind(this),500)},n.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){var e=this.chooseNextRequest_();e&&("number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))}},n.isEndOfStream_=function(e,t,n){if(void 0===e&&(e=this.mediaIndex),void 0===t&&(t=this.playlist_),void 0===n&&(n=this.partIndex),!t||!this.mediaSource_)return!1;var r="number"==typeof e&&t.segments[e],i=e+1===t.segments.length,a=!r||!r.parts||n+1===r.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&i&&a},n.chooseNextRequest_=function(){var e=this.buffered_(),t=ia(e)||0,n=aa(e,this.currentTime_()),r=!this.hasPlayed_()&&n>=1,i=n>=this.goalBufferLength_(),a=this.playlist_.segments;if(!a.length||r||i)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var s={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(s.isSyncRequest)s.mediaIndex=function(e,t,n){t=t||[];for(var r=[],i=0,a=0;an))return a}return 0===r.length?0:r[r.length-1]}(this.currentTimeline_,a,t);else if(null!==this.mediaIndex){var o=a[this.mediaIndex],u="number"==typeof this.partIndex?this.partIndex:-1;s.startOfSegment=o.end?o.end:t,o.parts&&o.parts[u+1]?(s.mediaIndex=this.mediaIndex,s.partIndex=u+1):s.mediaIndex=this.mediaIndex+1}else{var l=Ea.getMediaInfoForTime({experimentalExactManifestTimings:this.experimentalExactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?t:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time}),c=l.segmentIndex,d=l.startTime,h=l.partIndex;s.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+t:"currentTime "+this.currentTime_(),s.mediaIndex=c,s.startOfSegment=d,s.partIndex=h}var p=a[s.mediaIndex],f=p&&"number"==typeof s.partIndex&&p.parts&&p.parts[s.partIndex];if(!p||"number"==typeof s.partIndex&&!f)return null;if("number"!=typeof s.partIndex&&p.parts&&(s.partIndex=0,f=p.parts[0]),!n&&f&&!f.independent)if(0===s.partIndex){var m=a[s.mediaIndex-1],g=m.parts&&m.parts.length&&m.parts[m.parts.length-1];g&&g.independent&&(s.mediaIndex-=1,s.partIndex=m.parts.length-1,s.independent="previous segment")}else p.parts[s.partIndex-1].independent&&(s.partIndex-=1,s.independent="previous part");var y=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return s.mediaIndex>=a.length-1&&y&&!this.seeking_()?null:this.generateSegmentInfo_(s)},n.generateSegmentInfo_=function(e){var t=e.independent,n=e.playlist,r=e.mediaIndex,i=e.startOfSegment,a=e.isSyncRequest,s=e.partIndex,o=e.forceTimestampOffset,u=e.getMediaInfoForTime,l=n.segments[r],c="number"==typeof s&&l.parts[s],d={requestId:"segment-loader-"+Math.random(),uri:c&&c.resolvedUri||l.resolvedUri,mediaIndex:r,partIndex:c?s:null,isSyncRequest:a,startOfSegment:i,playlist:n,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:l.timeline,duration:c&&c.duration||l.duration,segment:l,part:c,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:u,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;d.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:l.timeline,currentTimeline:this.currentTimeline_,startOfSegment:i,buffered:this.buffered_(),overrideCheck:h});var p=ia(this.sourceUpdater_.audioBuffered());return"number"==typeof p&&(d.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(d.gopsToAlignWith=function(e,t,n){if(null==t||!e.length)return[];var r,i=Math.ceil((t-n+3)*M.ONE_SECOND_IN_TS);for(r=0;ri);r++);return e.slice(r)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),d},n.timestampOffsetForSegment_=function(e){return n=(t=e).segmentTimeline,r=t.currentTimeline,i=t.startOfSegment,a=t.buffered,t.overrideCheck||n!==r?n "+o+" for "+e),function(e,t,n){if(!e[n]){t.trigger({type:"usage",name:"vhs-608"}),t.trigger({type:"usage",name:"hls-608"});var r=n;/^cc708_/.test(n)&&(r="SERVICE"+n.split("_")[1]);var i=t.textTracks().getTrackById(r);if(i)e[n]=i;else{var a=n,s=n,o=!1,u=(t.options_.vhs&&t.options_.vhs.captionServices||{})[r];u&&(a=u.label,s=u.language,o=u.default),e[n]=t.addRemoteTextTrack({kind:"captions",id:r,default:o,label:a,language:s},!1).track}}}(l,n.vhs_.tech_,e),$s(s,o,l[e]),function(e){var t=e.inbandTextTracks,n=e.captionArray,r=e.timestampOffset;if(n){var i=a.a.WebKitDataCue||a.a.VTTCue;n.forEach((function(e){var n=e.stream;t[n].addCue(new i(e.startTime+r,e.endTime+r,e.text))}))}}({captionArray:u,inbandTextTracks:l,timestampOffset:r})})),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}else this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));else this.logger_("SegmentLoader received no captions from a caption event")},n.handleId3_=function(e,t,n){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(this.pendingSegment_.hasAppendedData_){var r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();!function(e,t,n){e.metadataTrack_||(e.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=t)}(this.inbandTextTracks_,n,this.vhs_.tech_),Ks({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:r,videoDuration:this.duration_()})}else this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,n))},n.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach((function(e){return e()})),this.metadataQueue_.caption.forEach((function(e){return e()})),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},n.processCallQueue_=function(){var e=this.callQueue_;this.callQueue_=[],e.forEach((function(e){return e()}))},n.processLoadQueue_=function(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach((function(e){return e()}))},n.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!eo({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.getCurrentMediaInfo_=function(e){return void 0===e&&(e=this.pendingSegment_),e&&e.trackInfo||this.currentMediaInfo_},n.getMediaInfo_=function(e){return void 0===e&&(e=this.pendingSegment_),this.getCurrentMediaInfo_(e)||this.startingMediaInfo_},n.getPendingSegmentPlaylist=function(){return this.pendingSegment_?this.pendingSegment_.playlist:null},n.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;var e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;var n=t.hasAudio,r=t.hasVideo,i=t.isMuxed;return!(r&&!e.videoTimingInfo)&&(!(n&&!this.audioDisabled_&&!i&&!e.audioTimingInfo)&&!eo({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.handleData_=function(e,t){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(!this.callQueue_.length&&this.hasEnoughInfoToAppend_()){var n=this.pendingSegment_;if(this.setTimeMapping_(n.timeline),this.updateMediaSecondsLoaded_(n.part||n.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),n.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),n.isFmp4=e.isFmp4,n.timingInfo=n.timingInfo||{},n.isFmp4)this.trigger("fmp4"),n.timingInfo.start=n[Zs(t.type)].start;else{var r,i=this.getCurrentMediaInfo_(),a="main"===this.loaderType_&&i&&i.hasVideo;a&&(r=n.videoTimingInfo.start),n.timingInfo.start=this.trueSegmentStart_({currentStart:n.timingInfo.start,playlist:n.playlist,mediaIndex:n.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:a,firstVideoFrameTimeForData:r,videoTimingInfo:n.videoTimingInfo,audioTimingInfo:n.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(n,t.type),this.updateSourceBufferTimestampOffset_(n),n.isSyncRequest){this.updateTimingInfoEnd_(n),this.syncController_.saveSegmentTimingInfo({segmentInfo:n,shouldSaveTimelineMapping:"main"===this.loaderType_});var s=this.chooseNextRequest_();if(s.mediaIndex!==n.mediaIndex||s.partIndex!==n.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}n.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(n,t)}}else this.callQueue_.push(this.handleData_.bind(this,e,t))},n.updateAppendInitSegmentStatus=function(e,t){"main"!==this.loaderType_||"number"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)},n.getInitSegmentAndUpdateState_=function(e){var t=e.type,n=e.initSegment,r=e.map,i=e.playlist;if(r){var a=Ka(r);if(this.activeInitSegmentId_===a)return null;n=this.initSegmentForMap(r,!0).bytes,this.activeInitSegmentId_=a}return n&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=i,this.appendInitSegment_[t]=!1,this.activeInitSegmentId_=null,n):null},n.handleQuotaExceededError_=function(e,t){var n=this,r=e.segmentInfo,i=e.type,s=e.bytes,o=this.sourceUpdater_.audioBuffered(),u=this.sourceUpdater_.videoBuffered();o.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+ra(o).join(", ")),u.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+ra(u).join(", "));var l=o.length?o.start(0):0,c=o.length?o.end(o.length-1):0,d=u.length?u.start(0):0,h=u.length?u.end(u.length-1):0;if(c-l<=1&&h-d<=1)return this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: "+s.byteLength+", audio buffer: "+ra(o).join(", ")+", video buffer: "+ra(u).join(", ")+", "),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:r,type:i,bytes:s}));var p=this.currentTime_()-1;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+p),this.remove(0,p,(function(){n.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),n.waitingOnRemove_=!1,n.quotaExceededErrorRetryTimeout_=a.a.setTimeout((function(){n.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),n.quotaExceededErrorRetryTimeout_=null,n.processCallQueue_()}),1e3)}),!0)},n.handleAppendError_=function(e,t){var n=e.segmentInfo,r=e.type,i=e.bytes;t&&(22!==t.code?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",t),this.error(r+" append of "+i.length+"b failed for segment #"+n.mediaIndex+" in playlist "+n.playlist.id),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:n,type:r,bytes:i}))},n.appendToSourceBuffer_=function(e){var t,n,r,i=e.segmentInfo,a=e.type,s=e.initSegment,o=e.data,u=e.bytes;if(!u){var l=[o],c=o.byteLength;s&&(l.unshift(s),c+=s.byteLength),r=0,(t={bytes:c,segments:l}).bytes&&(n=new Uint8Array(t.bytes),t.segments.forEach((function(e){n.set(e,r),r+=e.byteLength}))),u=n}this.sourceUpdater_.appendBuffer({segmentInfo:i,type:a,bytes:u},this.handleAppendError_.bind(this,{segmentInfo:i,type:a,bytes:u}))},n.handleSegmentTimingInfo_=function(e,t,n){if(this.pendingSegment_&&t===this.pendingSegment_.requestId){var r=this.pendingSegment_.segment,i=e+"TimingInfo";r[i]||(r[i]={}),r[i].transmuxerPrependedSeconds=n.prependedContentDuration||0,r[i].transmuxedPresentationStart=n.start.presentation,r[i].transmuxedDecodeStart=n.start.decode,r[i].transmuxedPresentationEnd=n.end.presentation,r[i].transmuxedDecodeEnd=n.end.decode,r[i].baseMediaDecodeTime=n.baseMediaDecodeTime}},n.appendData_=function(e,t){var n=t.type,r=t.data;if(r&&r.byteLength&&("audio"!==n||!this.audioDisabled_)){var i=this.getInitSegmentAndUpdateState_({type:n,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:n,initSegment:i,data:r})}},n.loadSegment_=function(e){var t=this;this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(e):this.loadQueue_.push((function(){var n=l()({},e,{forceTimestampOffset:!0});l()(e,t.generateSegmentInfo_(n)),t.isPendingTimestampOffset_=!1,t.updateTransmuxerAndRequestSegment_(e)}))},n.updateTransmuxerAndRequestSegment_=function(e){var t=this;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}));var n=this.createSimplifiedSegmentObj_(e),r=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),i=null!==this.mediaIndex,a=e.timeline!==this.currentTimeline_&&e.timeline>0,s=r||i&&a;this.logger_("Requesting "+Js(e)),n.map&&!n.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Ms({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:n,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:s,endedTimelineFn:function(){t.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:function(n){var r=n.message,i=n.level,a=n.stream;t.logger_(Js(e)+" logged from transmuxer stream "+a+" as a "+i+": "+r)}})},n.trimBackBuffer_=function(e){var t=function(e,t,n){var r=t-ls.BACK_BUFFER_LENGTH;e.length&&(r=Math.max(r,e.start(0)));var i=t-n;return Math.min(i,r)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)},n.createSimplifiedSegmentObj_=function(e){var t=e.segment,n=e.part,r={resolvedUri:n?n.resolvedUri:t.resolvedUri,byterange:n?n.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},i=e.playlist.segments[e.mediaIndex-1];if(i&&i.timeline===t.timeline&&(i.videoTimingInfo?r.baseStartTime=i.videoTimingInfo.transmuxedDecodeEnd:i.audioTimingInfo&&(r.baseStartTime=i.audioTimingInfo.transmuxedDecodeEnd)),t.key){var 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},n.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},n.saveBandwidthRelatedStats_=function(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e<1/60?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record "+1/60):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)},n.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")},n.segmentRequestFinished_=function(e,t,n){if(this.callQueue_.length)this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,n));else if(this.saveTransferStats_(t.stats),this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId){if(e){if(this.pendingSegment_=null,this.state="READY",e.code===ks)return;return this.pause(),e.code===Es?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}var r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,t.stats),r.endOfAllRequests=t.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=function(e,t,n){if(!t.length)return e;if(n)return t.slice();for(var r=t[0].pts,i=0;i=r);i++);return e.slice(0,i).concat(t)}(this.gopBuffer_,n.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(r)}},n.setTimeMapping_=function(e){var t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)},n.updateMediaSecondsLoaded_=function(e){"number"==typeof e.start&&"number"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration},n.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},n.trueSegmentStart_=function(e){var t=e.currentStart,n=e.playlist,r=e.mediaIndex,i=e.firstVideoFrameTimeForData,a=e.currentVideoTimestampOffset,s=e.useVideoTimingInfo,o=e.videoTimingInfo,u=e.audioTimingInfo;if(void 0!==t)return t;if(!s)return u.start;var l=n.segments[r-1];return 0!==r&&l&&void 0!==l.start&&l.end===i+a?o.start:i},n.waitForAppendsToComplete_=function(e){var t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var n=t.hasAudio,r=t.hasVideo,i=t.isMuxed,a="main"===this.loaderType_&&r,s=!this.audioDisabled_&&n&&!i;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);a&&e.waitingOnAppends++,s&&e.waitingOnAppends++,a&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),s&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},n.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},n.checkForIllegalMediaSwitch=function(e){var t=function(e,t,n){return"main"===e&&t&&n?n.hasAudio||n.hasVideo?t.hasVideo&&!n.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.":!t.hasVideo&&n.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:"Neither audio nor video found in segment.":null}(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,blacklistDuration:1/0}),this.trigger("error"),!0)},n.updateSourceBufferTimestampOffset_=function(e){if(null!==e.timestampOffset&&"number"==typeof e.timingInfo.start&&!e.changedTimestampOffset&&"main"===this.loaderType_){var 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")}},n.getSegmentStartTimeForTimestampOffsetCalculation_=function(e){var t=e.videoTimingInfo,n=e.audioTimingInfo,r=e.timingInfo;return this.useDtsForTimestampOffset_?t&&"number"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:n&&"number"==typeof n.transmuxedDecodeStart?n.transmuxedDecodeStart:r.start:r.start},n.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var t=this.getMediaInfo_(),n="main"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;n&&(e.timingInfo.end="number"==typeof n.end?n.end:n.start+e.duration)},n.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});var t=no(e,this.sourceType_);if(t&&("warn"===t.severity?Xi.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_("Appended "+Js(e)),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");var n=e.segment,r=e.part,i=n.end&&this.currentTime_()-n.end>3*e.playlist.targetDuration,a=r&&r.end&&this.currentTime_()-r.end>3*e.playlist.partTargetDuration;if(i||a)return this.logger_("bad "+(i?"segment":"part")+" "+Js(e)),void this.resetEverything();null!==this.mediaIndex&&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_()}else this.logger_("Throwing away un-appended sync request "+Js(e))},n.recordThroughput_=function(e){if(e.duration<1/60)this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record "+1/60);else{var t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,r=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(r-t)/++this.throughput.count}},n.addSegmentMetadataCue_=function(e){if(this.segmentMetadataTrack_){var t=e.segment,n=t.start,r=t.end;if(Qs(n)&&Qs(r)){$s(n,r,this.segmentMetadataTrack_);var i=a.a.WebKitDataCue||a.a.VTTCue,s={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:n,end:r},o=new i(n,r,JSON.stringify(s));o.value=s,this.segmentMetadataTrack_.addCue(o)}}},t}(Xi.EventTarget);function io(){}var ao,so=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))},oo=["video","audio"],uo=function(e,t){var n=t[e+"Buffer"];return n&&n.updating||t.queuePending[e]},lo=function e(t,n){if(0!==n.queue.length){var r=0,i=n.queue[r];if("mediaSource"!==i.type){if("mediaSource"!==t&&n.ready()&&"closed"!==n.mediaSource.readyState&&!uo(t,n)){if(i.type!==t){if(null===(r=function(e,t){for(var n=0;n=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},n.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},n.segmentRequestFinished_=function(e,t,n){var r=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===Es&&this.handleTimeout_(),e.code===ks?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var i=this.pendingSegment_;this.saveBandwidthRelatedStats_(i.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");var s=i.segment;if(s.map&&(s.map.bytes=t.map.bytes),i.bytes=t.bytes,"function"!=typeof a.a.WebVTT&&"function"==typeof this.loadVttJs)return this.state="WAITING_ON_VTTJS",void this.loadVttJs().then((function(){return r.segmentRequestFinished_(e,t,n)}),(function(){return r.stopForError({message:"Error loading vtt.js"})}));s.requested=!0;try{this.parseVTTCues_(i)}catch(e){return void this.stopForError({message:e.message})}if(this.updateTimeMapping_(i,this.syncController_.timelines[i.timeline],this.playlist_),i.cues.length?i.timingInfo={start:i.cues[0].startTime,end:i.cues[i.cues.length-1].endTime}:i.timingInfo={start:i.startOfSegment,end:i.startOfSegment+i.duration},i.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");i.byteLength=i.bytes.byteLength,this.mediaSecondsLoaded+=s.duration,i.cues.forEach((function(e){r.subtitlesTrack_.addCue(r.featuresNativeTextTracks_?new a.a.VTTCue(e.startTime,e.endTime,e.text):e)})),function(e){var t=e.cues;if(t)for(var n=0;n1&&r.push(t[a]);r.length&&r.forEach((function(t){return e.removeCue(t)}))}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},n.handleData_=function(){},n.updateTimingInfoEnd_=function(){},n.parseVTTCues_=function(e){var t,n=!1;if("function"!=typeof a.a.WebVTT)throw new Ao;"function"==typeof a.a.TextDecoder?t=new a.a.TextDecoder("utf8"):(t=a.a.WebVTT.StringDecoder(),n=!0);var r=new a.a.WebVTT.Parser(a.a,a.a.vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},r.oncue=e.cues.push.bind(e.cues),r.ontimestampmap=function(t){e.timestampmap=t},r.onparsingerror=function(e){Xi.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){var i=e.segment.map.bytes;n&&(i=Co(i)),r.parse(i)}var s=e.bytes;n&&(s=Co(s)),r.parse(s),r.flush()},n.updateTimeMapping_=function(e,t,n){var r=e.segment;if(t)if(e.cues.length){var i=e.timestampmap,a=i.MPEGTS/M.ONE_SECOND_IN_TS-i.LOCAL+t.mapping;if(e.cues.forEach((function(e){e.startTime+=a,e.endTime+=a})),!n.syncInfo){var s=e.cues[0].startTime,o=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(s,o-r.duration)}}}else r.empty=!0},t}(ro),Io=function(e,t){for(var n=e.cues,r=0;r=i.adStartTime&&t<=i.adEndTime)return i}return null},Po=[{name:"VOD",run:function(e,t,n,r,i){if(n!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:"ProgramDateTime",run:function(e,t,n,r,i){if(!Object.keys(e.timelineToDatetimeMappings).length)return null;var a=null,s=null,o=ua(t);i=i||0;for(var u=0;u=h)&&(s=h,a={time:d,segmentIndex:l.segmentIndex,partIndex:l.partIndex})}}return a}},{name:"Discontinuity",run:function(e,t,n,r,i){var a=null;if(i=i||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var s=null,o=0;o=d)&&(s=d,a={time:c.time,segmentIndex:u,partIndex:null})}}return a}},{name:"Playlist",run:function(e,t,n,r,i){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}}],Lo=function(e){function t(t){var n;return(n=e.call(this)||this).timelines=[],n.discontinuities=[],n.timelineToDatetimeMappings={},n.logger_=Ji("SyncController"),n}m()(t,e);var n=t.prototype;return n.getSyncPoint=function(e,t,n,r){var i=this.runStrategies_(e,t,n,r);return i.length?this.selectSyncPoint_(i,{key:"time",value:r}):null},n.getExpiredTime=function(e,t){if(!e||!e.segments)return null;var n=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!n.length)return null;var r=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return r.segmentIndex>0&&(r.time*=-1),Math.abs(r.time+fa({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:r.segmentIndex,endIndex:0}))},n.runStrategies_=function(e,t,n,r){for(var i=[],a=0;a86400)Xi.log.warn("Not saving expired segment info. Media sequence gap "+n+" is too large.");else for(var r=n-1;r>=0;r--){var i=e.segments[r];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+r,time:i.start},this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+", mediaSequence: "+t.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},n.setDateTimeMappingForStart=function(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var t=e.segments[0],n=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-n}},n.saveSegmentTimingInfo=function(e){var t=e.segmentInfo,n=e.shouldSaveTimelineMapping,r=this.calculateSegmentTimeMapping_(t,t.timingInfo,n),i=t.segment;r&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:i.start}));var a=i.dateTimeObject;i.discontinuity&&n&&a&&(this.timelineToDatetimeMappings[i.timeline]=-a.getTime()/1e3)},n.timestampOffsetForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].time},n.mappingForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping},n.calculateSegmentTimeMapping_=function(e,t,n){var r,i,a=e.segment,s=e.part,o=this.timelines[e.timeline];if("number"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},n&&(this.timelines[e.timeline]=o,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+o.time+"] [mapping: "+o.mapping+"]")),r=e.startOfSegment,i=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,i=t.end+o.mapping}return s&&(s.start=r,s.end=i),(!a.start||ro){var u=void 0;u=s<0?n.start-fa({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:i}):n.end+fa({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:i}),this.discontinuities[a]={time:u,accuracy:o}}}},n.dispose=function(){this.trigger("dispose"),this.off()},t}(Xi.EventTarget),Do=function(e){function t(){var t;return(t=e.call(this)||this).pendingTimelineChanges_={},t.lastTimelineChanges_={},t}m()(t,e);var n=t.prototype;return n.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},n.pendingTimelineChange=function(e){var t=e.type,n=e.from,r=e.to;return"number"==typeof n&&"number"==typeof r&&(this.pendingTimelineChanges_[t]={type:t,from:n,to:r},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]},n.lastTimelineChange=function(e){var t=e.type,n=e.from,r=e.to;return"number"==typeof n&&"number"==typeof r&&(this.lastTimelineChanges_[t]={type:t,from:n,to:r},delete this.pendingTimelineChanges_[t],this.trigger("timelinechange")),this.lastTimelineChanges_[t]},n.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},t}(Xi.EventTarget),Ro=ds(hs(ps((function(){var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function n(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var r=n((function(e){function t(e,t){for(var n=0;n-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,r=0;r>7))^e]=e;for(t=n=0;!d[t];t^=r||1,n=f[n]||1)for(a=(a=n^n<<1^n<<2^n<<3^n<<4)>>8^255&a^99,d[t]=a,h[a]=t,o=16843009*p[i=p[r=p[t]]]^65537*i^257*r^16843008*t,s=257*p[a]^16843008*a,e=0;e<4;e++)l[e][t]=s=s<<24^s>>>8,c[e][a]=o=o<<24^o>>>8;for(e=0;e<5;e++)l[e]=l[e].slice(0),c[e]=c[e].slice(0);return u}()),this._tables=[[u[0][0].slice(),u[0][1].slice(),u[0][2].slice(),u[0][3].slice(),u[0][4].slice()],[u[1][0].slice(),u[1][1].slice(),u[1][2].slice(),u[1][3].slice(),u[1][4].slice()]];var i=this._tables[0][4],a=this._tables[1],s=e.length,o=1;if(4!==s&&6!==s&&8!==s)throw new Error("Invalid aes key size");var l=e.slice(0),c=[];for(this._key=[l,c],t=s;t<4*s+28;t++)r=l[t-1],(t%s==0||8===s&&t%s==4)&&(r=i[r>>>24]<<24^i[r>>16&255]<<16^i[r>>8&255]<<8^i[255&r],t%s==0&&(r=r<<8^r>>>24^o<<24,o=o<<1^283*(o>>7))),l[t]=l[t-s]^r;for(n=0;t;n++,t--)r=l[3&n?t:t-4],c[n]=t<=4||n<4?r:a[0][i[r>>>24]]^a[1][i[r>>16&255]]^a[2][i[r>>8&255]]^a[3][i[255&r]]}return e.prototype.decrypt=function(e,t,n,r,i,a){var s,o,u,l,c=this._key[1],d=e^c[0],h=r^c[1],p=n^c[2],f=t^c[3],m=c.length/4-2,g=4,y=this._tables[1],v=y[0],_=y[1],b=y[2],T=y[3],w=y[4];for(l=0;l>>24]^_[h>>16&255]^b[p>>8&255]^T[255&f]^c[g],o=v[h>>>24]^_[p>>16&255]^b[f>>8&255]^T[255&d]^c[g+1],u=v[p>>>24]^_[f>>16&255]^b[d>>8&255]^T[255&h]^c[g+2],f=v[f>>>24]^_[d>>16&255]^b[h>>8&255]^T[255&p]^c[g+3],g+=4,d=s,h=o,p=u;for(l=0;l<4;l++)i[(3&-l)+a]=w[d>>>24]<<24^w[h>>16&255]<<16^w[p>>8&255]<<8^w[255&f]^c[g++],s=d,d=h,h=p,p=f,f=s},e}(),c=function(e){function t(){var t;return(t=e.call(this,s)||this).jobs=[],t.delay=1,t.timeout_=null,t}a(t,e);var n=t.prototype;return n.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},n.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},t}(s),d=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},h=function(){function e(t,n,r,i){var a=e.STEP,s=new Int32Array(t.buffer),o=new Uint8Array(t.byteLength),u=0;for(this.asyncStream_=new c,this.asyncStream_.push(this.decryptChunk_(s.subarray(u,u+a),n,r,o)),u=a;u>2),m=new l(Array.prototype.slice.call(t)),g=new Uint8Array(e.byteLength),y=new Int32Array(g.buffer);for(r=n[0],i=n[1],a=n[2],s=n[3],p=0;p=0&&(t="main-desc"),t},Mo=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Uo=function(e,t){t.activePlaylistLoader=e,e.load()},jo={AUDIO:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e],i=t.blacklistCurrentPlaylist;Mo(n,r);var a=r.activeTrack(),s=r.activeGroup(),o=(s.filter((function(e){return e.default}))[0]||s[0]).id,u=r.tracks[o];if(a!==u){for(var l in Xi.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),r.tracks)r.tracks[l].enabled=r.tracks[l]===u;r.onTrackChanged()}else i({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e];Xi.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),Mo(n,r);var i=r.activeTrack();i&&(i.mode="disabled"),r.onTrackChanged()}}},Bo={AUDIO:function(e,t,n){if(t){var r=n.tech,i=n.requestOptions,a=n.segmentLoaders[e];t.on("loadedmetadata",(function(){var e=t.media();a.playlist(e,i),(!r.paused()||e.endList&&"none"!==r.preload())&&a.load()})),t.on("loadedplaylist",(function(){a.playlist(t.media(),i),r.paused()||a.load()})),t.on("error",jo[e](e,n))}},SUBTITLES:function(e,t,n){var r=n.tech,i=n.requestOptions,a=n.segmentLoaders[e],s=n.mediaTypes[e];t.on("loadedmetadata",(function(){var e=t.media();a.playlist(e,i),a.track(s.activeTrack()),(!r.paused()||e.endList&&"none"!==r.preload())&&a.load()})),t.on("loadedplaylist",(function(){a.playlist(t.media(),i),r.paused()||a.load()})),t.on("error",jo[e](e,n))}},qo={AUDIO:function(e,t){var n=t.vhs,r=t.sourceType,i=t.segmentLoaders[e],a=t.requestOptions,s=t.master.mediaGroups,o=t.mediaTypes[e],u=o.groups,l=o.tracks,c=o.logger_,d=t.masterPlaylistLoader,h=Sa(d.master);for(var p in s[e]&&0!==Object.keys(s[e]).length||(s[e]={main:{default:{default:!0}}},h&&(s[e].main.default.playlists=d.master.playlists)),s[e])for(var f in u[p]||(u[p]=[]),s[e][p]){var m=s[e][p][f],g=void 0;if(h?(c("AUDIO group '"+p+"' label '"+f+"' is a master playlist"),m.isMasterPlaylist=!0,g=null):g="vhs-json"===r&&m.playlists?new Ba(m.playlists[0],n,a):m.resolvedUri?new Ba(m.resolvedUri,n,a):m.playlists&&"dash"===r?new us(m.playlists[0],n,a,d):null,m=Xi.mergeOptions({id:f,playlistLoader:g},m),Bo[e](e,m.playlistLoader,t),u[p].push(m),void 0===l[f]){var y=new Xi.AudioTrack({id:f,kind:No(m),enabled:!1,language:m.language,default:m.default,label:f});l[f]=y}}i.on("error",jo[e](e,t))},SUBTITLES:function(e,t){var n=t.tech,r=t.vhs,i=t.sourceType,a=t.segmentLoaders[e],s=t.requestOptions,o=t.master.mediaGroups,u=t.mediaTypes[e],l=u.groups,c=u.tracks,d=t.masterPlaylistLoader;for(var h in o[e])for(var p in l[h]||(l[h]=[]),o[e][h])if(!o[e][h][p].forced){var f=o[e][h][p],m=void 0;if("hls"===i)m=new Ba(f.resolvedUri,r,s);else if("dash"===i){if(!f.playlists.filter((function(e){return e.excludeUntil!==1/0})).length)return;m=new us(f.playlists[0],r,s,d)}else"vhs-json"===i&&(m=new Ba(f.playlists?f.playlists[0]:f.resolvedUri,r,s));if(f=Xi.mergeOptions({id:p,playlistLoader:m},f),Bo[e](e,f.playlistLoader,t),l[h].push(f),void 0===c[p]){var g=n.addRemoteTextTrack({id:p,kind:"subtitles",default:f.default&&f.autoselect,language:f.language,label:p},!1).track;c[p]=g}}a.on("error",jo[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var n=t.tech,r=t.master.mediaGroups,i=t.mediaTypes[e],a=i.groups,s=i.tracks;for(var o in r[e])for(var u in a[o]||(a[o]=[]),r[e][o]){var l=r[e][o][u];if(/^(?:CC|SERVICE)/.test(l.instreamId)){var c=n.options_.vhs&&n.options_.vhs.captionServices||{},d={label:u,language:l.language,instreamId:l.instreamId,default:l.default&&l.autoselect};if(c[d.instreamId]&&(d=Xi.mergeOptions(d,c[d.instreamId])),void 0===d.default&&delete d.default,a[o].push(Xi.mergeOptions({id:u},l)),void 0===s[u]){var h=n.addRemoteTextTrack({id:d.instreamId,kind:"captions",default:d.default,language:d.language,label:d.label},!1).track;s[u]=h}}}}},Fo=function e(t,n){for(var r=0;r1&&Sa(t.master))for(var u=0;u "+a+" from "+t),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+t})),this.masterPlaylistLoader_.media(e,n)},n.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=a.a.setInterval((function(){return e.checkABR_()}),250)},n.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(a.a.clearInterval(this.abrTimer_),this.abrTimer_=null)},n.getAudioTrackPlaylists_=function(){var e=this.master(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;var n,r=e.mediaGroups.AUDIO,i=Object.keys(r);if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{var a=r.main||i.length&&r[i[0]];for(var s in a)if(a[s].default){n={label:s};break}}if(!n)return t;var o=[];for(var u in r)if(r[u][n.label]){var l=r[u][n.label];if(l.playlists&&l.playlists.length)o.push.apply(o,l.playlists);else if(l.uri)o.push(l);else if(e.playlists.length)for(var c=0;c1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},n.shouldSwitchToMedia_=function(e){var t=this.masterPlaylistLoader_.media()||this.masterPlaylistLoader_.pendingMedia_,n=this.tech_.currentTime(),r=this.bufferLowWaterLine(),i=this.bufferHighWaterLine();return function(e){var t=e.currentPlaylist,n=e.buffered,r=e.currentTime,i=e.nextPlaylist,a=e.bufferLowWaterLine,s=e.bufferHighWaterLine,o=e.duration,u=e.experimentalBufferBasedABR,l=e.log;if(!i)return Xi.log.warn("We received no playlist to switch to. Please check your stream."),!1;var c="allowing switch "+(t&&t.id||"null")+" -> "+i.id;if(!t)return l(c+" as current playlist is not set"),!0;if(i.id===t.id)return!1;var d=Boolean(ea(n,r).length);if(!t.endList)return d||"number"!=typeof t.partTargetDuration?(l(c+" as current playlist is live"),!0):(l("not "+c+" as current playlist is live llhls, but currentTime isn't in buffered."),!1);var h=aa(n,r),p=u?ls.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:ls.MAX_BUFFER_LOW_WATER_LINE;if(om)&&h>=a){var y=c+" as forwardBuffer >= bufferLowWaterLine ("+h+" >= "+a+")";return u&&(y+=" and next bandwidth > current bandwidth ("+f+" > "+m+")"),l(y),!0}return l("not "+c+" as no switching criteria met"),!1}({buffered:this.tech_.buffered(),currentTime:n,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:r,bufferHighWaterLine:i,duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},n.setupSegmentLoaderListeners_=function(){var e=this;this.mainSegmentLoader_.on("bandwidthupdate",(function(){e.checkABR_("bandwidthupdate"),e.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("timeout",(function(){e.experimentalBufferBasedABR&&e.mainSegmentLoader_.load()})),this.experimentalBufferBasedABR||this.mainSegmentLoader_.on("progress",(function(){e.trigger("progress")})),this.mainSegmentLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())})),this.mainSegmentLoader_.on("appenderror",(function(){e.error=e.mainSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(function(){e.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on("appenderror",(function(){e.error=e.audioSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("ended",(function(){e.logger_("main segment loader ended"),e.onEndOfStream()})),this.mainSegmentLoader_.on("earlyabort",(function(t){e.experimentalBufferBasedABR||(e.delegateLoaders_("all",["abort"]),e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))}));var t=function(){if(!e.sourceUpdater_.hasCreatedSourceBuffers())return e.tryToCreateSourceBuffers_();var t=e.getCodecsOrExclude_();t&&e.sourceUpdater_.addOrChangeSourceBuffers(t)};this.mainSegmentLoader_.on("trackinfo",t),this.audioSegmentLoader_.on("trackinfo",t),this.mainSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("ended",(function(){e.logger_("audioSegmentLoader ended"),e.onEndOfStream()}))},n.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},n.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},n.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),this.fastQualityChange_(e)},n.fastQualityChange_=function(e){var t=this;void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()?(this.switchMedia_(e,"fast-quality"),this.mainSegmentLoader_.resetEverything((function(){Xi.browser.IE_VERSION||Xi.browser.IS_EDGE?t.tech_.setCurrentTime(t.tech_.currentTime()+.04):t.tech_.setCurrentTime(t.tech_.currentTime())}))):this.logger_("skipping fastQualityChange because new media is same as old")},n.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()this.maxPlaylistRetries?1/0:Date.now()+1e3*t,n.excludeUntil=r,e.reason&&(n.lastExcludeReason_=e.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var u=this.selectPlaylist();if(!u)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");var l=e.internal?this.logger_:Xi.log.warn,c=e.message?" "+e.message:"";l((e.internal?"Internal problem":"Problem")+" encountered with playlist "+n.id+"."+c+" Switching to playlist "+u.id+"."),u.attributes.AUDIO!==n.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),u.attributes.SUBTITLES!==n.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var d=u.targetDuration/2*1e3||5e3,h="number"==typeof u.lastRequest&&Date.now()-u.lastRequest<=d;return this.switchMedia_(u,"exclude",s||h)},n.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},n.delegateLoaders_=function(e,t){var n=this,r=[],i="all"===e;(i||"main"===e)&&r.push(this.masterPlaylistLoader_);var a=[];(i||"audio"===e)&&a.push("AUDIO"),(i||"subtitle"===e)&&(a.push("CLOSED-CAPTIONS"),a.push("SUBTITLES")),a.forEach((function(e){var t=n.mediaTypes_[e]&&n.mediaTypes_[e].activePlaylistLoader;t&&r.push(t)})),["main","audio","subtitle"].forEach((function(t){var i=n[t+"SegmentLoader_"];!i||e!==t&&"all"!==e||r.push(i)})),r.forEach((function(e){return t.forEach((function(t){"function"==typeof e[t]&&e[t]()}))}))},n.setCurrentTime=function(e){var t=ea(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},n.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:ao.Playlist.duration(e):1/0:0},n.seekable=function(){return this.seekable_},n.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var t=this.masterPlaylistLoader_.media();if(t){var n=this.syncController_.getExpiredTime(t,this.duration());if(null!==n){var r=this.masterPlaylistLoader_.master,i=ao.Playlist.seekable(t,n,ao.Playlist.liveEdgeDelay(r,t));if(0!==i.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(n=this.syncController_.getExpiredTime(t,this.duration())))return;if(0===(e=ao.Playlist.seekable(t,n,ao.Playlist.liveEdgeDelay(r,t))).length)return}var a,s;this.seekable_&&this.seekable_.length&&(a=this.seekable_.end(0),s=this.seekable_.start(0)),e?e.start(0)>i.end(0)||i.start(0)>e.end(0)?this.seekable_=i:this.seekable_=Xi.createTimeRanges([[e.start(0)>i.start(0)?e.start(0):i.start(0),e.end(0)0&&(r=Math.max(r,n.end(n.length-1))),this.mediaSource.duration!==r&&this.sourceUpdater_.setDuration(r)}},n.dispose=function(){var e=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach((function(t){var n=e.mediaTypes_[t].groups;for(var r in n)n[r].forEach((function(e){e.playlistLoader&&e.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()},n.master=function(){return this.masterPlaylistLoader_.master},n.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},n.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),n=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!n)},n.getCodecsOrExclude_=function(){var e=this,t={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},n=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();t.video=t.main;var r=Fs(this.master(),n),i={},a=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(i.video=r.video||t.main.videoCodec||A.b),t.main.isMuxed&&(i.video+=","+(r.audio||t.main.audioCodec||A.a)),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||a)&&(i.audio=r.audio||t.main.audioCodec||t.audio.audioCodec||A.a,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),i.audio||i.video){var s,o={};if(["video","audio"].forEach((function(e){if(i.hasOwnProperty(e)&&(r=t[e].isFmp4,a=i[e],!(r?Object(A.c)(a):Object(A.g)(a)))){var n=t[e].isFmp4?"browser":"muxer";o[n]=o[n]||[],o[n].push(i[e]),"audio"===e&&(s=n)}var r,a})),a&&s&&n.attributes.AUDIO){var u=n.attributes.AUDIO;this.master().playlists.forEach((function(e){(e.attributes&&e.attributes.AUDIO)===u&&e!==n&&(e.excludeUntil=1/0)})),this.logger_("excluding audio group "+u+" as "+s+' does not support codec(s): "'+i.audio+'"')}if(!Object.keys(o).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var l=[];if(["video","audio"].forEach((function(t){var n=(Object(A.h)(e.sourceUpdater_.codecs[t]||"")[0]||{}).type,r=(Object(A.h)(i[t]||"")[0]||{}).type;n&&r&&n.toLowerCase()!==r.toLowerCase()&&l.push('"'+e.sourceUpdater_.codecs[t]+'" -> "'+i[t]+'"')})),l.length)return void this.blacklistCurrentPlaylist({playlist:n,message:"Codec switching not supported: "+l.join(", ")+".",blacklistDuration:1/0,internal:!0})}return i}var c=Object.keys(o).reduce((function(e,t){return e&&(e+=", "),e+=t+' does not support codec(s): "'+o[t].join(",")+'"'}),"")+".";this.blacklistCurrentPlaylist({playlist:n,internal:!0,message:c,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:n,message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},n.tryToCreateSourceBuffers_=function(){if("open"===this.mediaSource.readyState&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()){var e=this.getCodecsOrExclude_();if(e){this.sourceUpdater_.createSourceBuffers(e);var t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}}},n.excludeUnsupportedVariants_=function(){var e=this,t=this.master().playlists,n=[];Object.keys(t).forEach((function(r){var i=t[r];if(-1===n.indexOf(i.id)){n.push(i.id);var a=Fs(e.master,i),s=[];!a.audio||Object(A.g)(a.audio)||Object(A.c)(a.audio)||s.push("audio codec "+a.audio),!a.video||Object(A.g)(a.video)||Object(A.c)(a.video)||s.push("video codec "+a.video),a.text&&"stpp.ttml.im1t"===a.text&&s.push("text codec "+a.text),s.length&&(i.excludeUntil=1/0,e.logger_("excluding "+i.id+" for unsupported: "+s.join(", ")))}}))},n.excludeIncompatibleVariants_=function(e){var t=this,n=[],r=this.master().playlists,i=Bs(Object(A.h)(e)),a=qs(i),s=i.video&&Object(A.h)(i.video)[0]||null,o=i.audio&&Object(A.h)(i.audio)[0]||null;Object.keys(r).forEach((function(e){var i=r[e];if(-1===n.indexOf(i.id)&&i.excludeUntil!==1/0){n.push(i.id);var u=[],l=Fs(t.masterPlaylistLoader_.master,i),c=qs(l);if(l.audio||l.video){if(c!==a&&u.push('codec count "'+c+'" !== "'+a+'"'),!t.sourceUpdater_.canChangeType()){var d=l.video&&Object(A.h)(l.video)[0]||null,h=l.audio&&Object(A.h)(l.audio)[0]||null;d&&s&&d.type.toLowerCase()!==s.type.toLowerCase()&&u.push('video codec "'+d.type+'" !== "'+s.type+'"'),h&&o&&h.type.toLowerCase()!==o.type.toLowerCase()&&u.push('audio codec "'+h.type+'" !== "'+o.type+'"')}u.length&&(i.excludeUntil=1/0,t.logger_("blacklisting "+i.id+": "+u.join(" && ")))}}}))},n.updateAdCues_=function(e){var t=0,n=this.seekable();n.length&&(t=n.start(0)),function(e,t,n){if(void 0===n&&(n=0),e.segments)for(var r,i=n,s=0;s0&&this.logger_("resetting possible stalled download count for "+e+" loader"),this[e+"StalledDownloads_"]=0,this[e+"Buffered_"]=t.buffered_()},t.checkSegmentDownloads_=function(e){var t=this.masterPlaylistController_,n=t[e+"SegmentLoader_"],r=n.buffered_(),i=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(var n=0;n=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)}},t.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},t.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var e,t=this.seekable(),n=this.tech_.currentTime();this.afterSeekableWindow_(t,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(e=t.end(t.length-1));if(this.beforeSeekableWindow_(t,n)){var r=t.start(0);e=r+(r===t.end(0)?0:.1)}if(void 0!==e)return this.logger_("Trying to seek outside of seekable at time "+n+" with seekable range "+na(t)+". Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0;for(var i=this.masterPlaylistController_.sourceUpdater_,a=this.tech_.buffered(),s=i.audioBuffer?i.audioBuffered():null,o=i.videoBuffer?i.videoBuffered():null,u=this.media(),l=u.partTargetDuration?u.partTargetDuration:2*(u.targetDuration-1/30),c=[s,o],d=0;d "+n.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}},t.techWaiting_=function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var n=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+n),this.cancelTimer_(),this.tech_.setCurrentTime(n),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var r=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,i=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:r.audioBuffered(),videoBuffered:r.videoBuffered(),currentTime:t}))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var a=ta(i,t);if(a.length>0){var s=a.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+s+", seeking to "+a.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*s,t),!0}return!1},t.afterSeekableWindow_=function(e,t,n,r){if(void 0===r&&(r=!1),!e.length)return!1;var i=e.end(e.length-1)+.1;return!n.endList&&r&&(i=e.end(e.length-1)+3*n.targetDuration),t>i},t.beforeSeekableWindow_=function(e,t){return!!(e.length&&e.start(0)>0&&t2)return{start:i,end:a}}return null},e}(),$o={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Qo={PlaylistLoader:Ba,Playlist:Ea,utils:Ja,STANDARD_PLAYLIST_SELECTOR:Ys,INITIAL_PLAYLIST_SELECTOR:function(){var e=this,t=this.playlists.master.playlists.filter(Ea.isEnabled);return zs(t,(function(e,t){return Gs(e,t)})),t.filter((function(t){return!!Fs(e.playlists.master,t).video}))[0]||null},lastBandwidthSelector:Ys,movingAverageBandwidthSelector:function(e){var t=-1,n=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var r=this.useDevicePixelRatio&&a.a.devicePixelRatio||1;return t<0&&(t=this.systemBandwidth,n=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==n&&(t=e*this.systemBandwidth+(1-e)*t,n=this.systemBandwidth),Xs(this.playlists.master,t,parseInt(Ws(this.tech_.el(),"width"),10)*r,parseInt(Ws(this.tech_.el(),"height"),10)*r,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},comparePlaylistBandwidth:Gs,comparePlaylistResolution:function(e,t){var n,r;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||a.a.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(r=t.attributes.RESOLUTION.width),n===(r=r||a.a.Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:n-r},xhr:Va()};Object.keys(ls).forEach((function(e){Object.defineProperty(Qo,e,{get:function(){return Xi.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),ls[e]},set:function(t){Xi.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?Xi.log.warn("value of Vhs."+e+" must be greater than or equal to 0"):ls[e]=t}})}));var Jo=function(e,t){for(var n=t.media(),r=-1,i=0;i=1e7&&e>=1e7?Math.max(e,n):n}return e},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e,t=1/(this.bandwidth||1);return e=this.throughput>0?1/this.throughput:0,Math.floor(1/(t+e))},set:function(){Xi.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:function(){return n.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return n.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return n.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return n.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return n.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return n.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return n.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return n.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},mediaAppends:{get:function(){return n.masterPlaylistController_.mediaAppends_()||0},enumerable:!0},mainAppendsToLoadedData:{get:function(){return n.masterPlaylistController_.mainAppendsToLoadedData_()||0},enumerable:!0},audioAppendsToLoadedData:{get:function(){return n.masterPlaylistController_.audioAppendsToLoadedData_()||0},enumerable:!0},appendsToLoadedData:{get:function(){return n.masterPlaylistController_.appendsToLoadedData_()||0},enumerable:!0},timeToLoadedData:{get:function(){return n.masterPlaylistController_.timeToLoadedData_()||0},enumerable:!0},buffered:{get:function(){return ra(n.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return n.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return n.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return n.tech_.name_},enumerable:!0},duration:{get:function(){return n.tech_.duration()},enumerable:!0},master:{get:function(){return n.playlists.master},enumerable:!0},playerDimensions:{get:function(){return n.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return ra(n.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return n.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",(function(){n.options_.useBandwidthFromLocalStorage&&function(e){if(!a.a.localStorage)return!1;var t=tu();t=t?Xi.mergeOptions(t,e):e;try{a.a.localStorage.setItem("videojs-vhs",JSON.stringify(t))}catch(e){return!1}}({bandwidth:n.bandwidth,throughput:Math.round(n.throughput)})})),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var e;(e=n).representations=function(){var t=e.masterPlaylistController_.master(),n=Sa(t)?e.masterPlaylistController_.getAudioTrackPlaylists_():t.playlists;return n?n.filter((function(e){return!ya(e)})).map((function(t,n){return new Xo(e,t,t.id)})):[]}})),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",(function(){n.setupEme_()})),this.on(this.masterPlaylistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.masterPlaylistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=a.a.URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},n.createKeySessions_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),Zo({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:t&&t.media(),mainPlaylists:this.playlists.master.playlists}).then((function(){e.logger_("created EME key session"),e.masterPlaylistController_.sourceUpdater_.initializedEme()})).catch((function(t){e.logger_("error while creating EME key session",t),e.player_.error({message:"Failed to initialize media keys for EME",code:3})}))},n.handleWaitingForKey_=function(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()},n.setupEme_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,n=eu({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:t&&t.media()});this.player_.tech_.on("keystatuschange",(function(t){if("output-restricted"===t.status){var n=e.masterPlaylistController_.master();if(n&&n.playlists){var r,i=[];if(n.playlists.forEach((function(e){e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height>=720&&(!e.excludeUntil||e.excludeUntil<1/0)&&(e.excludeUntil=1/0,i.push(e))})),i.length)(r=Xi.log).warn.apply(r,['DRM keystatus changed to "output-restricted." Removing the following HD playlists that will most likely fail to play and clearing the buffer. This may be due to HDCP restrictions on the stream and the capabilities of the current device.'].concat(i)),e.masterPlaylistController_.fastQualityChange_()}}})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),11!==Xi.browser.IE_VERSION&&n?this.createKeySessions_():this.masterPlaylistController_.sourceUpdater_.initializedEme()},n.setupQualityLevels_=function(){var e=this,t=Xi.players[this.tech_.options_.playerId];t&&t.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var t,n;t=e.qualityLevels_,(n=e).representations().forEach((function(e){t.addQualityLevel(e)})),Jo(t,n.playlists)})),this.playlists.on("mediachange",(function(){Jo(e.qualityLevels_,e.playlists)})))},t.version=function(){return{"@videojs/http-streaming":"2.16.2","mux.js":"6.0.1","mpd-parser":"0.22.1","m3u8-parser":"4.8.0","aes-decrypter":"3.1.3"}},n.version=function(){return this.constructor.version()},n.canChangeType=function(){return ko.canChangeType()},n.play=function(){this.masterPlaylistController_.play()},n.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},n.duration=function(){return this.masterPlaylistController_.duration()},n.seekable=function(){return this.masterPlaylistController_.seekable()},n.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&a.a.URL.revokeObjectURL&&(a.a.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),e.prototype.dispose.call(this)},n.convertToProgramTime=function(e,t){return Za({playlist:this.masterPlaylistController_.media(),time:e,callback:t})},n.seekToProgramTime=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=2),es({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:r,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},t}(Xi.getComponent("Component")),ru={name:"videojs-http-streaming",VERSION:"2.16.2",canHandleSource:function(e,t){void 0===t&&(t={});var n=Xi.mergeOptions(Xi.options,t);return ru.canPlayType(e.type,n)},handleSource:function(e,t,n){void 0===n&&(n={});var r=Xi.mergeOptions(Xi.options,n);return t.vhs=new nu(e,t,r),Xi.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return Xi.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=Va(),t.vhs.src(e.src,e.type),t.vhs},canPlayType:function(e,t){var n=Object(O.a)(e);if(!n)return"";var r=ru.getOverrideNative(t);return!Qo.supportsTypeNatively(n)||r?"maybe":""},getOverrideNative:function(e){void 0===e&&(e={});var t=e,n=t.vhs,r=void 0===n?{}:n,i=t.hls,a=void 0===i?{}:i,s=!(Xi.browser.IS_ANY_SAFARI||Xi.browser.IS_IOS),o=r.overrideNative,u=void 0===o?s:o,l=a.overrideNative;return void 0!==l&&l||u}};(Object(A.c)("avc1.4d400d,mp4a.40.2")&&Xi.getTech("Html5").registerSourceHandler(ru,0),Xi.VhsHandler=nu,Object.defineProperty(Xi,"HlsHandler",{get:function(){return Xi.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),nu},configurable:!0}),Xi.VhsSourceHandler=ru,Object.defineProperty(Xi,"HlsSourceHandler",{get:function(){return Xi.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),ru},configurable:!0}),Xi.Vhs=Qo,Object.defineProperty(Xi,"Hls",{get:function(){return Xi.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),Qo},configurable:!0}),Xi.use||(Xi.registerComponent("Hls",Qo),Xi.registerComponent("Vhs",Qo)),Xi.options.vhs=Xi.options.vhs||{},Xi.options.hls=Xi.options.hls||{},Xi.getPlugin&&Xi.getPlugin("reloadSourceOnError"))||(Xi.registerPlugin||Xi.plugin)("reloadSourceOnError",(function(e){!function e(t,n){var r=0,i=0,a=Xi.mergeOptions($o,n);t.ready((function(){t.trigger({type:"usage",name:"vhs-error-reload-initialized"}),t.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var s=function(){i&&t.currentTime(i)},o=function(e){null!=e&&(i=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",s),t.src(e),t.trigger({type:"usage",name:"vhs-error-reload"}),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())},u=function(){return Date.now()-r<1e3*a.errorInterval?(t.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void t.trigger({type:"usage",name:"hls-error-reload-canceled"})):a.getSource&&"function"==typeof a.getSource?(r=Date.now(),a.getSource.call(t,o)):void Xi.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},l=function e(){t.off("loadedmetadata",s),t.off("error",u),t.off("dispose",e)};t.on("error",u),t.on("dispose",l),t.reloadSourceOnError=function(n){l(),e(t,n)}}(this,e)}));t.default=Xi}.call(this,n("yLpj"))},"8VTv":function(e,t,n){!function(){var e={videojs:n("YvAh").default,wistia:n("PaVT").default,youtube:n("qBcj").default,cloud:n("rP/I").default};function t(){window.App.videoOpensFull&&(document.querySelector("[data-player-fullscreen]")&&(window.isFullscreen?i():r()))}function r(){if(window.App.videoOpensFull){var e=document.querySelector("[data-player-fullscreen]"),t=document.querySelector("[data-vsl-container]"),n=document.querySelector("[data-vsl]"),r=document.querySelector("[data-player]");e&&(e.setAttribute("data-fullscreen","true"),e.removeAttribute("data-video-exit-fullscreen"),t.style.maxWidth="none",n.style.maxWidth="none",r.style.height=document.getElementById("player").offsetHeight-122+"px",r.scrollIntoView(),window.isFullscreen=!0)}}function i(){if(window.App.videoOpensFull){var e=document.querySelector("[data-player-fullscreen]"),t=document.querySelector("[data-vsl-container]"),n=document.querySelector("[data-vsl]"),r=document.querySelector("[data-player]");e&&(e.setAttribute("data-video-exit-fullscreen","true"),e.removeAttribute("data-fullscreen"),t.style.maxWidth="900px",n.style.maxWidth="900px",r.style.height=document.getElementById("player").offsetHeight-122+"px",window.isFullscreen=!1)}}e.hasOwnProperty(window.App.playerType)&&(window.player=new e[window.App.playerType],window.isFullscreen=!1,player.enabled&&(player.ready((function(){if(window.playerReady=!0,window.visibilityChanged=!1,"0"!==getUrlParameter("video")){"cloud"!==window.App.playerType&&window.App.autoplay&&"0"!==getUrlParameter("ap")&&player.play(),document.querySelector("[data-player-thumbnail]").style.display="none";var e=document.querySelector("[data-player-play]"),n=document.querySelector("[data-player-mobile-play]"),r=document.querySelector("[data-player-unmute]"),i=document.querySelector("[data-player-dim]");i.style.visibility="visible",window.App.isMobile&&(n.style.display="flex"),r.style.display=window.App.muted&&"1"!==getUrlParameter("m")?"flex":"none",window.App.isMobile||(!1!==getUrlParameter("ap")||window.App.autoplay)&&"0"!==getUrlParameter("ap")||(window.App.playerShowControls?(e.style.display="none",r.style.display="none"):(e.style.display="flex",r.style.display="none"),player.unmute()),player.onPause((function(){window.visibilityChanged?window.visibilityChanged=!1:(0==window.App.playerShowControls&&(e.style.display="flex",i.classList.remove("is-dimmed")),0===window.modals.open&&t())})),player.onPlay((function(t){e.style.display="none",i.classList.add("is-dimmed")}));var a=function(r){r.preventDefault(),player.play(),player.unmute(),e.style.display="none",n.style.display="none",0===window.modals.open&&t()};e.addEventListener("click",a),n.addEventListener("click",a),r.addEventListener("click",(function(e){e.preventDefault(),0===window.modals.open&&t(),player.unmute(),r.style.display="none"}))}else player.style.display="none"})),window.scrollToPlayer=function(){window.scrollToElement(document.body)},window.adjustSubttilesOnWideScreen=function(){var e=window.innerWidth/window.innerHeight,t=document.querySelector("[data-player-fullscreen]"),n=document.querySelector("[data-player-subtitles]");if(e>1.78&&t.getAttribute("data-fullscreen")){var r=(window.innerWidth-window.innerHeight*(16/9))/window.innerWidth*65;n.style.marginBottom=r+"%"}},window.toggleFullscreenVideo=t,window.setFullscreenVideo=r,window.exitFullscreenVideo=i,document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(window.visibilityChanged=!0)}))))}()},"8oxB":function(e,t){var n,r,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u,l=[],c=!1,d=-1;function h(){c&&u&&(c=!1,u.length?l=u.concat(l):d=-1,l.length&&p())}function p(){if(!c){var e=o(h);c=!0;for(var t=l.length;t;){for(u=l,l=[];++d1)for(var n=1;n=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var o=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(o&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:A(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,n,r,i,a,s){try{var o=e[a](s),u=o.value}catch(e){return void n(e)}o.done?t(u):Promise.resolve(u).then(r,i)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var s=e.apply(t,n);function o(e){i(s,r,a,o,u,"next",e)}function u(e){i(s,r,a,o,u,"throw",e)}o(void 0)}))}}window.initStripeCheckout=function(){var e,t=Stripe("pk_test_51IigO8I9MBtFE6bVW2qKUnafNkfwngreXad3tV6l9te258XJLkb3QIs5sw9JmNOYp4qbBQoMuqggqOCprxnl4AaA00C9WPbNUs"),n=[{id:"prod_KEQJI9FLEjcFQd"}];function i(){return(i=a(r().mark((function i(){var a,s;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,fetch("/stripe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:n})}).then((function(e){return e.json()}));case 2:a=r.sent,s=a.clientSecret,(e=t.elements({clientSecret:s})).create("payment").mount("#payment-element");case 7:case"end":return r.stop()}}),i)})))).apply(this,arguments)}function s(){return(s=a(r().mark((function n(i){var a,s;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i.preventDefault(),l(!0),n.next=4,t.confirmPayment({elements:e,confirmParams:{return_url:"https://silencil.com/stripe/process"}});case 4:a=n.sent,"card_error"===(s=a.error).type||"validation_error"===s.type?u(s.message):u("An unexpected error occured."),l(!1);case 8:case"end":return n.stop()}}),n)})))).apply(this,arguments)}function o(){return(o=a(r().mark((function e(){var n,i,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=new URLSearchParams(window.location.search).get("payment_intent_client_secret")){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,t.retrievePaymentIntent(n);case 5:i=e.sent,a=i.paymentIntent,e.t0=a.status,e.next="succeeded"===e.t0?10:"processing"===e.t0?12:"requires_payment_method"===e.t0?14:16;break;case 10:return u("Payment succeeded!"),e.abrupt("break",18);case 12:return u("Your payment is processing."),e.abrupt("break",18);case 14:return u("Your payment was not successful, please try again."),e.abrupt("break",18);case 16:return u("Something went wrong."),e.abrupt("break",18);case 18:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function u(e){var t=document.querySelector("#payment-message");t.classList.remove("hidden"),t.textContent=e,setTimeout((function(){t.classList.add("hidden"),e.textContent=""}),4e3)}function l(e){e?(document.querySelector("#submit").disabled=!0,document.querySelector("#spinner").classList.remove("hidden"),document.querySelector("#button-text").classList.add("hidden")):(document.querySelector("#submit").disabled=!1,document.querySelector("#spinner").classList.add("hidden"),document.querySelector("#button-text").classList.remove("hidden"))}!function(){i.apply(this,arguments)}(),function(){o.apply(this,arguments)}(),document.querySelector("#payment-form").addEventListener("submit",(function(e){return s.apply(this,arguments)}))}},H7XF:function(e,t,n){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=l(e),s=r[0],o=r[1],u=new a(function(e,t,n){return 3*(t+n)/4-n}(0,s,o)),c=0,d=o>0?s-4:s;for(n=0;n>16&255,u[c++]=t>>8&255,u[c++]=255&t;2===o&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[c++]=255&t);1===o&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],s=0,o=n-i;so?o:s+16383));1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return a.join("")};for(var r=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,u=s.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var i,a,s=[],o=t;o>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},HA9e:function(e,t){var n=document.querySelector("[data-scroll-to-top]");if(n){var r=window.innerHeight;window.addEventListener("scroll",(function(){n.style.display=window.scrollY>r?"flex":"none"})),n.addEventListener("click",(function(){!function e(){var t=document.documentElement.scrollTop||document.body.scrollTop;t>0&&(window.requestAnimationFrame(e),window.scrollTo(0,t-t/8))}()}))}},HSsa:function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(a)})),e.exports=u}).call(this,n("8oxB"))},K4wu:function(e,t,n){var r=n("vgmO"),i=e.exports={WebVTT:n("0CxO"),VTTCue:n("sDzi"),VTTRegion:n("+X0y")};r.vttjs=i,r.WebVTT=i.WebVTT;var a=i.VTTCue,s=i.VTTRegion,o=r.VTTCue,u=r.VTTRegion;i.shim=function(){r.VTTCue=a,r.VTTRegion=s},i.restore=function(){r.VTTCue=o,r.VTTRegion=u},r.VTTCue||i.shim()},LYNF:function(e,t,n){"use strict";var r=n("OH9c");e.exports=function(e,t,n,i,a){var s=new Error(e);return r(s,t,n,i,a)}},Lmem:function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},Lq7N:function(e,t){function n(e,t,n){var r=document.querySelector(e);r&&r.addEventListener(t,(function(){fbq("trackCustom",n)}))}n("[data-transcript-button]","click","Transcript Button Clicked"),n("[data-accept-downsell-1]","click","Downsell 1 Accepted"),n("[data-accept-downsell-2]","click","Downsell 2 Accepted"),n("[data-decline-downsell-2]","click","Downsell 2 Declined"),n("[data-decline-downsell-1]","click","Downsell 1 Declined"),document.querySelectorAll("[data-modal-action]").forEach((function(e){e.href.includes("#transcript")&&e.addEventListener("click",(function(){fbq("trackCustom","Transcript Button Modal Clicked")}))}))},MLWZ:function(e,t,n){"use strict";var r=n("xTJ+");function i(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(r.isURLSearchParams(t))a=t.toString();else{var s=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),s.push(i(t)+"="+i(e))})))})),a=s.join("&")}if(a){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},Mh8q:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n("3mbX"),i=Object(r.k)([73,68,51]),a=function e(t,n){return void 0===n&&(n=0),(t=Object(r.k)(t)).length-n<10||!Object(r.a)(t,i,{offset:n})?n:(n+=function(e,t){void 0===t&&(t=0);var n=(e=Object(r.k)(e))[t+5],i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&n)>>4?i+20:i+10}(t,n),e(t,n))}},NgPB:function(e,t,n){"use strict";var r=n("vgmO"),i=n("pVnL"),a=n("g2LC");o.httpHandler=n("jACb");function s(e,t,n){var r=e;return a(t)?(n=t,"string"==typeof e&&(r={uri:e})):r=i({},t,{uri:e}),r.callback=n,r}function o(e,t,n){return u(t=s(e,t,n))}function u(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,n=function(n,r,i){t||(t=!0,e.callback(n,r,i))};function r(){var e=void 0;if(e=l.response?l.response:l.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(l),g)try{e=JSON.parse(e)}catch(e){}return e}function i(e){return clearTimeout(c),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,n(e,y)}function a(){if(!u){var t;clearTimeout(c),t=e.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var i=y,a=null;return 0!==t?(i={body:r(),statusCode:t,method:h,headers:{},url:d,rawRequest:l},l.getAllResponseHeaders&&(i.headers=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var n=e.indexOf(":"),r=e.slice(0,n).trim().toLowerCase(),i=e.slice(n+1).trim();void 0===t[r]?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]})),t):t}(l.getAllResponseHeaders()))):a=new Error("Internal XMLHttpRequest Error"),n(a,i,i.body)}}var s,u,l=e.xhr||null;l||(l=e.cors||e.useXDR?new o.XDomainRequest:new o.XMLHttpRequest);var c,d=l.url=e.uri||e.url,h=l.method=e.method||"GET",p=e.body||e.data,f=l.headers=e.headers||{},m=!!e.sync,g=!1,y={body:void 0,headers:{},statusCode:0,method:h,url:d,rawRequest:l};if("json"in e&&!1!==e.json&&(g=!0,f.accept||f.Accept||(f.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(f["content-type"]||f["Content-Type"]||(f["Content-Type"]="application/json"),p=JSON.stringify(!0===e.json?p:e.json))),l.onreadystatechange=function(){4===l.readyState&&setTimeout(a,0)},l.onload=a,l.onerror=i,l.onprogress=function(){},l.onabort=function(){u=!0},l.ontimeout=i,l.open(h,d,!m,e.username,e.password),m||(l.withCredentials=!!e.withCredentials),!m&&e.timeout>0&&(c=setTimeout((function(){if(!u){u=!0,l.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",i(e)}}),e.timeout)),l.setRequestHeader)for(s in f)f.hasOwnProperty(s)&&l.setRequestHeader(s,f[s]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(l.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(l),l.send(p||null),l}e.exports=o,e.exports.default=o,o.XMLHttpRequest=r.XMLHttpRequest||function(){},o.XDomainRequest="withCredentials"in new o.XMLHttpRequest?o.XMLHttpRequest:r.XDomainRequest,function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:250;setTimeout((function(){t.querySelectorAll("[data-youtube-embed]:not(.is-plain)").forEach((function(t){e(t)}))}),n)};document.querySelectorAll("[data-youtube-embed]:not(.is-plain)").forEach((function(t){t.querySelector("iframe").onload=function(){e(t),window.addEventListener("resize",_debounce((function(){e(t)}),250))}}))}()},SksO:function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t,r)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},SntB:function(e,t,n){"use strict";var r=n("xTJ+");e.exports=function(e,t){t=t||{};var n={},i=["url","method","params","data"],a=["headers","auth","proxy"],s=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];r.forEach(i,(function(e){void 0!==t[e]&&(n[e]=t[e])})),r.forEach(a,(function(i){r.isObject(t[i])?n[i]=r.deepMerge(e[i],t[i]):void 0!==t[i]?n[i]=t[i]:r.isObject(e[i])?n[i]=r.deepMerge(e[i]):void 0!==e[i]&&(n[i]=e[i])})),r.forEach(s,(function(r){void 0!==t[r]?n[r]=t[r]:void 0!==e[r]&&(n[r]=e[r])}));var o=i.concat(a).concat(s),u=Object.keys(t).filter((function(e){return-1===o.indexOf(e)}));return r.forEach(u,(function(r){void 0!==t[r]?n[r]=t[r]:void 0!==e[r]&&(n[r]=e[r])})),n}},UL75:function(e,t){window.Dropdown=function(e){this.dropdown=e,this.dropdownContent=e.querySelector("[data-dropdown-content]"),this.handleToggle(),this.handleClickOutside()},Dropdown.prototype={open:function(){this.dropdown.classList.add("open"),this.dropdownContent.classList.add("open")},close:function(){this.dropdown.classList.remove("open"),this.dropdownContent.classList.remove("open")},isOpen:function(){return this.dropdown.classList.contains("open")},handleToggle:function(){var e=this;this.dropdown.querySelector("[data-dropdown-toggle]").addEventListener("click",(function(t){t.preventDefault(),e.isOpen()?e.close():e.open()}))},handleClickOutside:function(){var e=this;document.addEventListener("click",(function(t){if(e.isOpen()){e.dropdown;var n=t.target;if(n.closest("[data-dropdown-content]"))return e.close();do{if(n==e.dropdown)return;n=n.parentNode}while(n);e.close()}}))}},document.querySelectorAll("[data-dropdown]").forEach((function(e){new Dropdown(e)}))},UnBK:function(e,t,n){"use strict";var r=n("xTJ+"),i=n("xAGQ"),a=n("Lmem"),s=n("JEQr");function o(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return o(e),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return o(e),t.data=i(t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(o(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},VbXa:function(e,t,n){var r=n("SksO");e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},W115:function(e,t){},XDow:function(e,t){!function(){var e=document.querySelector("[data-buy-button]"),t=document.querySelector("[data-buy-button-price]"),n=document.querySelector("[data-product-addon1]"),r=document.querySelector("[data-product-addon2]");if(e&&t&&n&&r){var i=function(){var i="base";n.checked&&(i="addon1"),r.checked&&(i="addon2"),n.checked&&r.checked&&(i="full"),t.innerHTML=App.productVariants[i][0],e.href=App.productVariants[i][1]};n.addEventListener("click",i),r.addEventListener("click",i)}}()},XaiU:function(e,t){},"Y+wj":function(e,t,n){"use strict";var r=n("0Tbm"),i=n.n(r),a=n("vgmO"),s=n.n(a);t.a=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=s.a.location&&s.a.location.href||"");var n="function"==typeof s.a.URL,r=/^\/\//.test(e),a=!s.a.location&&!/\/\//i.test(e);if(n?e=new s.a.URL(e,s.a.location||"http://example.com"):/\/\//i.test(e)||(e=i.a.buildAbsoluteURL(s.a.location&&s.a.location.href||"",e)),n){var o=new URL(t,e);return a?o.href.slice("http://example.com".length):r?o.href.slice(o.protocol.length):o.href}return i.a.buildAbsoluteURL(e,t)}},YvAh:function(e,t,n){"use strict";n.r(t);var r=n("8OJ3").default,i=function(){this.el=document.querySelector("[data-player] .video-js"),this.enabled=null!==this.el,this.el&&(this.player=r(this.el,{preload:"auto",controls:!1,loop:!1,autoplay:!0}),this.handleClickToPause())};i.prototype={ready:function(e){this.player.ready(e)},onPause:function(e){this.player.on("pause",e)},play:function(){this.player.play()},pause:function(){this.player.pause()},mute:function(){this.player.muted(!0)},unmute:function(){this.player.muted(!1)},handleClickToPause:function(){var e=this;this.el.addEventListener("click",(function(){e.player.paused()?e.player.play():e.player.pause()}))}},t.default=i},b48C:function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.__esModule=!0,e.exports.default=e.exports},b9VK:function(e,t){},bD3e:function(e,t){!function(){var e=document.querySelector("[data-members-area]"),t=document.querySelector("[data-members-area-loader]");if((e||t)&&(!e||t)){var n,r=1;n=setInterval((function(){if(r>5)window.location="/login";else{var e=new XMLHttpRequest;e.addEventListener("load",(function(){JSON.parse(this.responseText).ready&&(location.reload(!0),clearInterval(n)),r++})),e.open("GET","/members/check"),e.send()}}),1e3)}}()},bUC5:function(e,t,n){n("7MRW"),n("o0O0"),n("c6qX"),n("UL75"),n("Nv4c"),n("co6R"),n("8VTv"),n("O61S"),n("HA9e"),n("XDow"),n("bD3e"),n("DnfW"),n("EHsL"),n("lhgG"),n("SQjN"),n("6NT9"),n("blvv"),n("Fo58"),n("+Sp6"),n("ROwG"),n("Lq7N"),n("b9VK"),n("xriN")},blvv:function(e,t,n){"use strict";n.r(t);var r=n("vDqi"),i=n.n(r),a=n("p46w"),s=n.n(a);window.hideTranscriptButton=function(){var e=document.querySelector("[data-transcript-button]");e&&(e.style.display="none")},window.randomString=function(e){for(var t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=0;r1&&void 0!==arguments[1]?arguments[1]:{};t.event=e,i.a.get("/event/"+s.a.get("user"),{params:t})},window.App.sendSale=function(){var e=void 0!==s.a.get("transcript");window.userId=s.a.get("user"),window.App.sendEvent("sale:"+(e?"transcript":"regular"))},document.addEventListener("DOMContentLoaded",(function(e){window.userId=s.a.get("user"),void 0===window.userId&&(window.userId=randomString(16),s.a.set("user",window.userId,{expires:365})),"/upgrade-1"!==window.location.pathname&&s.a.remove("transcript"),window.App.sendEvent("page:load",{page:window.location.href})})),window.addEventListener("modal:open",(function(e){"transcriptModal"===e.detail.modal&&(s.a.set("transcript","true",{expires:365}),window.App.sendEvent("transcript:open"))})),window.addEventListener("modal:close",(function(e){"transcriptModal"===e.detail.modal&&(s.a.remove("transcript"),window.App.sendEvent("transcript:close"))}))},c6qX:function(e,t){window.modalZIndex=9998,window.modals={open:0,list:{}},window.Modal=function(e){this.name=e.id,this.modal=e,this.handleActions(),this.handleClose()},window.Modal.prototype={open:function(){var e=this;this.modal.style.display="block",this.modal.classList.add("modal-enter"),setTimeout((function(){e.modal.classList.remove("modal-enter")}),100),this.modal.setAttribute("data-open",!0),document.body.style.overflow="hidden",window.modals.open++,window.player&&window.player.pause(),window.dispatchEvent(new CustomEvent("modal:open",{detail:{modal:this.name}}))},close:function(){var e=this;this.modal.classList.add("modal-enter"),setTimeout((function(){e.modal.classList.remove("modal-enter"),e.modal.style.display="none"}),100),this.modal.removeAttribute("data-open"),window.modals.open--,0===window.modals.open&&(document.body.style.overflow="auto",window.player&&(window.player.play(),window.isFullscreen||window.App.firstPlay||toggleFullscreenVideo())),window.dispatchEvent(new CustomEvent("modal:close",{detail:{modal:this.name}}))},isOpen:function(){return this.modal.getAttribute("data-open")},handleActions:function(){var e=this;this.modal.querySelectorAll("[data-modal-action]").forEach((function(t){t.addEventListener("click",(function(n){var r=t.hash;r.length&&(n.preventDefault(),"#close"!==r&&openModal(r.substr(1)),setTimeout((function(){e.close()}),150))}))}))},handleClose:function(){var e=this;this.modal.querySelectorAll("[data-modal-close]").forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault(),e.close()}))}))}},window.getModal=function(e){if(!window.modals.list.hasOwnProperty(e)){var t=Array.prototype.slice.call(document.querySelectorAll("[data-modal]")).filter((function(t){return t.id===e+"Modal"}));t.length&&(window.modals.list[e]=new Modal(t[0]))}return window.modals.list[e]},window.openModal=function(e){var t=window.getModal(e);t.isOpen()||t.open(),t.modal.style.zIndex=window.modalZIndex,window.modalZIndex++},window.closeModal=function(e){var t=window.getModal(e);t.close(),window.modalZIndex--,t.modal.style.zIndex=window.modalZIndex}},co6R:function(e,t){!function(){if("0"!==getUrlParameter("exit","1")&&null!==App.exitPopup){var e=!1;if(window.showExitPopup=function(t){if(t.clientY<=0){var n=window.getModal("transcript");e||n&&(!n||n.isOpen())||(openModal(App.exitPopup+"ExitPopup"),e=!0),"clickbank"!==App.merchant&&n&&n.isOpen()&&window.getModal("transcriptExitPopup")&&openModal("transcriptExitPopup")}},App.softExitPopup&&document.querySelector("html").addEventListener("mouseleave",window.showExitPopup),App.hardExitPopup){for(var t=!1,n=document.getElementsByTagName("A"),r=0;r0;i+=12,a--)n.references.push({referenceType:(128&e[i])>>>7,referencedSize:2147483647&t.getUint32(i),subsegmentDuration:t.getUint32(i+4),startsWithSap:!!(128&e[i+8]),sapType:(112&e[i+8])>>>4,sapDeltaTime:268435455&t.getUint32(i+8)});return n}},gqAi:function(e,t){},gtzJ:function(e,t,n){"use strict";n.d(t,"a",(function(){return x})),n.d(t,"b",(function(){return A}));var r=n("mrSG"),i=n("9/Zf"),a=n("kdvv"),s=Object(i.b)(),o="Sentry Logger ",u=function(){function e(){this._enabled=!1}return e.prototype.disable=function(){this._enabled=!1},e.prototype.enable=function(){this._enabled=!0},e.prototype.log=function(){for(var e=[],t=0;t=0?Object(r.b)(this._breadcrumbs,[n]).slice(-t):Object(r.b)(this._breadcrumbs,[n]),this._notifyScopeListeners(),this},e.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},e.prototype.applyToEvent=function(e,t){var n;if(this._extra&&Object.keys(this._extra).length&&(e.extra=Object(r.a)(Object(r.a)({},this._extra),e.extra)),this._tags&&Object.keys(this._tags).length&&(e.tags=Object(r.a)(Object(r.a)({},this._tags),e.tags)),this._user&&Object.keys(this._user).length&&(e.user=Object(r.a)(Object(r.a)({},this._user),e.user)),this._contexts&&Object.keys(this._contexts).length&&(e.contexts=Object(r.a)(Object(r.a)({},this._contexts),e.contexts)),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts=Object(r.a)({trace:this._span.getTraceContext()},e.contexts);var i=null===(n=this._span.transaction)||void 0===n?void 0:n.name;i&&(e.tags=Object(r.a)({transaction:i},e.tags))}return this._applyFingerprint(e),e.breadcrumbs=Object(r.b)(e.breadcrumbs||[],this._breadcrumbs),e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,this._notifyEventProcessors(Object(r.b)(g(),this._eventProcessors),e,t)},e.prototype._notifyEventProcessors=function(e,t,n,i){var a=this;return void 0===i&&(i=0),new f((function(s,o){var u=e[i];if(null===t||"function"!=typeof u)s(t);else{var l=u(Object(r.a)({},t),n);Object(h.j)(l)?l.then((function(t){return a._notifyEventProcessors(e,t,n,i+1).then(s)})).then(null,o):a._notifyEventProcessors(e,l,n,i+1).then(s).then(null,o)}}))},e.prototype._notifyScopeListeners=function(){var e=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((function(t){t(e)})),this._notifyingListeners=!1)},e.prototype._applyFingerprint=function(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint},e}();function g(){var e=Object(i.b)();return e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.globalEventProcessors=e.__SENTRY__.globalEventProcessors||[],e.__SENTRY__.globalEventProcessors}!function(e){e.Ok="ok",e.Exited="exited",e.Crashed="crashed",e.Abnormal="abnormal"}(p||(p={}));var y=n("6PXS"),v=function(){function e(e){this.errors=0,this.sid=Object(i.c)(),this.timestamp=Date.now(),this.started=Date.now(),this.duration=0,this.status=p.Ok,e&&this.update(e)}return e.prototype.update=function(e){void 0===e&&(e={}),e.user&&(e.user.ip_address&&(this.ipAddress=e.user.ip_address),e.did||(this.did=e.user.id||e.user.email||e.user.username)),this.timestamp=e.timestamp||Date.now(),e.sid&&(this.sid=32===e.sid.length?e.sid:Object(i.c)()),e.did&&(this.did=""+e.did),"number"==typeof e.started&&(this.started=e.started),"number"==typeof e.duration?this.duration=e.duration:this.duration=this.timestamp-this.started,e.release&&(this.release=e.release),e.environment&&(this.environment=e.environment),e.ipAddress&&(this.ipAddress=e.ipAddress),e.userAgent&&(this.userAgent=e.userAgent),"number"==typeof e.errors&&(this.errors=e.errors),e.status&&(this.status=e.status)},e.prototype.close=function(e){e?this.update({status:e}):this.status===p.Ok?this.update({status:p.Exited}):this.update()},e.prototype.toJSON=function(){return Object(y.a)({sid:""+this.sid,init:!0,started:new Date(this.started).toISOString(),timestamp:new Date(this.timestamp).toISOString(),status:this.status,errors:this.errors,did:"number"==typeof this.did||"string"==typeof this.did?""+this.did:void 0,duration:this.duration,attrs:Object(y.a)({release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent})})},e}(),_=function(){function e(e,t,n){void 0===t&&(t=new m),void 0===n&&(n=3),this._version=n,this._stack=[{}],this.getStackTop().scope=t,this.bindClient(e)}return e.prototype.isOlderThan=function(e){return this._versiont.timeline?1:-1}));var t,n},A=function(e){var t,n,r=[];return t=e,n=function(e,t,n,i){r=r.concat(e.playlists||[])},C.forEach((function(e){for(var r in t.mediaGroups[e])for(var i in t.mediaGroups[e][r]){var a=t.mediaGroups[e][r][i];n(a,e,r,i)}})),r},O=function(e){var t=e.playlist,n=e.mediaSequence;t.mediaSequence=n,t.segments.forEach((function(e,n){e.number=t.mediaSequence+n}))},I=function(e){var t=e.oldManifest,n=e.newManifest,r=t.playlists.concat(A(t)),i=n.playlists.concat(A(n));return n.timelineStarts=x([t.timelineStarts,n.timelineStarts]),function(e){var t=e.oldPlaylists,n=e.newPlaylists,r=e.timelineStarts;n.forEach((function(e){e.discontinuitySequence=p(r,(function(t){return t.timeline===e.timeline}));var n=function(e,t){for(var n=0;nn.timeline||n.segments.length&&e.timeline>n.segments[n.segments.length-1].timeline)&&e.discontinuitySequence--);n.segments[a].discontinuity&&!i.discontinuity&&(i.discontinuity=!0,e.discontinuityStarts.unshift(0),e.discontinuitySequence--),O({playlist:e,mediaSequence:n.segments[a].number})}}))}({oldPlaylists:r,newPlaylists:i,timelineStarts:n.timelineStarts}),n},P=function(e){return e&&e.uri+"-"+(t=e.byterange,n="bigint"==typeof t.offset||"bigint"==typeof t.length?a.a.BigInt(t.offset)+a.a.BigInt(t.length)-a.a.BigInt(1):t.offset+t.length-1,t.offset+"-"+n);var t,n},L=function(e){return c(e.reduce((function(e,t){var n=t.attributes.id+(t.attributes.lang||"");if(e[n]){var r;if(t.segments)t.segments[0]&&(t.segments[0].discontinuity=!0),(r=e[n].segments).push.apply(r,t.segments);t.attributes.contentProtection&&(e[n].attributes.contentProtection=t.attributes.contentProtection)}else e[n]=t,e[n].attributes.timelineStarts=[];return e[n].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{})).map((function(e){var t,n;return e.discontinuityStarts=(t=e.segments||[],n="discontinuity",t.reduce((function(e,t,r){return t[n]&&e.push(r),e}),[])),e}))},D=function(e,t){var n=P(e.sidx),r=n&&t[n]&&t[n].sidx;return r&&k(e,r,e.sidx.resolvedUri),e},R=function(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var n in e)e[n]=D(e[n],t);return e},N=function(e){var t,n=e.attributes,r=e.segments,i=e.sidx,a=e.discontinuityStarts,s={attributes:(t={NAME:n.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:n.width,height:n.height},CODECS:n.codecs,BANDWIDTH:n.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===n.type,timeline:n.periodStart,resolvedUri:"",targetDuration:n.duration,discontinuityStarts:a,timelineStarts:n.timelineStarts,segments:r};return n.frameRate&&(s.attributes["FRAME-RATE"]=n.frameRate),n.contentProtection&&(s.contentProtection=n.contentProtection),i&&(s.sidx=i),s},M=function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType},U=function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType},j=function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType},B=function(e){return e?Object.keys(e).reduce((function(t,n){var r=e[n];return t.concat(r.playlists)}),[]):[]},q=function(e){var t,n=e.dashPlaylists,r=e.locations,i=e.sidxMapping,a=void 0===i?{}:i,s=e.previousManifest;if(!n.length)return{};var o=n[0].attributes,u=o.sourceDuration,l=o.type,c=o.suggestedPresentationDelay,d=o.minimumUpdatePeriod,h=L(n.filter(M)).map(N),f=L(n.filter(U)),m=L(n.filter(j)),g=n.map((function(e){return e.attributes.captionServices})).filter(Boolean),y={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(t={AUDIO:{},VIDEO:{}},t["CLOSED-CAPTIONS"]={},t.SUBTITLES={},t),uri:"",duration:u,playlists:R(h,a)};d>=0&&(y.minimumUpdatePeriod=1e3*d),r&&(y.locations=r),"dynamic"===l&&(y.suggestedPresentationDelay=c);var v,_,b=0===y.playlists.length,T=f.length?function(e,t,n){var r;void 0===t&&(t={}),void 0===n&&(n=!1);var i=e.reduce((function(e,i){var a=i.attributes.role&&i.attributes.role.value||"",s=i.attributes.lang||"",o=i.attributes.label||"main";if(s&&!i.attributes.label){var u=a?" ("+a+")":"";o=""+i.attributes.lang+u}e[o]||(e[o]={language:s,autoselect:!0,default:"main"===a,playlists:[],uri:""});var l=D(function(e,t){var n,r=e.attributes,i=e.segments,a=e.sidx,s=e.mediaSequence,o=e.discontinuitySequence,u=e.discontinuityStarts,l={attributes:(n={NAME:r.id,BANDWIDTH:r.bandwidth,CODECS:r.codecs},n["PROGRAM-ID"]=1,n),uri:"",endList:"static"===r.type,timeline:r.periodStart,resolvedUri:"",targetDuration:r.duration,discontinuitySequence:o,discontinuityStarts:u,timelineStarts:r.timelineStarts,mediaSequence:s,segments:i};return r.contentProtection&&(l.contentProtection=r.contentProtection),a&&(l.sidx=a),t&&(l.attributes.AUDIO="audio",l.attributes.SUBTITLES="subs"),l}(i,n),t);return e[o].playlists.push(l),void 0===r&&"main"===a&&((r=i).default=!0),e}),{});r||(i[Object.keys(i)[0]].default=!0);return i}(f,a,b):null,w=m.length?function(e,t){return void 0===t&&(t={}),e.reduce((function(e,n){var r=n.attributes.lang||"text";return e[r]||(e[r]={language:r,default:!1,autoselect:!1,playlists:[],uri:""}),e[r].playlists.push(D(function(e){var t,n=e.attributes,r=e.segments,i=e.mediaSequence,a=e.discontinuityStarts,s=e.discontinuitySequence;void 0===r&&(r=[{uri:n.baseUrl,timeline:n.periodStart,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration);var o=((t={NAME:n.id,BANDWIDTH:n.bandwidth})["PROGRAM-ID"]=1,t);return n.codecs&&(o.CODECS=n.codecs),{attributes:o,uri:"",endList:"static"===n.type,timeline:n.periodStart,resolvedUri:n.baseUrl||"",targetDuration:n.duration,timelineStarts:n.timelineStarts,discontinuityStarts:a,discontinuitySequence:s,mediaSequence:i,segments:r}}(n),t)),e}),{})}(m,a):null,S=h.concat(B(T),B(w)),E=S.map((function(e){return e.timelineStarts}));return y.timelineStarts=x(E),v=S,_=y.timelineStarts,v.forEach((function(e){e.mediaSequence=0,e.discontinuitySequence=p(_,(function(t){return t.timeline===e.timeline})),e.segments&&e.segments.forEach((function(e,t){e.number=t}))})),T&&(y.mediaGroups.AUDIO.audio=T),w&&(y.mediaGroups.SUBTITLES.subs=w),g.length&&(y.mediaGroups["CLOSED-CAPTIONS"].cc=g.reduce((function(e,t){return t?(t.forEach((function(t){var n=t.channel,r=t.language;e[r]={autoselect:!1,default:!1,instreamId:n,language:r},t.hasOwnProperty("aspectRatio")&&(e[r].aspectRatio=t.aspectRatio),t.hasOwnProperty("easyReader")&&(e[r].easyReader=t.easyReader),t.hasOwnProperty("3D")&&(e[r]["3D"]=t["3D"])})),e):e}),{})),s?I({oldManifest:s,newManifest:y}):y},F=function(e,t,n){var r=e.NOW,i=e.clientOffset,a=e.availabilityStartTime,s=e.timescale,o=void 0===s?1:s,u=e.periodStart,l=void 0===u?0:u,c=e.minimumUpdatePeriod,d=(r+i)/1e3+(void 0===c?0:c)-(a+l);return Math.ceil((d*o-t)/n)},H=function(e,t){for(var n=e.type,r=e.minimumUpdatePeriod,i=void 0===r?0:r,a=e.media,s=void 0===a?"":a,o=e.sourceDuration,u=e.timescale,l=void 0===u?1:u,c=e.startNumber,d=void 0===c?1:c,h=e.periodStart,p=[],f=-1,m=0;mf&&(f=_);var b=void 0;if(v<0){var T=m+1;b=T===t.length?"dynamic"===n&&i>0&&s.indexOf("$Number$")>0?F(e,f,y):(o*l-f)/y:(t[T].t-f)/y}else b=v+1;for(var w=d+p.length+b,S=d+p.length;S=i?a:""+new Array(i-a.length+1).join("0")+a)}}(t))},z=function(e,t){var n={RepresentationID:e.id,Bandwidth:e.bandwidth||0},i=e.initialization,a=void 0===i?{sourceURL:"",range:""}:i,s=b({baseUrl:e.baseUrl,source:W(a.sourceURL,n),range:a.range});return function(e,t){return e.duration||t?e.duration?S(e):H(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}]}(e,t).map((function(t){n.Number=t.number,n.Time=t.time;var i=W(e.media||"",n),a=e.timescale||1,o=e.presentationTimeOffset||0,u=e.periodStart+(t.time-o)/a;return{uri:i,timeline:t.timeline,duration:t.duration,resolvedUri:Object(r.a)(e.baseUrl||"",i),map:s,number:t.number,presentationTime:u}}))},G=function(e,t){var n=e.duration,r=e.segmentUrls,i=void 0===r?[]:r,a=e.periodStart;if(!n&&!t||n&&t)throw new Error(v);var s,o=i.map((function(t){return function(e,t){var n=e.baseUrl,r=e.initialization,i=void 0===r?{}:r,a=b({baseUrl:n,source:i.sourceURL,range:i.range}),s=b({baseUrl:n,source:t.media,range:t.mediaRange});return s.map=a,s}(e,t)}));return n&&(s=S(e)),t&&(s=H(e,t)),s.map((function(t,n){if(o[n]){var r=o[n],i=e.timescale||1,s=e.presentationTimeOffset||0;return r.timeline=t.timeline,r.duration=t.duration,r.number=t.number,r.presentationTime=a+(t.time-s)/i,r}})).filter((function(e){return e}))},X=function(e){var t,n,r=e.attributes,i=e.segmentInfo;i.template?(n=z,t=l(r,i.template)):i.base?(n=E,t=l(r,i.base)):i.list&&(n=G,t=l(r,i.list));var a={attributes:r};if(!n)return a;var s=n(t,i.segmentTimeline);if(t.duration){var o=t,u=o.duration,c=o.timescale,d=void 0===c?1:c;t.duration=u/d}else s.length?t.duration=s.reduce((function(e,t){return Math.max(e,Math.ceil(t.duration))}),0):t.duration=0;return a.attributes=t,a.segments=s,i.base&&t.indexRange&&(a.sidx=s[0],a.segments=[]),a},Y=function(e,t){return h(e.childNodes).filter((function(e){return e.tagName===t}))},K=function(e){return e.textContent.trim()},$=function(e){var t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;var n=t.slice(1),r=n[0],i=n[1],a=n[2],s=n[3],o=n[4],u=n[5];return 31536e3*parseFloat(r||0)+2592e3*parseFloat(i||0)+86400*parseFloat(a||0)+3600*parseFloat(s||0)+60*parseFloat(o||0)+parseFloat(u||0)},Q={mediaPresentationDuration:function(e){return $(e)},availabilityStartTime:function(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t=e)&&(t+="Z"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:function(e){return $(e)},suggestedPresentationDelay:function(e){return $(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return $(e)},start:function(e){return $(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},frameRate:function(e){return function(e){return parseFloat(e.split("/").reduce((function(e,t){return e/t})))}(e)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},presentationTimeOffset:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10);return isNaN(t)?$(e):t},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},J=function(e){return e&&e.attributes?h(e.attributes).reduce((function(e,t){var n=Q[t.name]||Q.DEFAULT;return e[t.name]=n(t.value),e}),{}):{}},Z={"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"},ee=function(e,t){return t.length?d(e.map((function(e){return t.map((function(t){return Object(r.a)(e,K(t))}))}))):e},te=function(e){var t=Y(e,"SegmentTemplate")[0],n=Y(e,"SegmentList")[0],r=n&&Y(n,"SegmentURL").map((function(e){return l({tag:"SegmentURL"},J(e))})),i=Y(e,"SegmentBase")[0],a=n||t,s=a&&Y(a,"SegmentTimeline")[0],o=n||i||t,u=o&&Y(o,"Initialization")[0],c=t&&J(t);c&&u?c.initialization=u&&J(u):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});var d={template:c,segmentTimeline:s&&Y(s,"S").map((function(e){return J(e)})),list:n&&l(J(n),{segmentUrls:r,initialization:J(u)}),base:i&&l(J(i),{initialization:J(u)})};return Object.keys(d).forEach((function(e){d[e]||delete d[e]})),d},ne=function(e,t,n){return function(r){var i,a=J(r),o=ee(t,Y(r,"BaseURL")),u=Y(r,"Role")[0],c={role:J(u)},h=l(e,a,c),p=Y(r,"Accessibility")[0],f="urn:scte:dash:cc:cea-608:2015"===(i=J(p)).schemeIdUri?("string"!=typeof i.value?[]:i.value.split(";")).map((function(e){var t,n;if(n=e,/^CC\d=/.test(e)){var r=e.split("=");t=r[0],n=r[1]}else/^CC\d$/.test(e)&&(t=e);return{channel:t,language:n}})):"urn:scte:dash:cc:cea-708:2015"===i.schemeIdUri?("string"!=typeof i.value?[]:i.value.split(";")).map((function(e){var t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){var n=e.split("="),r=n[0],i=n[1],a=void 0===i?"":i;t.channel=r,t.language=e,a.split(",").forEach((function(e){var n=e.split(":"),r=n[0],i=n[1];"lang"===r?t.language=i:"er"===r?t.easyReader=Number(i):"war"===r?t.aspectRatio=Number(i):"3D"===r&&(t["3D"]=Number(i))}))}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t})):void 0;f&&(h=l(h,{captionServices:f}));var m=Y(r,"Label")[0];if(m&&m.childNodes.length){var g=m.childNodes[0].nodeValue.trim();h=l(h,{label:g})}var y=Y(r,"ContentProtection").reduce((function(e,t){var n=J(t);n.schemeIdUri&&(n.schemeIdUri=n.schemeIdUri.toLowerCase());var r=Z[n.schemeIdUri];if(r){e[r]={attributes:n};var i=Y(t,"cenc:pssh")[0];if(i){var a=K(i);e[r].pssh=a&&Object(s.a)(a)}}return e}),{});Object.keys(y).length&&(h=l(h,{contentProtection:y}));var v=te(r),_=Y(r,"Representation"),b=l(n,v);return d(_.map(function(e,t,n){return function(r){var i=Y(r,"BaseURL"),a=ee(t,i),s=l(e,J(r)),o=te(r);return a.map((function(e){return{segmentInfo:l(n,o),attributes:l(s,{baseUrl:e})}}))}}(h,o,b)))}},re=function(e,t){return function(n,r){var i=ee(t,Y(n.node,"BaseURL")),a=l(e,{periodStart:n.attributes.start});"number"==typeof n.attributes.duration&&(a.periodDuration=n.attributes.duration);var s=Y(n.node,"AdaptationSet"),o=te(n.node);return d(s.map(ne(a,i,o)))}},ie=function(e){if(""===e)throw new Error(m);var t,n,r=new o.DOMParser;try{n=(t=r.parseFromString(e,"application/xml"))&&"MPD"===t.documentElement.tagName?t.documentElement:null}catch(e){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(g);return n},ae=function(e,t){void 0===t&&(t={});var n=function(e,t){void 0===t&&(t={});var n=t,r=n.manifestUri,i=void 0===r?"":r,a=n.NOW,s=void 0===a?Date.now():a,o=n.clientOffset,u=void 0===o?0:o,l=Y(e,"Period");if(!l.length)throw new Error(f);var c=Y(e,"Location"),h=J(e),p=ee([i],Y(e,"BaseURL"));h.type=h.type||"static",h.sourceDuration=h.mediaPresentationDuration||0,h.NOW=s,h.clientOffset=u,c.length&&(h.locations=c.map(K));var m=[];return l.forEach((function(e,t){var n=J(e),r=m[t-1];n.start=function(e){var t=e.attributes,n=e.priorPeriodAttributes,r=e.mpdType;return"number"==typeof t.start?t.start:n&&"number"==typeof n.start&&"number"==typeof n.duration?n.start+n.duration:n||"static"!==r?null:0}({attributes:n,priorPeriodAttributes:r?r.attributes:null,mpdType:h.type}),m.push({node:e,attributes:n})})),{locations:h.locations,representationInfo:d(m.map(re(h,p)))}}(ie(e),t),r=n.representationInfo.map(X);return q({dashPlaylists:r,locations:n.locations,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest})},se=function(e){return function(e){var t=Y(e,"UTCTiming")[0];if(!t)return null;var n=J(t);switch(n.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":n.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":n.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":n.method="DIRECT",n.value=Date.parse(n.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(_)}return n}(ie(e))}},i1Oy:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,i=/^application\/dash\+xml/i,a=function(e){return r.test(e)?"hls":i.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null}},iWKX:function(e,t){},iadd:function(e,t,n){"use strict";function r(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var i=r({HTML:"text/html",isHTML:function(e){return e===i.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),a=r({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===a.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=function(e,t){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},t.find=function(e,t,n){if(void 0===n&&(n=Array.prototype),e&&"function"==typeof n.find)return n.find.call(e,t);for(var r=0;r=400&&i.statusCode<=599){var s=a;if(t)if(r.TextDecoder){var o=function(e){void 0===e&&(e="");return e.toLowerCase().split(";").reduce((function(e,t){var n=t.split("="),r=n[0],i=n[1];return"charset"===r.trim()?i.trim():e}),"utf-8")}(i.headers&&i.headers["content-type"]);try{s=new TextDecoder(o).decode(a)}catch(e){}}else s=String.fromCharCode.apply(null,new Uint8Array(a));e({cause:s})}else e(null,a)}}},jBAH:function(e,t){e.exports=function(e,t){var n,r=null;try{n=JSON.parse(e,t)}catch(e){r=e}return[r,n]}},"jfS+":function(e,t,n){"use strict";var r=n("endd");function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},"kVK+":function(e,t){t.read=function(e,t,n,r,i){var a,s,o=8*i-r-1,u=(1<>1,c=-7,d=n?i-1:0,h=n?-1:1,p=e[t+d];for(d+=h,a=p&(1<<-c)-1,p>>=-c,c+=o;c>0;a=256*a+e[t+d],d+=h,c-=8);for(s=a&(1<<-c)-1,a>>=-c,c+=r;c>0;s=256*s+e[t+d],d+=h,c-=8);if(0===a)a=1-l;else{if(a===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),a-=l}return(p?-1:1)*s*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var s,o,u,l=8*a-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:a-1,f=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+d>=1?h/u:h*Math.pow(2,1-d))*u>=2&&(s++,u/=2),s+d>=c?(o=0,s=c):s+d>=1?(o=(t*u-1)*Math.pow(2,i),s+=d):(o=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[n+p]=255&o,p+=f,o/=256,i-=8);for(s=s<0;e[n+p]=255&s,p+=f,s/=256,l-=8);e[n+p-f]|=128*m}},kdvv:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return u}));var r=n("9/Zf"),i=n("+A1k"),a={nowSeconds:function(){return Date.now()/1e3}};var s=Object(i.b)()?function(){try{return Object(i.a)(e,"perf_hooks").performance}catch(e){return}}():function(){var e=Object(r.b)().performance;if(e&&e.now)return{now:function(){return e.now()},timeOrigin:Date.now()-e.now()}}(),o=void 0===s?a:{nowSeconds:function(){return(s.timeOrigin+s.now())/1e3}},u=a.nowSeconds.bind(a);o.nowSeconds.bind(o),function(){var e=Object(r.b)().performance;if(e)e.timeOrigin?e.timeOrigin:e.timing&&e.timing.navigationStart||Date.now()}()}).call(this,n("3UD+")(e))},lLqN:function(e,t,n){"use strict";var r,i={DEBUG:!1,LIB_VERSION:"2.50.0"};if("undefined"==typeof window){var a={hostname:""};r={navigator:{userAgent:""},document:{location:a,referrer:""},screen:{width:0,height:0},location:a}}else r=window;var s,o,u,l,c,d,h,p,f,m,g,y=Array.prototype,v=Function.prototype,_=Object.prototype,b=y.slice,T=_.toString,w=_.hasOwnProperty,S=r.console,E=r.navigator,k=r.document,C=r.opera,x=r.screen,A=E.userAgent,O=v.bind,I=y.forEach,P=y.indexOf,L=y.map,D=Array.isArray,R={},N={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},M={log:function(){if(i.DEBUG&&!N.isUndefined(S)&&S)try{S.log.apply(S,arguments)}catch(e){N.each(arguments,(function(e){S.log(e)}))}},warn:function(){if(i.DEBUG&&!N.isUndefined(S)&&S){var e=["Mixpanel warning:"].concat(N.toArray(arguments));try{S.warn.apply(S,e)}catch(t){N.each(e,(function(e){S.warn(e)}))}}},error:function(){if(i.DEBUG&&!N.isUndefined(S)&&S){var e=["Mixpanel error:"].concat(N.toArray(arguments));try{S.error.apply(S,e)}catch(t){N.each(e,(function(e){S.error(e)}))}}},critical:function(){if(!N.isUndefined(S)&&S){var e=["Mixpanel error:"].concat(N.toArray(arguments));try{S.error.apply(S,e)}catch(t){N.each(e,(function(e){S.error(e)}))}}}},U=function(e,t){return function(){return arguments[0]="["+t+"] "+arguments[0],e.apply(M,arguments)}},j=function(e){return{log:U(M.log,e),error:U(M.error,e),critical:U(M.critical,e)}};N.bind=function(e,t){var n,r;if(O&&e.bind===O)return O.apply(e,b.call(arguments,1));if(!N.isFunction(e))throw new TypeError;return n=b.call(arguments,2),r=function(){if(!(this instanceof r))return e.apply(t,n.concat(b.call(arguments)));var i={};i.prototype=e.prototype;var a=new i;i.prototype=null;var s=e.apply(a,n.concat(b.call(arguments)));return Object(s)===s?s:a}},N.each=function(e,t,n){if(null!=e)if(I&&e.forEach===I)e.forEach(t,n);else if(e.length===+e.length){for(var r=0,i=e.length;r0&&(t[n]=e)})),t},N.truncate=function(e,t){var n;return"string"==typeof e?n=e.slice(0,t):N.isArray(e)?(n=[],N.each(e,(function(e){n.push(N.truncate(e,t))}))):N.isObject(e)?(n={},N.each(e,(function(e,r){n[r]=N.truncate(e,t)}))):n=e,n},N.JSONEncode=function(e){var t=function(e){var t=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(e)?'"'+e.replace(t,(function(e){var t=n[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'},n=function(e,r){var i="",a=0,s="",o="",u=0,l=i,c=[],d=r[e];switch(d&&"object"==typeof d&&"function"==typeof d.toJSON&&(d=d.toJSON(e)),typeof d){case"string":return t(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(i+=" ",c=[],"[object Array]"===T.apply(d)){for(u=d.length,a=0;a="0"&&o<="9";)t+=o,h();if("."===o)for(t+=".";h()&&o>="0"&&o<="9";)t+=o;if("e"===o||"E"===o)for(t+=o,h(),"-"!==o&&"+"!==o||(t+=o,h());o>="0"&&o<="9";)t+=o,h();if(e=+t,isFinite(e))return e;d("Bad number")},f=function(){var e,t,n,r="";if('"'===o)for(;h();){if('"'===o)return h(),r;if("\\"===o)if(h(),"u"===o){for(n=0,t=0;t<4&&(e=parseInt(h(),16),isFinite(e));t+=1)n=16*n+e;r+=String.fromCharCode(n)}else{if("string"!=typeof c[o])break;r+=c[o]}else r+=o}d("Bad string")},m=function(){for(;o&&o<=" ";)h()},l=function(){switch(m(),o){case"{":return function(){var e,t={};if("{"===o){if(h("{"),m(),"}"===o)return h("}"),t;for(;o;){if(e=f(),m(),h(":"),Object.hasOwnProperty.call(t,e)&&d('Duplicate key "'+e+'"'),t[e]=l(),m(),"}"===o)return h("}"),t;h(","),m()}}d("Bad object")}();case"[":return function(){var e=[];if("["===o){if(h("["),m(),"]"===o)return h("]"),e;for(;o;){if(e.push(l()),m(),"]"===o)return h("]"),e;h(","),m()}}d("Bad array")}();case'"':return f();case"-":return p();default:return o>="0"&&o<="9"?p():function(){switch(o){case"t":return h("t"),h("r"),h("u"),h("e"),!0;case"f":return h("f"),h("a"),h("l"),h("s"),h("e"),!1;case"n":return h("n"),h("u"),h("l"),h("l"),null}d('Unexpected "'+o+'"')}()}},function(e){var t;return u=e,s=0,o=" ",t=l(),m(),o&&d("Syntax error"),t}),N.base64Encode=function(e){var t,n,r,i,a,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=0,u=0,l="",c=[];if(!e)return e;e=N.utf8Encode(e);do{t=(a=e.charCodeAt(o++)<<16|e.charCodeAt(o++)<<8|e.charCodeAt(o++))>>18&63,n=a>>12&63,r=a>>6&63,i=63&a,c[u++]=s.charAt(t)+s.charAt(n)+s.charAt(r)+s.charAt(i)}while(o127&&s<2048?String.fromCharCode(s>>6|192,63&s|128):String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128),null!==o&&(n>t&&(a+=e.substring(t,n)),a+=o,t=n=i+1)}return n>t&&(a+=e.substring(t,e.length)),a},N.UUID=(g=function(){var e,t=1*new Date;if(r.performance&&r.performance.now)e=r.performance.now();else for(e=0;t==1*new Date;)e++;return t.toString(16)+Math.floor(e).toString(16)},function(){var e=(x.height*x.width).toString(16);return g()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var e,t,n=A,r=[],i=0;function a(e,t){var n,i=0;for(n=0;n=4&&(i=a(i,r),r=[]);return r.length>0&&(i=a(i,r)),i.toString(16)}()+"-"+e+"-"+g()});var B=["ahrefsbot","ahrefssiteaudit","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];N.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t=0}function r(t){if(!k.getElementsByTagName)return[];var r,i,a,s,o,u,l,c,d,h,p=t.split(" "),f=[k];for(u=0;u-1){a=(i=r.split("#"))[0];var m=i[1],g=k.getElementById(m);if(!g||a&&g.nodeName.toLowerCase()!=a)return[];f=[g]}else if(r.indexOf(".")>-1){a=(i=r.split("."))[0];var y=i[1];for(a||(a="*"),s=[],o=0,l=0;l-1};break;default:_=function(e){return e.getAttribute(b)}}for(f=[],h=0,l=0;l=3?t[2]:""},currentUrl:function(){return r.location.href},properties:function(e){return"object"!=typeof e&&(e={}),N.extend(N.strip_empty_properties({$os:N.info.os(),$browser:N.info.browser(A,E.vendor,C),$referrer:k.referrer,$referring_domain:N.info.referringDomain(k.referrer),$device:N.info.device(A)}),{$current_url:N.info.currentUrl(),$browser_version:N.info.browserVersion(A,E.vendor,C),$screen_height:x.height,$screen_width:x.width,mp_lib:"web",$lib_version:i.LIB_VERSION,$insert_id:z(),time:N.timestamp()/1e3},N.strip_empty_properties(e))},people_properties:function(){return N.extend(N.strip_empty_properties({$os:N.info.os(),$browser:N.info.browser(A,E.vendor,C)}),{$browser_version:N.info.browserVersion(A,E.vendor,C)})},mpPageViewProperties:function(){return N.strip_empty_properties({current_page_title:k.title,current_domain:r.location.hostname,current_url_path:r.location.pathname,current_url_protocol:r.location.protocol,current_url_search:r.location.search})}};var z=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},G=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,X=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,Y=function(e){var t=X,n=e.split("."),r=n[n.length-1];(r.length>4||"com"===r||"org"===r)&&(t=G);var i=e.match(t);return i?i[0]:""},K=null,$=null;"undefined"!=typeof JSON&&(K=JSON.stringify,$=JSON.parse),K=K||N.JSONEncode,$=$||N.JSONDecode,N.toArray=N.toArray,N.isObject=N.isObject,N.JSONEncode=N.JSONEncode,N.JSONDecode=N.JSONDecode,N.isBlockedUA=N.isBlockedUA,N.isEmptyObject=N.isEmptyObject,N.info=N.info,N.info.device=N.info.device,N.info.browser=N.info.browser,N.info.browserVersion=N.info.browserVersion,N.info.properties=N.info.properties;var Q=function(){};Q.prototype.create_properties=function(){},Q.prototype.event_handler=function(){},Q.prototype.after_track_handler=function(){},Q.prototype.init=function(e){return this.mp=e,this},Q.prototype.track=function(e,t,n,r){var i=this,a=N.dom_query(e);if(0!==a.length)return N.each(a,(function(e){N.register_event(e,this.override_event,(function(e){var a={},s=i.create_properties(n,this),o=i.mp.get_config("track_links_timeout");i.event_handler(e,this,a),window.setTimeout(i.track_callback(r,s,a,!0),o),i.mp.track(t,s,i.track_callback(r,s,a))}))}),this),!0;M.error("The DOM query ("+e+") returned 0 elements")},Q.prototype.track_callback=function(e,t,n,r){r=r||!1;var i=this;return function(){n.callback_fired||(n.callback_fired=!0,e&&!1===e(r,t)||i.after_track_handler(t,n,r))}},Q.prototype.create_properties=function(e,t){return"function"==typeof e?e(t):N.extend({},e)};var J=function(){this.override_event="click"};N.inherit(J,Q),J.prototype.create_properties=function(e,t){var n=J.superclass.create_properties.apply(this,arguments);return t.href&&(n.url=t.href),n},J.prototype.event_handler=function(e,t,n){n.new_tab=2===e.which||e.metaKey||e.ctrlKey||"_blank"===t.target,n.href=t.href,n.new_tab||e.preventDefault()},J.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout((function(){window.location=t.href}),0)};var Z=function(){this.override_event="submit"};N.inherit(Z,Q),Z.prototype.event_handler=function(e,t,n){n.element=t,e.preventDefault()},Z.prototype.after_track_handler=function(e,t){setTimeout((function(){t.element.submit()}),0)};var ee=j("lock"),te=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3};te.prototype.withLock=function(e,t,n){n||"function"==typeof t||(n=t,t=null);var r=n||(new Date).getTime()+"|"+Math.random(),i=(new Date).getTime(),a=this.storageKey,s=this.pollIntervalMS,o=this.timeoutMS,u=this.storage,l=a+":X",c=a+":Y",d=a+":Z",h=function(e){t&&t(e)},p=function(e){if((new Date).getTime()-i>o)return ee.error("Timeout waiting for mutex on "+a+"; clearing lock. ["+r+"]"),u.removeItem(d),u.removeItem(c),void g();setTimeout((function(){try{e()}catch(e){h(e)}}),s*(Math.random()+.1))},f=function(e,t){e()?t():p((function(){f(e,t)}))},m=function(){var e=u.getItem(c);if(e&&e!==r)return!1;if(u.setItem(c,r),u.getItem(c)===r)return!0;if(!F(u,!0))throw new Error("localStorage support dropped while acquiring lock");return!1},g=function(){u.setItem(l,r),f(m,(function(){u.getItem(l)!==r?p((function(){u.getItem(c)===r?f((function(){return!u.getItem(d)}),y):g()})):y()}))},y=function(){u.setItem(d,"1");try{e()}finally{u.removeItem(d),u.getItem(c)===r&&u.removeItem(c),u.getItem(l)===r&&u.removeItem(l)}};try{if(!F(u,!0))throw new Error("localStorage support check failed");g()}catch(e){h(e)}};var ne=j("batch"),re=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.reportError=t.errorReporter||N.bind(ne.error,ne),this.lock=new te(e,{storage:this.storage}),this.pid=t.pid||null,this.memQueue=[]};re.prototype.enqueue=function(e,t,n){var r={id:z(),flushAfter:(new Date).getTime()+2*t,payload:e};this.lock.withLock(N.bind((function(){var t;try{var i=this.readFromStorage();i.push(r),(t=this.saveToStorage(i))&&this.memQueue.push(r)}catch(n){this.reportError("Error enqueueing item",e),t=!1}n&&n(t)}),this),N.bind((function(e){this.reportError("Error acquiring storage lock",e),n&&n(!1)}),this),this.pid)},re.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);if(t.lengtha.flushAfter&&!r[a.id]&&(a.orphaned=!0,t.push(a),t.length>=e))break}}}return t};var ie=function(e,t){var n=[];return N.each(e,(function(e){e.id&&!t[e.id]&&n.push(e)})),n};re.prototype.removeItemsByID=function(e,t){var n={};N.each(e,(function(e){n[e]=!0})),this.memQueue=ie(this.memQueue,n);var r=N.bind((function(){var t;try{var r=this.readFromStorage();if(r=ie(r,n),t=this.saveToStorage(r)){r=this.readFromStorage();for(var i=0;i5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:e,batchSize:a.length,timesSent:this.itemIdsSentSuccessfully[r]}),n=!1):this.reportError("[dupe] found item with no ID",{item:e}),n&&s.push(t)}o[e.id]=t}),this),s.length<1)return void this.resetFlush();this.requestInProgress=!0;var u=N.bind((function(i){this.requestInProgress=!1;try{var s=!1;if(e.unloading)this.queue.updatePayloads(o);else if(N.isObject(i)&&"timeout"===i.error&&(new Date).getTime()-n>=t)this.reportError("Network timeout; retrying"),this.flush();else if(N.isObject(i)&&i.xhr_req&&(i.xhr_req.status>=500||429===i.xhr_req.status||"timeout"===i.error)){var u=2*this.flushInterval,l=i.xhr_req.responseHeaders;if(l){var c=l["Retry-After"];c&&(u=1e3*parseInt(c,10)||u)}u=Math.min(6e5,u),this.reportError("Error; retry in "+u+" ms"),this.scheduleFlush(u)}else if(N.isObject(i)&&i.xhr_req&&413===i.xhr_req.status)if(a.length>1){var d=Math.max(1,Math.floor(r/2));this.batchSize=Math.min(this.batchSize,d,a.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush()}else this.reportError("Single-event request too large; dropping",a),this.resetBatchSize(),s=!0;else s=!0;s&&(this.queue.removeItemsByID(N.map(a,(function(e){return e.id})),N.bind((function(e){e?(this.consecutiveRemovalFailures=0,this.flush()):(this.reportError("Failed to remove items from queue"),++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush())}),this)),N.each(a,N.bind((function(e){var t=e.id;t?(this.itemIdsSentSuccessfully[t]=this.itemIdsSentSuccessfully[t]||0,this.itemIdsSentSuccessfully[t]++,this.itemIdsSentSuccessfully[t]>5&&this.reportError("[dupe] item ID sent too many times",{item:e,batchSize:a.length,timesSent:this.itemIdsSentSuccessfully[t]})):this.reportError("[dupe] found item with no ID while removing",{item:e})}),this)))}catch(e){this.reportError("Error handling API response",e),this.resetFlush()}}),this),l={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};e.unloading&&(l.transport="sendBeacon"),se.log("MIXPANEL REQUEST:",s),this.sendRequest(s,l,u)}catch(e){this.reportError("Error flushing request queue",e),this.resetFlush()}},oe.prototype.reportError=function(e,t){if(se.error.apply(se.error,arguments),this.errorReporter)try{t instanceof Error||(t=new Error(e)),this.errorReporter(e,t)}catch(t){se.error(t)}};function ue(e,t){_e(!0,e,t)}function le(e,t){_e(!1,e,t)}function ce(e,t){return"1"===ve(e,t)}function de(e,t){if(function(e){if(e&&e.ignoreDnt)return!1;var t=e&&e.window||r,n=t.navigator||{},i=!1;return N.each([n.doNotTrack,n.msDoNotTrack,t.doNotTrack],(function(e){N.includes([!0,1,"1","yes"],e)&&(i=!0)})),i}(t))return M.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var n="0"===ve(e,t);return n&&M.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),n}function he(e){return be(e,(function(e){return this.get_config(e)}))}function pe(e){return be(e,(function(e){return this._get_config(e)}))}function fe(e){return be(e,(function(e){return this._get_config(e)}))}function me(e,t){ge(t=t||{}).remove(ye(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function ge(e){return"localStorage"===(e=e||{}).persistenceType?N.localStorage:N.cookie}function ye(e,t){return((t=t||{}).persistencePrefix||"__mp_opt_in_out_")+e}function ve(e,t){return ge(t).get(ye(e,t))}function _e(e,t,n){N.isString(t)&&t.length?(ge(n=n||{}).set(ye(t,n),e?1:0,N.isNumber(n.cookieExpiration)?n.cookieExpiration:null,!!n.crossSubdomainCookie,!!n.secureCookie,!!n.crossSiteCookie,n.cookieDomain),n.track&&e&&n.track(n.trackEventName||"$opt_in",n.trackProperties,{send_immediately:!0})):M.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token")}function be(e,t){return function(){var n=!1;try{var r=t.call(this,"token"),i=t.call(this,"ignore_dnt"),a=t.call(this,"opt_out_tracking_persistence_type"),s=t.call(this,"opt_out_tracking_cookie_prefix"),o=t.call(this,"window");r&&(n=de(r,{ignoreDnt:i,persistenceType:a,persistencePrefix:s,window:o}))}catch(e){M.error("Unexpected error when checking tracking opt-out status: "+e)}if(!n)return e.apply(this,arguments);var u=arguments[arguments.length-1];"function"==typeof u&&u(0)}}var Te={set_action:function(e,t){var n={},r={};return N.isObject(e)?N.each(e,(function(e,t){this._is_reserved_property(t)||(r[t]=e)}),this):r[e]=t,n.$set=r,n},unset_action:function(e){var t={},n=[];return N.isArray(e)||(e=[e]),N.each(e,(function(e){this._is_reserved_property(e)||n.push(e)}),this),t.$unset=n,t},set_once_action:function(e,t){var n={},r={};return N.isObject(e)?N.each(e,(function(e,t){this._is_reserved_property(t)||(r[t]=e)}),this):r[e]=t,n.$set_once=r,n},union_action:function(e,t){var n={},r={};return N.isObject(e)?N.each(e,(function(e,t){this._is_reserved_property(t)||(r[t]=N.isArray(e)?e:[e])}),this):r[e]=N.isArray(t)?t:[t],n.$union=r,n},append_action:function(e,t){var n={},r={};return N.isObject(e)?N.each(e,(function(e,t){this._is_reserved_property(t)||(r[t]=e)}),this):r[e]=t,n.$append=r,n},remove_action:function(e,t){var n={},r={};return N.isObject(e)?N.each(e,(function(e,t){this._is_reserved_property(t)||(r[t]=e)}),this):r[e]=t,n.$remove=r,n},delete_action:function(){var e={$delete:""};return e}},we=function(){};N.extend(we.prototype,Te),we.prototype._init=function(e,t,n){this._mixpanel=e,this._group_key=t,this._group_id=n},we.prototype.set=fe((function(e,t,n){var r=this.set_action(e,t);return N.isObject(e)&&(n=t),this._send_request(r,n)})),we.prototype.set_once=fe((function(e,t,n){var r=this.set_once_action(e,t);return N.isObject(e)&&(n=t),this._send_request(r,n)})),we.prototype.unset=fe((function(e,t){var n=this.unset_action(e);return this._send_request(n,t)})),we.prototype.union=fe((function(e,t,n){N.isObject(e)&&(n=t);var r=this.union_action(e,t);return this._send_request(r,n)})),we.prototype.delete=fe((function(e){var t=this.delete_action();return this._send_request(t,e)})),we.prototype.remove=fe((function(e,t,n){var r=this.remove_action(e,t);return this._send_request(r,n)})),we.prototype._send_request=function(e,t){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config("token");var n=N.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:n,endpoint:this._get_config("api_host")+"/"+this._get_config("api_routes").groups,batcher:this._mixpanel.request_batchers.groups},t)},we.prototype._is_reserved_property=function(e){return"$group_key"===e||"$group_id"===e},we.prototype._get_config=function(e){return this._mixpanel.get_config(e)},we.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id},we.prototype.remove=we.prototype.remove,we.prototype.set=we.prototype.set,we.prototype.set_once=we.prototype.set_once,we.prototype.union=we.prototype.union,we.prototype.unset=we.prototype.unset,we.prototype.toString=we.prototype.toString;var Se=function(){};N.extend(Se.prototype,Te),Se.prototype._init=function(e){this._mixpanel=e},Se.prototype.set=pe((function(e,t,n){var r=this.set_action(e,t);return N.isObject(e)&&(n=t),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),r.$set=N.extend({},N.info.people_properties(),r.$set),this._send_request(r,n)})),Se.prototype.set_once=pe((function(e,t,n){var r=this.set_once_action(e,t);return N.isObject(e)&&(n=t),this._send_request(r,n)})),Se.prototype.unset=pe((function(e,t){var n=this.unset_action(e);return this._send_request(n,t)})),Se.prototype.increment=pe((function(e,t,n){var r={},i={};return N.isObject(e)?(N.each(e,(function(e,t){if(!this._is_reserved_property(t)){if(isNaN(parseFloat(e)))return void M.error("Invalid increment value passed to mixpanel.people.increment - must be a number");i[t]=e}}),this),n=t):(N.isUndefined(t)&&(t=1),i[e]=t),r.$add=i,this._send_request(r,n)})),Se.prototype.append=pe((function(e,t,n){N.isObject(e)&&(n=t);var r=this.append_action(e,t);return this._send_request(r,n)})),Se.prototype.remove=pe((function(e,t,n){N.isObject(e)&&(n=t);var r=this.remove_action(e,t);return this._send_request(r,n)})),Se.prototype.union=pe((function(e,t,n){N.isObject(e)&&(n=t);var r=this.union_action(e,t);return this._send_request(r,n)})),Se.prototype.track_charge=pe((function(e,t,n){if(N.isNumber(e)||(e=parseFloat(e),!isNaN(e)))return this.append("$transactions",N.extend({$amount:e},t),n);M.error("Invalid value passed to mixpanel.people.track_charge - must be a number")})),Se.prototype.clear_charges=function(e){return this.set("$transactions",[],e)},Se.prototype.delete_user=function(){if(this._identify_called()){var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)}M.error("mixpanel.people.delete_user() requires you to call identify() first")},Se.prototype.toString=function(){return this._mixpanel.toString()+".people"},Se.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var n=this._mixpanel.get_property("$device_id"),r=this._mixpanel.get_property("$user_id"),i=this._mixpanel.get_property("$had_persisted_distinct_id");n&&(e.$device_id=n),r&&(e.$user_id=r),i&&(e.$had_persisted_distinct_id=i);var a=N.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:a,endpoint:this._get_config("api_host")+"/"+this._get_config("api_routes").engage,batcher:this._mixpanel.request_batchers.people},t):(this._enqueue(e),N.isUndefined(t)||(this._get_config("verbose")?t({status:-1,error:null}):t(-1)),N.truncate(a,255))},Se.prototype._get_config=function(e){return this._mixpanel.get_config(e)},Se.prototype._identify_called=function(){return!0===this._mixpanel._flags.identify_called},Se.prototype._enqueue=function(e){"$set"in e?this._mixpanel.persistence._add_to_people_queue("$set",e):"$set_once"in e?this._mixpanel.persistence._add_to_people_queue("$set_once",e):"$unset"in e?this._mixpanel.persistence._add_to_people_queue("$unset",e):"$add"in e?this._mixpanel.persistence._add_to_people_queue("$add",e):"$append"in e?this._mixpanel.persistence._add_to_people_queue("$append",e):"$remove"in e?this._mixpanel.persistence._add_to_people_queue("$remove",e):"$union"in e?this._mixpanel.persistence._add_to_people_queue("$union",e):M.error("Invalid call to _enqueue():",e)},Se.prototype._flush_one_queue=function(e,t,n,r){var i=this,a=N.extend({},this._mixpanel.persistence.load_queue(e)),s=a;N.isUndefined(a)||!N.isObject(a)||N.isEmptyObject(a)||(i._mixpanel.persistence._pop_from_people_queue(e,a),i._mixpanel.persistence.save(),r&&(s=r(a)),t.call(i,s,(function(t,r){0===t&&i._mixpanel.persistence._add_to_people_queue(e,a),N.isUndefined(n)||n(t,r)})))},Se.prototype._flush=function(e,t,n,r,i,a,s){var o=this;this._flush_one_queue("$set",this.set,e),this._flush_one_queue("$set_once",this.set_once,r),this._flush_one_queue("$unset",this.unset,a,(function(e){return N.keys(e)})),this._flush_one_queue("$add",this.increment,t),this._flush_one_queue("$union",this.union,i);var u=this._mixpanel.persistence.load_queue("$append");if(!N.isUndefined(u)&&N.isArray(u)&&u.length)for(var l,c=function(e,t){0===e&&o._mixpanel.persistence._add_to_people_queue("$append",l),N.isUndefined(n)||n(e,t)},d=u.length-1;d>=0;d--)u=this._mixpanel.persistence.load_queue("$append"),l=u.pop(),o._mixpanel.persistence.save(),N.isEmptyObject(l)||o.append(l,c);var h=this._mixpanel.persistence.load_queue("$remove");if(!N.isUndefined(h)&&N.isArray(h)&&h.length)for(var p,f=function(e,t){0===e&&o._mixpanel.persistence._add_to_people_queue("$remove",p),N.isUndefined(s)||s(e,t)},m=h.length-1;m>=0;m--)h=this._mixpanel.persistence.load_queue("$remove"),p=h.pop(),o._mixpanel.persistence.save(),N.isEmptyObject(p)||o.remove(p,f)},Se.prototype._is_reserved_property=function(e){return"$distinct_id"===e||"$token"===e||"$device_id"===e||"$user_id"===e||"$had_persisted_distinct_id"===e},Se.prototype.set=Se.prototype.set,Se.prototype.set_once=Se.prototype.set_once,Se.prototype.unset=Se.prototype.unset,Se.prototype.increment=Se.prototype.increment,Se.prototype.append=Se.prototype.append,Se.prototype.remove=Se.prototype.remove,Se.prototype.union=Se.prototype.union,Se.prototype.track_charge=Se.prototype.track_charge,Se.prototype.clear_charges=Se.prototype.clear_charges,Se.prototype.delete_user=Se.prototype.delete_user,Se.prototype.toString=Se.prototype.toString;var Ee,ke,Ce=["__mps","__mpso","__mpus","__mpa","__mpap","__mpr","__mpu","$people_distinct_id","__alias","__timers"],xe=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;"cookie"!==t&&"localStorage"!==t&&(M.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),"localStorage"===t&&N.localStorage.is_supported()?this.storage=N.localStorage:this.storage=N.cookie,this.load(),this.update_config(e),this.upgrade(e),this.save()};xe.prototype.properties=function(){var e={};return this.load(),N.each(this.props,(function(t,n){N.include(Ce,n)||(e[n]=t)})),e},xe.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=N.extend({},e))}},xe.prototype.upgrade=function(e){var t,n,r=e.upgrade;r&&(t="mp_super_properties","string"==typeof r&&(t=r),n=this.storage.parse(t),this.storage.remove(t),this.storage.remove(t,!0),n&&(this.props=N.extend(this.props,n.all,n.events))),e.cookie_name||"mixpanel"===e.name||(t="mp_"+e.token+"_"+e.name,(n=this.storage.parse(t))&&(this.storage.remove(t),this.storage.remove(t,!0),this.register_once(n))),this.storage===N.localStorage&&(n=N.cookie.parse(this.name),N.cookie.remove(this.name),N.cookie.remove(this.name,!0),n&&this.register_once(n))},xe.prototype.save=function(){this.disabled||this.storage.set(this.name,N.JSONEncode(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)},xe.prototype.load_prop=function(e){return this.load(),this.props[e]},xe.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)},xe.prototype.clear=function(){this.remove(),this.props={}},xe.prototype.register_once=function(e,t,n){return!!N.isObject(e)&&(void 0===t&&(t="None"),this.expire_days=void 0===n?this.default_expiry:n,this.load(),N.each(e,(function(e,n){this.props.hasOwnProperty(n)&&this.props[n]!==t||(this.props[n]=e)}),this),this.save(),!0)},xe.prototype.register=function(e,t){return!!N.isObject(e)&&(this.expire_days=void 0===t?this.default_expiry:t,this.load(),N.extend(this.props,e),this.save(),!0)},xe.prototype.unregister=function(e){this.load(),e in this.props&&(delete this.props[e],this.save())},xe.prototype.update_search_keyword=function(e){this.register(N.info.searchInfo(e))},xe.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:N.info.referringDomain(e)||"$direct"},"")},xe.prototype.get_referrer_info=function(){return N.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},xe.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)},xe.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},xe.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())},xe.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())},xe.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},xe.prototype.get_cross_subdomain=function(){return this.cross_subdomain},xe.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},xe.prototype._add_to_people_queue=function(e,t){var n=this._get_queue_key(e),r=t[e],i=this._get_or_create_queue("$set"),a=this._get_or_create_queue("$set_once"),s=this._get_or_create_queue("$unset"),o=this._get_or_create_queue("$add"),u=this._get_or_create_queue("$union"),l=this._get_or_create_queue("$remove",[]),c=this._get_or_create_queue("$append",[]);"__mps"===n?(N.extend(i,r),this._pop_from_people_queue("$add",r),this._pop_from_people_queue("$union",r),this._pop_from_people_queue("$unset",r)):"__mpso"===n?(N.each(r,(function(e,t){t in a||(a[t]=e)})),this._pop_from_people_queue("$unset",r)):"__mpus"===n?N.each(r,(function(e){N.each([i,a,o,u],(function(t){e in t&&delete t[e]})),N.each(c,(function(t){e in t&&delete t[e]})),s[e]=!0})):"__mpa"===n?(N.each(r,(function(e,t){t in i?i[t]+=e:(t in o||(o[t]=0),o[t]+=e)}),this),this._pop_from_people_queue("$unset",r)):"__mpu"===n?(N.each(r,(function(e,t){N.isArray(e)&&(t in u||(u[t]=[]),u[t]=u[t].concat(e))})),this._pop_from_people_queue("$unset",r)):"__mpr"===n?(l.push(r),this._pop_from_people_queue("$append",r)):"__mpap"===n&&(c.push(r),this._pop_from_people_queue("$unset",r)),M.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),M.log(t),this.save()},xe.prototype._pop_from_people_queue=function(e,t){var n=this.props[this._get_queue_key(e)];N.isUndefined(n)||N.each(t,(function(t,r){"$append"===e||"$remove"===e?N.each(n,(function(e){e[r]===t&&delete e[r]})):delete n[r]}),this)},xe.prototype.load_queue=function(e){return this.load_prop(this._get_queue_key(e))},xe.prototype._get_queue_key=function(e){return"$set"===e?"__mps":"$set_once"===e?"__mpso":"$unset"===e?"__mpus":"$add"===e?"__mpa":"$append"===e?"__mpap":"$remove"===e?"__mpr":"$union"===e?"__mpu":void M.error("Invalid queue:",e)},xe.prototype._get_or_create_queue=function(e,t){var n=this._get_queue_key(e);return t=N.isUndefined(t)?{}:t,this.props[n]||(this.props[n]=t)},xe.prototype.set_event_timer=function(e,t){var n=this.load_prop("__timers")||{};n[e]=t,this.props.__timers=n,this.save()},xe.prototype.remove_event_timer=function(e){var t=(this.load_prop("__timers")||{})[e];return N.isUndefined(t)||(delete this.props.__timers[e],this.save()),t};var Ae=function(e){return e},Oe=function(){},Ie=r.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Pe=!Ie&&-1===A.indexOf("MSIE")&&-1===A.indexOf("Mozilla"),Le=null;E.sendBeacon&&(Le=function(){return E.sendBeacon.apply(E,arguments)});var De={track:"track/",engage:"engage/",groups:"groups/",record:"record/"},Re={api_host:"https://api-js.mixpanel.com",api_routes:De,api_method:"POST",api_transport:"XHR",api_payload_format:"base64",app_host:"https://mixpanel.com",cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:Oe,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:Oe,mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!1,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{},record_sessions_percent:0,record_idle_timeout_ms:18e5,record_max_ms:864e5,record_mask_text_selector:"*",recorder_src:"https://cdn.mxpnl.com/libs/mixpanel-recorder.min.js"},Ne=!1,Me=function(){},Ue=function(e,t,n){var r,a="mixpanel"===n?ke:ke[n];if(a&&0===Ee)r=a;else{if(a&&!N.isArray(a))return void M.error("You have already initialized "+n);r=new Me}if(r._cached_groups={},r._init(e,t,n),r.people=new Se,r.people._init(r),!r.get_config("skip_first_touch_marketing")){var s=N.info.campaignParams(null),o={},u=!1;N.each(s,(function(e,t){o["initial_"+t]=e,e&&(u=!0)})),u&&r.people.set_once(o)}return i.DEBUG=i.DEBUG||r.get_config("debug"),!N.isUndefined(a)&&N.isArray(a)&&(r._execute_array.call(r.people,a.people),r._execute_array(a)),r};Me.prototype.init=function(e,t,n){if(N.isUndefined(n))this.report_error("You must name your new library: init(token, config, name)");else{if("mixpanel"!==n){var r=Ue(e,t,n);return ke[n]=r,r._loaded(),r}this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet")}},Me.prototype._init=function(e,t,n){t=t||{},this.__loaded=!0,this.config={};var i={};"api_payload_format"in t||(t.api_host||Re.api_host).match(/\.mixpanel\.com/)&&(i.api_payload_format="json");if(this.set_config(N.extend({},Re,i,t,{name:n,token:e,callback_fn:("mixpanel"===n?n:"mixpanel."+n)+"._jsc"})),this._jsc=Oe,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests)if(N.localStorage.is_supported(!0)&&Ie){if(this.init_batchers(),Le&&r.addEventListener){var a=N.bind((function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})}),this);r.addEventListener("pagehide",(function(e){e.persisted&&a()})),r.addEventListener("visibilitychange",(function(){"hidden"===k.visibilityState&&a()}))}}else this._batch_requests=!1,M.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),N.each(this.get_batcher_configs(),(function(e){M.log("Clearing batch queue "+e.queue_key),N.localStorage.remove(e.queue_key)}));this.persistence=this.cookie=new xe(this.config),this.unpersisted_superprops={},this._gdpr_init();var s=N.UUID();this.get_distinct_id()||this.register_once({distinct_id:"$device:"+s,$device_id:s},"");var o=this.get_config("track_pageview");o&&this._init_url_change_tracking(o),this.get_config("record_sessions_percent")>0&&100*Math.random()<=this.get_config("record_sessions_percent")&&this.start_session_recording()},Me.prototype.start_session_recording=he((function(){if(r.MutationObserver){var e=N.bind((function(){this._recorder=this._recorder||new r.__mp_recorder(this),this._recorder.startRecording()}),this);if(N.isUndefined(r.__mp_recorder)){var t=k.createElement("script");t.type="text/javascript",t.async=!0,t.onload=e,t.src=this.get_config("recorder_src"),k.head.appendChild(t)}else e()}else M.critical("Browser does not support MutationObserver; skipping session recording")})),Me.prototype.stop_session_recording=function(){this._recorder?this._recorder.stopRecording():M.critical("Session recorder module not loaded")},Me.prototype._loaded=function(){if(this.get_config("loaded")(this),this._set_default_superprops(),this.people.set_once(this.persistence.get_referrer_info()),this.get_config("store_google")&&this.get_config("stop_utm_persistence")){var e=N.info.campaignParams(null);N.each(e,function(e,t){this.unregister(t)}.bind(this))}},Me.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(k.referrer),this.get_config("store_google")&&!this.get_config("stop_utm_persistence")&&this.register(N.info.campaignParams()),this.get_config("save_referrer")&&this.persistence.update_referrer_info(k.referrer)},Me.prototype._dom_loaded=function(){N.each(this.__dom_loaded_queue,(function(e){this._track_dom.apply(this,e)}),this),this.has_opted_out_tracking()||N.each(this.__request_queue,(function(e){this._send_request.apply(this,e)}),this),delete this.__dom_loaded_queue,delete this.__request_queue},Me.prototype._track_dom=function(e,t){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!Ne)return this.__dom_loaded_queue.push([e,t]),!1;var n=(new e).init(this);return n.track.apply(n,t)},Me.prototype._init_url_change_tracking=function(e){var t="";if(this.track_pageview()&&(t=N.info.currentUrl()),N.include(["full-url","url-with-path-and-query-string","url-with-path"],e)){r.addEventListener("popstate",(function(){r.dispatchEvent(new Event("mp_locationchange"))})),r.addEventListener("hashchange",(function(){r.dispatchEvent(new Event("mp_locationchange"))}));var n=r.history.pushState;"function"==typeof n&&(r.history.pushState=function(e,t,i){n.call(r.history,e,t,i),r.dispatchEvent(new Event("mp_locationchange"))});var i=r.history.replaceState;"function"==typeof i&&(r.history.replaceState=function(e,t,n){i.call(r.history,e,t,n),r.dispatchEvent(new Event("mp_locationchange"))}),r.addEventListener("mp_locationchange",function(){var n=N.info.currentUrl(),r=!1;("full-url"===e?r=n!==t:"url-with-path-and-query-string"===e?r=n.split("#")[0]!==t.split("#")[0]:"url-with-path"===e&&(r=n.split("#")[0].split("?")[0]!==t.split("#")[0].split("?")[0]),r)&&(this.track_pageview()&&(t=n))}.bind(this))}},Me.prototype._prepare_callback=function(e,t){if(N.isUndefined(e))return null;if(Ie){return function(n){e(n,t)}}var n=this._jsc,r=""+Math.floor(1e8*Math.random()),i=this.get_config("callback_fn")+"["+r+"]";return n[r]=function(i){delete n[r],e(i,t)},i},Me.prototype._send_request=function(e,t,n,r){var i=!0;if(Pe)return this.__request_queue.push(arguments),i;var a={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},s=null;r||!N.isFunction(n)&&"string"!=typeof n||(r=n,n=null),n=N.extend(a,n||{}),Ie||(n.method="GET");var o="POST"===n.method,u=Le&&o&&"sendbeacon"===n.transport.toLowerCase(),l=n.verbose;t.verbose&&(l=!0),this.get_config("test")&&(t.test=1),l&&(t.verbose=1),this.get_config("img")&&(t.img=1),Ie||(r?t.callback=r:(l||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=(new Date).getTime().toString(),o&&(s="data="+encodeURIComponent(t.data),delete t.data),e+="?"+N.HTTPBuildQuery(t);var c=this;if("img"in t){var d=k.createElement("img");d.src=e,k.body.appendChild(d)}else if(u){try{i=Le(e,s)}catch(e){c.report_error(e),i=!1}try{r&&r(i?1:0)}catch(e){c.report_error(e)}}else if(Ie)try{var h=new XMLHttpRequest;h.open(n.method,e,!0);var p=this.get_config("xhr_headers");if(o&&(p["Content-Type"]="application/x-www-form-urlencoded"),N.each(p,(function(e,t){h.setRequestHeader(t,e)})),n.timeout_ms&&void 0!==h.timeout){h.timeout=n.timeout_ms;var f=(new Date).getTime()}h.withCredentials=!0,h.onreadystatechange=function(){var e;if(4===h.readyState)if(200===h.status){if(r)if(l){var t;try{t=N.JSONDecode(h.responseText)}catch(e){if(c.report_error(e),!n.ignore_json_errors)return;t=h.responseText}r(t)}else r(Number(h.responseText))}else e=h.timeout&&!h.status&&(new Date).getTime()-f>=h.timeout?"timeout":"Bad HTTP status: "+h.status+" "+h.statusText,c.report_error(e),r&&r(l?{status:0,error:e,xhr_req:h}:0)},h.send(s)}catch(e){c.report_error(e),i=!1}else{var m=k.createElement("script");m.type="text/javascript",m.async=!0,m.defer=!0,m.src=e;var g=k.getElementsByTagName("script")[0];g.parentNode.insertBefore(m,g)}return i},Me.prototype._execute_array=function(e){var t,n=[],r=[],i=[];N.each(e,(function(e){e&&(t=e[0],N.isArray(t)?i.push(e):"function"==typeof e?e.call(this):N.isArray(e)&&"alias"===t?n.push(e):N.isArray(e)&&-1!==t.indexOf("track")&&"function"==typeof this[t]?i.push(e):r.push(e))}),this);var a=function(e,t){N.each(e,(function(e){if(N.isArray(e[0])){var n=t;N.each(e,(function(e){n=n[e[0]].apply(n,e.slice(1))}))}else this[e[0]].apply(this,e.slice(1))}),t)};a(n,this),a(r,this),a(i,this)},Me.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events},Me.prototype.get_batcher_configs=function(){var e="__mpq_"+this.get_config("token"),t=this.get_config("api_routes");return this._batcher_configs=this._batcher_configs||{events:{type:"events",endpoint:"/"+t.track,queue_key:e+"_ev"},people:{type:"people",endpoint:"/"+t.engage,queue_key:e+"_pp"},groups:{type:"groups",endpoint:"/"+t.groups,queue_key:e+"_gr"}},this._batcher_configs},Me.prototype.init_batchers=function(){if(!this.are_batchers_initialized()){var e=N.bind((function(e){return new oe(e.queue_key,{libConfig:this.config,sendRequestFunc:N.bind((function(t,n,r){this._send_request(this.get_config("api_host")+e.endpoint,this._encode_data_for_request(t),n,this._prepare_callback(r,t))}),this),beforeSendHook:N.bind((function(t){return this._run_hook("before_send_"+e.type,t)}),this),errorReporter:this.get_config("error_reporter"),stopAllBatchingFunc:N.bind(this.stop_batch_senders,this)})}),this),t=this.get_batcher_configs();this.request_batchers={events:e(t.events),people:e(t.people),groups:e(t.groups)}}this.get_config("batch_autostart")&&this.start_batch_senders()},Me.prototype.start_batch_senders=function(){this._batchers_were_started=!0,this.are_batchers_initialized()&&(this._batch_requests=!0,N.each(this.request_batchers,(function(e){e.start()})))},Me.prototype.stop_batch_senders=function(){this._batch_requests=!1,N.each(this.request_batchers,(function(e){e.stop(),e.clear()}))},Me.prototype.push=function(e){this._execute_array([e])},Me.prototype.disable=function(e){void 0===e?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)},Me.prototype._encode_data_for_request=function(e){var t=N.JSONEncode(e);return"base64"===this.get_config("api_payload_format")&&(t=N.base64Encode(t)),{data:t}},Me.prototype._track_or_batch=function(e,t){var n=N.truncate(e.data,255),r=e.endpoint,i=e.batcher,a=e.should_send_immediately,s=e.send_request_options||{};t=t||Oe;var o=!0,u=N.bind((function(){return s.skip_hooks||(n=this._run_hook("before_send_"+e.type,n)),n?(M.log("MIXPANEL REQUEST:"),M.log(n),this._send_request(r,this._encode_data_for_request(n),s,this._prepare_callback(t,n))):null}),this);return this._batch_requests&&!a?i.enqueue(n,(function(e){e?t(1,n):u()})):o=u(),o&&n},Me.prototype.track=he((function(e,t,n,r){r||"function"!=typeof n||(r=n,n=null);var i=(n=n||{}).transport;i&&(n.transport=i);var a=n.send_immediately;if("function"!=typeof r&&(r=Oe),N.isUndefined(e))this.report_error("No event name provided to mixpanel.track");else{if(!this._event_is_disabled(e)){(t=N.extend({},t)).token=this.get_config("token");var s=this.persistence.remove_event_timer(e);if(!N.isUndefined(s)){var o=(new Date).getTime()-s;t.$duration=parseFloat((o/1e3).toFixed(3))}this._set_default_superprops();var u=this.get_config("track_marketing")?N.info.marketingParams():{};if(this._recorder){var l=this._recorder.replayId;l&&(t.$mp_replay_id=l)}t=N.extend({},N.info.properties({mp_loader:this.get_config("mp_loader")}),u,this.persistence.properties(),this.unpersisted_superprops,t);var c=this.get_config("property_blacklist");N.isArray(c)?N.each(c,(function(e){delete t[e]})):this.report_error("Invalid value for property_blacklist config: "+c);var d={event:e,properties:t};return this._track_or_batch({type:"events",data:d,endpoint:this.get_config("api_host")+"/"+this.get_config("api_routes").track,batcher:this.request_batchers.events,should_send_immediately:a,send_request_options:n},r)}r(0)}})),Me.prototype.set_group=he((function(e,t,n){N.isArray(t)||(t=[t]);var r={};return r[e]=t,this.register(r),this.people.set(e,t,n)})),Me.prototype.add_group=he((function(e,t,n){var r=this.get_property(e),i={};return void 0===r?(i[e]=[t],this.register(i)):-1===r.indexOf(t)&&(r.push(t),i[e]=r,this.register(i)),this.people.union(e,t,n)})),Me.prototype.remove_group=he((function(e,t,n){var r=this.get_property(e);if(void 0!==r){var i=r.indexOf(t);i>-1&&(r.splice(i,1),this.register({group_key:r})),0===r.length&&this.unregister(e)}return this.people.remove(e,t,n)})),Me.prototype.track_with_groups=he((function(e,t,n,r){var i=N.extend({},t||{});return N.each(n,(function(e,t){null!=e&&(i[t]=e)})),this.track(e,i,r)})),Me.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)},Me.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]},Me.prototype.get_group=function(e,t){var n=this._create_map_key(e,t),r=this._cached_groups[n];return void 0!==r&&r._group_key===e&&r._group_id===t||((r=new we)._init(this,e,t),this._cached_groups[n]=r),r},Me.prototype.track_pageview=he((function(e,t){"object"!=typeof e&&(e={});var n=(t=t||{}).event_name||"$mp_web_page_view",r=N.extend(N.info.mpPageViewProperties(),N.info.campaignParams(),N.info.clickParams()),i=N.extend({},r,e);return this.track(n,i)})),Me.prototype.track_links=function(){return this._track_dom.call(this,J,arguments)},Me.prototype.track_forms=function(){return this._track_dom.call(this,Z,arguments)},Me.prototype.time_event=function(e){N.isUndefined(e)?this.report_error("No event name provided to mixpanel.time_event"):this._event_is_disabled(e)||this.persistence.set_event_timer(e,(new Date).getTime())};var je={persistent:!0},Be=function(e){var t;return t=N.isObject(e)?e:N.isUndefined(e)?{}:{days:e},N.extend({},je,t)};Me.prototype.register=function(e,t){var n=Be(t);n.persistent?this.persistence.register(e,n.days):N.extend(this.unpersisted_superprops,e)},Me.prototype.register_once=function(e,t,n){var r=Be(n);r.persistent?this.persistence.register_once(e,t,r.days):(void 0===t&&(t="None"),N.each(e,(function(e,n){this.unpersisted_superprops.hasOwnProperty(n)&&this.unpersisted_superprops[n]!==t||(this.unpersisted_superprops[n]=e)}),this))},Me.prototype.unregister=function(e,t){(t=Be(t)).persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]},Me.prototype._register_single=function(e,t){var n={};n[e]=t,this.register(n)},Me.prototype.identify=function(e,t,n,r,i,a,s,o){var u=this.get_distinct_id();if(e&&u!==e){if("string"==typeof e&&0===e.indexOf("$device:"))return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:e})}if(!this.get_property("$device_id")){var l=u;this.register_once({$had_persisted_distinct_id:!0,$device_id:l},"")}e!==u&&e!==this.get_property("__alias")&&(this.unregister("__alias"),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,n,r,i,a,s,o),e!==u&&this.track("$identify",{distinct_id:e,$anon_distinct_id:u},{skip_hooks:!0})},Me.prototype.reset=function(){this.persistence.clear(),this._flags.identify_called=!1;var e=N.UUID();this.register_once({distinct_id:"$device:"+e,$device_id:e},"")},Me.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},Me.prototype.alias=function(e,t){if(e===this.get_property("$people_distinct_id"))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var n=this;return N.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single("__alias",e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},(function(){n.identify(e)}))):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)},Me.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)},Me.prototype.set_config=function(e){N.isObject(e)&&(N.extend(this.config,e),e.batch_size&&N.each(this.request_batchers,(function(e){e.resetBatchSize()})),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),i.DEBUG=i.DEBUG||this.get_config("debug"))},Me.prototype.get_config=function(e){return this.config[e]},Me.prototype._run_hook=function(e){var t=(this.config.hooks[e]||Ae).apply(this,b.call(arguments,1));return void 0===t&&(this.report_error(e+" hook did not return a value"),t=null),t},Me.prototype.get_property=function(e){return this.persistence.load_prop([e])},Me.prototype.toString=function(){var e=this.get_config("name");return"mixpanel"!==e&&(e="mixpanel."+e),e},Me.prototype._event_is_disabled=function(e){return N.isBlockedUA(A)||this._flags.disable_all_events||N.include(this.__disabled_events,e)},Me.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_tracking_persistence_type")&&N.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_tracking()||!this.get_config("opt_out_tracking_by_default")&&!N.cookie.get("mp_optout")||(N.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},Me.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else{if(!e||!e.enable_persistence)return;t=!1}this.get_config("disable_persistence")||this.persistence.disabled===t||this.persistence.set_disabled(t),t?this.stop_batch_senders():this._batchers_were_started&&this.start_batch_senders()},Me.prototype._gdpr_call_func=function(e,t){return t=N.extend({track:N.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),N.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})},Me.prototype.opt_in_tracking=function(e){e=N.extend({enable_persistence:!0},e),this._gdpr_call_func(ue,e),this._gdpr_update_persistence(e)},Me.prototype.opt_out_tracking=function(e){(e=N.extend({clear_persistence:!0,delete_user:!0},e)).delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(le,e),this._gdpr_update_persistence(e)},Me.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(ce,e)},Me.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(de,e)},Me.prototype.clear_opt_in_out_tracking=function(e){e=N.extend({enable_persistence:!0},e),this._gdpr_call_func(me,e),this._gdpr_update_persistence(e)},Me.prototype.report_error=function(e,t){M.error.apply(M.error,arguments);try{t||e instanceof Error||(e=new Error(e)),this.get_config("error_reporter")(e,t)}catch(t){M.error(t)}},Me.prototype.init=Me.prototype.init,Me.prototype.reset=Me.prototype.reset,Me.prototype.disable=Me.prototype.disable,Me.prototype.time_event=Me.prototype.time_event,Me.prototype.track=Me.prototype.track,Me.prototype.track_links=Me.prototype.track_links,Me.prototype.track_forms=Me.prototype.track_forms,Me.prototype.track_pageview=Me.prototype.track_pageview,Me.prototype.register=Me.prototype.register,Me.prototype.register_once=Me.prototype.register_once,Me.prototype.unregister=Me.prototype.unregister,Me.prototype.identify=Me.prototype.identify,Me.prototype.alias=Me.prototype.alias,Me.prototype.name_tag=Me.prototype.name_tag,Me.prototype.set_config=Me.prototype.set_config,Me.prototype.get_config=Me.prototype.get_config,Me.prototype.get_property=Me.prototype.get_property,Me.prototype.get_distinct_id=Me.prototype.get_distinct_id,Me.prototype.toString=Me.prototype.toString,Me.prototype.opt_out_tracking=Me.prototype.opt_out_tracking,Me.prototype.opt_in_tracking=Me.prototype.opt_in_tracking,Me.prototype.has_opted_out_tracking=Me.prototype.has_opted_out_tracking,Me.prototype.has_opted_in_tracking=Me.prototype.has_opted_in_tracking,Me.prototype.clear_opt_in_out_tracking=Me.prototype.clear_opt_in_out_tracking,Me.prototype.get_group=Me.prototype.get_group,Me.prototype.set_group=Me.prototype.set_group,Me.prototype.add_group=Me.prototype.add_group,Me.prototype.remove_group=Me.prototype.remove_group,Me.prototype.track_with_groups=Me.prototype.track_with_groups,Me.prototype.start_batch_senders=Me.prototype.start_batch_senders,Me.prototype.stop_batch_senders=Me.prototype.stop_batch_senders,Me.prototype.start_session_recording=Me.prototype.start_session_recording,Me.prototype.stop_session_recording=Me.prototype.stop_session_recording,Me.prototype.DEFAULT_API_ROUTES=De,xe.prototype.properties=xe.prototype.properties,xe.prototype.update_search_keyword=xe.prototype.update_search_keyword,xe.prototype.update_referrer_info=xe.prototype.update_referrer_info,xe.prototype.get_cross_subdomain=xe.prototype.get_cross_subdomain,xe.prototype.clear=xe.prototype.clear;var qe={},Fe=function(){ke.init=function(e,t,n){if(n)return ke[n]||(ke[n]=qe[n]=Ue(e,t,n),ke[n]._loaded()),ke[n];var i=ke;qe.mixpanel?i=qe.mixpanel:e&&((i=Ue(e,t,"mixpanel"))._loaded(),qe.mixpanel=i),ke=i,1===Ee&&(r.mixpanel=ke),N.each(qe,(function(e,t){"mixpanel"!==t&&(ke[t]=e)})),ke._=N}};var He=(Ee=0,ke=new Me,Fe(),ke.init(),function(){function e(){e.done||(e.done=!0,Ne=!0,Pe=!1,N.each(qe,(function(e){e._dom_loaded()})))}if(k.addEventListener)"complete"===k.readyState?e():k.addEventListener("DOMContentLoaded",e,!1);else if(k.attachEvent){k.attachEvent("onreadystatechange",e);var t=!1;try{t=null===r.frameElement}catch(e){}k.documentElement.doScroll&&t&&function t(){try{k.documentElement.doScroll("left")}catch(e){return void setTimeout(t,1)}e()}()}N.register_event(r,"load",e,!0)}(),ke);e.exports=He},lhgG:function(e,t){document.querySelectorAll("[data-countdown]").forEach((function(e){var t,n=!1,r=e.querySelector("[data-countdown-timer]"),i=parseInt(e.getAttribute("data-time")),a=e.querySelector("[data-countdown-message]"),s=e.querySelector("[data-countdown-finished-message]"),o=function(e){return("0"+e).slice(-2)},u=setInterval((function(){if(window.elementIsVisible(r)||n){n||(t=new Date(Date.parse(new Date)+1e3*i),n=!0,t=t);var e=function(e){var t=Date.parse(e)-Date.parse(new Date),n=Math.floor(t/1e3%60),r=Math.floor(t/1e3/60%60),i=Math.floor(t/36e5%24);return{total:t,days:Math.floor(t/864e5),hours:i,minutes:r,seconds:n}}(t),l="";e.days>0&&(l=e.days+":"),e.hours>0&&(l+=o(e.hours)+":"),l+=o(e.minutes)+":",l+=o(e.seconds),e.total<=0?(a&&(a.style.display="none"),s&&(s.style.display="inline"),r.innerHTML="00:00",clearInterval(u)):r.innerHTML=l}}),1e3)}))},mrSG:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return s}));var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return s}function s(){for(var e=[],t=0;t1&&void 0!==arguments[1]?arguments[1]:0;0===t?e.scrollIntoView({behavior:"smooth"}):window.scrollTo({top:e.getBoundingClientRect().top-document.body.getBoundingClientRect().top-t,behavior:"smooth"})},window._debounce=function(e,t,n){var r;return function(){var i=this,a=arguments,s=function(){r=null,n||e.apply(i,a)},o=n&&!r;clearTimeout(r),r=setTimeout(s,t),o&&e.apply(i,a)}},window.isElementVisible=function(e){var t=e.getBoundingClientRect();return t.top>0&&t.left>=0&&t.right<=window.innerWidth&&t.bottom<=window.innerHeight}},oShl:function(e,t,n){var r=n("Nsbk"),i=n("SksO"),a=n("xfeJ"),s=n("sXyB");function o(t){var n="function"==typeof Map?new Map:void 0;return e.exports=o=function(e){if(null===e||!a(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return s(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,o(t)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},p46w:function(e,t,n){var r,i;!function(a){if(void 0===(i="function"==typeof(r=a)?r.call(t,n,t,e):r)||(e.exports=i),!0,e.exports=a(),!!0){var s=window.Cookies,o=window.Cookies=a();o.noConflict=function(){return window.Cookies=s,o}}}((function(){function e(){for(var e=0,t={};e"}catch(e){return""}}},pVnL:function(e,t){function n(){return e.exports=n=Object.assign?Object.assign.bind():function(e){for(var t=1;twindow.App.loadThreshold&&r.b((function(e){e.setLevel("info"),e.setExtra("Load time (sec):",{"Since page start":Math.floor(t.getLoadTime(window.App.start)),"Since player init":Math.floor(n)}),r.a("[YouTube] Slow player load time")})),this.isReady=!0,e.call()},getLoadTime:function(e){return(performance.now()-e)/1e3},resizePlayer:function(){var e=window.innerWidth<=600,t=1.3*window.innerWidth;window.App.playerShowControls?this.el.style.height=document.getElementById("player").offsetHeight-70+"px":this.el.style.height=document.getElementById("player").offsetHeight-122+"px",e&&(this.el.style.height=t+"px"),window.location.href.includes("upgrade")},onPlay:function(e){var t=this,n=document.querySelector("[data-player-wrapper] > iframe").src.split("embed/")[1].split("?")[0];this.player.addEventListener("onStateChange",(function(r){r.data===YT.PlayerState.PLAYING&&(e.call(),t.loadSubtitles(n),t.showSubtitles())}))},onPause:function(e){var t=this;this.player.addEventListener("onStateChange",(function(n){n.data===YT.PlayerState.PAUSED&&(e.call(),t.pauseSubtitles())}))},play:function(){this.isReady&&this.player.playVideo()},pause:function(){this.isReady&&this.player.pauseVideo()},mute:function(){this.isReady&&this.player.mute()},unmute:function(){this.isReady&&(window.App.firstPlay&&(window.App.firstPlay=!1,this.player.seekTo(0)),this.player.unMute())},loadSubtitles:function(e){subtitlesData.length&&(subtitlesData=allSubtitles[e])},showSubtitles:function(){if(subtitlesData.length){var e=this;this.subtitlesInterval=setInterval((function(){var t=e.subtitlesContainer.innerHTML,n=e.getSubtitleText(e.player.getCurrentTime());e.subtitlesContainer.style.display=""===n?"none":"block",t!==n&&(e.subtitlesContainer.innerHTML=n)}),100)}},autocompleteTextArea:function(e){var t=document.querySelector("[data-video-chat-wrapper]"),n=document.querySelector("[data-messages-container]"),r=document.createElement("div");if(r.className="message-wrapper",r.innerHTML=chatbotTimestamps[e],n.append(r),n.scrollTop=n.scrollHeight,null===t.getAttribute("data-active")){var i=document.querySelector("[data-popup-wrapper]"),a=document.createElement("div");a.className="tooltip-wrapper",a.innerHTML=chatbotTimestamps[e],i.append(a),setTimeout((function(){a.classList.add("tooltip-fade-out"),setTimeout((function(){a.remove()}),1e3)}),2e3)}},pauseSubtitles:function(){subtitlesData.length&&clearInterval(this.subtitlesInterval)},getSubtitleText:function(e){var t=subtitlesData.filter((function(t){return e>t.startTime&&e "):""}},t.default=i},qWin:function(e,t){var n=Math.pow(2,32);e.exports={getUint64:function(e){var t,r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.getBigUint64?(t=r.getBigUint64(0))=this.player.HAVE_FUTURE_DATA?this.triggerReadyCallback(e,"readyState: HAVE_FUTURE_DATA"):this.player.addEventListener("loadedmetadata",(function(){t.triggerReadyCallback(e,"event: loadedmetadata")}),!1),setTimeout((function(){t.isReady||(r.a("[Google Cloud] Player load timeout"),t.triggerReadyCallback(e,"timeout"))}),1e4),window.App.firstPlay=!0},triggerReadyCallback:function(e){var t=this,n=this.getLoadTime(this.start);n>window.App.loadThreshold&&r.b((function(e){e.setLevel("info"),e.setExtra("Load time (sec):",{"Since page start":Math.floor(t.getLoadTime(window.App.start)),"Since player init":Math.floor(n)}),r.a("[Google Cloud] Slow player load time")})),this.isReady=!0,e.call(this)},getLoadTime:function(e){return(performance.now()-e)/1e3},onPlay:function(e){var t=this,n=document.querySelector("[data-player-wrapper] > video > source").src.match(/\/([^/]+)\.mp4$/)[1];console.log(n),this.player.addEventListener("play",(function(){e.call(this),t.loadSubtitles(n),t.showSubtitles()}))},onPause:function(e){var t=this;this.player.addEventListener("pause",(function(){e.call(this),t.pauseSubtitles()}))},play:function(){this.player.play()},pause:function(){this.player.pause()},mute:function(){this.player.muted=!0},unmute:function(){this.player.muted=!1,window.App.firstPlay&&(window.App.firstPlay=!1,this.player.currentTime=0)},loadSubtitles:function(e){subtitlesData.length&&(console.log("Loading subtitles..."),console.log(allSubtitles[e]),subtitlesData=allSubtitles[e],console.info(subtitlesData))},showSubtitles:function(){if(subtitlesData.length){var e=this;this.subtitlesInterval=setInterval((function(){var t=e.subtitlesContainer.innerHTML,n=e.getSubtitleText(e.player.currentTime);e.subtitlesContainer.style.display=""===n?"none":"block",t!==n&&(e.subtitlesContainer.innerHTML=n)}),100)}},autocompleteTextArea:function(e){var t=document.querySelector("[data-video-chat-wrapper]"),n=document.querySelector("[data-messages-container]"),r=document.createElement("div");if(r.className="message-wrapper",r.innerHTML=chatbotTimestamps[e],n.append(r),n.scrollTop=n.scrollHeight,null===t.getAttribute("data-active")){var i=document.querySelector("[data-popup-wrapper]"),a=document.createElement("div");a.className="tooltip-wrapper",a.innerHTML=chatbotTimestamps[e],i.append(a),setTimeout((function(){a.classList.add("tooltip-fade-out"),setTimeout((function(){a.remove()}),1e3)}),2e3)}},pauseSubtitles:function(){subtitlesData.length&&clearInterval(this.subtitlesInterval)},getSubtitleText:function(e){var t=subtitlesData.filter((function(t){return e>t.startTime&&e "):""}},t.default=i},sDzi:function(e,t){var n={"":1,lr:1,rl:1},r={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function i(e){return"string"==typeof e&&(!!r[e.toLowerCase()]&&e.toLowerCase())}function a(e,t,r){this.hasBeenReset=!1;var a="",s=!1,o=e,u=t,l=r,c=null,d="",h=!0,p="auto",f="start",m="auto",g="auto",y=100,v="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return a},set:function(e){a=""+e}},pauseOnExit:{enumerable:!0,get:function(){return s},set:function(e){s=!!e}},startTime:{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");o=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");u=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return l},set:function(e){l=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return c},set:function(e){c=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return d},set:function(e){var t=function(e){return"string"==typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}(e);if(!1===t)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");d=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return h},set:function(e){h=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return p},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");p=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return f},set:function(e){var t=i(e);t?(f=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return m},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");m=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return g},set:function(e){var t=i(e);t?(g=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");y=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return v},set:function(e){var t=i(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");v=t,this.hasBeenReset=!0}}}),this.displayState=void 0}a.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=a},sHRr:function(e,t,n){var r=n("iadd"),i=n("4ciW"),a=n("sw/d"),s=n("4ANG"),o=i.DOMImplementation,u=r.NAMESPACE,l=s.ParseError,c=s.XMLReader;function d(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function h(e){this.options=e||{locator:{}}}function p(){this.cdata=!1}function f(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function m(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function g(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function y(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}h.prototype.parseFromString=function(e,t){var n=this.options,r=new c,i=n.domBuilder||new p,s=n.errorHandler,o=n.locator,l=n.xmlns||{},h=/\/x?html?$/.test(t),f=h?a.HTML_ENTITIES:a.XML_ENTITIES;o&&i.setDocumentLocator(o),r.errorHandler=function(e,t,n){if(!e){if(t instanceof p)return t;e=t}var r={},i=e instanceof Function;function a(t){var a=e[t];!a&&i&&(a=2==e.length?function(n){e(t,n)}:e),r[t]=a&&function(e){a("[xmldom "+t+"]\t"+e+m(n))}||function(){}}return n=n||{},a("warning"),a("error"),a("fatalError"),r}(s,i,o),r.domBuilder=n.domBuilder||i,h&&(l[""]=u.HTML),l.xml=l.xml||u.XML;var g=n.normalizeLineEndings||d;return e&&"string"==typeof e?r.parse(g(e),l,f):r.errorHandler.error("invalid doc source"),i.doc},p.prototype={startDocument:function(){this.doc=(new o).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),s=r.length;y(this,a),this.currentElement=a,this.locator&&f(this.locator,a);for(var o=0;o",lt:"<",quot:'"'}),t.HTML_ENTITIES=r({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:"\n",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:"\t",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:"‌"}),t.entityMap=t.HTML_ENTITIES},tQ2B:function(e,t,n){"use strict";var r=n("xTJ+"),i=n("Rn+g"),a=n("MLWZ"),s=n("g7np"),o=n("w0Vi"),u=n("OTTw"),l=n("LYNF");e.exports=function(e){return new Promise((function(t,c){var d=e.data,h=e.headers;r.isFormData(d)&&delete h["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var f=e.auth.username||"",m=e.auth.password||"";h.Authorization="Basic "+btoa(f+":"+m)}var g=s(e.baseURL,e.url);if(p.open(e.method.toUpperCase(),a(g,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in p?o(p.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:n,config:e,request:p};i(t,c,r),p=null}},p.onabort=function(){p&&(c(l("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){c(l("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),c(l(t,e,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var y=n("eqyj"),v=(e.withCredentials||u(g))&&e.xsrfCookieName?y.read(e.xsrfCookieName):void 0;v&&(h[e.xsrfHeaderName]=v)}if("setRequestHeader"in p&&r.forEach(h,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete h[t]:p.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),e.responseType)try{p.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){p&&(p.abort(),c(e),p=null)})),void 0===d&&(d=null),p.send(d)}))}},tjlA:function(e,t,n){"use strict";(function(e){var r=n("H7XF"),i=n("kVK+"),a=n("49sm");function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function f(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(e).length;default:if(r)return q(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return A(this,t,n);case"base64":return k(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var a,s=1,o=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,o/=2,u/=2,n/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(a=n;ao&&(n=o-u),a=n;a>=0;a--){for(var d=!0,h=0;hi&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var s=0;s>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function k(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:l>223?3:l>191?2:1;if(i+d<=n)switch(d){case 1:l<128&&(c=l);break;case 2:128==(192&(a=e[i+1]))&&(u=(31&l)<<6|63&a)>127&&(c=u);break;case 3:a=e[i+1],s=e[i+2],128==(192&a)&&128==(192&s)&&(u=(15&l)<<12|(63&a)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:a=e[i+1],s=e[i+2],o=e[i+3],128==(192&a)&&128==(192&s)&&128==(192&o)&&(u=(15&l)<<18|(63&a)<<12|(63&s)<<6|63&o)>65535&&u<1114112&&(c=u)}null===c?(c=65533,d=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),o=Math.min(a,s),l=this.slice(r,i),c=e.slice(t,n),d=0;di)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return T(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",a=t;an)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,r,i,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function D(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function R(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function N(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(e,t,n,r,a){return a||N(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,a){return a||N(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],i=1,a=0;++a=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||L(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):R(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var a=0,s=1,o=0;for(this[t]=255&e;++a>0)-o&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var a=n-1,s=1,o=0;for(this[t+a]=255&e;--a>=0&&(s*=256);)e<0&&0===o&&0!==this[t+a+1]&&(o=1),this[t+a]=(e/s>>0)-o&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):R(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return M(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return M(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function F(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n("yLpj"))},vDqi:function(e,t,n){e.exports=n("zuR4")},vFt6:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n("9AQC");function i(e){try{for(var t=e,n=[],r=0,i=0,s=" > ".length,o=void 0;t&&r++<5&&!("html"===(o=a(t))||r>1&&i+n.length*s+o.length>=80);)n.push(o),i+=o.length,t=t.parentNode;return n.reverse().join(" > ")}catch(e){return""}}function a(e){var t,n,i,a,s,o=e,u=[];if(!o||!o.tagName)return"";if(u.push(o.tagName.toLowerCase()),o.id&&u.push("#"+o.id),(t=o.className)&&Object(r.h)(t))for(n=t.split(/\s+/),s=0;s=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},wCA9:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){function e(){this._hasWeakSet="function"==typeof WeakSet,this._inner=this._hasWeakSet?new WeakSet:[]}return e.prototype.memoize=function(e){if(this._hasWeakSet)return!!this._inner.has(e)||(this._inner.add(e),!1);for(var t=0;t