baiqiu-cms-decoration-dg 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- module.exports=function(e){var t={};function i(r){if(t[r])return t[r].exports;var s=t[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=e,i.c=t,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(r,s,function(t){return e[t]}.bind(null,s));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s="fb15")}({0:function(e,t){},"02a3":function(e,t,i){(function(t,i){e.exports=i()})(0,(function(){"use strict";function e(e){return null!==e&&"object"===typeof e&&"constructor"in e&&e.constructor===Object}function t(i,r){void 0===i&&(i={}),void 0===r&&(r={}),Object.keys(r).forEach((function(s){"undefined"===typeof i[s]?i[s]=r[s]:e(r[s])&&e(i[s])&&Object.keys(r[s]).length>0&&t(i[s],r[s])}))}var i="undefined"!==typeof document?document:{},r={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};t(i,r);var s="undefined"!==typeof window?window:{},n={document:r,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}}};t(s,n);var a=function(e){for(var t=this,i=0;i<e.length;i+=1)t[i]=e[i];return t.length=e.length,this};function o(e,t){var r=[],n=0;if(e&&!t&&e instanceof a)return e;if(e)if("string"===typeof e){var o,l,d=e.trim();if(d.indexOf("<")>=0&&d.indexOf(">")>=0){var u="div";for(0===d.indexOf("<li")&&(u="ul"),0===d.indexOf("<tr")&&(u="tbody"),0!==d.indexOf("<td")&&0!==d.indexOf("<th")||(u="tr"),0===d.indexOf("<tbody")&&(u="table"),0===d.indexOf("<option")&&(u="select"),l=i.createElement(u),l.innerHTML=d,n=0;n<l.childNodes.length;n+=1)r.push(l.childNodes[n])}else for(o=t||"#"!==e[0]||e.match(/[ .<>:~]/)?(t||i).querySelectorAll(e.trim()):[i.getElementById(e.trim().split("#")[1])],n=0;n<o.length;n+=1)o[n]&&r.push(o[n])}else if(e.nodeType||e===s||e===i)r.push(e);else if(e.length>0&&e[0].nodeType)for(n=0;n<e.length;n+=1)r.push(e[n]);return new a(r)}function l(e){for(var t=[],i=0;i<e.length;i+=1)-1===t.indexOf(e[i])&&t.push(e[i]);return t}function d(e){if("undefined"===typeof e)return this;for(var t=e.split(" "),i=0;i<t.length;i+=1)for(var r=0;r<this.length;r+=1)"undefined"!==typeof this[r]&&"undefined"!==typeof this[r].classList&&this[r].classList.add(t[i]);return this}function u(e){for(var t=e.split(" "),i=0;i<t.length;i+=1)for(var r=0;r<this.length;r+=1)"undefined"!==typeof this[r]&&"undefined"!==typeof this[r].classList&&this[r].classList.remove(t[i]);return this}function c(e){return!!this[0]&&this[0].classList.contains(e)}function h(e){for(var t=e.split(" "),i=0;i<t.length;i+=1)for(var r=0;r<this.length;r+=1)"undefined"!==typeof this[r]&&"undefined"!==typeof this[r].classList&&this[r].classList.toggle(t[i]);return this}function p(e,t){var i=arguments;if(1===arguments.length&&"string"===typeof e)return this[0]?this[0].getAttribute(e):void 0;for(var r=0;r<this.length;r+=1)if(2===i.length)this[r].setAttribute(e,t);else for(var s in e)this[r][s]=e[s],this[r].setAttribute(s,e[s]);return this}function f(e){for(var t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this}function m(e,t){var i;if("undefined"!==typeof t){for(var r=0;r<this.length;r+=1)i=this[r],i.dom7ElementDataStorage||(i.dom7ElementDataStorage={}),i.dom7ElementDataStorage[e]=t;return this}if(i=this[0],i){if(i.dom7ElementDataStorage&&e in i.dom7ElementDataStorage)return i.dom7ElementDataStorage[e];var s=i.getAttribute("data-"+e);return s||void 0}}function g(e){for(var t=0;t<this.length;t+=1){var i=this[t].style;i.webkitTransform=e,i.transform=e}return this}function y(e){"string"!==typeof e&&(e+="ms");for(var t=0;t<this.length;t+=1){var i=this[t].style;i.webkitTransitionDuration=e,i.transitionDuration=e}return this}function v(){var e,t=[],i=arguments.length;while(i--)t[i]=arguments[i];var r=t[0],s=t[1],n=t[2],a=t[3];function l(e){var t=e.target;if(t){var i=e.target.dom7EventData||[];if(i.indexOf(e)<0&&i.unshift(e),o(t).is(s))n.apply(t,i);else for(var r=o(t).parents(),a=0;a<r.length;a+=1)o(r[a]).is(s)&&n.apply(r[a],i)}}function d(e){var t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),n.apply(this,t)}"function"===typeof t[1]&&(e=t,r=e[0],n=e[1],a=e[2],s=void 0),a||(a=!1);for(var u,c=r.split(" "),h=0;h<this.length;h+=1){var p=this[h];if(s)for(u=0;u<c.length;u+=1){var f=c[u];p.dom7LiveListeners||(p.dom7LiveListeners={}),p.dom7LiveListeners[f]||(p.dom7LiveListeners[f]=[]),p.dom7LiveListeners[f].push({listener:n,proxyListener:l}),p.addEventListener(f,l,a)}else for(u=0;u<c.length;u+=1){var m=c[u];p.dom7Listeners||(p.dom7Listeners={}),p.dom7Listeners[m]||(p.dom7Listeners[m]=[]),p.dom7Listeners[m].push({listener:n,proxyListener:d}),p.addEventListener(m,d,a)}}return this}function b(){var e,t=[],i=arguments.length;while(i--)t[i]=arguments[i];var r=t[0],s=t[1],n=t[2],a=t[3];"function"===typeof t[1]&&(e=t,r=e[0],n=e[1],a=e[2],s=void 0),a||(a=!1);for(var o=r.split(" "),l=0;l<o.length;l+=1)for(var d=o[l],u=0;u<this.length;u+=1){var c=this[u],h=void 0;if(!s&&c.dom7Listeners?h=c.dom7Listeners[d]:s&&c.dom7LiveListeners&&(h=c.dom7LiveListeners[d]),h&&h.length)for(var p=h.length-1;p>=0;p-=1){var f=h[p];n&&f.listener===n||n&&f.listener&&f.listener.dom7proxy&&f.listener.dom7proxy===n?(c.removeEventListener(d,f.proxyListener,a),h.splice(p,1)):n||(c.removeEventListener(d,f.proxyListener,a),h.splice(p,1))}}return this}function _(){var e=[],t=arguments.length;while(t--)e[t]=arguments[t];for(var r=e[0].split(" "),n=e[1],a=0;a<r.length;a+=1)for(var o=r[a],l=0;l<this.length;l+=1){var d=this[l],u=void 0;try{u=new s.CustomEvent(o,{detail:n,bubbles:!0,cancelable:!0})}catch(c){u=i.createEvent("Event"),u.initEvent(o,!0,!0),u.detail=n}d.dom7EventData=e.filter((function(e,t){return t>0})),d.dispatchEvent(u),d.dom7EventData=[],delete d.dom7EventData}return this}function T(e){var t,i=["webkitTransitionEnd","transitionend"],r=this;function s(n){if(n.target===this)for(e.call(this,n),t=0;t<i.length;t+=1)r.off(i[t],s)}if(e)for(t=0;t<i.length;t+=1)r.on(i[t],s);return this}function S(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null}function w(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null}function E(){if(this.length>0){var e=this[0],t=e.getBoundingClientRect(),r=i.body,n=e.clientTop||r.clientTop||0,a=e.clientLeft||r.clientLeft||0,o=e===s?s.scrollY:e.scrollTop,l=e===s?s.scrollX:e.scrollLeft;return{top:t.top+o-n,left:t.left+l-a}}return null}function C(){return this[0]?s.getComputedStyle(this[0],null):{}}function x(e,t){var i;if(1===arguments.length){if("string"!==typeof e){for(i=0;i<this.length;i+=1)for(var r in e)this[i].style[r]=e[r];return this}if(this[0])return s.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"===typeof e){for(i=0;i<this.length;i+=1)this[i].style[e]=t;return this}return this}function k(e){if(!e)return this;for(var t=0;t<this.length;t+=1)if(!1===e.call(this[t],t,this[t]))return this;return this}function I(e){for(var t=[],i=this,r=0;r<i.length;r+=1)e.call(i[r],r,i[r])&&t.push(i[r]);return new a(t)}function A(e){if("undefined"===typeof e)return this[0]?this[0].innerHTML:void 0;for(var t=0;t<this.length;t+=1)this[t].innerHTML=e;return this}function O(e){if("undefined"===typeof e)return this[0]?this[0].textContent.trim():null;for(var t=0;t<this.length;t+=1)this[t].textContent=e;return this}function P(e){var t,r,n=this[0];if(!n||"undefined"===typeof e)return!1;if("string"===typeof e){if(n.matches)return n.matches(e);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(e);if(n.msMatchesSelector)return n.msMatchesSelector(e);for(t=o(e),r=0;r<t.length;r+=1)if(t[r]===n)return!0;return!1}if(e===i)return n===i;if(e===s)return n===s;if(e.nodeType||e instanceof a){for(t=e.nodeType?[e]:e,r=0;r<t.length;r+=1)if(t[r]===n)return!0;return!1}return!1}function L(){var e,t=this[0];if(t){e=0;while(null!==(t=t.previousSibling))1===t.nodeType&&(e+=1);return e}}function D(e){if("undefined"===typeof e)return this;var t,i=this.length;return e>i-1?new a([]):e<0?(t=i+e,new a(t<0?[]:[this[t]])):new a([this[e]])}function M(){var e,t=[],r=arguments.length;while(r--)t[r]=arguments[r];for(var s=0;s<t.length;s+=1){e=t[s];for(var n=0;n<this.length;n+=1)if("string"===typeof e){var o=i.createElement("div");o.innerHTML=e;while(o.firstChild)this[n].appendChild(o.firstChild)}else if(e instanceof a)for(var l=0;l<e.length;l+=1)this[n].appendChild(e[l]);else this[n].appendChild(e)}return this}function N(e){var t,r;for(t=0;t<this.length;t+=1)if("string"===typeof e){var s=i.createElement("div");for(s.innerHTML=e,r=s.childNodes.length-1;r>=0;r-=1)this[t].insertBefore(s.childNodes[r],this[t].childNodes[0])}else if(e instanceof a)for(r=0;r<e.length;r+=1)this[t].insertBefore(e[r],this[t].childNodes[0]);else this[t].insertBefore(e,this[t].childNodes[0]);return this}function R(e){return this.length>0?e?this[0].nextElementSibling&&o(this[0].nextElementSibling).is(e)?new a([this[0].nextElementSibling]):new a([]):this[0].nextElementSibling?new a([this[0].nextElementSibling]):new a([]):new a([])}function U(e){var t=[],i=this[0];if(!i)return new a([]);while(i.nextElementSibling){var r=i.nextElementSibling;e?o(r).is(e)&&t.push(r):t.push(r),i=r}return new a(t)}function B(e){if(this.length>0){var t=this[0];return e?t.previousElementSibling&&o(t.previousElementSibling).is(e)?new a([t.previousElementSibling]):new a([]):t.previousElementSibling?new a([t.previousElementSibling]):new a([])}return new a([])}function j(e){var t=[],i=this[0];if(!i)return new a([]);while(i.previousElementSibling){var r=i.previousElementSibling;e?o(r).is(e)&&t.push(r):t.push(r),i=r}return new a(t)}function F(e){for(var t=[],i=0;i<this.length;i+=1)null!==this[i].parentNode&&(e?o(this[i].parentNode).is(e)&&t.push(this[i].parentNode):t.push(this[i].parentNode));return o(l(t))}function q(e){for(var t=[],i=0;i<this.length;i+=1){var r=this[i].parentNode;while(r)e?o(r).is(e)&&t.push(r):t.push(r),r=r.parentNode}return o(l(t))}function $(e){var t=this;return"undefined"===typeof e?new a([]):(t.is(e)||(t=t.parents(e).eq(0)),t)}function H(e){for(var t=[],i=0;i<this.length;i+=1)for(var r=this[i].querySelectorAll(e),s=0;s<r.length;s+=1)t.push(r[s]);return new a(t)}function z(e){for(var t=[],i=0;i<this.length;i+=1)for(var r=this[i].childNodes,s=0;s<r.length;s+=1)e?1===r[s].nodeType&&o(r[s]).is(e)&&t.push(r[s]):1===r[s].nodeType&&t.push(r[s]);return new a(l(t))}function V(){for(var e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}function G(){var e=[],t=arguments.length;while(t--)e[t]=arguments[t];var i,r,s=this;for(i=0;i<e.length;i+=1){var n=o(e[i]);for(r=0;r<n.length;r+=1)s[s.length]=n[r],s.length+=1}return s}o.fn=a.prototype,o.Class=a,o.Dom7=a;var W={addClass:d,removeClass:u,hasClass:c,toggleClass:h,attr:p,removeAttr:f,data:m,transform:g,transition:y,on:v,off:b,trigger:_,transitionEnd:T,outerWidth:S,outerHeight:w,offset:E,css:x,each:k,html:A,text:O,is:P,index:L,eq:D,append:M,prepend:N,next:R,nextAll:U,prev:B,prevAll:j,parent:F,parents:q,closest:$,find:H,children:z,filter:I,remove:V,add:G,styles:C};Object.keys(W).forEach((function(e){o.fn[e]=o.fn[e]||W[e]}));var X={deleteProps:function(e){var t=e;Object.keys(t).forEach((function(e){try{t[e]=null}catch(i){}try{delete t[e]}catch(i){}}))},nextTick:function(e,t){return void 0===t&&(t=0),setTimeout(e,t)},now:function(){return Date.now()},getTranslate:function(e,t){var i,r,n;void 0===t&&(t="x");var a=s.getComputedStyle(e,null);return s.WebKitCSSMatrix?(r=a.transform||a.webkitTransform,r.split(",").length>6&&(r=r.split(", ").map((function(e){return e.replace(",",".")})).join(", ")),n=new s.WebKitCSSMatrix("none"===r?"":r)):(n=a.MozTransform||a.OTransform||a.MsTransform||a.msTransform||a.transform||a.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),i=n.toString().split(",")),"x"===t&&(r=s.WebKitCSSMatrix?n.m41:16===i.length?parseFloat(i[12]):parseFloat(i[4])),"y"===t&&(r=s.WebKitCSSMatrix?n.m42:16===i.length?parseFloat(i[13]):parseFloat(i[5])),r||0},parseUrlQuery:function(e){var t,i,r,n,a={},o=e||s.location.href;if("string"===typeof o&&o.length)for(o=o.indexOf("?")>-1?o.replace(/\S*\?/,""):"",i=o.split("&").filter((function(e){return""!==e})),n=i.length,t=0;t<n;t+=1)r=i[t].replace(/#\S+/g,"").split("="),a[decodeURIComponent(r[0])]="undefined"===typeof r[1]?void 0:decodeURIComponent(r[1])||"";return a},isObject:function(e){return"object"===typeof e&&null!==e&&e.constructor&&e.constructor===Object},extend:function(){var e=[],t=arguments.length;while(t--)e[t]=arguments[t];for(var i=Object(e[0]),r=1;r<e.length;r+=1){var s=e[r];if(void 0!==s&&null!==s)for(var n=Object.keys(Object(s)),a=0,o=n.length;a<o;a+=1){var l=n[a],d=Object.getOwnPropertyDescriptor(s,l);void 0!==d&&d.enumerable&&(X.isObject(i[l])&&X.isObject(s[l])?X.extend(i[l],s[l]):!X.isObject(i[l])&&X.isObject(s[l])?(i[l]={},X.extend(i[l],s[l])):i[l]=s[l])}}return i}},Y=function(){return{touch:!!("ontouchstart"in s||s.DocumentTouch&&i instanceof s.DocumentTouch),pointerEvents:!!s.PointerEvent&&"maxTouchPoints"in s.navigator&&s.navigator.maxTouchPoints>=0,observer:function(){return"MutationObserver"in s||"WebkitMutationObserver"in s}(),passiveListener:function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});s.addEventListener("testPassiveListener",null,t)}catch(i){}return e}(),gestures:function(){return"ongesturestart"in s}()}}(),K=function(e){void 0===e&&(e={});var t=this;t.params=e,t.eventsListeners={},t.params&&t.params.on&&Object.keys(t.params.on).forEach((function(e){t.on(e,t.params.on[e])}))},J={components:{configurable:!0}};function Q(){var e,t,i=this,r=i.$el;e="undefined"!==typeof i.params.width?i.params.width:r[0].clientWidth,t="undefined"!==typeof i.params.height?i.params.height:r[0].clientHeight,0===e&&i.isHorizontal()||0===t&&i.isVertical()||(e=e-parseInt(r.css("padding-left"),10)-parseInt(r.css("padding-right"),10),t=t-parseInt(r.css("padding-top"),10)-parseInt(r.css("padding-bottom"),10),X.extend(i,{width:e,height:t,size:i.isHorizontal()?e:t}))}function Z(){var e=this,t=e.params,i=e.$wrapperEl,r=e.size,n=e.rtlTranslate,a=e.wrongRTL,o=e.virtual&&t.virtual.enabled,l=o?e.virtual.slides.length:e.slides.length,d=i.children("."+e.params.slideClass),u=o?e.virtual.slides.length:d.length,c=[],h=[],p=[];function f(e){return!t.cssMode||e!==d.length-1}var m=t.slidesOffsetBefore;"function"===typeof m&&(m=t.slidesOffsetBefore.call(e));var g=t.slidesOffsetAfter;"function"===typeof g&&(g=t.slidesOffsetAfter.call(e));var y=e.snapGrid.length,v=e.snapGrid.length,b=t.spaceBetween,_=-m,T=0,S=0;if("undefined"!==typeof r){var w,E;"string"===typeof b&&b.indexOf("%")>=0&&(b=parseFloat(b.replace("%",""))/100*r),e.virtualSize=-b,n?d.css({marginLeft:"",marginTop:""}):d.css({marginRight:"",marginBottom:""}),t.slidesPerColumn>1&&(w=Math.floor(u/t.slidesPerColumn)===u/e.params.slidesPerColumn?u:Math.ceil(u/t.slidesPerColumn)*t.slidesPerColumn,"auto"!==t.slidesPerView&&"row"===t.slidesPerColumnFill&&(w=Math.max(w,t.slidesPerView*t.slidesPerColumn)));for(var C,x=t.slidesPerColumn,k=w/x,I=Math.floor(u/t.slidesPerColumn),A=0;A<u;A+=1){E=0;var O=d.eq(A);if(t.slidesPerColumn>1){var P=void 0,L=void 0,D=void 0;if("row"===t.slidesPerColumnFill&&t.slidesPerGroup>1){var M=Math.floor(A/(t.slidesPerGroup*t.slidesPerColumn)),N=A-t.slidesPerColumn*t.slidesPerGroup*M,R=0===M?t.slidesPerGroup:Math.min(Math.ceil((u-M*x*t.slidesPerGroup)/x),t.slidesPerGroup);D=Math.floor(N/R),L=N-D*R+M*t.slidesPerGroup,P=L+D*w/x,O.css({"-webkit-box-ordinal-group":P,"-moz-box-ordinal-group":P,"-ms-flex-order":P,"-webkit-order":P,order:P})}else"column"===t.slidesPerColumnFill?(L=Math.floor(A/x),D=A-L*x,(L>I||L===I&&D===x-1)&&(D+=1,D>=x&&(D=0,L+=1))):(D=Math.floor(A/k),L=A-D*k);O.css("margin-"+(e.isHorizontal()?"top":"left"),0!==D&&t.spaceBetween&&t.spaceBetween+"px")}if("none"!==O.css("display")){if("auto"===t.slidesPerView){var U=s.getComputedStyle(O[0],null),B=O[0].style.transform,j=O[0].style.webkitTransform;if(B&&(O[0].style.transform="none"),j&&(O[0].style.webkitTransform="none"),t.roundLengths)E=e.isHorizontal()?O.outerWidth(!0):O.outerHeight(!0);else if(e.isHorizontal()){var F=parseFloat(U.getPropertyValue("width")),q=parseFloat(U.getPropertyValue("padding-left")),$=parseFloat(U.getPropertyValue("padding-right")),H=parseFloat(U.getPropertyValue("margin-left")),z=parseFloat(U.getPropertyValue("margin-right")),V=U.getPropertyValue("box-sizing");E=V&&"border-box"===V?F+H+z:F+q+$+H+z}else{var G=parseFloat(U.getPropertyValue("height")),W=parseFloat(U.getPropertyValue("padding-top")),Y=parseFloat(U.getPropertyValue("padding-bottom")),K=parseFloat(U.getPropertyValue("margin-top")),J=parseFloat(U.getPropertyValue("margin-bottom")),Q=U.getPropertyValue("box-sizing");E=Q&&"border-box"===Q?G+K+J:G+W+Y+K+J}B&&(O[0].style.transform=B),j&&(O[0].style.webkitTransform=j),t.roundLengths&&(E=Math.floor(E))}else E=(r-(t.slidesPerView-1)*b)/t.slidesPerView,t.roundLengths&&(E=Math.floor(E)),d[A]&&(e.isHorizontal()?d[A].style.width=E+"px":d[A].style.height=E+"px");d[A]&&(d[A].swiperSlideSize=E),p.push(E),t.centeredSlides?(_=_+E/2+T/2+b,0===T&&0!==A&&(_=_-r/2-b),0===A&&(_=_-r/2-b),Math.abs(_)<.001&&(_=0),t.roundLengths&&(_=Math.floor(_)),S%t.slidesPerGroup===0&&c.push(_),h.push(_)):(t.roundLengths&&(_=Math.floor(_)),(S-Math.min(e.params.slidesPerGroupSkip,S))%e.params.slidesPerGroup===0&&c.push(_),h.push(_),_=_+E+b),e.virtualSize+=E+b,T=E,S+=1}}if(e.virtualSize=Math.max(e.virtualSize,r)+g,n&&a&&("slide"===t.effect||"coverflow"===t.effect)&&i.css({width:e.virtualSize+t.spaceBetween+"px"}),t.setWrapperSize&&(e.isHorizontal()?i.css({width:e.virtualSize+t.spaceBetween+"px"}):i.css({height:e.virtualSize+t.spaceBetween+"px"})),t.slidesPerColumn>1&&(e.virtualSize=(E+t.spaceBetween)*w,e.virtualSize=Math.ceil(e.virtualSize/t.slidesPerColumn)-t.spaceBetween,e.isHorizontal()?i.css({width:e.virtualSize+t.spaceBetween+"px"}):i.css({height:e.virtualSize+t.spaceBetween+"px"}),t.centeredSlides)){C=[];for(var Z=0;Z<c.length;Z+=1){var ee=c[Z];t.roundLengths&&(ee=Math.floor(ee)),c[Z]<e.virtualSize+c[0]&&C.push(ee)}c=C}if(!t.centeredSlides){C=[];for(var te=0;te<c.length;te+=1){var ie=c[te];t.roundLengths&&(ie=Math.floor(ie)),c[te]<=e.virtualSize-r&&C.push(ie)}c=C,Math.floor(e.virtualSize-r)-Math.floor(c[c.length-1])>1&&c.push(e.virtualSize-r)}if(0===c.length&&(c=[0]),0!==t.spaceBetween&&(e.isHorizontal()?n?d.filter(f).css({marginLeft:b+"px"}):d.filter(f).css({marginRight:b+"px"}):d.filter(f).css({marginBottom:b+"px"})),t.centeredSlides&&t.centeredSlidesBounds){var re=0;p.forEach((function(e){re+=e+(t.spaceBetween?t.spaceBetween:0)})),re-=t.spaceBetween;var se=re-r;c=c.map((function(e){return e<0?-m:e>se?se+g:e}))}if(t.centerInsufficientSlides){var ne=0;if(p.forEach((function(e){ne+=e+(t.spaceBetween?t.spaceBetween:0)})),ne-=t.spaceBetween,ne<r){var ae=(r-ne)/2;c.forEach((function(e,t){c[t]=e-ae})),h.forEach((function(e,t){h[t]=e+ae}))}}X.extend(e,{slides:d,snapGrid:c,slidesGrid:h,slidesSizesGrid:p}),u!==l&&e.emit("slidesLengthChange"),c.length!==y&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==v&&e.emit("slidesGridLengthChange"),(t.watchSlidesProgress||t.watchSlidesVisibility)&&e.updateSlidesOffset()}}function ee(e){var t,i=this,r=[],s=0;if("number"===typeof e?i.setTransition(e):!0===e&&i.setTransition(i.params.speed),"auto"!==i.params.slidesPerView&&i.params.slidesPerView>1)if(i.params.centeredSlides)i.visibleSlides.each((function(e,t){r.push(t)}));else for(t=0;t<Math.ceil(i.params.slidesPerView);t+=1){var n=i.activeIndex+t;if(n>i.slides.length)break;r.push(i.slides.eq(n)[0])}else r.push(i.slides.eq(i.activeIndex)[0]);for(t=0;t<r.length;t+=1)if("undefined"!==typeof r[t]){var a=r[t].offsetHeight;s=a>s?a:s}s&&i.$wrapperEl.css("height",s+"px")}function te(){for(var e=this,t=e.slides,i=0;i<t.length;i+=1)t[i].swiperSlideOffset=e.isHorizontal()?t[i].offsetLeft:t[i].offsetTop}function ie(e){void 0===e&&(e=this&&this.translate||0);var t=this,i=t.params,r=t.slides,s=t.rtlTranslate;if(0!==r.length){"undefined"===typeof r[0].swiperSlideOffset&&t.updateSlidesOffset();var n=-e;s&&(n=e),r.removeClass(i.slideVisibleClass),t.visibleSlidesIndexes=[],t.visibleSlides=[];for(var a=0;a<r.length;a+=1){var l=r[a],d=(n+(i.centeredSlides?t.minTranslate():0)-l.swiperSlideOffset)/(l.swiperSlideSize+i.spaceBetween);if(i.watchSlidesVisibility||i.centeredSlides&&i.autoHeight){var u=-(n-l.swiperSlideOffset),c=u+t.slidesSizesGrid[a],h=u>=0&&u<t.size-1||c>1&&c<=t.size||u<=0&&c>=t.size;h&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(a),r.eq(a).addClass(i.slideVisibleClass))}l.progress=s?-d:d}t.visibleSlides=o(t.visibleSlides)}}function re(e){var t=this;if("undefined"===typeof e){var i=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*i||0}var r=t.params,s=t.maxTranslate()-t.minTranslate(),n=t.progress,a=t.isBeginning,o=t.isEnd,l=a,d=o;0===s?(n=0,a=!0,o=!0):(n=(e-t.minTranslate())/s,a=n<=0,o=n>=1),X.extend(t,{progress:n,isBeginning:a,isEnd:o}),(r.watchSlidesProgress||r.watchSlidesVisibility||r.centeredSlides&&r.autoHeight)&&t.updateSlidesProgress(e),a&&!l&&t.emit("reachBeginning toEdge"),o&&!d&&t.emit("reachEnd toEdge"),(l&&!a||d&&!o)&&t.emit("fromEdge"),t.emit("progress",n)}function se(){var e,t=this,i=t.slides,r=t.params,s=t.$wrapperEl,n=t.activeIndex,a=t.realIndex,o=t.virtual&&r.virtual.enabled;i.removeClass(r.slideActiveClass+" "+r.slideNextClass+" "+r.slidePrevClass+" "+r.slideDuplicateActiveClass+" "+r.slideDuplicateNextClass+" "+r.slideDuplicatePrevClass),e=o?t.$wrapperEl.find("."+r.slideClass+'[data-swiper-slide-index="'+n+'"]'):i.eq(n),e.addClass(r.slideActiveClass),r.loop&&(e.hasClass(r.slideDuplicateClass)?s.children("."+r.slideClass+":not(."+r.slideDuplicateClass+')[data-swiper-slide-index="'+a+'"]').addClass(r.slideDuplicateActiveClass):s.children("."+r.slideClass+"."+r.slideDuplicateClass+'[data-swiper-slide-index="'+a+'"]').addClass(r.slideDuplicateActiveClass));var l=e.nextAll("."+r.slideClass).eq(0).addClass(r.slideNextClass);r.loop&&0===l.length&&(l=i.eq(0),l.addClass(r.slideNextClass));var d=e.prevAll("."+r.slideClass).eq(0).addClass(r.slidePrevClass);r.loop&&0===d.length&&(d=i.eq(-1),d.addClass(r.slidePrevClass)),r.loop&&(l.hasClass(r.slideDuplicateClass)?s.children("."+r.slideClass+":not(."+r.slideDuplicateClass+')[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(r.slideDuplicateNextClass):s.children("."+r.slideClass+"."+r.slideDuplicateClass+'[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(r.slideDuplicateNextClass),d.hasClass(r.slideDuplicateClass)?s.children("."+r.slideClass+":not(."+r.slideDuplicateClass+')[data-swiper-slide-index="'+d.attr("data-swiper-slide-index")+'"]').addClass(r.slideDuplicatePrevClass):s.children("."+r.slideClass+"."+r.slideDuplicateClass+'[data-swiper-slide-index="'+d.attr("data-swiper-slide-index")+'"]').addClass(r.slideDuplicatePrevClass))}function ne(e){var t,i=this,r=i.rtlTranslate?i.translate:-i.translate,s=i.slidesGrid,n=i.snapGrid,a=i.params,o=i.activeIndex,l=i.realIndex,d=i.snapIndex,u=e;if("undefined"===typeof u){for(var c=0;c<s.length;c+=1)"undefined"!==typeof s[c+1]?r>=s[c]&&r<s[c+1]-(s[c+1]-s[c])/2?u=c:r>=s[c]&&r<s[c+1]&&(u=c+1):r>=s[c]&&(u=c);a.normalizeSlideIndex&&(u<0||"undefined"===typeof u)&&(u=0)}if(n.indexOf(r)>=0)t=n.indexOf(r);else{var h=Math.min(a.slidesPerGroupSkip,u);t=h+Math.floor((u-h)/a.slidesPerGroup)}if(t>=n.length&&(t=n.length-1),u!==o){var p=parseInt(i.slides.eq(u).attr("data-swiper-slide-index")||u,10);X.extend(i,{snapIndex:t,realIndex:p,previousIndex:o,activeIndex:u}),i.emit("activeIndexChange"),i.emit("snapIndexChange"),l!==p&&i.emit("realIndexChange"),(i.initialized||i.params.runCallbacksOnInit)&&i.emit("slideChange")}else t!==d&&(i.snapIndex=t,i.emit("snapIndexChange"))}function ae(e){var t=this,i=t.params,r=o(e.target).closest("."+i.slideClass)[0],s=!1;if(r)for(var n=0;n<t.slides.length;n+=1)t.slides[n]===r&&(s=!0);if(!r||!s)return t.clickedSlide=void 0,void(t.clickedIndex=void 0);t.clickedSlide=r,t.virtual&&t.params.virtual.enabled?t.clickedIndex=parseInt(o(r).attr("data-swiper-slide-index"),10):t.clickedIndex=o(r).index(),i.slideToClickedSlide&&void 0!==t.clickedIndex&&t.clickedIndex!==t.activeIndex&&t.slideToClickedSlide()}K.prototype.on=function(e,t,i){var r=this;if("function"!==typeof t)return r;var s=i?"unshift":"push";return e.split(" ").forEach((function(e){r.eventsListeners[e]||(r.eventsListeners[e]=[]),r.eventsListeners[e][s](t)})),r},K.prototype.once=function(e,t,i){var r=this;if("function"!==typeof t)return r;function s(){var i=[],n=arguments.length;while(n--)i[n]=arguments[n];r.off(e,s),s.f7proxy&&delete s.f7proxy,t.apply(r,i)}return s.f7proxy=t,r.on(e,s,i)},K.prototype.off=function(e,t){var i=this;return i.eventsListeners?(e.split(" ").forEach((function(e){"undefined"===typeof t?i.eventsListeners[e]=[]:i.eventsListeners[e]&&i.eventsListeners[e].length&&i.eventsListeners[e].forEach((function(r,s){(r===t||r.f7proxy&&r.f7proxy===t)&&i.eventsListeners[e].splice(s,1)}))})),i):i},K.prototype.emit=function(){var e=[],t=arguments.length;while(t--)e[t]=arguments[t];var i,r,s,n=this;if(!n.eventsListeners)return n;"string"===typeof e[0]||Array.isArray(e[0])?(i=e[0],r=e.slice(1,e.length),s=n):(i=e[0].events,r=e[0].data,s=e[0].context||n);var a=Array.isArray(i)?i:i.split(" ");return a.forEach((function(e){if(n.eventsListeners&&n.eventsListeners[e]){var t=[];n.eventsListeners[e].forEach((function(e){t.push(e)})),t.forEach((function(e){e.apply(s,r)}))}})),n},K.prototype.useModulesParams=function(e){var t=this;t.modules&&Object.keys(t.modules).forEach((function(i){var r=t.modules[i];r.params&&X.extend(e,r.params)}))},K.prototype.useModules=function(e){void 0===e&&(e={});var t=this;t.modules&&Object.keys(t.modules).forEach((function(i){var r=t.modules[i],s=e[i]||{};r.instance&&Object.keys(r.instance).forEach((function(e){var i=r.instance[e];t[e]="function"===typeof i?i.bind(t):i})),r.on&&t.on&&Object.keys(r.on).forEach((function(e){t.on(e,r.on[e])})),r.create&&r.create.bind(t)(s)}))},J.components.set=function(e){var t=this;t.use&&t.use(e)},K.installModule=function(e){var t=[],i=arguments.length-1;while(i-- >0)t[i]=arguments[i+1];var r=this;r.prototype.modules||(r.prototype.modules={});var s=e.name||Object.keys(r.prototype.modules).length+"_"+X.now();return r.prototype.modules[s]=e,e.proto&&Object.keys(e.proto).forEach((function(t){r.prototype[t]=e.proto[t]})),e.static&&Object.keys(e.static).forEach((function(t){r[t]=e.static[t]})),e.install&&e.install.apply(r,t),r},K.use=function(e){var t=[],i=arguments.length-1;while(i-- >0)t[i]=arguments[i+1];var r=this;return Array.isArray(e)?(e.forEach((function(e){return r.installModule(e)})),r):r.installModule.apply(r,[e].concat(t))},Object.defineProperties(K,J);var oe={updateSize:Q,updateSlides:Z,updateAutoHeight:ee,updateSlidesOffset:te,updateSlidesProgress:ie,updateProgress:re,updateSlidesClasses:se,updateActiveIndex:ne,updateClickedSlide:ae};function le(e){void 0===e&&(e=this.isHorizontal()?"x":"y");var t=this,i=t.params,r=t.rtlTranslate,s=t.translate,n=t.$wrapperEl;if(i.virtualTranslate)return r?-s:s;if(i.cssMode)return s;var a=X.getTranslate(n[0],e);return r&&(a=-a),a||0}function de(e,t){var i,r=this,s=r.rtlTranslate,n=r.params,a=r.$wrapperEl,o=r.wrapperEl,l=r.progress,d=0,u=0,c=0;r.isHorizontal()?d=s?-e:e:u=e,n.roundLengths&&(d=Math.floor(d),u=Math.floor(u)),n.cssMode?o[r.isHorizontal()?"scrollLeft":"scrollTop"]=r.isHorizontal()?-d:-u:n.virtualTranslate||a.transform("translate3d("+d+"px, "+u+"px, "+c+"px)"),r.previousTranslate=r.translate,r.translate=r.isHorizontal()?d:u;var h=r.maxTranslate()-r.minTranslate();i=0===h?0:(e-r.minTranslate())/h,i!==l&&r.updateProgress(e),r.emit("setTranslate",r.translate,t)}function ue(){return-this.snapGrid[0]}function ce(){return-this.snapGrid[this.snapGrid.length-1]}function he(e,t,i,r,s){var n;void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===i&&(i=!0),void 0===r&&(r=!0);var a=this,o=a.params,l=a.wrapperEl;if(a.animating&&o.preventInteractionOnTransition)return!1;var d,u=a.minTranslate(),c=a.maxTranslate();if(d=r&&e>u?u:r&&e<c?c:e,a.updateProgress(d),o.cssMode){var h=a.isHorizontal();return 0===t?l[h?"scrollLeft":"scrollTop"]=-d:l.scrollTo?l.scrollTo((n={},n[h?"left":"top"]=-d,n.behavior="smooth",n)):l[h?"scrollLeft":"scrollTop"]=-d,!0}return 0===t?(a.setTransition(0),a.setTranslate(d),i&&(a.emit("beforeTransitionStart",t,s),a.emit("transitionEnd"))):(a.setTransition(t),a.setTranslate(d),i&&(a.emit("beforeTransitionStart",t,s),a.emit("transitionStart")),a.animating||(a.animating=!0,a.onTranslateToWrapperTransitionEnd||(a.onTranslateToWrapperTransitionEnd=function(e){a&&!a.destroyed&&e.target===this&&(a.$wrapperEl[0].removeEventListener("transitionend",a.onTranslateToWrapperTransitionEnd),a.$wrapperEl[0].removeEventListener("webkitTransitionEnd",a.onTranslateToWrapperTransitionEnd),a.onTranslateToWrapperTransitionEnd=null,delete a.onTranslateToWrapperTransitionEnd,i&&a.emit("transitionEnd"))}),a.$wrapperEl[0].addEventListener("transitionend",a.onTranslateToWrapperTransitionEnd),a.$wrapperEl[0].addEventListener("webkitTransitionEnd",a.onTranslateToWrapperTransitionEnd))),!0}var pe={getTranslate:le,setTranslate:de,minTranslate:ue,maxTranslate:ce,translateTo:he};function fe(e,t){var i=this;i.params.cssMode||i.$wrapperEl.transition(e),i.emit("setTransition",e,t)}function me(e,t){void 0===e&&(e=!0);var i=this,r=i.activeIndex,s=i.params,n=i.previousIndex;if(!s.cssMode){s.autoHeight&&i.updateAutoHeight();var a=t;if(a||(a=r>n?"next":r<n?"prev":"reset"),i.emit("transitionStart"),e&&r!==n){if("reset"===a)return void i.emit("slideResetTransitionStart");i.emit("slideChangeTransitionStart"),"next"===a?i.emit("slideNextTransitionStart"):i.emit("slidePrevTransitionStart")}}}function ge(e,t){void 0===e&&(e=!0);var i=this,r=i.activeIndex,s=i.previousIndex,n=i.params;if(i.animating=!1,!n.cssMode){i.setTransition(0);var a=t;if(a||(a=r>s?"next":r<s?"prev":"reset"),i.emit("transitionEnd"),e&&r!==s){if("reset"===a)return void i.emit("slideResetTransitionEnd");i.emit("slideChangeTransitionEnd"),"next"===a?i.emit("slideNextTransitionEnd"):i.emit("slidePrevTransitionEnd")}}}var ye={setTransition:fe,transitionStart:me,transitionEnd:ge};function ve(e,t,i,r){var s;void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===i&&(i=!0);var n=this,a=e;a<0&&(a=0);var o=n.params,l=n.snapGrid,d=n.slidesGrid,u=n.previousIndex,c=n.activeIndex,h=n.rtlTranslate,p=n.wrapperEl;if(n.animating&&o.preventInteractionOnTransition)return!1;var f=Math.min(n.params.slidesPerGroupSkip,a),m=f+Math.floor((a-f)/n.params.slidesPerGroup);m>=l.length&&(m=l.length-1),(c||o.initialSlide||0)===(u||0)&&i&&n.emit("beforeSlideChangeStart");var g,y=-l[m];if(n.updateProgress(y),o.normalizeSlideIndex)for(var v=0;v<d.length;v+=1)-Math.floor(100*y)>=Math.floor(100*d[v])&&(a=v);if(n.initialized&&a!==c){if(!n.allowSlideNext&&y<n.translate&&y<n.minTranslate())return!1;if(!n.allowSlidePrev&&y>n.translate&&y>n.maxTranslate()&&(c||0)!==a)return!1}if(g=a>c?"next":a<c?"prev":"reset",h&&-y===n.translate||!h&&y===n.translate)return n.updateActiveIndex(a),o.autoHeight&&n.updateAutoHeight(),n.updateSlidesClasses(),"slide"!==o.effect&&n.setTranslate(y),"reset"!==g&&(n.transitionStart(i,g),n.transitionEnd(i,g)),!1;if(o.cssMode){var b=n.isHorizontal(),_=-y;return h&&(_=p.scrollWidth-p.offsetWidth-_),0===t?p[b?"scrollLeft":"scrollTop"]=_:p.scrollTo?p.scrollTo((s={},s[b?"left":"top"]=_,s.behavior="smooth",s)):p[b?"scrollLeft":"scrollTop"]=_,!0}return 0===t?(n.setTransition(0),n.setTranslate(y),n.updateActiveIndex(a),n.updateSlidesClasses(),n.emit("beforeTransitionStart",t,r),n.transitionStart(i,g),n.transitionEnd(i,g)):(n.setTransition(t),n.setTranslate(y),n.updateActiveIndex(a),n.updateSlidesClasses(),n.emit("beforeTransitionStart",t,r),n.transitionStart(i,g),n.animating||(n.animating=!0,n.onSlideToWrapperTransitionEnd||(n.onSlideToWrapperTransitionEnd=function(e){n&&!n.destroyed&&e.target===this&&(n.$wrapperEl[0].removeEventListener("transitionend",n.onSlideToWrapperTransitionEnd),n.$wrapperEl[0].removeEventListener("webkitTransitionEnd",n.onSlideToWrapperTransitionEnd),n.onSlideToWrapperTransitionEnd=null,delete n.onSlideToWrapperTransitionEnd,n.transitionEnd(i,g))}),n.$wrapperEl[0].addEventListener("transitionend",n.onSlideToWrapperTransitionEnd),n.$wrapperEl[0].addEventListener("webkitTransitionEnd",n.onSlideToWrapperTransitionEnd))),!0}function be(e,t,i,r){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===i&&(i=!0);var s=this,n=e;return s.params.loop&&(n+=s.loopedSlides),s.slideTo(n,t,i,r)}function _e(e,t,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var r=this,s=r.params,n=r.animating,a=r.activeIndex<s.slidesPerGroupSkip?1:s.slidesPerGroup;if(s.loop){if(n)return!1;r.loopFix(),r._clientLeft=r.$wrapperEl[0].clientLeft}return r.slideTo(r.activeIndex+a,e,t,i)}function Te(e,t,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var r=this,s=r.params,n=r.animating,a=r.snapGrid,o=r.slidesGrid,l=r.rtlTranslate;if(s.loop){if(n)return!1;r.loopFix(),r._clientLeft=r.$wrapperEl[0].clientLeft}var d=l?r.translate:-r.translate;function u(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}var c,h=u(d),p=a.map((function(e){return u(e)})),f=(o.map((function(e){return u(e)})),a[p.indexOf(h)],a[p.indexOf(h)-1]);return"undefined"===typeof f&&s.cssMode&&a.forEach((function(e){!f&&h>=e&&(f=e)})),"undefined"!==typeof f&&(c=o.indexOf(f),c<0&&(c=r.activeIndex-1)),r.slideTo(c,e,t,i)}function Se(e,t,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var r=this;return r.slideTo(r.activeIndex,e,t,i)}function we(e,t,i,r){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),void 0===r&&(r=.5);var s=this,n=s.activeIndex,a=Math.min(s.params.slidesPerGroupSkip,n),o=a+Math.floor((n-a)/s.params.slidesPerGroup),l=s.rtlTranslate?s.translate:-s.translate;if(l>=s.snapGrid[o]){var d=s.snapGrid[o],u=s.snapGrid[o+1];l-d>(u-d)*r&&(n+=s.params.slidesPerGroup)}else{var c=s.snapGrid[o-1],h=s.snapGrid[o];l-c<=(h-c)*r&&(n-=s.params.slidesPerGroup)}return n=Math.max(n,0),n=Math.min(n,s.slidesGrid.length-1),s.slideTo(n,e,t,i)}function Ee(){var e,t=this,i=t.params,r=t.$wrapperEl,s="auto"===i.slidesPerView?t.slidesPerViewDynamic():i.slidesPerView,n=t.clickedIndex;if(i.loop){if(t.animating)return;e=parseInt(o(t.clickedSlide).attr("data-swiper-slide-index"),10),i.centeredSlides?n<t.loopedSlides-s/2||n>t.slides.length-t.loopedSlides+s/2?(t.loopFix(),n=r.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),X.nextTick((function(){t.slideTo(n)}))):t.slideTo(n):n>t.slides.length-s?(t.loopFix(),n=r.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),X.nextTick((function(){t.slideTo(n)}))):t.slideTo(n)}else t.slideTo(n)}var Ce={slideTo:ve,slideToLoop:be,slideNext:_e,slidePrev:Te,slideReset:Se,slideToClosest:we,slideToClickedSlide:Ee};function xe(){var e=this,t=e.params,r=e.$wrapperEl;r.children("."+t.slideClass+"."+t.slideDuplicateClass).remove();var s=r.children("."+t.slideClass);if(t.loopFillGroupWithBlank){var n=t.slidesPerGroup-s.length%t.slidesPerGroup;if(n!==t.slidesPerGroup){for(var a=0;a<n;a+=1){var l=o(i.createElement("div")).addClass(t.slideClass+" "+t.slideBlankClass);r.append(l)}s=r.children("."+t.slideClass)}}"auto"!==t.slidesPerView||t.loopedSlides||(t.loopedSlides=s.length),e.loopedSlides=Math.ceil(parseFloat(t.loopedSlides||t.slidesPerView,10)),e.loopedSlides+=t.loopAdditionalSlides,e.loopedSlides>s.length&&(e.loopedSlides=s.length);var d=[],u=[];s.each((function(t,i){var r=o(i);t<e.loopedSlides&&u.push(i),t<s.length&&t>=s.length-e.loopedSlides&&d.push(i),r.attr("data-swiper-slide-index",t)}));for(var c=0;c<u.length;c+=1)r.append(o(u[c].cloneNode(!0)).addClass(t.slideDuplicateClass));for(var h=d.length-1;h>=0;h-=1)r.prepend(o(d[h].cloneNode(!0)).addClass(t.slideDuplicateClass))}function ke(){var e=this;e.emit("beforeLoopFix");var t,i=e.activeIndex,r=e.slides,s=e.loopedSlides,n=e.allowSlidePrev,a=e.allowSlideNext,o=e.snapGrid,l=e.rtlTranslate;e.allowSlidePrev=!0,e.allowSlideNext=!0;var d=-o[i],u=d-e.getTranslate();if(i<s){t=r.length-3*s+i,t+=s;var c=e.slideTo(t,0,!1,!0);c&&0!==u&&e.setTranslate((l?-e.translate:e.translate)-u)}else if(i>=r.length-s){t=-r.length+i+s,t+=s;var h=e.slideTo(t,0,!1,!0);h&&0!==u&&e.setTranslate((l?-e.translate:e.translate)-u)}e.allowSlidePrev=n,e.allowSlideNext=a,e.emit("loopFix")}function Ie(){var e=this,t=e.$wrapperEl,i=e.params,r=e.slides;t.children("."+i.slideClass+"."+i.slideDuplicateClass+",."+i.slideClass+"."+i.slideBlankClass).remove(),r.removeAttr("data-swiper-slide-index")}var Ae={loopCreate:xe,loopFix:ke,loopDestroy:Ie};function Oe(e){var t=this;if(!(Y.touch||!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)){var i=t.el;i.style.cursor="move",i.style.cursor=e?"-webkit-grabbing":"-webkit-grab",i.style.cursor=e?"-moz-grabbin":"-moz-grab",i.style.cursor=e?"grabbing":"grab"}}function Pe(){var e=this;Y.touch||e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.el.style.cursor="")}var Le={setGrabCursor:Oe,unsetGrabCursor:Pe};function De(e){var t=this,i=t.$wrapperEl,r=t.params;if(r.loop&&t.loopDestroy(),"object"===typeof e&&"length"in e)for(var s=0;s<e.length;s+=1)e[s]&&i.append(e[s]);else i.append(e);r.loop&&t.loopCreate(),r.observer&&Y.observer||t.update()}function Me(e){var t=this,i=t.params,r=t.$wrapperEl,s=t.activeIndex;i.loop&&t.loopDestroy();var n=s+1;if("object"===typeof e&&"length"in e){for(var a=0;a<e.length;a+=1)e[a]&&r.prepend(e[a]);n=s+e.length}else r.prepend(e);i.loop&&t.loopCreate(),i.observer&&Y.observer||t.update(),t.slideTo(n,0,!1)}function Ne(e,t){var i=this,r=i.$wrapperEl,s=i.params,n=i.activeIndex,a=n;s.loop&&(a-=i.loopedSlides,i.loopDestroy(),i.slides=r.children("."+s.slideClass));var o=i.slides.length;if(e<=0)i.prependSlide(t);else if(e>=o)i.appendSlide(t);else{for(var l=a>e?a+1:a,d=[],u=o-1;u>=e;u-=1){var c=i.slides.eq(u);c.remove(),d.unshift(c)}if("object"===typeof t&&"length"in t){for(var h=0;h<t.length;h+=1)t[h]&&r.append(t[h]);l=a>e?a+t.length:a}else r.append(t);for(var p=0;p<d.length;p+=1)r.append(d[p]);s.loop&&i.loopCreate(),s.observer&&Y.observer||i.update(),s.loop?i.slideTo(l+i.loopedSlides,0,!1):i.slideTo(l,0,!1)}}function Re(e){var t=this,i=t.params,r=t.$wrapperEl,s=t.activeIndex,n=s;i.loop&&(n-=t.loopedSlides,t.loopDestroy(),t.slides=r.children("."+i.slideClass));var a,o=n;if("object"===typeof e&&"length"in e){for(var l=0;l<e.length;l+=1)a=e[l],t.slides[a]&&t.slides.eq(a).remove(),a<o&&(o-=1);o=Math.max(o,0)}else a=e,t.slides[a]&&t.slides.eq(a).remove(),a<o&&(o-=1),o=Math.max(o,0);i.loop&&t.loopCreate(),i.observer&&Y.observer||t.update(),i.loop?t.slideTo(o+t.loopedSlides,0,!1):t.slideTo(o,0,!1)}function Ue(){for(var e=this,t=[],i=0;i<e.slides.length;i+=1)t.push(i);e.removeSlide(t)}var Be={appendSlide:De,prependSlide:Me,addSlide:Ne,removeSlide:Re,removeAllSlides:Ue},je=function(){var e=s.navigator.platform,t=s.navigator.userAgent,i={ios:!1,android:!1,androidChrome:!1,desktop:!1,iphone:!1,ipod:!1,ipad:!1,edge:!1,ie:!1,firefox:!1,macos:!1,windows:!1,cordova:!(!s.cordova&&!s.phonegap),phonegap:!(!s.cordova&&!s.phonegap),electron:!1},r=s.screen.width,n=s.screen.height,a=t.match(/(Android);?[\s\/]+([\d.]+)?/),o=t.match(/(iPad).*OS\s([\d_]+)/),l=t.match(/(iPod)(.*OS\s([\d_]+))?/),d=!o&&t.match(/(iPhone\sOS|iOS)\s([\d_]+)/),u=t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0,c=t.indexOf("Edge/")>=0,h=t.indexOf("Gecko/")>=0&&t.indexOf("Firefox/")>=0,p="Win32"===e,f=t.toLowerCase().indexOf("electron")>=0,m="MacIntel"===e;return!o&&m&&Y.touch&&(1024===r&&1366===n||834===r&&1194===n||834===r&&1112===n||768===r&&1024===n)&&(o=t.match(/(Version)\/([\d.]+)/),m=!1),i.ie=u,i.edge=c,i.firefox=h,a&&!p&&(i.os="android",i.osVersion=a[2],i.android=!0,i.androidChrome=t.toLowerCase().indexOf("chrome")>=0),(o||d||l)&&(i.os="ios",i.ios=!0),d&&!l&&(i.osVersion=d[2].replace(/_/g,"."),i.iphone=!0),o&&(i.osVersion=o[2].replace(/_/g,"."),i.ipad=!0),l&&(i.osVersion=l[3]?l[3].replace(/_/g,"."):null,i.ipod=!0),i.ios&&i.osVersion&&t.indexOf("Version/")>=0&&"10"===i.osVersion.split(".")[0]&&(i.osVersion=t.toLowerCase().split("version/")[1].split(" ")[0]),i.webView=!(!(d||o||l)||!t.match(/.*AppleWebKit(?!.*Safari)/i)&&!s.navigator.standalone)||s.matchMedia&&s.matchMedia("(display-mode: standalone)").matches,i.webview=i.webView,i.standalone=i.webView,i.desktop=!(i.ios||i.android)||f,i.desktop&&(i.electron=f,i.macos=m,i.windows=p,i.macos&&(i.os="macos"),i.windows&&(i.os="windows")),i.pixelRatio=s.devicePixelRatio||1,i}();function Fe(e){var t=this,r=t.touchEventsData,n=t.params,a=t.touches;if(!t.animating||!n.preventInteractionOnTransition){var l=e;l.originalEvent&&(l=l.originalEvent);var d=o(l.target);if(("wrapper"!==n.touchEventsTarget||d.closest(t.wrapperEl).length)&&(r.isTouchEvent="touchstart"===l.type,(r.isTouchEvent||!("which"in l)||3!==l.which)&&!(!r.isTouchEvent&&"button"in l&&l.button>0)&&(!r.isTouched||!r.isMoved)))if(n.noSwiping&&d.closest(n.noSwipingSelector?n.noSwipingSelector:"."+n.noSwipingClass)[0])t.allowClick=!0;else if(!n.swipeHandler||d.closest(n.swipeHandler)[0]){a.currentX="touchstart"===l.type?l.targetTouches[0].pageX:l.pageX,a.currentY="touchstart"===l.type?l.targetTouches[0].pageY:l.pageY;var u=a.currentX,c=a.currentY,h=n.edgeSwipeDetection||n.iOSEdgeSwipeDetection,p=n.edgeSwipeThreshold||n.iOSEdgeSwipeThreshold;if(!h||!(u<=p||u>=s.screen.width-p)){if(X.extend(r,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),a.startX=u,a.startY=c,r.touchStartTime=X.now(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,n.threshold>0&&(r.allowThresholdMove=!1),"touchstart"!==l.type){var f=!0;d.is(r.formElements)&&(f=!1),i.activeElement&&o(i.activeElement).is(r.formElements)&&i.activeElement!==d[0]&&i.activeElement.blur();var m=f&&t.allowTouchMove&&n.touchStartPreventDefault;(n.touchStartForcePreventDefault||m)&&l.preventDefault()}t.emit("touchStart",l)}}}}function qe(e){var t=this,r=t.touchEventsData,s=t.params,n=t.touches,a=t.rtlTranslate,l=e;if(l.originalEvent&&(l=l.originalEvent),r.isTouched){if(!r.isTouchEvent||"touchmove"===l.type){var d="touchmove"===l.type&&l.targetTouches&&(l.targetTouches[0]||l.changedTouches[0]),u="touchmove"===l.type?d.pageX:l.pageX,c="touchmove"===l.type?d.pageY:l.pageY;if(l.preventedByNestedSwiper)return n.startX=u,void(n.startY=c);if(!t.allowTouchMove)return t.allowClick=!1,void(r.isTouched&&(X.extend(n,{startX:u,startY:c,currentX:u,currentY:c}),r.touchStartTime=X.now()));if(r.isTouchEvent&&s.touchReleaseOnEdges&&!s.loop)if(t.isVertical()){if(c<n.startY&&t.translate<=t.maxTranslate()||c>n.startY&&t.translate>=t.minTranslate())return r.isTouched=!1,void(r.isMoved=!1)}else if(u<n.startX&&t.translate<=t.maxTranslate()||u>n.startX&&t.translate>=t.minTranslate())return;if(r.isTouchEvent&&i.activeElement&&l.target===i.activeElement&&o(l.target).is(r.formElements))return r.isMoved=!0,void(t.allowClick=!1);if(r.allowTouchCallbacks&&t.emit("touchMove",l),!(l.targetTouches&&l.targetTouches.length>1)){n.currentX=u,n.currentY=c;var h=n.currentX-n.startX,p=n.currentY-n.startY;if(!(t.params.threshold&&Math.sqrt(Math.pow(h,2)+Math.pow(p,2))<t.params.threshold)){var f;if("undefined"===typeof r.isScrolling)t.isHorizontal()&&n.currentY===n.startY||t.isVertical()&&n.currentX===n.startX?r.isScrolling=!1:h*h+p*p>=25&&(f=180*Math.atan2(Math.abs(p),Math.abs(h))/Math.PI,r.isScrolling=t.isHorizontal()?f>s.touchAngle:90-f>s.touchAngle);if(r.isScrolling&&t.emit("touchMoveOpposite",l),"undefined"===typeof r.startMoving&&(n.currentX===n.startX&&n.currentY===n.startY||(r.startMoving=!0)),r.isScrolling)r.isTouched=!1;else if(r.startMoving){t.allowClick=!1,!s.cssMode&&l.cancelable&&l.preventDefault(),s.touchMoveStopPropagation&&!s.nested&&l.stopPropagation(),r.isMoved||(s.loop&&t.loopFix(),r.startTranslate=t.getTranslate(),t.setTransition(0),t.animating&&t.$wrapperEl.trigger("webkitTransitionEnd transitionend"),r.allowMomentumBounce=!1,!s.grabCursor||!0!==t.allowSlideNext&&!0!==t.allowSlidePrev||t.setGrabCursor(!0),t.emit("sliderFirstMove",l)),t.emit("sliderMove",l),r.isMoved=!0;var m=t.isHorizontal()?h:p;n.diff=m,m*=s.touchRatio,a&&(m=-m),t.swipeDirection=m>0?"prev":"next",r.currentTranslate=m+r.startTranslate;var g=!0,y=s.resistanceRatio;if(s.touchReleaseOnEdges&&(y=0),m>0&&r.currentTranslate>t.minTranslate()?(g=!1,s.resistance&&(r.currentTranslate=t.minTranslate()-1+Math.pow(-t.minTranslate()+r.startTranslate+m,y))):m<0&&r.currentTranslate<t.maxTranslate()&&(g=!1,s.resistance&&(r.currentTranslate=t.maxTranslate()+1-Math.pow(t.maxTranslate()-r.startTranslate-m,y))),g&&(l.preventedByNestedSwiper=!0),!t.allowSlideNext&&"next"===t.swipeDirection&&r.currentTranslate<r.startTranslate&&(r.currentTranslate=r.startTranslate),!t.allowSlidePrev&&"prev"===t.swipeDirection&&r.currentTranslate>r.startTranslate&&(r.currentTranslate=r.startTranslate),s.threshold>0){if(!(Math.abs(m)>s.threshold||r.allowThresholdMove))return void(r.currentTranslate=r.startTranslate);if(!r.allowThresholdMove)return r.allowThresholdMove=!0,n.startX=n.currentX,n.startY=n.currentY,r.currentTranslate=r.startTranslate,void(n.diff=t.isHorizontal()?n.currentX-n.startX:n.currentY-n.startY)}s.followFinger&&!s.cssMode&&((s.freeMode||s.watchSlidesProgress||s.watchSlidesVisibility)&&(t.updateActiveIndex(),t.updateSlidesClasses()),s.freeMode&&(0===r.velocities.length&&r.velocities.push({position:n[t.isHorizontal()?"startX":"startY"],time:r.touchStartTime}),r.velocities.push({position:n[t.isHorizontal()?"currentX":"currentY"],time:X.now()})),t.updateProgress(r.currentTranslate),t.setTranslate(r.currentTranslate))}}}}}else r.startMoving&&r.isScrolling&&t.emit("touchMoveOpposite",l)}function $e(e){var t=this,i=t.touchEventsData,r=t.params,s=t.touches,n=t.rtlTranslate,a=t.$wrapperEl,o=t.slidesGrid,l=t.snapGrid,d=e;if(d.originalEvent&&(d=d.originalEvent),i.allowTouchCallbacks&&t.emit("touchEnd",d),i.allowTouchCallbacks=!1,!i.isTouched)return i.isMoved&&r.grabCursor&&t.setGrabCursor(!1),i.isMoved=!1,void(i.startMoving=!1);r.grabCursor&&i.isMoved&&i.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);var u,c=X.now(),h=c-i.touchStartTime;if(t.allowClick&&(t.updateClickedSlide(d),t.emit("tap click",d),h<300&&c-i.lastClickTime<300&&t.emit("doubleTap doubleClick",d)),i.lastClickTime=X.now(),X.nextTick((function(){t.destroyed||(t.allowClick=!0)})),!i.isTouched||!i.isMoved||!t.swipeDirection||0===s.diff||i.currentTranslate===i.startTranslate)return i.isTouched=!1,i.isMoved=!1,void(i.startMoving=!1);if(i.isTouched=!1,i.isMoved=!1,i.startMoving=!1,u=r.followFinger?n?t.translate:-t.translate:-i.currentTranslate,!r.cssMode)if(r.freeMode){if(u<-t.minTranslate())return void t.slideTo(t.activeIndex);if(u>-t.maxTranslate())return void(t.slides.length<l.length?t.slideTo(l.length-1):t.slideTo(t.slides.length-1));if(r.freeModeMomentum){if(i.velocities.length>1){var p=i.velocities.pop(),f=i.velocities.pop(),m=p.position-f.position,g=p.time-f.time;t.velocity=m/g,t.velocity/=2,Math.abs(t.velocity)<r.freeModeMinimumVelocity&&(t.velocity=0),(g>150||X.now()-p.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=r.freeModeMomentumVelocityRatio,i.velocities.length=0;var y=1e3*r.freeModeMomentumRatio,v=t.velocity*y,b=t.translate+v;n&&(b=-b);var _,T,S=!1,w=20*Math.abs(t.velocity)*r.freeModeMomentumBounceRatio;if(b<t.maxTranslate())r.freeModeMomentumBounce?(b+t.maxTranslate()<-w&&(b=t.maxTranslate()-w),_=t.maxTranslate(),S=!0,i.allowMomentumBounce=!0):b=t.maxTranslate(),r.loop&&r.centeredSlides&&(T=!0);else if(b>t.minTranslate())r.freeModeMomentumBounce?(b-t.minTranslate()>w&&(b=t.minTranslate()+w),_=t.minTranslate(),S=!0,i.allowMomentumBounce=!0):b=t.minTranslate(),r.loop&&r.centeredSlides&&(T=!0);else if(r.freeModeSticky){for(var E,C=0;C<l.length;C+=1)if(l[C]>-b){E=C;break}b=Math.abs(l[E]-b)<Math.abs(l[E-1]-b)||"next"===t.swipeDirection?l[E]:l[E-1],b=-b}if(T&&t.once("transitionEnd",(function(){t.loopFix()})),0!==t.velocity){if(y=n?Math.abs((-b-t.translate)/t.velocity):Math.abs((b-t.translate)/t.velocity),r.freeModeSticky){var x=Math.abs((n?-b:b)-t.translate),k=t.slidesSizesGrid[t.activeIndex];y=x<k?r.speed:x<2*k?1.5*r.speed:2.5*r.speed}}else if(r.freeModeSticky)return void t.slideToClosest();r.freeModeMomentumBounce&&S?(t.updateProgress(_),t.setTransition(y),t.setTranslate(b),t.transitionStart(!0,t.swipeDirection),t.animating=!0,a.transitionEnd((function(){t&&!t.destroyed&&i.allowMomentumBounce&&(t.emit("momentumBounce"),t.setTransition(r.speed),setTimeout((function(){t.setTranslate(_),a.transitionEnd((function(){t&&!t.destroyed&&t.transitionEnd()}))}),0))}))):t.velocity?(t.updateProgress(b),t.setTransition(y),t.setTranslate(b),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,a.transitionEnd((function(){t&&!t.destroyed&&t.transitionEnd()})))):t.updateProgress(b),t.updateActiveIndex(),t.updateSlidesClasses()}else if(r.freeModeSticky)return void t.slideToClosest();(!r.freeModeMomentum||h>=r.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}else{for(var I=0,A=t.slidesSizesGrid[0],O=0;O<o.length;O+=O<r.slidesPerGroupSkip?1:r.slidesPerGroup){var P=O<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;"undefined"!==typeof o[O+P]?u>=o[O]&&u<o[O+P]&&(I=O,A=o[O+P]-o[O]):u>=o[O]&&(I=O,A=o[o.length-1]-o[o.length-2])}var L=(u-o[I])/A,D=I<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;if(h>r.longSwipesMs){if(!r.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(L>=r.longSwipesRatio?t.slideTo(I+D):t.slideTo(I)),"prev"===t.swipeDirection&&(L>1-r.longSwipesRatio?t.slideTo(I+D):t.slideTo(I))}else{if(!r.shortSwipes)return void t.slideTo(t.activeIndex);var M=t.navigation&&(d.target===t.navigation.nextEl||d.target===t.navigation.prevEl);M?d.target===t.navigation.nextEl?t.slideTo(I+D):t.slideTo(I):("next"===t.swipeDirection&&t.slideTo(I+D),"prev"===t.swipeDirection&&t.slideTo(I))}}}function He(){var e=this,t=e.params,i=e.el;if(!i||0!==i.offsetWidth){t.breakpoints&&e.setBreakpoint();var r=e.allowSlideNext,s=e.allowSlidePrev,n=e.snapGrid;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses(),("auto"===t.slidesPerView||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.run(),e.allowSlidePrev=s,e.allowSlideNext=r,e.params.watchOverflow&&n!==e.snapGrid&&e.checkOverflow()}}function ze(e){var t=this;t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}function Ve(){var e,t=this,i=t.wrapperEl,r=t.rtlTranslate;t.previousTranslate=t.translate,t.isHorizontal()?t.translate=r?i.scrollWidth-i.offsetWidth-i.scrollLeft:-i.scrollLeft:t.translate=-i.scrollTop,-0===t.translate&&(t.translate=0),t.updateActiveIndex(),t.updateSlidesClasses();var s=t.maxTranslate()-t.minTranslate();e=0===s?0:(t.translate-t.minTranslate())/s,e!==t.progress&&t.updateProgress(r?-t.translate:t.translate),t.emit("setTranslate",t.translate,!1)}var Ge=!1;function We(){}function Xe(){var e=this,t=e.params,r=e.touchEvents,s=e.el,n=e.wrapperEl;e.onTouchStart=Fe.bind(e),e.onTouchMove=qe.bind(e),e.onTouchEnd=$e.bind(e),t.cssMode&&(e.onScroll=Ve.bind(e)),e.onClick=ze.bind(e);var a=!!t.nested;if(!Y.touch&&Y.pointerEvents)s.addEventListener(r.start,e.onTouchStart,!1),i.addEventListener(r.move,e.onTouchMove,a),i.addEventListener(r.end,e.onTouchEnd,!1);else{if(Y.touch){var o=!("touchstart"!==r.start||!Y.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};s.addEventListener(r.start,e.onTouchStart,o),s.addEventListener(r.move,e.onTouchMove,Y.passiveListener?{passive:!1,capture:a}:a),s.addEventListener(r.end,e.onTouchEnd,o),r.cancel&&s.addEventListener(r.cancel,e.onTouchEnd,o),Ge||(i.addEventListener("touchstart",We),Ge=!0)}(t.simulateTouch&&!je.ios&&!je.android||t.simulateTouch&&!Y.touch&&je.ios)&&(s.addEventListener("mousedown",e.onTouchStart,!1),i.addEventListener("mousemove",e.onTouchMove,a),i.addEventListener("mouseup",e.onTouchEnd,!1))}(t.preventClicks||t.preventClicksPropagation)&&s.addEventListener("click",e.onClick,!0),t.cssMode&&n.addEventListener("scroll",e.onScroll),t.updateOnWindowResize?e.on(je.ios||je.android?"resize orientationchange observerUpdate":"resize observerUpdate",He,!0):e.on("observerUpdate",He,!0)}function Ye(){var e=this,t=e.params,r=e.touchEvents,s=e.el,n=e.wrapperEl,a=!!t.nested;if(!Y.touch&&Y.pointerEvents)s.removeEventListener(r.start,e.onTouchStart,!1),i.removeEventListener(r.move,e.onTouchMove,a),i.removeEventListener(r.end,e.onTouchEnd,!1);else{if(Y.touch){var o=!("onTouchStart"!==r.start||!Y.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};s.removeEventListener(r.start,e.onTouchStart,o),s.removeEventListener(r.move,e.onTouchMove,a),s.removeEventListener(r.end,e.onTouchEnd,o),r.cancel&&s.removeEventListener(r.cancel,e.onTouchEnd,o)}(t.simulateTouch&&!je.ios&&!je.android||t.simulateTouch&&!Y.touch&&je.ios)&&(s.removeEventListener("mousedown",e.onTouchStart,!1),i.removeEventListener("mousemove",e.onTouchMove,a),i.removeEventListener("mouseup",e.onTouchEnd,!1))}(t.preventClicks||t.preventClicksPropagation)&&s.removeEventListener("click",e.onClick,!0),t.cssMode&&n.removeEventListener("scroll",e.onScroll),e.off(je.ios||je.android?"resize orientationchange observerUpdate":"resize observerUpdate",He)}var Ke={attachEvents:Xe,detachEvents:Ye};function Je(){var e=this,t=e.activeIndex,i=e.initialized,r=e.loopedSlides;void 0===r&&(r=0);var s=e.params,n=e.$el,a=s.breakpoints;if(a&&(!a||0!==Object.keys(a).length)){var o=e.getBreakpoint(a);if(o&&e.currentBreakpoint!==o){var l=o in a?a[o]:void 0;l&&["slidesPerView","spaceBetween","slidesPerGroup","slidesPerGroupSkip","slidesPerColumn"].forEach((function(e){var t=l[e];"undefined"!==typeof t&&(l[e]="slidesPerView"!==e||"AUTO"!==t&&"auto"!==t?"slidesPerView"===e?parseFloat(t):parseInt(t,10):"auto")}));var d=l||e.originalParams,u=s.slidesPerColumn>1,c=d.slidesPerColumn>1;u&&!c?n.removeClass(s.containerModifierClass+"multirow "+s.containerModifierClass+"multirow-column"):!u&&c&&(n.addClass(s.containerModifierClass+"multirow"),"column"===d.slidesPerColumnFill&&n.addClass(s.containerModifierClass+"multirow-column"));var h=d.direction&&d.direction!==s.direction,p=s.loop&&(d.slidesPerView!==s.slidesPerView||h);h&&i&&e.changeDirection(),X.extend(e.params,d),X.extend(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),e.currentBreakpoint=o,p&&i&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-r+e.loopedSlides,0,!1)),e.emit("breakpoint",d)}}}function Qe(e){if(e){var t=!1,i=Object.keys(e).map((function(e){if("string"===typeof e&&0===e.indexOf("@")){var t=parseFloat(e.substr(1)),i=s.innerHeight*t;return{value:i,point:e}}return{value:e,point:e}}));i.sort((function(e,t){return parseInt(e.value,10)-parseInt(t.value,10)}));for(var r=0;r<i.length;r+=1){var n=i[r],a=n.point,o=n.value;o<=s.innerWidth&&(t=a)}return t||"max"}}var Ze={setBreakpoint:Je,getBreakpoint:Qe};function et(){var e=this,t=e.classNames,i=e.params,r=e.rtl,s=e.$el,n=[];n.push("initialized"),n.push(i.direction),i.freeMode&&n.push("free-mode"),i.autoHeight&&n.push("autoheight"),r&&n.push("rtl"),i.slidesPerColumn>1&&(n.push("multirow"),"column"===i.slidesPerColumnFill&&n.push("multirow-column")),je.android&&n.push("android"),je.ios&&n.push("ios"),i.cssMode&&n.push("css-mode"),n.forEach((function(e){t.push(i.containerModifierClass+e)})),s.addClass(t.join(" "))}function tt(){var e=this,t=e.$el,i=e.classNames;t.removeClass(i.join(" "))}var it={addClasses:et,removeClasses:tt};function rt(e,t,i,r,n,a){var l;function d(){a&&a()}var u=o(e).parent("picture")[0];u||e.complete&&n?d():t?(l=new s.Image,l.onload=d,l.onerror=d,r&&(l.sizes=r),i&&(l.srcset=i),t&&(l.src=t)):d()}function st(){var e=this;function t(){"undefined"!==typeof e&&null!==e&&e&&!e.destroyed&&(void 0!==e.imagesLoaded&&(e.imagesLoaded+=1),e.imagesLoaded===e.imagesToLoad.length&&(e.params.updateOnImagesReady&&e.update(),e.emit("imagesReady")))}e.imagesToLoad=e.$el.find("img");for(var i=0;i<e.imagesToLoad.length;i+=1){var r=e.imagesToLoad[i];e.loadImage(r,r.currentSrc||r.getAttribute("src"),r.srcset||r.getAttribute("srcset"),r.sizes||r.getAttribute("sizes"),!0,t)}}var nt={loadImage:rt,preloadImages:st};function at(){var e=this,t=e.params,i=e.isLocked,r=e.slides.length>0&&t.slidesOffsetBefore+t.spaceBetween*(e.slides.length-1)+e.slides[0].offsetWidth*e.slides.length;t.slidesOffsetBefore&&t.slidesOffsetAfter&&r?e.isLocked=r<=e.size:e.isLocked=1===e.snapGrid.length,e.allowSlideNext=!e.isLocked,e.allowSlidePrev=!e.isLocked,i!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock"),i&&i!==e.isLocked&&(e.isEnd=!1,e.navigation&&e.navigation.update())}var ot={checkOverflow:at},lt={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,preventInteractionOnTransition:!1,edgeSwipeDetection:!1,edgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,slidesPerGroupSkip:0,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!1,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0},dt={update:oe,translate:pe,transition:ye,slide:Ce,loop:Ae,grabCursor:Le,manipulation:Be,events:Ke,breakpoints:Ze,checkOverflow:ot,classes:it,images:nt},ut={},ct=function(e){function t(){var i,r,s,n=[],a=arguments.length;while(a--)n[a]=arguments[a];1===n.length&&n[0].constructor&&n[0].constructor===Object?s=n[0]:(i=n,r=i[0],s=i[1]),s||(s={}),s=X.extend({},s),r&&!s.el&&(s.el=r),e.call(this,s),Object.keys(dt).forEach((function(e){Object.keys(dt[e]).forEach((function(i){t.prototype[i]||(t.prototype[i]=dt[e][i])}))}));var l=this;"undefined"===typeof l.modules&&(l.modules={}),Object.keys(l.modules).forEach((function(e){var t=l.modules[e];if(t.params){var i=Object.keys(t.params)[0],r=t.params[i];if("object"!==typeof r||null===r)return;if(!(i in s)||!("enabled"in r))return;!0===s[i]&&(s[i]={enabled:!0}),"object"!==typeof s[i]||"enabled"in s[i]||(s[i].enabled=!0),s[i]||(s[i]={enabled:!1})}}));var d=X.extend({},lt);l.useModulesParams(d),l.params=X.extend({},d,ut,s),l.originalParams=X.extend({},l.params),l.passedParams=X.extend({},s),l.$=o;var u=o(l.params.el);if(r=u[0],r){if(u.length>1){var c=[];return u.each((function(e,i){var r=X.extend({},s,{el:i});c.push(new t(r))})),c}var h;return r.swiper=l,u.data("swiper",l),r&&r.shadowRoot&&r.shadowRoot.querySelector?(h=o(r.shadowRoot.querySelector("."+l.params.wrapperClass)),h.children=function(e){return u.children(e)}):h=u.children("."+l.params.wrapperClass),X.extend(l,{$el:u,el:r,$wrapperEl:h,wrapperEl:h[0],classNames:[],slides:o(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function(){return"horizontal"===l.params.direction},isVertical:function(){return"vertical"===l.params.direction},rtl:"rtl"===r.dir.toLowerCase()||"rtl"===u.css("direction"),rtlTranslate:"horizontal"===l.params.direction&&("rtl"===r.dir.toLowerCase()||"rtl"===u.css("direction")),wrongRTL:"-webkit-box"===h.css("display"),activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:l.params.allowSlideNext,allowSlidePrev:l.params.allowSlidePrev,touchEvents:function(){var e=["touchstart","touchmove","touchend","touchcancel"],t=["mousedown","mousemove","mouseup"];return Y.pointerEvents&&(t=["pointerdown","pointermove","pointerup"]),l.touchEventsTouch={start:e[0],move:e[1],end:e[2],cancel:e[3]},l.touchEventsDesktop={start:t[0],move:t[1],end:t[2]},Y.touch||!l.params.simulateTouch?l.touchEventsTouch:l.touchEventsDesktop}(),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,formElements:"input, select, option, textarea, button, video, label",lastClickTime:X.now(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:l.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),l.useModules(),l.params.init&&l.init(),l}}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={extendedDefaults:{configurable:!0},defaults:{configurable:!0},Class:{configurable:!0},$:{configurable:!0}};return t.prototype.slidesPerViewDynamic=function(){var e=this,t=e.params,i=e.slides,r=e.slidesGrid,s=e.size,n=e.activeIndex,a=1;if(t.centeredSlides){for(var o,l=i[n].swiperSlideSize,d=n+1;d<i.length;d+=1)i[d]&&!o&&(l+=i[d].swiperSlideSize,a+=1,l>s&&(o=!0));for(var u=n-1;u>=0;u-=1)i[u]&&!o&&(l+=i[u].swiperSlideSize,a+=1,l>s&&(o=!0))}else for(var c=n+1;c<i.length;c+=1)r[c]-r[n]<s&&(a+=1);return a},t.prototype.update=function(){var e=this;if(e&&!e.destroyed){var t,i=e.snapGrid,r=e.params;r.breakpoints&&e.setBreakpoint(),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.params.freeMode?(s(),e.params.autoHeight&&e.updateAutoHeight()):(t=("auto"===e.params.slidesPerView||e.params.slidesPerView>1)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),t||s()),r.watchOverflow&&i!==e.snapGrid&&e.checkOverflow(),e.emit("update")}function s(){var t=e.rtlTranslate?-1*e.translate:e.translate,i=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(i),e.updateActiveIndex(),e.updateSlidesClasses()}},t.prototype.changeDirection=function(e,t){void 0===t&&(t=!0);var i=this,r=i.params.direction;return e||(e="horizontal"===r?"vertical":"horizontal"),e===r||"horizontal"!==e&&"vertical"!==e||(i.$el.removeClass(""+i.params.containerModifierClass+r).addClass(""+i.params.containerModifierClass+e),i.params.direction=e,i.slides.each((function(t,i){"vertical"===e?i.style.width="":i.style.height=""})),i.emit("changeDirection"),t&&i.update()),i},t.prototype.init=function(){var e=this;e.initialized||(e.emit("beforeInit"),e.params.breakpoints&&e.setBreakpoint(),e.addClasses(),e.params.loop&&e.loopCreate(),e.updateSize(),e.updateSlides(),e.params.watchOverflow&&e.checkOverflow(),e.params.grabCursor&&e.setGrabCursor(),e.params.preloadImages&&e.preloadImages(),e.params.loop?e.slideTo(e.params.initialSlide+e.loopedSlides,0,e.params.runCallbacksOnInit):e.slideTo(e.params.initialSlide,0,e.params.runCallbacksOnInit),e.attachEvents(),e.initialized=!0,e.emit("init"))},t.prototype.destroy=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);var i=this,r=i.params,s=i.$el,n=i.$wrapperEl,a=i.slides;return"undefined"===typeof i.params||i.destroyed||(i.emit("beforeDestroy"),i.initialized=!1,i.detachEvents(),r.loop&&i.loopDestroy(),t&&(i.removeClasses(),s.removeAttr("style"),n.removeAttr("style"),a&&a.length&&a.removeClass([r.slideVisibleClass,r.slideActiveClass,r.slideNextClass,r.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),i.emit("destroy"),Object.keys(i.eventsListeners).forEach((function(e){i.off(e)})),!1!==e&&(i.$el[0].swiper=null,i.$el.data("swiper",null),X.deleteProps(i)),i.destroyed=!0),null},t.extendDefaults=function(e){X.extend(ut,e)},i.extendedDefaults.get=function(){return ut},i.defaults.get=function(){return lt},i.Class.get=function(){return e},i.$.get=function(){return o},Object.defineProperties(t,i),t}(K),ht={name:"device",proto:{device:je},static:{device:je}},pt={name:"support",proto:{support:Y},static:{support:Y}},ft=function(){function e(){var e=s.navigator.userAgent.toLowerCase();return e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0}return{isEdge:!!s.navigator.userAgent.match(/Edge/g),isSafari:e(),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(s.navigator.userAgent)}}(),mt={name:"browser",proto:{browser:ft},static:{browser:ft}},gt={name:"resize",create:function(){var e=this;X.extend(e,{resize:{resizeHandler:function(){e&&!e.destroyed&&e.initialized&&(e.emit("beforeResize"),e.emit("resize"))},orientationChangeHandler:function(){e&&!e.destroyed&&e.initialized&&e.emit("orientationchange")}}})},on:{init:function(){var e=this;s.addEventListener("resize",e.resize.resizeHandler),s.addEventListener("orientationchange",e.resize.orientationChangeHandler)},destroy:function(){var e=this;s.removeEventListener("resize",e.resize.resizeHandler),s.removeEventListener("orientationchange",e.resize.orientationChangeHandler)}}},yt={func:s.MutationObserver||s.WebkitMutationObserver,attach:function(e,t){void 0===t&&(t={});var i=this,r=yt.func,n=new r((function(e){if(1!==e.length){var t=function(){i.emit("observerUpdate",e[0])};s.requestAnimationFrame?s.requestAnimationFrame(t):s.setTimeout(t,0)}else i.emit("observerUpdate",e[0])}));n.observe(e,{attributes:"undefined"===typeof t.attributes||t.attributes,childList:"undefined"===typeof t.childList||t.childList,characterData:"undefined"===typeof t.characterData||t.characterData}),i.observer.observers.push(n)},init:function(){var e=this;if(Y.observer&&e.params.observer){if(e.params.observeParents)for(var t=e.$el.parents(),i=0;i<t.length;i+=1)e.observer.attach(t[i]);e.observer.attach(e.$el[0],{childList:e.params.observeSlideChildren}),e.observer.attach(e.$wrapperEl[0],{attributes:!1})}},destroy:function(){var e=this;e.observer.observers.forEach((function(e){e.disconnect()})),e.observer.observers=[]}},vt={name:"observer",params:{observer:!1,observeParents:!1,observeSlideChildren:!1},create:function(){var e=this;X.extend(e,{observer:{init:yt.init.bind(e),attach:yt.attach.bind(e),destroy:yt.destroy.bind(e),observers:[]}})},on:{init:function(){var e=this;e.observer.init()},destroy:function(){var e=this;e.observer.destroy()}}},bt={update:function(e){var t=this,i=t.params,r=i.slidesPerView,s=i.slidesPerGroup,n=i.centeredSlides,a=t.params.virtual,o=a.addSlidesBefore,l=a.addSlidesAfter,d=t.virtual,u=d.from,c=d.to,h=d.slides,p=d.slidesGrid,f=d.renderSlide,m=d.offset;t.updateActiveIndex();var g,y,v,b=t.activeIndex||0;g=t.rtlTranslate?"right":t.isHorizontal()?"left":"top",n?(y=Math.floor(r/2)+s+o,v=Math.floor(r/2)+s+l):(y=r+(s-1)+o,v=s+l);var _=Math.max((b||0)-v,0),T=Math.min((b||0)+y,h.length-1),S=(t.slidesGrid[_]||0)-(t.slidesGrid[0]||0);function w(){t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.lazy&&t.params.lazy.enabled&&t.lazy.load()}if(X.extend(t.virtual,{from:_,to:T,offset:S,slidesGrid:t.slidesGrid}),u===_&&c===T&&!e)return t.slidesGrid!==p&&S!==m&&t.slides.css(g,S+"px"),void t.updateProgress();if(t.params.virtual.renderExternal)return t.params.virtual.renderExternal.call(t,{offset:S,from:_,to:T,slides:function(){for(var e=[],t=_;t<=T;t+=1)e.push(h[t]);return e}()}),void w();var E=[],C=[];if(e)t.$wrapperEl.find("."+t.params.slideClass).remove();else for(var x=u;x<=c;x+=1)(x<_||x>T)&&t.$wrapperEl.find("."+t.params.slideClass+'[data-swiper-slide-index="'+x+'"]').remove();for(var k=0;k<h.length;k+=1)k>=_&&k<=T&&("undefined"===typeof c||e?C.push(k):(k>c&&C.push(k),k<u&&E.push(k)));C.forEach((function(e){t.$wrapperEl.append(f(h[e],e))})),E.sort((function(e,t){return t-e})).forEach((function(e){t.$wrapperEl.prepend(f(h[e],e))})),t.$wrapperEl.children(".swiper-slide").css(g,S+"px"),w()},renderSlide:function(e,t){var i=this,r=i.params.virtual;if(r.cache&&i.virtual.cache[t])return i.virtual.cache[t];var s=r.renderSlide?o(r.renderSlide.call(i,e,t)):o('<div class="'+i.params.slideClass+'" data-swiper-slide-index="'+t+'">'+e+"</div>");return s.attr("data-swiper-slide-index")||s.attr("data-swiper-slide-index",t),r.cache&&(i.virtual.cache[t]=s),s},appendSlide:function(e){var t=this;if("object"===typeof e&&"length"in e)for(var i=0;i<e.length;i+=1)e[i]&&t.virtual.slides.push(e[i]);else t.virtual.slides.push(e);t.virtual.update(!0)},prependSlide:function(e){var t=this,i=t.activeIndex,r=i+1,s=1;if(Array.isArray(e)){for(var n=0;n<e.length;n+=1)e[n]&&t.virtual.slides.unshift(e[n]);r=i+e.length,s=e.length}else t.virtual.slides.unshift(e);if(t.params.virtual.cache){var a=t.virtual.cache,o={};Object.keys(a).forEach((function(e){var t=a[e],i=t.attr("data-swiper-slide-index");i&&t.attr("data-swiper-slide-index",parseInt(i,10)+1),o[parseInt(e,10)+s]=t})),t.virtual.cache=o}t.virtual.update(!0),t.slideTo(r,0)},removeSlide:function(e){var t=this;if("undefined"!==typeof e&&null!==e){var i=t.activeIndex;if(Array.isArray(e))for(var r=e.length-1;r>=0;r-=1)t.virtual.slides.splice(e[r],1),t.params.virtual.cache&&delete t.virtual.cache[e[r]],e[r]<i&&(i-=1),i=Math.max(i,0);else t.virtual.slides.splice(e,1),t.params.virtual.cache&&delete t.virtual.cache[e],e<i&&(i-=1),i=Math.max(i,0);t.virtual.update(!0),t.slideTo(i,0)}},removeAllSlides:function(){var e=this;e.virtual.slides=[],e.params.virtual.cache&&(e.virtual.cache={}),e.virtual.update(!0),e.slideTo(0,0)}},_t={name:"virtual",params:{virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,addSlidesBefore:0,addSlidesAfter:0}},create:function(){var e=this;X.extend(e,{virtual:{update:bt.update.bind(e),appendSlide:bt.appendSlide.bind(e),prependSlide:bt.prependSlide.bind(e),removeSlide:bt.removeSlide.bind(e),removeAllSlides:bt.removeAllSlides.bind(e),renderSlide:bt.renderSlide.bind(e),slides:e.params.virtual.slides,cache:{}}})},on:{beforeInit:function(){var e=this;if(e.params.virtual.enabled){e.classNames.push(e.params.containerModifierClass+"virtual");var t={watchSlidesProgress:!0};X.extend(e.params,t),X.extend(e.originalParams,t),e.params.initialSlide||e.virtual.update()}},setTranslate:function(){var e=this;e.params.virtual.enabled&&e.virtual.update()}}},Tt={handle:function(e){var t=this,r=t.rtlTranslate,n=e;n.originalEvent&&(n=n.originalEvent);var a=n.keyCode||n.charCode,o=t.params.keyboard.pageUpDown,l=o&&33===a,d=o&&34===a,u=37===a,c=39===a,h=38===a,p=40===a;if(!t.allowSlideNext&&(t.isHorizontal()&&c||t.isVertical()&&p||d))return!1;if(!t.allowSlidePrev&&(t.isHorizontal()&&u||t.isVertical()&&h||l))return!1;if(!(n.shiftKey||n.altKey||n.ctrlKey||n.metaKey)&&(!i.activeElement||!i.activeElement.nodeName||"input"!==i.activeElement.nodeName.toLowerCase()&&"textarea"!==i.activeElement.nodeName.toLowerCase())){if(t.params.keyboard.onlyInViewport&&(l||d||u||c||h||p)){var f=!1;if(t.$el.parents("."+t.params.slideClass).length>0&&0===t.$el.parents("."+t.params.slideActiveClass).length)return;var m=s.innerWidth,g=s.innerHeight,y=t.$el.offset();r&&(y.left-=t.$el[0].scrollLeft);for(var v=[[y.left,y.top],[y.left+t.width,y.top],[y.left,y.top+t.height],[y.left+t.width,y.top+t.height]],b=0;b<v.length;b+=1){var _=v[b];_[0]>=0&&_[0]<=m&&_[1]>=0&&_[1]<=g&&(f=!0)}if(!f)return}t.isHorizontal()?((l||d||u||c)&&(n.preventDefault?n.preventDefault():n.returnValue=!1),((d||c)&&!r||(l||u)&&r)&&t.slideNext(),((l||u)&&!r||(d||c)&&r)&&t.slidePrev()):((l||d||h||p)&&(n.preventDefault?n.preventDefault():n.returnValue=!1),(d||p)&&t.slideNext(),(l||h)&&t.slidePrev()),t.emit("keyPress",a)}},enable:function(){var e=this;e.keyboard.enabled||(o(i).on("keydown",e.keyboard.handle),e.keyboard.enabled=!0)},disable:function(){var e=this;e.keyboard.enabled&&(o(i).off("keydown",e.keyboard.handle),e.keyboard.enabled=!1)}},St={name:"keyboard",params:{keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}},create:function(){var e=this;X.extend(e,{keyboard:{enabled:!1,enable:Tt.enable.bind(e),disable:Tt.disable.bind(e),handle:Tt.handle.bind(e)}})},on:{init:function(){var e=this;e.params.keyboard.enabled&&e.keyboard.enable()},destroy:function(){var e=this;e.keyboard.enabled&&e.keyboard.disable()}}};function wt(){var e="onwheel",t=e in i;if(!t){var r=i.createElement("div");r.setAttribute(e,"return;"),t="function"===typeof r[e]}return!t&&i.implementation&&i.implementation.hasFeature&&!0!==i.implementation.hasFeature("","")&&(t=i.implementation.hasFeature("Events.wheel","3.0")),t}var Et={lastScrollTime:X.now(),lastEventBeforeSnap:void 0,recentWheelEvents:[],event:function(){return s.navigator.userAgent.indexOf("firefox")>-1?"DOMMouseScroll":wt()?"wheel":"mousewheel"},normalize:function(e){var t=10,i=40,r=800,s=0,n=0,a=0,o=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(s=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(s=n,n=0),a=s*t,o=n*t,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(a=e.deltaX),e.shiftKey&&!a&&(a=o,o=0),(a||o)&&e.deltaMode&&(1===e.deltaMode?(a*=i,o*=i):(a*=r,o*=r)),a&&!s&&(s=a<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:s,spinY:n,pixelX:a,pixelY:o}},handleMouseEnter:function(){var e=this;e.mouseEntered=!0},handleMouseLeave:function(){var e=this;e.mouseEntered=!1},handle:function(e){var t=e,i=this,r=i.params.mousewheel;i.params.cssMode&&t.preventDefault();var s=i.$el;if("container"!==i.params.mousewheel.eventsTarged&&(s=o(i.params.mousewheel.eventsTarged)),!i.mouseEntered&&!s[0].contains(t.target)&&!r.releaseOnEdges)return!0;t.originalEvent&&(t=t.originalEvent);var n=0,a=i.rtlTranslate?-1:1,l=Et.normalize(t);if(r.forceToAxis)if(i.isHorizontal()){if(!(Math.abs(l.pixelX)>Math.abs(l.pixelY)))return!0;n=-l.pixelX*a}else{if(!(Math.abs(l.pixelY)>Math.abs(l.pixelX)))return!0;n=-l.pixelY}else n=Math.abs(l.pixelX)>Math.abs(l.pixelY)?-l.pixelX*a:-l.pixelY;if(0===n)return!0;if(r.invert&&(n=-n),i.params.freeMode){var d={time:X.now(),delta:Math.abs(n),direction:Math.sign(n)},u=i.mousewheel,c=u.lastEventBeforeSnap,h=c&&d.time<c.time+500&&d.delta<=c.delta&&d.direction===c.direction;if(!h){i.mousewheel.lastEventBeforeSnap=void 0,i.params.loop&&i.loopFix();var p=i.getTranslate()+n*r.sensitivity,f=i.isBeginning,m=i.isEnd;if(p>=i.minTranslate()&&(p=i.minTranslate()),p<=i.maxTranslate()&&(p=i.maxTranslate()),i.setTransition(0),i.setTranslate(p),i.updateProgress(),i.updateActiveIndex(),i.updateSlidesClasses(),(!f&&i.isBeginning||!m&&i.isEnd)&&i.updateSlidesClasses(),i.params.freeModeSticky){clearTimeout(i.mousewheel.timeout),i.mousewheel.timeout=void 0;var g=i.mousewheel.recentWheelEvents;g.length>=15&&g.shift();var y=g.length?g[g.length-1]:void 0,v=g[0];if(g.push(d),y&&(d.delta>y.delta||d.direction!==y.direction))g.splice(0);else if(g.length>=15&&d.time-v.time<500&&v.delta-d.delta>=1&&d.delta<=6){var b=n>0?.8:.2;i.mousewheel.lastEventBeforeSnap=d,g.splice(0),i.mousewheel.timeout=X.nextTick((function(){i.slideToClosest(i.params.speed,!0,void 0,b)}),0)}i.mousewheel.timeout||(i.mousewheel.timeout=X.nextTick((function(){var e=.5;i.mousewheel.lastEventBeforeSnap=d,g.splice(0),i.slideToClosest(i.params.speed,!0,void 0,e)}),500))}if(h||i.emit("scroll",t),i.params.autoplay&&i.params.autoplayDisableOnInteraction&&i.autoplay.stop(),p===i.minTranslate()||p===i.maxTranslate())return!0}}else{var _={time:X.now(),delta:Math.abs(n),direction:Math.sign(n),raw:e},T=i.mousewheel.recentWheelEvents;T.length>=2&&T.shift();var S=T.length?T[T.length-1]:void 0;if(T.push(_),S?(_.direction!==S.direction||_.delta>S.delta||_.time>S.time+150)&&i.mousewheel.animateSlider(_):i.mousewheel.animateSlider(_),i.mousewheel.releaseScroll(_))return!0}return t.preventDefault?t.preventDefault():t.returnValue=!1,!1},animateSlider:function(e){var t=this;return e.delta>=6&&X.now()-t.mousewheel.lastScrollTime<60||(e.direction<0?t.isEnd&&!t.params.loop||t.animating||(t.slideNext(),t.emit("scroll",e.raw)):t.isBeginning&&!t.params.loop||t.animating||(t.slidePrev(),t.emit("scroll",e.raw)),t.mousewheel.lastScrollTime=(new s.Date).getTime(),!1)},releaseScroll:function(e){var t=this,i=t.params.mousewheel;if(e.direction<0){if(t.isEnd&&!t.params.loop&&i.releaseOnEdges)return!0}else if(t.isBeginning&&!t.params.loop&&i.releaseOnEdges)return!0;return!1},enable:function(){var e=this,t=Et.event();if(e.params.cssMode)return e.wrapperEl.removeEventListener(t,e.mousewheel.handle),!0;if(!t)return!1;if(e.mousewheel.enabled)return!1;var i=e.$el;return"container"!==e.params.mousewheel.eventsTarged&&(i=o(e.params.mousewheel.eventsTarged)),i.on("mouseenter",e.mousewheel.handleMouseEnter),i.on("mouseleave",e.mousewheel.handleMouseLeave),i.on(t,e.mousewheel.handle),e.mousewheel.enabled=!0,!0},disable:function(){var e=this,t=Et.event();if(e.params.cssMode)return e.wrapperEl.addEventListener(t,e.mousewheel.handle),!0;if(!t)return!1;if(!e.mousewheel.enabled)return!1;var i=e.$el;return"container"!==e.params.mousewheel.eventsTarged&&(i=o(e.params.mousewheel.eventsTarged)),i.off(t,e.mousewheel.handle),e.mousewheel.enabled=!1,!0}},Ct={name:"mousewheel",params:{mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarged:"container"}},create:function(){var e=this;X.extend(e,{mousewheel:{enabled:!1,enable:Et.enable.bind(e),disable:Et.disable.bind(e),handle:Et.handle.bind(e),handleMouseEnter:Et.handleMouseEnter.bind(e),handleMouseLeave:Et.handleMouseLeave.bind(e),animateSlider:Et.animateSlider.bind(e),releaseScroll:Et.releaseScroll.bind(e),lastScrollTime:X.now(),lastEventBeforeSnap:void 0,recentWheelEvents:[]}})},on:{init:function(){var e=this;!e.params.mousewheel.enabled&&e.params.cssMode&&e.mousewheel.disable(),e.params.mousewheel.enabled&&e.mousewheel.enable()},destroy:function(){var e=this;e.params.cssMode&&e.mousewheel.enable(),e.mousewheel.enabled&&e.mousewheel.disable()}}},xt={update:function(){var e=this,t=e.params.navigation;if(!e.params.loop){var i=e.navigation,r=i.$nextEl,s=i.$prevEl;s&&s.length>0&&(e.isBeginning?s.addClass(t.disabledClass):s.removeClass(t.disabledClass),s[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](t.lockClass)),r&&r.length>0&&(e.isEnd?r.addClass(t.disabledClass):r.removeClass(t.disabledClass),r[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](t.lockClass))}},onPrevClick:function(e){var t=this;e.preventDefault(),t.isBeginning&&!t.params.loop||t.slidePrev()},onNextClick:function(e){var t=this;e.preventDefault(),t.isEnd&&!t.params.loop||t.slideNext()},init:function(){var e,t,i=this,r=i.params.navigation;(r.nextEl||r.prevEl)&&(r.nextEl&&(e=o(r.nextEl),i.params.uniqueNavElements&&"string"===typeof r.nextEl&&e.length>1&&1===i.$el.find(r.nextEl).length&&(e=i.$el.find(r.nextEl))),r.prevEl&&(t=o(r.prevEl),i.params.uniqueNavElements&&"string"===typeof r.prevEl&&t.length>1&&1===i.$el.find(r.prevEl).length&&(t=i.$el.find(r.prevEl))),e&&e.length>0&&e.on("click",i.navigation.onNextClick),t&&t.length>0&&t.on("click",i.navigation.onPrevClick),X.extend(i.navigation,{$nextEl:e,nextEl:e&&e[0],$prevEl:t,prevEl:t&&t[0]}))},destroy:function(){var e=this,t=e.navigation,i=t.$nextEl,r=t.$prevEl;i&&i.length&&(i.off("click",e.navigation.onNextClick),i.removeClass(e.params.navigation.disabledClass)),r&&r.length&&(r.off("click",e.navigation.onPrevClick),r.removeClass(e.params.navigation.disabledClass))}},kt={name:"navigation",params:{navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock"}},create:function(){var e=this;X.extend(e,{navigation:{init:xt.init.bind(e),update:xt.update.bind(e),destroy:xt.destroy.bind(e),onNextClick:xt.onNextClick.bind(e),onPrevClick:xt.onPrevClick.bind(e)}})},on:{init:function(){var e=this;e.navigation.init(),e.navigation.update()},toEdge:function(){var e=this;e.navigation.update()},fromEdge:function(){var e=this;e.navigation.update()},destroy:function(){var e=this;e.navigation.destroy()},click:function(e){var t,i=this,r=i.navigation,s=r.$nextEl,n=r.$prevEl;!i.params.navigation.hideOnClick||o(e.target).is(n)||o(e.target).is(s)||(s?t=s.hasClass(i.params.navigation.hiddenClass):n&&(t=n.hasClass(i.params.navigation.hiddenClass)),!0===t?i.emit("navigationShow",i):i.emit("navigationHide",i),s&&s.toggleClass(i.params.navigation.hiddenClass),n&&n.toggleClass(i.params.navigation.hiddenClass))}}},It={update:function(){var e=this,t=e.rtl,i=e.params.pagination;if(i.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var r,s=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,n=e.pagination.$el,a=e.params.loop?Math.ceil((s-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(r=Math.ceil((e.activeIndex-e.loopedSlides)/e.params.slidesPerGroup),r>s-1-2*e.loopedSlides&&(r-=s-2*e.loopedSlides),r>a-1&&(r-=a),r<0&&"bullets"!==e.params.paginationType&&(r=a+r)):r="undefined"!==typeof e.snapIndex?e.snapIndex:e.activeIndex||0,"bullets"===i.type&&e.pagination.bullets&&e.pagination.bullets.length>0){var l,d,u,c=e.pagination.bullets;if(i.dynamicBullets&&(e.pagination.bulletSize=c.eq(0)[e.isHorizontal()?"outerWidth":"outerHeight"](!0),n.css(e.isHorizontal()?"width":"height",e.pagination.bulletSize*(i.dynamicMainBullets+4)+"px"),i.dynamicMainBullets>1&&void 0!==e.previousIndex&&(e.pagination.dynamicBulletIndex+=r-e.previousIndex,e.pagination.dynamicBulletIndex>i.dynamicMainBullets-1?e.pagination.dynamicBulletIndex=i.dynamicMainBullets-1:e.pagination.dynamicBulletIndex<0&&(e.pagination.dynamicBulletIndex=0)),l=r-e.pagination.dynamicBulletIndex,d=l+(Math.min(c.length,i.dynamicMainBullets)-1),u=(d+l)/2),c.removeClass(i.bulletActiveClass+" "+i.bulletActiveClass+"-next "+i.bulletActiveClass+"-next-next "+i.bulletActiveClass+"-prev "+i.bulletActiveClass+"-prev-prev "+i.bulletActiveClass+"-main"),n.length>1)c.each((function(e,t){var s=o(t),n=s.index();n===r&&s.addClass(i.bulletActiveClass),i.dynamicBullets&&(n>=l&&n<=d&&s.addClass(i.bulletActiveClass+"-main"),n===l&&s.prev().addClass(i.bulletActiveClass+"-prev").prev().addClass(i.bulletActiveClass+"-prev-prev"),n===d&&s.next().addClass(i.bulletActiveClass+"-next").next().addClass(i.bulletActiveClass+"-next-next"))}));else{var h=c.eq(r),p=h.index();if(h.addClass(i.bulletActiveClass),i.dynamicBullets){for(var f=c.eq(l),m=c.eq(d),g=l;g<=d;g+=1)c.eq(g).addClass(i.bulletActiveClass+"-main");if(e.params.loop)if(p>=c.length-i.dynamicMainBullets){for(var y=i.dynamicMainBullets;y>=0;y-=1)c.eq(c.length-y).addClass(i.bulletActiveClass+"-main");c.eq(c.length-i.dynamicMainBullets-1).addClass(i.bulletActiveClass+"-prev")}else f.prev().addClass(i.bulletActiveClass+"-prev").prev().addClass(i.bulletActiveClass+"-prev-prev"),m.next().addClass(i.bulletActiveClass+"-next").next().addClass(i.bulletActiveClass+"-next-next");else f.prev().addClass(i.bulletActiveClass+"-prev").prev().addClass(i.bulletActiveClass+"-prev-prev"),m.next().addClass(i.bulletActiveClass+"-next").next().addClass(i.bulletActiveClass+"-next-next")}}if(i.dynamicBullets){var v=Math.min(c.length,i.dynamicMainBullets+4),b=(e.pagination.bulletSize*v-e.pagination.bulletSize)/2-u*e.pagination.bulletSize,_=t?"right":"left";c.css(e.isHorizontal()?_:"top",b+"px")}}if("fraction"===i.type&&(n.find("."+i.currentClass).text(i.formatFractionCurrent(r+1)),n.find("."+i.totalClass).text(i.formatFractionTotal(a))),"progressbar"===i.type){var T;T=i.progressbarOpposite?e.isHorizontal()?"vertical":"horizontal":e.isHorizontal()?"horizontal":"vertical";var S=(r+1)/a,w=1,E=1;"horizontal"===T?w=S:E=S,n.find("."+i.progressbarFillClass).transform("translate3d(0,0,0) scaleX("+w+") scaleY("+E+")").transition(e.params.speed)}"custom"===i.type&&i.renderCustom?(n.html(i.renderCustom(e,r+1,a)),e.emit("paginationRender",e,n[0])):e.emit("paginationUpdate",e,n[0]),n[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](i.lockClass)}},render:function(){var e=this,t=e.params.pagination;if(t.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var i=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,r=e.pagination.$el,s="";if("bullets"===t.type){for(var n=e.params.loop?Math.ceil((i-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length,a=0;a<n;a+=1)t.renderBullet?s+=t.renderBullet.call(e,a,t.bulletClass):s+="<"+t.bulletElement+' class="'+t.bulletClass+'"></'+t.bulletElement+">";r.html(s),e.pagination.bullets=r.find("."+t.bulletClass)}"fraction"===t.type&&(s=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):'<span class="'+t.currentClass+'"></span> / <span class="'+t.totalClass+'"></span>',r.html(s)),"progressbar"===t.type&&(s=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):'<span class="'+t.progressbarFillClass+'"></span>',r.html(s)),"custom"!==t.type&&e.emit("paginationRender",e.pagination.$el[0])}},init:function(){var e=this,t=e.params.pagination;if(t.el){var i=o(t.el);0!==i.length&&(e.params.uniqueNavElements&&"string"===typeof t.el&&i.length>1&&(i=e.$el.find(t.el)),"bullets"===t.type&&t.clickable&&i.addClass(t.clickableClass),i.addClass(t.modifierClass+t.type),"bullets"===t.type&&t.dynamicBullets&&(i.addClass(""+t.modifierClass+t.type+"-dynamic"),e.pagination.dynamicBulletIndex=0,t.dynamicMainBullets<1&&(t.dynamicMainBullets=1)),"progressbar"===t.type&&t.progressbarOpposite&&i.addClass(t.progressbarOppositeClass),t.clickable&&i.on("click","."+t.bulletClass,(function(t){t.preventDefault();var i=o(this).index()*e.params.slidesPerGroup;e.params.loop&&(i+=e.loopedSlides),e.slideTo(i)})),X.extend(e.pagination,{$el:i,el:i[0]}))}},destroy:function(){var e=this,t=e.params.pagination;if(t.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var i=e.pagination.$el;i.removeClass(t.hiddenClass),i.removeClass(t.modifierClass+t.type),e.pagination.bullets&&e.pagination.bullets.removeClass(t.bulletActiveClass),t.clickable&&i.off("click","."+t.bulletClass)}}},At={name:"pagination",params:{pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:function(e){return e},formatFractionTotal:function(e){return e},bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",modifierClass:"swiper-pagination-",currentClass:"swiper-pagination-current",totalClass:"swiper-pagination-total",hiddenClass:"swiper-pagination-hidden",progressbarFillClass:"swiper-pagination-progressbar-fill",progressbarOppositeClass:"swiper-pagination-progressbar-opposite",clickableClass:"swiper-pagination-clickable",lockClass:"swiper-pagination-lock"}},create:function(){var e=this;X.extend(e,{pagination:{init:It.init.bind(e),render:It.render.bind(e),update:It.update.bind(e),destroy:It.destroy.bind(e),dynamicBulletIndex:0}})},on:{init:function(){var e=this;e.pagination.init(),e.pagination.render(),e.pagination.update()},activeIndexChange:function(){var e=this;(e.params.loop||"undefined"===typeof e.snapIndex)&&e.pagination.update()},snapIndexChange:function(){var e=this;e.params.loop||e.pagination.update()},slidesLengthChange:function(){var e=this;e.params.loop&&(e.pagination.render(),e.pagination.update())},snapGridLengthChange:function(){var e=this;e.params.loop||(e.pagination.render(),e.pagination.update())},destroy:function(){var e=this;e.pagination.destroy()},click:function(e){var t=this;if(t.params.pagination.el&&t.params.pagination.hideOnClick&&t.pagination.$el.length>0&&!o(e.target).hasClass(t.params.pagination.bulletClass)){var i=t.pagination.$el.hasClass(t.params.pagination.hiddenClass);!0===i?t.emit("paginationShow",t):t.emit("paginationHide",t),t.pagination.$el.toggleClass(t.params.pagination.hiddenClass)}}}},Ot={setTranslate:function(){var e=this;if(e.params.scrollbar.el&&e.scrollbar.el){var t=e.scrollbar,i=e.rtlTranslate,r=e.progress,s=t.dragSize,n=t.trackSize,a=t.$dragEl,o=t.$el,l=e.params.scrollbar,d=s,u=(n-s)*r;i?(u=-u,u>0?(d=s-u,u=0):-u+s>n&&(d=n+u)):u<0?(d=s+u,u=0):u+s>n&&(d=n-u),e.isHorizontal()?(a.transform("translate3d("+u+"px, 0, 0)"),a[0].style.width=d+"px"):(a.transform("translate3d(0px, "+u+"px, 0)"),a[0].style.height=d+"px"),l.hide&&(clearTimeout(e.scrollbar.timeout),o[0].style.opacity=1,e.scrollbar.timeout=setTimeout((function(){o[0].style.opacity=0,o.transition(400)}),1e3))}},setTransition:function(e){var t=this;t.params.scrollbar.el&&t.scrollbar.el&&t.scrollbar.$dragEl.transition(e)},updateSize:function(){var e=this;if(e.params.scrollbar.el&&e.scrollbar.el){var t=e.scrollbar,i=t.$dragEl,r=t.$el;i[0].style.width="",i[0].style.height="";var s,n=e.isHorizontal()?r[0].offsetWidth:r[0].offsetHeight,a=e.size/e.virtualSize,o=a*(n/e.size);s="auto"===e.params.scrollbar.dragSize?n*a:parseInt(e.params.scrollbar.dragSize,10),e.isHorizontal()?i[0].style.width=s+"px":i[0].style.height=s+"px",r[0].style.display=a>=1?"none":"",e.params.scrollbar.hide&&(r[0].style.opacity=0),X.extend(t,{trackSize:n,divider:a,moveDivider:o,dragSize:s}),t.$el[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](e.params.scrollbar.lockClass)}},getPointerPosition:function(e){var t=this;return t.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientX:e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientY:e.clientY},setDragPosition:function(e){var t,i=this,r=i.scrollbar,s=i.rtlTranslate,n=r.$el,a=r.dragSize,o=r.trackSize,l=r.dragStartPos;t=(r.getPointerPosition(e)-n.offset()[i.isHorizontal()?"left":"top"]-(null!==l?l:a/2))/(o-a),t=Math.max(Math.min(t,1),0),s&&(t=1-t);var d=i.minTranslate()+(i.maxTranslate()-i.minTranslate())*t;i.updateProgress(d),i.setTranslate(d),i.updateActiveIndex(),i.updateSlidesClasses()},onDragStart:function(e){var t=this,i=t.params.scrollbar,r=t.scrollbar,s=t.$wrapperEl,n=r.$el,a=r.$dragEl;t.scrollbar.isTouched=!0,t.scrollbar.dragStartPos=e.target===a[0]||e.target===a?r.getPointerPosition(e)-e.target.getBoundingClientRect()[t.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),s.transition(100),a.transition(100),r.setDragPosition(e),clearTimeout(t.scrollbar.dragTimeout),n.transition(0),i.hide&&n.css("opacity",1),t.params.cssMode&&t.$wrapperEl.css("scroll-snap-type","none"),t.emit("scrollbarDragStart",e)},onDragMove:function(e){var t=this,i=t.scrollbar,r=t.$wrapperEl,s=i.$el,n=i.$dragEl;t.scrollbar.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,i.setDragPosition(e),r.transition(0),s.transition(0),n.transition(0),t.emit("scrollbarDragMove",e))},onDragEnd:function(e){var t=this,i=t.params.scrollbar,r=t.scrollbar,s=t.$wrapperEl,n=r.$el;t.scrollbar.isTouched&&(t.scrollbar.isTouched=!1,t.params.cssMode&&(t.$wrapperEl.css("scroll-snap-type",""),s.transition("")),i.hide&&(clearTimeout(t.scrollbar.dragTimeout),t.scrollbar.dragTimeout=X.nextTick((function(){n.css("opacity",0),n.transition(400)}),1e3)),t.emit("scrollbarDragEnd",e),i.snapOnRelease&&t.slideToClosest())},enableDraggable:function(){var e=this;if(e.params.scrollbar.el){var t=e.scrollbar,r=e.touchEventsTouch,s=e.touchEventsDesktop,n=e.params,a=t.$el,o=a[0],l=!(!Y.passiveListener||!n.passiveListeners)&&{passive:!1,capture:!1},d=!(!Y.passiveListener||!n.passiveListeners)&&{passive:!0,capture:!1};Y.touch?(o.addEventListener(r.start,e.scrollbar.onDragStart,l),o.addEventListener(r.move,e.scrollbar.onDragMove,l),o.addEventListener(r.end,e.scrollbar.onDragEnd,d)):(o.addEventListener(s.start,e.scrollbar.onDragStart,l),i.addEventListener(s.move,e.scrollbar.onDragMove,l),i.addEventListener(s.end,e.scrollbar.onDragEnd,d))}},disableDraggable:function(){var e=this;if(e.params.scrollbar.el){var t=e.scrollbar,r=e.touchEventsTouch,s=e.touchEventsDesktop,n=e.params,a=t.$el,o=a[0],l=!(!Y.passiveListener||!n.passiveListeners)&&{passive:!1,capture:!1},d=!(!Y.passiveListener||!n.passiveListeners)&&{passive:!0,capture:!1};Y.touch?(o.removeEventListener(r.start,e.scrollbar.onDragStart,l),o.removeEventListener(r.move,e.scrollbar.onDragMove,l),o.removeEventListener(r.end,e.scrollbar.onDragEnd,d)):(o.removeEventListener(s.start,e.scrollbar.onDragStart,l),i.removeEventListener(s.move,e.scrollbar.onDragMove,l),i.removeEventListener(s.end,e.scrollbar.onDragEnd,d))}},init:function(){var e=this;if(e.params.scrollbar.el){var t=e.scrollbar,i=e.$el,r=e.params.scrollbar,s=o(r.el);e.params.uniqueNavElements&&"string"===typeof r.el&&s.length>1&&1===i.find(r.el).length&&(s=i.find(r.el));var n=s.find("."+e.params.scrollbar.dragClass);0===n.length&&(n=o('<div class="'+e.params.scrollbar.dragClass+'"></div>'),s.append(n)),X.extend(t,{$el:s,el:s[0],$dragEl:n,dragEl:n[0]}),r.draggable&&t.enableDraggable()}},destroy:function(){var e=this;e.scrollbar.disableDraggable()}},Pt={name:"scrollbar",params:{scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag"}},create:function(){var e=this;X.extend(e,{scrollbar:{init:Ot.init.bind(e),destroy:Ot.destroy.bind(e),updateSize:Ot.updateSize.bind(e),setTranslate:Ot.setTranslate.bind(e),setTransition:Ot.setTransition.bind(e),enableDraggable:Ot.enableDraggable.bind(e),disableDraggable:Ot.disableDraggable.bind(e),setDragPosition:Ot.setDragPosition.bind(e),getPointerPosition:Ot.getPointerPosition.bind(e),onDragStart:Ot.onDragStart.bind(e),onDragMove:Ot.onDragMove.bind(e),onDragEnd:Ot.onDragEnd.bind(e),isTouched:!1,timeout:null,dragTimeout:null}})},on:{init:function(){var e=this;e.scrollbar.init(),e.scrollbar.updateSize(),e.scrollbar.setTranslate()},update:function(){var e=this;e.scrollbar.updateSize()},resize:function(){var e=this;e.scrollbar.updateSize()},observerUpdate:function(){var e=this;e.scrollbar.updateSize()},setTranslate:function(){var e=this;e.scrollbar.setTranslate()},setTransition:function(e){var t=this;t.scrollbar.setTransition(e)},destroy:function(){var e=this;e.scrollbar.destroy()}}},Lt={setTransform:function(e,t){var i=this,r=i.rtl,s=o(e),n=r?-1:1,a=s.attr("data-swiper-parallax")||"0",l=s.attr("data-swiper-parallax-x"),d=s.attr("data-swiper-parallax-y"),u=s.attr("data-swiper-parallax-scale"),c=s.attr("data-swiper-parallax-opacity");if(l||d?(l=l||"0",d=d||"0"):i.isHorizontal()?(l=a,d="0"):(d=a,l="0"),l=l.indexOf("%")>=0?parseInt(l,10)*t*n+"%":l*t*n+"px",d=d.indexOf("%")>=0?parseInt(d,10)*t+"%":d*t+"px","undefined"!==typeof c&&null!==c){var h=c-(c-1)*(1-Math.abs(t));s[0].style.opacity=h}if("undefined"===typeof u||null===u)s.transform("translate3d("+l+", "+d+", 0px)");else{var p=u-(u-1)*(1-Math.abs(t));s.transform("translate3d("+l+", "+d+", 0px) scale("+p+")")}},setTranslate:function(){var e=this,t=e.$el,i=e.slides,r=e.progress,s=e.snapGrid;t.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t,i){e.parallax.setTransform(i,r)})),i.each((function(t,i){var n=i.progress;e.params.slidesPerGroup>1&&"auto"!==e.params.slidesPerView&&(n+=Math.ceil(t/2)-r*(s.length-1)),n=Math.min(Math.max(n,-1),1),o(i).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t,i){e.parallax.setTransform(i,n)}))}))},setTransition:function(e){void 0===e&&(e=this.params.speed);var t=this,i=t.$el;i.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t,i){var r=o(i),s=parseInt(r.attr("data-swiper-parallax-duration"),10)||e;0===e&&(s=0),r.transition(s)}))}},Dt={name:"parallax",params:{parallax:{enabled:!1}},create:function(){var e=this;X.extend(e,{parallax:{setTransform:Lt.setTransform.bind(e),setTranslate:Lt.setTranslate.bind(e),setTransition:Lt.setTransition.bind(e)}})},on:{beforeInit:function(){var e=this;e.params.parallax.enabled&&(e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)},init:function(){var e=this;e.params.parallax.enabled&&e.parallax.setTranslate()},setTranslate:function(){var e=this;e.params.parallax.enabled&&e.parallax.setTranslate()},setTransition:function(e){var t=this;t.params.parallax.enabled&&t.parallax.setTransition(e)}}},Mt={getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var t=e.targetTouches[0].pageX,i=e.targetTouches[0].pageY,r=e.targetTouches[1].pageX,s=e.targetTouches[1].pageY,n=Math.sqrt(Math.pow(r-t,2)+Math.pow(s-i,2));return n},onGestureStart:function(e){var t=this,i=t.params.zoom,r=t.zoom,s=r.gesture;if(r.fakeGestureTouched=!1,r.fakeGestureMoved=!1,!Y.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;r.fakeGestureTouched=!0,s.scaleStart=Mt.getDistanceBetweenTouches(e)}s.$slideEl&&s.$slideEl.length||(s.$slideEl=o(e.target).closest("."+t.params.slideClass),0===s.$slideEl.length&&(s.$slideEl=t.slides.eq(t.activeIndex)),s.$imageEl=s.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),s.$imageWrapEl=s.$imageEl.parent("."+i.containerClass),s.maxRatio=s.$imageWrapEl.attr("data-swiper-zoom")||i.maxRatio,0!==s.$imageWrapEl.length)?(s.$imageEl&&s.$imageEl.transition(0),t.zoom.isScaling=!0):s.$imageEl=void 0},onGestureChange:function(e){var t=this,i=t.params.zoom,r=t.zoom,s=r.gesture;if(!Y.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;r.fakeGestureMoved=!0,s.scaleMove=Mt.getDistanceBetweenTouches(e)}s.$imageEl&&0!==s.$imageEl.length&&(Y.gestures?r.scale=e.scale*r.currentScale:r.scale=s.scaleMove/s.scaleStart*r.currentScale,r.scale>s.maxRatio&&(r.scale=s.maxRatio-1+Math.pow(r.scale-s.maxRatio+1,.5)),r.scale<i.minRatio&&(r.scale=i.minRatio+1-Math.pow(i.minRatio-r.scale+1,.5)),s.$imageEl.transform("translate3d(0,0,0) scale("+r.scale+")"))},onGestureEnd:function(e){var t=this,i=t.params.zoom,r=t.zoom,s=r.gesture;if(!Y.gestures){if(!r.fakeGestureTouched||!r.fakeGestureMoved)return;if("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2&&!je.android)return;r.fakeGestureTouched=!1,r.fakeGestureMoved=!1}s.$imageEl&&0!==s.$imageEl.length&&(r.scale=Math.max(Math.min(r.scale,s.maxRatio),i.minRatio),s.$imageEl.transition(t.params.speed).transform("translate3d(0,0,0) scale("+r.scale+")"),r.currentScale=r.scale,r.isScaling=!1,1===r.scale&&(s.$slideEl=void 0))},onTouchStart:function(e){var t=this,i=t.zoom,r=i.gesture,s=i.image;r.$imageEl&&0!==r.$imageEl.length&&(s.isTouched||(je.android&&e.cancelable&&e.preventDefault(),s.isTouched=!0,s.touchesStart.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,s.touchesStart.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY))},onTouchMove:function(e){var t=this,i=t.zoom,r=i.gesture,s=i.image,n=i.velocity;if(r.$imageEl&&0!==r.$imageEl.length&&(t.allowClick=!1,s.isTouched&&r.$slideEl)){s.isMoved||(s.width=r.$imageEl[0].offsetWidth,s.height=r.$imageEl[0].offsetHeight,s.startX=X.getTranslate(r.$imageWrapEl[0],"x")||0,s.startY=X.getTranslate(r.$imageWrapEl[0],"y")||0,r.slideWidth=r.$slideEl[0].offsetWidth,r.slideHeight=r.$slideEl[0].offsetHeight,r.$imageWrapEl.transition(0),t.rtl&&(s.startX=-s.startX,s.startY=-s.startY));var a=s.width*i.scale,o=s.height*i.scale;if(!(a<r.slideWidth&&o<r.slideHeight)){if(s.minX=Math.min(r.slideWidth/2-a/2,0),s.maxX=-s.minX,s.minY=Math.min(r.slideHeight/2-o/2,0),s.maxY=-s.minY,s.touchesCurrent.x="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,s.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!s.isMoved&&!i.isScaling){if(t.isHorizontal()&&(Math.floor(s.minX)===Math.floor(s.startX)&&s.touchesCurrent.x<s.touchesStart.x||Math.floor(s.maxX)===Math.floor(s.startX)&&s.touchesCurrent.x>s.touchesStart.x))return void(s.isTouched=!1);if(!t.isHorizontal()&&(Math.floor(s.minY)===Math.floor(s.startY)&&s.touchesCurrent.y<s.touchesStart.y||Math.floor(s.maxY)===Math.floor(s.startY)&&s.touchesCurrent.y>s.touchesStart.y))return void(s.isTouched=!1)}e.cancelable&&e.preventDefault(),e.stopPropagation(),s.isMoved=!0,s.currentX=s.touchesCurrent.x-s.touchesStart.x+s.startX,s.currentY=s.touchesCurrent.y-s.touchesStart.y+s.startY,s.currentX<s.minX&&(s.currentX=s.minX+1-Math.pow(s.minX-s.currentX+1,.8)),s.currentX>s.maxX&&(s.currentX=s.maxX-1+Math.pow(s.currentX-s.maxX+1,.8)),s.currentY<s.minY&&(s.currentY=s.minY+1-Math.pow(s.minY-s.currentY+1,.8)),s.currentY>s.maxY&&(s.currentY=s.maxY-1+Math.pow(s.currentY-s.maxY+1,.8)),n.prevPositionX||(n.prevPositionX=s.touchesCurrent.x),n.prevPositionY||(n.prevPositionY=s.touchesCurrent.y),n.prevTime||(n.prevTime=Date.now()),n.x=(s.touchesCurrent.x-n.prevPositionX)/(Date.now()-n.prevTime)/2,n.y=(s.touchesCurrent.y-n.prevPositionY)/(Date.now()-n.prevTime)/2,Math.abs(s.touchesCurrent.x-n.prevPositionX)<2&&(n.x=0),Math.abs(s.touchesCurrent.y-n.prevPositionY)<2&&(n.y=0),n.prevPositionX=s.touchesCurrent.x,n.prevPositionY=s.touchesCurrent.y,n.prevTime=Date.now(),r.$imageWrapEl.transform("translate3d("+s.currentX+"px, "+s.currentY+"px,0)")}}},onTouchEnd:function(){var e=this,t=e.zoom,i=t.gesture,r=t.image,s=t.velocity;if(i.$imageEl&&0!==i.$imageEl.length){if(!r.isTouched||!r.isMoved)return r.isTouched=!1,void(r.isMoved=!1);r.isTouched=!1,r.isMoved=!1;var n=300,a=300,o=s.x*n,l=r.currentX+o,d=s.y*a,u=r.currentY+d;0!==s.x&&(n=Math.abs((l-r.currentX)/s.x)),0!==s.y&&(a=Math.abs((u-r.currentY)/s.y));var c=Math.max(n,a);r.currentX=l,r.currentY=u;var h=r.width*t.scale,p=r.height*t.scale;r.minX=Math.min(i.slideWidth/2-h/2,0),r.maxX=-r.minX,r.minY=Math.min(i.slideHeight/2-p/2,0),r.maxY=-r.minY,r.currentX=Math.max(Math.min(r.currentX,r.maxX),r.minX),r.currentY=Math.max(Math.min(r.currentY,r.maxY),r.minY),i.$imageWrapEl.transition(c).transform("translate3d("+r.currentX+"px, "+r.currentY+"px,0)")}},onTransitionEnd:function(){var e=this,t=e.zoom,i=t.gesture;i.$slideEl&&e.previousIndex!==e.activeIndex&&(i.$imageEl&&i.$imageEl.transform("translate3d(0,0,0) scale(1)"),i.$imageWrapEl&&i.$imageWrapEl.transform("translate3d(0,0,0)"),t.scale=1,t.currentScale=1,i.$slideEl=void 0,i.$imageEl=void 0,i.$imageWrapEl=void 0)},toggle:function(e){var t=this,i=t.zoom;i.scale&&1!==i.scale?i.out():i.in(e)},in:function(e){var t,i,r,s,n,a,o,l,d,u,c,h,p,f,m,g,y,v,b=this,_=b.zoom,T=b.params.zoom,S=_.gesture,w=_.image;(S.$slideEl||(b.params.virtual&&b.params.virtual.enabled&&b.virtual?S.$slideEl=b.$wrapperEl.children("."+b.params.slideActiveClass):S.$slideEl=b.slides.eq(b.activeIndex),S.$imageEl=S.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),S.$imageWrapEl=S.$imageEl.parent("."+T.containerClass)),S.$imageEl&&0!==S.$imageEl.length)&&(S.$slideEl.addClass(""+T.zoomedSlideClass),"undefined"===typeof w.touchesStart.x&&e?(t="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,i="touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(t=w.touchesStart.x,i=w.touchesStart.y),_.scale=S.$imageWrapEl.attr("data-swiper-zoom")||T.maxRatio,_.currentScale=S.$imageWrapEl.attr("data-swiper-zoom")||T.maxRatio,e?(y=S.$slideEl[0].offsetWidth,v=S.$slideEl[0].offsetHeight,r=S.$slideEl.offset().left,s=S.$slideEl.offset().top,n=r+y/2-t,a=s+v/2-i,d=S.$imageEl[0].offsetWidth,u=S.$imageEl[0].offsetHeight,c=d*_.scale,h=u*_.scale,p=Math.min(y/2-c/2,0),f=Math.min(v/2-h/2,0),m=-p,g=-f,o=n*_.scale,l=a*_.scale,o<p&&(o=p),o>m&&(o=m),l<f&&(l=f),l>g&&(l=g)):(o=0,l=0),S.$imageWrapEl.transition(300).transform("translate3d("+o+"px, "+l+"px,0)"),S.$imageEl.transition(300).transform("translate3d(0,0,0) scale("+_.scale+")"))},out:function(){var e=this,t=e.zoom,i=e.params.zoom,r=t.gesture;r.$slideEl||(e.params.virtual&&e.params.virtual.enabled&&e.virtual?r.$slideEl=e.$wrapperEl.children("."+e.params.slideActiveClass):r.$slideEl=e.slides.eq(e.activeIndex),r.$imageEl=r.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),r.$imageWrapEl=r.$imageEl.parent("."+i.containerClass)),r.$imageEl&&0!==r.$imageEl.length&&(t.scale=1,t.currentScale=1,r.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),r.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"),r.$slideEl.removeClass(""+i.zoomedSlideClass),r.$slideEl=void 0)},enable:function(){var e=this,t=e.zoom;if(!t.enabled){t.enabled=!0;var i=!("touchstart"!==e.touchEvents.start||!Y.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1},r=!Y.passiveListener||{passive:!1,capture:!0},s="."+e.params.slideClass;Y.gestures?(e.$wrapperEl.on("gesturestart",s,t.onGestureStart,i),e.$wrapperEl.on("gesturechange",s,t.onGestureChange,i),e.$wrapperEl.on("gestureend",s,t.onGestureEnd,i)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.on(e.touchEvents.start,s,t.onGestureStart,i),e.$wrapperEl.on(e.touchEvents.move,s,t.onGestureChange,r),e.$wrapperEl.on(e.touchEvents.end,s,t.onGestureEnd,i),e.touchEvents.cancel&&e.$wrapperEl.on(e.touchEvents.cancel,s,t.onGestureEnd,i)),e.$wrapperEl.on(e.touchEvents.move,"."+e.params.zoom.containerClass,t.onTouchMove,r)}},disable:function(){var e=this,t=e.zoom;if(t.enabled){e.zoom.enabled=!1;var i=!("touchstart"!==e.touchEvents.start||!Y.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1},r=!Y.passiveListener||{passive:!1,capture:!0},s="."+e.params.slideClass;Y.gestures?(e.$wrapperEl.off("gesturestart",s,t.onGestureStart,i),e.$wrapperEl.off("gesturechange",s,t.onGestureChange,i),e.$wrapperEl.off("gestureend",s,t.onGestureEnd,i)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.off(e.touchEvents.start,s,t.onGestureStart,i),e.$wrapperEl.off(e.touchEvents.move,s,t.onGestureChange,r),e.$wrapperEl.off(e.touchEvents.end,s,t.onGestureEnd,i),e.touchEvents.cancel&&e.$wrapperEl.off(e.touchEvents.cancel,s,t.onGestureEnd,i)),e.$wrapperEl.off(e.touchEvents.move,"."+e.params.zoom.containerClass,t.onTouchMove,r)}}},Nt={name:"zoom",params:{zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}},create:function(){var e=this,t={enabled:!1,scale:1,currentScale:1,isScaling:!1,gesture:{$slideEl:void 0,slideWidth:void 0,slideHeight:void 0,$imageEl:void 0,$imageWrapEl:void 0,maxRatio:3},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0}};"onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out".split(" ").forEach((function(i){t[i]=Mt[i].bind(e)})),X.extend(e,{zoom:t});var i=1;Object.defineProperty(e.zoom,"scale",{get:function(){return i},set:function(t){if(i!==t){var r=e.zoom.gesture.$imageEl?e.zoom.gesture.$imageEl[0]:void 0,s=e.zoom.gesture.$slideEl?e.zoom.gesture.$slideEl[0]:void 0;e.emit("zoomChange",t,r,s)}i=t}})},on:{init:function(){var e=this;e.params.zoom.enabled&&e.zoom.enable()},destroy:function(){var e=this;e.zoom.disable()},touchStart:function(e){var t=this;t.zoom.enabled&&t.zoom.onTouchStart(e)},touchEnd:function(e){var t=this;t.zoom.enabled&&t.zoom.onTouchEnd(e)},doubleTap:function(e){var t=this;t.params.zoom.enabled&&t.zoom.enabled&&t.params.zoom.toggle&&t.zoom.toggle(e)},transitionEnd:function(){var e=this;e.zoom.enabled&&e.params.zoom.enabled&&e.zoom.onTransitionEnd()},slideChange:function(){var e=this;e.zoom.enabled&&e.params.zoom.enabled&&e.params.cssMode&&e.zoom.onTransitionEnd()}}},Rt={loadInSlide:function(e,t){void 0===t&&(t=!0);var i=this,r=i.params.lazy;if("undefined"!==typeof e&&0!==i.slides.length){var s=i.virtual&&i.params.virtual.enabled,n=s?i.$wrapperEl.children("."+i.params.slideClass+'[data-swiper-slide-index="'+e+'"]'):i.slides.eq(e),a=n.find("."+r.elementClass+":not(."+r.loadedClass+"):not(."+r.loadingClass+")");!n.hasClass(r.elementClass)||n.hasClass(r.loadedClass)||n.hasClass(r.loadingClass)||(a=a.add(n[0])),0!==a.length&&a.each((function(e,s){var a=o(s);a.addClass(r.loadingClass);var l=a.attr("data-background"),d=a.attr("data-src"),u=a.attr("data-srcset"),c=a.attr("data-sizes"),h=a.parent("picture");i.loadImage(a[0],d||l,u,c,!1,(function(){if("undefined"!==typeof i&&null!==i&&i&&(!i||i.params)&&!i.destroyed){if(l?(a.css("background-image",'url("'+l+'")'),a.removeAttr("data-background")):(u&&(a.attr("srcset",u),a.removeAttr("data-srcset")),c&&(a.attr("sizes",c),a.removeAttr("data-sizes")),h.length&&h.children("source").each((function(e,t){var i=o(t);i.attr("data-srcset")&&(i.attr("srcset",i.attr("data-srcset")),i.removeAttr("data-srcset"))})),d&&(a.attr("src",d),a.removeAttr("data-src"))),a.addClass(r.loadedClass).removeClass(r.loadingClass),n.find("."+r.preloaderClass).remove(),i.params.loop&&t){var e=n.attr("data-swiper-slide-index");if(n.hasClass(i.params.slideDuplicateClass)){var s=i.$wrapperEl.children('[data-swiper-slide-index="'+e+'"]:not(.'+i.params.slideDuplicateClass+")");i.lazy.loadInSlide(s.index(),!1)}else{var p=i.$wrapperEl.children("."+i.params.slideDuplicateClass+'[data-swiper-slide-index="'+e+'"]');i.lazy.loadInSlide(p.index(),!1)}}i.emit("lazyImageReady",n[0],a[0]),i.params.autoHeight&&i.updateAutoHeight()}})),i.emit("lazyImageLoad",n[0],a[0])}))}},load:function(){var e=this,t=e.$wrapperEl,i=e.params,r=e.slides,s=e.activeIndex,n=e.virtual&&i.virtual.enabled,a=i.lazy,l=i.slidesPerView;function d(e){if(n){if(t.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]').length)return!0}else if(r[e])return!0;return!1}function u(e){return n?o(e).attr("data-swiper-slide-index"):o(e).index()}if("auto"===l&&(l=0),e.lazy.initialImageLoaded||(e.lazy.initialImageLoaded=!0),e.params.watchSlidesVisibility)t.children("."+i.slideVisibleClass).each((function(t,i){var r=n?o(i).attr("data-swiper-slide-index"):o(i).index();e.lazy.loadInSlide(r)}));else if(l>1)for(var c=s;c<s+l;c+=1)d(c)&&e.lazy.loadInSlide(c);else e.lazy.loadInSlide(s);if(a.loadPrevNext)if(l>1||a.loadPrevNextAmount&&a.loadPrevNextAmount>1){for(var h=a.loadPrevNextAmount,p=l,f=Math.min(s+p+Math.max(h,p),r.length),m=Math.max(s-Math.max(p,h),0),g=s+l;g<f;g+=1)d(g)&&e.lazy.loadInSlide(g);for(var y=m;y<s;y+=1)d(y)&&e.lazy.loadInSlide(y)}else{var v=t.children("."+i.slideNextClass);v.length>0&&e.lazy.loadInSlide(u(v));var b=t.children("."+i.slidePrevClass);b.length>0&&e.lazy.loadInSlide(u(b))}}},Ut={name:"lazy",params:{lazy:{enabled:!1,loadPrevNext:!1,loadPrevNextAmount:1,loadOnTransitionStart:!1,elementClass:"swiper-lazy",loadingClass:"swiper-lazy-loading",loadedClass:"swiper-lazy-loaded",preloaderClass:"swiper-lazy-preloader"}},create:function(){var e=this;X.extend(e,{lazy:{initialImageLoaded:!1,load:Rt.load.bind(e),loadInSlide:Rt.loadInSlide.bind(e)}})},on:{beforeInit:function(){var e=this;e.params.lazy.enabled&&e.params.preloadImages&&(e.params.preloadImages=!1)},init:function(){var e=this;e.params.lazy.enabled&&!e.params.loop&&0===e.params.initialSlide&&e.lazy.load()},scroll:function(){var e=this;e.params.freeMode&&!e.params.freeModeSticky&&e.lazy.load()},resize:function(){var e=this;e.params.lazy.enabled&&e.lazy.load()},scrollbarDragMove:function(){var e=this;e.params.lazy.enabled&&e.lazy.load()},transitionStart:function(){var e=this;e.params.lazy.enabled&&(e.params.lazy.loadOnTransitionStart||!e.params.lazy.loadOnTransitionStart&&!e.lazy.initialImageLoaded)&&e.lazy.load()},transitionEnd:function(){var e=this;e.params.lazy.enabled&&!e.params.lazy.loadOnTransitionStart&&e.lazy.load()},slideChange:function(){var e=this;e.params.lazy.enabled&&e.params.cssMode&&e.lazy.load()}}},Bt={LinearSpline:function(e,t){var i,r,s=function(){var e,t,i;return function(r,s){t=-1,e=r.length;while(e-t>1)i=e+t>>1,r[i]<=s?t=i:e=i;return e}}();return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(r=s(this.x,e),i=r-1,(e-this.x[i])*(this.y[r]-this.y[i])/(this.x[r]-this.x[i])+this.y[i]):0},this},getInterpolateFunction:function(e){var t=this;t.controller.spline||(t.controller.spline=t.params.loop?new Bt.LinearSpline(t.slidesGrid,e.slidesGrid):new Bt.LinearSpline(t.snapGrid,e.snapGrid))},setTranslate:function(e,t){var i,r,s=this,n=s.controller.control;function a(e){var t=s.rtlTranslate?-s.translate:s.translate;"slide"===s.params.controller.by&&(s.controller.getInterpolateFunction(e),r=-s.controller.spline.interpolate(-t)),r&&"container"!==s.params.controller.by||(i=(e.maxTranslate()-e.minTranslate())/(s.maxTranslate()-s.minTranslate()),r=(t-s.minTranslate())*i+e.minTranslate()),s.params.controller.inverse&&(r=e.maxTranslate()-r),e.updateProgress(r),e.setTranslate(r,s),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(n))for(var o=0;o<n.length;o+=1)n[o]!==t&&n[o]instanceof ct&&a(n[o]);else n instanceof ct&&t!==n&&a(n)},setTransition:function(e,t){var i,r=this,s=r.controller.control;function n(t){t.setTransition(e,r),0!==e&&(t.transitionStart(),t.params.autoHeight&&X.nextTick((function(){t.updateAutoHeight()})),t.$wrapperEl.transitionEnd((function(){s&&(t.params.loop&&"slide"===r.params.controller.by&&t.loopFix(),t.transitionEnd())})))}if(Array.isArray(s))for(i=0;i<s.length;i+=1)s[i]!==t&&s[i]instanceof ct&&n(s[i]);else s instanceof ct&&t!==s&&n(s)}},jt={name:"controller",params:{controller:{control:void 0,inverse:!1,by:"slide"}},create:function(){var e=this;X.extend(e,{controller:{control:e.params.controller.control,getInterpolateFunction:Bt.getInterpolateFunction.bind(e),setTranslate:Bt.setTranslate.bind(e),setTransition:Bt.setTransition.bind(e)}})},on:{update:function(){var e=this;e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},resize:function(){var e=this;e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},observerUpdate:function(){var e=this;e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},setTranslate:function(e,t){var i=this;i.controller.control&&i.controller.setTranslate(e,t)},setTransition:function(e,t){var i=this;i.controller.control&&i.controller.setTransition(e,t)}}},Ft={makeElFocusable:function(e){return e.attr("tabIndex","0"),e},makeElNotFocusable:function(e){return e.attr("tabIndex","-1"),e},addElRole:function(e,t){return e.attr("role",t),e},addElLabel:function(e,t){return e.attr("aria-label",t),e},disableEl:function(e){return e.attr("aria-disabled",!0),e},enableEl:function(e){return e.attr("aria-disabled",!1),e},onEnterKey:function(e){var t=this,i=t.params.a11y;if(13===e.keyCode){var r=o(e.target);t.navigation&&t.navigation.$nextEl&&r.is(t.navigation.$nextEl)&&(t.isEnd&&!t.params.loop||t.slideNext(),t.isEnd?t.a11y.notify(i.lastSlideMessage):t.a11y.notify(i.nextSlideMessage)),t.navigation&&t.navigation.$prevEl&&r.is(t.navigation.$prevEl)&&(t.isBeginning&&!t.params.loop||t.slidePrev(),t.isBeginning?t.a11y.notify(i.firstSlideMessage):t.a11y.notify(i.prevSlideMessage)),t.pagination&&r.is("."+t.params.pagination.bulletClass)&&r[0].click()}},notify:function(e){var t=this,i=t.a11y.liveRegion;0!==i.length&&(i.html(""),i.html(e))},updateNavigation:function(){var e=this;if(!e.params.loop&&e.navigation){var t=e.navigation,i=t.$nextEl,r=t.$prevEl;r&&r.length>0&&(e.isBeginning?(e.a11y.disableEl(r),e.a11y.makeElNotFocusable(r)):(e.a11y.enableEl(r),e.a11y.makeElFocusable(r))),i&&i.length>0&&(e.isEnd?(e.a11y.disableEl(i),e.a11y.makeElNotFocusable(i)):(e.a11y.enableEl(i),e.a11y.makeElFocusable(i)))}},updatePagination:function(){var e=this,t=e.params.a11y;e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.bullets.each((function(i,r){var s=o(r);e.a11y.makeElFocusable(s),e.a11y.addElRole(s,"button"),e.a11y.addElLabel(s,t.paginationBulletMessage.replace(/\{\{index\}\}/,s.index()+1))}))},init:function(){var e=this;e.$el.append(e.a11y.liveRegion);var t,i,r=e.params.a11y;e.navigation&&e.navigation.$nextEl&&(t=e.navigation.$nextEl),e.navigation&&e.navigation.$prevEl&&(i=e.navigation.$prevEl),t&&(e.a11y.makeElFocusable(t),e.a11y.addElRole(t,"button"),e.a11y.addElLabel(t,r.nextSlideMessage),t.on("keydown",e.a11y.onEnterKey)),i&&(e.a11y.makeElFocusable(i),e.a11y.addElRole(i,"button"),e.a11y.addElLabel(i,r.prevSlideMessage),i.on("keydown",e.a11y.onEnterKey)),e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.$el.on("keydown","."+e.params.pagination.bulletClass,e.a11y.onEnterKey)},destroy:function(){var e,t,i=this;i.a11y.liveRegion&&i.a11y.liveRegion.length>0&&i.a11y.liveRegion.remove(),i.navigation&&i.navigation.$nextEl&&(e=i.navigation.$nextEl),i.navigation&&i.navigation.$prevEl&&(t=i.navigation.$prevEl),e&&e.off("keydown",i.a11y.onEnterKey),t&&t.off("keydown",i.a11y.onEnterKey),i.pagination&&i.params.pagination.clickable&&i.pagination.bullets&&i.pagination.bullets.length&&i.pagination.$el.off("keydown","."+i.params.pagination.bulletClass,i.a11y.onEnterKey)}},qt={name:"a11y",params:{a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}"}},create:function(){var e=this;X.extend(e,{a11y:{liveRegion:o('<span class="'+e.params.a11y.notificationClass+'" aria-live="assertive" aria-atomic="true"></span>')}}),Object.keys(Ft).forEach((function(t){e.a11y[t]=Ft[t].bind(e)}))},on:{init:function(){var e=this;e.params.a11y.enabled&&(e.a11y.init(),e.a11y.updateNavigation())},toEdge:function(){var e=this;e.params.a11y.enabled&&e.a11y.updateNavigation()},fromEdge:function(){var e=this;e.params.a11y.enabled&&e.a11y.updateNavigation()},paginationUpdate:function(){var e=this;e.params.a11y.enabled&&e.a11y.updatePagination()},destroy:function(){var e=this;e.params.a11y.enabled&&e.a11y.destroy()}}},$t={init:function(){var e=this;if(e.params.history){if(!s.history||!s.history.pushState)return e.params.history.enabled=!1,void(e.params.hashNavigation.enabled=!0);var t=e.history;t.initialized=!0,t.paths=$t.getPathValues(),(t.paths.key||t.paths.value)&&(t.scrollToSlide(0,t.paths.value,e.params.runCallbacksOnInit),e.params.history.replaceState||s.addEventListener("popstate",e.history.setHistoryPopState))}},destroy:function(){var e=this;e.params.history.replaceState||s.removeEventListener("popstate",e.history.setHistoryPopState)},setHistoryPopState:function(){var e=this;e.history.paths=$t.getPathValues(),e.history.scrollToSlide(e.params.speed,e.history.paths.value,!1)},getPathValues:function(){var e=s.location.pathname.slice(1).split("/").filter((function(e){return""!==e})),t=e.length,i=e[t-2],r=e[t-1];return{key:i,value:r}},setHistory:function(e,t){var i=this;if(i.history.initialized&&i.params.history.enabled){var r=i.slides.eq(t),n=$t.slugify(r.attr("data-history"));s.location.pathname.includes(e)||(n=e+"/"+n);var a=s.history.state;a&&a.value===n||(i.params.history.replaceState?s.history.replaceState({value:n},null,n):s.history.pushState({value:n},null,n))}},slugify:function(e){return e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},scrollToSlide:function(e,t,i){var r=this;if(t)for(var s=0,n=r.slides.length;s<n;s+=1){var a=r.slides.eq(s),o=$t.slugify(a.attr("data-history"));if(o===t&&!a.hasClass(r.params.slideDuplicateClass)){var l=a.index();r.slideTo(l,e,i)}}else r.slideTo(0,e,i)}},Ht={name:"history",params:{history:{enabled:!1,replaceState:!1,key:"slides"}},create:function(){var e=this;X.extend(e,{history:{init:$t.init.bind(e),setHistory:$t.setHistory.bind(e),setHistoryPopState:$t.setHistoryPopState.bind(e),scrollToSlide:$t.scrollToSlide.bind(e),destroy:$t.destroy.bind(e)}})},on:{init:function(){var e=this;e.params.history.enabled&&e.history.init()},destroy:function(){var e=this;e.params.history.enabled&&e.history.destroy()},transitionEnd:function(){var e=this;e.history.initialized&&e.history.setHistory(e.params.history.key,e.activeIndex)},slideChange:function(){var e=this;e.history.initialized&&e.params.cssMode&&e.history.setHistory(e.params.history.key,e.activeIndex)}}},zt={onHashCange:function(){var e=this;e.emit("hashChange");var t=i.location.hash.replace("#",""),r=e.slides.eq(e.activeIndex).attr("data-hash");if(t!==r){var s=e.$wrapperEl.children("."+e.params.slideClass+'[data-hash="'+t+'"]').index();if("undefined"===typeof s)return;e.slideTo(s)}},setHash:function(){var e=this;if(e.hashNavigation.initialized&&e.params.hashNavigation.enabled)if(e.params.hashNavigation.replaceState&&s.history&&s.history.replaceState)s.history.replaceState(null,null,"#"+e.slides.eq(e.activeIndex).attr("data-hash")||!1),e.emit("hashSet");else{var t=e.slides.eq(e.activeIndex),r=t.attr("data-hash")||t.attr("data-history");i.location.hash=r||"",e.emit("hashSet")}},init:function(){var e=this;if(!(!e.params.hashNavigation.enabled||e.params.history&&e.params.history.enabled)){e.hashNavigation.initialized=!0;var t=i.location.hash.replace("#","");if(t)for(var r=0,n=0,a=e.slides.length;n<a;n+=1){var l=e.slides.eq(n),d=l.attr("data-hash")||l.attr("data-history");if(d===t&&!l.hasClass(e.params.slideDuplicateClass)){var u=l.index();e.slideTo(u,r,e.params.runCallbacksOnInit,!0)}}e.params.hashNavigation.watchState&&o(s).on("hashchange",e.hashNavigation.onHashCange)}},destroy:function(){var e=this;e.params.hashNavigation.watchState&&o(s).off("hashchange",e.hashNavigation.onHashCange)}},Vt={name:"hash-navigation",params:{hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}},create:function(){var e=this;X.extend(e,{hashNavigation:{initialized:!1,init:zt.init.bind(e),destroy:zt.destroy.bind(e),setHash:zt.setHash.bind(e),onHashCange:zt.onHashCange.bind(e)}})},on:{init:function(){var e=this;e.params.hashNavigation.enabled&&e.hashNavigation.init()},destroy:function(){var e=this;e.params.hashNavigation.enabled&&e.hashNavigation.destroy()},transitionEnd:function(){var e=this;e.hashNavigation.initialized&&e.hashNavigation.setHash()},slideChange:function(){var e=this;e.hashNavigation.initialized&&e.params.cssMode&&e.hashNavigation.setHash()}}},Gt={run:function(){var e=this,t=e.slides.eq(e.activeIndex),i=e.params.autoplay.delay;t.attr("data-swiper-autoplay")&&(i=t.attr("data-swiper-autoplay")||e.params.autoplay.delay),clearTimeout(e.autoplay.timeout),e.autoplay.timeout=X.nextTick((function(){e.params.autoplay.reverseDirection?e.params.loop?(e.loopFix(),e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.isBeginning?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(e.slides.length-1,e.params.speed,!0,!0),e.emit("autoplay")):(e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.params.loop?(e.loopFix(),e.slideNext(e.params.speed,!0,!0),e.emit("autoplay")):e.isEnd?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(0,e.params.speed,!0,!0),e.emit("autoplay")):(e.slideNext(e.params.speed,!0,!0),e.emit("autoplay")),e.params.cssMode&&e.autoplay.running&&e.autoplay.run()}),i)},start:function(){var e=this;return"undefined"===typeof e.autoplay.timeout&&(!e.autoplay.running&&(e.autoplay.running=!0,e.emit("autoplayStart"),e.autoplay.run(),!0))},stop:function(){var e=this;return!!e.autoplay.running&&("undefined"!==typeof e.autoplay.timeout&&(e.autoplay.timeout&&(clearTimeout(e.autoplay.timeout),e.autoplay.timeout=void 0),e.autoplay.running=!1,e.emit("autoplayStop"),!0))},pause:function(e){var t=this;t.autoplay.running&&(t.autoplay.paused||(t.autoplay.timeout&&clearTimeout(t.autoplay.timeout),t.autoplay.paused=!0,0!==e&&t.params.autoplay.waitForTransition?(t.$wrapperEl[0].addEventListener("transitionend",t.autoplay.onTransitionEnd),t.$wrapperEl[0].addEventListener("webkitTransitionEnd",t.autoplay.onTransitionEnd)):(t.autoplay.paused=!1,t.autoplay.run())))}},Wt={name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1}},create:function(){var e=this;X.extend(e,{autoplay:{running:!1,paused:!1,run:Gt.run.bind(e),start:Gt.start.bind(e),stop:Gt.stop.bind(e),pause:Gt.pause.bind(e),onVisibilityChange:function(){"hidden"===document.visibilityState&&e.autoplay.running&&e.autoplay.pause(),"visible"===document.visibilityState&&e.autoplay.paused&&(e.autoplay.run(),e.autoplay.paused=!1)},onTransitionEnd:function(t){e&&!e.destroyed&&e.$wrapperEl&&t.target===this&&(e.$wrapperEl[0].removeEventListener("transitionend",e.autoplay.onTransitionEnd),e.$wrapperEl[0].removeEventListener("webkitTransitionEnd",e.autoplay.onTransitionEnd),e.autoplay.paused=!1,e.autoplay.running?e.autoplay.run():e.autoplay.stop())}}})},on:{init:function(){var e=this;e.params.autoplay.enabled&&(e.autoplay.start(),document.addEventListener("visibilitychange",e.autoplay.onVisibilityChange))},beforeTransitionStart:function(e,t){var i=this;i.autoplay.running&&(t||!i.params.autoplay.disableOnInteraction?i.autoplay.pause(e):i.autoplay.stop())},sliderFirstMove:function(){var e=this;e.autoplay.running&&(e.params.autoplay.disableOnInteraction?e.autoplay.stop():e.autoplay.pause())},touchEnd:function(){var e=this;e.params.cssMode&&e.autoplay.paused&&!e.params.autoplay.disableOnInteraction&&e.autoplay.run()},destroy:function(){var e=this;e.autoplay.running&&e.autoplay.stop(),document.removeEventListener("visibilitychange",e.autoplay.onVisibilityChange)}}},Xt={setTranslate:function(){for(var e=this,t=e.slides,i=0;i<t.length;i+=1){var r=e.slides.eq(i),s=r[0].swiperSlideOffset,n=-s;e.params.virtualTranslate||(n-=e.translate);var a=0;e.isHorizontal()||(a=n,n=0);var o=e.params.fadeEffect.crossFade?Math.max(1-Math.abs(r[0].progress),0):1+Math.min(Math.max(r[0].progress,-1),0);r.css({opacity:o}).transform("translate3d("+n+"px, "+a+"px, 0px)")}},setTransition:function(e){var t=this,i=t.slides,r=t.$wrapperEl;if(i.transition(e),t.params.virtualTranslate&&0!==e){var s=!1;i.transitionEnd((function(){if(!s&&t&&!t.destroyed){s=!0,t.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],i=0;i<e.length;i+=1)r.trigger(e[i])}}))}}},Yt={name:"effect-fade",params:{fadeEffect:{crossFade:!1}},create:function(){var e=this;X.extend(e,{fadeEffect:{setTranslate:Xt.setTranslate.bind(e),setTransition:Xt.setTransition.bind(e)}})},on:{beforeInit:function(){var e=this;if("fade"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"fade");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};X.extend(e.params,t),X.extend(e.originalParams,t)}},setTranslate:function(){var e=this;"fade"===e.params.effect&&e.fadeEffect.setTranslate()},setTransition:function(e){var t=this;"fade"===t.params.effect&&t.fadeEffect.setTransition(e)}}},Kt={setTranslate:function(){var e,t=this,i=t.$el,r=t.$wrapperEl,s=t.slides,n=t.width,a=t.height,l=t.rtlTranslate,d=t.size,u=t.params.cubeEffect,c=t.isHorizontal(),h=t.virtual&&t.params.virtual.enabled,p=0;u.shadow&&(c?(e=r.find(".swiper-cube-shadow"),0===e.length&&(e=o('<div class="swiper-cube-shadow"></div>'),r.append(e)),e.css({height:n+"px"})):(e=i.find(".swiper-cube-shadow"),0===e.length&&(e=o('<div class="swiper-cube-shadow"></div>'),i.append(e))));for(var f=0;f<s.length;f+=1){var m=s.eq(f),g=f;h&&(g=parseInt(m.attr("data-swiper-slide-index"),10));var y=90*g,v=Math.floor(y/360);l&&(y=-y,v=Math.floor(-y/360));var b=Math.max(Math.min(m[0].progress,1),-1),_=0,T=0,S=0;g%4===0?(_=4*-v*d,S=0):(g-1)%4===0?(_=0,S=4*-v*d):(g-2)%4===0?(_=d+4*v*d,S=d):(g-3)%4===0&&(_=-d,S=3*d+4*d*v),l&&(_=-_),c||(T=_,_=0);var w="rotateX("+(c?0:-y)+"deg) rotateY("+(c?y:0)+"deg) translate3d("+_+"px, "+T+"px, "+S+"px)";if(b<=1&&b>-1&&(p=90*g+90*b,l&&(p=90*-g-90*b)),m.transform(w),u.slideShadows){var E=c?m.find(".swiper-slide-shadow-left"):m.find(".swiper-slide-shadow-top"),C=c?m.find(".swiper-slide-shadow-right"):m.find(".swiper-slide-shadow-bottom");0===E.length&&(E=o('<div class="swiper-slide-shadow-'+(c?"left":"top")+'"></div>'),m.append(E)),0===C.length&&(C=o('<div class="swiper-slide-shadow-'+(c?"right":"bottom")+'"></div>'),m.append(C)),E.length&&(E[0].style.opacity=Math.max(-b,0)),C.length&&(C[0].style.opacity=Math.max(b,0))}}if(r.css({"-webkit-transform-origin":"50% 50% -"+d/2+"px","-moz-transform-origin":"50% 50% -"+d/2+"px","-ms-transform-origin":"50% 50% -"+d/2+"px","transform-origin":"50% 50% -"+d/2+"px"}),u.shadow)if(c)e.transform("translate3d(0px, "+(n/2+u.shadowOffset)+"px, "+-n/2+"px) rotateX(90deg) rotateZ(0deg) scale("+u.shadowScale+")");else{var x=Math.abs(p)-90*Math.floor(Math.abs(p)/90),k=1.5-(Math.sin(2*x*Math.PI/360)/2+Math.cos(2*x*Math.PI/360)/2),I=u.shadowScale,A=u.shadowScale/k,O=u.shadowOffset;e.transform("scale3d("+I+", 1, "+A+") translate3d(0px, "+(a/2+O)+"px, "+-a/2/A+"px) rotateX(-90deg)")}var P=ft.isSafari||ft.isWebView?-d/2:0;r.transform("translate3d(0px,0,"+P+"px) rotateX("+(t.isHorizontal()?0:p)+"deg) rotateY("+(t.isHorizontal()?-p:0)+"deg)")},setTransition:function(e){var t=this,i=t.$el,r=t.slides;r.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.cubeEffect.shadow&&!t.isHorizontal()&&i.find(".swiper-cube-shadow").transition(e)}},Jt={name:"effect-cube",params:{cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}},create:function(){var e=this;X.extend(e,{cubeEffect:{setTranslate:Kt.setTranslate.bind(e),setTransition:Kt.setTransition.bind(e)}})},on:{beforeInit:function(){var e=this;if("cube"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"cube"),e.classNames.push(e.params.containerModifierClass+"3d");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0};X.extend(e.params,t),X.extend(e.originalParams,t)}},setTranslate:function(){var e=this;"cube"===e.params.effect&&e.cubeEffect.setTranslate()},setTransition:function(e){var t=this;"cube"===t.params.effect&&t.cubeEffect.setTransition(e)}}},Qt={setTranslate:function(){for(var e=this,t=e.slides,i=e.rtlTranslate,r=0;r<t.length;r+=1){var s=t.eq(r),n=s[0].progress;e.params.flipEffect.limitRotation&&(n=Math.max(Math.min(s[0].progress,1),-1));var a=s[0].swiperSlideOffset,l=-180*n,d=l,u=0,c=-a,h=0;if(e.isHorizontal()?i&&(d=-d):(h=c,c=0,u=-d,d=0),s[0].style.zIndex=-Math.abs(Math.round(n))+t.length,e.params.flipEffect.slideShadows){var p=e.isHorizontal()?s.find(".swiper-slide-shadow-left"):s.find(".swiper-slide-shadow-top"),f=e.isHorizontal()?s.find(".swiper-slide-shadow-right"):s.find(".swiper-slide-shadow-bottom");0===p.length&&(p=o('<div class="swiper-slide-shadow-'+(e.isHorizontal()?"left":"top")+'"></div>'),s.append(p)),0===f.length&&(f=o('<div class="swiper-slide-shadow-'+(e.isHorizontal()?"right":"bottom")+'"></div>'),s.append(f)),p.length&&(p[0].style.opacity=Math.max(-n,0)),f.length&&(f[0].style.opacity=Math.max(n,0))}s.transform("translate3d("+c+"px, "+h+"px, 0px) rotateX("+u+"deg) rotateY("+d+"deg)")}},setTransition:function(e){var t=this,i=t.slides,r=t.activeIndex,s=t.$wrapperEl;if(i.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.virtualTranslate&&0!==e){var n=!1;i.eq(r).transitionEnd((function(){if(!n&&t&&!t.destroyed){n=!0,t.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],i=0;i<e.length;i+=1)s.trigger(e[i])}}))}}},Zt={name:"effect-flip",params:{flipEffect:{slideShadows:!0,limitRotation:!0}},create:function(){var e=this;X.extend(e,{flipEffect:{setTranslate:Qt.setTranslate.bind(e),setTransition:Qt.setTransition.bind(e)}})},on:{beforeInit:function(){var e=this;if("flip"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"flip"),e.classNames.push(e.params.containerModifierClass+"3d");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};X.extend(e.params,t),X.extend(e.originalParams,t)}},setTranslate:function(){var e=this;"flip"===e.params.effect&&e.flipEffect.setTranslate()},setTransition:function(e){var t=this;"flip"===t.params.effect&&t.flipEffect.setTransition(e)}}},ei={setTranslate:function(){for(var e=this,t=e.width,i=e.height,r=e.slides,s=e.$wrapperEl,n=e.slidesSizesGrid,a=e.params.coverflowEffect,l=e.isHorizontal(),d=e.translate,u=l?t/2-d:i/2-d,c=l?a.rotate:-a.rotate,h=a.depth,p=0,f=r.length;p<f;p+=1){var m=r.eq(p),g=n[p],y=m[0].swiperSlideOffset,v=(u-y-g/2)/g*a.modifier,b=l?c*v:0,_=l?0:c*v,T=-h*Math.abs(v),S=a.stretch;"string"===typeof S&&-1!==S.indexOf("%")&&(S=parseFloat(a.stretch)/100*g);var w=l?0:S*v,E=l?S*v:0,C=1-(1-a.scale)*Math.abs(v);Math.abs(E)<.001&&(E=0),Math.abs(w)<.001&&(w=0),Math.abs(T)<.001&&(T=0),Math.abs(b)<.001&&(b=0),Math.abs(_)<.001&&(_=0),Math.abs(C)<.001&&(C=0);var x="translate3d("+E+"px,"+w+"px,"+T+"px) rotateX("+_+"deg) rotateY("+b+"deg) scale("+C+")";if(m.transform(x),m[0].style.zIndex=1-Math.abs(Math.round(v)),a.slideShadows){var k=l?m.find(".swiper-slide-shadow-left"):m.find(".swiper-slide-shadow-top"),I=l?m.find(".swiper-slide-shadow-right"):m.find(".swiper-slide-shadow-bottom");0===k.length&&(k=o('<div class="swiper-slide-shadow-'+(l?"left":"top")+'"></div>'),m.append(k)),0===I.length&&(I=o('<div class="swiper-slide-shadow-'+(l?"right":"bottom")+'"></div>'),m.append(I)),k.length&&(k[0].style.opacity=v>0?v:0),I.length&&(I[0].style.opacity=-v>0?-v:0)}}if(Y.pointerEvents||Y.prefixedPointerEvents){var A=s[0].style;A.perspectiveOrigin=u+"px 50%"}},setTransition:function(e){var t=this;t.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}},ti={name:"effect-coverflow",params:{coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}},create:function(){var e=this;X.extend(e,{coverflowEffect:{setTranslate:ei.setTranslate.bind(e),setTransition:ei.setTransition.bind(e)}})},on:{beforeInit:function(){var e=this;"coverflow"===e.params.effect&&(e.classNames.push(e.params.containerModifierClass+"coverflow"),e.classNames.push(e.params.containerModifierClass+"3d"),e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)},setTranslate:function(){var e=this;"coverflow"===e.params.effect&&e.coverflowEffect.setTranslate()},setTransition:function(e){var t=this;"coverflow"===t.params.effect&&t.coverflowEffect.setTransition(e)}}},ii={init:function(){var e=this,t=e.params,i=t.thumbs,r=e.constructor;i.swiper instanceof r?(e.thumbs.swiper=i.swiper,X.extend(e.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),X.extend(e.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1})):X.isObject(i.swiper)&&(e.thumbs.swiper=new r(X.extend({},i.swiper,{watchSlidesVisibility:!0,watchSlidesProgress:!0,slideToClickedSlide:!1})),e.thumbs.swiperCreated=!0),e.thumbs.swiper.$el.addClass(e.params.thumbs.thumbsContainerClass),e.thumbs.swiper.on("tap",e.thumbs.onThumbClick)},onThumbClick:function(){var e=this,t=e.thumbs.swiper;if(t){var i=t.clickedIndex,r=t.clickedSlide;if((!r||!o(r).hasClass(e.params.thumbs.slideThumbActiveClass))&&"undefined"!==typeof i&&null!==i){var s;if(s=t.params.loop?parseInt(o(t.clickedSlide).attr("data-swiper-slide-index"),10):i,e.params.loop){var n=e.activeIndex;e.slides.eq(n).hasClass(e.params.slideDuplicateClass)&&(e.loopFix(),e._clientLeft=e.$wrapperEl[0].clientLeft,n=e.activeIndex);var a=e.slides.eq(n).prevAll('[data-swiper-slide-index="'+s+'"]').eq(0).index(),l=e.slides.eq(n).nextAll('[data-swiper-slide-index="'+s+'"]').eq(0).index();s="undefined"===typeof a?l:"undefined"===typeof l?a:l-n<n-a?l:a}e.slideTo(s)}}},update:function(e){var t=this,i=t.thumbs.swiper;if(i){var r="auto"===i.params.slidesPerView?i.slidesPerViewDynamic():i.params.slidesPerView,s=t.params.thumbs.autoScrollOffset,n=s&&!i.params.loop;if(t.realIndex!==i.realIndex||n){var a,o,l=i.activeIndex;if(i.params.loop){i.slides.eq(l).hasClass(i.params.slideDuplicateClass)&&(i.loopFix(),i._clientLeft=i.$wrapperEl[0].clientLeft,l=i.activeIndex);var d=i.slides.eq(l).prevAll('[data-swiper-slide-index="'+t.realIndex+'"]').eq(0).index(),u=i.slides.eq(l).nextAll('[data-swiper-slide-index="'+t.realIndex+'"]').eq(0).index();a="undefined"===typeof d?u:"undefined"===typeof u?d:u-l===l-d?l:u-l<l-d?u:d,o=t.activeIndex>t.previousIndex?"next":"prev"}else a=t.realIndex,o=a>t.previousIndex?"next":"prev";n&&(a+="next"===o?s:-1*s),i.visibleSlidesIndexes&&i.visibleSlidesIndexes.indexOf(a)<0&&(i.params.centeredSlides?a=a>l?a-Math.floor(r/2)+1:a+Math.floor(r/2)-1:a>l&&(a=a-r+1),i.slideTo(a,e?0:void 0))}var c=1,h=t.params.thumbs.slideThumbActiveClass;if(t.params.slidesPerView>1&&!t.params.centeredSlides&&(c=t.params.slidesPerView),t.params.thumbs.multipleActiveThumbs||(c=1),c=Math.floor(c),i.slides.removeClass(h),i.params.loop||i.params.virtual&&i.params.virtual.enabled)for(var p=0;p<c;p+=1)i.$wrapperEl.children('[data-swiper-slide-index="'+(t.realIndex+p)+'"]').addClass(h);else for(var f=0;f<c;f+=1)i.slides.eq(t.realIndex+f).addClass(h)}}},ri={name:"thumbs",params:{thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-container-thumbs"}},create:function(){var e=this;X.extend(e,{thumbs:{swiper:null,init:ii.init.bind(e),update:ii.update.bind(e),onThumbClick:ii.onThumbClick.bind(e)}})},on:{beforeInit:function(){var e=this,t=e.params,i=t.thumbs;i&&i.swiper&&(e.thumbs.init(),e.thumbs.update(!0))},slideChange:function(){var e=this;e.thumbs.swiper&&e.thumbs.update()},update:function(){var e=this;e.thumbs.swiper&&e.thumbs.update()},resize:function(){var e=this;e.thumbs.swiper&&e.thumbs.update()},observerUpdate:function(){var e=this;e.thumbs.swiper&&e.thumbs.update()},setTransition:function(e){var t=this,i=t.thumbs.swiper;i&&i.setTransition(e)},beforeDestroy:function(){var e=this,t=e.thumbs.swiper;t&&e.thumbs.swiperCreated&&t&&t.destroy()}}},si=[ht,pt,mt,gt,vt,_t,St,Ct,kt,At,Pt,Dt,Nt,Ut,jt,qt,Ht,Vt,Wt,Yt,Jt,Zt,ti,ri];return"undefined"===typeof ct.use&&(ct.use=ct.Class.use,ct.installModule=ct.Class.installModule),ct.use(si),ct}))},"04f8":function(e,t,i){"use strict";var r=i("2d00"),s=i("d039"),n=i("da84"),a=n.String;e.exports=!!Object.getOwnPropertySymbols&&!s((function(){var e=Symbol();return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},"06cf":function(e,t,i){"use strict";var r=i("83ab"),s=i("c65b"),n=i("d1e7"),a=i("5c6c"),o=i("fc6a"),l=i("a04b"),d=i("1a2d"),u=i("0cfb"),c=Object.getOwnPropertyDescriptor;t.f=r?c:function(e,t){if(e=o(e),t=l(t),u)try{return c(e,t)}catch(i){}if(d(e,t))return a(!s(n.f,e,t),e[t])}},"07fa":function(e,t,i){"use strict";var r=i("50c4");e.exports=function(e){return r(e.length)}},"0a06":function(e,t,i){"use strict";var r=i("c532"),s=i("30b5"),n=i("f6b4"),a=i("5270"),o=i("4a7b");function l(e){this.defaults=e,this.interceptors={request:new n,response:new n}}l.prototype.request=function(e){"string"===typeof e?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=o(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],i=Promise.resolve(e);this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));while(t.length)i=i.then(t.shift(),t.shift());return i},l.prototype.getUri=function(e){return e=o(this.defaults,e),s(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,i){return this.request(o(i||{},{method:e,url:t,data:(i||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,i,r){return this.request(o(r||{},{method:e,url:t,data:i}))}})),e.exports=l},"0cfb":function(e,t,i){"use strict";var r=i("83ab"),s=i("d039"),n=i("cc12");e.exports=!r&&!s((function(){return 7!=Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))},"0d51":function(e,t,i){"use strict";var r=String;e.exports=function(e){try{return r(e)}catch(t){return"Object"}}},"0df6":function(e,t,i){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},"13d2":function(e,t,i){"use strict";var r=i("e330"),s=i("d039"),n=i("1626"),a=i("1a2d"),o=i("83ab"),l=i("5e77").CONFIGURABLE,d=i("8925"),u=i("69f3"),c=u.enforce,h=u.get,p=String,f=Object.defineProperty,m=r("".slice),g=r("".replace),y=r([].join),v=o&&!s((function(){return 8!==f((function(){}),"length",{value:8}).length})),b=String(String).split("String"),_=e.exports=function(e,t,i){"Symbol("===m(p(t),0,7)&&(t="["+g(p(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),i&&i.getter&&(t="get "+t),i&&i.setter&&(t="set "+t),(!a(e,"name")||l&&e.name!==t)&&(o?f(e,"name",{value:t,configurable:!0}):e.name=t),v&&i&&a(i,"arity")&&e.length!==i.arity&&f(e,"length",{value:i.arity});try{i&&a(i,"constructor")&&i.constructor?o&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(s){}var r=c(e);return a(r,"source")||(r.source=y(b,"string"==typeof t?t:"")),e};Function.prototype.toString=_((function(){return n(this)&&h(this).source||d(this)}),"toString")},"13d5":function(e,t,i){"use strict";var r=i("23e7"),s=i("d58f").left,n=i("a640"),a=i("2d00"),o=i("605d"),l=!o&&a>79&&a<83,d=l||!n("reduce");r({target:"Array",proto:!0,forced:d},{reduce:function(e){var t=arguments.length;return s(this,e,t,t>1?arguments[1]:void 0)}})},"14d9":function(e,t,i){"use strict";var r=i("23e7"),s=i("7b0b"),n=i("07fa"),a=i("3a34"),o=i("3511"),l=i("d039"),d=l((function(){return 4294967297!==[].push.call({length:4294967296},1)})),u=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},c=d||!u();r({target:"Array",proto:!0,arity:1,forced:c},{push:function(e){var t=s(this),i=n(t),r=arguments.length;o(i+r);for(var l=0;l<r;l++)t[i]=arguments[l],i++;return a(t,i),i}})},1626:function(e,t,i){"use strict";var r=i("8ea1"),s=r.all;e.exports=r.IS_HTMLDDA?function(e){return"function"==typeof e||e===s}:function(e){return"function"==typeof e}},"17a3":function(e,t,i){"use strict";i.d(t,"i",(function(){return l})),i.d(t,"h",(function(){return d})),i.d(t,"d",(function(){return u})),i.d(t,"f",(function(){return c})),i.d(t,"e",(function(){return p})),i.d(t,"c",(function(){return f})),i.d(t,"g",(function(){return m})),i.d(t,"a",(function(){return g})),i.d(t,"b",(function(){return y}));var r=i("be09"),s=i.n(r),n={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},a=["video","audio","text"],o=["Video","Audio","Text"],l=function(e){return e?e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,i){var r=("00"+Number(t).toString(16)).slice(-2),s=("00"+Number(i).toString(16)).slice(-2);return"avc1."+r+"00"+s})):e},d=function(e){void 0===e&&(e="");var t=e.split(","),i=[];return t.forEach((function(e){var t;e=e.trim(),a.forEach((function(r){var s=n[r].exec(e.toLowerCase());if(s&&!(s.length<=1)){t=r;var a=e.substring(0,s[1].length),o=e.replace(a,"");i.push({type:a,details:o,mediaType:r})}})),t||i.push({type:e,details:"",mediaType:"unknown"})})),i},u=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var r in i){var s=i[r];if(s.default&&s.playlists)return d(s.playlists[0].attributes.CODECS)}return null},c=function(e){return void 0===e&&(e=""),n.audio.test(e.trim().toLowerCase())},h=function(e){return void 0===e&&(e=""),n.text.test(e.trim().toLowerCase())},p=function(e){if(e&&"string"===typeof e){var t=e.toLowerCase().split(",").map((function(e){return l(e.trim())})),i="video";1===t.length&&c(t[0])?i="audio":1===t.length&&h(t[0])&&(i="application");var r="mp4";return t.every((function(e){return n.mp4.test(e)}))?r="mp4":t.every((function(e){return n.webm.test(e)}))?r="webm":t.every((function(e){return n.ogg.test(e)}))&&(r="ogg"),i+"/"+r+';codecs="'+e+'"'}},f=function(e){return void 0===e&&(e=""),s.a.MediaSource&&s.a.MediaSource.isTypeSupported&&s.a.MediaSource.isTypeSupported(p(e))||!1},m=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;t<o.length;t++){var i=o[t];if(n["muxer"+i].test(e))return!0}return!1}))},g="mp4a.40.2",y="avc1.4d400d"},"17aa":function(e,t,i){},"1a2d":function(e,t,i){"use strict";var r=i("e330"),s=i("7b0b"),n=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return n(s(e),t)}},"1abf":function(e,t,i){"use strict";var r=i("fe0f"),s=i.n(r);s.a},"1cfd":function(e,t,i){"use strict";var r=i("e282"),s=i.n(r);s.a},"1d2b":function(e,t,i){"use strict";e.exports=function(e,t){return function(){for(var i=new Array(arguments.length),r=0;r<i.length;r++)i[r]=arguments[r];return e.apply(t,i)}}},"1d80":function(e,t,i){"use strict";var r=i("7234"),s=TypeError;e.exports=function(e){if(r(e))throw s("Can't call method on "+e);return e}},"1db4":function(e,t,i){},"1e09":function(e,t,i){},"1fb5":function(e,t,i){"use strict";t.byteLength=u,t.toByteArray=h,t.fromByteArray=m;for(var r=[],s=[],n="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,l=a.length;o<l;++o)r[o]=a[o],s[a.charCodeAt(o)]=o;function d(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");-1===i&&(i=t);var r=i===t?0:4-i%4;return[i,r]}function u(e){var t=d(e),i=t[0],r=t[1];return 3*(i+r)/4-r}function c(e,t,i){return 3*(t+i)/4-i}function h(e){var t,i,r=d(e),a=r[0],o=r[1],l=new n(c(e,a,o)),u=0,h=o>0?a-4:a;for(i=0;i<h;i+=4)t=s[e.charCodeAt(i)]<<18|s[e.charCodeAt(i+1)]<<12|s[e.charCodeAt(i+2)]<<6|s[e.charCodeAt(i+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===o&&(t=s[e.charCodeAt(i)]<<2|s[e.charCodeAt(i+1)]>>4,l[u++]=255&t),1===o&&(t=s[e.charCodeAt(i)]<<10|s[e.charCodeAt(i+1)]<<4|s[e.charCodeAt(i+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l}function p(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function f(e,t,i){for(var r,s=[],n=t;n<i;n+=3)r=(e[n]<<16&16711680)+(e[n+1]<<8&65280)+(255&e[n+2]),s.push(p(r));return s.join("")}function m(e){for(var t,i=e.length,s=i%3,n=[],a=16383,o=0,l=i-s;o<l;o+=a)n.push(f(e,o,o+a>l?l:o+a));return 1===s?(t=e[i-1],n.push(r[t>>2]+r[t<<4&63]+"==")):2===s&&(t=(e[i-2]<<8)+e[i-1],n.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),n.join("")}s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},"210b":function(e,t,i){var r=i("e1c8");t.DOMImplementation=r.DOMImplementation,t.XMLSerializer=r.XMLSerializer,t.DOMParser=i("b074").DOMParser},"23cb":function(e,t,i){"use strict";var r=i("5926"),s=Math.max,n=Math.min;e.exports=function(e,t){var i=r(e);return i<0?s(i+t,0):n(i,t)}},"23e7":function(e,t,i){"use strict";var r=i("da84"),s=i("06cf").f,n=i("9112"),a=i("cb2d"),o=i("6374"),l=i("e893"),d=i("94ca");e.exports=function(e,t){var i,u,c,h,p,f,m=e.target,g=e.global,y=e.stat;if(u=g?r:y?r[m]||o(m,{}):(r[m]||{}).prototype,u)for(c in t){if(p=t[c],e.dontCallGetSet?(f=s(u,c),h=f&&f.value):h=u[c],i=d(g?c:m+(y?".":"#")+c,e.forced),!i&&void 0!==h){if(typeof p==typeof h)continue;l(p,h)}(e.sham||h&&h.sham)&&n(p,"sham",!0),a(u,c,p,e)}}},"241c":function(e,t,i){"use strict";var r=i("ca84"),s=i("7839"),n=s.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,n)}},2444:function(e,t,i){"use strict";(function(t){var r=i("c532"),s=i("c8af"),n={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function o(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof t&&"[object process]"===Object.prototype.toString.call(t))&&(e=i("b50d")),e}var l={adapter:o(),transformRequest:[function(e,t){return s(t,"Accept"),s(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(t){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){l.headers[e]=r.merge(n)})),e.exports=l}).call(this,i("4362"))},"24aa":function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(r){"object"===typeof window&&(i=window)}e.exports=i},"266b":function(e,t,i){"use strict";var r=i("597b"),s=i.n(r);s.a},"279f":function(e,t,i){},"2b8c":function(e,t,i){var r=i("be09"),s=e.exports={WebVTT:i("d02c"),VTTCue:i("b03c"),VTTRegion:i("f97d")};r.vttjs=s,r.WebVTT=s.WebVTT;var n=s.VTTCue,a=s.VTTRegion,o=r.VTTCue,l=r.VTTRegion;s.shim=function(){r.VTTCue=n,r.VTTRegion=a},s.restore=function(){r.VTTCue=o,r.VTTRegion=l},r.VTTCue||s.shim()},"2d00":function(e,t,i){"use strict";var r,s,n=i("da84"),a=i("342f"),o=n.process,l=n.Deno,d=o&&o.versions||l&&l.version,u=d&&d.v8;u&&(r=u.split("."),s=r[0]>0&&r[0]<4?1:+(r[0]+r[1])),!s&&a&&(r=a.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/),r&&(s=+r[1]))),e.exports=s},"2d83":function(e,t,i){"use strict";var r=i("387f");e.exports=function(e,t,i,s,n){var a=new Error(e);return r(a,t,i,s,n)}},"2e43":function(e,t,i){"use strict";var r=i("c8fa"),s=i.n(r);s.a},"2e67":function(e,t,i){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},"30b5":function(e,t,i){"use strict";var r=i("c532");function s(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,i){if(!t)return e;var n;if(i)n=i(t);else if(r.isURLSearchParams(t))n=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof 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)),a.push(s(t)+"="+s(e))})))})),n=a.join("&")}if(n){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}},3132:function(e,t,i){},"321f":function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));var r=i("de66"),s=Object(r["k"])([73,68,51]),n=function(e,t){void 0===t&&(t=0),e=Object(r["k"])(e);var i=e[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9],n=(16&i)>>4;return n?s+20:s+10},a=function e(t,i){return void 0===i&&(i=0),t=Object(r["k"])(t),t.length-i<10||!Object(r["a"])(t,s,{offset:i})?i:(i+=n(t,i),e(t,i))}},"342f":function(e,t,i){"use strict";e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},3511:function(e,t,i){"use strict";var r=TypeError,s=9007199254740991;e.exports=function(e){if(e>s)throw r("Maximum allowed index exceeded");return e}},3603:function(e,t,i){"use strict";var r=i("be09"),s=i("a559"),n=i("8362");u.httpHandler=i("8c00");
1
+ module.exports=function(e){var t={};function i(r){if(t[r])return t[r].exports;var s=t[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=e,i.c=t,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(r,s,function(t){return e[t]}.bind(null,s));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s="fb15")}({0:function(e,t){},"02a3":function(e,t,i){(function(t,i){e.exports=i()})(0,(function(){"use strict";function e(e){return null!==e&&"object"===typeof e&&"constructor"in e&&e.constructor===Object}function t(i,r){void 0===i&&(i={}),void 0===r&&(r={}),Object.keys(r).forEach((function(s){"undefined"===typeof i[s]?i[s]=r[s]:e(r[s])&&e(i[s])&&Object.keys(r[s]).length>0&&t(i[s],r[s])}))}var i="undefined"!==typeof document?document:{},r={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};t(i,r);var s="undefined"!==typeof window?window:{},n={document:r,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}}};t(s,n);var a=function(e){for(var t=this,i=0;i<e.length;i+=1)t[i]=e[i];return t.length=e.length,this};function o(e,t){var r=[],n=0;if(e&&!t&&e instanceof a)return e;if(e)if("string"===typeof e){var o,l,d=e.trim();if(d.indexOf("<")>=0&&d.indexOf(">")>=0){var u="div";for(0===d.indexOf("<li")&&(u="ul"),0===d.indexOf("<tr")&&(u="tbody"),0!==d.indexOf("<td")&&0!==d.indexOf("<th")||(u="tr"),0===d.indexOf("<tbody")&&(u="table"),0===d.indexOf("<option")&&(u="select"),l=i.createElement(u),l.innerHTML=d,n=0;n<l.childNodes.length;n+=1)r.push(l.childNodes[n])}else for(o=t||"#"!==e[0]||e.match(/[ .<>:~]/)?(t||i).querySelectorAll(e.trim()):[i.getElementById(e.trim().split("#")[1])],n=0;n<o.length;n+=1)o[n]&&r.push(o[n])}else if(e.nodeType||e===s||e===i)r.push(e);else if(e.length>0&&e[0].nodeType)for(n=0;n<e.length;n+=1)r.push(e[n]);return new a(r)}function l(e){for(var t=[],i=0;i<e.length;i+=1)-1===t.indexOf(e[i])&&t.push(e[i]);return t}function d(e){if("undefined"===typeof e)return this;for(var t=e.split(" "),i=0;i<t.length;i+=1)for(var r=0;r<this.length;r+=1)"undefined"!==typeof this[r]&&"undefined"!==typeof this[r].classList&&this[r].classList.add(t[i]);return this}function u(e){for(var t=e.split(" "),i=0;i<t.length;i+=1)for(var r=0;r<this.length;r+=1)"undefined"!==typeof this[r]&&"undefined"!==typeof this[r].classList&&this[r].classList.remove(t[i]);return this}function c(e){return!!this[0]&&this[0].classList.contains(e)}function h(e){for(var t=e.split(" "),i=0;i<t.length;i+=1)for(var r=0;r<this.length;r+=1)"undefined"!==typeof this[r]&&"undefined"!==typeof this[r].classList&&this[r].classList.toggle(t[i]);return this}function p(e,t){var i=arguments;if(1===arguments.length&&"string"===typeof e)return this[0]?this[0].getAttribute(e):void 0;for(var r=0;r<this.length;r+=1)if(2===i.length)this[r].setAttribute(e,t);else for(var s in e)this[r][s]=e[s],this[r].setAttribute(s,e[s]);return this}function f(e){for(var t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this}function m(e,t){var i;if("undefined"!==typeof t){for(var r=0;r<this.length;r+=1)i=this[r],i.dom7ElementDataStorage||(i.dom7ElementDataStorage={}),i.dom7ElementDataStorage[e]=t;return this}if(i=this[0],i){if(i.dom7ElementDataStorage&&e in i.dom7ElementDataStorage)return i.dom7ElementDataStorage[e];var s=i.getAttribute("data-"+e);return s||void 0}}function g(e){for(var t=0;t<this.length;t+=1){var i=this[t].style;i.webkitTransform=e,i.transform=e}return this}function y(e){"string"!==typeof e&&(e+="ms");for(var t=0;t<this.length;t+=1){var i=this[t].style;i.webkitTransitionDuration=e,i.transitionDuration=e}return this}function v(){var e,t=[],i=arguments.length;while(i--)t[i]=arguments[i];var r=t[0],s=t[1],n=t[2],a=t[3];function l(e){var t=e.target;if(t){var i=e.target.dom7EventData||[];if(i.indexOf(e)<0&&i.unshift(e),o(t).is(s))n.apply(t,i);else for(var r=o(t).parents(),a=0;a<r.length;a+=1)o(r[a]).is(s)&&n.apply(r[a],i)}}function d(e){var t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),n.apply(this,t)}"function"===typeof t[1]&&(e=t,r=e[0],n=e[1],a=e[2],s=void 0),a||(a=!1);for(var u,c=r.split(" "),h=0;h<this.length;h+=1){var p=this[h];if(s)for(u=0;u<c.length;u+=1){var f=c[u];p.dom7LiveListeners||(p.dom7LiveListeners={}),p.dom7LiveListeners[f]||(p.dom7LiveListeners[f]=[]),p.dom7LiveListeners[f].push({listener:n,proxyListener:l}),p.addEventListener(f,l,a)}else for(u=0;u<c.length;u+=1){var m=c[u];p.dom7Listeners||(p.dom7Listeners={}),p.dom7Listeners[m]||(p.dom7Listeners[m]=[]),p.dom7Listeners[m].push({listener:n,proxyListener:d}),p.addEventListener(m,d,a)}}return this}function b(){var e,t=[],i=arguments.length;while(i--)t[i]=arguments[i];var r=t[0],s=t[1],n=t[2],a=t[3];"function"===typeof t[1]&&(e=t,r=e[0],n=e[1],a=e[2],s=void 0),a||(a=!1);for(var o=r.split(" "),l=0;l<o.length;l+=1)for(var d=o[l],u=0;u<this.length;u+=1){var c=this[u],h=void 0;if(!s&&c.dom7Listeners?h=c.dom7Listeners[d]:s&&c.dom7LiveListeners&&(h=c.dom7LiveListeners[d]),h&&h.length)for(var p=h.length-1;p>=0;p-=1){var f=h[p];n&&f.listener===n||n&&f.listener&&f.listener.dom7proxy&&f.listener.dom7proxy===n?(c.removeEventListener(d,f.proxyListener,a),h.splice(p,1)):n||(c.removeEventListener(d,f.proxyListener,a),h.splice(p,1))}}return this}function _(){var e=[],t=arguments.length;while(t--)e[t]=arguments[t];for(var r=e[0].split(" "),n=e[1],a=0;a<r.length;a+=1)for(var o=r[a],l=0;l<this.length;l+=1){var d=this[l],u=void 0;try{u=new s.CustomEvent(o,{detail:n,bubbles:!0,cancelable:!0})}catch(c){u=i.createEvent("Event"),u.initEvent(o,!0,!0),u.detail=n}d.dom7EventData=e.filter((function(e,t){return t>0})),d.dispatchEvent(u),d.dom7EventData=[],delete d.dom7EventData}return this}function T(e){var t,i=["webkitTransitionEnd","transitionend"],r=this;function s(n){if(n.target===this)for(e.call(this,n),t=0;t<i.length;t+=1)r.off(i[t],s)}if(e)for(t=0;t<i.length;t+=1)r.on(i[t],s);return this}function S(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null}function w(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null}function E(){if(this.length>0){var e=this[0],t=e.getBoundingClientRect(),r=i.body,n=e.clientTop||r.clientTop||0,a=e.clientLeft||r.clientLeft||0,o=e===s?s.scrollY:e.scrollTop,l=e===s?s.scrollX:e.scrollLeft;return{top:t.top+o-n,left:t.left+l-a}}return null}function C(){return this[0]?s.getComputedStyle(this[0],null):{}}function x(e,t){var i;if(1===arguments.length){if("string"!==typeof e){for(i=0;i<this.length;i+=1)for(var r in e)this[i].style[r]=e[r];return this}if(this[0])return s.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"===typeof e){for(i=0;i<this.length;i+=1)this[i].style[e]=t;return this}return this}function k(e){if(!e)return this;for(var t=0;t<this.length;t+=1)if(!1===e.call(this[t],t,this[t]))return this;return this}function I(e){for(var t=[],i=this,r=0;r<i.length;r+=1)e.call(i[r],r,i[r])&&t.push(i[r]);return new a(t)}function A(e){if("undefined"===typeof e)return this[0]?this[0].innerHTML:void 0;for(var t=0;t<this.length;t+=1)this[t].innerHTML=e;return this}function P(e){if("undefined"===typeof e)return this[0]?this[0].textContent.trim():null;for(var t=0;t<this.length;t+=1)this[t].textContent=e;return this}function O(e){var t,r,n=this[0];if(!n||"undefined"===typeof e)return!1;if("string"===typeof e){if(n.matches)return n.matches(e);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(e);if(n.msMatchesSelector)return n.msMatchesSelector(e);for(t=o(e),r=0;r<t.length;r+=1)if(t[r]===n)return!0;return!1}if(e===i)return n===i;if(e===s)return n===s;if(e.nodeType||e instanceof a){for(t=e.nodeType?[e]:e,r=0;r<t.length;r+=1)if(t[r]===n)return!0;return!1}return!1}function L(){var e,t=this[0];if(t){e=0;while(null!==(t=t.previousSibling))1===t.nodeType&&(e+=1);return e}}function D(e){if("undefined"===typeof e)return this;var t,i=this.length;return e>i-1?new a([]):e<0?(t=i+e,new a(t<0?[]:[this[t]])):new a([this[e]])}function M(){var e,t=[],r=arguments.length;while(r--)t[r]=arguments[r];for(var s=0;s<t.length;s+=1){e=t[s];for(var n=0;n<this.length;n+=1)if("string"===typeof e){var o=i.createElement("div");o.innerHTML=e;while(o.firstChild)this[n].appendChild(o.firstChild)}else if(e instanceof a)for(var l=0;l<e.length;l+=1)this[n].appendChild(e[l]);else this[n].appendChild(e)}return this}function N(e){var t,r;for(t=0;t<this.length;t+=1)if("string"===typeof e){var s=i.createElement("div");for(s.innerHTML=e,r=s.childNodes.length-1;r>=0;r-=1)this[t].insertBefore(s.childNodes[r],this[t].childNodes[0])}else if(e instanceof a)for(r=0;r<e.length;r+=1)this[t].insertBefore(e[r],this[t].childNodes[0]);else this[t].insertBefore(e,this[t].childNodes[0]);return this}function R(e){return this.length>0?e?this[0].nextElementSibling&&o(this[0].nextElementSibling).is(e)?new a([this[0].nextElementSibling]):new a([]):this[0].nextElementSibling?new a([this[0].nextElementSibling]):new a([]):new a([])}function U(e){var t=[],i=this[0];if(!i)return new a([]);while(i.nextElementSibling){var r=i.nextElementSibling;e?o(r).is(e)&&t.push(r):t.push(r),i=r}return new a(t)}function B(e){if(this.length>0){var t=this[0];return e?t.previousElementSibling&&o(t.previousElementSibling).is(e)?new a([t.previousElementSibling]):new a([]):t.previousElementSibling?new a([t.previousElementSibling]):new a([])}return new a([])}function j(e){var t=[],i=this[0];if(!i)return new a([]);while(i.previousElementSibling){var r=i.previousElementSibling;e?o(r).is(e)&&t.push(r):t.push(r),i=r}return new a(t)}function F(e){for(var t=[],i=0;i<this.length;i+=1)null!==this[i].parentNode&&(e?o(this[i].parentNode).is(e)&&t.push(this[i].parentNode):t.push(this[i].parentNode));return o(l(t))}function q(e){for(var t=[],i=0;i<this.length;i+=1){var r=this[i].parentNode;while(r)e?o(r).is(e)&&t.push(r):t.push(r),r=r.parentNode}return o(l(t))}function $(e){var t=this;return"undefined"===typeof e?new a([]):(t.is(e)||(t=t.parents(e).eq(0)),t)}function H(e){for(var t=[],i=0;i<this.length;i+=1)for(var r=this[i].querySelectorAll(e),s=0;s<r.length;s+=1)t.push(r[s]);return new a(t)}function z(e){for(var t=[],i=0;i<this.length;i+=1)for(var r=this[i].childNodes,s=0;s<r.length;s+=1)e?1===r[s].nodeType&&o(r[s]).is(e)&&t.push(r[s]):1===r[s].nodeType&&t.push(r[s]);return new a(l(t))}function V(){for(var e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}function G(){var e=[],t=arguments.length;while(t--)e[t]=arguments[t];var i,r,s=this;for(i=0;i<e.length;i+=1){var n=o(e[i]);for(r=0;r<n.length;r+=1)s[s.length]=n[r],s.length+=1}return s}o.fn=a.prototype,o.Class=a,o.Dom7=a;var W={addClass:d,removeClass:u,hasClass:c,toggleClass:h,attr:p,removeAttr:f,data:m,transform:g,transition:y,on:v,off:b,trigger:_,transitionEnd:T,outerWidth:S,outerHeight:w,offset:E,css:x,each:k,html:A,text:P,is:O,index:L,eq:D,append:M,prepend:N,next:R,nextAll:U,prev:B,prevAll:j,parent:F,parents:q,closest:$,find:H,children:z,filter:I,remove:V,add:G,styles:C};Object.keys(W).forEach((function(e){o.fn[e]=o.fn[e]||W[e]}));var X={deleteProps:function(e){var t=e;Object.keys(t).forEach((function(e){try{t[e]=null}catch(i){}try{delete t[e]}catch(i){}}))},nextTick:function(e,t){return void 0===t&&(t=0),setTimeout(e,t)},now:function(){return Date.now()},getTranslate:function(e,t){var i,r,n;void 0===t&&(t="x");var a=s.getComputedStyle(e,null);return s.WebKitCSSMatrix?(r=a.transform||a.webkitTransform,r.split(",").length>6&&(r=r.split(", ").map((function(e){return e.replace(",",".")})).join(", ")),n=new s.WebKitCSSMatrix("none"===r?"":r)):(n=a.MozTransform||a.OTransform||a.MsTransform||a.msTransform||a.transform||a.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),i=n.toString().split(",")),"x"===t&&(r=s.WebKitCSSMatrix?n.m41:16===i.length?parseFloat(i[12]):parseFloat(i[4])),"y"===t&&(r=s.WebKitCSSMatrix?n.m42:16===i.length?parseFloat(i[13]):parseFloat(i[5])),r||0},parseUrlQuery:function(e){var t,i,r,n,a={},o=e||s.location.href;if("string"===typeof o&&o.length)for(o=o.indexOf("?")>-1?o.replace(/\S*\?/,""):"",i=o.split("&").filter((function(e){return""!==e})),n=i.length,t=0;t<n;t+=1)r=i[t].replace(/#\S+/g,"").split("="),a[decodeURIComponent(r[0])]="undefined"===typeof r[1]?void 0:decodeURIComponent(r[1])||"";return a},isObject:function(e){return"object"===typeof e&&null!==e&&e.constructor&&e.constructor===Object},extend:function(){var e=[],t=arguments.length;while(t--)e[t]=arguments[t];for(var i=Object(e[0]),r=1;r<e.length;r+=1){var s=e[r];if(void 0!==s&&null!==s)for(var n=Object.keys(Object(s)),a=0,o=n.length;a<o;a+=1){var l=n[a],d=Object.getOwnPropertyDescriptor(s,l);void 0!==d&&d.enumerable&&(X.isObject(i[l])&&X.isObject(s[l])?X.extend(i[l],s[l]):!X.isObject(i[l])&&X.isObject(s[l])?(i[l]={},X.extend(i[l],s[l])):i[l]=s[l])}}return i}},Y=function(){return{touch:!!("ontouchstart"in s||s.DocumentTouch&&i instanceof s.DocumentTouch),pointerEvents:!!s.PointerEvent&&"maxTouchPoints"in s.navigator&&s.navigator.maxTouchPoints>=0,observer:function(){return"MutationObserver"in s||"WebkitMutationObserver"in s}(),passiveListener:function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});s.addEventListener("testPassiveListener",null,t)}catch(i){}return e}(),gestures:function(){return"ongesturestart"in s}()}}(),K=function(e){void 0===e&&(e={});var t=this;t.params=e,t.eventsListeners={},t.params&&t.params.on&&Object.keys(t.params.on).forEach((function(e){t.on(e,t.params.on[e])}))},J={components:{configurable:!0}};function Q(){var e,t,i=this,r=i.$el;e="undefined"!==typeof i.params.width?i.params.width:r[0].clientWidth,t="undefined"!==typeof i.params.height?i.params.height:r[0].clientHeight,0===e&&i.isHorizontal()||0===t&&i.isVertical()||(e=e-parseInt(r.css("padding-left"),10)-parseInt(r.css("padding-right"),10),t=t-parseInt(r.css("padding-top"),10)-parseInt(r.css("padding-bottom"),10),X.extend(i,{width:e,height:t,size:i.isHorizontal()?e:t}))}function Z(){var e=this,t=e.params,i=e.$wrapperEl,r=e.size,n=e.rtlTranslate,a=e.wrongRTL,o=e.virtual&&t.virtual.enabled,l=o?e.virtual.slides.length:e.slides.length,d=i.children("."+e.params.slideClass),u=o?e.virtual.slides.length:d.length,c=[],h=[],p=[];function f(e){return!t.cssMode||e!==d.length-1}var m=t.slidesOffsetBefore;"function"===typeof m&&(m=t.slidesOffsetBefore.call(e));var g=t.slidesOffsetAfter;"function"===typeof g&&(g=t.slidesOffsetAfter.call(e));var y=e.snapGrid.length,v=e.snapGrid.length,b=t.spaceBetween,_=-m,T=0,S=0;if("undefined"!==typeof r){var w,E;"string"===typeof b&&b.indexOf("%")>=0&&(b=parseFloat(b.replace("%",""))/100*r),e.virtualSize=-b,n?d.css({marginLeft:"",marginTop:""}):d.css({marginRight:"",marginBottom:""}),t.slidesPerColumn>1&&(w=Math.floor(u/t.slidesPerColumn)===u/e.params.slidesPerColumn?u:Math.ceil(u/t.slidesPerColumn)*t.slidesPerColumn,"auto"!==t.slidesPerView&&"row"===t.slidesPerColumnFill&&(w=Math.max(w,t.slidesPerView*t.slidesPerColumn)));for(var C,x=t.slidesPerColumn,k=w/x,I=Math.floor(u/t.slidesPerColumn),A=0;A<u;A+=1){E=0;var P=d.eq(A);if(t.slidesPerColumn>1){var O=void 0,L=void 0,D=void 0;if("row"===t.slidesPerColumnFill&&t.slidesPerGroup>1){var M=Math.floor(A/(t.slidesPerGroup*t.slidesPerColumn)),N=A-t.slidesPerColumn*t.slidesPerGroup*M,R=0===M?t.slidesPerGroup:Math.min(Math.ceil((u-M*x*t.slidesPerGroup)/x),t.slidesPerGroup);D=Math.floor(N/R),L=N-D*R+M*t.slidesPerGroup,O=L+D*w/x,P.css({"-webkit-box-ordinal-group":O,"-moz-box-ordinal-group":O,"-ms-flex-order":O,"-webkit-order":O,order:O})}else"column"===t.slidesPerColumnFill?(L=Math.floor(A/x),D=A-L*x,(L>I||L===I&&D===x-1)&&(D+=1,D>=x&&(D=0,L+=1))):(D=Math.floor(A/k),L=A-D*k);P.css("margin-"+(e.isHorizontal()?"top":"left"),0!==D&&t.spaceBetween&&t.spaceBetween+"px")}if("none"!==P.css("display")){if("auto"===t.slidesPerView){var U=s.getComputedStyle(P[0],null),B=P[0].style.transform,j=P[0].style.webkitTransform;if(B&&(P[0].style.transform="none"),j&&(P[0].style.webkitTransform="none"),t.roundLengths)E=e.isHorizontal()?P.outerWidth(!0):P.outerHeight(!0);else if(e.isHorizontal()){var F=parseFloat(U.getPropertyValue("width")),q=parseFloat(U.getPropertyValue("padding-left")),$=parseFloat(U.getPropertyValue("padding-right")),H=parseFloat(U.getPropertyValue("margin-left")),z=parseFloat(U.getPropertyValue("margin-right")),V=U.getPropertyValue("box-sizing");E=V&&"border-box"===V?F+H+z:F+q+$+H+z}else{var G=parseFloat(U.getPropertyValue("height")),W=parseFloat(U.getPropertyValue("padding-top")),Y=parseFloat(U.getPropertyValue("padding-bottom")),K=parseFloat(U.getPropertyValue("margin-top")),J=parseFloat(U.getPropertyValue("margin-bottom")),Q=U.getPropertyValue("box-sizing");E=Q&&"border-box"===Q?G+K+J:G+W+Y+K+J}B&&(P[0].style.transform=B),j&&(P[0].style.webkitTransform=j),t.roundLengths&&(E=Math.floor(E))}else E=(r-(t.slidesPerView-1)*b)/t.slidesPerView,t.roundLengths&&(E=Math.floor(E)),d[A]&&(e.isHorizontal()?d[A].style.width=E+"px":d[A].style.height=E+"px");d[A]&&(d[A].swiperSlideSize=E),p.push(E),t.centeredSlides?(_=_+E/2+T/2+b,0===T&&0!==A&&(_=_-r/2-b),0===A&&(_=_-r/2-b),Math.abs(_)<.001&&(_=0),t.roundLengths&&(_=Math.floor(_)),S%t.slidesPerGroup===0&&c.push(_),h.push(_)):(t.roundLengths&&(_=Math.floor(_)),(S-Math.min(e.params.slidesPerGroupSkip,S))%e.params.slidesPerGroup===0&&c.push(_),h.push(_),_=_+E+b),e.virtualSize+=E+b,T=E,S+=1}}if(e.virtualSize=Math.max(e.virtualSize,r)+g,n&&a&&("slide"===t.effect||"coverflow"===t.effect)&&i.css({width:e.virtualSize+t.spaceBetween+"px"}),t.setWrapperSize&&(e.isHorizontal()?i.css({width:e.virtualSize+t.spaceBetween+"px"}):i.css({height:e.virtualSize+t.spaceBetween+"px"})),t.slidesPerColumn>1&&(e.virtualSize=(E+t.spaceBetween)*w,e.virtualSize=Math.ceil(e.virtualSize/t.slidesPerColumn)-t.spaceBetween,e.isHorizontal()?i.css({width:e.virtualSize+t.spaceBetween+"px"}):i.css({height:e.virtualSize+t.spaceBetween+"px"}),t.centeredSlides)){C=[];for(var Z=0;Z<c.length;Z+=1){var ee=c[Z];t.roundLengths&&(ee=Math.floor(ee)),c[Z]<e.virtualSize+c[0]&&C.push(ee)}c=C}if(!t.centeredSlides){C=[];for(var te=0;te<c.length;te+=1){var ie=c[te];t.roundLengths&&(ie=Math.floor(ie)),c[te]<=e.virtualSize-r&&C.push(ie)}c=C,Math.floor(e.virtualSize-r)-Math.floor(c[c.length-1])>1&&c.push(e.virtualSize-r)}if(0===c.length&&(c=[0]),0!==t.spaceBetween&&(e.isHorizontal()?n?d.filter(f).css({marginLeft:b+"px"}):d.filter(f).css({marginRight:b+"px"}):d.filter(f).css({marginBottom:b+"px"})),t.centeredSlides&&t.centeredSlidesBounds){var re=0;p.forEach((function(e){re+=e+(t.spaceBetween?t.spaceBetween:0)})),re-=t.spaceBetween;var se=re-r;c=c.map((function(e){return e<0?-m:e>se?se+g:e}))}if(t.centerInsufficientSlides){var ne=0;if(p.forEach((function(e){ne+=e+(t.spaceBetween?t.spaceBetween:0)})),ne-=t.spaceBetween,ne<r){var ae=(r-ne)/2;c.forEach((function(e,t){c[t]=e-ae})),h.forEach((function(e,t){h[t]=e+ae}))}}X.extend(e,{slides:d,snapGrid:c,slidesGrid:h,slidesSizesGrid:p}),u!==l&&e.emit("slidesLengthChange"),c.length!==y&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==v&&e.emit("slidesGridLengthChange"),(t.watchSlidesProgress||t.watchSlidesVisibility)&&e.updateSlidesOffset()}}function ee(e){var t,i=this,r=[],s=0;if("number"===typeof e?i.setTransition(e):!0===e&&i.setTransition(i.params.speed),"auto"!==i.params.slidesPerView&&i.params.slidesPerView>1)if(i.params.centeredSlides)i.visibleSlides.each((function(e,t){r.push(t)}));else for(t=0;t<Math.ceil(i.params.slidesPerView);t+=1){var n=i.activeIndex+t;if(n>i.slides.length)break;r.push(i.slides.eq(n)[0])}else r.push(i.slides.eq(i.activeIndex)[0]);for(t=0;t<r.length;t+=1)if("undefined"!==typeof r[t]){var a=r[t].offsetHeight;s=a>s?a:s}s&&i.$wrapperEl.css("height",s+"px")}function te(){for(var e=this,t=e.slides,i=0;i<t.length;i+=1)t[i].swiperSlideOffset=e.isHorizontal()?t[i].offsetLeft:t[i].offsetTop}function ie(e){void 0===e&&(e=this&&this.translate||0);var t=this,i=t.params,r=t.slides,s=t.rtlTranslate;if(0!==r.length){"undefined"===typeof r[0].swiperSlideOffset&&t.updateSlidesOffset();var n=-e;s&&(n=e),r.removeClass(i.slideVisibleClass),t.visibleSlidesIndexes=[],t.visibleSlides=[];for(var a=0;a<r.length;a+=1){var l=r[a],d=(n+(i.centeredSlides?t.minTranslate():0)-l.swiperSlideOffset)/(l.swiperSlideSize+i.spaceBetween);if(i.watchSlidesVisibility||i.centeredSlides&&i.autoHeight){var u=-(n-l.swiperSlideOffset),c=u+t.slidesSizesGrid[a],h=u>=0&&u<t.size-1||c>1&&c<=t.size||u<=0&&c>=t.size;h&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(a),r.eq(a).addClass(i.slideVisibleClass))}l.progress=s?-d:d}t.visibleSlides=o(t.visibleSlides)}}function re(e){var t=this;if("undefined"===typeof e){var i=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*i||0}var r=t.params,s=t.maxTranslate()-t.minTranslate(),n=t.progress,a=t.isBeginning,o=t.isEnd,l=a,d=o;0===s?(n=0,a=!0,o=!0):(n=(e-t.minTranslate())/s,a=n<=0,o=n>=1),X.extend(t,{progress:n,isBeginning:a,isEnd:o}),(r.watchSlidesProgress||r.watchSlidesVisibility||r.centeredSlides&&r.autoHeight)&&t.updateSlidesProgress(e),a&&!l&&t.emit("reachBeginning toEdge"),o&&!d&&t.emit("reachEnd toEdge"),(l&&!a||d&&!o)&&t.emit("fromEdge"),t.emit("progress",n)}function se(){var e,t=this,i=t.slides,r=t.params,s=t.$wrapperEl,n=t.activeIndex,a=t.realIndex,o=t.virtual&&r.virtual.enabled;i.removeClass(r.slideActiveClass+" "+r.slideNextClass+" "+r.slidePrevClass+" "+r.slideDuplicateActiveClass+" "+r.slideDuplicateNextClass+" "+r.slideDuplicatePrevClass),e=o?t.$wrapperEl.find("."+r.slideClass+'[data-swiper-slide-index="'+n+'"]'):i.eq(n),e.addClass(r.slideActiveClass),r.loop&&(e.hasClass(r.slideDuplicateClass)?s.children("."+r.slideClass+":not(."+r.slideDuplicateClass+')[data-swiper-slide-index="'+a+'"]').addClass(r.slideDuplicateActiveClass):s.children("."+r.slideClass+"."+r.slideDuplicateClass+'[data-swiper-slide-index="'+a+'"]').addClass(r.slideDuplicateActiveClass));var l=e.nextAll("."+r.slideClass).eq(0).addClass(r.slideNextClass);r.loop&&0===l.length&&(l=i.eq(0),l.addClass(r.slideNextClass));var d=e.prevAll("."+r.slideClass).eq(0).addClass(r.slidePrevClass);r.loop&&0===d.length&&(d=i.eq(-1),d.addClass(r.slidePrevClass)),r.loop&&(l.hasClass(r.slideDuplicateClass)?s.children("."+r.slideClass+":not(."+r.slideDuplicateClass+')[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(r.slideDuplicateNextClass):s.children("."+r.slideClass+"."+r.slideDuplicateClass+'[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(r.slideDuplicateNextClass),d.hasClass(r.slideDuplicateClass)?s.children("."+r.slideClass+":not(."+r.slideDuplicateClass+')[data-swiper-slide-index="'+d.attr("data-swiper-slide-index")+'"]').addClass(r.slideDuplicatePrevClass):s.children("."+r.slideClass+"."+r.slideDuplicateClass+'[data-swiper-slide-index="'+d.attr("data-swiper-slide-index")+'"]').addClass(r.slideDuplicatePrevClass))}function ne(e){var t,i=this,r=i.rtlTranslate?i.translate:-i.translate,s=i.slidesGrid,n=i.snapGrid,a=i.params,o=i.activeIndex,l=i.realIndex,d=i.snapIndex,u=e;if("undefined"===typeof u){for(var c=0;c<s.length;c+=1)"undefined"!==typeof s[c+1]?r>=s[c]&&r<s[c+1]-(s[c+1]-s[c])/2?u=c:r>=s[c]&&r<s[c+1]&&(u=c+1):r>=s[c]&&(u=c);a.normalizeSlideIndex&&(u<0||"undefined"===typeof u)&&(u=0)}if(n.indexOf(r)>=0)t=n.indexOf(r);else{var h=Math.min(a.slidesPerGroupSkip,u);t=h+Math.floor((u-h)/a.slidesPerGroup)}if(t>=n.length&&(t=n.length-1),u!==o){var p=parseInt(i.slides.eq(u).attr("data-swiper-slide-index")||u,10);X.extend(i,{snapIndex:t,realIndex:p,previousIndex:o,activeIndex:u}),i.emit("activeIndexChange"),i.emit("snapIndexChange"),l!==p&&i.emit("realIndexChange"),(i.initialized||i.params.runCallbacksOnInit)&&i.emit("slideChange")}else t!==d&&(i.snapIndex=t,i.emit("snapIndexChange"))}function ae(e){var t=this,i=t.params,r=o(e.target).closest("."+i.slideClass)[0],s=!1;if(r)for(var n=0;n<t.slides.length;n+=1)t.slides[n]===r&&(s=!0);if(!r||!s)return t.clickedSlide=void 0,void(t.clickedIndex=void 0);t.clickedSlide=r,t.virtual&&t.params.virtual.enabled?t.clickedIndex=parseInt(o(r).attr("data-swiper-slide-index"),10):t.clickedIndex=o(r).index(),i.slideToClickedSlide&&void 0!==t.clickedIndex&&t.clickedIndex!==t.activeIndex&&t.slideToClickedSlide()}K.prototype.on=function(e,t,i){var r=this;if("function"!==typeof t)return r;var s=i?"unshift":"push";return e.split(" ").forEach((function(e){r.eventsListeners[e]||(r.eventsListeners[e]=[]),r.eventsListeners[e][s](t)})),r},K.prototype.once=function(e,t,i){var r=this;if("function"!==typeof t)return r;function s(){var i=[],n=arguments.length;while(n--)i[n]=arguments[n];r.off(e,s),s.f7proxy&&delete s.f7proxy,t.apply(r,i)}return s.f7proxy=t,r.on(e,s,i)},K.prototype.off=function(e,t){var i=this;return i.eventsListeners?(e.split(" ").forEach((function(e){"undefined"===typeof t?i.eventsListeners[e]=[]:i.eventsListeners[e]&&i.eventsListeners[e].length&&i.eventsListeners[e].forEach((function(r,s){(r===t||r.f7proxy&&r.f7proxy===t)&&i.eventsListeners[e].splice(s,1)}))})),i):i},K.prototype.emit=function(){var e=[],t=arguments.length;while(t--)e[t]=arguments[t];var i,r,s,n=this;if(!n.eventsListeners)return n;"string"===typeof e[0]||Array.isArray(e[0])?(i=e[0],r=e.slice(1,e.length),s=n):(i=e[0].events,r=e[0].data,s=e[0].context||n);var a=Array.isArray(i)?i:i.split(" ");return a.forEach((function(e){if(n.eventsListeners&&n.eventsListeners[e]){var t=[];n.eventsListeners[e].forEach((function(e){t.push(e)})),t.forEach((function(e){e.apply(s,r)}))}})),n},K.prototype.useModulesParams=function(e){var t=this;t.modules&&Object.keys(t.modules).forEach((function(i){var r=t.modules[i];r.params&&X.extend(e,r.params)}))},K.prototype.useModules=function(e){void 0===e&&(e={});var t=this;t.modules&&Object.keys(t.modules).forEach((function(i){var r=t.modules[i],s=e[i]||{};r.instance&&Object.keys(r.instance).forEach((function(e){var i=r.instance[e];t[e]="function"===typeof i?i.bind(t):i})),r.on&&t.on&&Object.keys(r.on).forEach((function(e){t.on(e,r.on[e])})),r.create&&r.create.bind(t)(s)}))},J.components.set=function(e){var t=this;t.use&&t.use(e)},K.installModule=function(e){var t=[],i=arguments.length-1;while(i-- >0)t[i]=arguments[i+1];var r=this;r.prototype.modules||(r.prototype.modules={});var s=e.name||Object.keys(r.prototype.modules).length+"_"+X.now();return r.prototype.modules[s]=e,e.proto&&Object.keys(e.proto).forEach((function(t){r.prototype[t]=e.proto[t]})),e.static&&Object.keys(e.static).forEach((function(t){r[t]=e.static[t]})),e.install&&e.install.apply(r,t),r},K.use=function(e){var t=[],i=arguments.length-1;while(i-- >0)t[i]=arguments[i+1];var r=this;return Array.isArray(e)?(e.forEach((function(e){return r.installModule(e)})),r):r.installModule.apply(r,[e].concat(t))},Object.defineProperties(K,J);var oe={updateSize:Q,updateSlides:Z,updateAutoHeight:ee,updateSlidesOffset:te,updateSlidesProgress:ie,updateProgress:re,updateSlidesClasses:se,updateActiveIndex:ne,updateClickedSlide:ae};function le(e){void 0===e&&(e=this.isHorizontal()?"x":"y");var t=this,i=t.params,r=t.rtlTranslate,s=t.translate,n=t.$wrapperEl;if(i.virtualTranslate)return r?-s:s;if(i.cssMode)return s;var a=X.getTranslate(n[0],e);return r&&(a=-a),a||0}function de(e,t){var i,r=this,s=r.rtlTranslate,n=r.params,a=r.$wrapperEl,o=r.wrapperEl,l=r.progress,d=0,u=0,c=0;r.isHorizontal()?d=s?-e:e:u=e,n.roundLengths&&(d=Math.floor(d),u=Math.floor(u)),n.cssMode?o[r.isHorizontal()?"scrollLeft":"scrollTop"]=r.isHorizontal()?-d:-u:n.virtualTranslate||a.transform("translate3d("+d+"px, "+u+"px, "+c+"px)"),r.previousTranslate=r.translate,r.translate=r.isHorizontal()?d:u;var h=r.maxTranslate()-r.minTranslate();i=0===h?0:(e-r.minTranslate())/h,i!==l&&r.updateProgress(e),r.emit("setTranslate",r.translate,t)}function ue(){return-this.snapGrid[0]}function ce(){return-this.snapGrid[this.snapGrid.length-1]}function he(e,t,i,r,s){var n;void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===i&&(i=!0),void 0===r&&(r=!0);var a=this,o=a.params,l=a.wrapperEl;if(a.animating&&o.preventInteractionOnTransition)return!1;var d,u=a.minTranslate(),c=a.maxTranslate();if(d=r&&e>u?u:r&&e<c?c:e,a.updateProgress(d),o.cssMode){var h=a.isHorizontal();return 0===t?l[h?"scrollLeft":"scrollTop"]=-d:l.scrollTo?l.scrollTo((n={},n[h?"left":"top"]=-d,n.behavior="smooth",n)):l[h?"scrollLeft":"scrollTop"]=-d,!0}return 0===t?(a.setTransition(0),a.setTranslate(d),i&&(a.emit("beforeTransitionStart",t,s),a.emit("transitionEnd"))):(a.setTransition(t),a.setTranslate(d),i&&(a.emit("beforeTransitionStart",t,s),a.emit("transitionStart")),a.animating||(a.animating=!0,a.onTranslateToWrapperTransitionEnd||(a.onTranslateToWrapperTransitionEnd=function(e){a&&!a.destroyed&&e.target===this&&(a.$wrapperEl[0].removeEventListener("transitionend",a.onTranslateToWrapperTransitionEnd),a.$wrapperEl[0].removeEventListener("webkitTransitionEnd",a.onTranslateToWrapperTransitionEnd),a.onTranslateToWrapperTransitionEnd=null,delete a.onTranslateToWrapperTransitionEnd,i&&a.emit("transitionEnd"))}),a.$wrapperEl[0].addEventListener("transitionend",a.onTranslateToWrapperTransitionEnd),a.$wrapperEl[0].addEventListener("webkitTransitionEnd",a.onTranslateToWrapperTransitionEnd))),!0}var pe={getTranslate:le,setTranslate:de,minTranslate:ue,maxTranslate:ce,translateTo:he};function fe(e,t){var i=this;i.params.cssMode||i.$wrapperEl.transition(e),i.emit("setTransition",e,t)}function me(e,t){void 0===e&&(e=!0);var i=this,r=i.activeIndex,s=i.params,n=i.previousIndex;if(!s.cssMode){s.autoHeight&&i.updateAutoHeight();var a=t;if(a||(a=r>n?"next":r<n?"prev":"reset"),i.emit("transitionStart"),e&&r!==n){if("reset"===a)return void i.emit("slideResetTransitionStart");i.emit("slideChangeTransitionStart"),"next"===a?i.emit("slideNextTransitionStart"):i.emit("slidePrevTransitionStart")}}}function ge(e,t){void 0===e&&(e=!0);var i=this,r=i.activeIndex,s=i.previousIndex,n=i.params;if(i.animating=!1,!n.cssMode){i.setTransition(0);var a=t;if(a||(a=r>s?"next":r<s?"prev":"reset"),i.emit("transitionEnd"),e&&r!==s){if("reset"===a)return void i.emit("slideResetTransitionEnd");i.emit("slideChangeTransitionEnd"),"next"===a?i.emit("slideNextTransitionEnd"):i.emit("slidePrevTransitionEnd")}}}var ye={setTransition:fe,transitionStart:me,transitionEnd:ge};function ve(e,t,i,r){var s;void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===i&&(i=!0);var n=this,a=e;a<0&&(a=0);var o=n.params,l=n.snapGrid,d=n.slidesGrid,u=n.previousIndex,c=n.activeIndex,h=n.rtlTranslate,p=n.wrapperEl;if(n.animating&&o.preventInteractionOnTransition)return!1;var f=Math.min(n.params.slidesPerGroupSkip,a),m=f+Math.floor((a-f)/n.params.slidesPerGroup);m>=l.length&&(m=l.length-1),(c||o.initialSlide||0)===(u||0)&&i&&n.emit("beforeSlideChangeStart");var g,y=-l[m];if(n.updateProgress(y),o.normalizeSlideIndex)for(var v=0;v<d.length;v+=1)-Math.floor(100*y)>=Math.floor(100*d[v])&&(a=v);if(n.initialized&&a!==c){if(!n.allowSlideNext&&y<n.translate&&y<n.minTranslate())return!1;if(!n.allowSlidePrev&&y>n.translate&&y>n.maxTranslate()&&(c||0)!==a)return!1}if(g=a>c?"next":a<c?"prev":"reset",h&&-y===n.translate||!h&&y===n.translate)return n.updateActiveIndex(a),o.autoHeight&&n.updateAutoHeight(),n.updateSlidesClasses(),"slide"!==o.effect&&n.setTranslate(y),"reset"!==g&&(n.transitionStart(i,g),n.transitionEnd(i,g)),!1;if(o.cssMode){var b=n.isHorizontal(),_=-y;return h&&(_=p.scrollWidth-p.offsetWidth-_),0===t?p[b?"scrollLeft":"scrollTop"]=_:p.scrollTo?p.scrollTo((s={},s[b?"left":"top"]=_,s.behavior="smooth",s)):p[b?"scrollLeft":"scrollTop"]=_,!0}return 0===t?(n.setTransition(0),n.setTranslate(y),n.updateActiveIndex(a),n.updateSlidesClasses(),n.emit("beforeTransitionStart",t,r),n.transitionStart(i,g),n.transitionEnd(i,g)):(n.setTransition(t),n.setTranslate(y),n.updateActiveIndex(a),n.updateSlidesClasses(),n.emit("beforeTransitionStart",t,r),n.transitionStart(i,g),n.animating||(n.animating=!0,n.onSlideToWrapperTransitionEnd||(n.onSlideToWrapperTransitionEnd=function(e){n&&!n.destroyed&&e.target===this&&(n.$wrapperEl[0].removeEventListener("transitionend",n.onSlideToWrapperTransitionEnd),n.$wrapperEl[0].removeEventListener("webkitTransitionEnd",n.onSlideToWrapperTransitionEnd),n.onSlideToWrapperTransitionEnd=null,delete n.onSlideToWrapperTransitionEnd,n.transitionEnd(i,g))}),n.$wrapperEl[0].addEventListener("transitionend",n.onSlideToWrapperTransitionEnd),n.$wrapperEl[0].addEventListener("webkitTransitionEnd",n.onSlideToWrapperTransitionEnd))),!0}function be(e,t,i,r){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===i&&(i=!0);var s=this,n=e;return s.params.loop&&(n+=s.loopedSlides),s.slideTo(n,t,i,r)}function _e(e,t,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var r=this,s=r.params,n=r.animating,a=r.activeIndex<s.slidesPerGroupSkip?1:s.slidesPerGroup;if(s.loop){if(n)return!1;r.loopFix(),r._clientLeft=r.$wrapperEl[0].clientLeft}return r.slideTo(r.activeIndex+a,e,t,i)}function Te(e,t,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var r=this,s=r.params,n=r.animating,a=r.snapGrid,o=r.slidesGrid,l=r.rtlTranslate;if(s.loop){if(n)return!1;r.loopFix(),r._clientLeft=r.$wrapperEl[0].clientLeft}var d=l?r.translate:-r.translate;function u(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}var c,h=u(d),p=a.map((function(e){return u(e)})),f=(o.map((function(e){return u(e)})),a[p.indexOf(h)],a[p.indexOf(h)-1]);return"undefined"===typeof f&&s.cssMode&&a.forEach((function(e){!f&&h>=e&&(f=e)})),"undefined"!==typeof f&&(c=o.indexOf(f),c<0&&(c=r.activeIndex-1)),r.slideTo(c,e,t,i)}function Se(e,t,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var r=this;return r.slideTo(r.activeIndex,e,t,i)}function we(e,t,i,r){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),void 0===r&&(r=.5);var s=this,n=s.activeIndex,a=Math.min(s.params.slidesPerGroupSkip,n),o=a+Math.floor((n-a)/s.params.slidesPerGroup),l=s.rtlTranslate?s.translate:-s.translate;if(l>=s.snapGrid[o]){var d=s.snapGrid[o],u=s.snapGrid[o+1];l-d>(u-d)*r&&(n+=s.params.slidesPerGroup)}else{var c=s.snapGrid[o-1],h=s.snapGrid[o];l-c<=(h-c)*r&&(n-=s.params.slidesPerGroup)}return n=Math.max(n,0),n=Math.min(n,s.slidesGrid.length-1),s.slideTo(n,e,t,i)}function Ee(){var e,t=this,i=t.params,r=t.$wrapperEl,s="auto"===i.slidesPerView?t.slidesPerViewDynamic():i.slidesPerView,n=t.clickedIndex;if(i.loop){if(t.animating)return;e=parseInt(o(t.clickedSlide).attr("data-swiper-slide-index"),10),i.centeredSlides?n<t.loopedSlides-s/2||n>t.slides.length-t.loopedSlides+s/2?(t.loopFix(),n=r.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),X.nextTick((function(){t.slideTo(n)}))):t.slideTo(n):n>t.slides.length-s?(t.loopFix(),n=r.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),X.nextTick((function(){t.slideTo(n)}))):t.slideTo(n)}else t.slideTo(n)}var Ce={slideTo:ve,slideToLoop:be,slideNext:_e,slidePrev:Te,slideReset:Se,slideToClosest:we,slideToClickedSlide:Ee};function xe(){var e=this,t=e.params,r=e.$wrapperEl;r.children("."+t.slideClass+"."+t.slideDuplicateClass).remove();var s=r.children("."+t.slideClass);if(t.loopFillGroupWithBlank){var n=t.slidesPerGroup-s.length%t.slidesPerGroup;if(n!==t.slidesPerGroup){for(var a=0;a<n;a+=1){var l=o(i.createElement("div")).addClass(t.slideClass+" "+t.slideBlankClass);r.append(l)}s=r.children("."+t.slideClass)}}"auto"!==t.slidesPerView||t.loopedSlides||(t.loopedSlides=s.length),e.loopedSlides=Math.ceil(parseFloat(t.loopedSlides||t.slidesPerView,10)),e.loopedSlides+=t.loopAdditionalSlides,e.loopedSlides>s.length&&(e.loopedSlides=s.length);var d=[],u=[];s.each((function(t,i){var r=o(i);t<e.loopedSlides&&u.push(i),t<s.length&&t>=s.length-e.loopedSlides&&d.push(i),r.attr("data-swiper-slide-index",t)}));for(var c=0;c<u.length;c+=1)r.append(o(u[c].cloneNode(!0)).addClass(t.slideDuplicateClass));for(var h=d.length-1;h>=0;h-=1)r.prepend(o(d[h].cloneNode(!0)).addClass(t.slideDuplicateClass))}function ke(){var e=this;e.emit("beforeLoopFix");var t,i=e.activeIndex,r=e.slides,s=e.loopedSlides,n=e.allowSlidePrev,a=e.allowSlideNext,o=e.snapGrid,l=e.rtlTranslate;e.allowSlidePrev=!0,e.allowSlideNext=!0;var d=-o[i],u=d-e.getTranslate();if(i<s){t=r.length-3*s+i,t+=s;var c=e.slideTo(t,0,!1,!0);c&&0!==u&&e.setTranslate((l?-e.translate:e.translate)-u)}else if(i>=r.length-s){t=-r.length+i+s,t+=s;var h=e.slideTo(t,0,!1,!0);h&&0!==u&&e.setTranslate((l?-e.translate:e.translate)-u)}e.allowSlidePrev=n,e.allowSlideNext=a,e.emit("loopFix")}function Ie(){var e=this,t=e.$wrapperEl,i=e.params,r=e.slides;t.children("."+i.slideClass+"."+i.slideDuplicateClass+",."+i.slideClass+"."+i.slideBlankClass).remove(),r.removeAttr("data-swiper-slide-index")}var Ae={loopCreate:xe,loopFix:ke,loopDestroy:Ie};function Pe(e){var t=this;if(!(Y.touch||!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)){var i=t.el;i.style.cursor="move",i.style.cursor=e?"-webkit-grabbing":"-webkit-grab",i.style.cursor=e?"-moz-grabbin":"-moz-grab",i.style.cursor=e?"grabbing":"grab"}}function Oe(){var e=this;Y.touch||e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.el.style.cursor="")}var Le={setGrabCursor:Pe,unsetGrabCursor:Oe};function De(e){var t=this,i=t.$wrapperEl,r=t.params;if(r.loop&&t.loopDestroy(),"object"===typeof e&&"length"in e)for(var s=0;s<e.length;s+=1)e[s]&&i.append(e[s]);else i.append(e);r.loop&&t.loopCreate(),r.observer&&Y.observer||t.update()}function Me(e){var t=this,i=t.params,r=t.$wrapperEl,s=t.activeIndex;i.loop&&t.loopDestroy();var n=s+1;if("object"===typeof e&&"length"in e){for(var a=0;a<e.length;a+=1)e[a]&&r.prepend(e[a]);n=s+e.length}else r.prepend(e);i.loop&&t.loopCreate(),i.observer&&Y.observer||t.update(),t.slideTo(n,0,!1)}function Ne(e,t){var i=this,r=i.$wrapperEl,s=i.params,n=i.activeIndex,a=n;s.loop&&(a-=i.loopedSlides,i.loopDestroy(),i.slides=r.children("."+s.slideClass));var o=i.slides.length;if(e<=0)i.prependSlide(t);else if(e>=o)i.appendSlide(t);else{for(var l=a>e?a+1:a,d=[],u=o-1;u>=e;u-=1){var c=i.slides.eq(u);c.remove(),d.unshift(c)}if("object"===typeof t&&"length"in t){for(var h=0;h<t.length;h+=1)t[h]&&r.append(t[h]);l=a>e?a+t.length:a}else r.append(t);for(var p=0;p<d.length;p+=1)r.append(d[p]);s.loop&&i.loopCreate(),s.observer&&Y.observer||i.update(),s.loop?i.slideTo(l+i.loopedSlides,0,!1):i.slideTo(l,0,!1)}}function Re(e){var t=this,i=t.params,r=t.$wrapperEl,s=t.activeIndex,n=s;i.loop&&(n-=t.loopedSlides,t.loopDestroy(),t.slides=r.children("."+i.slideClass));var a,o=n;if("object"===typeof e&&"length"in e){for(var l=0;l<e.length;l+=1)a=e[l],t.slides[a]&&t.slides.eq(a).remove(),a<o&&(o-=1);o=Math.max(o,0)}else a=e,t.slides[a]&&t.slides.eq(a).remove(),a<o&&(o-=1),o=Math.max(o,0);i.loop&&t.loopCreate(),i.observer&&Y.observer||t.update(),i.loop?t.slideTo(o+t.loopedSlides,0,!1):t.slideTo(o,0,!1)}function Ue(){for(var e=this,t=[],i=0;i<e.slides.length;i+=1)t.push(i);e.removeSlide(t)}var Be={appendSlide:De,prependSlide:Me,addSlide:Ne,removeSlide:Re,removeAllSlides:Ue},je=function(){var e=s.navigator.platform,t=s.navigator.userAgent,i={ios:!1,android:!1,androidChrome:!1,desktop:!1,iphone:!1,ipod:!1,ipad:!1,edge:!1,ie:!1,firefox:!1,macos:!1,windows:!1,cordova:!(!s.cordova&&!s.phonegap),phonegap:!(!s.cordova&&!s.phonegap),electron:!1},r=s.screen.width,n=s.screen.height,a=t.match(/(Android);?[\s\/]+([\d.]+)?/),o=t.match(/(iPad).*OS\s([\d_]+)/),l=t.match(/(iPod)(.*OS\s([\d_]+))?/),d=!o&&t.match(/(iPhone\sOS|iOS)\s([\d_]+)/),u=t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0,c=t.indexOf("Edge/")>=0,h=t.indexOf("Gecko/")>=0&&t.indexOf("Firefox/")>=0,p="Win32"===e,f=t.toLowerCase().indexOf("electron")>=0,m="MacIntel"===e;return!o&&m&&Y.touch&&(1024===r&&1366===n||834===r&&1194===n||834===r&&1112===n||768===r&&1024===n)&&(o=t.match(/(Version)\/([\d.]+)/),m=!1),i.ie=u,i.edge=c,i.firefox=h,a&&!p&&(i.os="android",i.osVersion=a[2],i.android=!0,i.androidChrome=t.toLowerCase().indexOf("chrome")>=0),(o||d||l)&&(i.os="ios",i.ios=!0),d&&!l&&(i.osVersion=d[2].replace(/_/g,"."),i.iphone=!0),o&&(i.osVersion=o[2].replace(/_/g,"."),i.ipad=!0),l&&(i.osVersion=l[3]?l[3].replace(/_/g,"."):null,i.ipod=!0),i.ios&&i.osVersion&&t.indexOf("Version/")>=0&&"10"===i.osVersion.split(".")[0]&&(i.osVersion=t.toLowerCase().split("version/")[1].split(" ")[0]),i.webView=!(!(d||o||l)||!t.match(/.*AppleWebKit(?!.*Safari)/i)&&!s.navigator.standalone)||s.matchMedia&&s.matchMedia("(display-mode: standalone)").matches,i.webview=i.webView,i.standalone=i.webView,i.desktop=!(i.ios||i.android)||f,i.desktop&&(i.electron=f,i.macos=m,i.windows=p,i.macos&&(i.os="macos"),i.windows&&(i.os="windows")),i.pixelRatio=s.devicePixelRatio||1,i}();function Fe(e){var t=this,r=t.touchEventsData,n=t.params,a=t.touches;if(!t.animating||!n.preventInteractionOnTransition){var l=e;l.originalEvent&&(l=l.originalEvent);var d=o(l.target);if(("wrapper"!==n.touchEventsTarget||d.closest(t.wrapperEl).length)&&(r.isTouchEvent="touchstart"===l.type,(r.isTouchEvent||!("which"in l)||3!==l.which)&&!(!r.isTouchEvent&&"button"in l&&l.button>0)&&(!r.isTouched||!r.isMoved)))if(n.noSwiping&&d.closest(n.noSwipingSelector?n.noSwipingSelector:"."+n.noSwipingClass)[0])t.allowClick=!0;else if(!n.swipeHandler||d.closest(n.swipeHandler)[0]){a.currentX="touchstart"===l.type?l.targetTouches[0].pageX:l.pageX,a.currentY="touchstart"===l.type?l.targetTouches[0].pageY:l.pageY;var u=a.currentX,c=a.currentY,h=n.edgeSwipeDetection||n.iOSEdgeSwipeDetection,p=n.edgeSwipeThreshold||n.iOSEdgeSwipeThreshold;if(!h||!(u<=p||u>=s.screen.width-p)){if(X.extend(r,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),a.startX=u,a.startY=c,r.touchStartTime=X.now(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,n.threshold>0&&(r.allowThresholdMove=!1),"touchstart"!==l.type){var f=!0;d.is(r.formElements)&&(f=!1),i.activeElement&&o(i.activeElement).is(r.formElements)&&i.activeElement!==d[0]&&i.activeElement.blur();var m=f&&t.allowTouchMove&&n.touchStartPreventDefault;(n.touchStartForcePreventDefault||m)&&l.preventDefault()}t.emit("touchStart",l)}}}}function qe(e){var t=this,r=t.touchEventsData,s=t.params,n=t.touches,a=t.rtlTranslate,l=e;if(l.originalEvent&&(l=l.originalEvent),r.isTouched){if(!r.isTouchEvent||"touchmove"===l.type){var d="touchmove"===l.type&&l.targetTouches&&(l.targetTouches[0]||l.changedTouches[0]),u="touchmove"===l.type?d.pageX:l.pageX,c="touchmove"===l.type?d.pageY:l.pageY;if(l.preventedByNestedSwiper)return n.startX=u,void(n.startY=c);if(!t.allowTouchMove)return t.allowClick=!1,void(r.isTouched&&(X.extend(n,{startX:u,startY:c,currentX:u,currentY:c}),r.touchStartTime=X.now()));if(r.isTouchEvent&&s.touchReleaseOnEdges&&!s.loop)if(t.isVertical()){if(c<n.startY&&t.translate<=t.maxTranslate()||c>n.startY&&t.translate>=t.minTranslate())return r.isTouched=!1,void(r.isMoved=!1)}else if(u<n.startX&&t.translate<=t.maxTranslate()||u>n.startX&&t.translate>=t.minTranslate())return;if(r.isTouchEvent&&i.activeElement&&l.target===i.activeElement&&o(l.target).is(r.formElements))return r.isMoved=!0,void(t.allowClick=!1);if(r.allowTouchCallbacks&&t.emit("touchMove",l),!(l.targetTouches&&l.targetTouches.length>1)){n.currentX=u,n.currentY=c;var h=n.currentX-n.startX,p=n.currentY-n.startY;if(!(t.params.threshold&&Math.sqrt(Math.pow(h,2)+Math.pow(p,2))<t.params.threshold)){var f;if("undefined"===typeof r.isScrolling)t.isHorizontal()&&n.currentY===n.startY||t.isVertical()&&n.currentX===n.startX?r.isScrolling=!1:h*h+p*p>=25&&(f=180*Math.atan2(Math.abs(p),Math.abs(h))/Math.PI,r.isScrolling=t.isHorizontal()?f>s.touchAngle:90-f>s.touchAngle);if(r.isScrolling&&t.emit("touchMoveOpposite",l),"undefined"===typeof r.startMoving&&(n.currentX===n.startX&&n.currentY===n.startY||(r.startMoving=!0)),r.isScrolling)r.isTouched=!1;else if(r.startMoving){t.allowClick=!1,!s.cssMode&&l.cancelable&&l.preventDefault(),s.touchMoveStopPropagation&&!s.nested&&l.stopPropagation(),r.isMoved||(s.loop&&t.loopFix(),r.startTranslate=t.getTranslate(),t.setTransition(0),t.animating&&t.$wrapperEl.trigger("webkitTransitionEnd transitionend"),r.allowMomentumBounce=!1,!s.grabCursor||!0!==t.allowSlideNext&&!0!==t.allowSlidePrev||t.setGrabCursor(!0),t.emit("sliderFirstMove",l)),t.emit("sliderMove",l),r.isMoved=!0;var m=t.isHorizontal()?h:p;n.diff=m,m*=s.touchRatio,a&&(m=-m),t.swipeDirection=m>0?"prev":"next",r.currentTranslate=m+r.startTranslate;var g=!0,y=s.resistanceRatio;if(s.touchReleaseOnEdges&&(y=0),m>0&&r.currentTranslate>t.minTranslate()?(g=!1,s.resistance&&(r.currentTranslate=t.minTranslate()-1+Math.pow(-t.minTranslate()+r.startTranslate+m,y))):m<0&&r.currentTranslate<t.maxTranslate()&&(g=!1,s.resistance&&(r.currentTranslate=t.maxTranslate()+1-Math.pow(t.maxTranslate()-r.startTranslate-m,y))),g&&(l.preventedByNestedSwiper=!0),!t.allowSlideNext&&"next"===t.swipeDirection&&r.currentTranslate<r.startTranslate&&(r.currentTranslate=r.startTranslate),!t.allowSlidePrev&&"prev"===t.swipeDirection&&r.currentTranslate>r.startTranslate&&(r.currentTranslate=r.startTranslate),s.threshold>0){if(!(Math.abs(m)>s.threshold||r.allowThresholdMove))return void(r.currentTranslate=r.startTranslate);if(!r.allowThresholdMove)return r.allowThresholdMove=!0,n.startX=n.currentX,n.startY=n.currentY,r.currentTranslate=r.startTranslate,void(n.diff=t.isHorizontal()?n.currentX-n.startX:n.currentY-n.startY)}s.followFinger&&!s.cssMode&&((s.freeMode||s.watchSlidesProgress||s.watchSlidesVisibility)&&(t.updateActiveIndex(),t.updateSlidesClasses()),s.freeMode&&(0===r.velocities.length&&r.velocities.push({position:n[t.isHorizontal()?"startX":"startY"],time:r.touchStartTime}),r.velocities.push({position:n[t.isHorizontal()?"currentX":"currentY"],time:X.now()})),t.updateProgress(r.currentTranslate),t.setTranslate(r.currentTranslate))}}}}}else r.startMoving&&r.isScrolling&&t.emit("touchMoveOpposite",l)}function $e(e){var t=this,i=t.touchEventsData,r=t.params,s=t.touches,n=t.rtlTranslate,a=t.$wrapperEl,o=t.slidesGrid,l=t.snapGrid,d=e;if(d.originalEvent&&(d=d.originalEvent),i.allowTouchCallbacks&&t.emit("touchEnd",d),i.allowTouchCallbacks=!1,!i.isTouched)return i.isMoved&&r.grabCursor&&t.setGrabCursor(!1),i.isMoved=!1,void(i.startMoving=!1);r.grabCursor&&i.isMoved&&i.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);var u,c=X.now(),h=c-i.touchStartTime;if(t.allowClick&&(t.updateClickedSlide(d),t.emit("tap click",d),h<300&&c-i.lastClickTime<300&&t.emit("doubleTap doubleClick",d)),i.lastClickTime=X.now(),X.nextTick((function(){t.destroyed||(t.allowClick=!0)})),!i.isTouched||!i.isMoved||!t.swipeDirection||0===s.diff||i.currentTranslate===i.startTranslate)return i.isTouched=!1,i.isMoved=!1,void(i.startMoving=!1);if(i.isTouched=!1,i.isMoved=!1,i.startMoving=!1,u=r.followFinger?n?t.translate:-t.translate:-i.currentTranslate,!r.cssMode)if(r.freeMode){if(u<-t.minTranslate())return void t.slideTo(t.activeIndex);if(u>-t.maxTranslate())return void(t.slides.length<l.length?t.slideTo(l.length-1):t.slideTo(t.slides.length-1));if(r.freeModeMomentum){if(i.velocities.length>1){var p=i.velocities.pop(),f=i.velocities.pop(),m=p.position-f.position,g=p.time-f.time;t.velocity=m/g,t.velocity/=2,Math.abs(t.velocity)<r.freeModeMinimumVelocity&&(t.velocity=0),(g>150||X.now()-p.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=r.freeModeMomentumVelocityRatio,i.velocities.length=0;var y=1e3*r.freeModeMomentumRatio,v=t.velocity*y,b=t.translate+v;n&&(b=-b);var _,T,S=!1,w=20*Math.abs(t.velocity)*r.freeModeMomentumBounceRatio;if(b<t.maxTranslate())r.freeModeMomentumBounce?(b+t.maxTranslate()<-w&&(b=t.maxTranslate()-w),_=t.maxTranslate(),S=!0,i.allowMomentumBounce=!0):b=t.maxTranslate(),r.loop&&r.centeredSlides&&(T=!0);else if(b>t.minTranslate())r.freeModeMomentumBounce?(b-t.minTranslate()>w&&(b=t.minTranslate()+w),_=t.minTranslate(),S=!0,i.allowMomentumBounce=!0):b=t.minTranslate(),r.loop&&r.centeredSlides&&(T=!0);else if(r.freeModeSticky){for(var E,C=0;C<l.length;C+=1)if(l[C]>-b){E=C;break}b=Math.abs(l[E]-b)<Math.abs(l[E-1]-b)||"next"===t.swipeDirection?l[E]:l[E-1],b=-b}if(T&&t.once("transitionEnd",(function(){t.loopFix()})),0!==t.velocity){if(y=n?Math.abs((-b-t.translate)/t.velocity):Math.abs((b-t.translate)/t.velocity),r.freeModeSticky){var x=Math.abs((n?-b:b)-t.translate),k=t.slidesSizesGrid[t.activeIndex];y=x<k?r.speed:x<2*k?1.5*r.speed:2.5*r.speed}}else if(r.freeModeSticky)return void t.slideToClosest();r.freeModeMomentumBounce&&S?(t.updateProgress(_),t.setTransition(y),t.setTranslate(b),t.transitionStart(!0,t.swipeDirection),t.animating=!0,a.transitionEnd((function(){t&&!t.destroyed&&i.allowMomentumBounce&&(t.emit("momentumBounce"),t.setTransition(r.speed),setTimeout((function(){t.setTranslate(_),a.transitionEnd((function(){t&&!t.destroyed&&t.transitionEnd()}))}),0))}))):t.velocity?(t.updateProgress(b),t.setTransition(y),t.setTranslate(b),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,a.transitionEnd((function(){t&&!t.destroyed&&t.transitionEnd()})))):t.updateProgress(b),t.updateActiveIndex(),t.updateSlidesClasses()}else if(r.freeModeSticky)return void t.slideToClosest();(!r.freeModeMomentum||h>=r.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}else{for(var I=0,A=t.slidesSizesGrid[0],P=0;P<o.length;P+=P<r.slidesPerGroupSkip?1:r.slidesPerGroup){var O=P<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;"undefined"!==typeof o[P+O]?u>=o[P]&&u<o[P+O]&&(I=P,A=o[P+O]-o[P]):u>=o[P]&&(I=P,A=o[o.length-1]-o[o.length-2])}var L=(u-o[I])/A,D=I<r.slidesPerGroupSkip-1?1:r.slidesPerGroup;if(h>r.longSwipesMs){if(!r.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(L>=r.longSwipesRatio?t.slideTo(I+D):t.slideTo(I)),"prev"===t.swipeDirection&&(L>1-r.longSwipesRatio?t.slideTo(I+D):t.slideTo(I))}else{if(!r.shortSwipes)return void t.slideTo(t.activeIndex);var M=t.navigation&&(d.target===t.navigation.nextEl||d.target===t.navigation.prevEl);M?d.target===t.navigation.nextEl?t.slideTo(I+D):t.slideTo(I):("next"===t.swipeDirection&&t.slideTo(I+D),"prev"===t.swipeDirection&&t.slideTo(I))}}}function He(){var e=this,t=e.params,i=e.el;if(!i||0!==i.offsetWidth){t.breakpoints&&e.setBreakpoint();var r=e.allowSlideNext,s=e.allowSlidePrev,n=e.snapGrid;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses(),("auto"===t.slidesPerView||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.run(),e.allowSlidePrev=s,e.allowSlideNext=r,e.params.watchOverflow&&n!==e.snapGrid&&e.checkOverflow()}}function ze(e){var t=this;t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}function Ve(){var e,t=this,i=t.wrapperEl,r=t.rtlTranslate;t.previousTranslate=t.translate,t.isHorizontal()?t.translate=r?i.scrollWidth-i.offsetWidth-i.scrollLeft:-i.scrollLeft:t.translate=-i.scrollTop,-0===t.translate&&(t.translate=0),t.updateActiveIndex(),t.updateSlidesClasses();var s=t.maxTranslate()-t.minTranslate();e=0===s?0:(t.translate-t.minTranslate())/s,e!==t.progress&&t.updateProgress(r?-t.translate:t.translate),t.emit("setTranslate",t.translate,!1)}var Ge=!1;function We(){}function Xe(){var e=this,t=e.params,r=e.touchEvents,s=e.el,n=e.wrapperEl;e.onTouchStart=Fe.bind(e),e.onTouchMove=qe.bind(e),e.onTouchEnd=$e.bind(e),t.cssMode&&(e.onScroll=Ve.bind(e)),e.onClick=ze.bind(e);var a=!!t.nested;if(!Y.touch&&Y.pointerEvents)s.addEventListener(r.start,e.onTouchStart,!1),i.addEventListener(r.move,e.onTouchMove,a),i.addEventListener(r.end,e.onTouchEnd,!1);else{if(Y.touch){var o=!("touchstart"!==r.start||!Y.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};s.addEventListener(r.start,e.onTouchStart,o),s.addEventListener(r.move,e.onTouchMove,Y.passiveListener?{passive:!1,capture:a}:a),s.addEventListener(r.end,e.onTouchEnd,o),r.cancel&&s.addEventListener(r.cancel,e.onTouchEnd,o),Ge||(i.addEventListener("touchstart",We),Ge=!0)}(t.simulateTouch&&!je.ios&&!je.android||t.simulateTouch&&!Y.touch&&je.ios)&&(s.addEventListener("mousedown",e.onTouchStart,!1),i.addEventListener("mousemove",e.onTouchMove,a),i.addEventListener("mouseup",e.onTouchEnd,!1))}(t.preventClicks||t.preventClicksPropagation)&&s.addEventListener("click",e.onClick,!0),t.cssMode&&n.addEventListener("scroll",e.onScroll),t.updateOnWindowResize?e.on(je.ios||je.android?"resize orientationchange observerUpdate":"resize observerUpdate",He,!0):e.on("observerUpdate",He,!0)}function Ye(){var e=this,t=e.params,r=e.touchEvents,s=e.el,n=e.wrapperEl,a=!!t.nested;if(!Y.touch&&Y.pointerEvents)s.removeEventListener(r.start,e.onTouchStart,!1),i.removeEventListener(r.move,e.onTouchMove,a),i.removeEventListener(r.end,e.onTouchEnd,!1);else{if(Y.touch){var o=!("onTouchStart"!==r.start||!Y.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};s.removeEventListener(r.start,e.onTouchStart,o),s.removeEventListener(r.move,e.onTouchMove,a),s.removeEventListener(r.end,e.onTouchEnd,o),r.cancel&&s.removeEventListener(r.cancel,e.onTouchEnd,o)}(t.simulateTouch&&!je.ios&&!je.android||t.simulateTouch&&!Y.touch&&je.ios)&&(s.removeEventListener("mousedown",e.onTouchStart,!1),i.removeEventListener("mousemove",e.onTouchMove,a),i.removeEventListener("mouseup",e.onTouchEnd,!1))}(t.preventClicks||t.preventClicksPropagation)&&s.removeEventListener("click",e.onClick,!0),t.cssMode&&n.removeEventListener("scroll",e.onScroll),e.off(je.ios||je.android?"resize orientationchange observerUpdate":"resize observerUpdate",He)}var Ke={attachEvents:Xe,detachEvents:Ye};function Je(){var e=this,t=e.activeIndex,i=e.initialized,r=e.loopedSlides;void 0===r&&(r=0);var s=e.params,n=e.$el,a=s.breakpoints;if(a&&(!a||0!==Object.keys(a).length)){var o=e.getBreakpoint(a);if(o&&e.currentBreakpoint!==o){var l=o in a?a[o]:void 0;l&&["slidesPerView","spaceBetween","slidesPerGroup","slidesPerGroupSkip","slidesPerColumn"].forEach((function(e){var t=l[e];"undefined"!==typeof t&&(l[e]="slidesPerView"!==e||"AUTO"!==t&&"auto"!==t?"slidesPerView"===e?parseFloat(t):parseInt(t,10):"auto")}));var d=l||e.originalParams,u=s.slidesPerColumn>1,c=d.slidesPerColumn>1;u&&!c?n.removeClass(s.containerModifierClass+"multirow "+s.containerModifierClass+"multirow-column"):!u&&c&&(n.addClass(s.containerModifierClass+"multirow"),"column"===d.slidesPerColumnFill&&n.addClass(s.containerModifierClass+"multirow-column"));var h=d.direction&&d.direction!==s.direction,p=s.loop&&(d.slidesPerView!==s.slidesPerView||h);h&&i&&e.changeDirection(),X.extend(e.params,d),X.extend(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),e.currentBreakpoint=o,p&&i&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-r+e.loopedSlides,0,!1)),e.emit("breakpoint",d)}}}function Qe(e){if(e){var t=!1,i=Object.keys(e).map((function(e){if("string"===typeof e&&0===e.indexOf("@")){var t=parseFloat(e.substr(1)),i=s.innerHeight*t;return{value:i,point:e}}return{value:e,point:e}}));i.sort((function(e,t){return parseInt(e.value,10)-parseInt(t.value,10)}));for(var r=0;r<i.length;r+=1){var n=i[r],a=n.point,o=n.value;o<=s.innerWidth&&(t=a)}return t||"max"}}var Ze={setBreakpoint:Je,getBreakpoint:Qe};function et(){var e=this,t=e.classNames,i=e.params,r=e.rtl,s=e.$el,n=[];n.push("initialized"),n.push(i.direction),i.freeMode&&n.push("free-mode"),i.autoHeight&&n.push("autoheight"),r&&n.push("rtl"),i.slidesPerColumn>1&&(n.push("multirow"),"column"===i.slidesPerColumnFill&&n.push("multirow-column")),je.android&&n.push("android"),je.ios&&n.push("ios"),i.cssMode&&n.push("css-mode"),n.forEach((function(e){t.push(i.containerModifierClass+e)})),s.addClass(t.join(" "))}function tt(){var e=this,t=e.$el,i=e.classNames;t.removeClass(i.join(" "))}var it={addClasses:et,removeClasses:tt};function rt(e,t,i,r,n,a){var l;function d(){a&&a()}var u=o(e).parent("picture")[0];u||e.complete&&n?d():t?(l=new s.Image,l.onload=d,l.onerror=d,r&&(l.sizes=r),i&&(l.srcset=i),t&&(l.src=t)):d()}function st(){var e=this;function t(){"undefined"!==typeof e&&null!==e&&e&&!e.destroyed&&(void 0!==e.imagesLoaded&&(e.imagesLoaded+=1),e.imagesLoaded===e.imagesToLoad.length&&(e.params.updateOnImagesReady&&e.update(),e.emit("imagesReady")))}e.imagesToLoad=e.$el.find("img");for(var i=0;i<e.imagesToLoad.length;i+=1){var r=e.imagesToLoad[i];e.loadImage(r,r.currentSrc||r.getAttribute("src"),r.srcset||r.getAttribute("srcset"),r.sizes||r.getAttribute("sizes"),!0,t)}}var nt={loadImage:rt,preloadImages:st};function at(){var e=this,t=e.params,i=e.isLocked,r=e.slides.length>0&&t.slidesOffsetBefore+t.spaceBetween*(e.slides.length-1)+e.slides[0].offsetWidth*e.slides.length;t.slidesOffsetBefore&&t.slidesOffsetAfter&&r?e.isLocked=r<=e.size:e.isLocked=1===e.snapGrid.length,e.allowSlideNext=!e.isLocked,e.allowSlidePrev=!e.isLocked,i!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock"),i&&i!==e.isLocked&&(e.isEnd=!1,e.navigation&&e.navigation.update())}var ot={checkOverflow:at},lt={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,preventInteractionOnTransition:!1,edgeSwipeDetection:!1,edgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,slidesPerGroupSkip:0,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!1,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0},dt={update:oe,translate:pe,transition:ye,slide:Ce,loop:Ae,grabCursor:Le,manipulation:Be,events:Ke,breakpoints:Ze,checkOverflow:ot,classes:it,images:nt},ut={},ct=function(e){function t(){var i,r,s,n=[],a=arguments.length;while(a--)n[a]=arguments[a];1===n.length&&n[0].constructor&&n[0].constructor===Object?s=n[0]:(i=n,r=i[0],s=i[1]),s||(s={}),s=X.extend({},s),r&&!s.el&&(s.el=r),e.call(this,s),Object.keys(dt).forEach((function(e){Object.keys(dt[e]).forEach((function(i){t.prototype[i]||(t.prototype[i]=dt[e][i])}))}));var l=this;"undefined"===typeof l.modules&&(l.modules={}),Object.keys(l.modules).forEach((function(e){var t=l.modules[e];if(t.params){var i=Object.keys(t.params)[0],r=t.params[i];if("object"!==typeof r||null===r)return;if(!(i in s)||!("enabled"in r))return;!0===s[i]&&(s[i]={enabled:!0}),"object"!==typeof s[i]||"enabled"in s[i]||(s[i].enabled=!0),s[i]||(s[i]={enabled:!1})}}));var d=X.extend({},lt);l.useModulesParams(d),l.params=X.extend({},d,ut,s),l.originalParams=X.extend({},l.params),l.passedParams=X.extend({},s),l.$=o;var u=o(l.params.el);if(r=u[0],r){if(u.length>1){var c=[];return u.each((function(e,i){var r=X.extend({},s,{el:i});c.push(new t(r))})),c}var h;return r.swiper=l,u.data("swiper",l),r&&r.shadowRoot&&r.shadowRoot.querySelector?(h=o(r.shadowRoot.querySelector("."+l.params.wrapperClass)),h.children=function(e){return u.children(e)}):h=u.children("."+l.params.wrapperClass),X.extend(l,{$el:u,el:r,$wrapperEl:h,wrapperEl:h[0],classNames:[],slides:o(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function(){return"horizontal"===l.params.direction},isVertical:function(){return"vertical"===l.params.direction},rtl:"rtl"===r.dir.toLowerCase()||"rtl"===u.css("direction"),rtlTranslate:"horizontal"===l.params.direction&&("rtl"===r.dir.toLowerCase()||"rtl"===u.css("direction")),wrongRTL:"-webkit-box"===h.css("display"),activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:l.params.allowSlideNext,allowSlidePrev:l.params.allowSlidePrev,touchEvents:function(){var e=["touchstart","touchmove","touchend","touchcancel"],t=["mousedown","mousemove","mouseup"];return Y.pointerEvents&&(t=["pointerdown","pointermove","pointerup"]),l.touchEventsTouch={start:e[0],move:e[1],end:e[2],cancel:e[3]},l.touchEventsDesktop={start:t[0],move:t[1],end:t[2]},Y.touch||!l.params.simulateTouch?l.touchEventsTouch:l.touchEventsDesktop}(),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,formElements:"input, select, option, textarea, button, video, label",lastClickTime:X.now(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:l.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),l.useModules(),l.params.init&&l.init(),l}}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={extendedDefaults:{configurable:!0},defaults:{configurable:!0},Class:{configurable:!0},$:{configurable:!0}};return t.prototype.slidesPerViewDynamic=function(){var e=this,t=e.params,i=e.slides,r=e.slidesGrid,s=e.size,n=e.activeIndex,a=1;if(t.centeredSlides){for(var o,l=i[n].swiperSlideSize,d=n+1;d<i.length;d+=1)i[d]&&!o&&(l+=i[d].swiperSlideSize,a+=1,l>s&&(o=!0));for(var u=n-1;u>=0;u-=1)i[u]&&!o&&(l+=i[u].swiperSlideSize,a+=1,l>s&&(o=!0))}else for(var c=n+1;c<i.length;c+=1)r[c]-r[n]<s&&(a+=1);return a},t.prototype.update=function(){var e=this;if(e&&!e.destroyed){var t,i=e.snapGrid,r=e.params;r.breakpoints&&e.setBreakpoint(),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.params.freeMode?(s(),e.params.autoHeight&&e.updateAutoHeight()):(t=("auto"===e.params.slidesPerView||e.params.slidesPerView>1)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),t||s()),r.watchOverflow&&i!==e.snapGrid&&e.checkOverflow(),e.emit("update")}function s(){var t=e.rtlTranslate?-1*e.translate:e.translate,i=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(i),e.updateActiveIndex(),e.updateSlidesClasses()}},t.prototype.changeDirection=function(e,t){void 0===t&&(t=!0);var i=this,r=i.params.direction;return e||(e="horizontal"===r?"vertical":"horizontal"),e===r||"horizontal"!==e&&"vertical"!==e||(i.$el.removeClass(""+i.params.containerModifierClass+r).addClass(""+i.params.containerModifierClass+e),i.params.direction=e,i.slides.each((function(t,i){"vertical"===e?i.style.width="":i.style.height=""})),i.emit("changeDirection"),t&&i.update()),i},t.prototype.init=function(){var e=this;e.initialized||(e.emit("beforeInit"),e.params.breakpoints&&e.setBreakpoint(),e.addClasses(),e.params.loop&&e.loopCreate(),e.updateSize(),e.updateSlides(),e.params.watchOverflow&&e.checkOverflow(),e.params.grabCursor&&e.setGrabCursor(),e.params.preloadImages&&e.preloadImages(),e.params.loop?e.slideTo(e.params.initialSlide+e.loopedSlides,0,e.params.runCallbacksOnInit):e.slideTo(e.params.initialSlide,0,e.params.runCallbacksOnInit),e.attachEvents(),e.initialized=!0,e.emit("init"))},t.prototype.destroy=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);var i=this,r=i.params,s=i.$el,n=i.$wrapperEl,a=i.slides;return"undefined"===typeof i.params||i.destroyed||(i.emit("beforeDestroy"),i.initialized=!1,i.detachEvents(),r.loop&&i.loopDestroy(),t&&(i.removeClasses(),s.removeAttr("style"),n.removeAttr("style"),a&&a.length&&a.removeClass([r.slideVisibleClass,r.slideActiveClass,r.slideNextClass,r.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),i.emit("destroy"),Object.keys(i.eventsListeners).forEach((function(e){i.off(e)})),!1!==e&&(i.$el[0].swiper=null,i.$el.data("swiper",null),X.deleteProps(i)),i.destroyed=!0),null},t.extendDefaults=function(e){X.extend(ut,e)},i.extendedDefaults.get=function(){return ut},i.defaults.get=function(){return lt},i.Class.get=function(){return e},i.$.get=function(){return o},Object.defineProperties(t,i),t}(K),ht={name:"device",proto:{device:je},static:{device:je}},pt={name:"support",proto:{support:Y},static:{support:Y}},ft=function(){function e(){var e=s.navigator.userAgent.toLowerCase();return e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0}return{isEdge:!!s.navigator.userAgent.match(/Edge/g),isSafari:e(),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(s.navigator.userAgent)}}(),mt={name:"browser",proto:{browser:ft},static:{browser:ft}},gt={name:"resize",create:function(){var e=this;X.extend(e,{resize:{resizeHandler:function(){e&&!e.destroyed&&e.initialized&&(e.emit("beforeResize"),e.emit("resize"))},orientationChangeHandler:function(){e&&!e.destroyed&&e.initialized&&e.emit("orientationchange")}}})},on:{init:function(){var e=this;s.addEventListener("resize",e.resize.resizeHandler),s.addEventListener("orientationchange",e.resize.orientationChangeHandler)},destroy:function(){var e=this;s.removeEventListener("resize",e.resize.resizeHandler),s.removeEventListener("orientationchange",e.resize.orientationChangeHandler)}}},yt={func:s.MutationObserver||s.WebkitMutationObserver,attach:function(e,t){void 0===t&&(t={});var i=this,r=yt.func,n=new r((function(e){if(1!==e.length){var t=function(){i.emit("observerUpdate",e[0])};s.requestAnimationFrame?s.requestAnimationFrame(t):s.setTimeout(t,0)}else i.emit("observerUpdate",e[0])}));n.observe(e,{attributes:"undefined"===typeof t.attributes||t.attributes,childList:"undefined"===typeof t.childList||t.childList,characterData:"undefined"===typeof t.characterData||t.characterData}),i.observer.observers.push(n)},init:function(){var e=this;if(Y.observer&&e.params.observer){if(e.params.observeParents)for(var t=e.$el.parents(),i=0;i<t.length;i+=1)e.observer.attach(t[i]);e.observer.attach(e.$el[0],{childList:e.params.observeSlideChildren}),e.observer.attach(e.$wrapperEl[0],{attributes:!1})}},destroy:function(){var e=this;e.observer.observers.forEach((function(e){e.disconnect()})),e.observer.observers=[]}},vt={name:"observer",params:{observer:!1,observeParents:!1,observeSlideChildren:!1},create:function(){var e=this;X.extend(e,{observer:{init:yt.init.bind(e),attach:yt.attach.bind(e),destroy:yt.destroy.bind(e),observers:[]}})},on:{init:function(){var e=this;e.observer.init()},destroy:function(){var e=this;e.observer.destroy()}}},bt={update:function(e){var t=this,i=t.params,r=i.slidesPerView,s=i.slidesPerGroup,n=i.centeredSlides,a=t.params.virtual,o=a.addSlidesBefore,l=a.addSlidesAfter,d=t.virtual,u=d.from,c=d.to,h=d.slides,p=d.slidesGrid,f=d.renderSlide,m=d.offset;t.updateActiveIndex();var g,y,v,b=t.activeIndex||0;g=t.rtlTranslate?"right":t.isHorizontal()?"left":"top",n?(y=Math.floor(r/2)+s+o,v=Math.floor(r/2)+s+l):(y=r+(s-1)+o,v=s+l);var _=Math.max((b||0)-v,0),T=Math.min((b||0)+y,h.length-1),S=(t.slidesGrid[_]||0)-(t.slidesGrid[0]||0);function w(){t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.lazy&&t.params.lazy.enabled&&t.lazy.load()}if(X.extend(t.virtual,{from:_,to:T,offset:S,slidesGrid:t.slidesGrid}),u===_&&c===T&&!e)return t.slidesGrid!==p&&S!==m&&t.slides.css(g,S+"px"),void t.updateProgress();if(t.params.virtual.renderExternal)return t.params.virtual.renderExternal.call(t,{offset:S,from:_,to:T,slides:function(){for(var e=[],t=_;t<=T;t+=1)e.push(h[t]);return e}()}),void w();var E=[],C=[];if(e)t.$wrapperEl.find("."+t.params.slideClass).remove();else for(var x=u;x<=c;x+=1)(x<_||x>T)&&t.$wrapperEl.find("."+t.params.slideClass+'[data-swiper-slide-index="'+x+'"]').remove();for(var k=0;k<h.length;k+=1)k>=_&&k<=T&&("undefined"===typeof c||e?C.push(k):(k>c&&C.push(k),k<u&&E.push(k)));C.forEach((function(e){t.$wrapperEl.append(f(h[e],e))})),E.sort((function(e,t){return t-e})).forEach((function(e){t.$wrapperEl.prepend(f(h[e],e))})),t.$wrapperEl.children(".swiper-slide").css(g,S+"px"),w()},renderSlide:function(e,t){var i=this,r=i.params.virtual;if(r.cache&&i.virtual.cache[t])return i.virtual.cache[t];var s=r.renderSlide?o(r.renderSlide.call(i,e,t)):o('<div class="'+i.params.slideClass+'" data-swiper-slide-index="'+t+'">'+e+"</div>");return s.attr("data-swiper-slide-index")||s.attr("data-swiper-slide-index",t),r.cache&&(i.virtual.cache[t]=s),s},appendSlide:function(e){var t=this;if("object"===typeof e&&"length"in e)for(var i=0;i<e.length;i+=1)e[i]&&t.virtual.slides.push(e[i]);else t.virtual.slides.push(e);t.virtual.update(!0)},prependSlide:function(e){var t=this,i=t.activeIndex,r=i+1,s=1;if(Array.isArray(e)){for(var n=0;n<e.length;n+=1)e[n]&&t.virtual.slides.unshift(e[n]);r=i+e.length,s=e.length}else t.virtual.slides.unshift(e);if(t.params.virtual.cache){var a=t.virtual.cache,o={};Object.keys(a).forEach((function(e){var t=a[e],i=t.attr("data-swiper-slide-index");i&&t.attr("data-swiper-slide-index",parseInt(i,10)+1),o[parseInt(e,10)+s]=t})),t.virtual.cache=o}t.virtual.update(!0),t.slideTo(r,0)},removeSlide:function(e){var t=this;if("undefined"!==typeof e&&null!==e){var i=t.activeIndex;if(Array.isArray(e))for(var r=e.length-1;r>=0;r-=1)t.virtual.slides.splice(e[r],1),t.params.virtual.cache&&delete t.virtual.cache[e[r]],e[r]<i&&(i-=1),i=Math.max(i,0);else t.virtual.slides.splice(e,1),t.params.virtual.cache&&delete t.virtual.cache[e],e<i&&(i-=1),i=Math.max(i,0);t.virtual.update(!0),t.slideTo(i,0)}},removeAllSlides:function(){var e=this;e.virtual.slides=[],e.params.virtual.cache&&(e.virtual.cache={}),e.virtual.update(!0),e.slideTo(0,0)}},_t={name:"virtual",params:{virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,addSlidesBefore:0,addSlidesAfter:0}},create:function(){var e=this;X.extend(e,{virtual:{update:bt.update.bind(e),appendSlide:bt.appendSlide.bind(e),prependSlide:bt.prependSlide.bind(e),removeSlide:bt.removeSlide.bind(e),removeAllSlides:bt.removeAllSlides.bind(e),renderSlide:bt.renderSlide.bind(e),slides:e.params.virtual.slides,cache:{}}})},on:{beforeInit:function(){var e=this;if(e.params.virtual.enabled){e.classNames.push(e.params.containerModifierClass+"virtual");var t={watchSlidesProgress:!0};X.extend(e.params,t),X.extend(e.originalParams,t),e.params.initialSlide||e.virtual.update()}},setTranslate:function(){var e=this;e.params.virtual.enabled&&e.virtual.update()}}},Tt={handle:function(e){var t=this,r=t.rtlTranslate,n=e;n.originalEvent&&(n=n.originalEvent);var a=n.keyCode||n.charCode,o=t.params.keyboard.pageUpDown,l=o&&33===a,d=o&&34===a,u=37===a,c=39===a,h=38===a,p=40===a;if(!t.allowSlideNext&&(t.isHorizontal()&&c||t.isVertical()&&p||d))return!1;if(!t.allowSlidePrev&&(t.isHorizontal()&&u||t.isVertical()&&h||l))return!1;if(!(n.shiftKey||n.altKey||n.ctrlKey||n.metaKey)&&(!i.activeElement||!i.activeElement.nodeName||"input"!==i.activeElement.nodeName.toLowerCase()&&"textarea"!==i.activeElement.nodeName.toLowerCase())){if(t.params.keyboard.onlyInViewport&&(l||d||u||c||h||p)){var f=!1;if(t.$el.parents("."+t.params.slideClass).length>0&&0===t.$el.parents("."+t.params.slideActiveClass).length)return;var m=s.innerWidth,g=s.innerHeight,y=t.$el.offset();r&&(y.left-=t.$el[0].scrollLeft);for(var v=[[y.left,y.top],[y.left+t.width,y.top],[y.left,y.top+t.height],[y.left+t.width,y.top+t.height]],b=0;b<v.length;b+=1){var _=v[b];_[0]>=0&&_[0]<=m&&_[1]>=0&&_[1]<=g&&(f=!0)}if(!f)return}t.isHorizontal()?((l||d||u||c)&&(n.preventDefault?n.preventDefault():n.returnValue=!1),((d||c)&&!r||(l||u)&&r)&&t.slideNext(),((l||u)&&!r||(d||c)&&r)&&t.slidePrev()):((l||d||h||p)&&(n.preventDefault?n.preventDefault():n.returnValue=!1),(d||p)&&t.slideNext(),(l||h)&&t.slidePrev()),t.emit("keyPress",a)}},enable:function(){var e=this;e.keyboard.enabled||(o(i).on("keydown",e.keyboard.handle),e.keyboard.enabled=!0)},disable:function(){var e=this;e.keyboard.enabled&&(o(i).off("keydown",e.keyboard.handle),e.keyboard.enabled=!1)}},St={name:"keyboard",params:{keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}},create:function(){var e=this;X.extend(e,{keyboard:{enabled:!1,enable:Tt.enable.bind(e),disable:Tt.disable.bind(e),handle:Tt.handle.bind(e)}})},on:{init:function(){var e=this;e.params.keyboard.enabled&&e.keyboard.enable()},destroy:function(){var e=this;e.keyboard.enabled&&e.keyboard.disable()}}};function wt(){var e="onwheel",t=e in i;if(!t){var r=i.createElement("div");r.setAttribute(e,"return;"),t="function"===typeof r[e]}return!t&&i.implementation&&i.implementation.hasFeature&&!0!==i.implementation.hasFeature("","")&&(t=i.implementation.hasFeature("Events.wheel","3.0")),t}var Et={lastScrollTime:X.now(),lastEventBeforeSnap:void 0,recentWheelEvents:[],event:function(){return s.navigator.userAgent.indexOf("firefox")>-1?"DOMMouseScroll":wt()?"wheel":"mousewheel"},normalize:function(e){var t=10,i=40,r=800,s=0,n=0,a=0,o=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(s=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(s=n,n=0),a=s*t,o=n*t,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(a=e.deltaX),e.shiftKey&&!a&&(a=o,o=0),(a||o)&&e.deltaMode&&(1===e.deltaMode?(a*=i,o*=i):(a*=r,o*=r)),a&&!s&&(s=a<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:s,spinY:n,pixelX:a,pixelY:o}},handleMouseEnter:function(){var e=this;e.mouseEntered=!0},handleMouseLeave:function(){var e=this;e.mouseEntered=!1},handle:function(e){var t=e,i=this,r=i.params.mousewheel;i.params.cssMode&&t.preventDefault();var s=i.$el;if("container"!==i.params.mousewheel.eventsTarged&&(s=o(i.params.mousewheel.eventsTarged)),!i.mouseEntered&&!s[0].contains(t.target)&&!r.releaseOnEdges)return!0;t.originalEvent&&(t=t.originalEvent);var n=0,a=i.rtlTranslate?-1:1,l=Et.normalize(t);if(r.forceToAxis)if(i.isHorizontal()){if(!(Math.abs(l.pixelX)>Math.abs(l.pixelY)))return!0;n=-l.pixelX*a}else{if(!(Math.abs(l.pixelY)>Math.abs(l.pixelX)))return!0;n=-l.pixelY}else n=Math.abs(l.pixelX)>Math.abs(l.pixelY)?-l.pixelX*a:-l.pixelY;if(0===n)return!0;if(r.invert&&(n=-n),i.params.freeMode){var d={time:X.now(),delta:Math.abs(n),direction:Math.sign(n)},u=i.mousewheel,c=u.lastEventBeforeSnap,h=c&&d.time<c.time+500&&d.delta<=c.delta&&d.direction===c.direction;if(!h){i.mousewheel.lastEventBeforeSnap=void 0,i.params.loop&&i.loopFix();var p=i.getTranslate()+n*r.sensitivity,f=i.isBeginning,m=i.isEnd;if(p>=i.minTranslate()&&(p=i.minTranslate()),p<=i.maxTranslate()&&(p=i.maxTranslate()),i.setTransition(0),i.setTranslate(p),i.updateProgress(),i.updateActiveIndex(),i.updateSlidesClasses(),(!f&&i.isBeginning||!m&&i.isEnd)&&i.updateSlidesClasses(),i.params.freeModeSticky){clearTimeout(i.mousewheel.timeout),i.mousewheel.timeout=void 0;var g=i.mousewheel.recentWheelEvents;g.length>=15&&g.shift();var y=g.length?g[g.length-1]:void 0,v=g[0];if(g.push(d),y&&(d.delta>y.delta||d.direction!==y.direction))g.splice(0);else if(g.length>=15&&d.time-v.time<500&&v.delta-d.delta>=1&&d.delta<=6){var b=n>0?.8:.2;i.mousewheel.lastEventBeforeSnap=d,g.splice(0),i.mousewheel.timeout=X.nextTick((function(){i.slideToClosest(i.params.speed,!0,void 0,b)}),0)}i.mousewheel.timeout||(i.mousewheel.timeout=X.nextTick((function(){var e=.5;i.mousewheel.lastEventBeforeSnap=d,g.splice(0),i.slideToClosest(i.params.speed,!0,void 0,e)}),500))}if(h||i.emit("scroll",t),i.params.autoplay&&i.params.autoplayDisableOnInteraction&&i.autoplay.stop(),p===i.minTranslate()||p===i.maxTranslate())return!0}}else{var _={time:X.now(),delta:Math.abs(n),direction:Math.sign(n),raw:e},T=i.mousewheel.recentWheelEvents;T.length>=2&&T.shift();var S=T.length?T[T.length-1]:void 0;if(T.push(_),S?(_.direction!==S.direction||_.delta>S.delta||_.time>S.time+150)&&i.mousewheel.animateSlider(_):i.mousewheel.animateSlider(_),i.mousewheel.releaseScroll(_))return!0}return t.preventDefault?t.preventDefault():t.returnValue=!1,!1},animateSlider:function(e){var t=this;return e.delta>=6&&X.now()-t.mousewheel.lastScrollTime<60||(e.direction<0?t.isEnd&&!t.params.loop||t.animating||(t.slideNext(),t.emit("scroll",e.raw)):t.isBeginning&&!t.params.loop||t.animating||(t.slidePrev(),t.emit("scroll",e.raw)),t.mousewheel.lastScrollTime=(new s.Date).getTime(),!1)},releaseScroll:function(e){var t=this,i=t.params.mousewheel;if(e.direction<0){if(t.isEnd&&!t.params.loop&&i.releaseOnEdges)return!0}else if(t.isBeginning&&!t.params.loop&&i.releaseOnEdges)return!0;return!1},enable:function(){var e=this,t=Et.event();if(e.params.cssMode)return e.wrapperEl.removeEventListener(t,e.mousewheel.handle),!0;if(!t)return!1;if(e.mousewheel.enabled)return!1;var i=e.$el;return"container"!==e.params.mousewheel.eventsTarged&&(i=o(e.params.mousewheel.eventsTarged)),i.on("mouseenter",e.mousewheel.handleMouseEnter),i.on("mouseleave",e.mousewheel.handleMouseLeave),i.on(t,e.mousewheel.handle),e.mousewheel.enabled=!0,!0},disable:function(){var e=this,t=Et.event();if(e.params.cssMode)return e.wrapperEl.addEventListener(t,e.mousewheel.handle),!0;if(!t)return!1;if(!e.mousewheel.enabled)return!1;var i=e.$el;return"container"!==e.params.mousewheel.eventsTarged&&(i=o(e.params.mousewheel.eventsTarged)),i.off(t,e.mousewheel.handle),e.mousewheel.enabled=!1,!0}},Ct={name:"mousewheel",params:{mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarged:"container"}},create:function(){var e=this;X.extend(e,{mousewheel:{enabled:!1,enable:Et.enable.bind(e),disable:Et.disable.bind(e),handle:Et.handle.bind(e),handleMouseEnter:Et.handleMouseEnter.bind(e),handleMouseLeave:Et.handleMouseLeave.bind(e),animateSlider:Et.animateSlider.bind(e),releaseScroll:Et.releaseScroll.bind(e),lastScrollTime:X.now(),lastEventBeforeSnap:void 0,recentWheelEvents:[]}})},on:{init:function(){var e=this;!e.params.mousewheel.enabled&&e.params.cssMode&&e.mousewheel.disable(),e.params.mousewheel.enabled&&e.mousewheel.enable()},destroy:function(){var e=this;e.params.cssMode&&e.mousewheel.enable(),e.mousewheel.enabled&&e.mousewheel.disable()}}},xt={update:function(){var e=this,t=e.params.navigation;if(!e.params.loop){var i=e.navigation,r=i.$nextEl,s=i.$prevEl;s&&s.length>0&&(e.isBeginning?s.addClass(t.disabledClass):s.removeClass(t.disabledClass),s[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](t.lockClass)),r&&r.length>0&&(e.isEnd?r.addClass(t.disabledClass):r.removeClass(t.disabledClass),r[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](t.lockClass))}},onPrevClick:function(e){var t=this;e.preventDefault(),t.isBeginning&&!t.params.loop||t.slidePrev()},onNextClick:function(e){var t=this;e.preventDefault(),t.isEnd&&!t.params.loop||t.slideNext()},init:function(){var e,t,i=this,r=i.params.navigation;(r.nextEl||r.prevEl)&&(r.nextEl&&(e=o(r.nextEl),i.params.uniqueNavElements&&"string"===typeof r.nextEl&&e.length>1&&1===i.$el.find(r.nextEl).length&&(e=i.$el.find(r.nextEl))),r.prevEl&&(t=o(r.prevEl),i.params.uniqueNavElements&&"string"===typeof r.prevEl&&t.length>1&&1===i.$el.find(r.prevEl).length&&(t=i.$el.find(r.prevEl))),e&&e.length>0&&e.on("click",i.navigation.onNextClick),t&&t.length>0&&t.on("click",i.navigation.onPrevClick),X.extend(i.navigation,{$nextEl:e,nextEl:e&&e[0],$prevEl:t,prevEl:t&&t[0]}))},destroy:function(){var e=this,t=e.navigation,i=t.$nextEl,r=t.$prevEl;i&&i.length&&(i.off("click",e.navigation.onNextClick),i.removeClass(e.params.navigation.disabledClass)),r&&r.length&&(r.off("click",e.navigation.onPrevClick),r.removeClass(e.params.navigation.disabledClass))}},kt={name:"navigation",params:{navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock"}},create:function(){var e=this;X.extend(e,{navigation:{init:xt.init.bind(e),update:xt.update.bind(e),destroy:xt.destroy.bind(e),onNextClick:xt.onNextClick.bind(e),onPrevClick:xt.onPrevClick.bind(e)}})},on:{init:function(){var e=this;e.navigation.init(),e.navigation.update()},toEdge:function(){var e=this;e.navigation.update()},fromEdge:function(){var e=this;e.navigation.update()},destroy:function(){var e=this;e.navigation.destroy()},click:function(e){var t,i=this,r=i.navigation,s=r.$nextEl,n=r.$prevEl;!i.params.navigation.hideOnClick||o(e.target).is(n)||o(e.target).is(s)||(s?t=s.hasClass(i.params.navigation.hiddenClass):n&&(t=n.hasClass(i.params.navigation.hiddenClass)),!0===t?i.emit("navigationShow",i):i.emit("navigationHide",i),s&&s.toggleClass(i.params.navigation.hiddenClass),n&&n.toggleClass(i.params.navigation.hiddenClass))}}},It={update:function(){var e=this,t=e.rtl,i=e.params.pagination;if(i.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var r,s=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,n=e.pagination.$el,a=e.params.loop?Math.ceil((s-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(r=Math.ceil((e.activeIndex-e.loopedSlides)/e.params.slidesPerGroup),r>s-1-2*e.loopedSlides&&(r-=s-2*e.loopedSlides),r>a-1&&(r-=a),r<0&&"bullets"!==e.params.paginationType&&(r=a+r)):r="undefined"!==typeof e.snapIndex?e.snapIndex:e.activeIndex||0,"bullets"===i.type&&e.pagination.bullets&&e.pagination.bullets.length>0){var l,d,u,c=e.pagination.bullets;if(i.dynamicBullets&&(e.pagination.bulletSize=c.eq(0)[e.isHorizontal()?"outerWidth":"outerHeight"](!0),n.css(e.isHorizontal()?"width":"height",e.pagination.bulletSize*(i.dynamicMainBullets+4)+"px"),i.dynamicMainBullets>1&&void 0!==e.previousIndex&&(e.pagination.dynamicBulletIndex+=r-e.previousIndex,e.pagination.dynamicBulletIndex>i.dynamicMainBullets-1?e.pagination.dynamicBulletIndex=i.dynamicMainBullets-1:e.pagination.dynamicBulletIndex<0&&(e.pagination.dynamicBulletIndex=0)),l=r-e.pagination.dynamicBulletIndex,d=l+(Math.min(c.length,i.dynamicMainBullets)-1),u=(d+l)/2),c.removeClass(i.bulletActiveClass+" "+i.bulletActiveClass+"-next "+i.bulletActiveClass+"-next-next "+i.bulletActiveClass+"-prev "+i.bulletActiveClass+"-prev-prev "+i.bulletActiveClass+"-main"),n.length>1)c.each((function(e,t){var s=o(t),n=s.index();n===r&&s.addClass(i.bulletActiveClass),i.dynamicBullets&&(n>=l&&n<=d&&s.addClass(i.bulletActiveClass+"-main"),n===l&&s.prev().addClass(i.bulletActiveClass+"-prev").prev().addClass(i.bulletActiveClass+"-prev-prev"),n===d&&s.next().addClass(i.bulletActiveClass+"-next").next().addClass(i.bulletActiveClass+"-next-next"))}));else{var h=c.eq(r),p=h.index();if(h.addClass(i.bulletActiveClass),i.dynamicBullets){for(var f=c.eq(l),m=c.eq(d),g=l;g<=d;g+=1)c.eq(g).addClass(i.bulletActiveClass+"-main");if(e.params.loop)if(p>=c.length-i.dynamicMainBullets){for(var y=i.dynamicMainBullets;y>=0;y-=1)c.eq(c.length-y).addClass(i.bulletActiveClass+"-main");c.eq(c.length-i.dynamicMainBullets-1).addClass(i.bulletActiveClass+"-prev")}else f.prev().addClass(i.bulletActiveClass+"-prev").prev().addClass(i.bulletActiveClass+"-prev-prev"),m.next().addClass(i.bulletActiveClass+"-next").next().addClass(i.bulletActiveClass+"-next-next");else f.prev().addClass(i.bulletActiveClass+"-prev").prev().addClass(i.bulletActiveClass+"-prev-prev"),m.next().addClass(i.bulletActiveClass+"-next").next().addClass(i.bulletActiveClass+"-next-next")}}if(i.dynamicBullets){var v=Math.min(c.length,i.dynamicMainBullets+4),b=(e.pagination.bulletSize*v-e.pagination.bulletSize)/2-u*e.pagination.bulletSize,_=t?"right":"left";c.css(e.isHorizontal()?_:"top",b+"px")}}if("fraction"===i.type&&(n.find("."+i.currentClass).text(i.formatFractionCurrent(r+1)),n.find("."+i.totalClass).text(i.formatFractionTotal(a))),"progressbar"===i.type){var T;T=i.progressbarOpposite?e.isHorizontal()?"vertical":"horizontal":e.isHorizontal()?"horizontal":"vertical";var S=(r+1)/a,w=1,E=1;"horizontal"===T?w=S:E=S,n.find("."+i.progressbarFillClass).transform("translate3d(0,0,0) scaleX("+w+") scaleY("+E+")").transition(e.params.speed)}"custom"===i.type&&i.renderCustom?(n.html(i.renderCustom(e,r+1,a)),e.emit("paginationRender",e,n[0])):e.emit("paginationUpdate",e,n[0]),n[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](i.lockClass)}},render:function(){var e=this,t=e.params.pagination;if(t.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var i=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,r=e.pagination.$el,s="";if("bullets"===t.type){for(var n=e.params.loop?Math.ceil((i-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length,a=0;a<n;a+=1)t.renderBullet?s+=t.renderBullet.call(e,a,t.bulletClass):s+="<"+t.bulletElement+' class="'+t.bulletClass+'"></'+t.bulletElement+">";r.html(s),e.pagination.bullets=r.find("."+t.bulletClass)}"fraction"===t.type&&(s=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):'<span class="'+t.currentClass+'"></span> / <span class="'+t.totalClass+'"></span>',r.html(s)),"progressbar"===t.type&&(s=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):'<span class="'+t.progressbarFillClass+'"></span>',r.html(s)),"custom"!==t.type&&e.emit("paginationRender",e.pagination.$el[0])}},init:function(){var e=this,t=e.params.pagination;if(t.el){var i=o(t.el);0!==i.length&&(e.params.uniqueNavElements&&"string"===typeof t.el&&i.length>1&&(i=e.$el.find(t.el)),"bullets"===t.type&&t.clickable&&i.addClass(t.clickableClass),i.addClass(t.modifierClass+t.type),"bullets"===t.type&&t.dynamicBullets&&(i.addClass(""+t.modifierClass+t.type+"-dynamic"),e.pagination.dynamicBulletIndex=0,t.dynamicMainBullets<1&&(t.dynamicMainBullets=1)),"progressbar"===t.type&&t.progressbarOpposite&&i.addClass(t.progressbarOppositeClass),t.clickable&&i.on("click","."+t.bulletClass,(function(t){t.preventDefault();var i=o(this).index()*e.params.slidesPerGroup;e.params.loop&&(i+=e.loopedSlides),e.slideTo(i)})),X.extend(e.pagination,{$el:i,el:i[0]}))}},destroy:function(){var e=this,t=e.params.pagination;if(t.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var i=e.pagination.$el;i.removeClass(t.hiddenClass),i.removeClass(t.modifierClass+t.type),e.pagination.bullets&&e.pagination.bullets.removeClass(t.bulletActiveClass),t.clickable&&i.off("click","."+t.bulletClass)}}},At={name:"pagination",params:{pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:function(e){return e},formatFractionTotal:function(e){return e},bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",modifierClass:"swiper-pagination-",currentClass:"swiper-pagination-current",totalClass:"swiper-pagination-total",hiddenClass:"swiper-pagination-hidden",progressbarFillClass:"swiper-pagination-progressbar-fill",progressbarOppositeClass:"swiper-pagination-progressbar-opposite",clickableClass:"swiper-pagination-clickable",lockClass:"swiper-pagination-lock"}},create:function(){var e=this;X.extend(e,{pagination:{init:It.init.bind(e),render:It.render.bind(e),update:It.update.bind(e),destroy:It.destroy.bind(e),dynamicBulletIndex:0}})},on:{init:function(){var e=this;e.pagination.init(),e.pagination.render(),e.pagination.update()},activeIndexChange:function(){var e=this;(e.params.loop||"undefined"===typeof e.snapIndex)&&e.pagination.update()},snapIndexChange:function(){var e=this;e.params.loop||e.pagination.update()},slidesLengthChange:function(){var e=this;e.params.loop&&(e.pagination.render(),e.pagination.update())},snapGridLengthChange:function(){var e=this;e.params.loop||(e.pagination.render(),e.pagination.update())},destroy:function(){var e=this;e.pagination.destroy()},click:function(e){var t=this;if(t.params.pagination.el&&t.params.pagination.hideOnClick&&t.pagination.$el.length>0&&!o(e.target).hasClass(t.params.pagination.bulletClass)){var i=t.pagination.$el.hasClass(t.params.pagination.hiddenClass);!0===i?t.emit("paginationShow",t):t.emit("paginationHide",t),t.pagination.$el.toggleClass(t.params.pagination.hiddenClass)}}}},Pt={setTranslate:function(){var e=this;if(e.params.scrollbar.el&&e.scrollbar.el){var t=e.scrollbar,i=e.rtlTranslate,r=e.progress,s=t.dragSize,n=t.trackSize,a=t.$dragEl,o=t.$el,l=e.params.scrollbar,d=s,u=(n-s)*r;i?(u=-u,u>0?(d=s-u,u=0):-u+s>n&&(d=n+u)):u<0?(d=s+u,u=0):u+s>n&&(d=n-u),e.isHorizontal()?(a.transform("translate3d("+u+"px, 0, 0)"),a[0].style.width=d+"px"):(a.transform("translate3d(0px, "+u+"px, 0)"),a[0].style.height=d+"px"),l.hide&&(clearTimeout(e.scrollbar.timeout),o[0].style.opacity=1,e.scrollbar.timeout=setTimeout((function(){o[0].style.opacity=0,o.transition(400)}),1e3))}},setTransition:function(e){var t=this;t.params.scrollbar.el&&t.scrollbar.el&&t.scrollbar.$dragEl.transition(e)},updateSize:function(){var e=this;if(e.params.scrollbar.el&&e.scrollbar.el){var t=e.scrollbar,i=t.$dragEl,r=t.$el;i[0].style.width="",i[0].style.height="";var s,n=e.isHorizontal()?r[0].offsetWidth:r[0].offsetHeight,a=e.size/e.virtualSize,o=a*(n/e.size);s="auto"===e.params.scrollbar.dragSize?n*a:parseInt(e.params.scrollbar.dragSize,10),e.isHorizontal()?i[0].style.width=s+"px":i[0].style.height=s+"px",r[0].style.display=a>=1?"none":"",e.params.scrollbar.hide&&(r[0].style.opacity=0),X.extend(t,{trackSize:n,divider:a,moveDivider:o,dragSize:s}),t.$el[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](e.params.scrollbar.lockClass)}},getPointerPosition:function(e){var t=this;return t.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientX:e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientY:e.clientY},setDragPosition:function(e){var t,i=this,r=i.scrollbar,s=i.rtlTranslate,n=r.$el,a=r.dragSize,o=r.trackSize,l=r.dragStartPos;t=(r.getPointerPosition(e)-n.offset()[i.isHorizontal()?"left":"top"]-(null!==l?l:a/2))/(o-a),t=Math.max(Math.min(t,1),0),s&&(t=1-t);var d=i.minTranslate()+(i.maxTranslate()-i.minTranslate())*t;i.updateProgress(d),i.setTranslate(d),i.updateActiveIndex(),i.updateSlidesClasses()},onDragStart:function(e){var t=this,i=t.params.scrollbar,r=t.scrollbar,s=t.$wrapperEl,n=r.$el,a=r.$dragEl;t.scrollbar.isTouched=!0,t.scrollbar.dragStartPos=e.target===a[0]||e.target===a?r.getPointerPosition(e)-e.target.getBoundingClientRect()[t.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),s.transition(100),a.transition(100),r.setDragPosition(e),clearTimeout(t.scrollbar.dragTimeout),n.transition(0),i.hide&&n.css("opacity",1),t.params.cssMode&&t.$wrapperEl.css("scroll-snap-type","none"),t.emit("scrollbarDragStart",e)},onDragMove:function(e){var t=this,i=t.scrollbar,r=t.$wrapperEl,s=i.$el,n=i.$dragEl;t.scrollbar.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,i.setDragPosition(e),r.transition(0),s.transition(0),n.transition(0),t.emit("scrollbarDragMove",e))},onDragEnd:function(e){var t=this,i=t.params.scrollbar,r=t.scrollbar,s=t.$wrapperEl,n=r.$el;t.scrollbar.isTouched&&(t.scrollbar.isTouched=!1,t.params.cssMode&&(t.$wrapperEl.css("scroll-snap-type",""),s.transition("")),i.hide&&(clearTimeout(t.scrollbar.dragTimeout),t.scrollbar.dragTimeout=X.nextTick((function(){n.css("opacity",0),n.transition(400)}),1e3)),t.emit("scrollbarDragEnd",e),i.snapOnRelease&&t.slideToClosest())},enableDraggable:function(){var e=this;if(e.params.scrollbar.el){var t=e.scrollbar,r=e.touchEventsTouch,s=e.touchEventsDesktop,n=e.params,a=t.$el,o=a[0],l=!(!Y.passiveListener||!n.passiveListeners)&&{passive:!1,capture:!1},d=!(!Y.passiveListener||!n.passiveListeners)&&{passive:!0,capture:!1};Y.touch?(o.addEventListener(r.start,e.scrollbar.onDragStart,l),o.addEventListener(r.move,e.scrollbar.onDragMove,l),o.addEventListener(r.end,e.scrollbar.onDragEnd,d)):(o.addEventListener(s.start,e.scrollbar.onDragStart,l),i.addEventListener(s.move,e.scrollbar.onDragMove,l),i.addEventListener(s.end,e.scrollbar.onDragEnd,d))}},disableDraggable:function(){var e=this;if(e.params.scrollbar.el){var t=e.scrollbar,r=e.touchEventsTouch,s=e.touchEventsDesktop,n=e.params,a=t.$el,o=a[0],l=!(!Y.passiveListener||!n.passiveListeners)&&{passive:!1,capture:!1},d=!(!Y.passiveListener||!n.passiveListeners)&&{passive:!0,capture:!1};Y.touch?(o.removeEventListener(r.start,e.scrollbar.onDragStart,l),o.removeEventListener(r.move,e.scrollbar.onDragMove,l),o.removeEventListener(r.end,e.scrollbar.onDragEnd,d)):(o.removeEventListener(s.start,e.scrollbar.onDragStart,l),i.removeEventListener(s.move,e.scrollbar.onDragMove,l),i.removeEventListener(s.end,e.scrollbar.onDragEnd,d))}},init:function(){var e=this;if(e.params.scrollbar.el){var t=e.scrollbar,i=e.$el,r=e.params.scrollbar,s=o(r.el);e.params.uniqueNavElements&&"string"===typeof r.el&&s.length>1&&1===i.find(r.el).length&&(s=i.find(r.el));var n=s.find("."+e.params.scrollbar.dragClass);0===n.length&&(n=o('<div class="'+e.params.scrollbar.dragClass+'"></div>'),s.append(n)),X.extend(t,{$el:s,el:s[0],$dragEl:n,dragEl:n[0]}),r.draggable&&t.enableDraggable()}},destroy:function(){var e=this;e.scrollbar.disableDraggable()}},Ot={name:"scrollbar",params:{scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag"}},create:function(){var e=this;X.extend(e,{scrollbar:{init:Pt.init.bind(e),destroy:Pt.destroy.bind(e),updateSize:Pt.updateSize.bind(e),setTranslate:Pt.setTranslate.bind(e),setTransition:Pt.setTransition.bind(e),enableDraggable:Pt.enableDraggable.bind(e),disableDraggable:Pt.disableDraggable.bind(e),setDragPosition:Pt.setDragPosition.bind(e),getPointerPosition:Pt.getPointerPosition.bind(e),onDragStart:Pt.onDragStart.bind(e),onDragMove:Pt.onDragMove.bind(e),onDragEnd:Pt.onDragEnd.bind(e),isTouched:!1,timeout:null,dragTimeout:null}})},on:{init:function(){var e=this;e.scrollbar.init(),e.scrollbar.updateSize(),e.scrollbar.setTranslate()},update:function(){var e=this;e.scrollbar.updateSize()},resize:function(){var e=this;e.scrollbar.updateSize()},observerUpdate:function(){var e=this;e.scrollbar.updateSize()},setTranslate:function(){var e=this;e.scrollbar.setTranslate()},setTransition:function(e){var t=this;t.scrollbar.setTransition(e)},destroy:function(){var e=this;e.scrollbar.destroy()}}},Lt={setTransform:function(e,t){var i=this,r=i.rtl,s=o(e),n=r?-1:1,a=s.attr("data-swiper-parallax")||"0",l=s.attr("data-swiper-parallax-x"),d=s.attr("data-swiper-parallax-y"),u=s.attr("data-swiper-parallax-scale"),c=s.attr("data-swiper-parallax-opacity");if(l||d?(l=l||"0",d=d||"0"):i.isHorizontal()?(l=a,d="0"):(d=a,l="0"),l=l.indexOf("%")>=0?parseInt(l,10)*t*n+"%":l*t*n+"px",d=d.indexOf("%")>=0?parseInt(d,10)*t+"%":d*t+"px","undefined"!==typeof c&&null!==c){var h=c-(c-1)*(1-Math.abs(t));s[0].style.opacity=h}if("undefined"===typeof u||null===u)s.transform("translate3d("+l+", "+d+", 0px)");else{var p=u-(u-1)*(1-Math.abs(t));s.transform("translate3d("+l+", "+d+", 0px) scale("+p+")")}},setTranslate:function(){var e=this,t=e.$el,i=e.slides,r=e.progress,s=e.snapGrid;t.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t,i){e.parallax.setTransform(i,r)})),i.each((function(t,i){var n=i.progress;e.params.slidesPerGroup>1&&"auto"!==e.params.slidesPerView&&(n+=Math.ceil(t/2)-r*(s.length-1)),n=Math.min(Math.max(n,-1),1),o(i).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t,i){e.parallax.setTransform(i,n)}))}))},setTransition:function(e){void 0===e&&(e=this.params.speed);var t=this,i=t.$el;i.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t,i){var r=o(i),s=parseInt(r.attr("data-swiper-parallax-duration"),10)||e;0===e&&(s=0),r.transition(s)}))}},Dt={name:"parallax",params:{parallax:{enabled:!1}},create:function(){var e=this;X.extend(e,{parallax:{setTransform:Lt.setTransform.bind(e),setTranslate:Lt.setTranslate.bind(e),setTransition:Lt.setTransition.bind(e)}})},on:{beforeInit:function(){var e=this;e.params.parallax.enabled&&(e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)},init:function(){var e=this;e.params.parallax.enabled&&e.parallax.setTranslate()},setTranslate:function(){var e=this;e.params.parallax.enabled&&e.parallax.setTranslate()},setTransition:function(e){var t=this;t.params.parallax.enabled&&t.parallax.setTransition(e)}}},Mt={getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var t=e.targetTouches[0].pageX,i=e.targetTouches[0].pageY,r=e.targetTouches[1].pageX,s=e.targetTouches[1].pageY,n=Math.sqrt(Math.pow(r-t,2)+Math.pow(s-i,2));return n},onGestureStart:function(e){var t=this,i=t.params.zoom,r=t.zoom,s=r.gesture;if(r.fakeGestureTouched=!1,r.fakeGestureMoved=!1,!Y.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;r.fakeGestureTouched=!0,s.scaleStart=Mt.getDistanceBetweenTouches(e)}s.$slideEl&&s.$slideEl.length||(s.$slideEl=o(e.target).closest("."+t.params.slideClass),0===s.$slideEl.length&&(s.$slideEl=t.slides.eq(t.activeIndex)),s.$imageEl=s.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),s.$imageWrapEl=s.$imageEl.parent("."+i.containerClass),s.maxRatio=s.$imageWrapEl.attr("data-swiper-zoom")||i.maxRatio,0!==s.$imageWrapEl.length)?(s.$imageEl&&s.$imageEl.transition(0),t.zoom.isScaling=!0):s.$imageEl=void 0},onGestureChange:function(e){var t=this,i=t.params.zoom,r=t.zoom,s=r.gesture;if(!Y.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;r.fakeGestureMoved=!0,s.scaleMove=Mt.getDistanceBetweenTouches(e)}s.$imageEl&&0!==s.$imageEl.length&&(Y.gestures?r.scale=e.scale*r.currentScale:r.scale=s.scaleMove/s.scaleStart*r.currentScale,r.scale>s.maxRatio&&(r.scale=s.maxRatio-1+Math.pow(r.scale-s.maxRatio+1,.5)),r.scale<i.minRatio&&(r.scale=i.minRatio+1-Math.pow(i.minRatio-r.scale+1,.5)),s.$imageEl.transform("translate3d(0,0,0) scale("+r.scale+")"))},onGestureEnd:function(e){var t=this,i=t.params.zoom,r=t.zoom,s=r.gesture;if(!Y.gestures){if(!r.fakeGestureTouched||!r.fakeGestureMoved)return;if("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2&&!je.android)return;r.fakeGestureTouched=!1,r.fakeGestureMoved=!1}s.$imageEl&&0!==s.$imageEl.length&&(r.scale=Math.max(Math.min(r.scale,s.maxRatio),i.minRatio),s.$imageEl.transition(t.params.speed).transform("translate3d(0,0,0) scale("+r.scale+")"),r.currentScale=r.scale,r.isScaling=!1,1===r.scale&&(s.$slideEl=void 0))},onTouchStart:function(e){var t=this,i=t.zoom,r=i.gesture,s=i.image;r.$imageEl&&0!==r.$imageEl.length&&(s.isTouched||(je.android&&e.cancelable&&e.preventDefault(),s.isTouched=!0,s.touchesStart.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,s.touchesStart.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY))},onTouchMove:function(e){var t=this,i=t.zoom,r=i.gesture,s=i.image,n=i.velocity;if(r.$imageEl&&0!==r.$imageEl.length&&(t.allowClick=!1,s.isTouched&&r.$slideEl)){s.isMoved||(s.width=r.$imageEl[0].offsetWidth,s.height=r.$imageEl[0].offsetHeight,s.startX=X.getTranslate(r.$imageWrapEl[0],"x")||0,s.startY=X.getTranslate(r.$imageWrapEl[0],"y")||0,r.slideWidth=r.$slideEl[0].offsetWidth,r.slideHeight=r.$slideEl[0].offsetHeight,r.$imageWrapEl.transition(0),t.rtl&&(s.startX=-s.startX,s.startY=-s.startY));var a=s.width*i.scale,o=s.height*i.scale;if(!(a<r.slideWidth&&o<r.slideHeight)){if(s.minX=Math.min(r.slideWidth/2-a/2,0),s.maxX=-s.minX,s.minY=Math.min(r.slideHeight/2-o/2,0),s.maxY=-s.minY,s.touchesCurrent.x="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,s.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!s.isMoved&&!i.isScaling){if(t.isHorizontal()&&(Math.floor(s.minX)===Math.floor(s.startX)&&s.touchesCurrent.x<s.touchesStart.x||Math.floor(s.maxX)===Math.floor(s.startX)&&s.touchesCurrent.x>s.touchesStart.x))return void(s.isTouched=!1);if(!t.isHorizontal()&&(Math.floor(s.minY)===Math.floor(s.startY)&&s.touchesCurrent.y<s.touchesStart.y||Math.floor(s.maxY)===Math.floor(s.startY)&&s.touchesCurrent.y>s.touchesStart.y))return void(s.isTouched=!1)}e.cancelable&&e.preventDefault(),e.stopPropagation(),s.isMoved=!0,s.currentX=s.touchesCurrent.x-s.touchesStart.x+s.startX,s.currentY=s.touchesCurrent.y-s.touchesStart.y+s.startY,s.currentX<s.minX&&(s.currentX=s.minX+1-Math.pow(s.minX-s.currentX+1,.8)),s.currentX>s.maxX&&(s.currentX=s.maxX-1+Math.pow(s.currentX-s.maxX+1,.8)),s.currentY<s.minY&&(s.currentY=s.minY+1-Math.pow(s.minY-s.currentY+1,.8)),s.currentY>s.maxY&&(s.currentY=s.maxY-1+Math.pow(s.currentY-s.maxY+1,.8)),n.prevPositionX||(n.prevPositionX=s.touchesCurrent.x),n.prevPositionY||(n.prevPositionY=s.touchesCurrent.y),n.prevTime||(n.prevTime=Date.now()),n.x=(s.touchesCurrent.x-n.prevPositionX)/(Date.now()-n.prevTime)/2,n.y=(s.touchesCurrent.y-n.prevPositionY)/(Date.now()-n.prevTime)/2,Math.abs(s.touchesCurrent.x-n.prevPositionX)<2&&(n.x=0),Math.abs(s.touchesCurrent.y-n.prevPositionY)<2&&(n.y=0),n.prevPositionX=s.touchesCurrent.x,n.prevPositionY=s.touchesCurrent.y,n.prevTime=Date.now(),r.$imageWrapEl.transform("translate3d("+s.currentX+"px, "+s.currentY+"px,0)")}}},onTouchEnd:function(){var e=this,t=e.zoom,i=t.gesture,r=t.image,s=t.velocity;if(i.$imageEl&&0!==i.$imageEl.length){if(!r.isTouched||!r.isMoved)return r.isTouched=!1,void(r.isMoved=!1);r.isTouched=!1,r.isMoved=!1;var n=300,a=300,o=s.x*n,l=r.currentX+o,d=s.y*a,u=r.currentY+d;0!==s.x&&(n=Math.abs((l-r.currentX)/s.x)),0!==s.y&&(a=Math.abs((u-r.currentY)/s.y));var c=Math.max(n,a);r.currentX=l,r.currentY=u;var h=r.width*t.scale,p=r.height*t.scale;r.minX=Math.min(i.slideWidth/2-h/2,0),r.maxX=-r.minX,r.minY=Math.min(i.slideHeight/2-p/2,0),r.maxY=-r.minY,r.currentX=Math.max(Math.min(r.currentX,r.maxX),r.minX),r.currentY=Math.max(Math.min(r.currentY,r.maxY),r.minY),i.$imageWrapEl.transition(c).transform("translate3d("+r.currentX+"px, "+r.currentY+"px,0)")}},onTransitionEnd:function(){var e=this,t=e.zoom,i=t.gesture;i.$slideEl&&e.previousIndex!==e.activeIndex&&(i.$imageEl&&i.$imageEl.transform("translate3d(0,0,0) scale(1)"),i.$imageWrapEl&&i.$imageWrapEl.transform("translate3d(0,0,0)"),t.scale=1,t.currentScale=1,i.$slideEl=void 0,i.$imageEl=void 0,i.$imageWrapEl=void 0)},toggle:function(e){var t=this,i=t.zoom;i.scale&&1!==i.scale?i.out():i.in(e)},in:function(e){var t,i,r,s,n,a,o,l,d,u,c,h,p,f,m,g,y,v,b=this,_=b.zoom,T=b.params.zoom,S=_.gesture,w=_.image;(S.$slideEl||(b.params.virtual&&b.params.virtual.enabled&&b.virtual?S.$slideEl=b.$wrapperEl.children("."+b.params.slideActiveClass):S.$slideEl=b.slides.eq(b.activeIndex),S.$imageEl=S.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),S.$imageWrapEl=S.$imageEl.parent("."+T.containerClass)),S.$imageEl&&0!==S.$imageEl.length)&&(S.$slideEl.addClass(""+T.zoomedSlideClass),"undefined"===typeof w.touchesStart.x&&e?(t="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,i="touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(t=w.touchesStart.x,i=w.touchesStart.y),_.scale=S.$imageWrapEl.attr("data-swiper-zoom")||T.maxRatio,_.currentScale=S.$imageWrapEl.attr("data-swiper-zoom")||T.maxRatio,e?(y=S.$slideEl[0].offsetWidth,v=S.$slideEl[0].offsetHeight,r=S.$slideEl.offset().left,s=S.$slideEl.offset().top,n=r+y/2-t,a=s+v/2-i,d=S.$imageEl[0].offsetWidth,u=S.$imageEl[0].offsetHeight,c=d*_.scale,h=u*_.scale,p=Math.min(y/2-c/2,0),f=Math.min(v/2-h/2,0),m=-p,g=-f,o=n*_.scale,l=a*_.scale,o<p&&(o=p),o>m&&(o=m),l<f&&(l=f),l>g&&(l=g)):(o=0,l=0),S.$imageWrapEl.transition(300).transform("translate3d("+o+"px, "+l+"px,0)"),S.$imageEl.transition(300).transform("translate3d(0,0,0) scale("+_.scale+")"))},out:function(){var e=this,t=e.zoom,i=e.params.zoom,r=t.gesture;r.$slideEl||(e.params.virtual&&e.params.virtual.enabled&&e.virtual?r.$slideEl=e.$wrapperEl.children("."+e.params.slideActiveClass):r.$slideEl=e.slides.eq(e.activeIndex),r.$imageEl=r.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),r.$imageWrapEl=r.$imageEl.parent("."+i.containerClass)),r.$imageEl&&0!==r.$imageEl.length&&(t.scale=1,t.currentScale=1,r.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),r.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"),r.$slideEl.removeClass(""+i.zoomedSlideClass),r.$slideEl=void 0)},enable:function(){var e=this,t=e.zoom;if(!t.enabled){t.enabled=!0;var i=!("touchstart"!==e.touchEvents.start||!Y.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1},r=!Y.passiveListener||{passive:!1,capture:!0},s="."+e.params.slideClass;Y.gestures?(e.$wrapperEl.on("gesturestart",s,t.onGestureStart,i),e.$wrapperEl.on("gesturechange",s,t.onGestureChange,i),e.$wrapperEl.on("gestureend",s,t.onGestureEnd,i)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.on(e.touchEvents.start,s,t.onGestureStart,i),e.$wrapperEl.on(e.touchEvents.move,s,t.onGestureChange,r),e.$wrapperEl.on(e.touchEvents.end,s,t.onGestureEnd,i),e.touchEvents.cancel&&e.$wrapperEl.on(e.touchEvents.cancel,s,t.onGestureEnd,i)),e.$wrapperEl.on(e.touchEvents.move,"."+e.params.zoom.containerClass,t.onTouchMove,r)}},disable:function(){var e=this,t=e.zoom;if(t.enabled){e.zoom.enabled=!1;var i=!("touchstart"!==e.touchEvents.start||!Y.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1},r=!Y.passiveListener||{passive:!1,capture:!0},s="."+e.params.slideClass;Y.gestures?(e.$wrapperEl.off("gesturestart",s,t.onGestureStart,i),e.$wrapperEl.off("gesturechange",s,t.onGestureChange,i),e.$wrapperEl.off("gestureend",s,t.onGestureEnd,i)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.off(e.touchEvents.start,s,t.onGestureStart,i),e.$wrapperEl.off(e.touchEvents.move,s,t.onGestureChange,r),e.$wrapperEl.off(e.touchEvents.end,s,t.onGestureEnd,i),e.touchEvents.cancel&&e.$wrapperEl.off(e.touchEvents.cancel,s,t.onGestureEnd,i)),e.$wrapperEl.off(e.touchEvents.move,"."+e.params.zoom.containerClass,t.onTouchMove,r)}}},Nt={name:"zoom",params:{zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}},create:function(){var e=this,t={enabled:!1,scale:1,currentScale:1,isScaling:!1,gesture:{$slideEl:void 0,slideWidth:void 0,slideHeight:void 0,$imageEl:void 0,$imageWrapEl:void 0,maxRatio:3},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0}};"onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out".split(" ").forEach((function(i){t[i]=Mt[i].bind(e)})),X.extend(e,{zoom:t});var i=1;Object.defineProperty(e.zoom,"scale",{get:function(){return i},set:function(t){if(i!==t){var r=e.zoom.gesture.$imageEl?e.zoom.gesture.$imageEl[0]:void 0,s=e.zoom.gesture.$slideEl?e.zoom.gesture.$slideEl[0]:void 0;e.emit("zoomChange",t,r,s)}i=t}})},on:{init:function(){var e=this;e.params.zoom.enabled&&e.zoom.enable()},destroy:function(){var e=this;e.zoom.disable()},touchStart:function(e){var t=this;t.zoom.enabled&&t.zoom.onTouchStart(e)},touchEnd:function(e){var t=this;t.zoom.enabled&&t.zoom.onTouchEnd(e)},doubleTap:function(e){var t=this;t.params.zoom.enabled&&t.zoom.enabled&&t.params.zoom.toggle&&t.zoom.toggle(e)},transitionEnd:function(){var e=this;e.zoom.enabled&&e.params.zoom.enabled&&e.zoom.onTransitionEnd()},slideChange:function(){var e=this;e.zoom.enabled&&e.params.zoom.enabled&&e.params.cssMode&&e.zoom.onTransitionEnd()}}},Rt={loadInSlide:function(e,t){void 0===t&&(t=!0);var i=this,r=i.params.lazy;if("undefined"!==typeof e&&0!==i.slides.length){var s=i.virtual&&i.params.virtual.enabled,n=s?i.$wrapperEl.children("."+i.params.slideClass+'[data-swiper-slide-index="'+e+'"]'):i.slides.eq(e),a=n.find("."+r.elementClass+":not(."+r.loadedClass+"):not(."+r.loadingClass+")");!n.hasClass(r.elementClass)||n.hasClass(r.loadedClass)||n.hasClass(r.loadingClass)||(a=a.add(n[0])),0!==a.length&&a.each((function(e,s){var a=o(s);a.addClass(r.loadingClass);var l=a.attr("data-background"),d=a.attr("data-src"),u=a.attr("data-srcset"),c=a.attr("data-sizes"),h=a.parent("picture");i.loadImage(a[0],d||l,u,c,!1,(function(){if("undefined"!==typeof i&&null!==i&&i&&(!i||i.params)&&!i.destroyed){if(l?(a.css("background-image",'url("'+l+'")'),a.removeAttr("data-background")):(u&&(a.attr("srcset",u),a.removeAttr("data-srcset")),c&&(a.attr("sizes",c),a.removeAttr("data-sizes")),h.length&&h.children("source").each((function(e,t){var i=o(t);i.attr("data-srcset")&&(i.attr("srcset",i.attr("data-srcset")),i.removeAttr("data-srcset"))})),d&&(a.attr("src",d),a.removeAttr("data-src"))),a.addClass(r.loadedClass).removeClass(r.loadingClass),n.find("."+r.preloaderClass).remove(),i.params.loop&&t){var e=n.attr("data-swiper-slide-index");if(n.hasClass(i.params.slideDuplicateClass)){var s=i.$wrapperEl.children('[data-swiper-slide-index="'+e+'"]:not(.'+i.params.slideDuplicateClass+")");i.lazy.loadInSlide(s.index(),!1)}else{var p=i.$wrapperEl.children("."+i.params.slideDuplicateClass+'[data-swiper-slide-index="'+e+'"]');i.lazy.loadInSlide(p.index(),!1)}}i.emit("lazyImageReady",n[0],a[0]),i.params.autoHeight&&i.updateAutoHeight()}})),i.emit("lazyImageLoad",n[0],a[0])}))}},load:function(){var e=this,t=e.$wrapperEl,i=e.params,r=e.slides,s=e.activeIndex,n=e.virtual&&i.virtual.enabled,a=i.lazy,l=i.slidesPerView;function d(e){if(n){if(t.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]').length)return!0}else if(r[e])return!0;return!1}function u(e){return n?o(e).attr("data-swiper-slide-index"):o(e).index()}if("auto"===l&&(l=0),e.lazy.initialImageLoaded||(e.lazy.initialImageLoaded=!0),e.params.watchSlidesVisibility)t.children("."+i.slideVisibleClass).each((function(t,i){var r=n?o(i).attr("data-swiper-slide-index"):o(i).index();e.lazy.loadInSlide(r)}));else if(l>1)for(var c=s;c<s+l;c+=1)d(c)&&e.lazy.loadInSlide(c);else e.lazy.loadInSlide(s);if(a.loadPrevNext)if(l>1||a.loadPrevNextAmount&&a.loadPrevNextAmount>1){for(var h=a.loadPrevNextAmount,p=l,f=Math.min(s+p+Math.max(h,p),r.length),m=Math.max(s-Math.max(p,h),0),g=s+l;g<f;g+=1)d(g)&&e.lazy.loadInSlide(g);for(var y=m;y<s;y+=1)d(y)&&e.lazy.loadInSlide(y)}else{var v=t.children("."+i.slideNextClass);v.length>0&&e.lazy.loadInSlide(u(v));var b=t.children("."+i.slidePrevClass);b.length>0&&e.lazy.loadInSlide(u(b))}}},Ut={name:"lazy",params:{lazy:{enabled:!1,loadPrevNext:!1,loadPrevNextAmount:1,loadOnTransitionStart:!1,elementClass:"swiper-lazy",loadingClass:"swiper-lazy-loading",loadedClass:"swiper-lazy-loaded",preloaderClass:"swiper-lazy-preloader"}},create:function(){var e=this;X.extend(e,{lazy:{initialImageLoaded:!1,load:Rt.load.bind(e),loadInSlide:Rt.loadInSlide.bind(e)}})},on:{beforeInit:function(){var e=this;e.params.lazy.enabled&&e.params.preloadImages&&(e.params.preloadImages=!1)},init:function(){var e=this;e.params.lazy.enabled&&!e.params.loop&&0===e.params.initialSlide&&e.lazy.load()},scroll:function(){var e=this;e.params.freeMode&&!e.params.freeModeSticky&&e.lazy.load()},resize:function(){var e=this;e.params.lazy.enabled&&e.lazy.load()},scrollbarDragMove:function(){var e=this;e.params.lazy.enabled&&e.lazy.load()},transitionStart:function(){var e=this;e.params.lazy.enabled&&(e.params.lazy.loadOnTransitionStart||!e.params.lazy.loadOnTransitionStart&&!e.lazy.initialImageLoaded)&&e.lazy.load()},transitionEnd:function(){var e=this;e.params.lazy.enabled&&!e.params.lazy.loadOnTransitionStart&&e.lazy.load()},slideChange:function(){var e=this;e.params.lazy.enabled&&e.params.cssMode&&e.lazy.load()}}},Bt={LinearSpline:function(e,t){var i,r,s=function(){var e,t,i;return function(r,s){t=-1,e=r.length;while(e-t>1)i=e+t>>1,r[i]<=s?t=i:e=i;return e}}();return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(r=s(this.x,e),i=r-1,(e-this.x[i])*(this.y[r]-this.y[i])/(this.x[r]-this.x[i])+this.y[i]):0},this},getInterpolateFunction:function(e){var t=this;t.controller.spline||(t.controller.spline=t.params.loop?new Bt.LinearSpline(t.slidesGrid,e.slidesGrid):new Bt.LinearSpline(t.snapGrid,e.snapGrid))},setTranslate:function(e,t){var i,r,s=this,n=s.controller.control;function a(e){var t=s.rtlTranslate?-s.translate:s.translate;"slide"===s.params.controller.by&&(s.controller.getInterpolateFunction(e),r=-s.controller.spline.interpolate(-t)),r&&"container"!==s.params.controller.by||(i=(e.maxTranslate()-e.minTranslate())/(s.maxTranslate()-s.minTranslate()),r=(t-s.minTranslate())*i+e.minTranslate()),s.params.controller.inverse&&(r=e.maxTranslate()-r),e.updateProgress(r),e.setTranslate(r,s),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(n))for(var o=0;o<n.length;o+=1)n[o]!==t&&n[o]instanceof ct&&a(n[o]);else n instanceof ct&&t!==n&&a(n)},setTransition:function(e,t){var i,r=this,s=r.controller.control;function n(t){t.setTransition(e,r),0!==e&&(t.transitionStart(),t.params.autoHeight&&X.nextTick((function(){t.updateAutoHeight()})),t.$wrapperEl.transitionEnd((function(){s&&(t.params.loop&&"slide"===r.params.controller.by&&t.loopFix(),t.transitionEnd())})))}if(Array.isArray(s))for(i=0;i<s.length;i+=1)s[i]!==t&&s[i]instanceof ct&&n(s[i]);else s instanceof ct&&t!==s&&n(s)}},jt={name:"controller",params:{controller:{control:void 0,inverse:!1,by:"slide"}},create:function(){var e=this;X.extend(e,{controller:{control:e.params.controller.control,getInterpolateFunction:Bt.getInterpolateFunction.bind(e),setTranslate:Bt.setTranslate.bind(e),setTransition:Bt.setTransition.bind(e)}})},on:{update:function(){var e=this;e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},resize:function(){var e=this;e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},observerUpdate:function(){var e=this;e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},setTranslate:function(e,t){var i=this;i.controller.control&&i.controller.setTranslate(e,t)},setTransition:function(e,t){var i=this;i.controller.control&&i.controller.setTransition(e,t)}}},Ft={makeElFocusable:function(e){return e.attr("tabIndex","0"),e},makeElNotFocusable:function(e){return e.attr("tabIndex","-1"),e},addElRole:function(e,t){return e.attr("role",t),e},addElLabel:function(e,t){return e.attr("aria-label",t),e},disableEl:function(e){return e.attr("aria-disabled",!0),e},enableEl:function(e){return e.attr("aria-disabled",!1),e},onEnterKey:function(e){var t=this,i=t.params.a11y;if(13===e.keyCode){var r=o(e.target);t.navigation&&t.navigation.$nextEl&&r.is(t.navigation.$nextEl)&&(t.isEnd&&!t.params.loop||t.slideNext(),t.isEnd?t.a11y.notify(i.lastSlideMessage):t.a11y.notify(i.nextSlideMessage)),t.navigation&&t.navigation.$prevEl&&r.is(t.navigation.$prevEl)&&(t.isBeginning&&!t.params.loop||t.slidePrev(),t.isBeginning?t.a11y.notify(i.firstSlideMessage):t.a11y.notify(i.prevSlideMessage)),t.pagination&&r.is("."+t.params.pagination.bulletClass)&&r[0].click()}},notify:function(e){var t=this,i=t.a11y.liveRegion;0!==i.length&&(i.html(""),i.html(e))},updateNavigation:function(){var e=this;if(!e.params.loop&&e.navigation){var t=e.navigation,i=t.$nextEl,r=t.$prevEl;r&&r.length>0&&(e.isBeginning?(e.a11y.disableEl(r),e.a11y.makeElNotFocusable(r)):(e.a11y.enableEl(r),e.a11y.makeElFocusable(r))),i&&i.length>0&&(e.isEnd?(e.a11y.disableEl(i),e.a11y.makeElNotFocusable(i)):(e.a11y.enableEl(i),e.a11y.makeElFocusable(i)))}},updatePagination:function(){var e=this,t=e.params.a11y;e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.bullets.each((function(i,r){var s=o(r);e.a11y.makeElFocusable(s),e.a11y.addElRole(s,"button"),e.a11y.addElLabel(s,t.paginationBulletMessage.replace(/\{\{index\}\}/,s.index()+1))}))},init:function(){var e=this;e.$el.append(e.a11y.liveRegion);var t,i,r=e.params.a11y;e.navigation&&e.navigation.$nextEl&&(t=e.navigation.$nextEl),e.navigation&&e.navigation.$prevEl&&(i=e.navigation.$prevEl),t&&(e.a11y.makeElFocusable(t),e.a11y.addElRole(t,"button"),e.a11y.addElLabel(t,r.nextSlideMessage),t.on("keydown",e.a11y.onEnterKey)),i&&(e.a11y.makeElFocusable(i),e.a11y.addElRole(i,"button"),e.a11y.addElLabel(i,r.prevSlideMessage),i.on("keydown",e.a11y.onEnterKey)),e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.$el.on("keydown","."+e.params.pagination.bulletClass,e.a11y.onEnterKey)},destroy:function(){var e,t,i=this;i.a11y.liveRegion&&i.a11y.liveRegion.length>0&&i.a11y.liveRegion.remove(),i.navigation&&i.navigation.$nextEl&&(e=i.navigation.$nextEl),i.navigation&&i.navigation.$prevEl&&(t=i.navigation.$prevEl),e&&e.off("keydown",i.a11y.onEnterKey),t&&t.off("keydown",i.a11y.onEnterKey),i.pagination&&i.params.pagination.clickable&&i.pagination.bullets&&i.pagination.bullets.length&&i.pagination.$el.off("keydown","."+i.params.pagination.bulletClass,i.a11y.onEnterKey)}},qt={name:"a11y",params:{a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}"}},create:function(){var e=this;X.extend(e,{a11y:{liveRegion:o('<span class="'+e.params.a11y.notificationClass+'" aria-live="assertive" aria-atomic="true"></span>')}}),Object.keys(Ft).forEach((function(t){e.a11y[t]=Ft[t].bind(e)}))},on:{init:function(){var e=this;e.params.a11y.enabled&&(e.a11y.init(),e.a11y.updateNavigation())},toEdge:function(){var e=this;e.params.a11y.enabled&&e.a11y.updateNavigation()},fromEdge:function(){var e=this;e.params.a11y.enabled&&e.a11y.updateNavigation()},paginationUpdate:function(){var e=this;e.params.a11y.enabled&&e.a11y.updatePagination()},destroy:function(){var e=this;e.params.a11y.enabled&&e.a11y.destroy()}}},$t={init:function(){var e=this;if(e.params.history){if(!s.history||!s.history.pushState)return e.params.history.enabled=!1,void(e.params.hashNavigation.enabled=!0);var t=e.history;t.initialized=!0,t.paths=$t.getPathValues(),(t.paths.key||t.paths.value)&&(t.scrollToSlide(0,t.paths.value,e.params.runCallbacksOnInit),e.params.history.replaceState||s.addEventListener("popstate",e.history.setHistoryPopState))}},destroy:function(){var e=this;e.params.history.replaceState||s.removeEventListener("popstate",e.history.setHistoryPopState)},setHistoryPopState:function(){var e=this;e.history.paths=$t.getPathValues(),e.history.scrollToSlide(e.params.speed,e.history.paths.value,!1)},getPathValues:function(){var e=s.location.pathname.slice(1).split("/").filter((function(e){return""!==e})),t=e.length,i=e[t-2],r=e[t-1];return{key:i,value:r}},setHistory:function(e,t){var i=this;if(i.history.initialized&&i.params.history.enabled){var r=i.slides.eq(t),n=$t.slugify(r.attr("data-history"));s.location.pathname.includes(e)||(n=e+"/"+n);var a=s.history.state;a&&a.value===n||(i.params.history.replaceState?s.history.replaceState({value:n},null,n):s.history.pushState({value:n},null,n))}},slugify:function(e){return e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},scrollToSlide:function(e,t,i){var r=this;if(t)for(var s=0,n=r.slides.length;s<n;s+=1){var a=r.slides.eq(s),o=$t.slugify(a.attr("data-history"));if(o===t&&!a.hasClass(r.params.slideDuplicateClass)){var l=a.index();r.slideTo(l,e,i)}}else r.slideTo(0,e,i)}},Ht={name:"history",params:{history:{enabled:!1,replaceState:!1,key:"slides"}},create:function(){var e=this;X.extend(e,{history:{init:$t.init.bind(e),setHistory:$t.setHistory.bind(e),setHistoryPopState:$t.setHistoryPopState.bind(e),scrollToSlide:$t.scrollToSlide.bind(e),destroy:$t.destroy.bind(e)}})},on:{init:function(){var e=this;e.params.history.enabled&&e.history.init()},destroy:function(){var e=this;e.params.history.enabled&&e.history.destroy()},transitionEnd:function(){var e=this;e.history.initialized&&e.history.setHistory(e.params.history.key,e.activeIndex)},slideChange:function(){var e=this;e.history.initialized&&e.params.cssMode&&e.history.setHistory(e.params.history.key,e.activeIndex)}}},zt={onHashCange:function(){var e=this;e.emit("hashChange");var t=i.location.hash.replace("#",""),r=e.slides.eq(e.activeIndex).attr("data-hash");if(t!==r){var s=e.$wrapperEl.children("."+e.params.slideClass+'[data-hash="'+t+'"]').index();if("undefined"===typeof s)return;e.slideTo(s)}},setHash:function(){var e=this;if(e.hashNavigation.initialized&&e.params.hashNavigation.enabled)if(e.params.hashNavigation.replaceState&&s.history&&s.history.replaceState)s.history.replaceState(null,null,"#"+e.slides.eq(e.activeIndex).attr("data-hash")||!1),e.emit("hashSet");else{var t=e.slides.eq(e.activeIndex),r=t.attr("data-hash")||t.attr("data-history");i.location.hash=r||"",e.emit("hashSet")}},init:function(){var e=this;if(!(!e.params.hashNavigation.enabled||e.params.history&&e.params.history.enabled)){e.hashNavigation.initialized=!0;var t=i.location.hash.replace("#","");if(t)for(var r=0,n=0,a=e.slides.length;n<a;n+=1){var l=e.slides.eq(n),d=l.attr("data-hash")||l.attr("data-history");if(d===t&&!l.hasClass(e.params.slideDuplicateClass)){var u=l.index();e.slideTo(u,r,e.params.runCallbacksOnInit,!0)}}e.params.hashNavigation.watchState&&o(s).on("hashchange",e.hashNavigation.onHashCange)}},destroy:function(){var e=this;e.params.hashNavigation.watchState&&o(s).off("hashchange",e.hashNavigation.onHashCange)}},Vt={name:"hash-navigation",params:{hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}},create:function(){var e=this;X.extend(e,{hashNavigation:{initialized:!1,init:zt.init.bind(e),destroy:zt.destroy.bind(e),setHash:zt.setHash.bind(e),onHashCange:zt.onHashCange.bind(e)}})},on:{init:function(){var e=this;e.params.hashNavigation.enabled&&e.hashNavigation.init()},destroy:function(){var e=this;e.params.hashNavigation.enabled&&e.hashNavigation.destroy()},transitionEnd:function(){var e=this;e.hashNavigation.initialized&&e.hashNavigation.setHash()},slideChange:function(){var e=this;e.hashNavigation.initialized&&e.params.cssMode&&e.hashNavigation.setHash()}}},Gt={run:function(){var e=this,t=e.slides.eq(e.activeIndex),i=e.params.autoplay.delay;t.attr("data-swiper-autoplay")&&(i=t.attr("data-swiper-autoplay")||e.params.autoplay.delay),clearTimeout(e.autoplay.timeout),e.autoplay.timeout=X.nextTick((function(){e.params.autoplay.reverseDirection?e.params.loop?(e.loopFix(),e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.isBeginning?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(e.slides.length-1,e.params.speed,!0,!0),e.emit("autoplay")):(e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.params.loop?(e.loopFix(),e.slideNext(e.params.speed,!0,!0),e.emit("autoplay")):e.isEnd?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(0,e.params.speed,!0,!0),e.emit("autoplay")):(e.slideNext(e.params.speed,!0,!0),e.emit("autoplay")),e.params.cssMode&&e.autoplay.running&&e.autoplay.run()}),i)},start:function(){var e=this;return"undefined"===typeof e.autoplay.timeout&&(!e.autoplay.running&&(e.autoplay.running=!0,e.emit("autoplayStart"),e.autoplay.run(),!0))},stop:function(){var e=this;return!!e.autoplay.running&&("undefined"!==typeof e.autoplay.timeout&&(e.autoplay.timeout&&(clearTimeout(e.autoplay.timeout),e.autoplay.timeout=void 0),e.autoplay.running=!1,e.emit("autoplayStop"),!0))},pause:function(e){var t=this;t.autoplay.running&&(t.autoplay.paused||(t.autoplay.timeout&&clearTimeout(t.autoplay.timeout),t.autoplay.paused=!0,0!==e&&t.params.autoplay.waitForTransition?(t.$wrapperEl[0].addEventListener("transitionend",t.autoplay.onTransitionEnd),t.$wrapperEl[0].addEventListener("webkitTransitionEnd",t.autoplay.onTransitionEnd)):(t.autoplay.paused=!1,t.autoplay.run())))}},Wt={name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1}},create:function(){var e=this;X.extend(e,{autoplay:{running:!1,paused:!1,run:Gt.run.bind(e),start:Gt.start.bind(e),stop:Gt.stop.bind(e),pause:Gt.pause.bind(e),onVisibilityChange:function(){"hidden"===document.visibilityState&&e.autoplay.running&&e.autoplay.pause(),"visible"===document.visibilityState&&e.autoplay.paused&&(e.autoplay.run(),e.autoplay.paused=!1)},onTransitionEnd:function(t){e&&!e.destroyed&&e.$wrapperEl&&t.target===this&&(e.$wrapperEl[0].removeEventListener("transitionend",e.autoplay.onTransitionEnd),e.$wrapperEl[0].removeEventListener("webkitTransitionEnd",e.autoplay.onTransitionEnd),e.autoplay.paused=!1,e.autoplay.running?e.autoplay.run():e.autoplay.stop())}}})},on:{init:function(){var e=this;e.params.autoplay.enabled&&(e.autoplay.start(),document.addEventListener("visibilitychange",e.autoplay.onVisibilityChange))},beforeTransitionStart:function(e,t){var i=this;i.autoplay.running&&(t||!i.params.autoplay.disableOnInteraction?i.autoplay.pause(e):i.autoplay.stop())},sliderFirstMove:function(){var e=this;e.autoplay.running&&(e.params.autoplay.disableOnInteraction?e.autoplay.stop():e.autoplay.pause())},touchEnd:function(){var e=this;e.params.cssMode&&e.autoplay.paused&&!e.params.autoplay.disableOnInteraction&&e.autoplay.run()},destroy:function(){var e=this;e.autoplay.running&&e.autoplay.stop(),document.removeEventListener("visibilitychange",e.autoplay.onVisibilityChange)}}},Xt={setTranslate:function(){for(var e=this,t=e.slides,i=0;i<t.length;i+=1){var r=e.slides.eq(i),s=r[0].swiperSlideOffset,n=-s;e.params.virtualTranslate||(n-=e.translate);var a=0;e.isHorizontal()||(a=n,n=0);var o=e.params.fadeEffect.crossFade?Math.max(1-Math.abs(r[0].progress),0):1+Math.min(Math.max(r[0].progress,-1),0);r.css({opacity:o}).transform("translate3d("+n+"px, "+a+"px, 0px)")}},setTransition:function(e){var t=this,i=t.slides,r=t.$wrapperEl;if(i.transition(e),t.params.virtualTranslate&&0!==e){var s=!1;i.transitionEnd((function(){if(!s&&t&&!t.destroyed){s=!0,t.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],i=0;i<e.length;i+=1)r.trigger(e[i])}}))}}},Yt={name:"effect-fade",params:{fadeEffect:{crossFade:!1}},create:function(){var e=this;X.extend(e,{fadeEffect:{setTranslate:Xt.setTranslate.bind(e),setTransition:Xt.setTransition.bind(e)}})},on:{beforeInit:function(){var e=this;if("fade"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"fade");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};X.extend(e.params,t),X.extend(e.originalParams,t)}},setTranslate:function(){var e=this;"fade"===e.params.effect&&e.fadeEffect.setTranslate()},setTransition:function(e){var t=this;"fade"===t.params.effect&&t.fadeEffect.setTransition(e)}}},Kt={setTranslate:function(){var e,t=this,i=t.$el,r=t.$wrapperEl,s=t.slides,n=t.width,a=t.height,l=t.rtlTranslate,d=t.size,u=t.params.cubeEffect,c=t.isHorizontal(),h=t.virtual&&t.params.virtual.enabled,p=0;u.shadow&&(c?(e=r.find(".swiper-cube-shadow"),0===e.length&&(e=o('<div class="swiper-cube-shadow"></div>'),r.append(e)),e.css({height:n+"px"})):(e=i.find(".swiper-cube-shadow"),0===e.length&&(e=o('<div class="swiper-cube-shadow"></div>'),i.append(e))));for(var f=0;f<s.length;f+=1){var m=s.eq(f),g=f;h&&(g=parseInt(m.attr("data-swiper-slide-index"),10));var y=90*g,v=Math.floor(y/360);l&&(y=-y,v=Math.floor(-y/360));var b=Math.max(Math.min(m[0].progress,1),-1),_=0,T=0,S=0;g%4===0?(_=4*-v*d,S=0):(g-1)%4===0?(_=0,S=4*-v*d):(g-2)%4===0?(_=d+4*v*d,S=d):(g-3)%4===0&&(_=-d,S=3*d+4*d*v),l&&(_=-_),c||(T=_,_=0);var w="rotateX("+(c?0:-y)+"deg) rotateY("+(c?y:0)+"deg) translate3d("+_+"px, "+T+"px, "+S+"px)";if(b<=1&&b>-1&&(p=90*g+90*b,l&&(p=90*-g-90*b)),m.transform(w),u.slideShadows){var E=c?m.find(".swiper-slide-shadow-left"):m.find(".swiper-slide-shadow-top"),C=c?m.find(".swiper-slide-shadow-right"):m.find(".swiper-slide-shadow-bottom");0===E.length&&(E=o('<div class="swiper-slide-shadow-'+(c?"left":"top")+'"></div>'),m.append(E)),0===C.length&&(C=o('<div class="swiper-slide-shadow-'+(c?"right":"bottom")+'"></div>'),m.append(C)),E.length&&(E[0].style.opacity=Math.max(-b,0)),C.length&&(C[0].style.opacity=Math.max(b,0))}}if(r.css({"-webkit-transform-origin":"50% 50% -"+d/2+"px","-moz-transform-origin":"50% 50% -"+d/2+"px","-ms-transform-origin":"50% 50% -"+d/2+"px","transform-origin":"50% 50% -"+d/2+"px"}),u.shadow)if(c)e.transform("translate3d(0px, "+(n/2+u.shadowOffset)+"px, "+-n/2+"px) rotateX(90deg) rotateZ(0deg) scale("+u.shadowScale+")");else{var x=Math.abs(p)-90*Math.floor(Math.abs(p)/90),k=1.5-(Math.sin(2*x*Math.PI/360)/2+Math.cos(2*x*Math.PI/360)/2),I=u.shadowScale,A=u.shadowScale/k,P=u.shadowOffset;e.transform("scale3d("+I+", 1, "+A+") translate3d(0px, "+(a/2+P)+"px, "+-a/2/A+"px) rotateX(-90deg)")}var O=ft.isSafari||ft.isWebView?-d/2:0;r.transform("translate3d(0px,0,"+O+"px) rotateX("+(t.isHorizontal()?0:p)+"deg) rotateY("+(t.isHorizontal()?-p:0)+"deg)")},setTransition:function(e){var t=this,i=t.$el,r=t.slides;r.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.cubeEffect.shadow&&!t.isHorizontal()&&i.find(".swiper-cube-shadow").transition(e)}},Jt={name:"effect-cube",params:{cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}},create:function(){var e=this;X.extend(e,{cubeEffect:{setTranslate:Kt.setTranslate.bind(e),setTransition:Kt.setTransition.bind(e)}})},on:{beforeInit:function(){var e=this;if("cube"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"cube"),e.classNames.push(e.params.containerModifierClass+"3d");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0};X.extend(e.params,t),X.extend(e.originalParams,t)}},setTranslate:function(){var e=this;"cube"===e.params.effect&&e.cubeEffect.setTranslate()},setTransition:function(e){var t=this;"cube"===t.params.effect&&t.cubeEffect.setTransition(e)}}},Qt={setTranslate:function(){for(var e=this,t=e.slides,i=e.rtlTranslate,r=0;r<t.length;r+=1){var s=t.eq(r),n=s[0].progress;e.params.flipEffect.limitRotation&&(n=Math.max(Math.min(s[0].progress,1),-1));var a=s[0].swiperSlideOffset,l=-180*n,d=l,u=0,c=-a,h=0;if(e.isHorizontal()?i&&(d=-d):(h=c,c=0,u=-d,d=0),s[0].style.zIndex=-Math.abs(Math.round(n))+t.length,e.params.flipEffect.slideShadows){var p=e.isHorizontal()?s.find(".swiper-slide-shadow-left"):s.find(".swiper-slide-shadow-top"),f=e.isHorizontal()?s.find(".swiper-slide-shadow-right"):s.find(".swiper-slide-shadow-bottom");0===p.length&&(p=o('<div class="swiper-slide-shadow-'+(e.isHorizontal()?"left":"top")+'"></div>'),s.append(p)),0===f.length&&(f=o('<div class="swiper-slide-shadow-'+(e.isHorizontal()?"right":"bottom")+'"></div>'),s.append(f)),p.length&&(p[0].style.opacity=Math.max(-n,0)),f.length&&(f[0].style.opacity=Math.max(n,0))}s.transform("translate3d("+c+"px, "+h+"px, 0px) rotateX("+u+"deg) rotateY("+d+"deg)")}},setTransition:function(e){var t=this,i=t.slides,r=t.activeIndex,s=t.$wrapperEl;if(i.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.virtualTranslate&&0!==e){var n=!1;i.eq(r).transitionEnd((function(){if(!n&&t&&!t.destroyed){n=!0,t.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],i=0;i<e.length;i+=1)s.trigger(e[i])}}))}}},Zt={name:"effect-flip",params:{flipEffect:{slideShadows:!0,limitRotation:!0}},create:function(){var e=this;X.extend(e,{flipEffect:{setTranslate:Qt.setTranslate.bind(e),setTransition:Qt.setTransition.bind(e)}})},on:{beforeInit:function(){var e=this;if("flip"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"flip"),e.classNames.push(e.params.containerModifierClass+"3d");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};X.extend(e.params,t),X.extend(e.originalParams,t)}},setTranslate:function(){var e=this;"flip"===e.params.effect&&e.flipEffect.setTranslate()},setTransition:function(e){var t=this;"flip"===t.params.effect&&t.flipEffect.setTransition(e)}}},ei={setTranslate:function(){for(var e=this,t=e.width,i=e.height,r=e.slides,s=e.$wrapperEl,n=e.slidesSizesGrid,a=e.params.coverflowEffect,l=e.isHorizontal(),d=e.translate,u=l?t/2-d:i/2-d,c=l?a.rotate:-a.rotate,h=a.depth,p=0,f=r.length;p<f;p+=1){var m=r.eq(p),g=n[p],y=m[0].swiperSlideOffset,v=(u-y-g/2)/g*a.modifier,b=l?c*v:0,_=l?0:c*v,T=-h*Math.abs(v),S=a.stretch;"string"===typeof S&&-1!==S.indexOf("%")&&(S=parseFloat(a.stretch)/100*g);var w=l?0:S*v,E=l?S*v:0,C=1-(1-a.scale)*Math.abs(v);Math.abs(E)<.001&&(E=0),Math.abs(w)<.001&&(w=0),Math.abs(T)<.001&&(T=0),Math.abs(b)<.001&&(b=0),Math.abs(_)<.001&&(_=0),Math.abs(C)<.001&&(C=0);var x="translate3d("+E+"px,"+w+"px,"+T+"px) rotateX("+_+"deg) rotateY("+b+"deg) scale("+C+")";if(m.transform(x),m[0].style.zIndex=1-Math.abs(Math.round(v)),a.slideShadows){var k=l?m.find(".swiper-slide-shadow-left"):m.find(".swiper-slide-shadow-top"),I=l?m.find(".swiper-slide-shadow-right"):m.find(".swiper-slide-shadow-bottom");0===k.length&&(k=o('<div class="swiper-slide-shadow-'+(l?"left":"top")+'"></div>'),m.append(k)),0===I.length&&(I=o('<div class="swiper-slide-shadow-'+(l?"right":"bottom")+'"></div>'),m.append(I)),k.length&&(k[0].style.opacity=v>0?v:0),I.length&&(I[0].style.opacity=-v>0?-v:0)}}if(Y.pointerEvents||Y.prefixedPointerEvents){var A=s[0].style;A.perspectiveOrigin=u+"px 50%"}},setTransition:function(e){var t=this;t.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}},ti={name:"effect-coverflow",params:{coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}},create:function(){var e=this;X.extend(e,{coverflowEffect:{setTranslate:ei.setTranslate.bind(e),setTransition:ei.setTransition.bind(e)}})},on:{beforeInit:function(){var e=this;"coverflow"===e.params.effect&&(e.classNames.push(e.params.containerModifierClass+"coverflow"),e.classNames.push(e.params.containerModifierClass+"3d"),e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)},setTranslate:function(){var e=this;"coverflow"===e.params.effect&&e.coverflowEffect.setTranslate()},setTransition:function(e){var t=this;"coverflow"===t.params.effect&&t.coverflowEffect.setTransition(e)}}},ii={init:function(){var e=this,t=e.params,i=t.thumbs,r=e.constructor;i.swiper instanceof r?(e.thumbs.swiper=i.swiper,X.extend(e.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),X.extend(e.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1})):X.isObject(i.swiper)&&(e.thumbs.swiper=new r(X.extend({},i.swiper,{watchSlidesVisibility:!0,watchSlidesProgress:!0,slideToClickedSlide:!1})),e.thumbs.swiperCreated=!0),e.thumbs.swiper.$el.addClass(e.params.thumbs.thumbsContainerClass),e.thumbs.swiper.on("tap",e.thumbs.onThumbClick)},onThumbClick:function(){var e=this,t=e.thumbs.swiper;if(t){var i=t.clickedIndex,r=t.clickedSlide;if((!r||!o(r).hasClass(e.params.thumbs.slideThumbActiveClass))&&"undefined"!==typeof i&&null!==i){var s;if(s=t.params.loop?parseInt(o(t.clickedSlide).attr("data-swiper-slide-index"),10):i,e.params.loop){var n=e.activeIndex;e.slides.eq(n).hasClass(e.params.slideDuplicateClass)&&(e.loopFix(),e._clientLeft=e.$wrapperEl[0].clientLeft,n=e.activeIndex);var a=e.slides.eq(n).prevAll('[data-swiper-slide-index="'+s+'"]').eq(0).index(),l=e.slides.eq(n).nextAll('[data-swiper-slide-index="'+s+'"]').eq(0).index();s="undefined"===typeof a?l:"undefined"===typeof l?a:l-n<n-a?l:a}e.slideTo(s)}}},update:function(e){var t=this,i=t.thumbs.swiper;if(i){var r="auto"===i.params.slidesPerView?i.slidesPerViewDynamic():i.params.slidesPerView,s=t.params.thumbs.autoScrollOffset,n=s&&!i.params.loop;if(t.realIndex!==i.realIndex||n){var a,o,l=i.activeIndex;if(i.params.loop){i.slides.eq(l).hasClass(i.params.slideDuplicateClass)&&(i.loopFix(),i._clientLeft=i.$wrapperEl[0].clientLeft,l=i.activeIndex);var d=i.slides.eq(l).prevAll('[data-swiper-slide-index="'+t.realIndex+'"]').eq(0).index(),u=i.slides.eq(l).nextAll('[data-swiper-slide-index="'+t.realIndex+'"]').eq(0).index();a="undefined"===typeof d?u:"undefined"===typeof u?d:u-l===l-d?l:u-l<l-d?u:d,o=t.activeIndex>t.previousIndex?"next":"prev"}else a=t.realIndex,o=a>t.previousIndex?"next":"prev";n&&(a+="next"===o?s:-1*s),i.visibleSlidesIndexes&&i.visibleSlidesIndexes.indexOf(a)<0&&(i.params.centeredSlides?a=a>l?a-Math.floor(r/2)+1:a+Math.floor(r/2)-1:a>l&&(a=a-r+1),i.slideTo(a,e?0:void 0))}var c=1,h=t.params.thumbs.slideThumbActiveClass;if(t.params.slidesPerView>1&&!t.params.centeredSlides&&(c=t.params.slidesPerView),t.params.thumbs.multipleActiveThumbs||(c=1),c=Math.floor(c),i.slides.removeClass(h),i.params.loop||i.params.virtual&&i.params.virtual.enabled)for(var p=0;p<c;p+=1)i.$wrapperEl.children('[data-swiper-slide-index="'+(t.realIndex+p)+'"]').addClass(h);else for(var f=0;f<c;f+=1)i.slides.eq(t.realIndex+f).addClass(h)}}},ri={name:"thumbs",params:{thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-container-thumbs"}},create:function(){var e=this;X.extend(e,{thumbs:{swiper:null,init:ii.init.bind(e),update:ii.update.bind(e),onThumbClick:ii.onThumbClick.bind(e)}})},on:{beforeInit:function(){var e=this,t=e.params,i=t.thumbs;i&&i.swiper&&(e.thumbs.init(),e.thumbs.update(!0))},slideChange:function(){var e=this;e.thumbs.swiper&&e.thumbs.update()},update:function(){var e=this;e.thumbs.swiper&&e.thumbs.update()},resize:function(){var e=this;e.thumbs.swiper&&e.thumbs.update()},observerUpdate:function(){var e=this;e.thumbs.swiper&&e.thumbs.update()},setTransition:function(e){var t=this,i=t.thumbs.swiper;i&&i.setTransition(e)},beforeDestroy:function(){var e=this,t=e.thumbs.swiper;t&&e.thumbs.swiperCreated&&t&&t.destroy()}}},si=[ht,pt,mt,gt,vt,_t,St,Ct,kt,At,Ot,Dt,Nt,Ut,jt,qt,Ht,Vt,Wt,Yt,Jt,Zt,ti,ri];return"undefined"===typeof ct.use&&(ct.use=ct.Class.use,ct.installModule=ct.Class.installModule),ct.use(si),ct}))},"04f8":function(e,t,i){"use strict";var r=i("2d00"),s=i("d039"),n=i("da84"),a=n.String;e.exports=!!Object.getOwnPropertySymbols&&!s((function(){var e=Symbol();return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},"06cf":function(e,t,i){"use strict";var r=i("83ab"),s=i("c65b"),n=i("d1e7"),a=i("5c6c"),o=i("fc6a"),l=i("a04b"),d=i("1a2d"),u=i("0cfb"),c=Object.getOwnPropertyDescriptor;t.f=r?c:function(e,t){if(e=o(e),t=l(t),u)try{return c(e,t)}catch(i){}if(d(e,t))return a(!s(n.f,e,t),e[t])}},"07fa":function(e,t,i){"use strict";var r=i("50c4");e.exports=function(e){return r(e.length)}},"0a06":function(e,t,i){"use strict";var r=i("c532"),s=i("30b5"),n=i("f6b4"),a=i("5270"),o=i("4a7b");function l(e){this.defaults=e,this.interceptors={request:new n,response:new n}}l.prototype.request=function(e){"string"===typeof e?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=o(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],i=Promise.resolve(e);this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));while(t.length)i=i.then(t.shift(),t.shift());return i},l.prototype.getUri=function(e){return e=o(this.defaults,e),s(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,i){return this.request(o(i||{},{method:e,url:t,data:(i||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,i,r){return this.request(o(r||{},{method:e,url:t,data:i}))}})),e.exports=l},"0cfb":function(e,t,i){"use strict";var r=i("83ab"),s=i("d039"),n=i("cc12");e.exports=!r&&!s((function(){return 7!=Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))},"0d51":function(e,t,i){"use strict";var r=String;e.exports=function(e){try{return r(e)}catch(t){return"Object"}}},"0df6":function(e,t,i){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},"13d2":function(e,t,i){"use strict";var r=i("e330"),s=i("d039"),n=i("1626"),a=i("1a2d"),o=i("83ab"),l=i("5e77").CONFIGURABLE,d=i("8925"),u=i("69f3"),c=u.enforce,h=u.get,p=String,f=Object.defineProperty,m=r("".slice),g=r("".replace),y=r([].join),v=o&&!s((function(){return 8!==f((function(){}),"length",{value:8}).length})),b=String(String).split("String"),_=e.exports=function(e,t,i){"Symbol("===m(p(t),0,7)&&(t="["+g(p(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),i&&i.getter&&(t="get "+t),i&&i.setter&&(t="set "+t),(!a(e,"name")||l&&e.name!==t)&&(o?f(e,"name",{value:t,configurable:!0}):e.name=t),v&&i&&a(i,"arity")&&e.length!==i.arity&&f(e,"length",{value:i.arity});try{i&&a(i,"constructor")&&i.constructor?o&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(s){}var r=c(e);return a(r,"source")||(r.source=y(b,"string"==typeof t?t:"")),e};Function.prototype.toString=_((function(){return n(this)&&h(this).source||d(this)}),"toString")},"13d5":function(e,t,i){"use strict";var r=i("23e7"),s=i("d58f").left,n=i("a640"),a=i("2d00"),o=i("605d"),l=!o&&a>79&&a<83,d=l||!n("reduce");r({target:"Array",proto:!0,forced:d},{reduce:function(e){var t=arguments.length;return s(this,e,t,t>1?arguments[1]:void 0)}})},"14d9":function(e,t,i){"use strict";var r=i("23e7"),s=i("7b0b"),n=i("07fa"),a=i("3a34"),o=i("3511"),l=i("d039"),d=l((function(){return 4294967297!==[].push.call({length:4294967296},1)})),u=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},c=d||!u();r({target:"Array",proto:!0,arity:1,forced:c},{push:function(e){var t=s(this),i=n(t),r=arguments.length;o(i+r);for(var l=0;l<r;l++)t[i]=arguments[l],i++;return a(t,i),i}})},1626:function(e,t,i){"use strict";var r=i("8ea1"),s=r.all;e.exports=r.IS_HTMLDDA?function(e){return"function"==typeof e||e===s}:function(e){return"function"==typeof e}},"17a3":function(e,t,i){"use strict";i.d(t,"i",(function(){return l})),i.d(t,"h",(function(){return d})),i.d(t,"d",(function(){return u})),i.d(t,"f",(function(){return c})),i.d(t,"e",(function(){return p})),i.d(t,"c",(function(){return f})),i.d(t,"g",(function(){return m})),i.d(t,"a",(function(){return g})),i.d(t,"b",(function(){return y}));var r=i("be09"),s=i.n(r),n={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},a=["video","audio","text"],o=["Video","Audio","Text"],l=function(e){return e?e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,i){var r=("00"+Number(t).toString(16)).slice(-2),s=("00"+Number(i).toString(16)).slice(-2);return"avc1."+r+"00"+s})):e},d=function(e){void 0===e&&(e="");var t=e.split(","),i=[];return t.forEach((function(e){var t;e=e.trim(),a.forEach((function(r){var s=n[r].exec(e.toLowerCase());if(s&&!(s.length<=1)){t=r;var a=e.substring(0,s[1].length),o=e.replace(a,"");i.push({type:a,details:o,mediaType:r})}})),t||i.push({type:e,details:"",mediaType:"unknown"})})),i},u=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var r in i){var s=i[r];if(s.default&&s.playlists)return d(s.playlists[0].attributes.CODECS)}return null},c=function(e){return void 0===e&&(e=""),n.audio.test(e.trim().toLowerCase())},h=function(e){return void 0===e&&(e=""),n.text.test(e.trim().toLowerCase())},p=function(e){if(e&&"string"===typeof e){var t=e.toLowerCase().split(",").map((function(e){return l(e.trim())})),i="video";1===t.length&&c(t[0])?i="audio":1===t.length&&h(t[0])&&(i="application");var r="mp4";return t.every((function(e){return n.mp4.test(e)}))?r="mp4":t.every((function(e){return n.webm.test(e)}))?r="webm":t.every((function(e){return n.ogg.test(e)}))&&(r="ogg"),i+"/"+r+';codecs="'+e+'"'}},f=function(e){return void 0===e&&(e=""),s.a.MediaSource&&s.a.MediaSource.isTypeSupported&&s.a.MediaSource.isTypeSupported(p(e))||!1},m=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;t<o.length;t++){var i=o[t];if(n["muxer"+i].test(e))return!0}return!1}))},g="mp4a.40.2",y="avc1.4d400d"},"17aa":function(e,t,i){},"1a2d":function(e,t,i){"use strict";var r=i("e330"),s=i("7b0b"),n=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return n(s(e),t)}},"1abf":function(e,t,i){"use strict";var r=i("fe0f"),s=i.n(r);s.a},"1cfd":function(e,t,i){"use strict";var r=i("e282"),s=i.n(r);s.a},"1d2b":function(e,t,i){"use strict";e.exports=function(e,t){return function(){for(var i=new Array(arguments.length),r=0;r<i.length;r++)i[r]=arguments[r];return e.apply(t,i)}}},"1d80":function(e,t,i){"use strict";var r=i("7234"),s=TypeError;e.exports=function(e){if(r(e))throw s("Can't call method on "+e);return e}},"1db4":function(e,t,i){},"1e09":function(e,t,i){},"1fb5":function(e,t,i){"use strict";t.byteLength=u,t.toByteArray=h,t.fromByteArray=m;for(var r=[],s=[],n="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,l=a.length;o<l;++o)r[o]=a[o],s[a.charCodeAt(o)]=o;function d(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");-1===i&&(i=t);var r=i===t?0:4-i%4;return[i,r]}function u(e){var t=d(e),i=t[0],r=t[1];return 3*(i+r)/4-r}function c(e,t,i){return 3*(t+i)/4-i}function h(e){var t,i,r=d(e),a=r[0],o=r[1],l=new n(c(e,a,o)),u=0,h=o>0?a-4:a;for(i=0;i<h;i+=4)t=s[e.charCodeAt(i)]<<18|s[e.charCodeAt(i+1)]<<12|s[e.charCodeAt(i+2)]<<6|s[e.charCodeAt(i+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===o&&(t=s[e.charCodeAt(i)]<<2|s[e.charCodeAt(i+1)]>>4,l[u++]=255&t),1===o&&(t=s[e.charCodeAt(i)]<<10|s[e.charCodeAt(i+1)]<<4|s[e.charCodeAt(i+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l}function p(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function f(e,t,i){for(var r,s=[],n=t;n<i;n+=3)r=(e[n]<<16&16711680)+(e[n+1]<<8&65280)+(255&e[n+2]),s.push(p(r));return s.join("")}function m(e){for(var t,i=e.length,s=i%3,n=[],a=16383,o=0,l=i-s;o<l;o+=a)n.push(f(e,o,o+a>l?l:o+a));return 1===s?(t=e[i-1],n.push(r[t>>2]+r[t<<4&63]+"==")):2===s&&(t=(e[i-2]<<8)+e[i-1],n.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),n.join("")}s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},"210b":function(e,t,i){var r=i("e1c8");t.DOMImplementation=r.DOMImplementation,t.XMLSerializer=r.XMLSerializer,t.DOMParser=i("b074").DOMParser},"23cb":function(e,t,i){"use strict";var r=i("5926"),s=Math.max,n=Math.min;e.exports=function(e,t){var i=r(e);return i<0?s(i+t,0):n(i,t)}},"23e7":function(e,t,i){"use strict";var r=i("da84"),s=i("06cf").f,n=i("9112"),a=i("cb2d"),o=i("6374"),l=i("e893"),d=i("94ca");e.exports=function(e,t){var i,u,c,h,p,f,m=e.target,g=e.global,y=e.stat;if(u=g?r:y?r[m]||o(m,{}):(r[m]||{}).prototype,u)for(c in t){if(p=t[c],e.dontCallGetSet?(f=s(u,c),h=f&&f.value):h=u[c],i=d(g?c:m+(y?".":"#")+c,e.forced),!i&&void 0!==h){if(typeof p==typeof h)continue;l(p,h)}(e.sham||h&&h.sham)&&n(p,"sham",!0),a(u,c,p,e)}}},"241c":function(e,t,i){"use strict";var r=i("ca84"),s=i("7839"),n=s.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,n)}},2444:function(e,t,i){"use strict";(function(t){var r=i("c532"),s=i("c8af"),n={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function o(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof t&&"[object process]"===Object.prototype.toString.call(t))&&(e=i("b50d")),e}var l={adapter:o(),transformRequest:[function(e,t){return s(t,"Accept"),s(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(t){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){l.headers[e]=r.merge(n)})),e.exports=l}).call(this,i("4362"))},"24aa":function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(r){"object"===typeof window&&(i=window)}e.exports=i},"266b":function(e,t,i){"use strict";var r=i("597b"),s=i.n(r);s.a},"2b8c":function(e,t,i){var r=i("be09"),s=e.exports={WebVTT:i("d02c"),VTTCue:i("b03c"),VTTRegion:i("f97d")};r.vttjs=s,r.WebVTT=s.WebVTT;var n=s.VTTCue,a=s.VTTRegion,o=r.VTTCue,l=r.VTTRegion;s.shim=function(){r.VTTCue=n,r.VTTRegion=a},s.restore=function(){r.VTTCue=o,r.VTTRegion=l},r.VTTCue||s.shim()},"2d00":function(e,t,i){"use strict";var r,s,n=i("da84"),a=i("342f"),o=n.process,l=n.Deno,d=o&&o.versions||l&&l.version,u=d&&d.v8;u&&(r=u.split("."),s=r[0]>0&&r[0]<4?1:+(r[0]+r[1])),!s&&a&&(r=a.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/),r&&(s=+r[1]))),e.exports=s},"2d83":function(e,t,i){"use strict";var r=i("387f");e.exports=function(e,t,i,s,n){var a=new Error(e);return r(a,t,i,s,n)}},"2e43":function(e,t,i){"use strict";var r=i("c8fa"),s=i.n(r);s.a},"2e67":function(e,t,i){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},"30b5":function(e,t,i){"use strict";var r=i("c532");function s(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,i){if(!t)return e;var n;if(i)n=i(t);else if(r.isURLSearchParams(t))n=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof 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)),a.push(s(t)+"="+s(e))})))})),n=a.join("&")}if(n){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}},3132:function(e,t,i){},"321f":function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));var r=i("de66"),s=Object(r["k"])([73,68,51]),n=function(e,t){void 0===t&&(t=0),e=Object(r["k"])(e);var i=e[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9],n=(16&i)>>4;return n?s+20:s+10},a=function e(t,i){return void 0===i&&(i=0),t=Object(r["k"])(t),t.length-i<10||!Object(r["a"])(t,s,{offset:i})?i:(i+=n(t,i),e(t,i))}},"342f":function(e,t,i){"use strict";e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},3511:function(e,t,i){"use strict";var r=TypeError,s=9007199254740991;e.exports=function(e){if(e>s)throw r("Maximum allowed index exceeded");return e}},3603:function(e,t,i){"use strict";var r=i("be09"),s=i("a559"),n=i("8362");u.httpHandler=i("8c00");
2
2
  /**
3
3
  * @license
4
4
  * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>
@@ -6,7 +6,7 @@ module.exports=function(e){var t={};function i(r){if(t[r])return t[r].exports;va
6
6
  * Available under the MIT license
7
7
  * <https://github.com/kesla/parse-headers/blob/master/LICENCE>
8
8
  */
9
- var a=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var i=e.indexOf(":"),r=e.slice(0,i).trim().toLowerCase(),s=e.slice(i+1).trim();"undefined"===typeof t[r]?t[r]=s:Array.isArray(t[r])?t[r].push(s):t[r]=[t[r],s]})),t):t};function o(e,t){for(var i=0;i<e.length;i++)t(e[i])}function l(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function d(e,t,i){var r=e;return n(t)?(i=t,"string"===typeof e&&(r={uri:e})):r=s({},t,{uri:e}),r.callback=i,r}function u(e,t,i){return t=d(e,t,i),c(t)}function c(e){if("undefined"===typeof e.callback)throw new Error("callback argument missing");var t=!1,i=function(i,r,s){t||(t=!0,e.callback(i,r,s))};function r(){4===p.readyState&&setTimeout(o,0)}function s(){var e=void 0;if(e=p.response?p.response:p.responseText||h(p),_)try{e=JSON.parse(e)}catch(t){}return e}function n(e){return clearTimeout(f),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,i(e,T)}function o(){if(!c){var t;clearTimeout(f),t=e.useXDR&&void 0===p.status?200:1223===p.status?204:p.status;var r=T,n=null;return 0!==t?(r={body:s(),statusCode:t,method:g,headers:{},url:m,rawRequest:p},p.getAllResponseHeaders&&(r.headers=a(p.getAllResponseHeaders()))):n=new Error("Internal XMLHttpRequest Error"),i(n,r,r.body)}}var d,c,p=e.xhr||null;p||(p=e.cors||e.useXDR?new u.XDomainRequest:new u.XMLHttpRequest);var f,m=p.url=e.uri||e.url,g=p.method=e.method||"GET",y=e.body||e.data,v=p.headers=e.headers||{},b=!!e.sync,_=!1,T={body:void 0,headers:{},statusCode:0,method:g,url:m,rawRequest:p};if("json"in e&&!1!==e.json&&(_=!0,v["accept"]||v["Accept"]||(v["Accept"]="application/json"),"GET"!==g&&"HEAD"!==g&&(v["content-type"]||v["Content-Type"]||(v["Content-Type"]="application/json"),y=JSON.stringify(!0===e.json?y:e.json))),p.onreadystatechange=r,p.onload=o,p.onerror=n,p.onprogress=function(){},p.onabort=function(){c=!0},p.ontimeout=n,p.open(g,m,!b,e.username,e.password),b||(p.withCredentials=!!e.withCredentials),!b&&e.timeout>0&&(f=setTimeout((function(){if(!c){c=!0,p.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",n(e)}}),e.timeout)),p.setRequestHeader)for(d in v)v.hasOwnProperty(d)&&p.setRequestHeader(d,v[d]);else if(e.headers&&!l(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(p.responseType=e.responseType),"beforeSend"in e&&"function"===typeof e.beforeSend&&e.beforeSend(p),p.send(y||null),p}function h(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(i){}return null}function p(){}e.exports=u,e.exports.default=u,u.XMLHttpRequest=r.XMLHttpRequest||p,u.XDomainRequest="withCredentials"in new u.XMLHttpRequest?u.XMLHttpRequest:r.XDomainRequest,o(["get","put","post","patch","head","delete"],(function(e){u["delete"===e?"del":e]=function(t,i,r){return i=d(t,i,r),i.method=e.toUpperCase(),c(i)}}))},"36c6":function(e,t){var i,r,s,n,a,o,l,d=9e4;i=function(e){return e*d},r=function(e,t){return e*t},s=function(e){return e/d},n=function(e,t){return e/t},a=function(e,t){return i(n(e,t))},o=function(e,t){return r(s(e),t)},l=function(e,t,i){return s(i?e:e-t)},e.exports={ONE_SECOND_IN_TS:d,secondsToVideoTs:i,secondsToAudioTs:r,videoTsToSeconds:s,audioTsToSeconds:n,audioTsToVideoTs:a,videoTsToAudioTs:o,metadataTsToSeconds:l}},"387f":function(e,t,i){"use strict";e.exports=function(e,t,i,r,s){return e.config=t,i&&(e.code=i),e.request=r,e.response=s,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},3934:function(e,t,i){"use strict";var r=i("c532");e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function s(e){var r=e;return t&&(i.setAttribute("href",r),r=i.href),i.setAttribute("href",r),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}return e=s(window.location.href),function(t){var i=r.isString(t)?s(t):t;return i.protocol===e.protocol&&i.host===e.host}}():function(){return function(){return!0}}()},"3a34":function(e,t,i){"use strict";var r=i("83ab"),s=i("e8b5"),n=TypeError,a=Object.getOwnPropertyDescriptor,o=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=o?function(e,t){if(s(e)&&!a(e,"length").writable)throw n("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},"3a9b":function(e,t,i){"use strict";var r=i("e330");e.exports=r({}.isPrototypeOf)},"3de5":function(e,t,i){"use strict";var r=i("fe1c"),s=i.n(r);s.a},"40d5":function(e,t,i){"use strict";var r=i("d039");e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},4362:function(e,t,i){t.nextTick=function(e){var t=Array.prototype.slice.call(arguments);t.shift(),setTimeout((function(){e.apply(null,t)}),0)},t.platform=t.arch=t.execPath=t.title="browser",t.pid=1,t.browser=!0,t.env={},t.argv=[],t.binding=function(e){throw new Error("No such module. (Possibly not yet loaded)")},function(){var e,r="/";t.cwd=function(){return r},t.chdir=function(t){e||(e=i("df7c")),r=e.resolve(t,r)}}(),t.exit=t.kill=t.umask=t.dlopen=t.uptime=t.memoryUsage=t.uvCounters=function(){},t.features={}},"44ad":function(e,t,i){"use strict";var r=i("e330"),s=i("d039"),n=i("c6b6"),a=Object,o=r("".split);e.exports=s((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"==n(e)?o(e,""):a(e)}:a},4664:function(e,t,i){"use strict";var r=i("a5ab"),s=i.n(r);s.a},"467f":function(e,t,i){"use strict";var r=i("2d83");e.exports=function(e,t,i){var s=i.config.validateStatus;i.status&&s&&!s(i.status)?t(r("Request failed with status code "+i.status,i.config,null,i.request,i)):e(i)}},"485a":function(e,t,i){"use strict";var r=i("c65b"),s=i("1626"),n=i("861d"),a=TypeError;e.exports=function(e,t){var i,o;if("string"===t&&s(i=e.toString)&&!n(o=r(i,e)))return o;if(s(i=e.valueOf)&&!n(o=r(i,e)))return o;if("string"!==t&&s(i=e.toString)&&!n(o=r(i,e)))return o;throw a("Can't convert object to primitive value")}},"4a7b":function(e,t,i){"use strict";var r=i("c532");e.exports=function(e,t){t=t||{};var i={},s=["url","method","data"],n=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],o=["validateStatus"];function l(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function d(s){r.isUndefined(t[s])?r.isUndefined(e[s])||(i[s]=l(void 0,e[s])):i[s]=l(e[s],t[s])}r.forEach(s,(function(e){r.isUndefined(t[e])||(i[e]=l(void 0,t[e]))})),r.forEach(n,d),r.forEach(a,(function(s){r.isUndefined(t[s])?r.isUndefined(e[s])||(i[s]=l(void 0,e[s])):i[s]=l(void 0,t[s])})),r.forEach(o,(function(r){r in t?i[r]=l(e[r],t[r]):r in e&&(i[r]=l(void 0,e[r]))}));var u=s.concat(n).concat(a).concat(o),c=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return r.forEach(c,d),i}},"4d64":function(e,t,i){"use strict";var r=i("fc6a"),s=i("23cb"),n=i("07fa"),a=function(e){return function(t,i,a){var o,l=r(t),d=n(l),u=s(a,d);if(e&&i!=i){while(d>u)if(o=l[u++],o!=o)return!0}else for(;d>u;u++)if((e||u in l)&&l[u]===i)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},"4e30":function(e,t,i){"use strict";var r=i("1db4"),s=i.n(r);s.a},"4e9a":function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return a}));var r=i("be09"),s=i.n(r),n=function(t){return s.a.atob?s.a.atob(t):e.from(t,"base64").toString("binary")};function a(e){for(var t=n(e),i=new Uint8Array(t.length),r=0;r<t.length;r++)i[r]=t.charCodeAt(r);return i}}).call(this,i("b639").Buffer)},"50c4":function(e,t,i){"use strict";var r=i("5926"),s=Math.min;e.exports=function(e){return e>0?s(r(e),9007199254740991):0}},5270:function(e,t,i){"use strict";var r=i("c532"),s=i("c401"),n=i("2e67"),a=i("2444");function o(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){o(e),e.headers=e.headers||{},e.data=s(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]}));var t=e.adapter||a.adapter;return t(e).then((function(t){return o(e),t.data=s(t.data,t.headers,e.transformResponse),t}),(function(t){return n(t)||(o(e),t&&t.response&&(t.response.data=s(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},"55f9":function(e,t,i){"use strict";var r=i("fdcb"),s=i.n(r);s.a},5692:function(e,t,i){"use strict";var r=i("c430"),s=i("c6cd");(e.exports=function(e,t){return s[e]||(s[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.32.0",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.0/LICENSE",source:"https://github.com/zloirock/core-js"})},"56ef":function(e,t,i){"use strict";var r=i("d066"),s=i("e330"),n=i("241c"),a=i("7418"),o=i("825a"),l=s([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=n.f(o(e)),i=a.f;return i?l(t,i(e)):t}},5926:function(e,t,i){"use strict";var r=i("b42e");e.exports=function(e){var t=+e;return t!==t||0===t?0:r(t)}},"597b":function(e,t,i){},"59ed":function(e,t,i){"use strict";var r=i("1626"),s=i("0d51"),n=TypeError;e.exports=function(e){if(r(e))return e;throw n(s(e)+" is not a function")}},"5c6c":function(e,t,i){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"5e77":function(e,t,i){"use strict";var r=i("83ab"),s=i("1a2d"),n=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,o=s(n,"name"),l=o&&"something"===function(){}.name,d=o&&(!r||r&&a(n,"name").configurable);e.exports={EXISTS:o,PROPER:l,CONFIGURABLE:d}},"5f02":function(e,t,i){"use strict";e.exports=function(e){return"object"===typeof e&&!0===e.isAxiosError}},6013:function(e,t,i){"use strict";var r=i("787b"),s=i.n(r);s.a},"605d":function(e,t,i){"use strict";(function(t){var r=i("c6b6");e.exports="undefined"!=typeof t&&"process"==r(t)}).call(this,i("4362"))},6374:function(e,t,i){"use strict";var r=i("da84"),s=Object.defineProperty;e.exports=function(e,t){try{s(r,e,{value:t,configurable:!0,writable:!0})}catch(i){r[e]=t}return t}},"63ec":function(e,t,i){"use strict";var r=i("d136"),s=i.n(r),n=i("be09"),a=i.n(n),o="http://example.com",l=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=a.a.location&&a.a.location.href||"");var i="function"===typeof a.a.URL,r=/^\/\//.test(e),n=!a.a.location&&!/\/\//i.test(e);if(i?e=new a.a.URL(e,a.a.location||o):/\/\//i.test(e)||(e=s.a.buildAbsoluteURL(a.a.location&&a.a.location.href||"",e)),i){var l=new URL(t,e);return n?l.href.slice(o.length):r?l.href.slice(l.protocol.length):l.href}return s.a.buildAbsoluteURL(e,t)};t["a"]=l},"69a3":function(e,t,i){"use strict";var r=i("279f"),s=i.n(r);s.a},"69f3":function(e,t,i){"use strict";var r,s,n,a=i("cdce"),o=i("da84"),l=i("861d"),d=i("9112"),u=i("1a2d"),c=i("c6cd"),h=i("f772"),p=i("d012"),f="Object already initialized",m=o.TypeError,g=o.WeakMap,y=function(e){return n(e)?s(e):r(e,{})},v=function(e){return function(t){var i;if(!l(t)||(i=s(t)).type!==e)throw m("Incompatible receiver, "+e+" required");return i}};if(a||c.state){var b=c.state||(c.state=new g);b.get=b.get,b.has=b.has,b.set=b.set,r=function(e,t){if(b.has(e))throw m(f);return t.facade=e,b.set(e,t),t},s=function(e){return b.get(e)||{}},n=function(e){return b.has(e)}}else{var _=h("state");p[_]=!0,r=function(e,t){if(u(e,_))throw m(f);return t.facade=e,d(e,_,t),t},s=function(e){return u(e,_)?e[_]:{}},n=function(e){return u(e,_)}}e.exports={set:r,get:s,has:n,enforce:y,getterFor:v}},"6c71":function(e,t,i){},"6e0e":function(e,t,i){"use strict";var r=i("dc6e"),s=i.n(r);s.a},7234:function(e,t,i){"use strict";e.exports=function(e){return null===e||void 0===e}},7418:function(e,t,i){"use strict";t.f=Object.getOwnPropertySymbols},"77ed":function(e,t,i){},7839:function(e,t,i){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"787b":function(e,t,i){},"7a77":function(e,t,i){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},"7aac":function(e,t,i){"use strict";var r=i("c532");e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,i,s,n,a){var o=[];o.push(e+"="+encodeURIComponent(t)),r.isNumber(i)&&o.push("expires="+new Date(i).toGMTString()),r.isString(s)&&o.push("path="+s),r.isString(n)&&o.push("domain="+n),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},"7b0b":function(e,t,i){"use strict";var r=i("1d80"),s=Object;e.exports=function(e){return s(r(e))}},"81c0":function(e,t,i){var r=i("a968").getUint64,s=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},s=12;0===i.version?(i.earliestPresentationTime=t.getUint32(s),i.firstOffset=t.getUint32(s+4),s+=8):(i.earliestPresentationTime=r(e.subarray(s)),i.firstOffset=r(e.subarray(s+8)),s+=16),s+=2;var n=t.getUint16(s);for(s+=2;n>0;s+=12,n--)i.references.push({referenceType:(128&e[s])>>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i};e.exports=s},"825a":function(e,t,i){"use strict";var r=i("861d"),s=String,n=TypeError;e.exports=function(e){if(r(e))return e;throw n(s(e)+" is not an object")}},8362:function(e,t){e.exports=r;var i=Object.prototype.toString;function r(e){if(!e)return!1;var t=i.call(e);return"[object Function]"===t||"function"===typeof e&&"[object RegExp]"!==t||"undefined"!==typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}},"83ab":function(e,t,i){"use strict";var r=i("d039");e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"83b9":function(e,t,i){"use strict";var r=i("d925"),s=i("e683");e.exports=function(e,t){return e&&!r(t)?s(e,t):t}},8484:function(e,t,i){"use strict";i.d(t,"a",(function(){return A})),i.d(t,"b",(function(){return B})),i.d(t,"c",(function(){return Pe})),i.d(t,"d",(function(){return Le}));var r=i("d136"),s=i.n(r),n=i("be09"),a=i.n(n),o="http://example.com",l=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=a.a.location&&a.a.location.href||"");var i="function"===typeof a.a.URL,r=/^\/\//.test(e),n=!a.a.location&&!/\/\//i.test(e);if(i?e=new a.a.URL(e,a.a.location||o):/\/\//i.test(e)||(e=s.a.buildAbsoluteURL(a.a.location&&a.a.location.href||"",e)),i){var l=new URL(t,e);return n?l.href.slice(o.length):r?l.href.slice(l.protocol.length):l.href}return s.a.buildAbsoluteURL(e,t)},d=l,u=function(e,t,i){t.forEach((function(t){for(var r in e.mediaGroups[t])for(var s in e.mediaGroups[t][r]){var n=e.mediaGroups[t][r][s];i(n,t,r,s)}}))},c=i("ddb2"),h=i("210b");const p=e=>!!e&&"object"===typeof e,f=(...e)=>e.reduce((e,t)=>("object"!==typeof t||Object.keys(t).forEach(i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):p(e[i])&&p(t[i])?e[i]=f(e[i],t[i]):e[i]=t[i]}),e),{}),m=e=>Object.keys(e).map(t=>e[t]),g=(e,t)=>{const i=[];for(let r=e;r<t;r++)i.push(r);return i},y=e=>e.reduce((e,t)=>e.concat(t),[]),v=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t},b=(e,t)=>e.reduce((e,i,r)=>(i[t]&&e.push(r),e),[]),_=(e,t)=>m(e.reduce((e,i)=>(i.forEach(i=>{e[t(i)]=i}),e),{}));var T={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};const S=({baseUrl:e="",source:t="",range:i="",indexRange:r=""})=>{const s={uri:t,resolvedUri:d(e||"",t)};if(i||r){const e=i||r,t=e.split("-");let n,o=a.a.BigInt?a.a.BigInt(t[0]):parseInt(t[0],10),l=a.a.BigInt?a.a.BigInt(t[1]):parseInt(t[1],10);o<Number.MAX_SAFE_INTEGER&&"bigint"===typeof o&&(o=Number(o)),l<Number.MAX_SAFE_INTEGER&&"bigint"===typeof l&&(l=Number(l)),n="bigint"===typeof l||"bigint"===typeof o?a.a.BigInt(l)-a.a.BigInt(o)+a.a.BigInt(1):l-o+1,"bigint"===typeof n&&n<Number.MAX_SAFE_INTEGER&&(n=Number(n)),s.byterange={length:n,offset:o}}return s},w=e=>{let t;return t="bigint"===typeof e.offset||"bigint"===typeof e.length?a.a.BigInt(e.offset)+a.a.BigInt(e.length)-a.a.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`},E=e=>(e&&"number"!==typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),C={static(e){const{duration:t,timescale:i=1,sourceDuration:r,periodDuration:s}=e,n=E(e.endNumber),a=t/i;return"number"===typeof n?{start:0,end:n}:"number"===typeof s?{start:0,end:s/a}:{start:0,end:r/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:r,timescale:s=1,duration:n,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,d=E(e.endNumber),u=(t+i)/1e3,c=r+a,h=u+o,p=h-c,f=Math.ceil(p*s/n),m=Math.floor((u-c-l)*s/n),g=Math.floor((u-c)*s/n);return{start:Math.max(0,m),end:"number"===typeof d?d:Math.min(f,g)}}},x=e=>t=>{const{duration:i,timescale:r=1,periodStart:s,startNumber:n=1}=e;return{number:n+t,duration:i/r,timeline:s,time:t*i}},k=e=>{const{type:t,duration:i,timescale:r=1,periodDuration:s,sourceDuration:n}=e,{start:a,end:o}=C[t](e),l=g(a,o).map(x(e));if("static"===t){const e=l.length-1,t="number"===typeof s?s:n;l[e].duration=t-i/r*e}return l},I=e=>{const{baseUrl:t,initialization:i={},sourceDuration:r,indexRange:s="",periodStart:n,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(T.NO_BASE_URL);const d=S({baseUrl:t,source:i.sourceURL,range:i.range}),u=S({baseUrl:t,source:t,indexRange:s});if(u.map=d,l){const t=k(e);t.length&&(u.duration=t[0].duration,u.timeline=t[0].timeline)}else r&&(u.duration=r,u.timeline=n);return u.presentationTime=a||n,u.number=o,[u]},A=(e,t,i)=>{const r=e.sidx.map?e.sidx.map:null,s=e.sidx.duration,n=e.timeline||0,o=e.sidx.byterange,l=o.offset+o.length,d=t.timescale,u=t.references.filter(e=>1!==e.referenceType),c=[],h=e.endList?"static":"dynamic",p=e.sidx.timeline;let f,m=p,g=e.mediaSequence||0;f="bigint"===typeof t.firstOffset?a.a.BigInt(l)+t.firstOffset:l+t.firstOffset;for(let y=0;y<u.length;y++){const e=t.references[y],o=e.referencedSize,l=e.subsegmentDuration;let u;u="bigint"===typeof f?f+a.a.BigInt(o)-a.a.BigInt(1):f+o-1;const v=`${f}-${u}`,b={baseUrl:i,timescale:d,timeline:n,periodStart:p,presentationTime:m,number:g,duration:l,sourceDuration:s,indexRange:v,type:h},_=I(b)[0];r&&(_.map=r),c.push(_),f+="bigint"===typeof f?a.a.BigInt(o):o,m+=l/d,g++}return e.segments=c,e},O=["AUDIO","SUBTITLES"],P=1/60,L=e=>_(e,({timeline:e})=>e).sort((e,t)=>e.timeline>t.timeline?1:-1),D=(e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null},M=e=>{let t=[];return u(e,O,(e,i,r,s)=>{t=t.concat(e.playlists||[])}),t},N=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach((t,i)=>{t.number=e.mediaSequence+i})},R=({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach(t=>{t.discontinuitySequence=i.findIndex((function({timeline:e}){return e===t.timeline}));const r=D(e,t.attributes.NAME);if(!r)return;if(t.sidx)return;const s=t.segments[0],n=r.segments.findIndex((function(e){return Math.abs(e.presentationTime-s.presentationTime)<P}));if(-1===n)return N({playlist:t,mediaSequence:r.mediaSequence+r.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!r.segments.length&&t.timeline>r.timeline||r.segments.length&&t.timeline>r.segments[r.segments.length-1].timeline)&&t.discontinuitySequence--);const a=r.segments[n];a.discontinuity&&!s.discontinuity&&(s.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),N({playlist:t,mediaSequence:r.segments[n].number})})},U=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(M(e)),r=t.playlists.concat(M(t));return t.timelineStarts=L([e.timelineStarts,t.timelineStarts]),R({oldPlaylists:i,newPlaylists:r,timelineStarts:t.timelineStarts}),t},B=e=>e&&e.uri+"-"+w(e.byterange),j=e=>{const t=m(e.reduce((e,t)=>{const i=t.attributes.id+(t.attributes.lang||"");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e},{}));return t.map(e=>(e.discontinuityStarts=b(e.segments||[],"discontinuity"),e))},F=(e,t)=>{const i=B(e.sidx),r=i&&t[i]&&t[i].sidx;return r&&A(e,r,e.sidx.resolvedUri),e},q=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=F(e[i],t);return e},$=({attributes:e,segments:t,sidx:i,mediaSequence:r,discontinuitySequence:s,discontinuityStarts:n},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,["PROGRAM-ID"]:1},uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:"",targetDuration:e.duration,discontinuitySequence:s,discontinuityStarts:n,timelineStarts:e.timelineStarts,mediaSequence:r,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),i&&(o.sidx=i),a&&(o.attributes.AUDIO="audio",o.attributes.SUBTITLES="subs"),o},H=({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:r,discontinuitySequence:s})=>{"undefined"===typeof t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||"",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const n={NAME:e.id,BANDWIDTH:e.bandwidth,["PROGRAM-ID"]:1};return e.codecs&&(n.CODECS=e.codecs),{attributes:n,uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:r,discontinuitySequence:s,mediaSequence:i,segments:t}},z=(e,t={},i=!1)=>{let r;const s=e.reduce((e,s)=>{const n=s.attributes.role&&s.attributes.role.value||"",a=s.attributes.lang||"";let o=s.attributes.label||"main";if(a&&!s.attributes.label){const e=n?` (${n})`:"";o=`${s.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:"main"===n,playlists:[],uri:""});const l=F($(s,i),t);return e[o].playlists.push(l),"undefined"===typeof r&&"main"===n&&(r=s,r.default=!0),e},{});if(!r){const e=Object.keys(s)[0];s[e].default=!0}return s},V=(e,t={})=>e.reduce((e,i)=>{const r=i.attributes.label||i.attributes.lang||"text";return e[r]||(e[r]={language:r,default:!1,autoselect:!1,playlists:[],uri:""}),e[r].playlists.push(F(H(i),t)),e},{}),G=e=>e.reduce((e,t)=>t?(t.forEach(t=>{const{channel:i,language:r}=t;e[r]={autoselect:!1,default:!1,instreamId:i,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,{}),W=({attributes:e,segments:t,sidx:i,discontinuityStarts:r})=>{const s={attributes:{NAME:e.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,["PROGRAM-ID"]:1},uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:"",targetDuration:e.duration,discontinuityStarts:r,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(s.attributes["FRAME-RATE"]=e.frameRate),e.contentProtection&&(s.contentProtection=e.contentProtection),i&&(s.sidx=i),s},X=({attributes:e})=>"video/mp4"===e.mimeType||"video/webm"===e.mimeType||"video"===e.contentType,Y=({attributes:e})=>"audio/mp4"===e.mimeType||"audio/webm"===e.mimeType||"audio"===e.contentType,K=({attributes:e})=>"text/vtt"===e.mimeType||"text"===e.contentType,J=(e,t)=>{e.forEach(e=>{e.mediaSequence=0,e.discontinuitySequence=t.findIndex((function({timeline:t}){return t===e.timeline})),e.segments&&e.segments.forEach((e,t)=>{e.number=t})})},Q=e=>e?Object.keys(e).reduce((t,i)=>{const r=e[i];return t.concat(r.playlists)},[]):[],Z=({dashPlaylists:e,locations:t,sidxMapping:i={},previousManifest:r,eventStream:s})=>{if(!e.length)return{};const{sourceDuration:n,type:a,suggestedPresentationDelay:o,minimumUpdatePeriod:l}=e[0].attributes,d=j(e.filter(X)).map(W),u=j(e.filter(Y)),c=j(e.filter(K)),h=e.map(e=>e.attributes.captionServices).filter(Boolean),p={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},["CLOSED-CAPTIONS"]:{},SUBTITLES:{}},uri:"",duration:n,playlists:q(d,i)};l>=0&&(p.minimumUpdatePeriod=1e3*l),t&&(p.locations=t),"dynamic"===a&&(p.suggestedPresentationDelay=o),s&&s.length>0&&(p.eventStream=s);const f=0===p.playlists.length,m=u.length?z(u,i,f):null,g=c.length?V(c,i):null,y=d.concat(Q(m),Q(g)),v=y.map(({timelineStarts:e})=>e);return p.timelineStarts=L(v),J(y,p.timelineStarts),m&&(p.mediaGroups.AUDIO.audio=m),g&&(p.mediaGroups.SUBTITLES.subs=g),h.length&&(p.mediaGroups["CLOSED-CAPTIONS"].cc=G(h)),r?U({oldManifest:r,newManifest:p}):p},ee=(e,t,i)=>{const{NOW:r,clientOffset:s,availabilityStartTime:n,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,d=(r+s)/1e3,u=n+o,c=d+l,h=c-u;return Math.ceil((h*a-t)/i)},te=(e,t)=>{const{type:i,minimumUpdatePeriod:r=0,media:s="",sourceDuration:n,timescale:a=1,startNumber:o=1,periodStart:l}=e,d=[];let u=-1;for(let c=0;c<t.length;c++){const h=t[c],p=h.d,f=h.r||0,m=h.t||0;let g;if(u<0&&(u=m),m&&m>u&&(u=m),f<0){const o=c+1;g=o===t.length?"dynamic"===i&&r>0&&s.indexOf("$Number$")>0?ee(e,u,p):(n*a-u)/p:(t[o].t-u)/p}else g=f+1;const y=o+d.length+g;let v=o+d.length;while(v<y)d.push({number:v,duration:p/a,time:u,timeline:l}),u+=p,v++}return d},ie=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,re=e=>(t,i,r,s)=>{if("$$"===t)return"$";if("undefined"===typeof e[i])return t;const n=""+e[i];return"RepresentationID"===i?n:(s=r?parseInt(s,10):1,n.length>=s?n:`${new Array(s-n.length+1).join("0")}${n}`)},se=(e,t)=>e.replace(ie,re(t)),ne=(e,t)=>e.duration||t?e.duration?k(e):te(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}],ae=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:r={sourceURL:"",range:""}}=e,s=S({baseUrl:e.baseUrl,source:se(r.sourceURL,i),range:r.range}),n=ne(e,t);return n.map(t=>{i.Number=t.number,i.Time=t.time;const r=se(e.media||"",i),n=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/n,l={uri:r,timeline:t.timeline,duration:t.duration,resolvedUri:d(e.baseUrl||"",r),map:s,number:t.number,presentationTime:o};return l})},oe=(e,t)=>{const{baseUrl:i,initialization:r={}}=e,s=S({baseUrl:i,source:r.sourceURL,range:r.range}),n=S({baseUrl:i,source:t.media,range:t.mediaRange});return n.map=s,n},le=(e,t)=>{const{duration:i,segmentUrls:r=[],periodStart:s}=e;if(!i&&!t||i&&t)throw new Error(T.SEGMENT_TIME_UNSPECIFIED);const n=r.map(t=>oe(e,t));let a;i&&(a=k(e)),t&&(a=te(e,t));const o=a.map((t,i)=>{if(n[i]){const r=n[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return r.timeline=t.timeline,r.duration=t.duration,r.number=t.number,r.presentationTime=s+(t.time-o)/a,r}}).filter(e=>e);return o},de=({attributes:e,segmentInfo:t})=>{let i,r;t.template?(r=ae,i=f(e,t.template)):t.base?(r=I,i=f(e,t.base)):t.list&&(r=le,i=f(e,t.list));const s={attributes:e};if(!r)return s;const n=r(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else n.length?i.duration=n.reduce((e,t)=>Math.max(e,Math.ceil(t.duration)),0):i.duration=0;return s.attributes=i,s.segments=n,t.base&&i.indexRange&&(s.sidx=n[0],s.segments=[]),s},ue=e=>e.map(de),ce=(e,t)=>v(e.childNodes).filter(({tagName:e})=>e===t),he=e=>e.textContent.trim(),pe=e=>parseFloat(e.split("/").reduce((e,t)=>e/t)),fe=e=>{const t=31536e3,i=2592e3,r=86400,s=3600,n=60,a=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/,o=a.exec(e);if(!o)return 0;const[l,d,u,c,h,p]=o.slice(1);return parseFloat(l||0)*t+parseFloat(d||0)*i+parseFloat(u||0)*r+parseFloat(c||0)*s+parseFloat(h||0)*n+parseFloat(p||0)},me=e=>{const t=/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/;return t.test(e)&&(e+="Z"),Date.parse(e)},ge={mediaPresentationDuration(e){return fe(e)},availabilityStartTime(e){return me(e)/1e3},minimumUpdatePeriod(e){return fe(e)},suggestedPresentationDelay(e){return fe(e)},type(e){return e},timeShiftBufferDepth(e){return fe(e)},start(e){return fe(e)},width(e){return parseInt(e,10)},height(e){return parseInt(e,10)},bandwidth(e){return parseInt(e,10)},frameRate(e){return pe(e)},startNumber(e){return parseInt(e,10)},timescale(e){return parseInt(e,10)},presentationTimeOffset(e){return parseInt(e,10)},duration(e){const t=parseInt(e,10);return isNaN(t)?fe(e):t},d(e){return parseInt(e,10)},t(e){return parseInt(e,10)},r(e){return parseInt(e,10)},presentationTime(e){return parseInt(e,10)},DEFAULT(e){return e}},ye=e=>e&&e.attributes?v(e.attributes).reduce((e,t)=>{const i=ge[t.name]||ge.DEFAULT;return e[t.name]=i(t.value),e},{}):{},ve={"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"},be=(e,t)=>t.length?y(e.map((function(e){return t.map((function(t){return d(e,he(t))}))}))):e,_e=e=>{const t=ce(e,"SegmentTemplate")[0],i=ce(e,"SegmentList")[0],r=i&&ce(i,"SegmentURL").map(e=>f({tag:"SegmentURL"},ye(e))),s=ce(e,"SegmentBase")[0],n=i||t,a=n&&ce(n,"SegmentTimeline")[0],o=i||s||t,l=o&&ce(o,"Initialization")[0],d=t&&ye(t);d&&l?d.initialization=l&&ye(l):d&&d.initialization&&(d.initialization={sourceURL:d.initialization});const u={template:d,segmentTimeline:a&&ce(a,"S").map(e=>ye(e)),list:i&&f(ye(i),{segmentUrls:r,initialization:ye(l)}),base:s&&f(ye(s),{initialization:ye(l)})};return Object.keys(u).forEach(e=>{u[e]||delete u[e]}),u},Te=(e,t,i)=>r=>{const s=ce(r,"BaseURL"),n=be(t,s),a=f(e,ye(r)),o=_e(r);return n.map(e=>({segmentInfo:f(i,o),attributes:f(a,{baseUrl:e})}))},Se=e=>e.reduce((e,t)=>{const i=ye(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const r=ve[i.schemeIdUri];if(r){e[r]={attributes:i};const s=ce(t,"cenc:pssh")[0];if(s){const t=he(s);e[r].pssh=t&&Object(c["a"])(t)}}return e},{}),we=e=>{if("urn:scte:dash:cc:cea-608:2015"===e.schemeIdUri){const t="string"!==typeof e.value?[]:e.value.split(";");return t.map(e=>{let t,i;return i=e,/^CC\d=/.test(e)?[t,i]=e.split("="):/^CC\d$/.test(e)&&(t=e),{channel:t,language:i}})}if("urn:scte:dash:cc:cea-708:2015"===e.schemeIdUri){const t="string"!==typeof e.value?[]:e.value.split(";");return t.map(e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){const[i,r=""]=e.split("=");t.channel=i,t.language=e,r.split(",").forEach(e=>{const[i,r]=e.split(":");"lang"===i?t.language=r:"er"===i?t.easyReader=Number(r):"war"===i?t.aspectRatio=Number(r):"3D"===i&&(t["3D"]=Number(r))})}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t})}},Ee=e=>y(ce(e.node,"EventStream").map(t=>{const i=ye(t),r=i.schemeIdUri;return ce(t,"Event").map(t=>{const s=ye(t),n=s.presentationTime||0,a=i.timescale||1,o=s.duration||0,l=n/a+e.attributes.start;return{schemeIdUri:r,value:i.value,id:s.id,start:l,end:l+o/a,messageData:he(t)||s.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}})})),Ce=(e,t,i)=>r=>{const s=ye(r),n=be(t,ce(r,"BaseURL")),a=ce(r,"Role")[0],o={role:ye(a)};let l=f(e,s,o);const d=ce(r,"Accessibility")[0],u=we(ye(d));u&&(l=f(l,{captionServices:u}));const c=ce(r,"Label")[0];if(c&&c.childNodes.length){const e=c.childNodes[0].nodeValue.trim();l=f(l,{label:e})}const h=Se(ce(r,"ContentProtection"));Object.keys(h).length&&(l=f(l,{contentProtection:h}));const p=_e(r),m=ce(r,"Representation"),g=f(i,p);return y(m.map(Te(l,n,g)))},xe=(e,t)=>(i,r)=>{const s=be(t,ce(i.node,"BaseURL")),n=f(e,{periodStart:i.attributes.start});"number"===typeof i.attributes.duration&&(n.periodDuration=i.attributes.duration);const a=ce(i.node,"AdaptationSet"),o=_e(i.node);return y(a.map(Ce(n,s,o)))},ke=({attributes:e,priorPeriodAttributes:t,mpdType:i})=>"number"===typeof e.start?e.start:t&&"number"===typeof t.start&&"number"===typeof t.duration?t.start+t.duration:t||"static"!==i?null:0,Ie=(e,t={})=>{const{manifestUri:i="",NOW:r=Date.now(),clientOffset:s=0}=t,n=ce(e,"Period");if(!n.length)throw new Error(T.INVALID_NUMBER_OF_PERIOD);const a=ce(e,"Location"),o=ye(e),l=be([i],ce(e,"BaseURL"));o.type=o.type||"static",o.sourceDuration=o.mediaPresentationDuration||0,o.NOW=r,o.clientOffset=s,a.length&&(o.locations=a.map(he));const d=[];return n.forEach((e,t)=>{const i=ye(e),r=d[t-1];i.start=ke({attributes:i,priorPeriodAttributes:r?r.attributes:null,mpdType:o.type}),d.push({node:e,attributes:i})}),{locations:o.locations,representationInfo:y(d.map(xe(o,l))),eventStream:y(d.map(Ee))}},Ae=e=>{if(""===e)throw new Error(T.DASH_EMPTY_MANIFEST);const t=new h["DOMParser"];let i,r;try{i=t.parseFromString(e,"application/xml"),r=i&&"MPD"===i.documentElement.tagName?i.documentElement:null}catch(s){}if(!r||r&&r.getElementsByTagName("parsererror").length>0)throw new Error(T.DASH_INVALID_XML);return r},Oe=e=>{const t=ce(e,"UTCTiming")[0];if(!t)return null;const i=ye(t);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.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":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.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(T.UNSUPPORTED_UTC_TIMING_SCHEME)}return i},Pe=(e,t={})=>{const i=Ie(Ae(e),t),r=ue(i.representationInfo);return Z({dashPlaylists:r,locations:i.locations,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},Le=e=>Oe(Ae(e))},"861d":function(e,t,i){"use strict";var r=i("1626"),s=i("8ea1"),n=s.all;e.exports=s.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:r(e)||e===n}:function(e){return"object"==typeof e?null!==e:r(e)}},8925:function(e,t,i){"use strict";var r=i("e330"),s=i("1626"),n=i("c6cd"),a=r(Function.toString);s(n.inspectSource)||(n.inspectSource=function(e){return a(e)}),e.exports=n.inspectSource},"89a7":function(e,t,i){"use strict";function r(e,t,i){if(void 0===i&&(i=Array.prototype),e&&"function"===typeof i.find)return i.find.call(e,t);for(var r=0;r<e.length;r++)if(Object.prototype.hasOwnProperty.call(e,r)){var s=e[r];if(t.call(void 0,s,r,e))return s}}function s(e,t){return void 0===t&&(t=Object),t&&"function"===typeof t.freeze?t.freeze(e):e}function n(e,t){if(null===e||"object"!==typeof e)throw new TypeError("target is not an object");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}var a=s({HTML:"text/html",isHTML:function(e){return e===a.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),o=s({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===o.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=n,t.find=r,t.freeze=s,t.MIME_TYPE=a,t.NAMESPACE=o},"8b28":function(e,t,i){"use strict";var r=i("3132"),s=i.n(r);s.a},"8b53":function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var r=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,s=/^application\/dash\+xml/i,n=function(e){return r.test(e)?"hls":s.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null}},"8b8a":function(e,t,i){},"8c00":function(e,t,i){"use strict";var r=i("be09"),s=function(e,t){return void 0===t&&(t=!1),function(i,s,a){if(i)e(i);else if(s.statusCode>=400&&s.statusCode<=599){var o=a;if(t)if(r.TextDecoder){var l=n(s.headers&&s.headers["content-type"]);try{o=new TextDecoder(l).decode(a)}catch(d){}}else o=String.fromCharCode.apply(null,new Uint8Array(a));e({cause:o})}else e(null,a)}};function n(e){return void 0===e&&(e=""),e.toLowerCase().split(";").reduce((function(e,t){var i=t.split("="),r=i[0],s=i[1];return"charset"===r.trim()?s.trim():e}),"utf-8")}e.exports=s},"8c10":function(e,t){function i(e,t){var i,r=null;try{i=JSON.parse(e,t)}catch(s){r=s}return[r,i]}e.exports=i},"8df4":function(e,t,i){"use strict";var r=i("7a77");function s(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var i=this;e((function(e){i.reason||(i.reason=new r(e),t(i.reason))}))}s.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},s.source=function(){var e,t=new s((function(t){e=t}));return{token:t,cancel:e}},e.exports=s},"8ea1":function(e,t,i){"use strict";var r="object"==typeof document&&document.all,s="undefined"==typeof r&&void 0!==r;e.exports={all:r,IS_HTMLDDA:s}},"8ee5":function(e,t,i){"use strict";var r=i("8b8a"),s=i.n(r);s.a},"90e3":function(e,t,i){"use strict";var r=i("e330"),s=0,n=Math.random(),a=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++s+n,36)}},9112:function(e,t,i){"use strict";var r=i("83ab"),s=i("9bf2"),n=i("5c6c");e.exports=r?function(e,t,i){return s.f(e,t,n(1,i))}:function(e,t,i){return e[t]=i,e}},9152:function(e,t){
9
+ var a=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var i=e.indexOf(":"),r=e.slice(0,i).trim().toLowerCase(),s=e.slice(i+1).trim();"undefined"===typeof t[r]?t[r]=s:Array.isArray(t[r])?t[r].push(s):t[r]=[t[r],s]})),t):t};function o(e,t){for(var i=0;i<e.length;i++)t(e[i])}function l(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function d(e,t,i){var r=e;return n(t)?(i=t,"string"===typeof e&&(r={uri:e})):r=s({},t,{uri:e}),r.callback=i,r}function u(e,t,i){return t=d(e,t,i),c(t)}function c(e){if("undefined"===typeof e.callback)throw new Error("callback argument missing");var t=!1,i=function(i,r,s){t||(t=!0,e.callback(i,r,s))};function r(){4===p.readyState&&setTimeout(o,0)}function s(){var e=void 0;if(e=p.response?p.response:p.responseText||h(p),_)try{e=JSON.parse(e)}catch(t){}return e}function n(e){return clearTimeout(f),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,i(e,T)}function o(){if(!c){var t;clearTimeout(f),t=e.useXDR&&void 0===p.status?200:1223===p.status?204:p.status;var r=T,n=null;return 0!==t?(r={body:s(),statusCode:t,method:g,headers:{},url:m,rawRequest:p},p.getAllResponseHeaders&&(r.headers=a(p.getAllResponseHeaders()))):n=new Error("Internal XMLHttpRequest Error"),i(n,r,r.body)}}var d,c,p=e.xhr||null;p||(p=e.cors||e.useXDR?new u.XDomainRequest:new u.XMLHttpRequest);var f,m=p.url=e.uri||e.url,g=p.method=e.method||"GET",y=e.body||e.data,v=p.headers=e.headers||{},b=!!e.sync,_=!1,T={body:void 0,headers:{},statusCode:0,method:g,url:m,rawRequest:p};if("json"in e&&!1!==e.json&&(_=!0,v["accept"]||v["Accept"]||(v["Accept"]="application/json"),"GET"!==g&&"HEAD"!==g&&(v["content-type"]||v["Content-Type"]||(v["Content-Type"]="application/json"),y=JSON.stringify(!0===e.json?y:e.json))),p.onreadystatechange=r,p.onload=o,p.onerror=n,p.onprogress=function(){},p.onabort=function(){c=!0},p.ontimeout=n,p.open(g,m,!b,e.username,e.password),b||(p.withCredentials=!!e.withCredentials),!b&&e.timeout>0&&(f=setTimeout((function(){if(!c){c=!0,p.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",n(e)}}),e.timeout)),p.setRequestHeader)for(d in v)v.hasOwnProperty(d)&&p.setRequestHeader(d,v[d]);else if(e.headers&&!l(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(p.responseType=e.responseType),"beforeSend"in e&&"function"===typeof e.beforeSend&&e.beforeSend(p),p.send(y||null),p}function h(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(i){}return null}function p(){}e.exports=u,e.exports.default=u,u.XMLHttpRequest=r.XMLHttpRequest||p,u.XDomainRequest="withCredentials"in new u.XMLHttpRequest?u.XMLHttpRequest:r.XDomainRequest,o(["get","put","post","patch","head","delete"],(function(e){u["delete"===e?"del":e]=function(t,i,r){return i=d(t,i,r),i.method=e.toUpperCase(),c(i)}}))},"36c6":function(e,t){var i,r,s,n,a,o,l,d=9e4;i=function(e){return e*d},r=function(e,t){return e*t},s=function(e){return e/d},n=function(e,t){return e/t},a=function(e,t){return i(n(e,t))},o=function(e,t){return r(s(e),t)},l=function(e,t,i){return s(i?e:e-t)},e.exports={ONE_SECOND_IN_TS:d,secondsToVideoTs:i,secondsToAudioTs:r,videoTsToSeconds:s,audioTsToSeconds:n,audioTsToVideoTs:a,videoTsToAudioTs:o,metadataTsToSeconds:l}},3821:function(e,t,i){},"387f":function(e,t,i){"use strict";e.exports=function(e,t,i,r,s){return e.config=t,i&&(e.code=i),e.request=r,e.response=s,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},3934:function(e,t,i){"use strict";var r=i("c532");e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function s(e){var r=e;return t&&(i.setAttribute("href",r),r=i.href),i.setAttribute("href",r),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}return e=s(window.location.href),function(t){var i=r.isString(t)?s(t):t;return i.protocol===e.protocol&&i.host===e.host}}():function(){return function(){return!0}}()},"3a34":function(e,t,i){"use strict";var r=i("83ab"),s=i("e8b5"),n=TypeError,a=Object.getOwnPropertyDescriptor,o=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=o?function(e,t){if(s(e)&&!a(e,"length").writable)throw n("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},"3a9b":function(e,t,i){"use strict";var r=i("e330");e.exports=r({}.isPrototypeOf)},"3de5":function(e,t,i){"use strict";var r=i("fe1c"),s=i.n(r);s.a},"40d5":function(e,t,i){"use strict";var r=i("d039");e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},4362:function(e,t,i){t.nextTick=function(e){var t=Array.prototype.slice.call(arguments);t.shift(),setTimeout((function(){e.apply(null,t)}),0)},t.platform=t.arch=t.execPath=t.title="browser",t.pid=1,t.browser=!0,t.env={},t.argv=[],t.binding=function(e){throw new Error("No such module. (Possibly not yet loaded)")},function(){var e,r="/";t.cwd=function(){return r},t.chdir=function(t){e||(e=i("df7c")),r=e.resolve(t,r)}}(),t.exit=t.kill=t.umask=t.dlopen=t.uptime=t.memoryUsage=t.uvCounters=function(){},t.features={}},"44ad":function(e,t,i){"use strict";var r=i("e330"),s=i("d039"),n=i("c6b6"),a=Object,o=r("".split);e.exports=s((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"==n(e)?o(e,""):a(e)}:a},4664:function(e,t,i){"use strict";var r=i("a5ab"),s=i.n(r);s.a},"467f":function(e,t,i){"use strict";var r=i("2d83");e.exports=function(e,t,i){var s=i.config.validateStatus;i.status&&s&&!s(i.status)?t(r("Request failed with status code "+i.status,i.config,null,i.request,i)):e(i)}},"485a":function(e,t,i){"use strict";var r=i("c65b"),s=i("1626"),n=i("861d"),a=TypeError;e.exports=function(e,t){var i,o;if("string"===t&&s(i=e.toString)&&!n(o=r(i,e)))return o;if(s(i=e.valueOf)&&!n(o=r(i,e)))return o;if("string"!==t&&s(i=e.toString)&&!n(o=r(i,e)))return o;throw a("Can't convert object to primitive value")}},"4a7b":function(e,t,i){"use strict";var r=i("c532");e.exports=function(e,t){t=t||{};var i={},s=["url","method","data"],n=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],o=["validateStatus"];function l(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function d(s){r.isUndefined(t[s])?r.isUndefined(e[s])||(i[s]=l(void 0,e[s])):i[s]=l(e[s],t[s])}r.forEach(s,(function(e){r.isUndefined(t[e])||(i[e]=l(void 0,t[e]))})),r.forEach(n,d),r.forEach(a,(function(s){r.isUndefined(t[s])?r.isUndefined(e[s])||(i[s]=l(void 0,e[s])):i[s]=l(void 0,t[s])})),r.forEach(o,(function(r){r in t?i[r]=l(e[r],t[r]):r in e&&(i[r]=l(void 0,e[r]))}));var u=s.concat(n).concat(a).concat(o),c=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return r.forEach(c,d),i}},"4d64":function(e,t,i){"use strict";var r=i("fc6a"),s=i("23cb"),n=i("07fa"),a=function(e){return function(t,i,a){var o,l=r(t),d=n(l),u=s(a,d);if(e&&i!=i){while(d>u)if(o=l[u++],o!=o)return!0}else for(;d>u;u++)if((e||u in l)&&l[u]===i)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},"4e30":function(e,t,i){"use strict";var r=i("1db4"),s=i.n(r);s.a},"4e9a":function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return a}));var r=i("be09"),s=i.n(r),n=function(t){return s.a.atob?s.a.atob(t):e.from(t,"base64").toString("binary")};function a(e){for(var t=n(e),i=new Uint8Array(t.length),r=0;r<t.length;r++)i[r]=t.charCodeAt(r);return i}}).call(this,i("b639").Buffer)},"50c4":function(e,t,i){"use strict";var r=i("5926"),s=Math.min;e.exports=function(e){return e>0?s(r(e),9007199254740991):0}},5270:function(e,t,i){"use strict";var r=i("c532"),s=i("c401"),n=i("2e67"),a=i("2444");function o(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){o(e),e.headers=e.headers||{},e.data=s(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]}));var t=e.adapter||a.adapter;return t(e).then((function(t){return o(e),t.data=s(t.data,t.headers,e.transformResponse),t}),(function(t){return n(t)||(o(e),t&&t.response&&(t.response.data=s(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},"55f9":function(e,t,i){"use strict";var r=i("fdcb"),s=i.n(r);s.a},5692:function(e,t,i){"use strict";var r=i("c430"),s=i("c6cd");(e.exports=function(e,t){return s[e]||(s[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.32.0",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.0/LICENSE",source:"https://github.com/zloirock/core-js"})},"56ef":function(e,t,i){"use strict";var r=i("d066"),s=i("e330"),n=i("241c"),a=i("7418"),o=i("825a"),l=s([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=n.f(o(e)),i=a.f;return i?l(t,i(e)):t}},5926:function(e,t,i){"use strict";var r=i("b42e");e.exports=function(e){var t=+e;return t!==t||0===t?0:r(t)}},"597b":function(e,t,i){},"59ed":function(e,t,i){"use strict";var r=i("1626"),s=i("0d51"),n=TypeError;e.exports=function(e){if(r(e))return e;throw n(s(e)+" is not a function")}},"5c6c":function(e,t,i){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"5e77":function(e,t,i){"use strict";var r=i("83ab"),s=i("1a2d"),n=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,o=s(n,"name"),l=o&&"something"===function(){}.name,d=o&&(!r||r&&a(n,"name").configurable);e.exports={EXISTS:o,PROPER:l,CONFIGURABLE:d}},"5f02":function(e,t,i){"use strict";e.exports=function(e){return"object"===typeof e&&!0===e.isAxiosError}},6013:function(e,t,i){"use strict";var r=i("787b"),s=i.n(r);s.a},"605d":function(e,t,i){"use strict";(function(t){var r=i("c6b6");e.exports="undefined"!=typeof t&&"process"==r(t)}).call(this,i("4362"))},6374:function(e,t,i){"use strict";var r=i("da84"),s=Object.defineProperty;e.exports=function(e,t){try{s(r,e,{value:t,configurable:!0,writable:!0})}catch(i){r[e]=t}return t}},"63ec":function(e,t,i){"use strict";var r=i("d136"),s=i.n(r),n=i("be09"),a=i.n(n),o="http://example.com",l=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=a.a.location&&a.a.location.href||"");var i="function"===typeof a.a.URL,r=/^\/\//.test(e),n=!a.a.location&&!/\/\//i.test(e);if(i?e=new a.a.URL(e,a.a.location||o):/\/\//i.test(e)||(e=s.a.buildAbsoluteURL(a.a.location&&a.a.location.href||"",e)),i){var l=new URL(t,e);return n?l.href.slice(o.length):r?l.href.slice(l.protocol.length):l.href}return s.a.buildAbsoluteURL(e,t)};t["a"]=l},"69f3":function(e,t,i){"use strict";var r,s,n,a=i("cdce"),o=i("da84"),l=i("861d"),d=i("9112"),u=i("1a2d"),c=i("c6cd"),h=i("f772"),p=i("d012"),f="Object already initialized",m=o.TypeError,g=o.WeakMap,y=function(e){return n(e)?s(e):r(e,{})},v=function(e){return function(t){var i;if(!l(t)||(i=s(t)).type!==e)throw m("Incompatible receiver, "+e+" required");return i}};if(a||c.state){var b=c.state||(c.state=new g);b.get=b.get,b.has=b.has,b.set=b.set,r=function(e,t){if(b.has(e))throw m(f);return t.facade=e,b.set(e,t),t},s=function(e){return b.get(e)||{}},n=function(e){return b.has(e)}}else{var _=h("state");p[_]=!0,r=function(e,t){if(u(e,_))throw m(f);return t.facade=e,d(e,_,t),t},s=function(e){return u(e,_)?e[_]:{}},n=function(e){return u(e,_)}}e.exports={set:r,get:s,has:n,enforce:y,getterFor:v}},"6c71":function(e,t,i){},"6e0e":function(e,t,i){"use strict";var r=i("dc6e"),s=i.n(r);s.a},7234:function(e,t,i){"use strict";e.exports=function(e){return null===e||void 0===e}},7418:function(e,t,i){"use strict";t.f=Object.getOwnPropertySymbols},"77ed":function(e,t,i){},7839:function(e,t,i){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"787b":function(e,t,i){},"7a77":function(e,t,i){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},"7aac":function(e,t,i){"use strict";var r=i("c532");e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,i,s,n,a){var o=[];o.push(e+"="+encodeURIComponent(t)),r.isNumber(i)&&o.push("expires="+new Date(i).toGMTString()),r.isString(s)&&o.push("path="+s),r.isString(n)&&o.push("domain="+n),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},"7b0b":function(e,t,i){"use strict";var r=i("1d80"),s=Object;e.exports=function(e){return s(r(e))}},"81c0":function(e,t,i){var r=i("a968").getUint64,s=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},s=12;0===i.version?(i.earliestPresentationTime=t.getUint32(s),i.firstOffset=t.getUint32(s+4),s+=8):(i.earliestPresentationTime=r(e.subarray(s)),i.firstOffset=r(e.subarray(s+8)),s+=16),s+=2;var n=t.getUint16(s);for(s+=2;n>0;s+=12,n--)i.references.push({referenceType:(128&e[s])>>>7,referencedSize:2147483647&t.getUint32(s),subsegmentDuration:t.getUint32(s+4),startsWithSap:!!(128&e[s+8]),sapType:(112&e[s+8])>>>4,sapDeltaTime:268435455&t.getUint32(s+8)});return i};e.exports=s},"825a":function(e,t,i){"use strict";var r=i("861d"),s=String,n=TypeError;e.exports=function(e){if(r(e))return e;throw n(s(e)+" is not an object")}},8362:function(e,t){e.exports=r;var i=Object.prototype.toString;function r(e){if(!e)return!1;var t=i.call(e);return"[object Function]"===t||"function"===typeof e&&"[object RegExp]"!==t||"undefined"!==typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}},"83ab":function(e,t,i){"use strict";var r=i("d039");e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"83b9":function(e,t,i){"use strict";var r=i("d925"),s=i("e683");e.exports=function(e,t){return e&&!r(t)?s(e,t):t}},8484:function(e,t,i){"use strict";i.d(t,"a",(function(){return A})),i.d(t,"b",(function(){return B})),i.d(t,"c",(function(){return Oe})),i.d(t,"d",(function(){return Le}));var r=i("d136"),s=i.n(r),n=i("be09"),a=i.n(n),o="http://example.com",l=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=a.a.location&&a.a.location.href||"");var i="function"===typeof a.a.URL,r=/^\/\//.test(e),n=!a.a.location&&!/\/\//i.test(e);if(i?e=new a.a.URL(e,a.a.location||o):/\/\//i.test(e)||(e=s.a.buildAbsoluteURL(a.a.location&&a.a.location.href||"",e)),i){var l=new URL(t,e);return n?l.href.slice(o.length):r?l.href.slice(l.protocol.length):l.href}return s.a.buildAbsoluteURL(e,t)},d=l,u=function(e,t,i){t.forEach((function(t){for(var r in e.mediaGroups[t])for(var s in e.mediaGroups[t][r]){var n=e.mediaGroups[t][r][s];i(n,t,r,s)}}))},c=i("ddb2"),h=i("210b");const p=e=>!!e&&"object"===typeof e,f=(...e)=>e.reduce((e,t)=>("object"!==typeof t||Object.keys(t).forEach(i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):p(e[i])&&p(t[i])?e[i]=f(e[i],t[i]):e[i]=t[i]}),e),{}),m=e=>Object.keys(e).map(t=>e[t]),g=(e,t)=>{const i=[];for(let r=e;r<t;r++)i.push(r);return i},y=e=>e.reduce((e,t)=>e.concat(t),[]),v=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t},b=(e,t)=>e.reduce((e,i,r)=>(i[t]&&e.push(r),e),[]),_=(e,t)=>m(e.reduce((e,i)=>(i.forEach(i=>{e[t(i)]=i}),e),{}));var T={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};const S=({baseUrl:e="",source:t="",range:i="",indexRange:r=""})=>{const s={uri:t,resolvedUri:d(e||"",t)};if(i||r){const e=i||r,t=e.split("-");let n,o=a.a.BigInt?a.a.BigInt(t[0]):parseInt(t[0],10),l=a.a.BigInt?a.a.BigInt(t[1]):parseInt(t[1],10);o<Number.MAX_SAFE_INTEGER&&"bigint"===typeof o&&(o=Number(o)),l<Number.MAX_SAFE_INTEGER&&"bigint"===typeof l&&(l=Number(l)),n="bigint"===typeof l||"bigint"===typeof o?a.a.BigInt(l)-a.a.BigInt(o)+a.a.BigInt(1):l-o+1,"bigint"===typeof n&&n<Number.MAX_SAFE_INTEGER&&(n=Number(n)),s.byterange={length:n,offset:o}}return s},w=e=>{let t;return t="bigint"===typeof e.offset||"bigint"===typeof e.length?a.a.BigInt(e.offset)+a.a.BigInt(e.length)-a.a.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`},E=e=>(e&&"number"!==typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),C={static(e){const{duration:t,timescale:i=1,sourceDuration:r,periodDuration:s}=e,n=E(e.endNumber),a=t/i;return"number"===typeof n?{start:0,end:n}:"number"===typeof s?{start:0,end:s/a}:{start:0,end:r/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:r,timescale:s=1,duration:n,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,d=E(e.endNumber),u=(t+i)/1e3,c=r+a,h=u+o,p=h-c,f=Math.ceil(p*s/n),m=Math.floor((u-c-l)*s/n),g=Math.floor((u-c)*s/n);return{start:Math.max(0,m),end:"number"===typeof d?d:Math.min(f,g)}}},x=e=>t=>{const{duration:i,timescale:r=1,periodStart:s,startNumber:n=1}=e;return{number:n+t,duration:i/r,timeline:s,time:t*i}},k=e=>{const{type:t,duration:i,timescale:r=1,periodDuration:s,sourceDuration:n}=e,{start:a,end:o}=C[t](e),l=g(a,o).map(x(e));if("static"===t){const e=l.length-1,t="number"===typeof s?s:n;l[e].duration=t-i/r*e}return l},I=e=>{const{baseUrl:t,initialization:i={},sourceDuration:r,indexRange:s="",periodStart:n,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(T.NO_BASE_URL);const d=S({baseUrl:t,source:i.sourceURL,range:i.range}),u=S({baseUrl:t,source:t,indexRange:s});if(u.map=d,l){const t=k(e);t.length&&(u.duration=t[0].duration,u.timeline=t[0].timeline)}else r&&(u.duration=r,u.timeline=n);return u.presentationTime=a||n,u.number=o,[u]},A=(e,t,i)=>{const r=e.sidx.map?e.sidx.map:null,s=e.sidx.duration,n=e.timeline||0,o=e.sidx.byterange,l=o.offset+o.length,d=t.timescale,u=t.references.filter(e=>1!==e.referenceType),c=[],h=e.endList?"static":"dynamic",p=e.sidx.timeline;let f,m=p,g=e.mediaSequence||0;f="bigint"===typeof t.firstOffset?a.a.BigInt(l)+t.firstOffset:l+t.firstOffset;for(let y=0;y<u.length;y++){const e=t.references[y],o=e.referencedSize,l=e.subsegmentDuration;let u;u="bigint"===typeof f?f+a.a.BigInt(o)-a.a.BigInt(1):f+o-1;const v=`${f}-${u}`,b={baseUrl:i,timescale:d,timeline:n,periodStart:p,presentationTime:m,number:g,duration:l,sourceDuration:s,indexRange:v,type:h},_=I(b)[0];r&&(_.map=r),c.push(_),f+="bigint"===typeof f?a.a.BigInt(o):o,m+=l/d,g++}return e.segments=c,e},P=["AUDIO","SUBTITLES"],O=1/60,L=e=>_(e,({timeline:e})=>e).sort((e,t)=>e.timeline>t.timeline?1:-1),D=(e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null},M=e=>{let t=[];return u(e,P,(e,i,r,s)=>{t=t.concat(e.playlists||[])}),t},N=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach((t,i)=>{t.number=e.mediaSequence+i})},R=({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach(t=>{t.discontinuitySequence=i.findIndex((function({timeline:e}){return e===t.timeline}));const r=D(e,t.attributes.NAME);if(!r)return;if(t.sidx)return;const s=t.segments[0],n=r.segments.findIndex((function(e){return Math.abs(e.presentationTime-s.presentationTime)<O}));if(-1===n)return N({playlist:t,mediaSequence:r.mediaSequence+r.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!r.segments.length&&t.timeline>r.timeline||r.segments.length&&t.timeline>r.segments[r.segments.length-1].timeline)&&t.discontinuitySequence--);const a=r.segments[n];a.discontinuity&&!s.discontinuity&&(s.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),N({playlist:t,mediaSequence:r.segments[n].number})})},U=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(M(e)),r=t.playlists.concat(M(t));return t.timelineStarts=L([e.timelineStarts,t.timelineStarts]),R({oldPlaylists:i,newPlaylists:r,timelineStarts:t.timelineStarts}),t},B=e=>e&&e.uri+"-"+w(e.byterange),j=e=>{const t=m(e.reduce((e,t)=>{const i=t.attributes.id+(t.attributes.lang||"");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e},{}));return t.map(e=>(e.discontinuityStarts=b(e.segments||[],"discontinuity"),e))},F=(e,t)=>{const i=B(e.sidx),r=i&&t[i]&&t[i].sidx;return r&&A(e,r,e.sidx.resolvedUri),e},q=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=F(e[i],t);return e},$=({attributes:e,segments:t,sidx:i,mediaSequence:r,discontinuitySequence:s,discontinuityStarts:n},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,["PROGRAM-ID"]:1},uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:"",targetDuration:e.duration,discontinuitySequence:s,discontinuityStarts:n,timelineStarts:e.timelineStarts,mediaSequence:r,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),i&&(o.sidx=i),a&&(o.attributes.AUDIO="audio",o.attributes.SUBTITLES="subs"),o},H=({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:r,discontinuitySequence:s})=>{"undefined"===typeof t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||"",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const n={NAME:e.id,BANDWIDTH:e.bandwidth,["PROGRAM-ID"]:1};return e.codecs&&(n.CODECS=e.codecs),{attributes:n,uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:r,discontinuitySequence:s,mediaSequence:i,segments:t}},z=(e,t={},i=!1)=>{let r;const s=e.reduce((e,s)=>{const n=s.attributes.role&&s.attributes.role.value||"",a=s.attributes.lang||"";let o=s.attributes.label||"main";if(a&&!s.attributes.label){const e=n?` (${n})`:"";o=`${s.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:"main"===n,playlists:[],uri:""});const l=F($(s,i),t);return e[o].playlists.push(l),"undefined"===typeof r&&"main"===n&&(r=s,r.default=!0),e},{});if(!r){const e=Object.keys(s)[0];s[e].default=!0}return s},V=(e,t={})=>e.reduce((e,i)=>{const r=i.attributes.label||i.attributes.lang||"text";return e[r]||(e[r]={language:r,default:!1,autoselect:!1,playlists:[],uri:""}),e[r].playlists.push(F(H(i),t)),e},{}),G=e=>e.reduce((e,t)=>t?(t.forEach(t=>{const{channel:i,language:r}=t;e[r]={autoselect:!1,default:!1,instreamId:i,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,{}),W=({attributes:e,segments:t,sidx:i,discontinuityStarts:r})=>{const s={attributes:{NAME:e.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,["PROGRAM-ID"]:1},uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:"",targetDuration:e.duration,discontinuityStarts:r,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(s.attributes["FRAME-RATE"]=e.frameRate),e.contentProtection&&(s.contentProtection=e.contentProtection),i&&(s.sidx=i),s},X=({attributes:e})=>"video/mp4"===e.mimeType||"video/webm"===e.mimeType||"video"===e.contentType,Y=({attributes:e})=>"audio/mp4"===e.mimeType||"audio/webm"===e.mimeType||"audio"===e.contentType,K=({attributes:e})=>"text/vtt"===e.mimeType||"text"===e.contentType,J=(e,t)=>{e.forEach(e=>{e.mediaSequence=0,e.discontinuitySequence=t.findIndex((function({timeline:t}){return t===e.timeline})),e.segments&&e.segments.forEach((e,t)=>{e.number=t})})},Q=e=>e?Object.keys(e).reduce((t,i)=>{const r=e[i];return t.concat(r.playlists)},[]):[],Z=({dashPlaylists:e,locations:t,sidxMapping:i={},previousManifest:r,eventStream:s})=>{if(!e.length)return{};const{sourceDuration:n,type:a,suggestedPresentationDelay:o,minimumUpdatePeriod:l}=e[0].attributes,d=j(e.filter(X)).map(W),u=j(e.filter(Y)),c=j(e.filter(K)),h=e.map(e=>e.attributes.captionServices).filter(Boolean),p={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},["CLOSED-CAPTIONS"]:{},SUBTITLES:{}},uri:"",duration:n,playlists:q(d,i)};l>=0&&(p.minimumUpdatePeriod=1e3*l),t&&(p.locations=t),"dynamic"===a&&(p.suggestedPresentationDelay=o),s&&s.length>0&&(p.eventStream=s);const f=0===p.playlists.length,m=u.length?z(u,i,f):null,g=c.length?V(c,i):null,y=d.concat(Q(m),Q(g)),v=y.map(({timelineStarts:e})=>e);return p.timelineStarts=L(v),J(y,p.timelineStarts),m&&(p.mediaGroups.AUDIO.audio=m),g&&(p.mediaGroups.SUBTITLES.subs=g),h.length&&(p.mediaGroups["CLOSED-CAPTIONS"].cc=G(h)),r?U({oldManifest:r,newManifest:p}):p},ee=(e,t,i)=>{const{NOW:r,clientOffset:s,availabilityStartTime:n,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,d=(r+s)/1e3,u=n+o,c=d+l,h=c-u;return Math.ceil((h*a-t)/i)},te=(e,t)=>{const{type:i,minimumUpdatePeriod:r=0,media:s="",sourceDuration:n,timescale:a=1,startNumber:o=1,periodStart:l}=e,d=[];let u=-1;for(let c=0;c<t.length;c++){const h=t[c],p=h.d,f=h.r||0,m=h.t||0;let g;if(u<0&&(u=m),m&&m>u&&(u=m),f<0){const o=c+1;g=o===t.length?"dynamic"===i&&r>0&&s.indexOf("$Number$")>0?ee(e,u,p):(n*a-u)/p:(t[o].t-u)/p}else g=f+1;const y=o+d.length+g;let v=o+d.length;while(v<y)d.push({number:v,duration:p/a,time:u,timeline:l}),u+=p,v++}return d},ie=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,re=e=>(t,i,r,s)=>{if("$$"===t)return"$";if("undefined"===typeof e[i])return t;const n=""+e[i];return"RepresentationID"===i?n:(s=r?parseInt(s,10):1,n.length>=s?n:`${new Array(s-n.length+1).join("0")}${n}`)},se=(e,t)=>e.replace(ie,re(t)),ne=(e,t)=>e.duration||t?e.duration?k(e):te(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}],ae=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:r={sourceURL:"",range:""}}=e,s=S({baseUrl:e.baseUrl,source:se(r.sourceURL,i),range:r.range}),n=ne(e,t);return n.map(t=>{i.Number=t.number,i.Time=t.time;const r=se(e.media||"",i),n=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/n,l={uri:r,timeline:t.timeline,duration:t.duration,resolvedUri:d(e.baseUrl||"",r),map:s,number:t.number,presentationTime:o};return l})},oe=(e,t)=>{const{baseUrl:i,initialization:r={}}=e,s=S({baseUrl:i,source:r.sourceURL,range:r.range}),n=S({baseUrl:i,source:t.media,range:t.mediaRange});return n.map=s,n},le=(e,t)=>{const{duration:i,segmentUrls:r=[],periodStart:s}=e;if(!i&&!t||i&&t)throw new Error(T.SEGMENT_TIME_UNSPECIFIED);const n=r.map(t=>oe(e,t));let a;i&&(a=k(e)),t&&(a=te(e,t));const o=a.map((t,i)=>{if(n[i]){const r=n[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return r.timeline=t.timeline,r.duration=t.duration,r.number=t.number,r.presentationTime=s+(t.time-o)/a,r}}).filter(e=>e);return o},de=({attributes:e,segmentInfo:t})=>{let i,r;t.template?(r=ae,i=f(e,t.template)):t.base?(r=I,i=f(e,t.base)):t.list&&(r=le,i=f(e,t.list));const s={attributes:e};if(!r)return s;const n=r(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else n.length?i.duration=n.reduce((e,t)=>Math.max(e,Math.ceil(t.duration)),0):i.duration=0;return s.attributes=i,s.segments=n,t.base&&i.indexRange&&(s.sidx=n[0],s.segments=[]),s},ue=e=>e.map(de),ce=(e,t)=>v(e.childNodes).filter(({tagName:e})=>e===t),he=e=>e.textContent.trim(),pe=e=>parseFloat(e.split("/").reduce((e,t)=>e/t)),fe=e=>{const t=31536e3,i=2592e3,r=86400,s=3600,n=60,a=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/,o=a.exec(e);if(!o)return 0;const[l,d,u,c,h,p]=o.slice(1);return parseFloat(l||0)*t+parseFloat(d||0)*i+parseFloat(u||0)*r+parseFloat(c||0)*s+parseFloat(h||0)*n+parseFloat(p||0)},me=e=>{const t=/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/;return t.test(e)&&(e+="Z"),Date.parse(e)},ge={mediaPresentationDuration(e){return fe(e)},availabilityStartTime(e){return me(e)/1e3},minimumUpdatePeriod(e){return fe(e)},suggestedPresentationDelay(e){return fe(e)},type(e){return e},timeShiftBufferDepth(e){return fe(e)},start(e){return fe(e)},width(e){return parseInt(e,10)},height(e){return parseInt(e,10)},bandwidth(e){return parseInt(e,10)},frameRate(e){return pe(e)},startNumber(e){return parseInt(e,10)},timescale(e){return parseInt(e,10)},presentationTimeOffset(e){return parseInt(e,10)},duration(e){const t=parseInt(e,10);return isNaN(t)?fe(e):t},d(e){return parseInt(e,10)},t(e){return parseInt(e,10)},r(e){return parseInt(e,10)},presentationTime(e){return parseInt(e,10)},DEFAULT(e){return e}},ye=e=>e&&e.attributes?v(e.attributes).reduce((e,t)=>{const i=ge[t.name]||ge.DEFAULT;return e[t.name]=i(t.value),e},{}):{},ve={"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"},be=(e,t)=>t.length?y(e.map((function(e){return t.map((function(t){return d(e,he(t))}))}))):e,_e=e=>{const t=ce(e,"SegmentTemplate")[0],i=ce(e,"SegmentList")[0],r=i&&ce(i,"SegmentURL").map(e=>f({tag:"SegmentURL"},ye(e))),s=ce(e,"SegmentBase")[0],n=i||t,a=n&&ce(n,"SegmentTimeline")[0],o=i||s||t,l=o&&ce(o,"Initialization")[0],d=t&&ye(t);d&&l?d.initialization=l&&ye(l):d&&d.initialization&&(d.initialization={sourceURL:d.initialization});const u={template:d,segmentTimeline:a&&ce(a,"S").map(e=>ye(e)),list:i&&f(ye(i),{segmentUrls:r,initialization:ye(l)}),base:s&&f(ye(s),{initialization:ye(l)})};return Object.keys(u).forEach(e=>{u[e]||delete u[e]}),u},Te=(e,t,i)=>r=>{const s=ce(r,"BaseURL"),n=be(t,s),a=f(e,ye(r)),o=_e(r);return n.map(e=>({segmentInfo:f(i,o),attributes:f(a,{baseUrl:e})}))},Se=e=>e.reduce((e,t)=>{const i=ye(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const r=ve[i.schemeIdUri];if(r){e[r]={attributes:i};const s=ce(t,"cenc:pssh")[0];if(s){const t=he(s);e[r].pssh=t&&Object(c["a"])(t)}}return e},{}),we=e=>{if("urn:scte:dash:cc:cea-608:2015"===e.schemeIdUri){const t="string"!==typeof e.value?[]:e.value.split(";");return t.map(e=>{let t,i;return i=e,/^CC\d=/.test(e)?[t,i]=e.split("="):/^CC\d$/.test(e)&&(t=e),{channel:t,language:i}})}if("urn:scte:dash:cc:cea-708:2015"===e.schemeIdUri){const t="string"!==typeof e.value?[]:e.value.split(";");return t.map(e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){const[i,r=""]=e.split("=");t.channel=i,t.language=e,r.split(",").forEach(e=>{const[i,r]=e.split(":");"lang"===i?t.language=r:"er"===i?t.easyReader=Number(r):"war"===i?t.aspectRatio=Number(r):"3D"===i&&(t["3D"]=Number(r))})}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t})}},Ee=e=>y(ce(e.node,"EventStream").map(t=>{const i=ye(t),r=i.schemeIdUri;return ce(t,"Event").map(t=>{const s=ye(t),n=s.presentationTime||0,a=i.timescale||1,o=s.duration||0,l=n/a+e.attributes.start;return{schemeIdUri:r,value:i.value,id:s.id,start:l,end:l+o/a,messageData:he(t)||s.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}})})),Ce=(e,t,i)=>r=>{const s=ye(r),n=be(t,ce(r,"BaseURL")),a=ce(r,"Role")[0],o={role:ye(a)};let l=f(e,s,o);const d=ce(r,"Accessibility")[0],u=we(ye(d));u&&(l=f(l,{captionServices:u}));const c=ce(r,"Label")[0];if(c&&c.childNodes.length){const e=c.childNodes[0].nodeValue.trim();l=f(l,{label:e})}const h=Se(ce(r,"ContentProtection"));Object.keys(h).length&&(l=f(l,{contentProtection:h}));const p=_e(r),m=ce(r,"Representation"),g=f(i,p);return y(m.map(Te(l,n,g)))},xe=(e,t)=>(i,r)=>{const s=be(t,ce(i.node,"BaseURL")),n=f(e,{periodStart:i.attributes.start});"number"===typeof i.attributes.duration&&(n.periodDuration=i.attributes.duration);const a=ce(i.node,"AdaptationSet"),o=_e(i.node);return y(a.map(Ce(n,s,o)))},ke=({attributes:e,priorPeriodAttributes:t,mpdType:i})=>"number"===typeof e.start?e.start:t&&"number"===typeof t.start&&"number"===typeof t.duration?t.start+t.duration:t||"static"!==i?null:0,Ie=(e,t={})=>{const{manifestUri:i="",NOW:r=Date.now(),clientOffset:s=0}=t,n=ce(e,"Period");if(!n.length)throw new Error(T.INVALID_NUMBER_OF_PERIOD);const a=ce(e,"Location"),o=ye(e),l=be([i],ce(e,"BaseURL"));o.type=o.type||"static",o.sourceDuration=o.mediaPresentationDuration||0,o.NOW=r,o.clientOffset=s,a.length&&(o.locations=a.map(he));const d=[];return n.forEach((e,t)=>{const i=ye(e),r=d[t-1];i.start=ke({attributes:i,priorPeriodAttributes:r?r.attributes:null,mpdType:o.type}),d.push({node:e,attributes:i})}),{locations:o.locations,representationInfo:y(d.map(xe(o,l))),eventStream:y(d.map(Ee))}},Ae=e=>{if(""===e)throw new Error(T.DASH_EMPTY_MANIFEST);const t=new h["DOMParser"];let i,r;try{i=t.parseFromString(e,"application/xml"),r=i&&"MPD"===i.documentElement.tagName?i.documentElement:null}catch(s){}if(!r||r&&r.getElementsByTagName("parsererror").length>0)throw new Error(T.DASH_INVALID_XML);return r},Pe=e=>{const t=ce(e,"UTCTiming")[0];if(!t)return null;const i=ye(t);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.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":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.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(T.UNSUPPORTED_UTC_TIMING_SCHEME)}return i},Oe=(e,t={})=>{const i=Ie(Ae(e),t),r=ue(i.representationInfo);return Z({dashPlaylists:r,locations:i.locations,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},Le=e=>Pe(Ae(e))},"861d":function(e,t,i){"use strict";var r=i("1626"),s=i("8ea1"),n=s.all;e.exports=s.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:r(e)||e===n}:function(e){return"object"==typeof e?null!==e:r(e)}},"866e":function(e,t,i){"use strict";var r=i("3821"),s=i.n(r);s.a},8925:function(e,t,i){"use strict";var r=i("e330"),s=i("1626"),n=i("c6cd"),a=r(Function.toString);s(n.inspectSource)||(n.inspectSource=function(e){return a(e)}),e.exports=n.inspectSource},"89a7":function(e,t,i){"use strict";function r(e,t,i){if(void 0===i&&(i=Array.prototype),e&&"function"===typeof i.find)return i.find.call(e,t);for(var r=0;r<e.length;r++)if(Object.prototype.hasOwnProperty.call(e,r)){var s=e[r];if(t.call(void 0,s,r,e))return s}}function s(e,t){return void 0===t&&(t=Object),t&&"function"===typeof t.freeze?t.freeze(e):e}function n(e,t){if(null===e||"object"!==typeof e)throw new TypeError("target is not an object");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}var a=s({HTML:"text/html",isHTML:function(e){return e===a.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),o=s({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===o.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=n,t.find=r,t.freeze=s,t.MIME_TYPE=a,t.NAMESPACE=o},"8b28":function(e,t,i){"use strict";var r=i("3132"),s=i.n(r);s.a},"8b53":function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var r=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,s=/^application\/dash\+xml/i,n=function(e){return r.test(e)?"hls":s.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null}},"8b8a":function(e,t,i){},"8c00":function(e,t,i){"use strict";var r=i("be09"),s=function(e,t){return void 0===t&&(t=!1),function(i,s,a){if(i)e(i);else if(s.statusCode>=400&&s.statusCode<=599){var o=a;if(t)if(r.TextDecoder){var l=n(s.headers&&s.headers["content-type"]);try{o=new TextDecoder(l).decode(a)}catch(d){}}else o=String.fromCharCode.apply(null,new Uint8Array(a));e({cause:o})}else e(null,a)}};function n(e){return void 0===e&&(e=""),e.toLowerCase().split(";").reduce((function(e,t){var i=t.split("="),r=i[0],s=i[1];return"charset"===r.trim()?s.trim():e}),"utf-8")}e.exports=s},"8c10":function(e,t){function i(e,t){var i,r=null;try{i=JSON.parse(e,t)}catch(s){r=s}return[r,i]}e.exports=i},"8df4":function(e,t,i){"use strict";var r=i("7a77");function s(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var i=this;e((function(e){i.reason||(i.reason=new r(e),t(i.reason))}))}s.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},s.source=function(){var e,t=new s((function(t){e=t}));return{token:t,cancel:e}},e.exports=s},"8ea1":function(e,t,i){"use strict";var r="object"==typeof document&&document.all,s="undefined"==typeof r&&void 0!==r;e.exports={all:r,IS_HTMLDDA:s}},"8ee5":function(e,t,i){"use strict";var r=i("8b8a"),s=i.n(r);s.a},"90e3":function(e,t,i){"use strict";var r=i("e330"),s=0,n=Math.random(),a=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++s+n,36)}},9112:function(e,t,i){"use strict";var r=i("83ab"),s=i("9bf2"),n=i("5c6c");e.exports=r?function(e,t,i){return s.f(e,t,n(1,i))}:function(e,t,i){return e[t]=i,e}},9152:function(e,t){
10
10
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
11
11
  t.read=function(e,t,i,r,s){var n,a,o=8*s-r-1,l=(1<<o)-1,d=l>>1,u=-7,c=i?s-1:0,h=i?-1:1,p=e[t+c];for(c+=h,n=p&(1<<-u)-1,p>>=-u,u+=o;u>0;n=256*n+e[t+c],c+=h,u-=8);for(a=n&(1<<-u)-1,n>>=-u,u+=r;u>0;a=256*a+e[t+c],c+=h,u-=8);if(0===n)n=1-d;else{if(n===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),n-=d}return(p?-1:1)*a*Math.pow(2,n-r)},t.write=function(e,t,i,r,s,n){var a,o,l,d=8*n-s-1,u=(1<<d)-1,c=u>>1,h=23===s?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:n-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,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),t+=a+c>=1?h/l:h*Math.pow(2,1-c),t*l>=2&&(a++,l/=2),a+c>=u?(o=0,a=u):a+c>=1?(o=(t*l-1)*Math.pow(2,s),a+=c):(o=t*Math.pow(2,c-1)*Math.pow(2,s),a=0));s>=8;e[i+p]=255&o,p+=f,o/=256,s-=8);for(a=a<<s|o,d+=s;d>0;e[i+p]=255&a,p+=f,a/=256,d-=8);e[i+p-f]|=128*m}},"94ca":function(e,t,i){"use strict";var r=i("d039"),s=i("1626"),n=/#|\.prototype\./,a=function(e,t){var i=l[o(e)];return i==u||i!=d&&(s(t)?r(t):!!t)},o=a.normalize=function(e){return String(e).replace(n,".").toLowerCase()},l=a.data={},d=a.NATIVE="N",u=a.POLYFILL="P";e.exports=a},"9bf2":function(e,t,i){"use strict";var r=i("83ab"),s=i("0cfb"),n=i("aed9"),a=i("825a"),o=i("a04b"),l=TypeError,d=Object.defineProperty,u=Object.getOwnPropertyDescriptor,c="enumerable",h="configurable",p="writable";t.f=r?n?function(e,t,i){if(a(e),t=o(t),a(i),"function"===typeof e&&"prototype"===t&&"value"in i&&p in i&&!i[p]){var r=u(e,t);r&&r[p]&&(e[t]=i.value,i={configurable:h in i?i[h]:r[h],enumerable:c in i?i[c]:r[c],writable:!1})}return d(e,t,i)}:d:function(e,t,i){if(a(e),t=o(t),a(i),s)try{return d(e,t,i)}catch(r){}if("get"in i||"set"in i)throw l("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},a04b:function(e,t,i){"use strict";var r=i("c04e"),s=i("d9b5");e.exports=function(e){var t=r(e,"string");return s(t)?t:t+""}},a559:function(e,t){function i(){return e.exports=i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},e.exports.__esModule=!0,e.exports["default"]=e.exports,i.apply(this,arguments)}e.exports=i,e.exports.__esModule=!0,e.exports["default"]=e.exports},a5ab:function(e,t,i){},a640:function(e,t,i){"use strict";var r=i("d039");e.exports=function(e,t){var i=[][e];return!!i&&r((function(){i.call(null,t||function(){return 1},1)}))}},a7a3:function(e,t,i){},a968:function(e,t){var i=Math.pow(2,32),r=function(e){var t,r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.getBigUint64?(t=r.getBigUint64(0),t<Number.MAX_SAFE_INTEGER?Number(t):t):r.getUint32(0)*i+r.getUint32(4)};e.exports={getUint64:r,MAX_UINT32:i}},ae5c:function(e,t,i){"use strict";var r=i("17aa"),s=i.n(r);s.a},aed9:function(e,t,i){"use strict";var r=i("83ab"),s=i("d039");e.exports=r&&s((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},b03c:function(e,t){var i="auto",r={"":1,lr:1,rl:1},s={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function n(e){if("string"!==typeof e)return!1;var t=r[e.toLowerCase()];return!!t&&e.toLowerCase()}function a(e){if("string"!==typeof e)return!1;var t=s[e.toLowerCase()];return!!t&&e.toLowerCase()}function o(e,t,r){this.hasBeenReset=!1;var s="",o=!1,l=e,d=t,u=r,c=null,h="",p=!0,f="auto",m="start",g="auto",y="auto",v=100,b="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=""+e}},pauseOnExit:{enumerable:!0,get:function(){return o},set:function(e){o=!!e}},startTime:{enumerable:!0,get:function(){return l},set:function(e){if("number"!==typeof e)throw new TypeError("Start time must be set to a number.");l=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return d},set:function(e){if("number"!==typeof e)throw new TypeError("End time must be set to a number.");d=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return u},set:function(e){u=""+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 h},set:function(e){var t=n(e);if(!1===t)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");h=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return p},set:function(e){p=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return f},set:function(e){if("number"!==typeof e&&e!==i)throw new SyntaxError("Line: an invalid number or illegal string was specified.");f=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=a(e);t?(m=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");g=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return y},set:function(e){var t=a(e);t?(y=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");v=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return b},set:function(e){var t=a(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");b=t,this.hasBeenReset=!0}}}),this.displayState=void 0}o.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=o},b074:function(e,t,i){var r=i("89a7"),s=i("e1c8"),n=i("b30f"),a=i("e003"),o=s.DOMImplementation,l=r.NAMESPACE,d=a.ParseError,u=a.XMLReader;function c(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function h(e){this.options=e||{locator:{}}}function p(e,t,i){if(!e){if(t instanceof f)return t;e=t}var r={},s=e instanceof Function;function n(t){var n=e[t];!n&&s&&(n=2==e.length?function(i){e(t,i)}:e),r[t]=n&&function(e){n("[xmldom "+t+"]\t"+e+g(i))}||function(){}}return i=i||{},n("warning"),n("error"),n("fatalError"),r}function f(){this.cdata=!1}function m(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function g(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function y(e,t,i){return"string"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+"":e}function v(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}h.prototype.parseFromString=function(e,t){var i=this.options,r=new u,s=i.domBuilder||new f,a=i.errorHandler,o=i.locator,d=i.xmlns||{},h=/\/x?html?$/.test(t),m=h?n.HTML_ENTITIES:n.XML_ENTITIES;o&&s.setDocumentLocator(o),r.errorHandler=p(a,s,o),r.domBuilder=i.domBuilder||s,h&&(d[""]=l.HTML),d.xml=d.xml||l.XML;var g=i.normalizeLineEndings||c;return e&&"string"===typeof e?r.parse(g(e),d,m):r.errorHandler.error("invalid doc source"),s.doc},f.prototype={startDocument:function(){this.doc=(new o).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,r){var s=this.doc,n=s.createElementNS(e,i||t),a=r.length;v(this,n),this.currentElement=n,this.locator&&m(this.locator,n);for(var o=0;o<a;o++){e=r.getURI(o);var l=r.getValue(o),d=(i=r.getQName(o),s.createAttributeNS(e,i));this.locator&&m(r.getLocator(o),d),d.value=d.nodeValue=l,n.setAttributeNode(d)}},endElement:function(e,t,i){var r=this.currentElement;r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&m(this.locator,i),v(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=y.apply(this,arguments),e){if(this.cdata)var r=this.doc.createCDATASection(e);else r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&m(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=y.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&m(this.locator,r),v(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var r=this.doc.implementation;if(r&&r.createDocumentType){var s=r.createDocumentType(e,t,i);this.locator&&m(this.locator,s),v(this,s),this.doc.doctype=s}},warning:function(e){console.warn("[xmldom warning]\t"+e,g(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,g(this.locator))},fatalError:function(e){throw new d(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){f.prototype[e]=function(){return null}})),t.__DOMHandler=f,t.normalizeLineEndings=c,t.DOMParser=h},b30f:function(e,t,i){"use strict";var r=i("89a7").freeze;t.XML_ENTITIES=r({amp:"&",apos:"'",gt:">",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},b42e:function(e,t,i){"use strict";var r=Math.ceil,s=Math.floor;e.exports=Math.trunc||function(e){var t=+e;return(t>0?s:r)(t)}},b50d:function(e,t,i){"use strict";var r=i("c532"),s=i("467f"),n=i("7aac"),a=i("30b5"),o=i("83b9"),l=i("c345"),d=i("3934"),u=i("2d83");e.exports=function(e){return new Promise((function(t,i){var c=e.data,h=e.headers;r.isFormData(c)&&delete h["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var f=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";h.Authorization="Basic "+btoa(f+":"+m)}var g=o(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 r="getAllResponseHeaders"in p?l(p.getAllResponseHeaders()):null,n=e.responseType&&"text"!==e.responseType?p.response:p.responseText,a={data:n,status:p.status,statusText:p.statusText,headers:r,config:e,request:p};s(t,i,a),p=null}},p.onabort=function(){p&&(i(u("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){i(u("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),i(u(t,e,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var y=(e.withCredentials||d(g))&&e.xsrfCookieName?n.read(e.xsrfCookieName):void 0;y&&(h[e.xsrfHeaderName]=y)}if("setRequestHeader"in p&&r.forEach(h,(function(e,t){"undefined"===typeof c&&"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(v){if("json"!==e.responseType)throw v}"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(),i(e),p=null)})),c||(c=null),p.send(c)}))}},b622:function(e,t,i){"use strict";var r=i("da84"),s=i("5692"),n=i("1a2d"),a=i("90e3"),o=i("04f8"),l=i("fdbf"),d=r.Symbol,u=s("wks"),c=l?d["for"]||d:d&&d.withoutSetter||a;e.exports=function(e){return n(u,e)||(u[e]=o&&n(d,e)?d[e]:c("Symbol."+e)),u[e]}},b639:function(e,t,i){"use strict";(function(e){
12
12
  /*!
@@ -15,16 +15,16 @@ t.read=function(e,t,i,r,s){var n,a,o=8*s-r-1,l=(1<<o)-1,d=l>>1,u=-7,c=i?s-1:0,h=
15
15
  * @author Feross Aboukhadijeh <http://feross.org>
16
16
  * @license MIT
17
17
  */
18
- var r=i("1fb5"),s=i("9152"),n=i("e3db");function a(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"===typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function o(){return d.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return d.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=d.prototype):(null===e&&(e=new d(t)),e.length=t),e}function d(e,t,i){if(!d.TYPED_ARRAY_SUPPORT&&!(this instanceof d))return new d(e,t,i);if("number"===typeof e){if("string"===typeof t)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return u(this,e,t,i)}function u(e,t,i,r){if("number"===typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer?g(e,t,i,r):"string"===typeof t?f(e,t,i):y(e,t)}function c(e){if("number"!==typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function h(e,t,i,r){return c(t),t<=0?l(e,t):void 0!==i?"string"===typeof r?l(e,t).fill(i,r):l(e,t).fill(i):l(e,t)}function p(e,t){if(c(t),e=l(e,t<0?0:0|v(t)),!d.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function f(e,t,i){if("string"===typeof i&&""!==i||(i="utf8"),!d.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var r=0|_(t,i);e=l(e,r);var s=e.write(t,i);return s!==r&&(e=e.slice(0,s)),e}function m(e,t){var i=t.length<0?0:0|v(t.length);e=l(e,i);for(var r=0;r<i;r+=1)e[r]=255&t[r];return e}function g(e,t,i,r){if(t.byteLength,i<0||t.byteLength<i)throw new RangeError("'offset' is out of bounds");if(t.byteLength<i+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===i&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,i):new Uint8Array(t,i,r),d.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=d.prototype):e=m(e,t),e}function y(e,t){if(d.isBuffer(t)){var i=0|v(t.length);return e=l(e,i),0===e.length?e:(t.copy(e,0,0,i),e)}if(t){if("undefined"!==typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!==typeof t.length||te(t.length)?l(e,0):m(e,t);if("Buffer"===t.type&&n(t.data))return m(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function v(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function b(e){return+e!=e&&(e=0),d.alloc(+e)}function _(e,t){if(d.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 i=e.length;if(0===i)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return Z(e).length;default:if(r)return K(e).length;t=(""+t).toLowerCase(),r=!0}}function T(e,t,i){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if(i>>>=0,t>>>=0,i<=t)return"";e||(e="utf8");while(1)switch(e){case"hex":return U(this,t,i);case"utf8":case"utf-8":return L(this,t,i);case"ascii":return N(this,t,i);case"latin1":case"binary":return R(this,t,i);case"base64":return P(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,i);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function S(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function w(e,t,i,r,s){if(0===e.length)return-1;if("string"===typeof i?(r=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=s?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(s)return-1;i=e.length-1}else if(i<0){if(!s)return-1;i=0}if("string"===typeof t&&(t=d.from(t,r)),d.isBuffer(t))return 0===t.length?-1:E(e,t,i,r,s);if("number"===typeof t)return t&=255,d.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):E(e,[t],i,r,s);throw new TypeError("val must be string, number or Buffer")}function E(e,t,i,r,s){var n,a=1,o=e.length,l=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,o/=2,l/=2,i/=2}function d(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(s){var u=-1;for(n=i;n<o;n++)if(d(e,n)===d(t,-1===u?0:n-u)){if(-1===u&&(u=n),n-u+1===l)return u*a}else-1!==u&&(n-=n-u),u=-1}else for(i+l>o&&(i=o-l),n=i;n>=0;n--){for(var c=!0,h=0;h<l;h++)if(d(e,n+h)!==d(t,h)){c=!1;break}if(c)return n}return-1}function C(e,t,i,r){i=Number(i)||0;var s=e.length-i;r?(r=Number(r),r>s&&(r=s)):r=s;var n=t.length;if(n%2!==0)throw new TypeError("Invalid hex string");r>n/2&&(r=n/2);for(var a=0;a<r;++a){var o=parseInt(t.substr(2*a,2),16);if(isNaN(o))return a;e[i+a]=o}return a}function x(e,t,i,r){return ee(K(t,e.length-i),e,i,r)}function k(e,t,i,r){return ee(J(t),e,i,r)}function I(e,t,i,r){return k(e,t,i,r)}function A(e,t,i,r){return ee(Z(t),e,i,r)}function O(e,t,i,r){return ee(Q(t,e.length-i),e,i,r)}function P(e,t,i){return 0===t&&i===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,i))}function L(e,t,i){i=Math.min(e.length,i);var r=[],s=t;while(s<i){var n,a,o,l,d=e[s],u=null,c=d>239?4:d>223?3:d>191?2:1;if(s+c<=i)switch(c){case 1:d<128&&(u=d);break;case 2:n=e[s+1],128===(192&n)&&(l=(31&d)<<6|63&n,l>127&&(u=l));break;case 3:n=e[s+1],a=e[s+2],128===(192&n)&&128===(192&a)&&(l=(15&d)<<12|(63&n)<<6|63&a,l>2047&&(l<55296||l>57343)&&(u=l));break;case 4:n=e[s+1],a=e[s+2],o=e[s+3],128===(192&n)&&128===(192&a)&&128===(192&o)&&(l=(15&d)<<18|(63&n)<<12|(63&a)<<6|63&o,l>65535&&l<1114112&&(u=l))}null===u?(u=65533,c=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),s+=c}return M(r)}t.Buffer=d,t.SlowBuffer=b,t.INSPECT_MAX_BYTES=50,d.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:a(),t.kMaxLength=o(),d.poolSize=8192,d._augment=function(e){return e.__proto__=d.prototype,e},d.from=function(e,t,i){return u(null,e,t,i)},d.TYPED_ARRAY_SUPPORT&&(d.prototype.__proto__=Uint8Array.prototype,d.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&d[Symbol.species]===d&&Object.defineProperty(d,Symbol.species,{value:null,configurable:!0})),d.alloc=function(e,t,i){return h(null,e,t,i)},d.allocUnsafe=function(e){return p(null,e)},d.allocUnsafeSlow=function(e){return p(null,e)},d.isBuffer=function(e){return!(null==e||!e._isBuffer)},d.compare=function(e,t){if(!d.isBuffer(e)||!d.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,r=t.length,s=0,n=Math.min(i,r);s<n;++s)if(e[s]!==t[s]){i=e[s],r=t[s];break}return i<r?-1:r<i?1:0},d.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},d.concat=function(e,t){if(!n(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return d.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var r=d.allocUnsafe(t),s=0;for(i=0;i<e.length;++i){var a=e[i];if(!d.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,s),s+=a.length}return r},d.byteLength=_,d.prototype._isBuffer=!0,d.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)S(this,t,t+1);return this},d.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)S(this,t,t+3),S(this,t+1,t+2);return this},d.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)S(this,t,t+7),S(this,t+1,t+6),S(this,t+2,t+5),S(this,t+3,t+4);return this},d.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?L(this,0,e):T.apply(this,arguments)},d.prototype.equals=function(e){if(!d.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===d.compare(this,e)},d.prototype.inspect=function(){var e="",i=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(e+=" ... ")),"<Buffer "+e+">"},d.prototype.compare=function(e,t,i,r,s){if(!d.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===r&&(r=0),void 0===s&&(s=this.length),t<0||i>e.length||r<0||s>this.length)throw new RangeError("out of range index");if(r>=s&&t>=i)return 0;if(r>=s)return-1;if(t>=i)return 1;if(t>>>=0,i>>>=0,r>>>=0,s>>>=0,this===e)return 0;for(var n=s-r,a=i-t,o=Math.min(n,a),l=this.slice(r,s),u=e.slice(t,i),c=0;c<o;++c)if(l[c]!==u[c]){n=l[c],a=u[c];break}return n<a?-1:a<n?1:0},d.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},d.prototype.indexOf=function(e,t,i){return w(this,e,t,i,!0)},d.prototype.lastIndexOf=function(e,t,i){return w(this,e,t,i,!1)},d.prototype.write=function(e,t,i,r){if(void 0===t)r="utf8",i=this.length,t=0;else if(void 0===i&&"string"===typeof t)r=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(i)?(i|=0,void 0===r&&(r="utf8")):(r=i,i=void 0)}var s=this.length-t;if((void 0===i||i>s)&&(i=s),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var n=!1;;)switch(r){case"hex":return C(this,e,t,i);case"utf8":case"utf-8":return x(this,e,t,i);case"ascii":return k(this,e,t,i);case"latin1":case"binary":return I(this,e,t,i);case"base64":return A(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,i);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),n=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var D=4096;function M(e){var t=e.length;if(t<=D)return String.fromCharCode.apply(String,e);var i="",r=0;while(r<t)i+=String.fromCharCode.apply(String,e.slice(r,r+=D));return i}function N(e,t,i){var r="";i=Math.min(e.length,i);for(var s=t;s<i;++s)r+=String.fromCharCode(127&e[s]);return r}function R(e,t,i){var r="";i=Math.min(e.length,i);for(var s=t;s<i;++s)r+=String.fromCharCode(e[s]);return r}function U(e,t,i){var r=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>r)&&(i=r);for(var s="",n=t;n<i;++n)s+=Y(e[n]);return s}function B(e,t,i){for(var r=e.slice(t,i),s="",n=0;n<r.length;n+=2)s+=String.fromCharCode(r[n]+256*r[n+1]);return s}function j(e,t,i){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function F(e,t,i,r,s,n){if(!d.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<n)throw new RangeError('"value" argument is out of bounds');if(i+r>e.length)throw new RangeError("Index out of range")}function q(e,t,i,r){t<0&&(t=65535+t+1);for(var s=0,n=Math.min(e.length-i,2);s<n;++s)e[i+s]=(t&255<<8*(r?s:1-s))>>>8*(r?s:1-s)}function $(e,t,i,r){t<0&&(t=4294967295+t+1);for(var s=0,n=Math.min(e.length-i,4);s<n;++s)e[i+s]=t>>>8*(r?s:3-s)&255}function H(e,t,i,r,s,n){if(i+r>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function z(e,t,i,r,n){return n||H(e,t,i,4,34028234663852886e22,-34028234663852886e22),s.write(e,t,i,r,23,4),i+4}function V(e,t,i,r,n){return n||H(e,t,i,8,17976931348623157e292,-17976931348623157e292),s.write(e,t,i,r,52,8),i+8}d.prototype.slice=function(e,t){var i,r=this.length;if(e=~~e,t=void 0===t?r:~~t,e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),t<e&&(t=e),d.TYPED_ARRAY_SUPPORT)i=this.subarray(e,t),i.__proto__=d.prototype;else{var s=t-e;i=new d(s,void 0);for(var n=0;n<s;++n)i[n]=this[n+e]}return i},d.prototype.readUIntLE=function(e,t,i){e|=0,t|=0,i||j(e,t,this.length);var r=this[e],s=1,n=0;while(++n<t&&(s*=256))r+=this[e+n]*s;return r},d.prototype.readUIntBE=function(e,t,i){e|=0,t|=0,i||j(e,t,this.length);var r=this[e+--t],s=1;while(t>0&&(s*=256))r+=this[e+--t]*s;return r},d.prototype.readUInt8=function(e,t){return t||j(e,1,this.length),this[e]},d.prototype.readUInt16LE=function(e,t){return t||j(e,2,this.length),this[e]|this[e+1]<<8},d.prototype.readUInt16BE=function(e,t){return t||j(e,2,this.length),this[e]<<8|this[e+1]},d.prototype.readUInt32LE=function(e,t){return t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},d.prototype.readUInt32BE=function(e,t){return t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},d.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||j(e,t,this.length);var r=this[e],s=1,n=0;while(++n<t&&(s*=256))r+=this[e+n]*s;return s*=128,r>=s&&(r-=Math.pow(2,8*t)),r},d.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||j(e,t,this.length);var r=t,s=1,n=this[e+--r];while(r>0&&(s*=256))n+=this[e+--r]*s;return s*=128,n>=s&&(n-=Math.pow(2,8*t)),n},d.prototype.readInt8=function(e,t){return t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},d.prototype.readInt16LE=function(e,t){t||j(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},d.prototype.readInt16BE=function(e,t){t||j(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},d.prototype.readInt32LE=function(e,t){return t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},d.prototype.readInt32BE=function(e,t){return t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},d.prototype.readFloatLE=function(e,t){return t||j(e,4,this.length),s.read(this,e,!0,23,4)},d.prototype.readFloatBE=function(e,t){return t||j(e,4,this.length),s.read(this,e,!1,23,4)},d.prototype.readDoubleLE=function(e,t){return t||j(e,8,this.length),s.read(this,e,!0,52,8)},d.prototype.readDoubleBE=function(e,t){return t||j(e,8,this.length),s.read(this,e,!1,52,8)},d.prototype.writeUIntLE=function(e,t,i,r){if(e=+e,t|=0,i|=0,!r){var s=Math.pow(2,8*i)-1;F(this,e,t,i,s,0)}var n=1,a=0;this[t]=255&e;while(++a<i&&(n*=256))this[t+a]=e/n&255;return t+i},d.prototype.writeUIntBE=function(e,t,i,r){if(e=+e,t|=0,i|=0,!r){var s=Math.pow(2,8*i)-1;F(this,e,t,i,s,0)}var n=i-1,a=1;this[t+n]=255&e;while(--n>=0&&(a*=256))this[t+n]=e/a&255;return t+i},d.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,1,255,0),d.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},d.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,2,65535,0),d.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):q(this,e,t,!0),t+2},d.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,2,65535,0),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):q(this,e,t,!1),t+2},d.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):$(this,e,t,!0),t+4},d.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):$(this,e,t,!1),t+4},d.prototype.writeIntLE=function(e,t,i,r){if(e=+e,t|=0,!r){var s=Math.pow(2,8*i-1);F(this,e,t,i,s-1,-s)}var n=0,a=1,o=0;this[t]=255&e;while(++n<i&&(a*=256))e<0&&0===o&&0!==this[t+n-1]&&(o=1),this[t+n]=(e/a>>0)-o&255;return t+i},d.prototype.writeIntBE=function(e,t,i,r){if(e=+e,t|=0,!r){var s=Math.pow(2,8*i-1);F(this,e,t,i,s-1,-s)}var n=i-1,a=1,o=0;this[t+n]=255&e;while(--n>=0&&(a*=256))e<0&&0===o&&0!==this[t+n+1]&&(o=1),this[t+n]=(e/a>>0)-o&255;return t+i},d.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,1,127,-128),d.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},d.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):q(this,e,t,!0),t+2},d.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):q(this,e,t,!1),t+2},d.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,4,2147483647,-2147483648),d.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):$(this,e,t,!0),t+4},d.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):$(this,e,t,!1),t+4},d.prototype.writeFloatLE=function(e,t,i){return z(this,e,t,!0,i)},d.prototype.writeFloatBE=function(e,t,i){return z(this,e,t,!1,i)},d.prototype.writeDoubleLE=function(e,t,i){return V(this,e,t,!0,i)},d.prototype.writeDoubleBE=function(e,t,i){return V(this,e,t,!1,i)},d.prototype.copy=function(e,t,i,r){if(i||(i=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<i&&(r=i),r===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=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<r-i&&(r=e.length-t+i);var s,n=r-i;if(this===e&&i<t&&t<r)for(s=n-1;s>=0;--s)e[s+t]=this[s+i];else if(n<1e3||!d.TYPED_ARRAY_SUPPORT)for(s=0;s<n;++s)e[s+t]=this[s+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+n),t);return n},d.prototype.fill=function(e,t,i,r){if("string"===typeof e){if("string"===typeof t?(r=t,t=0,i=this.length):"string"===typeof i&&(r=i,i=this.length),1===e.length){var s=e.charCodeAt(0);s<256&&(e=s)}if(void 0!==r&&"string"!==typeof r)throw new TypeError("encoding must be a string");if("string"===typeof r&&!d.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"===typeof e&&(e&=255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var n;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"===typeof e)for(n=t;n<i;++n)this[n]=e;else{var a=d.isBuffer(e)?e:K(new d(e,r).toString()),o=a.length;for(n=0;n<i-t;++n)this[n+t]=a[n%o]}return this};var G=/[^+\/0-9A-Za-z-_]/g;function W(e){if(e=X(e).replace(G,""),e.length<2)return"";while(e.length%4!==0)e+="=";return e}function X(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Y(e){return e<16?"0"+e.toString(16):e.toString(16)}function K(e,t){var i;t=t||1/0;for(var r=e.length,s=null,n=[],a=0;a<r;++a){if(i=e.charCodeAt(a),i>55295&&i<57344){if(!s){if(i>56319){(t-=3)>-1&&n.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&n.push(239,191,189);continue}s=i;continue}if(i<56320){(t-=3)>-1&&n.push(239,191,189),s=i;continue}i=65536+(s-55296<<10|i-56320)}else s&&(t-=3)>-1&&n.push(239,191,189);if(s=null,i<128){if((t-=1)<0)break;n.push(i)}else if(i<2048){if((t-=2)<0)break;n.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;n.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;n.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return n}function J(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}function Q(e,t){for(var i,r,s,n=[],a=0;a<e.length;++a){if((t-=2)<0)break;i=e.charCodeAt(a),r=i>>8,s=i%256,n.push(s),n.push(r)}return n}function Z(e){return r.toByteArray(W(e))}function ee(e,t,i,r){for(var s=0;s<r;++s){if(s+i>=t.length||s>=e.length)break;t[s+i]=e[s]}return s}function te(e){return e!==e}}).call(this,i("24aa"))},bc3a:function(e,t,i){e.exports=i("cee4")},be09:function(e,t,i){(function(t){var i;i="undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},e.exports=i}).call(this,i("24aa"))},be35:function(e,t,i){},c04e:function(e,t,i){"use strict";var r=i("c65b"),s=i("861d"),n=i("d9b5"),a=i("dc4a"),o=i("485a"),l=i("b622"),d=TypeError,u=l("toPrimitive");e.exports=function(e,t){if(!s(e)||n(e))return e;var i,l=a(e,u);if(l){if(void 0===t&&(t="default"),i=r(l,e,t),!s(i)||n(i))return i;throw d("Can't convert object to primitive value")}return void 0===t&&(t="number"),o(e,t)}},c345:function(e,t,i){"use strict";var r=i("c532"),s=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,i,n,a={};return e?(r.forEach(e.split("\n"),(function(e){if(n=e.indexOf(":"),t=r.trim(e.substr(0,n)).toLowerCase(),i=r.trim(e.substr(n+1)),t){if(a[t]&&s.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([i]):a[t]?a[t]+", "+i:i}})),a):a}},c401:function(e,t,i){"use strict";var r=i("c532");e.exports=function(e,t,i){return r.forEach(i,(function(i){e=i(e,t)})),e}},c430:function(e,t,i){"use strict";e.exports=!1},c532:function(e,t,i){"use strict";var r=i("1d2b"),s=Object.prototype.toString;function n(e){return"[object Array]"===s.call(e)}function a(e){return"undefined"===typeof e}function o(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function l(e){return"[object ArrayBuffer]"===s.call(e)}function d(e){return"undefined"!==typeof FormData&&e instanceof FormData}function u(e){var t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer,t}function c(e){return"string"===typeof e}function h(e){return"number"===typeof e}function p(e){return null!==e&&"object"===typeof e}function f(e){if("[object Object]"!==s.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function m(e){return"[object Date]"===s.call(e)}function g(e){return"[object File]"===s.call(e)}function y(e){return"[object Blob]"===s.call(e)}function v(e){return"[object Function]"===s.call(e)}function b(e){return p(e)&&v(e.pipe)}function _(e){return"undefined"!==typeof URLSearchParams&&e instanceof URLSearchParams}function T(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function S(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}function w(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),n(e))for(var i=0,r=e.length;i<r;i++)t.call(null,e[i],i,e);else for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.call(null,e[s],s,e)}function E(){var e={};function t(t,i){f(e[i])&&f(t)?e[i]=E(e[i],t):f(t)?e[i]=E({},t):n(t)?e[i]=t.slice():e[i]=t}for(var i=0,r=arguments.length;i<r;i++)w(arguments[i],t);return e}function C(e,t,i){return w(t,(function(t,s){e[s]=i&&"function"===typeof t?r(t,i):t})),e}function x(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}e.exports={isArray:n,isArrayBuffer:l,isBuffer:o,isFormData:d,isArrayBufferView:u,isString:c,isNumber:h,isObject:p,isPlainObject:f,isUndefined:a,isDate:m,isFile:g,isBlob:y,isFunction:v,isStream:b,isURLSearchParams:_,isStandardBrowserEnv:S,forEach:w,merge:E,extend:C,trim:T,stripBOM:x}},c65b:function(e,t,i){"use strict";var r=i("40d5"),s=Function.prototype.call;e.exports=r?s.bind(s):function(){return s.apply(s,arguments)}},c6b6:function(e,t,i){"use strict";var r=i("e330"),s=r({}.toString),n=r("".slice);e.exports=function(e){return n(s(e),8,-1)}},c6cd:function(e,t,i){"use strict";var r=i("da84"),s=i("6374"),n="__core-js_shared__",a=r[n]||s(n,{});e.exports=a},c854:function(e,t,i){},c8af:function(e,t,i){"use strict";var r=i("c532");e.exports=function(e,t){r.forEach(e,(function(i,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=i,delete e[r])}))}},c8fa:function(e,t,i){},ca84:function(e,t,i){"use strict";var r=i("e330"),s=i("1a2d"),n=i("fc6a"),a=i("4d64").indexOf,o=i("d012"),l=r([].push);e.exports=function(e,t){var i,r=n(e),d=0,u=[];for(i in r)!s(o,i)&&s(r,i)&&l(u,i);while(t.length>d)s(r,i=t[d++])&&(~a(u,i)||l(u,i));return u}},cb2d:function(e,t,i){"use strict";var r=i("1626"),s=i("9bf2"),n=i("13d2"),a=i("6374");e.exports=function(e,t,i,o){o||(o={});var l=o.enumerable,d=void 0!==o.name?o.name:t;if(r(i)&&n(i,d,o),o.global)l?e[t]=i:a(t,i);else{try{o.unsafe?e[t]&&(l=!0):delete e[t]}catch(u){}l?e[t]=i:s.f(e,t,{value:i,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return e}},cc12:function(e,t,i){"use strict";var r=i("da84"),s=i("861d"),n=r.document,a=s(n)&&s(n.createElement);e.exports=function(e){return a?n.createElement(e):{}}},cdce:function(e,t,i){"use strict";var r=i("da84"),s=i("1626"),n=r.WeakMap;e.exports=s(n)&&/native code/.test(String(n))},cee4:function(e,t,i){"use strict";var r=i("c532"),s=i("1d2b"),n=i("0a06"),a=i("4a7b"),o=i("2444");function l(e){var t=new n(e),i=s(n.prototype.request,t);return r.extend(i,n.prototype,t),r.extend(i,t),i}var d=l(o);d.Axios=n,d.create=function(e){return l(a(d.defaults,e))},d.Cancel=i("7a77"),d.CancelToken=i("8df4"),d.isCancel=i("2e67"),d.all=function(e){return Promise.all(e)},d.spread=i("0df6"),d.isAxiosError=i("5f02"),e.exports=d,e.exports.default=d},d012:function(e,t,i){"use strict";e.exports={}},d02c:function(e,t,i){var r=i("ef34"),s=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function n(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function a(e){function t(e,t,i,r){return 3600*(0|e)+60*(0|t)+(0|i)+(0|r)/1e3}var i=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(":",""),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function o(){this.values=s(null)}function l(e,t,i,r){var s=r?e.split(r):[e];for(var n in s)if("string"===typeof s[n]){var a=s[n].split(i);if(2===a.length){var o=a[0].trim(),l=a[1].trim();t(o,l)}}}function d(e,t,i){var r=e;function s(){var t=a(e);if(null===t)throw new n(n.Errors.BadTimeStamp,"Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function d(e,t){var r=new o;l(e,(function(e,t){switch(e){case"region":for(var s=i.length-1;s>=0;s--)if(i[s].id===t){r.set(e,i[s].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var n=t.split(","),a=n[0];r.integer(e,a),r.percent(e,a)&&r.set("snapToLines",!1),r.alt(e,a,["auto"]),2===n.length&&r.alt("lineAlign",n[1],["start","center","end"]);break;case"position":n=t.split(","),r.percent(e,n[0]),2===n.length&&r.alt("positionAlign",n[1],["start","center","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","center","end","left","right"]);break}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");try{t.line=r.get("line","auto")}catch(s){}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(s){t.align=r.get("align","middle")}try{t.position=r.get("position","auto")}catch(s){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)}function u(){e=e.replace(/^\s+/,"")}if(u(),t.startTime=s(),u(),"--\x3e"!==e.substr(0,3))throw new n(n.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),u(),t.endTime=s(),u(),d(e,t)}n.prototype=s(Error.prototype),n.prototype.constructor=n,n.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,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var r=0;r<i.length;++r)if(t===i[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t),t>=0&&t<=100))&&(this.set(e,t),!0)}};var u=r.createElement&&r.createElement("textarea"),c={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 i(){if(!t)return null;function e(e){return t=t.substr(e.length),e}var i=t.match(/^([^<]*)(<[^>]*>?)?/);return e(i[1]?i[1]:i[2])}function r(e){return u.innerHTML=e,e=u.textContent,u.textContent="",e}function s(e,t){return!f[t.localName]||f[t.localName]===e.localName}function n(t,i){var r=c[t];if(!r)return null;var s=e.document.createElement(r),n=p[t];return n&&i&&(s[n]=i.trim()),s}var o,l=e.document.createElement("div"),d=l,m=[];while(null!==(o=i()))if("<"!==o[0])d.appendChild(e.document.createTextNode(r(o)));else{if("/"===o[1]){m.length&&m[m.length-1]===o.substr(2).replace(">","")&&(m.pop(),d=d.parentNode);continue}var g,y=a(o.substr(1,o.length-2));if(y){g=e.document.createProcessingInstruction("timestamp",y),d.appendChild(g);continue}var v=o.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!v)continue;if(g=n(v[1],v[3]),!g)continue;if(!s(d,g))continue;if(v[2]){var b=v[2].split(".");b.forEach((function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(h.hasOwnProperty(i)){var r=t?"background-color":"color",s=h[i];g.style[r]=s}})),g.className=b.join(" ")}m.push(v[1]),d.appendChild(g),d=g}return l}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<g.length;t++){var i=g[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function v(e){var t,i=[],r="";if(!e||!e.childNodes)return"ltr";function s(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function n(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\n|\r)/);return r?(e.length=0,r[0]):i}return"ruby"===t.tagName?n(e):t.childNodes?(s(e,t),n(e)):void 0}s(i,e);while(r=n(i))for(var a=0;a<r.length;a++)if(t=r.charCodeAt(a),y(t))return"rtl";return"ltr"}function b(e){if("number"===typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,r=0,s=0;s<i.length&&i[s]!==t;s++)"showing"===i[s].mode&&r++;return-1*++r}function _(){}function T(e,t,i){_.call(this),this.cue=t,this.cueDiv=m(e,t.text);var r={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(r,this.cueDiv),this.div=e.document.createElement("div"),r={direction:v(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(r),this.div.appendChild(this.cueDiv);var s=0;switch(t.positionAlign){case"start":s=t.position;break;case"center":s=t.position-t.size/2;break;case"end":s=t.position-t.size;break}""===t.vertical?this.applyStyles({left:this.formatStyle(s,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(s,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function S(e){var t,i,r,s;if(e.div){i=e.div.offsetHeight,r=e.div.offsetWidth,s=e.div.offsetTop;var n=(n=e.div.childNodes)&&(n=n[0])&&n.getClientRects&&n.getClientRects();e=e.div.getBoundingClientRect(),t=n?Math.max(n[0]&&n[0].height||0,e.height/n.length):0}this.left=e.left,this.right=e.right,this.top=e.top||s,this.height=e.height||i,this.bottom=e.bottom||s+(e.height||i),this.width=e.width||r,this.lineHeight=void 0!==t?t:e.lineHeight}function w(e,t,i,r){function s(e,t){for(var s,n=new S(e),a=1,o=0;o<t.length;o++){while(e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(r))e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(s=new S(e),a=l),e=new S(n)}return s||n}var n=new S(t),a=t.cue,o=b(a),l=[];if(a.snapToLines){var d;switch(a.vertical){case"":l=["+y","-y"],d="height";break;case"rl":l=["+x","-x"],d="width";break;case"lr":l=["-x","+x"],d="width";break}var u=n.lineHeight,c=u*Math.round(o),h=i[d]+u,p=l[0];Math.abs(c)>h&&(c=c<0?-1:1,c*=Math.ceil(h/u)*u),o<0&&(c+=""===a.vertical?i.height:i.width,l=l.reverse()),n.move(p,c)}else{var f=n.lineHeight/i.height*100;switch(a.lineAlign){case"center":o-=f/2;break;case"end":o-=f;break}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(o,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(o,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(o,"%")});break}l=["+y","-x","+x","-y"],n=new S(t)}var m=s(n,l);t.move(m.toCSSCompatValues(i))}function E(){}_.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},_.prototype.formatStyle=function(e,t){return 0===e?0:e+t},T.prototype=s(_.prototype),T.prototype.constructor=T,S.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;break}},S.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},S.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},S.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},S.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},S.prototype.intersectPercentage=function(e){var t=Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left)),i=Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top)),r=t*i;return r/(this.height*this.width)},S.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}},S.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e;var s={left:e.left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||i};return s},E.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!==typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},E.convertCueToDOMTree=function(e,t){return e&&t?m(e,t):null};var C=.05,x="sans-serif",k="1.5%";E.processCues=function(e,t,i){if(!e||!t||!i)return null;while(i.firstChild)i.removeChild(i.firstChild);var r=e.document.createElement("div");function s(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin=k,i.appendChild(r),s(t)){var n=[],a=S.getSimpleBoxPosition(r),o=Math.round(a.height*C*100)/100,l={font:o+"px "+x};(function(){for(var i,s,o=0;o<t.length;o++)s=t[o],i=new T(e,s,l),r.appendChild(i.div),w(e,i,a,n),s.displayState=i.div,n.push(S.getSimpleBoxPosition(i))})()}else for(var d=0;d<t.length;d++)r.appendChild(t[d].displayState)},E.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]},E.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof n))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){var e=t.buffer,i=0;while(i<e.length&&"\r"!==e[i]&&"\n"!==e[i])++i;var r=e.substr(0,i);return"\r"===e[i]&&++i,"\n"===e[i]&&++i,t.buffer=e.substr(i),r}function r(e){var i=new o;if(l(e,(function(e,t){switch(e){case"id":i.set(e,t);break;case"width":i.percent(e,t);break;case"lines":i.integer(e,t);break;case"regionanchor":case"viewportanchor":var r=t.split(",");if(2!==r.length)break;var s=new o;if(s.percent("x",r[0]),s.percent("y",r[1]),!s.has("x")||!s.has("y"))break;i.set(e+"X",s.get("x")),i.set(e+"Y",s.get("y"));break;case"scroll":i.alt(e,t,["up"]);break}}),/=/,/\s/),i.has("id")){var r=new(t.vttjs.VTTRegion||t.window.VTTRegion);r.width=i.get("width",100),r.lines=i.get("lines",3),r.regionAnchorX=i.get("regionanchorX",0),r.regionAnchorY=i.get("regionanchorY",100),r.viewportAnchorX=i.get("viewportanchorX",0),r.viewportAnchorY=i.get("viewportanchorY",100),r.scroll=i.get("scroll",""),t.onregion&&t.onregion(r),t.regionList.push({id:i.get("id"),region:r})}}function s(e){var i=new o;l(e,(function(e,t){switch(e){case"MPEGT":i.integer(e+"S",t);break;case"LOCA":i.set(e+"L",a(t));break}}),/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get("MPEGTS"),LOCAL:i.get("LOCAL")})}function u(e){e.match(/X-TIMESTAMP-MAP/)?l(e,(function(e,t){switch(e){case"X-TIMESTAMP-MAP":s(t);break}}),/=/):l(e,(function(e,t){switch(e){case"Region":r(t);break}}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var c;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;c=i();var h=c.match(/^WEBVTT([ \t].*)?$/);if(!h||!h[0])throw new n(n.Errors.BadSignature);t.state="HEADER"}var p=!1;while(t.buffer){if(!/\r\n|\n/.test(t.buffer))return this;switch(p?p=!1:c=i(),t.state){case"HEADER":/:/.test(c)?u(c):c||(t.state="ID");continue;case"NOTE":c||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(c)){t.state="NOTE";break}if(!c)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,"");try{t.cue.align="center"}catch(m){t.cue.align="middle"}if(t.state="CUE",-1===c.indexOf("--\x3e")){t.cue.id=c;continue}case"CUE":try{d(c,t.cue,t.regionList)}catch(m){t.reportOrThrowError(m),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var f=-1!==c.indexOf("--\x3e");if(!c||f&&(p=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=c.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":c||(t.state="ID");continue}}}catch(m){t.reportOrThrowError(m),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new n(n.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}},e.exports=E},d039:function(e,t,i){"use strict";e.exports=function(e){try{return!!e()}catch(t){return!0}}},d066:function(e,t,i){"use strict";var r=i("da84"),s=i("1626"),n=function(e){return s(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?n(r[e]):r[e]&&r[e][t]}},d136:function(e,t,i){(function(t){var i=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,r=/^(?=([^\/?#]*))\1([^]*)$/,s=/(?:\/|^)\.(?=\/)/g,n=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,a={buildAbsoluteURL:function(e,t,i){if(i=i||{},e=e.trim(),t=t.trim(),!t){if(!i.alwaysNormalize)return e;var s=a.parseURL(e);if(!s)throw new Error("Error trying to parse base URL.");return s.path=a.normalizePath(s.path),a.buildURLFromParts(s)}var n=a.parseURL(t);if(!n)throw new Error("Error trying to parse relative URL.");if(n.scheme)return i.alwaysNormalize?(n.path=a.normalizePath(n.path),a.buildURLFromParts(n)):t;var o=a.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=r.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var d={scheme:o.scheme,netLoc:n.netLoc,path:null,params:n.params,query:n.query,fragment:n.fragment};if(!n.netLoc&&(d.netLoc=o.netLoc,"/"!==n.path[0]))if(n.path){var u=o.path,c=u.substring(0,u.lastIndexOf("/")+1)+n.path;d.path=a.normalizePath(c)}else d.path=o.path,n.params||(d.params=o.params,n.query||(d.query=o.query));return null===d.path&&(d.path=i.alwaysNormalize?a.normalizePath(n.path):n.path),a.buildURLFromParts(d)},parseURL:function(e){var t=i.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){e=e.split("").reverse().join("").replace(s,"");while(e.length!==(e=e.replace(n,"")).length);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}};e.exports=a})()},d1e7:function(e,t,i){"use strict";var r={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,n=s&&!r.call({1:2},1);t.f=n?function(e){var t=s(this,e);return!!t&&t.enumerable}:r},d58f:function(e,t,i){"use strict";var r=i("59ed"),s=i("7b0b"),n=i("44ad"),a=i("07fa"),o=TypeError,l=function(e){return function(t,i,l,d){r(i);var u=s(t),c=n(u),h=a(u),p=e?h-1:0,f=e?-1:1;if(l<2)while(1){if(p in c){d=c[p],p+=f;break}if(p+=f,e?p<0:h<=p)throw o("Reduce of empty array with no initial value")}for(;e?p>=0:h>p;p+=f)p in c&&(d=i(d,c[p],p,u));return d}};e.exports={left:l(!1),right:l(!0)}},d749:function(e,t,i){"use strict";i.d(t,"a",(function(){return g}));var r=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,r=0;r<i;++r)t[r].call(this,arguments[1]);else for(var s=Array.prototype.slice.call(arguments,1),n=t.length,a=0;a<n;++a)t[a].apply(this,s)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}(),s=i("a559"),n=i.n(s),a=i("4e9a");
18
+ var r=i("1fb5"),s=i("9152"),n=i("e3db");function a(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"===typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function o(){return d.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return d.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=d.prototype):(null===e&&(e=new d(t)),e.length=t),e}function d(e,t,i){if(!d.TYPED_ARRAY_SUPPORT&&!(this instanceof d))return new d(e,t,i);if("number"===typeof e){if("string"===typeof t)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return u(this,e,t,i)}function u(e,t,i,r){if("number"===typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer?g(e,t,i,r):"string"===typeof t?f(e,t,i):y(e,t)}function c(e){if("number"!==typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function h(e,t,i,r){return c(t),t<=0?l(e,t):void 0!==i?"string"===typeof r?l(e,t).fill(i,r):l(e,t).fill(i):l(e,t)}function p(e,t){if(c(t),e=l(e,t<0?0:0|v(t)),!d.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function f(e,t,i){if("string"===typeof i&&""!==i||(i="utf8"),!d.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var r=0|_(t,i);e=l(e,r);var s=e.write(t,i);return s!==r&&(e=e.slice(0,s)),e}function m(e,t){var i=t.length<0?0:0|v(t.length);e=l(e,i);for(var r=0;r<i;r+=1)e[r]=255&t[r];return e}function g(e,t,i,r){if(t.byteLength,i<0||t.byteLength<i)throw new RangeError("'offset' is out of bounds");if(t.byteLength<i+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===i&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,i):new Uint8Array(t,i,r),d.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=d.prototype):e=m(e,t),e}function y(e,t){if(d.isBuffer(t)){var i=0|v(t.length);return e=l(e,i),0===e.length?e:(t.copy(e,0,0,i),e)}if(t){if("undefined"!==typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!==typeof t.length||te(t.length)?l(e,0):m(e,t);if("Buffer"===t.type&&n(t.data))return m(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function v(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function b(e){return+e!=e&&(e=0),d.alloc(+e)}function _(e,t){if(d.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 i=e.length;if(0===i)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return Z(e).length;default:if(r)return K(e).length;t=(""+t).toLowerCase(),r=!0}}function T(e,t,i){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if(i>>>=0,t>>>=0,i<=t)return"";e||(e="utf8");while(1)switch(e){case"hex":return U(this,t,i);case"utf8":case"utf-8":return L(this,t,i);case"ascii":return N(this,t,i);case"latin1":case"binary":return R(this,t,i);case"base64":return O(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,i);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function S(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function w(e,t,i,r,s){if(0===e.length)return-1;if("string"===typeof i?(r=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=s?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(s)return-1;i=e.length-1}else if(i<0){if(!s)return-1;i=0}if("string"===typeof t&&(t=d.from(t,r)),d.isBuffer(t))return 0===t.length?-1:E(e,t,i,r,s);if("number"===typeof t)return t&=255,d.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):E(e,[t],i,r,s);throw new TypeError("val must be string, number or Buffer")}function E(e,t,i,r,s){var n,a=1,o=e.length,l=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,o/=2,l/=2,i/=2}function d(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(s){var u=-1;for(n=i;n<o;n++)if(d(e,n)===d(t,-1===u?0:n-u)){if(-1===u&&(u=n),n-u+1===l)return u*a}else-1!==u&&(n-=n-u),u=-1}else for(i+l>o&&(i=o-l),n=i;n>=0;n--){for(var c=!0,h=0;h<l;h++)if(d(e,n+h)!==d(t,h)){c=!1;break}if(c)return n}return-1}function C(e,t,i,r){i=Number(i)||0;var s=e.length-i;r?(r=Number(r),r>s&&(r=s)):r=s;var n=t.length;if(n%2!==0)throw new TypeError("Invalid hex string");r>n/2&&(r=n/2);for(var a=0;a<r;++a){var o=parseInt(t.substr(2*a,2),16);if(isNaN(o))return a;e[i+a]=o}return a}function x(e,t,i,r){return ee(K(t,e.length-i),e,i,r)}function k(e,t,i,r){return ee(J(t),e,i,r)}function I(e,t,i,r){return k(e,t,i,r)}function A(e,t,i,r){return ee(Z(t),e,i,r)}function P(e,t,i,r){return ee(Q(t,e.length-i),e,i,r)}function O(e,t,i){return 0===t&&i===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,i))}function L(e,t,i){i=Math.min(e.length,i);var r=[],s=t;while(s<i){var n,a,o,l,d=e[s],u=null,c=d>239?4:d>223?3:d>191?2:1;if(s+c<=i)switch(c){case 1:d<128&&(u=d);break;case 2:n=e[s+1],128===(192&n)&&(l=(31&d)<<6|63&n,l>127&&(u=l));break;case 3:n=e[s+1],a=e[s+2],128===(192&n)&&128===(192&a)&&(l=(15&d)<<12|(63&n)<<6|63&a,l>2047&&(l<55296||l>57343)&&(u=l));break;case 4:n=e[s+1],a=e[s+2],o=e[s+3],128===(192&n)&&128===(192&a)&&128===(192&o)&&(l=(15&d)<<18|(63&n)<<12|(63&a)<<6|63&o,l>65535&&l<1114112&&(u=l))}null===u?(u=65533,c=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),s+=c}return M(r)}t.Buffer=d,t.SlowBuffer=b,t.INSPECT_MAX_BYTES=50,d.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:a(),t.kMaxLength=o(),d.poolSize=8192,d._augment=function(e){return e.__proto__=d.prototype,e},d.from=function(e,t,i){return u(null,e,t,i)},d.TYPED_ARRAY_SUPPORT&&(d.prototype.__proto__=Uint8Array.prototype,d.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&d[Symbol.species]===d&&Object.defineProperty(d,Symbol.species,{value:null,configurable:!0})),d.alloc=function(e,t,i){return h(null,e,t,i)},d.allocUnsafe=function(e){return p(null,e)},d.allocUnsafeSlow=function(e){return p(null,e)},d.isBuffer=function(e){return!(null==e||!e._isBuffer)},d.compare=function(e,t){if(!d.isBuffer(e)||!d.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,r=t.length,s=0,n=Math.min(i,r);s<n;++s)if(e[s]!==t[s]){i=e[s],r=t[s];break}return i<r?-1:r<i?1:0},d.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},d.concat=function(e,t){if(!n(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return d.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var r=d.allocUnsafe(t),s=0;for(i=0;i<e.length;++i){var a=e[i];if(!d.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,s),s+=a.length}return r},d.byteLength=_,d.prototype._isBuffer=!0,d.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)S(this,t,t+1);return this},d.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)S(this,t,t+3),S(this,t+1,t+2);return this},d.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)S(this,t,t+7),S(this,t+1,t+6),S(this,t+2,t+5),S(this,t+3,t+4);return this},d.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?L(this,0,e):T.apply(this,arguments)},d.prototype.equals=function(e){if(!d.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===d.compare(this,e)},d.prototype.inspect=function(){var e="",i=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(e+=" ... ")),"<Buffer "+e+">"},d.prototype.compare=function(e,t,i,r,s){if(!d.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===r&&(r=0),void 0===s&&(s=this.length),t<0||i>e.length||r<0||s>this.length)throw new RangeError("out of range index");if(r>=s&&t>=i)return 0;if(r>=s)return-1;if(t>=i)return 1;if(t>>>=0,i>>>=0,r>>>=0,s>>>=0,this===e)return 0;for(var n=s-r,a=i-t,o=Math.min(n,a),l=this.slice(r,s),u=e.slice(t,i),c=0;c<o;++c)if(l[c]!==u[c]){n=l[c],a=u[c];break}return n<a?-1:a<n?1:0},d.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},d.prototype.indexOf=function(e,t,i){return w(this,e,t,i,!0)},d.prototype.lastIndexOf=function(e,t,i){return w(this,e,t,i,!1)},d.prototype.write=function(e,t,i,r){if(void 0===t)r="utf8",i=this.length,t=0;else if(void 0===i&&"string"===typeof t)r=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(i)?(i|=0,void 0===r&&(r="utf8")):(r=i,i=void 0)}var s=this.length-t;if((void 0===i||i>s)&&(i=s),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var n=!1;;)switch(r){case"hex":return C(this,e,t,i);case"utf8":case"utf-8":return x(this,e,t,i);case"ascii":return k(this,e,t,i);case"latin1":case"binary":return I(this,e,t,i);case"base64":return A(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,t,i);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),n=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var D=4096;function M(e){var t=e.length;if(t<=D)return String.fromCharCode.apply(String,e);var i="",r=0;while(r<t)i+=String.fromCharCode.apply(String,e.slice(r,r+=D));return i}function N(e,t,i){var r="";i=Math.min(e.length,i);for(var s=t;s<i;++s)r+=String.fromCharCode(127&e[s]);return r}function R(e,t,i){var r="";i=Math.min(e.length,i);for(var s=t;s<i;++s)r+=String.fromCharCode(e[s]);return r}function U(e,t,i){var r=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>r)&&(i=r);for(var s="",n=t;n<i;++n)s+=Y(e[n]);return s}function B(e,t,i){for(var r=e.slice(t,i),s="",n=0;n<r.length;n+=2)s+=String.fromCharCode(r[n]+256*r[n+1]);return s}function j(e,t,i){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function F(e,t,i,r,s,n){if(!d.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<n)throw new RangeError('"value" argument is out of bounds');if(i+r>e.length)throw new RangeError("Index out of range")}function q(e,t,i,r){t<0&&(t=65535+t+1);for(var s=0,n=Math.min(e.length-i,2);s<n;++s)e[i+s]=(t&255<<8*(r?s:1-s))>>>8*(r?s:1-s)}function $(e,t,i,r){t<0&&(t=4294967295+t+1);for(var s=0,n=Math.min(e.length-i,4);s<n;++s)e[i+s]=t>>>8*(r?s:3-s)&255}function H(e,t,i,r,s,n){if(i+r>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function z(e,t,i,r,n){return n||H(e,t,i,4,34028234663852886e22,-34028234663852886e22),s.write(e,t,i,r,23,4),i+4}function V(e,t,i,r,n){return n||H(e,t,i,8,17976931348623157e292,-17976931348623157e292),s.write(e,t,i,r,52,8),i+8}d.prototype.slice=function(e,t){var i,r=this.length;if(e=~~e,t=void 0===t?r:~~t,e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),t<e&&(t=e),d.TYPED_ARRAY_SUPPORT)i=this.subarray(e,t),i.__proto__=d.prototype;else{var s=t-e;i=new d(s,void 0);for(var n=0;n<s;++n)i[n]=this[n+e]}return i},d.prototype.readUIntLE=function(e,t,i){e|=0,t|=0,i||j(e,t,this.length);var r=this[e],s=1,n=0;while(++n<t&&(s*=256))r+=this[e+n]*s;return r},d.prototype.readUIntBE=function(e,t,i){e|=0,t|=0,i||j(e,t,this.length);var r=this[e+--t],s=1;while(t>0&&(s*=256))r+=this[e+--t]*s;return r},d.prototype.readUInt8=function(e,t){return t||j(e,1,this.length),this[e]},d.prototype.readUInt16LE=function(e,t){return t||j(e,2,this.length),this[e]|this[e+1]<<8},d.prototype.readUInt16BE=function(e,t){return t||j(e,2,this.length),this[e]<<8|this[e+1]},d.prototype.readUInt32LE=function(e,t){return t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},d.prototype.readUInt32BE=function(e,t){return t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},d.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||j(e,t,this.length);var r=this[e],s=1,n=0;while(++n<t&&(s*=256))r+=this[e+n]*s;return s*=128,r>=s&&(r-=Math.pow(2,8*t)),r},d.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||j(e,t,this.length);var r=t,s=1,n=this[e+--r];while(r>0&&(s*=256))n+=this[e+--r]*s;return s*=128,n>=s&&(n-=Math.pow(2,8*t)),n},d.prototype.readInt8=function(e,t){return t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},d.prototype.readInt16LE=function(e,t){t||j(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},d.prototype.readInt16BE=function(e,t){t||j(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},d.prototype.readInt32LE=function(e,t){return t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},d.prototype.readInt32BE=function(e,t){return t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},d.prototype.readFloatLE=function(e,t){return t||j(e,4,this.length),s.read(this,e,!0,23,4)},d.prototype.readFloatBE=function(e,t){return t||j(e,4,this.length),s.read(this,e,!1,23,4)},d.prototype.readDoubleLE=function(e,t){return t||j(e,8,this.length),s.read(this,e,!0,52,8)},d.prototype.readDoubleBE=function(e,t){return t||j(e,8,this.length),s.read(this,e,!1,52,8)},d.prototype.writeUIntLE=function(e,t,i,r){if(e=+e,t|=0,i|=0,!r){var s=Math.pow(2,8*i)-1;F(this,e,t,i,s,0)}var n=1,a=0;this[t]=255&e;while(++a<i&&(n*=256))this[t+a]=e/n&255;return t+i},d.prototype.writeUIntBE=function(e,t,i,r){if(e=+e,t|=0,i|=0,!r){var s=Math.pow(2,8*i)-1;F(this,e,t,i,s,0)}var n=i-1,a=1;this[t+n]=255&e;while(--n>=0&&(a*=256))this[t+n]=e/a&255;return t+i},d.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,1,255,0),d.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},d.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,2,65535,0),d.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):q(this,e,t,!0),t+2},d.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,2,65535,0),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):q(this,e,t,!1),t+2},d.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):$(this,e,t,!0),t+4},d.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):$(this,e,t,!1),t+4},d.prototype.writeIntLE=function(e,t,i,r){if(e=+e,t|=0,!r){var s=Math.pow(2,8*i-1);F(this,e,t,i,s-1,-s)}var n=0,a=1,o=0;this[t]=255&e;while(++n<i&&(a*=256))e<0&&0===o&&0!==this[t+n-1]&&(o=1),this[t+n]=(e/a>>0)-o&255;return t+i},d.prototype.writeIntBE=function(e,t,i,r){if(e=+e,t|=0,!r){var s=Math.pow(2,8*i-1);F(this,e,t,i,s-1,-s)}var n=i-1,a=1,o=0;this[t+n]=255&e;while(--n>=0&&(a*=256))e<0&&0===o&&0!==this[t+n+1]&&(o=1),this[t+n]=(e/a>>0)-o&255;return t+i},d.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,1,127,-128),d.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},d.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):q(this,e,t,!0),t+2},d.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):q(this,e,t,!1),t+2},d.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,4,2147483647,-2147483648),d.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):$(this,e,t,!0),t+4},d.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):$(this,e,t,!1),t+4},d.prototype.writeFloatLE=function(e,t,i){return z(this,e,t,!0,i)},d.prototype.writeFloatBE=function(e,t,i){return z(this,e,t,!1,i)},d.prototype.writeDoubleLE=function(e,t,i){return V(this,e,t,!0,i)},d.prototype.writeDoubleBE=function(e,t,i){return V(this,e,t,!1,i)},d.prototype.copy=function(e,t,i,r){if(i||(i=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<i&&(r=i),r===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=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<r-i&&(r=e.length-t+i);var s,n=r-i;if(this===e&&i<t&&t<r)for(s=n-1;s>=0;--s)e[s+t]=this[s+i];else if(n<1e3||!d.TYPED_ARRAY_SUPPORT)for(s=0;s<n;++s)e[s+t]=this[s+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+n),t);return n},d.prototype.fill=function(e,t,i,r){if("string"===typeof e){if("string"===typeof t?(r=t,t=0,i=this.length):"string"===typeof i&&(r=i,i=this.length),1===e.length){var s=e.charCodeAt(0);s<256&&(e=s)}if(void 0!==r&&"string"!==typeof r)throw new TypeError("encoding must be a string");if("string"===typeof r&&!d.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"===typeof e&&(e&=255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var n;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"===typeof e)for(n=t;n<i;++n)this[n]=e;else{var a=d.isBuffer(e)?e:K(new d(e,r).toString()),o=a.length;for(n=0;n<i-t;++n)this[n+t]=a[n%o]}return this};var G=/[^+\/0-9A-Za-z-_]/g;function W(e){if(e=X(e).replace(G,""),e.length<2)return"";while(e.length%4!==0)e+="=";return e}function X(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Y(e){return e<16?"0"+e.toString(16):e.toString(16)}function K(e,t){var i;t=t||1/0;for(var r=e.length,s=null,n=[],a=0;a<r;++a){if(i=e.charCodeAt(a),i>55295&&i<57344){if(!s){if(i>56319){(t-=3)>-1&&n.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&n.push(239,191,189);continue}s=i;continue}if(i<56320){(t-=3)>-1&&n.push(239,191,189),s=i;continue}i=65536+(s-55296<<10|i-56320)}else s&&(t-=3)>-1&&n.push(239,191,189);if(s=null,i<128){if((t-=1)<0)break;n.push(i)}else if(i<2048){if((t-=2)<0)break;n.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;n.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;n.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return n}function J(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}function Q(e,t){for(var i,r,s,n=[],a=0;a<e.length;++a){if((t-=2)<0)break;i=e.charCodeAt(a),r=i>>8,s=i%256,n.push(s),n.push(r)}return n}function Z(e){return r.toByteArray(W(e))}function ee(e,t,i,r){for(var s=0;s<r;++s){if(s+i>=t.length||s>=e.length)break;t[s+i]=e[s]}return s}function te(e){return e!==e}}).call(this,i("24aa"))},bc3a:function(e,t,i){e.exports=i("cee4")},be09:function(e,t,i){(function(t){var i;i="undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},e.exports=i}).call(this,i("24aa"))},be35:function(e,t,i){},c04e:function(e,t,i){"use strict";var r=i("c65b"),s=i("861d"),n=i("d9b5"),a=i("dc4a"),o=i("485a"),l=i("b622"),d=TypeError,u=l("toPrimitive");e.exports=function(e,t){if(!s(e)||n(e))return e;var i,l=a(e,u);if(l){if(void 0===t&&(t="default"),i=r(l,e,t),!s(i)||n(i))return i;throw d("Can't convert object to primitive value")}return void 0===t&&(t="number"),o(e,t)}},c345:function(e,t,i){"use strict";var r=i("c532"),s=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,i,n,a={};return e?(r.forEach(e.split("\n"),(function(e){if(n=e.indexOf(":"),t=r.trim(e.substr(0,n)).toLowerCase(),i=r.trim(e.substr(n+1)),t){if(a[t]&&s.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([i]):a[t]?a[t]+", "+i:i}})),a):a}},c401:function(e,t,i){"use strict";var r=i("c532");e.exports=function(e,t,i){return r.forEach(i,(function(i){e=i(e,t)})),e}},c430:function(e,t,i){"use strict";e.exports=!1},c532:function(e,t,i){"use strict";var r=i("1d2b"),s=Object.prototype.toString;function n(e){return"[object Array]"===s.call(e)}function a(e){return"undefined"===typeof e}function o(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function l(e){return"[object ArrayBuffer]"===s.call(e)}function d(e){return"undefined"!==typeof FormData&&e instanceof FormData}function u(e){var t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer,t}function c(e){return"string"===typeof e}function h(e){return"number"===typeof e}function p(e){return null!==e&&"object"===typeof e}function f(e){if("[object Object]"!==s.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function m(e){return"[object Date]"===s.call(e)}function g(e){return"[object File]"===s.call(e)}function y(e){return"[object Blob]"===s.call(e)}function v(e){return"[object Function]"===s.call(e)}function b(e){return p(e)&&v(e.pipe)}function _(e){return"undefined"!==typeof URLSearchParams&&e instanceof URLSearchParams}function T(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function S(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}function w(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),n(e))for(var i=0,r=e.length;i<r;i++)t.call(null,e[i],i,e);else for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.call(null,e[s],s,e)}function E(){var e={};function t(t,i){f(e[i])&&f(t)?e[i]=E(e[i],t):f(t)?e[i]=E({},t):n(t)?e[i]=t.slice():e[i]=t}for(var i=0,r=arguments.length;i<r;i++)w(arguments[i],t);return e}function C(e,t,i){return w(t,(function(t,s){e[s]=i&&"function"===typeof t?r(t,i):t})),e}function x(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}e.exports={isArray:n,isArrayBuffer:l,isBuffer:o,isFormData:d,isArrayBufferView:u,isString:c,isNumber:h,isObject:p,isPlainObject:f,isUndefined:a,isDate:m,isFile:g,isBlob:y,isFunction:v,isStream:b,isURLSearchParams:_,isStandardBrowserEnv:S,forEach:w,merge:E,extend:C,trim:T,stripBOM:x}},c65b:function(e,t,i){"use strict";var r=i("40d5"),s=Function.prototype.call;e.exports=r?s.bind(s):function(){return s.apply(s,arguments)}},c6b6:function(e,t,i){"use strict";var r=i("e330"),s=r({}.toString),n=r("".slice);e.exports=function(e){return n(s(e),8,-1)}},c6cd:function(e,t,i){"use strict";var r=i("da84"),s=i("6374"),n="__core-js_shared__",a=r[n]||s(n,{});e.exports=a},c854:function(e,t,i){},c8af:function(e,t,i){"use strict";var r=i("c532");e.exports=function(e,t){r.forEach(e,(function(i,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=i,delete e[r])}))}},c8fa:function(e,t,i){},ca84:function(e,t,i){"use strict";var r=i("e330"),s=i("1a2d"),n=i("fc6a"),a=i("4d64").indexOf,o=i("d012"),l=r([].push);e.exports=function(e,t){var i,r=n(e),d=0,u=[];for(i in r)!s(o,i)&&s(r,i)&&l(u,i);while(t.length>d)s(r,i=t[d++])&&(~a(u,i)||l(u,i));return u}},cb2d:function(e,t,i){"use strict";var r=i("1626"),s=i("9bf2"),n=i("13d2"),a=i("6374");e.exports=function(e,t,i,o){o||(o={});var l=o.enumerable,d=void 0!==o.name?o.name:t;if(r(i)&&n(i,d,o),o.global)l?e[t]=i:a(t,i);else{try{o.unsafe?e[t]&&(l=!0):delete e[t]}catch(u){}l?e[t]=i:s.f(e,t,{value:i,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return e}},cc12:function(e,t,i){"use strict";var r=i("da84"),s=i("861d"),n=r.document,a=s(n)&&s(n.createElement);e.exports=function(e){return a?n.createElement(e):{}}},cdce:function(e,t,i){"use strict";var r=i("da84"),s=i("1626"),n=r.WeakMap;e.exports=s(n)&&/native code/.test(String(n))},cee4:function(e,t,i){"use strict";var r=i("c532"),s=i("1d2b"),n=i("0a06"),a=i("4a7b"),o=i("2444");function l(e){var t=new n(e),i=s(n.prototype.request,t);return r.extend(i,n.prototype,t),r.extend(i,t),i}var d=l(o);d.Axios=n,d.create=function(e){return l(a(d.defaults,e))},d.Cancel=i("7a77"),d.CancelToken=i("8df4"),d.isCancel=i("2e67"),d.all=function(e){return Promise.all(e)},d.spread=i("0df6"),d.isAxiosError=i("5f02"),e.exports=d,e.exports.default=d},d012:function(e,t,i){"use strict";e.exports={}},d02c:function(e,t,i){var r=i("ef34"),s=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function n(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function a(e){function t(e,t,i,r){return 3600*(0|e)+60*(0|t)+(0|i)+(0|r)/1e3}var i=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(":",""),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function o(){this.values=s(null)}function l(e,t,i,r){var s=r?e.split(r):[e];for(var n in s)if("string"===typeof s[n]){var a=s[n].split(i);if(2===a.length){var o=a[0].trim(),l=a[1].trim();t(o,l)}}}function d(e,t,i){var r=e;function s(){var t=a(e);if(null===t)throw new n(n.Errors.BadTimeStamp,"Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function d(e,t){var r=new o;l(e,(function(e,t){switch(e){case"region":for(var s=i.length-1;s>=0;s--)if(i[s].id===t){r.set(e,i[s].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var n=t.split(","),a=n[0];r.integer(e,a),r.percent(e,a)&&r.set("snapToLines",!1),r.alt(e,a,["auto"]),2===n.length&&r.alt("lineAlign",n[1],["start","center","end"]);break;case"position":n=t.split(","),r.percent(e,n[0]),2===n.length&&r.alt("positionAlign",n[1],["start","center","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","center","end","left","right"]);break}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");try{t.line=r.get("line","auto")}catch(s){}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(s){t.align=r.get("align","middle")}try{t.position=r.get("position","auto")}catch(s){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)}function u(){e=e.replace(/^\s+/,"")}if(u(),t.startTime=s(),u(),"--\x3e"!==e.substr(0,3))throw new n(n.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),u(),t.endTime=s(),u(),d(e,t)}n.prototype=s(Error.prototype),n.prototype.constructor=n,n.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,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var r=0;r<i.length;++r)if(t===i[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t),t>=0&&t<=100))&&(this.set(e,t),!0)}};var u=r.createElement&&r.createElement("textarea"),c={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 i(){if(!t)return null;function e(e){return t=t.substr(e.length),e}var i=t.match(/^([^<]*)(<[^>]*>?)?/);return e(i[1]?i[1]:i[2])}function r(e){return u.innerHTML=e,e=u.textContent,u.textContent="",e}function s(e,t){return!f[t.localName]||f[t.localName]===e.localName}function n(t,i){var r=c[t];if(!r)return null;var s=e.document.createElement(r),n=p[t];return n&&i&&(s[n]=i.trim()),s}var o,l=e.document.createElement("div"),d=l,m=[];while(null!==(o=i()))if("<"!==o[0])d.appendChild(e.document.createTextNode(r(o)));else{if("/"===o[1]){m.length&&m[m.length-1]===o.substr(2).replace(">","")&&(m.pop(),d=d.parentNode);continue}var g,y=a(o.substr(1,o.length-2));if(y){g=e.document.createProcessingInstruction("timestamp",y),d.appendChild(g);continue}var v=o.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!v)continue;if(g=n(v[1],v[3]),!g)continue;if(!s(d,g))continue;if(v[2]){var b=v[2].split(".");b.forEach((function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(h.hasOwnProperty(i)){var r=t?"background-color":"color",s=h[i];g.style[r]=s}})),g.className=b.join(" ")}m.push(v[1]),d.appendChild(g),d=g}return l}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<g.length;t++){var i=g[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function v(e){var t,i=[],r="";if(!e||!e.childNodes)return"ltr";function s(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function n(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\n|\r)/);return r?(e.length=0,r[0]):i}return"ruby"===t.tagName?n(e):t.childNodes?(s(e,t),n(e)):void 0}s(i,e);while(r=n(i))for(var a=0;a<r.length;a++)if(t=r.charCodeAt(a),y(t))return"rtl";return"ltr"}function b(e){if("number"===typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,r=0,s=0;s<i.length&&i[s]!==t;s++)"showing"===i[s].mode&&r++;return-1*++r}function _(){}function T(e,t,i){_.call(this),this.cue=t,this.cueDiv=m(e,t.text);var r={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(r,this.cueDiv),this.div=e.document.createElement("div"),r={direction:v(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(r),this.div.appendChild(this.cueDiv);var s=0;switch(t.positionAlign){case"start":s=t.position;break;case"center":s=t.position-t.size/2;break;case"end":s=t.position-t.size;break}""===t.vertical?this.applyStyles({left:this.formatStyle(s,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(s,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function S(e){var t,i,r,s;if(e.div){i=e.div.offsetHeight,r=e.div.offsetWidth,s=e.div.offsetTop;var n=(n=e.div.childNodes)&&(n=n[0])&&n.getClientRects&&n.getClientRects();e=e.div.getBoundingClientRect(),t=n?Math.max(n[0]&&n[0].height||0,e.height/n.length):0}this.left=e.left,this.right=e.right,this.top=e.top||s,this.height=e.height||i,this.bottom=e.bottom||s+(e.height||i),this.width=e.width||r,this.lineHeight=void 0!==t?t:e.lineHeight}function w(e,t,i,r){function s(e,t){for(var s,n=new S(e),a=1,o=0;o<t.length;o++){while(e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(r))e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(s=new S(e),a=l),e=new S(n)}return s||n}var n=new S(t),a=t.cue,o=b(a),l=[];if(a.snapToLines){var d;switch(a.vertical){case"":l=["+y","-y"],d="height";break;case"rl":l=["+x","-x"],d="width";break;case"lr":l=["-x","+x"],d="width";break}var u=n.lineHeight,c=u*Math.round(o),h=i[d]+u,p=l[0];Math.abs(c)>h&&(c=c<0?-1:1,c*=Math.ceil(h/u)*u),o<0&&(c+=""===a.vertical?i.height:i.width,l=l.reverse()),n.move(p,c)}else{var f=n.lineHeight/i.height*100;switch(a.lineAlign){case"center":o-=f/2;break;case"end":o-=f;break}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(o,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(o,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(o,"%")});break}l=["+y","-x","+x","-y"],n=new S(t)}var m=s(n,l);t.move(m.toCSSCompatValues(i))}function E(){}_.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},_.prototype.formatStyle=function(e,t){return 0===e?0:e+t},T.prototype=s(_.prototype),T.prototype.constructor=T,S.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;break}},S.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},S.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},S.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},S.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},S.prototype.intersectPercentage=function(e){var t=Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left)),i=Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top)),r=t*i;return r/(this.height*this.width)},S.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}},S.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e;var s={left:e.left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||i};return s},E.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!==typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},E.convertCueToDOMTree=function(e,t){return e&&t?m(e,t):null};var C=.05,x="sans-serif",k="1.5%";E.processCues=function(e,t,i){if(!e||!t||!i)return null;while(i.firstChild)i.removeChild(i.firstChild);var r=e.document.createElement("div");function s(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin=k,i.appendChild(r),s(t)){var n=[],a=S.getSimpleBoxPosition(r),o=Math.round(a.height*C*100)/100,l={font:o+"px "+x};(function(){for(var i,s,o=0;o<t.length;o++)s=t[o],i=new T(e,s,l),r.appendChild(i.div),w(e,i,a,n),s.displayState=i.div,n.push(S.getSimpleBoxPosition(i))})()}else for(var d=0;d<t.length;d++)r.appendChild(t[d].displayState)},E.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]},E.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof n))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function i(){var e=t.buffer,i=0;while(i<e.length&&"\r"!==e[i]&&"\n"!==e[i])++i;var r=e.substr(0,i);return"\r"===e[i]&&++i,"\n"===e[i]&&++i,t.buffer=e.substr(i),r}function r(e){var i=new o;if(l(e,(function(e,t){switch(e){case"id":i.set(e,t);break;case"width":i.percent(e,t);break;case"lines":i.integer(e,t);break;case"regionanchor":case"viewportanchor":var r=t.split(",");if(2!==r.length)break;var s=new o;if(s.percent("x",r[0]),s.percent("y",r[1]),!s.has("x")||!s.has("y"))break;i.set(e+"X",s.get("x")),i.set(e+"Y",s.get("y"));break;case"scroll":i.alt(e,t,["up"]);break}}),/=/,/\s/),i.has("id")){var r=new(t.vttjs.VTTRegion||t.window.VTTRegion);r.width=i.get("width",100),r.lines=i.get("lines",3),r.regionAnchorX=i.get("regionanchorX",0),r.regionAnchorY=i.get("regionanchorY",100),r.viewportAnchorX=i.get("viewportanchorX",0),r.viewportAnchorY=i.get("viewportanchorY",100),r.scroll=i.get("scroll",""),t.onregion&&t.onregion(r),t.regionList.push({id:i.get("id"),region:r})}}function s(e){var i=new o;l(e,(function(e,t){switch(e){case"MPEGT":i.integer(e+"S",t);break;case"LOCA":i.set(e+"L",a(t));break}}),/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get("MPEGTS"),LOCAL:i.get("LOCAL")})}function u(e){e.match(/X-TIMESTAMP-MAP/)?l(e,(function(e,t){switch(e){case"X-TIMESTAMP-MAP":s(t);break}}),/=/):l(e,(function(e,t){switch(e){case"Region":r(t);break}}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var c;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;c=i();var h=c.match(/^WEBVTT([ \t].*)?$/);if(!h||!h[0])throw new n(n.Errors.BadSignature);t.state="HEADER"}var p=!1;while(t.buffer){if(!/\r\n|\n/.test(t.buffer))return this;switch(p?p=!1:c=i(),t.state){case"HEADER":/:/.test(c)?u(c):c||(t.state="ID");continue;case"NOTE":c||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(c)){t.state="NOTE";break}if(!c)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,"");try{t.cue.align="center"}catch(m){t.cue.align="middle"}if(t.state="CUE",-1===c.indexOf("--\x3e")){t.cue.id=c;continue}case"CUE":try{d(c,t.cue,t.regionList)}catch(m){t.reportOrThrowError(m),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var f=-1!==c.indexOf("--\x3e");if(!c||f&&(p=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=c.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":c||(t.state="ID");continue}}}catch(m){t.reportOrThrowError(m),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new n(n.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}},e.exports=E},d039:function(e,t,i){"use strict";e.exports=function(e){try{return!!e()}catch(t){return!0}}},d066:function(e,t,i){"use strict";var r=i("da84"),s=i("1626"),n=function(e){return s(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?n(r[e]):r[e]&&r[e][t]}},d136:function(e,t,i){(function(t){var i=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,r=/^(?=([^\/?#]*))\1([^]*)$/,s=/(?:\/|^)\.(?=\/)/g,n=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,a={buildAbsoluteURL:function(e,t,i){if(i=i||{},e=e.trim(),t=t.trim(),!t){if(!i.alwaysNormalize)return e;var s=a.parseURL(e);if(!s)throw new Error("Error trying to parse base URL.");return s.path=a.normalizePath(s.path),a.buildURLFromParts(s)}var n=a.parseURL(t);if(!n)throw new Error("Error trying to parse relative URL.");if(n.scheme)return i.alwaysNormalize?(n.path=a.normalizePath(n.path),a.buildURLFromParts(n)):t;var o=a.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=r.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var d={scheme:o.scheme,netLoc:n.netLoc,path:null,params:n.params,query:n.query,fragment:n.fragment};if(!n.netLoc&&(d.netLoc=o.netLoc,"/"!==n.path[0]))if(n.path){var u=o.path,c=u.substring(0,u.lastIndexOf("/")+1)+n.path;d.path=a.normalizePath(c)}else d.path=o.path,n.params||(d.params=o.params,n.query||(d.query=o.query));return null===d.path&&(d.path=i.alwaysNormalize?a.normalizePath(n.path):n.path),a.buildURLFromParts(d)},parseURL:function(e){var t=i.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){e=e.split("").reverse().join("").replace(s,"");while(e.length!==(e=e.replace(n,"")).length);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}};e.exports=a})()},d1e7:function(e,t,i){"use strict";var r={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,n=s&&!r.call({1:2},1);t.f=n?function(e){var t=s(this,e);return!!t&&t.enumerable}:r},d58f:function(e,t,i){"use strict";var r=i("59ed"),s=i("7b0b"),n=i("44ad"),a=i("07fa"),o=TypeError,l=function(e){return function(t,i,l,d){r(i);var u=s(t),c=n(u),h=a(u),p=e?h-1:0,f=e?-1:1;if(l<2)while(1){if(p in c){d=c[p],p+=f;break}if(p+=f,e?p<0:h<=p)throw o("Reduce of empty array with no initial value")}for(;e?p>=0:h>p;p+=f)p in c&&(d=i(d,c[p],p,u));return d}};e.exports={left:l(!1),right:l(!0)}},d749:function(e,t,i){"use strict";i.d(t,"a",(function(){return g}));var r=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,r=0;r<i;++r)t[r].call(this,arguments[1]);else for(var s=Array.prototype.slice.call(arguments,1),n=t.length,a=0;a<n;++a)t[a].apply(this,s)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}(),s=i("a559"),n=i.n(s),a=i("4e9a");
19
19
  /*! @name m3u8-parser @version 6.2.0 @license Apache-2.0 */
20
20
  class o extends r{constructor(){super(),this.buffer=""}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const l=String.fromCharCode(9),d=function(e){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},u=function(){const e="[^=]*",t='"[^"]*"|[^,]*',i="(?:"+e+")=(?:"+t+")";return new RegExp("(?:^|,)("+i+")")},c=function(e){const t={};if(!e)return t;const i=e.split(u());let r,s=i.length;while(s--)""!==i[s]&&(r=/([^=]*)=(.*)/.exec(i[s]).slice(1),r[0]=r[0].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^['"](.*)['"]$/g,"$1"),t[r[0]]=r[1]);return t};class h extends r{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,i;if(e=e.trim(),0===e.length)return;if("#"!==e[0])return void this.trigger("data",{type:"uri",uri:e});const r=this.tagMappers.reduce((t,i)=>{const r=i(e);return r===e?t:t.concat([r])},[e]);r.forEach(e=>{for(let t=0;t<this.customParsers.length;t++)if(this.customParsers[t].call(this,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e),t)this.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(e),t)return i={type:"tag",tagType:"inf"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger("data",i);if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(e),t)return i={type:"tag",tagType:"targetduration"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(e),t)return i={type:"tag",tagType:"version"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(e),t)return i={type:"tag",tagType:"media-sequence"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(e),t)return i={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(e),t)return i={type:"tag",tagType:"playlist-type"},t[1]&&(i.playlistType=t[1]),void this.trigger("data",i);if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(e),t)return i=n()(d(t[1]),{type:"tag",tagType:"byterange"}),void this.trigger("data",i);if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(e),t)return i={type:"tag",tagType:"allow-cache"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger("data",i);if(t=/^#EXT-X-MAP:(.*)$/.exec(e),t){if(i={type:"tag",tagType:"map"},t[1]){const e=c(t[1]);e.URI&&(i.uri=e.URI),e.BYTERANGE&&(i.byterange=d(e.BYTERANGE))}this.trigger("data",i)}else if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(e),t){if(i={type:"tag",tagType:"stream-inf"},t[1]){if(i.attributes=c(t[1]),i.attributes.RESOLUTION){const e=i.attributes.RESOLUTION.split("x"),t={};e[0]&&(t.width=parseInt(e[0],10)),e[1]&&(t.height=parseInt(e[1],10)),i.attributes.RESOLUTION=t}i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes["FRAME-RATE"]&&(i.attributes["FRAME-RATE"]=parseFloat(i.attributes["FRAME-RATE"])),i.attributes["PROGRAM-ID"]&&(i.attributes["PROGRAM-ID"]=parseInt(i.attributes["PROGRAM-ID"],10))}this.trigger("data",i)}else{if(t=/^#EXT-X-MEDIA:(.*)$/.exec(e),t)return i={type:"tag",tagType:"media"},t[1]&&(i.attributes=c(t[1])),void this.trigger("data",i);if(t=/^#EXT-X-ENDLIST/.exec(e),t)this.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e),t)this.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(e),t)return i={type:"tag",tagType:"program-date-time"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger("data",i);if(t=/^#EXT-X-KEY:(.*)$/.exec(e),t)return i={type:"tag",tagType:"key"},t[1]&&(i.attributes=c(t[1]),i.attributes.IV&&("0x"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger("data",i);if(t=/^#EXT-X-START:(.*)$/.exec(e),t)return i={type:"tag",tagType:"start"},t[1]&&(i.attributes=c(t[1]),i.attributes["TIME-OFFSET"]=parseFloat(i.attributes["TIME-OFFSET"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger("data",i);if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(e),t)return i={type:"tag",tagType:"cue-out-cont"},t[1]?i.data=t[1]:i.data="",void this.trigger("data",i);if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(e),t)return i={type:"tag",tagType:"cue-out"},t[1]?i.data=t[1]:i.data="",void this.trigger("data",i);if(t=/^#EXT-X-CUE-IN:(.*)?$/.exec(e),t)return i={type:"tag",tagType:"cue-in"},t[1]?i.data=t[1]:i.data="",void this.trigger("data",i);if(t=/^#EXT-X-SKIP:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"skip"},i.attributes=c(t[1]),i.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(i.attributes["SKIPPED-SEGMENTS"]=parseInt(i.attributes["SKIPPED-SEGMENTS"],10)),i.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(i.attributes["RECENTLY-REMOVED-DATERANGES"]=i.attributes["RECENTLY-REMOVED-DATERANGES"].split(l)),void this.trigger("data",i);if(t=/^#EXT-X-PART:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"part"},i.attributes=c(t[1]),["DURATION"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),["INDEPENDENT","GAP"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),i.attributes.hasOwnProperty("BYTERANGE")&&(i.attributes.byterange=d(i.attributes.BYTERANGE)),void this.trigger("data",i);if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"server-control"},i.attributes=c(t[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))})),void this.trigger("data",i);if(t=/^#EXT-X-PART-INF:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"part-inf"},i.attributes=c(t[1]),["PART-TARGET"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),void this.trigger("data",i);if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"preload-hint"},i.attributes=c(t[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach((function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);const t="BYTERANGE-LENGTH"===e?"length":"offset";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}})),void this.trigger("data",i);if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e),t&&t[1])return i={type:"tag",tagType:"rendition-report"},i.attributes=c(t[1]),["LAST-MSN","LAST-PART"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))})),void this.trigger("data",i);if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(e),t&&t[1]){i={type:"tag",tagType:"daterange"},i.attributes=c(t[1]),["ID","CLASS"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=String(i.attributes[e]))})),["START-DATE","END-DATE"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=new Date(i.attributes[e]))})),["DURATION","PLANNED-DURATION"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))})),["END-ON-NEXT"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/i.test(i.attributes[e]))})),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach((function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=i.attributes[e].toString(16))}));const e=/^X-([A-Z]+-)+[A-Z]+$/;for(const t in i.attributes){if(!e.test(t))continue;const r=/[0-9A-Fa-f]{6}/g.test(i.attributes[t]),s=/^\d+(\.\d+)?$/.test(i.attributes[t]);i.attributes[t]=r?i.attributes[t].toString(16):s?parseFloat(i.attributes[t]):String(i.attributes[t])}this.trigger("data",i)}else t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(e),t?this.trigger("data",{type:"tag",tagType:"independent-segments"}):this.trigger("data",{type:"tag",data:e.slice(4)})}}}else this.trigger("data",{type:"comment",text:e.slice(1)})})}addParser({expression:e,customType:t,dataParser:i,segment:r}){"function"!==typeof i&&(i=e=>e),this.customParsers.push(s=>{const n=e.exec(s);if(n)return this.trigger("data",{type:"custom",data:i(s),customType:t,segment:r}),!0})}addTagMapper({expression:e,map:t}){const i=i=>e.test(i)?t(i):i;this.tagMappers.push(i)}}const p=e=>e.toLowerCase().replace(/-(\w)/g,e=>e[1].toUpperCase()),f=function(e){const t={};return Object.keys(e).forEach((function(i){t[p(i)]=e[i]})),t},m=function(e){const{serverControl:t,targetDuration:i,partTargetDuration:r}=e;if(!t)return;const s="#EXT-X-SERVER-CONTROL",n="holdBack",a="partHoldBack",o=i&&3*i,l=r&&2*r;i&&!t.hasOwnProperty(n)&&(t[n]=o,this.trigger("info",{message:`${s} defaulting HOLD-BACK to targetDuration * 3 (${o}).`})),o&&t[n]<o&&(this.trigger("warn",{message:`${s} clamping HOLD-BACK (${t[n]}) to targetDuration * 3 (${o})`}),t[n]=o),r&&!t.hasOwnProperty(a)&&(t[a]=3*r,this.trigger("info",{message:`${s} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[a]}).`})),r&&t[a]<l&&(this.trigger("warn",{message:`${s} clamping PART-HOLD-BACK (${t[a]}) to partTargetDuration * 2 (${l}).`}),t[a]=l)};class g extends r{constructor(){super(),this.lineStream=new o,this.parseStream=new h,this.lineStream.pipe(this.parseStream);const e=this,t=[];let i,r,s={},l=!1;const d=function(){},u={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},c="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";let p=0;this.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};let g=0,y=0;const v={};this.on("end",()=>{s.uri||!s.parts&&!s.preloadHints||(!s.map&&i&&(s.map=i),!s.key&&r&&(s.key=r),s.timeline||"number"!==typeof p||(s.timeline=p),this.manifest.preloadSegment=s)}),this.parseStream.on("data",(function(o){let h,b;({tag(){({version(){o.version&&(this.manifest.version=o.version)},"allow-cache"(){this.manifest.allowCache=o.allowed,"allowed"in o||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const e={};"length"in o&&(s.byterange=e,e.length=o.length,"offset"in o||(o.offset=g)),"offset"in o&&(s.byterange=e,e.offset=o.offset),g=e.offset+e.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),o.duration>0&&(s.duration=o.duration),0===o.duration&&(s.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=t},key(){if(o.attributes)if("NONE"!==o.attributes.METHOD)if(o.attributes.URI){if("com.apple.streamingkeydelivery"===o.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:o.attributes});if("com.microsoft.playready"===o.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.microsoft.playready"]={uri:o.attributes.URI});if(o.attributes.KEYFORMAT===c){const e=["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"];return-1===e.indexOf(o.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===o.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==o.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):o.attributes.KEYID&&"0x"===o.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:o.attributes.KEYFORMAT,keyId:o.attributes.KEYID.substring(2)},pssh:Object(a["a"])(o.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}o.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),r={method:o.attributes.METHOD||"AES-128",uri:o.attributes.URI},"undefined"!==typeof o.attributes.IV&&(r.iv=o.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"(){isFinite(o.number)?this.manifest.mediaSequence=o.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+o.number})},"discontinuity-sequence"(){isFinite(o.number)?(this.manifest.discontinuitySequence=o.number,p=o.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+o.number})},"playlist-type"(){/VOD|EVENT/.test(o.playlistType)?this.manifest.playlistType=o.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+o.playlist})},map(){i={},o.uri&&(i.uri=o.uri),o.byterange&&(i.byterange=o.byterange),r&&(i.key=r)},"stream-inf"(){this.manifest.playlists=t,this.manifest.mediaGroups=this.manifest.mediaGroups||u,o.attributes?(s.attributes||(s.attributes={}),n()(s.attributes,o.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||u,!(o.attributes&&o.attributes.TYPE&&o.attributes["GROUP-ID"]&&o.attributes.NAME))return void this.trigger("warn",{message:"ignoring incomplete or missing media group"});const e=this.manifest.mediaGroups[o.attributes.TYPE];e[o.attributes["GROUP-ID"]]=e[o.attributes["GROUP-ID"]]||{},h=e[o.attributes["GROUP-ID"]],b={default:/yes/i.test(o.attributes.DEFAULT)},b.default?b.autoselect=!0:b.autoselect=/yes/i.test(o.attributes.AUTOSELECT),o.attributes.LANGUAGE&&(b.language=o.attributes.LANGUAGE),o.attributes.URI&&(b.uri=o.attributes.URI),o.attributes["INSTREAM-ID"]&&(b.instreamId=o.attributes["INSTREAM-ID"]),o.attributes.CHARACTERISTICS&&(b.characteristics=o.attributes.CHARACTERISTICS),o.attributes.FORCED&&(b.forced=/yes/i.test(o.attributes.FORCED)),h[o.attributes.NAME]=b},discontinuity(){p+=1,s.discontinuity=!0,this.manifest.discontinuityStarts.push(t.length)},"program-date-time"(){"undefined"===typeof this.manifest.dateTimeString&&(this.manifest.dateTimeString=o.dateTimeString,this.manifest.dateTimeObject=o.dateTimeObject),s.dateTimeString=o.dateTimeString,s.dateTimeObject=o.dateTimeObject},targetduration(){!isFinite(o.duration)||o.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+o.duration}):(this.manifest.targetDuration=o.duration,m.call(this,this.manifest))},start(){o.attributes&&!isNaN(o.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:o.attributes["TIME-OFFSET"],precise:o.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out"(){s.cueOut=o.data},"cue-out-cont"(){s.cueOutCont=o.data},"cue-in"(){s.cueIn=o.data},skip(){this.manifest.skip=f(o.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",o.attributes,["SKIPPED-SEGMENTS"])},part(){l=!0;const e=this.manifest.segments.length,t=f(o.attributes);s.parts=s.parts||[],s.parts.push(t),t.byterange&&(t.byterange.hasOwnProperty("offset")||(t.byterange.offset=y),y=t.byterange.offset+t.byterange.length);const i=s.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${i} for segment #${e}`,o.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((e,t)=>{e.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${t} lacks required attribute(s): LAST-PART`})})},"server-control"(){const e=this.manifest.serverControl=f(o.attributes);e.hasOwnProperty("canBlockReload")||(e.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),m.call(this,this.manifest),e.canSkipDateranges&&!e.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){const e=this.manifest.segments.length,t=f(o.attributes),i=t.type&&"PART"===t.type;s.preloadHints=s.preloadHints||[],s.preloadHints.push(t),t.byterange&&(t.byterange.hasOwnProperty("offset")||(t.byterange.offset=i?y:0,i&&(y=t.byterange.offset+t.byterange.length)));const r=s.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${r} for segment #${e}`,o.attributes,["TYPE","URI"]),t.type)for(let n=0;n<s.preloadHints.length-1;n++){const i=s.preloadHints[n];i.type&&(i.type===t.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${r} for segment #${e} has the same TYPE ${t.type} as preload hint #${n}`}))}},"rendition-report"(){const e=f(o.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(e);const t=this.manifest.renditionReports.length-1,i=["LAST-MSN","URI"];l&&i.push("LAST-PART"),this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #"+t,o.attributes,i)},"part-inf"(){this.manifest.partInf=f(o.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",o.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),m.call(this,this.manifest)},daterange(){this.manifest.daterange=this.manifest.daterange||[],this.manifest.daterange.push(f(o.attributes));const e=this.manifest.daterange.length-1;this.warnOnMissingAttributes_("#EXT-X-DATERANGE #"+e,o.attributes,["ID","START-DATE"]);const t=this.manifest.daterange[e];t.endDate&&t.startDate&&new Date(t.endDate)<new Date(t.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),t.duration&&t.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),t.plannedDuration&&t.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});const i=!!t.endOnNext;if(i&&!t.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),i&&(t.duration||t.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),t.duration&&t.endDate){const i=t.startDate,r=i.setSeconds(i.getSeconds()+t.duration);this.manifest.daterange[e].endDate=new Date(r)}if(t&&!this.manifest.dateTimeString&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),v[t.id]){for(const r in v[t.id])if(v[t.id][r]!==t[r]){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes and same attribute values"});break}}else v[t.id]=t},"independent-segments"(){this.manifest.independentSegments=!0}}[o.tagType]||d).call(e)},uri(){s.uri=o.uri,t.push(s),this.manifest.targetDuration&&!("duration"in s)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),s.duration=this.manifest.targetDuration),r&&(s.key=r),s.timeline=p,i&&(s.map=i),y=0,s={}},comment(){},custom(){o.segment?(s.custom=s.custom||{},s.custom[o.customType]=o.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[o.customType]=o.data)}})[o.type].call(e)}))}warnOnMissingAttributes_(e,t,i){const r=[];i.forEach((function(e){t.hasOwnProperty(e)||r.push(e)})),r.length&&this.trigger("warn",{message:`${e} lacks required attribute(s): ${r.join(", ")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push("\n"),this.trigger("end")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}},d925:function(e,t,i){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},d9b5:function(e,t,i){"use strict";var r=i("d066"),s=i("1626"),n=i("3a9b"),a=i("fdbf"),o=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return s(t)&&n(t.prototype,o(e))}},da84:function(e,t,i){"use strict";(function(t){var i=function(e){return e&&e.Math==Math&&e};e.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||function(){return this}()||this||Function("return this")()}).call(this,i("24aa"))},dc4a:function(e,t,i){"use strict";var r=i("59ed"),s=i("7234");e.exports=function(e,t){var i=e[t];return s(i)?void 0:r(i)}},dc6e:function(e,t,i){},dc72:function(e,t,i){"use strict";var r=i("c854"),s=i.n(r);s.a},ddb2:function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return a}));var r=i("be09"),s=i.n(r),n=function(t){return s.a.atob?s.a.atob(t):e.from(t,"base64").toString("binary")};function a(e){for(var t=n(e),i=new Uint8Array(t.length),r=0;r<t.length;r++)i[r]=t.charCodeAt(r);return i}}).call(this,i("b639").Buffer)},de66:function(e,t,i){"use strict";i.d(t,"g",(function(){return l})),i.d(t,"e",(function(){return d})),i.d(t,"k",(function(){return c})),i.d(t,"j",(function(){return h})),i.d(t,"i",(function(){return p})),i.d(t,"b",(function(){return g})),i.d(t,"f",(function(){return y})),i.d(t,"c",(function(){return v})),i.d(t,"h",(function(){return b})),i.d(t,"d",(function(){return _})),i.d(t,"a",(function(){return T}));var r=i("be09"),s=i.n(r),n=function(e,t){var i="";while(t--)i+=e;return i},a=function(e){return e.toString(2).length},o=function(e){return Math.ceil(a(e)/8)},l=function(e,t,i){return void 0===i&&(i=" "),(n(i,t)+e.toString()).slice(-t)},d=function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},u=function(e){return d(e)},c=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||u(e)||e instanceof ArrayBuffer||(e="number"!==typeof e||"number"===typeof e&&e!==e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},h=function(e){e=c(e);for(var t="",i=0;i<e.length;i++)t+=l(e[i].toString(16),2,"0");return t},p=function(e){e=c(e);for(var t="",i=0;i<e.length;i++)t+=l(e[i].toString(2),8,"0");return t},f=s.a.BigInt||Number,m=[f("0x1"),f("0x100"),f("0x10000"),f("0x1000000"),f("0x100000000"),f("0x10000000000"),f("0x1000000000000"),f("0x100000000000000"),f("0x10000000000000000")],g=(function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}(),function(e,t){var i=void 0===t?{}:t,r=i.signed,s=void 0!==r&&r,n=i.le,a=void 0!==n&&n;e=c(e);var o=a?"reduce":"reduceRight",l=e[o]?e[o]:Array.prototype[o],d=l.call(e,(function(t,i,r){var s=a?r:Math.abs(r+1-e.length);return t+f(i)*m[s]}),f(0));if(s){var u=m[e.length]/f(2)-f(1);d=f(d),d>u&&(d-=u,d-=u,d-=f(2))}return Number(d)}),y=function(e,t){var i=void 0===t?{}:t,r=i.le,s=void 0!==r&&r;("bigint"!==typeof e&&"number"!==typeof e||"number"===typeof e&&e!==e)&&(e=0),e=f(e);for(var n=o(e),a=new Uint8Array(new ArrayBuffer(n)),l=0;l<n;l++){var d=s?l:Math.abs(l+1-a.length);a[d]=Number(e/m[l]&f(255)),e<0&&(a[d]=Math.abs(~a[d]),a[d]-=0===l?1:2)}return a},v=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,c(e));try{return decodeURIComponent(escape(t))}catch(i){}return t},b=function(e,t){if("string"!==typeof e&&e&&"function"===typeof e.toString&&(e=e.toString()),"string"!==typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),r=0;r<e.length;r++)i[r]=e.charCodeAt(r);return i},_=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter((function(e){return e&&(e.byteLength||e.length)&&"string"!==typeof e})),t.length<=1)return c(t[0]);var r=t.reduce((function(e,t,i){return e+(t.byteLength||t.length)}),0),s=new Uint8Array(r),n=0;return t.forEach((function(e){e=c(e),s.set(e,n),n+=e.byteLength})),s},T=function(e,t,i){var r=void 0===i?{}:i,s=r.offset,n=void 0===s?0:s,a=r.mask,o=void 0===a?[]:a;e=c(e),t=c(t);var l=t.every?t.every:Array.prototype.every;return t.length&&e.length-n>=t.length&&l.call(t,(function(t,i){var r=o[i]?o[i]&e[n+i]:e[n+i];return t===r}))}},df33:function(e,t){function i(e){if(e&&"object"===typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"===typeof e)return a[e];var i=String(e),n=r[i.toLowerCase()];if(n)return n;n=s[i.toLowerCase()];return n||(1===i.length?i.charCodeAt(0):void 0)}i.isEventKey=function(e,t){if(e&&"object"===typeof e){var i=e.which||e.keyCode||e.charCode;if(null===i||void 0===i)return!1;if("string"===typeof t){var n=r[t.toLowerCase()];if(n)return n===i;n=s[t.toLowerCase()];if(n)return n===i}else if("number"===typeof t)return t===i;return!1}},t=e.exports=i;var r=t.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},s=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};
21
21
  /*!
22
22
  * Programatically add the following
23
23
  */
24
- for(n=97;n<123;n++)r[String.fromCharCode(n)]=n-32;for(var n=48;n<58;n++)r[n-48]=n;for(n=1;n<13;n++)r["f"+n]=n+111;for(n=0;n<10;n++)r["numpad "+n]=n+96;var a=t.names=t.title={};for(n in r)a[r[n]]=n;for(var o in s)r[o]=s[o]},df7c:function(e,t,i){(function(e){function i(e,t){for(var i=0,r=e.length-1;r>=0;r--){var s=e[r];"."===s?e.splice(r,1):".."===s?(e.splice(r,1),i++):i&&(e.splice(r,1),i--)}if(t)for(;i--;i)e.unshift("..");return e}function r(e){"string"!==typeof e&&(e+="");var t,i=0,r=-1,s=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!s){i=t+1;break}}else-1===r&&(s=!1,r=t+1);return-1===r?"":e.slice(i,r)}function s(e,t){if(e.filter)return e.filter(t);for(var i=[],r=0;r<e.length;r++)t(e[r],r,e)&&i.push(e[r]);return i}t.resolve=function(){for(var t="",r=!1,n=arguments.length-1;n>=-1&&!r;n--){var a=n>=0?arguments[n]:e.cwd();if("string"!==typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(t=a+"/"+t,r="/"===a.charAt(0))}return t=i(s(t.split("/"),(function(e){return!!e})),!r).join("/"),(r?"/":"")+t||"."},t.normalize=function(e){var r=t.isAbsolute(e),a="/"===n(e,-1);return e=i(s(e.split("/"),(function(e){return!!e})),!r).join("/"),e||r||(e="."),e&&a&&(e+="/"),(r?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(s(e,(function(e,t){if("string"!==typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,i){function r(e){for(var t=0;t<e.length;t++)if(""!==e[t])break;for(var i=e.length-1;i>=0;i--)if(""!==e[i])break;return t>i?[]:e.slice(t,i-t+1)}e=t.resolve(e).substr(1),i=t.resolve(i).substr(1);for(var s=r(e.split("/")),n=r(i.split("/")),a=Math.min(s.length,n.length),o=a,l=0;l<a;l++)if(s[l]!==n[l]){o=l;break}var d=[];for(l=o;l<s.length;l++)d.push("..");return d=d.concat(n.slice(o)),d.join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!==typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),i=47===t,r=-1,s=!0,n=e.length-1;n>=1;--n)if(t=e.charCodeAt(n),47===t){if(!s){r=n;break}}else s=!1;return-1===r?i?"/":".":i&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var i=r(e);return t&&i.substr(-1*t.length)===t&&(i=i.substr(0,i.length-t.length)),i},t.extname=function(e){"string"!==typeof e&&(e+="");for(var t=-1,i=0,r=-1,s=!0,n=0,a=e.length-1;a>=0;--a){var o=e.charCodeAt(a);if(47!==o)-1===r&&(s=!1,r=a+1),46===o?-1===t?t=a:1!==n&&(n=1):-1!==t&&(n=-1);else if(!s){i=a+1;break}}return-1===t||-1===r||0===n||1===n&&t===r-1&&t===i+1?"":e.slice(t,r)};var n="b"==="ab".substr(-1)?function(e,t,i){return e.substr(t,i)}:function(e,t,i){return t<0&&(t=e.length+t),e.substr(t,i)}}).call(this,i("4362"))},e003:function(e,t,i){var r=i("89a7").NAMESPACE,s=/[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]/,n=new RegExp("[\\-\\.0-9"+s.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),a=new RegExp("^"+s.source+n.source+"*(?::"+s.source+n.source+"*)?$"),o=0,l=1,d=2,u=3,c=4,h=5,p=6,f=7;function m(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,m)}function g(){}function y(e,t,i,s,n){function a(e){if(e>65535){e-=65536;var t=55296+(e>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function o(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:"#"===t.charAt(0)?a(parseInt(t.substr(1).replace("x","0x"))):(n.error("entity not found:"+e),e)}function l(t){if(t>y){var i=e.substring(y,t).replace(/&#?\w+;/g,o);p&&d(y),s.characters(i,0,t-y),y=t}}function d(t,i){while(t>=c&&(i=h.exec(e)))u=i.index,c=u+i[0].length,p.lineNumber++;p.columnNumber=t-u+1}var u=0,c=0,h=/.*(?:\r\n?|\n)|.*$/g,p=s.locator,f=[{currentNSMap:t}],g={},y=0;while(1){try{var w=e.indexOf("<",y);if(w<0){if(!e.substr(y).match(/^\s*$/)){var k=s.doc,I=k.createTextNode(e.substr(y));k.appendChild(I),s.currentElement=I}return}switch(w>y&&l(w),e.charAt(w+1)){case"/":var A=e.indexOf(">",w+3),O=e.substring(w+2,A).replace(/[ \t\n\r]+$/g,""),P=f.pop();A<0?(O=e.substring(w+2).replace(/[\s<].*/,""),n.error("end tag name: "+O+" is not complete:"+P.tagName),A=w+1+O.length):O.match(/\s</)&&(O=O.replace(/[\s<].*/,""),n.error("end tag name: "+O+" maybe not complete"),A=w+1+O.length);var L=P.localNSMap,D=P.tagName==O,M=D||P.tagName&&P.tagName.toLowerCase()==O.toLowerCase();if(M){if(s.endElement(P.uri,P.localName,O),L)for(var N in L)Object.prototype.hasOwnProperty.call(L,N)&&s.endPrefixMapping(N);D||n.fatalError("end tag name: "+O+" is not match the current start tagName:"+P.tagName)}else f.push(P);A++;break;case"?":p&&d(w),A=C(e,w,s);break;case"!":p&&d(w),A=E(e,w,s,n);break;default:p&&d(w);var R=new x,U=f[f.length-1].currentNSMap,B=(A=b(e,w,R,U,o,n),R.length);if(!R.closed&&S(e,A,R.tagName,g)&&(R.closed=!0,i.nbsp||n.warning("unclosed xml attribute")),p&&B){for(var j=v(p,{}),F=0;F<B;F++){var q=R[F];d(q.offset),q.locator=v(p,{})}s.locator=j,_(R,s,U)&&f.push(R),s.locator=p}else _(R,s,U)&&f.push(R);r.isHTML(R.uri)&&!R.closed?A=T(e,A,R.tagName,o,s):A++}}catch($){if($ instanceof m)throw $;n.error("element parse error: "+$),A=-1}A>y?y=A:l(Math.max(w,y)+1)}}function v(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function b(e,t,i,s,n,a){function m(e,t,r){i.attributeNames.hasOwnProperty(e)&&a.fatalError("Attribute "+e+" redefined"),i.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,n),r)}var g,y=++t,v=o;while(1){var b=e.charAt(y);switch(b){case"=":if(v===l)g=e.slice(t,y),v=u;else{if(v!==d)throw new Error("attribute equal must after attrName");v=u}break;case"'":case'"':if(v===u||v===l){if(v===l&&(a.warning('attribute value must after "="'),g=e.slice(t,y)),t=y+1,y=e.indexOf(b,t),!(y>0))throw new Error("attribute value no end '"+b+"' match");_=e.slice(t,y),m(g,_,t-1),v=h}else{if(v!=c)throw new Error('attribute value must after "="');_=e.slice(t,y),m(g,_,t),a.warning('attribute "'+g+'" missed start quot('+b+")!!"),t=y+1,v=h}break;case"/":switch(v){case o:i.setTagName(e.slice(t,y));case h:case p:case f:v=f,i.closed=!0;case c:case l:break;case d:i.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),v==o&&i.setTagName(e.slice(t,y)),y;case">":switch(v){case o:i.setTagName(e.slice(t,y));case h:case p:case f:break;case c:case l:_=e.slice(t,y),"/"===_.slice(-1)&&(i.closed=!0,_=_.slice(0,-1));case d:v===d&&(_=g),v==c?(a.warning('attribute "'+_+'" missed quot(")!'),m(g,_,t)):(r.isHTML(s[""])&&_.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+_+'" missed value!! "'+_+'" instead!!'),m(_,_,t));break;case u:throw new Error("attribute value missed!!")}return y;case"€":b=" ";default:if(b<=" ")switch(v){case o:i.setTagName(e.slice(t,y)),v=p;break;case l:g=e.slice(t,y),v=d;break;case c:var _=e.slice(t,y);a.warning('attribute "'+_+'" missed quot(")!!'),m(g,_,t);case h:v=p;break}else switch(v){case d:i.tagName;r.isHTML(s[""])&&g.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+g+'" missed value!! "'+g+'" instead2!!'),m(g,g,t),t=y,v=l;break;case h:a.warning('attribute space is required"'+g+'"!!');case p:v=l,t=y;break;case u:v=c,t=y;break;case f:throw new Error("elements closed character '/' and '>' must be connected to")}}y++}}function _(e,t,i){var s=e.tagName,n=null,a=e.length;while(a--){var o=e[a],l=o.qName,d=o.value,u=l.indexOf(":");if(u>0)var c=o.prefix=l.slice(0,u),h=l.slice(u+1),p="xmlns"===c&&h;else h=l,c=null,p="xmlns"===l&&"";o.localName=h,!1!==p&&(null==n&&(n={},w(i,i={})),i[p]=n[p]=d,o.uri=r.XMLNS,t.startPrefixMapping(p,d))}a=e.length;while(a--){o=e[a];c=o.prefix;c&&("xml"===c&&(o.uri=r.XML),"xmlns"!==c&&(o.uri=i[c||""]))}u=s.indexOf(":");u>0?(c=e.prefix=s.slice(0,u),h=e.localName=s.slice(u+1)):(c=null,h=e.localName=s);var f=e.uri=i[c||""];if(t.startElement(f,h,s,e),!e.closed)return e.currentNSMap=i,e.localNSMap=n,!0;if(t.endElement(f,h,s),n)for(c in n)Object.prototype.hasOwnProperty.call(n,c)&&t.endPrefixMapping(c)}function T(e,t,i,r,s){if(/^(?:script|textarea)$/i.test(i)){var n=e.indexOf("</"+i+">",t),a=e.substring(t+1,n);if(/[&<]/.test(a))return/^script$/i.test(i)?(s.characters(a,0,a.length),n):(a=a.replace(/&#?\w+;/g,r),s.characters(a,0,a.length),n)}return t+1}function S(e,t,i,r){var s=r[i];return null==s&&(s=e.lastIndexOf("</"+i+">"),s<t&&(s=e.lastIndexOf("</"+i)),r[i]=s),s<t}function w(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function E(e,t,i,r){var s=e.charAt(t+2);switch(s){case"-":if("-"===e.charAt(t+3)){var n=e.indexOf("--\x3e",t+4);return n>t?(i.comment(e,t+4,n-t-4),n+3):(r.error("Unclosed comment"),-1)}return-1;default:if("CDATA["==e.substr(t+3,6)){n=e.indexOf("]]>",t+9);return i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3}var a=k(e,t),o=a.length;if(o>1&&/!doctype/i.test(a[0][0])){var l=a[1][0],d=!1,u=!1;o>3&&(/^public$/i.test(a[2][0])?(d=a[3][0],u=o>4&&a[4][0]):/^system$/i.test(a[2][0])&&(u=a[3][0]));var c=a[o-1];return i.startDTD(l,d,u),i.endDTD(),c.index+c[0].length}}return-1}function C(e,t,i){var r=e.indexOf("?>",t);if(r){var s=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(s){s[0].length;return i.processingInstruction(s[1],s[2]),r+2}return-1}return-1}function x(){this.attributeNames={}}function k(e,t){var i,r=[],s=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;s.lastIndex=t,s.exec(e);while(i=s.exec(e))if(r.push(i),i[1])return r}m.prototype=new Error,m.prototype.name=m.name,g.prototype={parse:function(e,t,i){var r=this.domBuilder;r.startDocument(),w(t,t={}),y(e,t,i,r,this.errorHandler),r.endDocument()}},x.prototype={setTagName:function(e){if(!a.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,i){if(!a.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},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=g,t.ParseError=m},e1c8:function(e,t,i){var r=i("89a7"),s=r.find,n=r.NAMESPACE;function a(e){return""!==e}function o(e){return e?e.split(/[\t\n\f\r ]+/).filter(a):[]}function l(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function d(e){if(!e)return[];var t=o(e);return Object.keys(t.reduce(l,{}))}function u(e){return function(t){return e&&-1!==e.indexOf(t)}}function c(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function h(e,t){var i=e.prototype;if(!(i instanceof t)){function r(){}r.prototype=t.prototype,r=new r,c(i,r),e.prototype=i=r}i.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),i.constructor=e)}var p={},f=p.ELEMENT_NODE=1,m=p.ATTRIBUTE_NODE=2,g=p.TEXT_NODE=3,y=p.CDATA_SECTION_NODE=4,v=p.ENTITY_REFERENCE_NODE=5,b=p.ENTITY_NODE=6,_=p.PROCESSING_INSTRUCTION_NODE=7,T=p.COMMENT_NODE=8,S=p.DOCUMENT_NODE=9,w=p.DOCUMENT_TYPE_NODE=10,E=p.DOCUMENT_FRAGMENT_NODE=11,C=p.NOTATION_NODE=12,x={},k={},I=(x.INDEX_SIZE_ERR=(k[1]="Index size error",1),x.DOMSTRING_SIZE_ERR=(k[2]="DOMString size error",2),x.HIERARCHY_REQUEST_ERR=(k[3]="Hierarchy request error",3)),A=(x.WRONG_DOCUMENT_ERR=(k[4]="Wrong document",4),x.INVALID_CHARACTER_ERR=(k[5]="Invalid character",5),x.NO_DATA_ALLOWED_ERR=(k[6]="No data allowed",6),x.NO_MODIFICATION_ALLOWED_ERR=(k[7]="No modification allowed",7),x.NOT_FOUND_ERR=(k[8]="Not found",8)),O=(x.NOT_SUPPORTED_ERR=(k[9]="Not supported",9),x.INUSE_ATTRIBUTE_ERR=(k[10]="Attribute in use",10));x.INVALID_STATE_ERR=(k[11]="Invalid state",11),x.SYNTAX_ERR=(k[12]="Syntax error",12),x.INVALID_MODIFICATION_ERR=(k[13]="Invalid modification",13),x.NAMESPACE_ERR=(k[14]="Invalid namespace",14),x.INVALID_ACCESS_ERR=(k[15]="Invalid access",15);function P(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,k[e]),this.message=k[e],Error.captureStackTrace&&Error.captureStackTrace(this,P);return i.code=e,t&&(this.message=this.message+": "+t),i}function L(){}function D(e,t){this._node=e,this._refresh=t,M(this)}function M(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(Ce(e,"length",i.length),!e.$$length||i.length<e.$$length)for(var r=i.length;r in e;r++)Object.prototype.hasOwnProperty.call(e,r)&&delete e[r];c(i,e),e._inc=t}}function N(){}function R(e,t){var i=e.length;while(i--)if(e[i]===t)return i}function U(e,t,i,r){if(r?t[R(t,r)]=i:t[t.length++]=i,e){i.ownerElement=e;var s=e.ownerDocument;s&&(r&&V(s,e,r),z(s,e,i))}}function B(e,t,i){var r=R(t,i);if(!(r>=0))throw new P(A,new Error(e.tagName+"@"+i));var s=t.length-1;while(r<s)t[r]=t[++r];if(t.length=s,e){var n=e.ownerDocument;n&&(V(n,e,i),i.ownerElement=null)}}function j(){}function F(){}function q(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function $(e,t){if(t(e))return!0;if(e=e.firstChild)do{if($(e,t))return!0}while(e=e.nextSibling)}function H(){this.ownerDocument=this}function z(e,t,i){e&&e._inc++;var r=i.namespaceURI;r===n.XMLNS&&(t._nsMap[i.prefix?i.localName:""]=i.value)}function V(e,t,i,r){e&&e._inc++;var s=i.namespaceURI;s===n.XMLNS&&delete t._nsMap[i.prefix?i.localName:""]}function G(e,t,i){if(e&&e._inc){e._inc++;var r=t.childNodes;if(i)r[r.length++]=i;else{var s=t.firstChild,n=0;while(s)r[n++]=s,s=s.nextSibling;r.length=n,delete r[r.length]}}}function W(e,t){var i=t.previousSibling,r=t.nextSibling;return i?i.nextSibling=r:e.firstChild=r,r?r.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,G(e.ownerDocument,e),t}function X(e){return e&&(e.nodeType===F.DOCUMENT_NODE||e.nodeType===F.DOCUMENT_FRAGMENT_NODE||e.nodeType===F.ELEMENT_NODE)}function Y(e){return e&&(J(e)||Q(e)||K(e)||e.nodeType===F.DOCUMENT_FRAGMENT_NODE||e.nodeType===F.COMMENT_NODE||e.nodeType===F.PROCESSING_INSTRUCTION_NODE)}function K(e){return e&&e.nodeType===F.DOCUMENT_TYPE_NODE}function J(e){return e&&e.nodeType===F.ELEMENT_NODE}function Q(e){return e&&e.nodeType===F.TEXT_NODE}function Z(e,t){var i=e.childNodes||[];if(s(i,J)||K(t))return!1;var r=s(i,K);return!(t&&r&&i.indexOf(r)>i.indexOf(t))}function ee(e,t){var i=e.childNodes||[];function r(e){return J(e)&&e!==t}if(s(i,r))return!1;var n=s(i,K);return!(t&&n&&i.indexOf(n)>i.indexOf(t))}function te(e,t,i){if(!X(e))throw new P(I,"Unexpected parent node type "+e.nodeType);if(i&&i.parentNode!==e)throw new P(A,"child not in parent");if(!Y(t)||K(t)&&e.nodeType!==F.DOCUMENT_NODE)throw new P(I,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function ie(e,t,i){var r=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===F.DOCUMENT_FRAGMENT_NODE){var a=n.filter(J);if(a.length>1||s(n,Q))throw new P(I,"More than one element or text in fragment");if(1===a.length&&!Z(e,i))throw new P(I,"Element in fragment can not be inserted before doctype")}if(J(t)&&!Z(e,i))throw new P(I,"Only one element can be added and only after doctype");if(K(t)){if(s(r,K))throw new P(I,"Only one doctype is allowed");var o=s(r,J);if(i&&r.indexOf(o)<r.indexOf(i))throw new P(I,"Doctype can only be inserted before an element");if(!i&&o)throw new P(I,"Doctype can not be appended since element is present")}}function re(e,t,i){var r=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===F.DOCUMENT_FRAGMENT_NODE){var a=n.filter(J);if(a.length>1||s(n,Q))throw new P(I,"More than one element or text in fragment");if(1===a.length&&!ee(e,i))throw new P(I,"Element in fragment can not be inserted before doctype")}if(J(t)&&!ee(e,i))throw new P(I,"Only one element can be added and only after doctype");if(K(t)){function o(e){return K(e)&&e!==i}if(s(r,o))throw new P(I,"Only one doctype is allowed");var l=s(r,J);if(i&&r.indexOf(l)<r.indexOf(i))throw new P(I,"Doctype can only be inserted before an element")}}function se(e,t,i,r){te(e,t,i),e.nodeType===F.DOCUMENT_NODE&&(r||ie)(e,t,i);var s=t.parentNode;if(s&&s.removeChild(t),t.nodeType===E){var n=t.firstChild;if(null==n)return t;var a=t.lastChild}else n=a=t;var o=i?i.previousSibling:e.lastChild;n.previousSibling=o,a.nextSibling=i,o?o.nextSibling=n:e.firstChild=n,null==i?e.lastChild=a:i.previousSibling=a;do{n.parentNode=e}while(n!==a&&(n=n.nextSibling));return G(e.ownerDocument||e,e),t.nodeType==E&&(t.firstChild=t.lastChild=null),t}function ne(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,G(e.ownerDocument,e,t),t}function ae(){this._nsMap={}}function oe(){}function le(){}function de(){}function ue(){}function ce(){}function he(){}function pe(){}function fe(){}function me(){}function ge(){}function ye(){}function ve(){}function be(e,t){var i=[],r=9==this.nodeType&&this.documentElement||this,s=r.prefix,n=r.namespaceURI;if(n&&null==s){s=r.lookupPrefix(n);if(null==s)var a=[{namespace:n,prefix:null}]}return Se(this,i,e,t,a),i.join("")}function _e(e,t,i){var r=e.prefix||"",s=e.namespaceURI;if(!s)return!1;if("xml"===r&&s===n.XML||s===n.XMLNS)return!1;var a=i.length;while(a--){var o=i[a];if(o.prefix===r)return o.namespace!==s}return!0}function Te(e,t,i){e.push(" ",t,'="',i.replace(/[<>&"\t\n\r]/g,q),'"')}function Se(e,t,i,r,s){if(s||(s=[]),r){if(e=r(e),!e)return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case f:var a=e.attributes,o=a.length,l=e.firstChild,d=e.tagName;i=n.isHTML(e.namespaceURI)||i;var u=d;if(!i&&!e.prefix&&e.namespaceURI){for(var c,h=0;h<a.length;h++)if("xmlns"===a.item(h).name){c=a.item(h).value;break}if(!c)for(var p=s.length-1;p>=0;p--){var b=s[p];if(""===b.prefix&&b.namespace===e.namespaceURI){c=b.namespace;break}}if(c!==e.namespaceURI)for(p=s.length-1;p>=0;p--){b=s[p];if(b.namespace===e.namespaceURI){b.prefix&&(u=b.prefix+":"+d);break}}}t.push("<",u);for(var C=0;C<o;C++){var x=a.item(C);"xmlns"==x.prefix?s.push({prefix:x.localName,namespace:x.value}):"xmlns"==x.nodeName&&s.push({prefix:"",namespace:x.value})}for(C=0;C<o;C++){x=a.item(C);if(_e(x,i,s)){var k=x.prefix||"",I=x.namespaceURI;Te(t,k?"xmlns:"+k:"xmlns",I),s.push({prefix:k,namespace:I})}Se(x,t,i,r,s)}if(d===u&&_e(e,i,s)){k=e.prefix||"",I=e.namespaceURI;Te(t,k?"xmlns:"+k:"xmlns",I),s.push({prefix:k,namespace:I})}if(l||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(d)){if(t.push(">"),i&&/^script$/i.test(d))while(l)l.data?t.push(l.data):Se(l,t,i,r,s.slice()),l=l.nextSibling;else while(l)Se(l,t,i,r,s.slice()),l=l.nextSibling;t.push("</",u,">")}else t.push("/>");return;case S:case E:l=e.firstChild;while(l)Se(l,t,i,r,s.slice()),l=l.nextSibling;return;case m:return Te(t,e.name,e.value);case g:return t.push(e.data.replace(/[<&>]/g,q));case y:return t.push("<![CDATA[",e.data,"]]>");case T:return t.push("\x3c!--",e.data,"--\x3e");case w:var A=e.publicId,O=e.systemId;if(t.push("<!DOCTYPE ",e.name),A)t.push(" PUBLIC ",A),O&&"."!=O&&t.push(" ",O),t.push(">");else if(O&&"."!=O)t.push(" SYSTEM ",O,">");else{var P=e.internalSubset;P&&t.push(" [",P,"]"),t.push(">")}return;case _:return t.push("<?",e.target," ",e.data,"?>");case v:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function we(e,t,i){var r;switch(t.nodeType){case f:r=t.cloneNode(!1),r.ownerDocument=e;case E:break;case m:i=!0;break}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,i){var s=t.firstChild;while(s)r.appendChild(we(e,s,i)),s=s.nextSibling}return r}function Ee(e,t,i){var r=new t.constructor;for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s)){var n=t[s];"object"!=typeof n&&n!=r[s]&&(r[s]=n)}switch(t.childNodes&&(r.childNodes=new L),r.ownerDocument=e,r.nodeType){case f:var a=t.attributes,o=r.attributes=new N,l=a.length;o._ownerElement=r;for(var d=0;d<l;d++)r.setAttributeNode(Ee(e,a.item(d),!0));break;case m:i=!0}if(i){var u=t.firstChild;while(u)r.appendChild(Ee(e,u,i)),u=u.nextSibling}return r}function Ce(e,t,i){e[t]=i}P.prototype=Error.prototype,c(x,P),L.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],r=0;r<this.length;r++)Se(this[r],i,e,t);return i.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},D.prototype.item=function(e){return M(this),this[e]||null},h(D,L),N.prototype={length:0,item:L.prototype.item,getNamedItem:function(e){var t=this.length;while(t--){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new P(O);var i=this.getNamedItem(e.nodeName);return U(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new P(O);return t=this.getNamedItemNS(e.namespaceURI,e.localName),U(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return B(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return B(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){var i=this.length;while(i--){var r=this[i];if(r.localName==t&&r.namespaceURI==e)return r}return null}},j.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var r=new H;if(r.implementation=this,r.childNodes=new L,r.doctype=i||null,i&&r.appendChild(i),t){var s=r.createElementNS(e,t);r.appendChild(s)}return r},createDocumentType:function(e,t,i){var r=new he;return r.name=e,r.nodeName=e,r.publicId=t||"",r.systemId=i||"",r}},F.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return se(this,e,t)},replaceChild:function(e,t){se(this,e,t,re),t&&this.removeChild(t)},removeChild:function(e){return W(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Ee(this.ownerDocument||this,this,e)},normalize:function(){var e=this.firstChild;while(e){var t=e.nextSibling;t&&t.nodeType==g&&e.nodeType==g?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){var t=this;while(t){var i=t._nsMap;if(i)for(var r in i)if(Object.prototype.hasOwnProperty.call(i,r)&&i[r]===e)return r;t=t.nodeType==m?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){var t=this;while(t){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==m?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){var t=this.lookupPrefix(e);return null==t}},c(p,F),c(p,F.prototype),H.prototype={nodeName:"#document",nodeType:S,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==E){var i=e.firstChild;while(i){var r=i.nextSibling;this.insertBefore(i,t),i=r}return e}return se(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===f&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),W(this,e)},replaceChild:function(e,t){se(this,e,t,re),e.ownerDocument=this,t&&this.removeChild(t),J(e)&&(this.documentElement=e)},importNode:function(e,t){return we(this,e,t)},getElementById:function(e){var t=null;return $(this.documentElement,(function(i){if(i.nodeType==f&&i.getAttribute("id")==e)return t=i,!0})),t},getElementsByClassName:function(e){var t=d(e);return new D(this,(function(i){var r=[];return t.length>0&&$(i.documentElement,(function(s){if(s!==i&&s.nodeType===f){var n=s.getAttribute("class");if(n){var a=e===n;if(!a){var o=d(n);a=t.every(u(o))}a&&r.push(s)}}})),r}))},createElement:function(e){var t=new ae;t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new L;var i=t.attributes=new N;return i._ownerElement=t,t},createDocumentFragment:function(){var e=new ge;return e.ownerDocument=this,e.childNodes=new L,e},createTextNode:function(e){var t=new de;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ue;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new ce;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new ye;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new oe;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new me;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new ae,r=t.split(":"),s=i.attributes=new N;return i.childNodes=new L,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==r.length?(i.prefix=r[0],i.localName=r[1]):i.localName=t,s._ownerElement=i,i},createAttributeNS:function(e,t){var i=new oe,r=t.split(":");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==r.length?(i.prefix=r[0],i.localName=r[1]):i.localName=t,i}},h(H,F),ae.prototype={nodeType:f,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 i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=""+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===E?this.insertBefore(e,null):ne(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 i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||""},setAttributeNS:function(e,t,i){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+i,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new D(this,(function(t){var i=[];return $(t,(function(r){r===t||r.nodeType!=f||"*"!==e&&r.tagName!=e||i.push(r)})),i}))},getElementsByTagNameNS:function(e,t){return new D(this,(function(i){var r=[];return $(i,(function(s){s===i||s.nodeType!==f||"*"!==e&&s.namespaceURI!==e||"*"!==t&&s.localName!=t||r.push(s)})),r}))}},H.prototype.getElementsByTagName=ae.prototype.getElementsByTagName,H.prototype.getElementsByTagNameNS=ae.prototype.getElementsByTagNameNS,h(ae,F),oe.prototype.nodeType=m,h(oe,F),le.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[I])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,i){var r=this.data.substring(0,e),s=this.data.substring(e+t);i=r+i+s,this.nodeValue=this.data=i,this.length=i.length}},h(le,F),de.prototype={nodeName:"#text",nodeType:g,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},h(de,le),ue.prototype={nodeName:"#comment",nodeType:T},h(ue,le),ce.prototype={nodeName:"#cdata-section",nodeType:y},h(ce,le),he.prototype.nodeType=w,h(he,F),pe.prototype.nodeType=C,h(pe,F),fe.prototype.nodeType=b,h(fe,F),me.prototype.nodeType=v,h(me,F),ge.prototype.nodeName="#document-fragment",ge.prototype.nodeType=E,h(ge,F),ye.prototype.nodeType=_,h(ye,F),ve.prototype.serializeToString=function(e,t,i){return be.call(e,t,i)},F.prototype.toString=be;try{if(Object.defineProperty){function xe(e){switch(e.nodeType){case f:case E:var t=[];e=e.firstChild;while(e)7!==e.nodeType&&8!==e.nodeType&&t.push(xe(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(D.prototype,"length",{get:function(){return M(this),this.$$length}}),Object.defineProperty(F.prototype,"textContent",{get:function(){return xe(this)},set:function(e){switch(this.nodeType){case f:case E:while(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}}}),Ce=function(e,t,i){e["$$"+t]=i}}}catch(ke){}t.DocumentType=he,t.DOMException=P,t.DOMImplementation=j,t.Element=ae,t.Node=F,t.NodeList=L,t.XMLSerializer=ve},e282:function(e,t,i){},e330:function(e,t,i){"use strict";var r=i("40d5"),s=Function.prototype,n=s.call,a=r&&s.bind.bind(n,n);e.exports=r?a:function(e){return function(){return n.apply(e,arguments)}}},e3db:function(e,t){var i={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==i.call(e)}},e683:function(e,t,i){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},e893:function(e,t,i){"use strict";var r=i("1a2d"),s=i("56ef"),n=i("06cf"),a=i("9bf2");e.exports=function(e,t,i){for(var o=s(t),l=a.f,d=n.f,u=0;u<o.length;u++){var c=o[u];r(e,c)||i&&r(i,c)||l(e,c,d(t,c))}}},e8b5:function(e,t,i){"use strict";var r=i("c6b6");e.exports=Array.isArray||function(e){return"Array"==r(e)}},eab8:function(e,t,i){"use strict";var r=i("6c71"),s=i.n(r);s.a},ef34:function(e,t,i){(function(t){var r,s="undefined"!==typeof t?t:"undefined"!==typeof window?window:{},n=i(0);"undefined"!==typeof document?r=document:(r=s["__GLOBAL_DOCUMENT_CACHE@4"],r||(r=s["__GLOBAL_DOCUMENT_CACHE@4"]=n)),e.exports=r}).call(this,i("24aa"))},f0e2:function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return bn}));var r=i("be09"),s=i.n(r),n=i("ef34"),a=i.n(n),o=i("df33"),l=i.n(o),d=i("8c10"),u=i.n(d),c=i("3603"),h=i.n(c),p=i("2b8c"),f=i.n(p),m=i("63ec"),g=i("a559"),y=i.n(g),v=i("d749"),b=i("17a3"),_=i("8b53"),T=i("de66"),S=i("8484"),w=i("81c0"),E=i.n(w),C=i("321f"),x=i("f8a8"),k=i("36c6"),I="8.0.4";const A={},O=function(e,t){return A[e]=A[e]||[],t&&(A[e]=A[e].concat(t)),A[e]},P=function(e,t){O(e,t)},L=function(e,t){const i=O(e).indexOf(t);return!(i<=-1)&&(A[e]=A[e].slice(),A[e].splice(i,1),!0)},D=function(e,t){O(e,[].concat(t).map(t=>{const i=(...r)=>(L(e,i),t(...r));return i}))},M={prefixed:!0},N=[["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"]],R=N[0];let U;for(let t=0;t<N.length;t++)if(N[t][1]in a.a){U=N[t];break}if(U){for(let e=0;e<U.length;e++)M[R[e]]=U[e];M.prefixed=U[0]!==R[0]}let B=[];const j=(e,t)=>(i,r,n)=>{const a=t.levels[r],o=new RegExp(`^(${a})$`);if("log"!==i&&n.unshift(i.toUpperCase()+":"),n.unshift(e+":"),B){B.push([].concat(n));const e=B.length-1e3;B.splice(0,e>0?e:0)}if(!s.a.console)return;let l=s.a.console[i];l||"debug"!==i||(l=s.a.console.info||s.a.console.log),l&&a&&o.test(i)&&l[Array.isArray(n)?"apply":"call"](s.a.console,n)};function F(e){let t,i="info";const r=function(...e){t("log",i,e)};return t=j(e,r),r.createLogger=t=>F(e+": "+t),r.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:i},r.level=e=>{if("string"===typeof e){if(!r.levels.hasOwnProperty(e))throw new Error(`"${e}" in not a valid log level`);i=e}return i},r.history=()=>B?[].concat(B):[],r.history.filter=e=>(B||[]).filter(t=>new RegExp(`.*${e}.*`).test(t[0])),r.history.clear=()=>{B&&(B.length=0)},r.history.disable=()=>{null!==B&&(B.length=0,B=null)},r.history.enable=()=>{null===B&&(B=[])},r.error=(...e)=>t("error",i,e),r.warn=(...e)=>t("warn",i,e),r.debug=(...e)=>t("debug",i,e),r}const q=F("VIDEOJS"),$=q.createLogger,H=Object.prototype.toString,z=function(e){return W(e)?Object.keys(e):[]};function V(e,t){z(e).forEach(i=>t(e[i],i))}function G(e,t,i=0){return z(e).reduce((i,r)=>t(i,e[r],r),i)}function W(e){return!!e&&"object"===typeof e}function X(e){return W(e)&&"[object Object]"===H.call(e)&&e.constructor===Object}function Y(...e){const t={};return e.forEach(e=>{e&&V(e,(e,i)=>{X(e)?(X(t[i])||(t[i]={}),t[i]=Y(t[i],e)):t[i]=e})}),t}function K(e,t,i,r=!0){const s=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),n={configurable:!0,enumerable:!0,get(){const e=i();return s(e),e}};return r&&(n.set=s),Object.defineProperty(e,t,n)}var J=Object.freeze({__proto__:null,each:V,reduce:G,isObject:W,isPlain:X,merge:Y,defineLazyProperty:K});let Q,Z=!1,ee=null,te=!1,ie=!1,re=!1,se=!1,ne=!1,ae=null,oe=null,le=null,de=!1,ue=!1,ce=!1,he=!1;const pe=Boolean(_e()&&("ontouchstart"in s.a||s.a.navigator.maxTouchPoints||s.a.DocumentTouch&&s.a.document instanceof s.a.DocumentTouch)),fe=s.a.navigator&&s.a.navigator.userAgentData;if(fe&&(te="Android"===fe.platform,re=Boolean(fe.brands.find(e=>"Microsoft Edge"===e.brand)),se=Boolean(fe.brands.find(e=>"Chromium"===e.brand)),ne=!re&&se,ae=oe=(fe.brands.find(e=>"Chromium"===e.brand)||{}).version||null,ue="Windows"===fe.platform),!se){const e=s.a.navigator&&s.a.navigator.userAgent||"";Z=/iPod/i.test(e),ee=function(){const t=e.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),te=/Android/i.test(e),Q=function(){const t=e.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;const i=t[1]&&parseFloat(t[1]),r=t[2]&&parseFloat(t[2]);return i&&r?parseFloat(t[1]+"."+t[2]):i||null}(),ie=/Firefox/i.test(e),re=/Edg/i.test(e),se=/Chrome/i.test(e)||/CriOS/i.test(e),ne=!re&&se,ae=oe=function(){const t=e.match(/(Chrome|CriOS)\/(\d+)/);return t&&t[2]?parseFloat(t[2]):null}(),le=function(){const t=/MSIE\s(\d+)\.\d/.exec(e);let i=t&&parseFloat(t[1]);return!i&&/Trident\/7.0/i.test(e)&&/rv:11.0/.test(e)&&(i=11),i}(),de=/Safari/i.test(e)&&!ne&&!te&&!re,ue=/Windows/i.test(e),ce=/iPad/i.test(e)||de&&pe&&!/iPhone/i.test(e),he=/iPhone/i.test(e)&&!ce}const me=he||ce||Z,ge=(de||me)&&!ne;var ye=Object.freeze({__proto__:null,get IS_IPOD(){return Z},get IOS_VERSION(){return ee},get IS_ANDROID(){return te},get ANDROID_VERSION(){return Q},get IS_FIREFOX(){return ie},get IS_EDGE(){return re},get IS_CHROMIUM(){return se},get IS_CHROME(){return ne},get CHROMIUM_VERSION(){return ae},get CHROME_VERSION(){return oe},get IE_VERSION(){return le},get IS_SAFARI(){return de},get IS_WINDOWS(){return ue},get IS_IPAD(){return ce},get IS_IPHONE(){return he},TOUCH_ENABLED:pe,IS_IOS:me,IS_ANY_SAFARI:ge});function ve(e){return"string"===typeof e&&Boolean(e.trim())}function be(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function _e(){return a.a===s.a.document}function Te(e){return W(e)&&1===e.nodeType}function Se(){try{return s.a.parent!==s.a.self}catch(e){return!0}}function we(e){return function(t,i){if(!ve(t))return a.a[e](null);ve(i)&&(i=a.a.querySelector(i));const r=Te(i)?i:a.a;return r[e]&&r[e](t)}}function Ee(e="div",t={},i={},r){const s=a.a.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){const i=t[e];"textContent"===e?Ce(s,i):s[e]===i&&"tabIndex"!==e||(s[e]=i)})),Object.getOwnPropertyNames(i).forEach((function(e){s.setAttribute(e,i[e])})),r&&ze(s,r),s}function Ce(e,t){return"undefined"===typeof e.textContent?e.innerText=t:e.textContent=t,e}function xe(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function ke(e,t){return be(t),e.classList.contains(t)}function Ie(e,...t){return e.classList.add(...t.reduce((e,t)=>e.concat(t.split(/\s+/)),[])),e}function Ae(e,...t){return e?(e.classList.remove(...t.reduce((e,t)=>e.concat(t.split(/\s+/)),[])),e):(q.warn("removeClass was called with an element that doesn't exist"),null)}function Oe(e,t,i){return"function"===typeof i&&(i=i(e,t)),"boolean"!==typeof i&&(i=void 0),t.split(/\s+/).forEach(t=>e.classList.toggle(t,i)),e}function Pe(e,t){Object.getOwnPropertyNames(t).forEach((function(i){const r=t[i];null===r||"undefined"===typeof r||!1===r?e.removeAttribute(i):e.setAttribute(i,!0===r?"":r)}))}function Le(e){const t={},i=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&e.attributes.length>0){const r=e.attributes;for(let s=r.length-1;s>=0;s--){const n=r[s].name;let a=r[s].value;"boolean"!==typeof e[n]&&-1===i.indexOf(","+n+",")||(a=null!==a),t[n]=a}}return t}function De(e,t){return e.getAttribute(t)}function Me(e,t,i){e.setAttribute(t,i)}function Ne(e,t){e.removeAttribute(t)}function Re(){a.a.body.focus(),a.a.onselectstart=function(){return!1}}function Ue(){a.a.onselectstart=function(){return!0}}function Be(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach(e=>{void 0!==t[e]&&(i[e]=t[e])}),i.height||(i.height=parseFloat(Ye(e,"height"))),i.width||(i.width=parseFloat(Ye(e,"width"))),i}}function je(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let r=0,s=0;while(e.offsetParent&&e!==a.a[M.fullscreenElement])r+=e.offsetLeft,s+=e.offsetTop,e=e.offsetParent;return{left:r,top:s,width:t,height:i}}function Fe(e,t){const i={x:0,y:0};if(me){let t=e;while(t&&"html"!==t.nodeName.toLowerCase()){const e=Ye(t,"transform");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\s/).map(Number);i.x+=t[12],i.y+=t[13]}t=t.parentNode}}const r={},s=je(t.target),n=je(e),a=n.width,o=n.height;let l=t.offsetY-(n.top-s.top),d=t.offsetX-(n.left-s.left);return t.changedTouches&&(d=t.changedTouches[0].pageX-n.left,l=t.changedTouches[0].pageY+n.top,me&&(d-=i.x,l-=i.y)),r.y=1-Math.max(0,Math.min(1,l/o)),r.x=Math.max(0,Math.min(1,d/a)),r}function qe(e){return W(e)&&3===e.nodeType}function $e(e){while(e.firstChild)e.removeChild(e.firstChild);return e}function He(e){return"function"===typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(e=>("function"===typeof e&&(e=e()),Te(e)||qe(e)?e:"string"===typeof e&&/\S/.test(e)?a.a.createTextNode(e):void 0)).filter(e=>e)}function ze(e,t){return He(t).forEach(t=>e.appendChild(t)),e}function Ve(e,t){return ze($e(e),t)}function Ge(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))}const We=we("querySelector"),Xe=we("querySelectorAll");function Ye(e,t){if(!e||!t)return"";if("function"===typeof s.a.getComputedStyle){let r;try{r=s.a.getComputedStyle(e)}catch(i){return""}return r?r.getPropertyValue(t)||r[t]:""}return""}var Ke=Object.freeze({__proto__:null,isReal:_e,isEl:Te,isInFrame:Se,createEl:Ee,textContent:Ce,prependTo:xe,hasClass:ke,addClass:Ie,removeClass:Ae,toggleClass:Oe,setAttributes:Pe,getAttributes:Le,getAttribute:De,setAttribute:Me,removeAttribute:Ne,blockTextSelection:Re,unblockTextSelection:Ue,getBoundingClientRect:Be,findPosition:je,getPointerPosition:Fe,isTextNode:qe,emptyEl:$e,normalizeContent:He,appendContent:ze,insertContent:Ve,isSingleLeftClick:Ge,$:We,$$:Xe,computedStyle:Ye});let Je,Qe=!1;const Ze=function(){if(!1===Je.options.autoSetup)return;const e=Array.prototype.slice.call(a.a.getElementsByTagName("video")),t=Array.prototype.slice.call(a.a.getElementsByTagName("audio")),i=Array.prototype.slice.call(a.a.getElementsByTagName("video-js")),r=e.concat(t,i);if(r&&r.length>0)for(let s=0,n=r.length;s<n;s++){const e=r[s];if(!e||!e.getAttribute){et(1);break}if(void 0===e.player){const t=e.getAttribute("data-setup");null!==t&&Je(e)}}else Qe||et(1)};function et(e,t){_e()&&(t&&(Je=t),s.a.setTimeout(Ze,e))}function tt(){Qe=!0,s.a.removeEventListener("load",tt)}_e()&&("complete"===a.a.readyState?tt():s.a.addEventListener("load",tt));const it=function(e){const t=a.a.createElement("style");return t.className=e,t},rt=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var st=new WeakMap;const nt=3;let at,ot=nt;function lt(){return ot++}function dt(e,t){if(!st.has(e))return;const i=st.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&st.delete(e)}function ut(e,t,i,r){i.forEach((function(i){e(t,i,r)}))}function ct(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const r=e||s.a.event;e={};for(const t in r)"layerX"!==t&&"layerY"!==t&&"keyLocation"!==t&&"webkitMovementX"!==t&&"webkitMovementY"!==t&&"path"!==t&&("returnValue"===t&&r.preventDefault||(e[t]=r[t]));if(e.target||(e.target=e.srcElement||a.a),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){r.preventDefault&&r.preventDefault(),e.returnValue=!1,r.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),e.cancelBubble=!0,r.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=a.a.documentElement,i=a.a.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const ht=function(){if("boolean"!==typeof at){at=!1;try{const e=Object.defineProperty({},"passive",{get(){at=!0}});s.a.addEventListener("test",null,e),s.a.removeEventListener("test",null,e)}catch(e){}}return at},pt=["touchstart","touchmove"];function ft(e,t,i){if(Array.isArray(t))return ut(ft,e,t,i);st.has(e)||st.set(e,{});const r=st.get(e);if(r.handlers||(r.handlers={}),r.handlers[t]||(r.handlers[t]=[]),i.guid||(i.guid=lt()),r.handlers[t].push(i),r.dispatcher||(r.disabled=!1,r.dispatcher=function(t,i){if(r.disabled)return;t=ct(t);const s=r.handlers[t.type];if(s){const r=s.slice(0);for(let s=0,a=r.length;s<a;s++){if(t.isImmediatePropagationStopped())break;try{r[s].call(e,t,i)}catch(n){q.error(n)}}}}),1===r.handlers[t].length)if(e.addEventListener){let i=!1;ht()&&pt.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,r.dispatcher,i)}else e.attachEvent&&e.attachEvent("on"+t,r.dispatcher)}function mt(e,t,i){if(!st.has(e))return;const r=st.get(e);if(!r.handlers)return;if(Array.isArray(t))return ut(mt,e,t,i);const s=function(e,t){r.handlers[t]=[],dt(e,t)};if(void 0===t){for(const t in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},t)&&s(e,t);return}const n=r.handlers[t];if(n)if(i){if(i.guid)for(let e=0;e<n.length;e++)n[e].guid===i.guid&&n.splice(e--,1);dt(e,t)}else s(e,t)}function gt(e,t,i){const r=st.has(e)?st.get(e):{},s=e.parentNode||e.ownerDocument;if("string"===typeof t?t={type:t,target:e}:t.target||(t.target=e),t=ct(t),r.dispatcher&&r.dispatcher.call(e,t,i),s&&!t.isPropagationStopped()&&!0===t.bubbles)gt.call(null,s,t,i);else if(!s&&!t.defaultPrevented&&t.target&&t.target[t.type]){st.has(t.target)||st.set(t.target,{});const e=st.get(t.target);t.target[t.type]&&(e.disabled=!0,"function"===typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function yt(e,t,i){if(Array.isArray(t))return ut(yt,e,t,i);const r=function(){mt(e,t,r),i.apply(this,arguments)};r.guid=i.guid=i.guid||lt(),ft(e,t,r)}function vt(e,t,i){const r=function(){mt(e,t,r),i.apply(this,arguments)};r.guid=i.guid=i.guid||lt(),ft(e,t,r)}var bt=Object.freeze({__proto__:null,fixEvent:ct,on:ft,off:mt,trigger:gt,one:yt,any:vt});const _t=30,Tt=function(e,t,i){t.guid||(t.guid=lt());const r=t.bind(e);return r.guid=i?i+"_"+t.guid:t.guid,r},St=function(e,t){let i=s.a.performance.now();const r=function(...r){const n=s.a.performance.now();n-i>=t&&(e(...r),i=n)};return r},wt=function(e,t,i,r=s.a){let n;const a=()=>{r.clearTimeout(n),n=null},o=function(){const s=this,a=arguments;let o=function(){n=null,o=null,i||e.apply(s,a)};!n&&i&&e.apply(s,a),r.clearTimeout(n),n=r.setTimeout(o,t)};return o.cancel=a,o};var Et=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:_t,bind_:Tt,throttle:St,debounce:wt});let Ct;class xt{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},ft(this,e,t),this.addEventListener=i}off(e,t){mt(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},yt(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},vt(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;"string"===typeof e&&(e={type:t}),e=ct(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),gt(this,e)}queueTrigger(e){Ct||(Ct=new Map);const t=e.type||e;let i=Ct.get(this);i||(i=new Map,Ct.set(this,i));const r=i.get(t);i.delete(t),s.a.clearTimeout(r);const n=s.a.setTimeout(()=>{i.delete(t),0===i.size&&(i=null,Ct.delete(this)),this.trigger(e)},0);i.set(t,n)}}xt.prototype.allowedEvents_={},xt.prototype.addEventListener=xt.prototype.on,xt.prototype.removeEventListener=xt.prototype.off,xt.prototype.dispatchEvent=xt.prototype.trigger;const kt=e=>"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=e=>e instanceof xt||!!e.eventBusEl_&&["on","one","off","trigger"].every(t=>"function"===typeof e[t]),At=(e,t)=>{It(e)?t():(e.eventedCallbacks||(e.eventedCallbacks=[]),e.eventedCallbacks.push(t))},Ot=e=>"string"===typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length,Pt=(e,t,i)=>{if(!e||!e.nodeName&&!It(e))throw new Error(`Invalid target for ${kt(t)}#${i}; must be a DOM node or evented object.`)},Lt=(e,t,i)=>{if(!Ot(e))throw new Error(`Invalid event type for ${kt(t)}#${i}; must be a non-empty string or array.`)},Dt=(e,t,i)=>{if("function"!==typeof e)throw new Error(`Invalid listener for ${kt(t)}#${i}; must be a function.`)},Mt=(e,t,i)=>{const r=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let s,n,a;return r?(s=e.eventBusEl_,t.length>=3&&t.shift(),[n,a]=t):[s,n,a]=t,Pt(s,e,i),Lt(n,e,i),Dt(a,e,i),a=Tt(e,a),{isTargetingSelf:r,target:s,type:n,listener:a}},Nt=(e,t,i,r)=>{Pt(e,e,t),e.nodeName?bt[t](e,i,r):e[t](i,r)},Rt={on(...e){const{isTargetingSelf:t,target:i,type:r,listener:s}=Mt(this,e,"on");if(Nt(i,"on",r,s),!t){const e=()=>this.off(i,r,s);e.guid=s.guid;const t=()=>this.off("dispose",e);t.guid=s.guid,Nt(this,"on","dispose",e),Nt(i,"on","dispose",t)}},one(...e){const{isTargetingSelf:t,target:i,type:r,listener:s}=Mt(this,e,"one");if(t)Nt(i,"one",r,s);else{const e=(...t)=>{this.off(i,r,e),s.apply(null,t)};e.guid=s.guid,Nt(i,"one",r,e)}},any(...e){const{isTargetingSelf:t,target:i,type:r,listener:s}=Mt(this,e,"any");if(t)Nt(i,"any",r,s);else{const e=(...t)=>{this.off(i,r,e),s.apply(null,t)};e.guid=s.guid,Nt(i,"any",r,e)}},off(e,t,i){if(!e||Ot(e))mt(this.eventBusEl_,e,t);else{const r=e,s=t;Pt(r,this,"off"),Lt(s,this,"off"),Dt(i,this,"off"),i=Tt(this,i),this.off("dispose",i),r.nodeName?(mt(r,s,i),mt(r,"dispose",i)):It(r)&&(r.off(s,i),r.off("dispose",i))}},trigger(e,t){Pt(this.eventBusEl_,this,"trigger");const i=e&&"string"!==typeof e?e.type:e;if(!Ot(i))throw new Error(`Invalid event type for ${kt(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return gt(this.eventBusEl_,e,t)}};function Ut(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey "${i}" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=Ee("span",{className:"vjs-event-bus"});return Object.assign(e,Rt),e.eventedCallbacks&&e.eventedCallbacks.forEach(e=>{e()}),e.on("dispose",()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&st.has(e)&&st.delete(e)})),s.a.setTimeout(()=>{e.eventBusEl_=null},0)}),e}const Bt={state:{},setState(e){let t;return"function"===typeof e&&(e=e()),V(e,(e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e}),t&&It(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function jt(e,t){return Object.assign(e,Bt),e.state=Object.assign({},e.state,t),"function"===typeof e.handleStateChanged&&It(e)&&e.on("statechanged",e.handleStateChanged),e}const Ft=function(e){return"string"!==typeof e?e:e.replace(/./,e=>e.toLowerCase())},qt=function(e){return"string"!==typeof e?e:e.replace(/./,e=>e.toUpperCase())},$t=function(e,t){return qt(e)===qt(t)};var Ht=Object.freeze({__proto__:null,toLowerCase:Ft,toTitleCase:qt,titleCaseEquals:$t});class zt{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=Y({},this.options_),t=this.options_=Y(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||"no_player";this.id_=`${t}_component_${lt()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(" ").forEach(e=>this.addClass(e)),!1!==t.evented&&(Ut(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),jt(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=Y(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Ee(e,t,i)}localize(e,t,i=e){const r=this.player_.language&&this.player_.language(),s=this.player_.languages&&this.player_.languages(),n=s&&s[r],a=r&&r.split("-")[0],o=s&&s[a];let l=i;return n&&n[e]?l=n[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\{(\d+)\}/g,(function(e,i){const r=t[i-1];let s=r;return"undefined"===typeof r&&(s=e),s}))),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((e,t)=>e.concat(t),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}addChild(e,t={},i=this.children_.length){let r,s;if("string"===typeof e){s=qt(e);const i=t.componentClass||s;t.name=s;const n=zt.getComponent(i);if(!n)throw new Error(`Component ${i} does not exist`);if("function"!==typeof n)return null;r=new n(this.player_||this,t)}else r=e;if(r.parentComponent_&&r.parentComponent_.removeChild(r),this.children_.splice(i,0,r),r.parentComponent_=this,"function"===typeof r.id&&(this.childIndex_[r.id()]=r),s=s||r.name&&qt(r.name()),s&&(this.childNameIndex_[s]=r,this.childNameIndex_[Ft(s)]=r),"function"===typeof r.el&&r.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:Te(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(r.el(),e)}return r}removeChild(e){if("string"===typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let r=this.children_.length-1;r>=0;r--)if(this.children_[r]===e){t=!0,this.children_.splice(r,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[qt(e.name())]=null,this.childNameIndex_[Ft(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let r=e.opts;if(void 0!==t[i]&&(r=t[i]),!1===r)return;!0===r&&(r={}),r.playerOptions=this.options_.playerOptions;const s=this.addChild(i,r);s&&(this[i]=s)};let r;const s=zt.getComponent("Tech");r=Array.isArray(e)?e:Object.keys(e),r.concat(Object.keys(this.options_).filter((function(e){return!r.some((function(t){return"string"===typeof t?e===t:e===t.name}))}))).map(t=>{let i,r;return"string"===typeof t?(i=t,r=e[i]||this.options_[i]||{}):(i=t.name,r=t),{name:i,opts:r}}).filter(e=>{const t=zt.getComponent(e.opts.componentClass||qt(e.name));return t&&!s.isTech(t)}).forEach(i)}}buildCSSClass(){return""}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout((function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)}$(e,t){return We(e,t||this.contentEl())}$$(e,t){return Xe(e,t||this.contentEl())}hasClass(e){return ke(this.el_,e)}addClass(...e){Ie(this.el_,...e)}removeClass(...e){Ae(this.el_,...e)}toggleClass(e,t){Oe(this.el_,e,t)}show(){this.removeClass("vjs-hidden")}hide(){this.addClass("vjs-hidden")}lockShowing(){this.addClass("vjs-lock-showing")}unlockShowing(){this.removeClass("vjs-lock-showing")}getAttribute(e){return De(this.el_,e)}setAttribute(e,t){Me(this.el_,e,t)}removeAttribute(e){Ne(this.el_,e)}width(e,t){return this.dimension("width",e,t)}height(e,t){return this.dimension("height",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(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(i||this.trigger("componentresize"));if(!this.el_)return 0;const r=this.el_.style[e],s=r.indexOf("px");return-1!==s?parseInt(r.slice(0,s),10):parseInt(this.el_["offset"+qt(e)],10)}currentDimension(e){let t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=Ye(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i="offset"+qt(e);t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}currentWidth(){return this.currentDimension("width")}currentHeight(){return this.currentDimension("height")}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(l.a.isEventKey(e,"Tab")||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;const i=10,r=200;let n;this.on("touchstart",(function(i){1===i.touches.length&&(t={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY},e=s.a.performance.now(),n=!0)})),this.on("touchmove",(function(e){if(e.touches.length>1)n=!1;else if(t){const r=e.touches[0].pageX-t.pageX,s=e.touches[0].pageY-t.pageY,a=Math.sqrt(r*r+s*s);a>i&&(n=!1)}}));const a=function(){n=!1};this.on("touchleave",a),this.on("touchcancel",a),this.on("touchend",(function(i){if(t=null,!0===n){const t=s.a.performance.now()-e;t<r&&(i.preventDefault(),this.trigger("tap"))}}))}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Tt(this.player(),this.player().reportUserActivity);let t;this.on("touchstart",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));const i=function(i){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",i),this.on("touchcancel",i)}setTimeout(e,t){var i;return e=Tt(this,e),this.clearTimersOnDispose_(),i=s.a.setTimeout(()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()},t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),s.a.clearTimeout(e)),e}setInterval(e,t){e=Tt(this,e),this.clearTimersOnDispose_();const i=s.a.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),s.a.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=Tt(this,e),t=s.a.requestAnimationFrame(()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()}),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){if(this.namedRafs_.has(e))return;this.clearTimersOnDispose_(),t=Tt(this,t);const i=this.requestAnimationFrame(()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),s.a.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(([e,t])=>{this[e].forEach((e,i)=>this[t](i))}),this.clearingTimersOnDispose_=!1}))}static registerComponent(e,t){if("string"!==typeof e||!e)throw new Error(`Illegal component name, "${e}"; must be a non-empty string.`);const i=zt.getComponent("Tech"),r=i&&i.isTech(t),s=zt===t||zt.prototype.isPrototypeOf(t.prototype);if(r||!s){let t;throw t=r?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error(`Illegal component, "${e}"; ${t}.`)}e=qt(e),zt.components_||(zt.components_={});const n=zt.getComponent("Player");if("Player"===e&&n&&n.players){const e=n.players,t=Object.keys(e);if(e&&t.length>0&&t.map(t=>e[t]).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return zt.components_[e]=t,zt.components_[Ft(e)]=t,t}static getComponent(e){if(e&&zt.components_)return zt.components_[e]}}function Vt(e,t,i){if("number"!==typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}function Gt(e,t,i,r){return Vt(e,r,i.length-1),i[r][t]}function Wt(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error("This TimeRanges object is empty")},end(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:Gt.bind(null,"start",0,e),end:Gt.bind(null,"end",1,e)},s.a.Symbol&&s.a.Symbol.iterator&&(t[s.a.Symbol.iterator]=()=>(e||[]).values()),t}function Xt(e,t){return Array.isArray(e)?Wt(e):void 0===e||void 0===t?Wt():Wt([[e,t]])}zt.registerComponent("Component",zt);const Yt=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),r=Math.floor(e/60%60),s=Math.floor(e/3600);const n=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(s=r=i="-"),s=s>0||a>0?s+":":"",r=((s||n>=10)&&r<10?"0"+r:r)+":",i=i<10?"0"+i:i,s+r+i};let Kt=Yt;function Jt(e){Kt=e}function Qt(){Kt=Yt}function Zt(e,t=e){return Kt(e,t)}var ei=Object.freeze({__proto__:null,createTimeRanges:Xt,createTimeRange:Xt,setFormatTime:Jt,resetFormatTime:Qt,formatTime:Zt});function ti(e,t){let i,r,s=0;if(!t)return 0;e&&e.length||(e=Xt(0,0));for(let n=0;n<e.length;n++)i=e.start(n),r=e.end(n),r>t&&(r=t),s+=r-i;return s/t}function ii(e){if(e instanceof ii)return e;"number"===typeof e?this.code=e:"string"===typeof e?this.message=e:W(e)&&("number"===typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=ii.defaultMessages[this.code]||"")}ii.prototype.code=0,ii.prototype.message="",ii.prototype.status=null,ii.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],ii.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(let t=0;t<ii.errorTypes.length;t++)ii[ii.errorTypes[t]]=t,ii.prototype[ii.errorTypes[t]]=t;function ri(e){return void 0!==e&&null!==e&&"function"===typeof e.then}function si(e){ri(e)&&e.then(null,e=>{})}const ni=function(e){const t=["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((t,i,r)=>(e[i]&&(t[i]=e[i]),t),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))});return t},ai=function(e){const t=e.$$("track"),i=Array.prototype.map.call(t,e=>e.track),r=Array.prototype.map.call(t,(function(e){const t=ni(e.track);return e.src&&(t.src=e.src),t}));return r.concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===i.indexOf(e)})).map(ni))},oi=function(e,t){return e.forEach((function(e){const i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(e=>i.addCue(e))})),t.textTracks()};var li={textTracksToJson:ai,jsonToTextTracks:oi,trackToJson_:ni};const di="vjs-modal-dialog";class ui extends zt{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Ee("div",{className:di+"-content"},{role:"document"}),this.descEl_=Ee("p",{className:di+"-description vjs-control-text",id:this.el().getAttribute("aria-describedby")}),Ce(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${di} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||"Modal Window")}description(){let e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e}open(){if(!this.opened_){const e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}}opened(e){return"boolean"===typeof e&&this[e?"open":"close"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if("boolean"===typeof e){const t=this.closeable_=!!e;let i=this.getChild("closeButton");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=e,this.on(i,"close",this.close_)}!t&&i&&(this.off(i,"close",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,r=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),Ve(t,e),this.trigger("modalfill"),r?i.insertBefore(t,r):i.appendChild(t);const s=this.getChild("closeButton");s&&i.appendChild(s.el_)}empty(){this.trigger("beforemodalempty"),$e(this.contentEl()),this.trigger("modalempty")}content(e){return"undefined"!==typeof e&&(this.content_=e),this.content_}conditionalFocus_(){const e=a.a.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(e.stopPropagation(),l.a.isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(!l.a.isEventKey(e,"Tab"))return;const t=this.focusableEls_(),i=this.el_.querySelector(":focus");let r;for(let s=0;s<t.length;s++)if(i===t[s]){r=s;break}a.a.activeElement===this.el_&&(r=0),e.shiftKey&&0===r?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||r!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,e=>(e instanceof s.a.HTMLAnchorElement||e instanceof s.a.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof s.a.HTMLInputElement||e instanceof s.a.HTMLSelectElement||e instanceof s.a.HTMLTextAreaElement||e instanceof s.a.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof s.a.HTMLIFrameElement||e instanceof s.a.HTMLObjectElement||e instanceof s.a.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable"))}}ui.prototype.options_={pauseOnOpen:!0,temporary:!0},zt.registerComponent("ModalDialog",ui);class ci extends xt{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,"length",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:"labelchange",target:this})},It(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let t;for(let i=0,r=this.length;i<r;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})}getTrackById(e){let t=null;for(let i=0,r=this.length;i<r;i++){const r=this[i];if(r.id===e){t=r;break}}return t}}ci.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const t in ci.prototype.allowedEvents_)ci.prototype["on"+t]=null;const hi=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};class pi extends ci{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){hi(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&hi(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,hi(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}}const fi=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class mi extends ci{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){fi(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&fi(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,fi(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)}}class gi extends ci{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),e.addEventListener("modechange",this.queueChange_);const t=["metadata","chapters"];-1===t.indexOf(e.kind)&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))}}class yi{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,r=this.trackElements_.length;i<r;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"===typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"===typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}}class vi{constructor(e){vi.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const r=e.length;this.cues_=e,this.length_=e.length;const s=function(e){""+e in this||Object.defineProperty(this,""+e,{get(){return this.cues_[e]}})};if(t<r)for(i=t;i<r;i++)s.call(this,i)}getCueById(e){let t=null;for(let i=0,r=this.length;i<r;i++){const r=this[i];if(r.id===e){t=r;break}}return t}}const bi={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},_i={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Ti={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Si={disabled:"disabled",hidden:"hidden",showing:"showing"};class wi extends xt{constructor(e={}){super();const t={id:e.id||"vjs_track_"+lt(),kind:e.kind||"",language:e.language||""};let i=e.label||"";for(const r in t)Object.defineProperty(this,r,{get(){return t[r]},set(){}});Object.defineProperty(this,"label",{get(){return i},set(e){e!==i&&(i=e,this.trigger("labelchange"))}})}}const Ei=function(e){const t=["protocol","hostname","port","pathname","search","hash","host"],i=a.a.createElement("a");i.href=e;const r={};for(let s=0;s<t.length;s++)r[t[s]]=i[t[s]];return"http:"===r.protocol&&(r.host=r.host.replace(/:80$/,"")),"https:"===r.protocol&&(r.host=r.host.replace(/:443$/,"")),r.protocol||(r.protocol=s.a.location.protocol),r.host||(r.host=s.a.location.host),r},Ci=function(e){if(!e.match(/^https?:\/\//)){const t=a.a.createElement("a");t.href=e,e=t.href}return e},xi=function(e){if("string"===typeof e){const t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/,i=t.exec(e);if(i)return i.pop().toLowerCase()}return""},ki=function(e,t=s.a.location){const i=Ei(e),r=":"===i.protocol?t.protocol:i.protocol,n=r+i.host!==t.protocol+t.host;return n};var Ii=Object.freeze({__proto__:null,parseUrl:Ei,getAbsoluteURL:Ci,getFileExtension:xi,isCrossOrigin:ki});const Ai=function(e,t){const i=new s.a.WebVTT.Parser(s.a,s.a.vttjs,s.a.WebVTT.StringDecoder()),r=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){r.push(e)},i.onflush=function(){t.trigger({type:"loadeddata",target:t})},i.parse(e),r.length>0&&(s.a.console&&s.a.console.groupCollapsed&&s.a.console.groupCollapsed("Text Track parsing errors for "+t.src),r.forEach(e=>q.error(e)),s.a.console&&s.a.console.groupEnd&&s.a.console.groupEnd()),i.flush()},Oi=function(e,t){const i={uri:e},r=ki(e);r&&(i.cors=r);const n="use-credentials"===t.tech_.crossOrigin();n&&(i.withCredentials=n),h()(i,Tt(this,(function(e,i,r){if(e)return q.error(e,i);t.loaded_=!0,"function"!==typeof s.a.WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],e=>{if("vttjserror"!==e.type)return Ai(r,t);q.error("vttjs failed to load, stopping trying to process "+t.src)}):Ai(r,t)})))};class Pi extends wi{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const t=Y(e,{kind:Ti[e.kind]||"subtitles",language:e.language||e.srclang||""});let i=Si[t.mode]||"disabled";const r=t.default;"metadata"!==t.kind&&"chapters"!==t.kind||(i="hidden"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const s=new vi(this.cues_),n=new vi(this.activeCues_);let a=!1;this.timeupdateHandler=Tt(this,(function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger("cuechange"),a=!1),"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))}));const o=()=>{this.stopTracking()};this.tech_.one("dispose",o),"disabled"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get(){return r},set(){}},mode:{get(){return i},set(e){Si[e]&&i!==e&&(i=e,this.preload_||"disabled"===i||0!==this.cues.length||Oi(this.src,this),this.stopTracking(),"disabled"!==i&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?s:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return n;const e=this.tech_.currentTime(),t=[];for(let i=0,r=this.cues.length;i<r;i++){const r=this.cues[i];r.startTime<=e&&r.endTime>=e&&t.push(r)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let i=0;i<t.length;i++)-1===this.activeCues_.indexOf(t[i])&&(a=!0);return this.activeCues_=t,n.setCues_(this.activeCues_),n},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||"subtitles"!==t.kind&&"captions"!==t.kind)&&Oi(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)}addCue(e){let t=e;if(s.a.vttjs&&!(e instanceof s.a.vttjs.VTTCue)){t=new s.a.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let r=0;r<i.length;r++)i[r]!==this&&i[r].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}removeCue(e){let t=this.cues_.length;while(t--){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}Pi.prototype.allowedEvents_={cuechange:"cuechange"};class Li extends wi{constructor(e={}){const t=Y(e,{kind:_i[e.kind]||""});super(t);let i=!1;Object.defineProperty(this,"enabled",{get(){return i},set(e){"boolean"===typeof e&&e!==i&&(i=e,this.trigger("enabledchange"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class Di extends wi{constructor(e={}){const t=Y(e,{kind:bi[e.kind]||""});super(t);let i=!1;Object.defineProperty(this,"selected",{get(){return i},set(e){"boolean"===typeof e&&e!==i&&(i=e,this.trigger("selectedchange"))}}),t.selected&&(this.selected=t.selected)}}class Mi extends xt{constructor(e={}){let t;super();const i=new Pi(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get(){return t}},track:{get(){return i}}}),t=Mi.NONE,i.addEventListener("loadeddata",()=>{t=Mi.LOADED,this.trigger({type:"load",target:this})})}}Mi.prototype.allowedEvents_={load:"load"},Mi.NONE=0,Mi.LOADING=1,Mi.LOADED=2,Mi.ERROR=3;const Ni={audio:{ListClass:pi,TrackClass:Li,capitalName:"Audio"},video:{ListClass:mi,TrackClass:Di,capitalName:"Video"},text:{ListClass:gi,TrackClass:Pi,capitalName:"Text"}};Object.keys(Ni).forEach((function(e){Ni[e].getterName=e+"Tracks",Ni[e].privateName=e+"Tracks_"}));const Ri={remoteText:{ListClass:gi,TrackClass:Pi,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:yi,TrackClass:Mi,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Ui=Object.assign({},Ni,Ri);function Bi(e,t,i,r,s={}){const n=e.textTracks();s.kind=t,i&&(s.label=i),r&&(s.language=r),s.tech=e;const a=new Ui.text.TrackClass(s);return n.addTrack(a),a}Ri.names=Object.keys(Ri),Ni.names=Object.keys(Ni),Ui.names=[].concat(Ri.names).concat(Ni.names);class ji extends zt{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",(function(){this.hasStarted_=!0})),this.on("loadstart",(function(){this.hasStarted_=!1})),Ui.names.forEach(t=>{const i=Ui[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)}),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new Ui.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Tt(this,(function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return Xt(0,0)}bufferedPercent(){return ti(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(Ni.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){e=[].concat(e),e.forEach(e=>{const t=this[e+"Tracks"]()||[];let i=t.length;while(i--){const r=t[i];"text"===e&&this.removeRemoteTextTrack(r),t.removeTrack(r)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;while(t--){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new ii(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?Xt(0,0):Xt()}play(){}setScrubbing(){}scrubbing(){}setCurrentTime(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){Ni.names.forEach(e=>{const t=Ni[e],i=()=>{this.trigger(e+"trackchange")},r=this[t.getterName]();r.addEventListener("removetrack",i),r.addEventListener("addtrack",i),this.on("dispose",()=>{r.removeEventListener("removetrack",i),r.removeEventListener("addtrack",i)})})}addWebVttScript_(){if(!s.a.WebVTT)if(a.a.body.contains(this.el())){if(!this.options_["vtt.js"]&&X(f.a)&&Object.keys(f.a).length>0)return void this.trigger("vttjsloaded");const e=a.a.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=()=>{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",()=>{e.onload=null,e.onerror=null}),s.a.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),r=t=>e.removeTrack(t.track);t.on("addtrack",i),t.on("removetrack",r),this.addWebVttScript_();const s=()=>this.trigger("texttrackchange"),n=()=>{s();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener("cuechange",s),"showing"===i.mode&&i.addEventListener("cuechange",s)}};n(),e.addEventListener("change",n),e.addEventListener("addtrack",n),e.addEventListener("removetrack",n),this.on("dispose",(function(){t.off("addtrack",i),t.off("removetrack",r),e.removeEventListener("change",n),e.removeEventListener("addtrack",n),e.removeEventListener("removetrack",n);for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener("cuechange",s)}}))}addTextTrack(e,t,i){if(!e)throw new Error("TextTrack kind is required but was not provided");return Bi(this,e,t,i)}createRemoteTextTrack(e){const t=Y(e,{tech:this});return new Ri.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return"boolean"!==typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(i.track)),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=lt();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one("playing",()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())})):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(){}overrideNativeVideoTracks(){}canPlayType(){return""}static canPlayType(){return""}static canPlaySource(e,t){return ji.canPlayType(e.type)}static isTech(e){return e.prototype instanceof ji||e instanceof ji||e===ji}static registerTech(e,t){if(ji.techs_||(ji.techs_={}),!ji.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!ji.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!ji.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=qt(e),ji.techs_[e]=t,ji.techs_[Ft(e)]=t,"Tech"!==e&&ji.defaultTechOrder_.push(e),t}static getTech(e){if(e)return ji.techs_&&ji.techs_[e]?ji.techs_[e]:(e=qt(e),s.a&&s.a.videojs&&s.a.videojs[e]?(q.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),s.a.videojs[e]):void 0)}}Ui.names.forEach((function(e){const t=Ui[e];ji.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),ji.prototype.featuresVolumeControl=!0,ji.prototype.featuresMuteControl=!0,ji.prototype.featuresFullscreenResize=!1,ji.prototype.featuresPlaybackRate=!1,ji.prototype.featuresProgressEvents=!1,ji.prototype.featuresSourceset=!1,ji.prototype.featuresTimeupdateEvents=!1,ji.prototype.featuresNativeTextTracks=!1,ji.prototype.featuresVideoFrameCallback=!1,ji.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let r=e.sourceHandlers;r||(r=e.sourceHandlers=[]),void 0===i&&(i=r.length),r.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let r;for(let e=0;e<i.length;e++)if(r=i[e].canPlayType(t),r)return r;return""},e.selectSourceHandler=function(t,i){const r=e.sourceHandlers||[];let s;for(let e=0;e<r.length;e++)if(s=r[e].canHandleSource(t,i),s)return r[e];return null},e.canPlaySource=function(t,i){const r=e.selectSourceHandler(t,i);return r?r.canHandleSource(t,i):""};const t=["seekable","seeking","duration"];t.forEach((function(e){const t=this[e];"function"===typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:q.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},zt.registerComponent("Tech",ji),ji.registerTech("Tech",ji),ji.defaultTechOrder_=[];const Fi={},qi={},$i={};function Hi(e,t){Fi[e]=Fi[e]||[],Fi[e].push(t)}function zi(e,t,i){e.setTimeout(()=>ir(t,Fi[t.type],i,e),1)}function Vi(e,t){e.forEach(e=>e.setTech&&e.setTech(t))}function Gi(e,t,i){return e.reduceRight(Qi(i),t[i]())}function Wi(e,t,i,r){return t[i](e.reduce(Qi(i),r))}function Xi(e,t,i,r=null){const s="call"+qt(i),n=e.reduce(Qi(s),r),a=n===$i,o=a?null:t[i](n);return Zi(e,i,o,a),o}const Yi={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},Ki={setCurrentTime:1,setMuted:1,setVolume:1},Ji={play:1,pause:1};function Qi(e){return(t,i)=>t===$i?$i:i[e]?i[e](t):t}function Zi(e,t,i,r){for(let s=e.length-1;s>=0;s--){const n=e[s];n[t]&&n[t](r,i)}}function er(e){qi[e.id()]=null}function tr(e,t){const i=qi[e.id()];let r=null;if(void 0===i||null===i)return r=t(e),qi[e.id()]=[[t,r]],r;for(let s=0;s<i.length;s++){const[e,n]=i[s];e===t&&(r=n)}return null===r&&(r=t(e),i.push([t,r])),r}function ir(e={},t=[],i,r,s=[],n=!1){const[a,...o]=t;if("string"===typeof a)ir(e,Fi[a],i,r,s,n);else if(a){const t=tr(r,a);if(!t.setSource)return s.push(t),ir(e,o,i,r,s,n);t.setSource(Object.assign({},e),(function(a,l){if(a)return ir(e,o,i,r,s,n);s.push(t),ir(l,e.type===l.type?o:Fi[l.type],i,r,s,n)}))}else o.length?ir(e,o,i,r,s,n):n?i(e,s):ir(e,Fi["*"],i,r,s,!0)}const rr={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"},sr=function(e=""){const t=xi(e),i=rr[t.toLowerCase()];return i||""},nr=(e,t)=>{if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter(e=>e.src===t);if(i.length)return i[0].type;const r=e.$$("source");for(let s=0;s<r.length;s++){const e=r[s];if(e.type&&e.src&&e.src===t)return e.type}return sr(t)},ar=function(e){if(Array.isArray(e)){let t=[];e.forEach((function(e){e=ar(e),Array.isArray(e)?t=t.concat(e):W(e)&&t.push(e)})),e=t}else e="string"===typeof e&&e.trim()?[or({src:e})]:W(e)&&"string"===typeof e.src&&e.src&&e.src.trim()?[or(e)]:[];return e};function or(e){if(!e.type){const t=sr(e.src);t&&(e.type=t)}return e}class lr extends zt{constructor(e,t,i){const r=Y({createEl:!1},t);if(super(e,r,i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let s=0,n=t.playerOptions.techOrder;s<n.length;s++){const t=qt(n[s]);let i=ji.getTech(t);if(t||(i=zt.getComponent(t)),i&&i.isSupported()){e.loadTech_(t);break}}}}zt.registerComponent("MediaLoader",lr);class dr extends zt{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e="div",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&q.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:"button"},i),this.tabIndex_=t.tabIndex;const r=Ee(e,t,i);return r.appendChild(Ee("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(r),r}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Ee("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||"Need Text";const i=this.localize(e);this.controlText_=e,Ce(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute("title",i)}buildCSSClass(){return"vjs-control vjs-button "+super.buildCSSClass()}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!==typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),"undefined"!==typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){l.a.isEventKey(e,"Space")||l.a.isEventKey(e,"Enter")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}zt.registerComponent("ClickableComponent",dr);class ur extends dr{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){const e=Ee("picture",{className:"vjs-poster",tabIndex:-1},{},Ee("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}));return e}crossOrigin(e){if("undefined"===typeof e)return this.el_?this.el_.querySelector("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||"anonymous"===e||"use-credentials"===e?this.el_.querySelector("img").crossOrigin=e:this.player_.log.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){this.el_.querySelector("img").src=e}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?si(this.player_.play()):this.player_.pause())}}ur.prototype.crossorigin=ur.prototype.crossOrigin,zt.registerComponent("PosterImage",ur);const cr="#222",hr="#ccc",pr={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 fr(e,t){let i;if(4===e.length)i=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.");i=e.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}function mr(e,t,i){try{e.style[t]=i}catch(r){return}}class gr extends zt{constructor(e,t,i){super(e,t,i);const r=e=>this.updateDisplay(e);e.on("loadstart",e=>this.toggleDisplay(e)),e.on("texttrackchange",r),e.on("loadedmetadata",e=>this.preselectTrack(e)),e.ready(Tt(this,(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on("fullscreenchange",r),e.on("playerresize",r);const t=s.a.screen.orientation||s.a,i=s.a.screen.orientation?"change":"orientationchange";t.addEventListener(i,r),e.on("dispose",()=>t.removeEventListener(i,r));const n=this.options_.playerOptions.tracks||[];for(let e=0;e<n.length;e++)this.player_.addRemoteTextTrack(n[e],!0);this.preselectTrack()})))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let r,s,n;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?n=o:n||(n=o):i&&!i.enabled?(n=null,r=null,s=null):o.default&&("descriptions"!==o.kind||r?o.kind in e&&!s&&(s=o):r=o)}n?n.mode="showing":s?s.mode="showing":r&&(r.mode="showing")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl("div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})}clearDisplay(){"function"===typeof s.a.WebVTT&&s.a.WebVTT.processCues(s.a,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const r=e[i];"showing"===r.mode&&t.push(r)}return void this.updateForTrack(t)}let i=null,r=null,s=e.length;while(s--){const t=e[s];"showing"===t.mode&&("descriptions"===t.kind?i=t:r=t)}r?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(r)):i&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(i))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let r=i.length;while(r--){const e=i[r];if(!e)continue;const n=e.displayState;if(t.color&&(n.firstChild.style.color=t.color),t.textOpacity&&mr(n.firstChild,"color",fr(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(n.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&mr(n.firstChild,"backgroundColor",fr(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?mr(n,"backgroundColor",fr(t.windowColor,t.windowOpacity)):n.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?n.firstChild.style.textShadow=`2px 2px 3px ${cr}, 2px 2px 4px ${cr}, 2px 2px 5px ${cr}`:"raised"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${cr}, 2px 2px ${cr}, 3px 3px ${cr}`:"depressed"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${hr}, 0 1px ${hr}, -1px -1px ${cr}, 0 -1px ${cr}`:"uniform"===t.edgeStyle&&(n.firstChild.style.textShadow=`0 0 4px ${cr}, 0 0 4px ${cr}, 0 0 4px ${cr}, 0 0 4px ${cr}`)),t.fontPercent&&1!==t.fontPercent){const e=s.a.parseFloat(n.style.fontSize);n.style.fontSize=e*t.fontPercent+"px",n.style.height="auto",n.style.top="auto"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?n.firstChild.style.fontVariant="small-caps":n.firstChild.style.fontFamily=pr[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),"function"!==typeof s.a.WebVTT||e.every(e=>!e.activeCues))return;const t=[];for(let i=0;i<e.length;++i){const r=e[i];for(let e=0;e<r.activeCues.length;++e)t.push(r.activeCues[e])}s.a.WebVTT.processCues(s.a,t,this.el_);for(let i=0;i<e.length;++i){const t=e[i];for(let e=0;e<t.activeCues.length;++e){const r=t.activeCues[e].displayState;Ie(r,"vjs-text-track-cue","vjs-text-track-cue-"+(t.language?t.language:i)),t.language&&Me(r,"lang",t.language)}this.player_.textTrackSettings&&this.updateDisplayState(t)}}}zt.registerComponent("TextTrackDisplay",gr);class yr extends zt{createEl(){const e=this.player_.isAudio(),t=this.localize(e?"Audio Player":"Video Player"),i=Ee("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[t])}),r=super.createEl("div",{className:"vjs-loading-spinner",dir:"ltr"});return r.appendChild(i),r}}zt.registerComponent("LoadingSpinner",yr);class vr extends dr{createEl(e,t={},i={}){e="button",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:"button"},i);const r=Ee(e,t,i);return r.appendChild(Ee("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(r),r}addChild(e,t={}){const i=this.constructor.name;return q.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),zt.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute("disabled")}disable(){super.disable(),this.el_.setAttribute("disabled","disabled")}handleKeyDown(e){l.a.isEventKey(e,"Space")||l.a.isEventKey(e,"Enter")?e.stopPropagation():super.handleKeyDown(e)}}zt.registerComponent("Button",vr);class br extends vr{constructor(e,t){super(e,t),this.mouseused_=!1,this.on("mousedown",e=>this.handleMouseDown(e))}buildCSSClass(){return"vjs-big-play-button"}handleClick(e){const t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY)return si(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild("controlBar"),r=i&&i.getChild("playToggle");if(!r)return void this.player_.tech(!0).focus();const s=()=>r.focus();ri(t)?t.then(s,()=>{}):this.setTimeout(s,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}br.prototype.controlText_="Play Video",zt.registerComponent("BigPlayButton",br);class _r extends vr{constructor(e,t){super(e,t),this.controlText(t&&t.controlText||this.localize("Close"))}buildCSSClass(){return"vjs-close-button "+super.buildCSSClass()}handleClick(e){this.trigger({type:"close",bubbles:!1})}handleKeyDown(e){l.a.isEventKey(e,"Esc")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}zt.registerComponent("CloseButton",_r);class Tr extends vr{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.on(e,"play",e=>this.handlePlay(e)),this.on(e,"pause",e=>this.handlePause(e)),t.replay&&this.on(e,"ended",e=>this.handleEnded(e))}buildCSSClass(){return"vjs-play-control "+super.buildCSSClass()}handleClick(e){this.player_.paused()?si(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")}handlePause(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")}handleEnded(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",e=>this.handleSeeked(e))}}Tr.prototype.controlText_="Play",zt.registerComponent("PlayToggle",Tr);class Sr extends zt{constructor(e,t){super(e,t),this.on(e,["timeupdate","ended"],e=>this.updateContent(e)),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl("div",{className:e+" vjs-time-control vjs-control"}),i=Ee("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+" "},{role:"presentation"});return t.appendChild(i),this.contentEl_=Ee("span",{className:e+"-display"},{"aria-live":"off",role:"presentation"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}updateTextNode_(e=0){e=Zt(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,q.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=a.a.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}}Sr.prototype.labelText_="Time",Sr.prototype.controlText_="Time",zt.registerComponent("TimeDisplay",Sr);class wr extends Sr{buildCSSClass(){return"vjs-current-time"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}wr.prototype.labelText_="Current Time",wr.prototype.controlText_="Current Time",zt.registerComponent("CurrentTimeDisplay",wr);class Er extends Sr{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,"durationchange",i),this.on(e,"loadstart",i),this.on(e,"loadedmetadata",i)}buildCSSClass(){return"vjs-duration"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}Er.prototype.labelText_="Duration",Er.prototype.controlText_="Duration",zt.registerComponent("DurationDisplay",Er);class Cr extends zt{createEl(){const e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),t=super.createEl("div"),i=super.createEl("span",{textContent:"/"});return t.appendChild(i),e.appendChild(t),e}}zt.registerComponent("TimeDivider",Cr);class xr extends Sr{constructor(e,t){super(e,t),this.on(e,"durationchange",e=>this.updateContent(e))}buildCSSClass(){return"vjs-remaining-time"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(Ee("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e}updateContent(e){if("number"!==typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}xr.prototype.labelText_="Remaining Time",xr.prototype.controlText_="Remaining Time",zt.registerComponent("RemainingTimeDisplay",xr);class kr extends zt{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),"durationchange",e=>this.updateShowing(e))}createEl(){const e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Ee("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Ee("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+" "})),this.contentEl_.appendChild(a.a.createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}}zt.registerComponent("LiveDisplay",kr);class Ir extends vr{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=Ee("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function Ar(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}Ir.prototype.controlText_="Seek to live, currently playing live",zt.registerComponent("SeekToLive",Ir);var Or=Object.freeze({__proto__:null,clamp:Ar});class Pr extends zt{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+" vjs-slider",t=Object.assign({tabIndex:0},t),i=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||ne||e.preventDefault(),Re(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove_),this.on(t,"mouseup",this.handleMouseUp_),this.on(t,"touchmove",this.handleMouseMove_),this.on(t,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(){const e=this.bar.el_.ownerDocument;Ue(),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()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",()=>{const t=this.vertical()?"height":"width";this.bar.el().style[t]=(100*e).toFixed(2)+"%"})),e}getProgress(){return Number(Ar(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=Fe(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){l.a.isEventKey(e,"Left")||l.a.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepBack()):l.a.isEventKey(e,"Right")||l.a.isEventKey(e,"Up")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}}zt.registerComponent("Slider",Pr);const Lr=(e,t)=>Ar(e/t*100,0,100).toFixed(2)+"%";class Dr extends zt{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,"progress",e=>this.update(e))}createEl(){const e=super.createEl("div",{className:"vjs-load-progress"}),t=Ee("span",{className:"vjs-control-text"}),i=Ee("span",{textContent:this.localize("Loaded")}),r=a.a.createTextNode(": ");return this.percentageEl_=Ee("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(t),t.appendChild(i),t.appendChild(r),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),r=this.player_.bufferedEnd(),s=this.partEls_,n=Lr(r,i);this.percent_!==n&&(this.el_.style.width=n,Ce(this.percentageEl_,n),this.percent_=n);for(let a=0;a<t.length;a++){const e=t.start(a),i=t.end(a);let n=s[a];n||(n=this.el_.appendChild(Ee()),s[a]=n),n.dataset.start===e&&n.dataset.end===i||(n.dataset.start=e,n.dataset.end=i,n.style.left=Lr(e,r),n.style.width=Lr(i-e,r))}for(let a=s.length;a>t.length;a--)this.el_.removeChild(s[a-1]);s.length=t.length})}}zt.registerComponent("LoadProgressBar",Dr);class Mr extends zt{constructor(e,t){super(e,t),this.update=St(Tt(this,this.update),_t)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(e,t,i){const r=je(this.el_),s=Be(this.player_.el()),n=e.width*t;if(!s||!r)return;const a=e.left-s.left+n,o=e.width-n+(s.right-e.right);let l=r.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>r.width&&(l=r.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Ce(this.el_,e)}updateTime(e,t,i,r){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let s;const n=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;s=(i<1?"":"-")+Zt(i,e)}else s=Zt(i,n);this.update(e,t,s),r&&r()})}}zt.registerComponent("TimeTooltip",Mr);class Nr extends zt{constructor(e,t){super(e,t),this.update=St(Tt(this,this.update),_t)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,t){const i=this.getChild("timeTooltip");if(!i)return;const r=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(e,t,r)}}Nr.prototype.options_={children:[]},me||te||Nr.prototype.options_.children.push("timeTooltip"),zt.registerComponent("PlayProgressBar",Nr);class Rr extends zt{constructor(e,t){super(e,t),this.update=St(Tt(this,this.update),_t)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t){const i=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,i,()=>{this.el_.style.left=e.width*t+"px"})}}Rr.prototype.options_={children:["timeTooltip"]},zt.registerComponent("MouseTimeDisplay",Rr);const Ur=5,Br=12;class jr extends Pr{constructor(e,t){super(e,t),this.setEventHandlers_()}setEventHandlers_(){this.update_=Tt(this,this.update),this.update=St(this.update_,_t),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in a.a&&"visibilityState"in a.a&&this.on(a.a,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){"hidden"===a.a.visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,_t))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(e){if("hidden"===a.a.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame("SeekBar#update",()=>{const e=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),i=this.player_.liveTracker;let r=this.player_.duration();i&&i.isLive()&&(r=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===e&&this.duration_===r||(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Zt(e,r),Zt(r,r)],"{1} of {2}")),this.currentTime_=e,this.duration_=r),this.bar&&this.bar.update(Be(this.el()),this.getProgress())}),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}getPercent(){const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){Ge(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!Ge(e))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const r=this.calculateDistance(e),s=this.player_.liveTracker;if(s&&s.isLive()){if(r>=.99)return void s.seekToLiveEdge();const e=s.seekableStart(),t=s.liveCurrentTime();if(i=e+r*s.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=r*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.userSeek_(i)}enable(){super.enable();const e=this.getChild("mouseTimeDisplay");e&&e.show()}disable(){super.disable();const e=this.getChild("mouseTimeDisplay");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?si(this.player_.play()):this.update_()}stepForward(){this.userSeek_(this.player_.currentTime()+Ur)}stepBack(){this.userSeek_(this.player_.currentTime()-Ur)}handleAction(e){this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(l.a.isEventKey(e,"Space")||l.a.isEventKey(e,"Enter"))e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(l.a.isEventKey(e,"Home"))e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(l.a.isEventKey(e,"End"))e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(l()(e))){e.preventDefault(),e.stopPropagation();const i=10*(l.a.codes[l()(e)]-l.a.codes["0"])/100;t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else l.a.isEventKey(e,"PgDn")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-Ur*Br)):l.a.isEventKey(e,"PgUp")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+Ur*Br)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in a.a&&"visibilityState"in a.a&&this.off(a.a,"visibilitychange",this.toggleVisibility_),super.dispose()}}jr.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},me||te||jr.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),zt.registerComponent("SeekBar",jr);class Fr extends zt{constructor(e,t){super(e,t),this.handleMouseMove=St(Tt(this,this.handleMouseMove),_t),this.throttledHandleMouseSeek=St(Tt(this,this.handleMouseSeek),_t),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(e){const t=this.getChild("seekBar");if(!t)return;const i=t.getChild("playProgressBar"),r=t.getChild("mouseTimeDisplay");if(!i&&!r)return;const s=t.el(),n=je(s);let a=Fe(s,e).x;a=Ar(a,0,1),r&&r.update(n,a),i&&i.update(n,t.getProgress())}handleMouseSeek(e){const t=this.getChild("seekBar");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach(e=>e.disable&&e.disable()),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&si(this.player_.play())}}enable(){this.children().forEach(e=>e.enable&&e.enable()),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}Fr.prototype.options_={children:["seekBar"]},zt.registerComponent("ProgressControl",Fr);class qr extends vr{constructor(e,t){super(e,t),this.on(e,["enterpictureinpicture","leavepictureinpicture"],e=>this.handlePictureInPictureChange(e)),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],e=>this.handlePictureInPictureEnabledChange(e)),this.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],()=>{const t="audio"===e.currentType().substring(0,5);t||e.audioPosterMode()||e.audioOnlyMode()?(e.isInPictureInPicture()&&e.exitPictureInPicture(),this.hide()):this.show()}),this.disable()}buildCSSClass(){return"vjs-picture-in-picture-control "+super.buildCSSClass()}handlePictureInPictureEnabledChange(){a.a.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}}qr.prototype.controlText_="Picture-in-Picture",zt.registerComponent("PictureInPictureToggle",qr);class $r extends vr{constructor(e,t){super(e,t),this.on(e,"fullscreenchange",e=>this.handleFullscreenChange(e)),!1===a.a[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return"vjs-fullscreen-control "+super.buildCSSClass()}handleFullscreenChange(e){this.player_.isFullscreen()?this.controlText("Exit Fullscreen"):this.controlText("Fullscreen")}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}$r.prototype.controlText_="Fullscreen",zt.registerComponent("FullscreenToggle",$r);const Hr=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")}))};class zr extends zt{createEl(){const e=super.createEl("div",{className:"vjs-volume-level"});return e.appendChild(super.createEl("span",{className:"vjs-control-text"})),e}}zt.registerComponent("VolumeLevel",zr);class Vr extends zt{constructor(e,t){super(e,t),this.update=St(Tt(this,this.update),_t)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(e,t,i,r){if(!i){const i=Be(this.el_),r=Be(this.player_.el()),s=e.width*t;if(!r||!i)return;const n=e.left-r.left+s,a=e.width-s+(r.right-e.right);let o=i.width/2;n<o?o+=o-n:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(r+"%")}write(e){Ce(this.el_,e)}updateVolume(e,t,i,r,s){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(e,t,i,r.toFixed(0)),s&&s()})}}zt.registerComponent("VolumeLevelTooltip",Vr);class Gr extends zt{constructor(e,t){super(e,t),this.update=St(Tt(this,this.update),_t)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t,i){const r=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,i,r,()=>{i?this.el_.style.bottom=e.height*t+"px":this.el_.style.left=e.width*t+"px"})}}Gr.prototype.options_={children:["volumeLevelTooltip"]},zt.registerComponent("MouseVolumeLevelDisplay",Gr);class Wr extends Pr{constructor(e,t){super(e,t),this.on("slideractive",e=>this.updateLastVolume_(e)),this.on(e,"volumechange",e=>this.updateARIAAttributes(e)),e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(e){Ge(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild("mouseVolumeLevelDisplay");if(t){const i=this.el(),r=Be(i),s=this.vertical();let n=Fe(i,e);n=s?n.y:n.x,n=Ar(n,0,1),t.update(r,n,s)}Ge(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one("sliderinactive",()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)})}}Wr.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},me||te||Wr.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),Wr.prototype.playerEvent="volumechange",zt.registerComponent("VolumeBar",Wr);class Xr extends zt{constructor(e,t={}){t.vertical=t.vertical||!1,("undefined"===typeof t.volumeBar||X(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),Hr(this,e),this.throttledHandleMouseMove=St(Tt(this,this.handleMouseMove),_t),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on("mousedown",e=>this.handleMouseDown(e)),this.on("touchstart",e=>this.handleMouseDown(e)),this.on("mousemove",e=>this.handleMouseMove(e)),this.on(this.volumeBar,["focus","slideractive"],()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")}),this.on(this.volumeBar,["blur","sliderinactive"],()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")})}createEl(){let e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),super.createEl("div",{className:"vjs-volume-control vjs-control "+e})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}Xr.prototype.options_={children:["volumeBar"]},zt.registerComponent("VolumeControl",Xr);const Yr=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")}))};class Kr extends vr{constructor(e,t){super(e,t),Yr(this,e),this.on(e,["loadstart","volumechange"],e=>this.update(e))}buildCSSClass(){return"vjs-mute-control "+super.buildCSSClass()}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;me&&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),Ae(this.el_,[0,1,2,3].reduce((e,t)=>e+`${t?" ":""}vjs-vol-${t}`,"")),Ie(this.el_,"vjs-vol-"+t)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume(),t=e?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)}}Kr.prototype.controlText_="Mute",zt.registerComponent("MuteToggle",Kr);class Jr extends zt{constructor(e,t={}){"undefined"!==typeof t.inline?t.inline=t.inline:t.inline=!0,("undefined"===typeof t.volumeControl||X(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,["loadstart"],e=>this.volumePanelState_(e)),this.on(this.muteToggle,"keyup",e=>this.handleKeyPress(e)),this.on(this.volumeControl,"keyup",e=>this.handleVolumeControlKeyUp(e)),this.on("keydown",e=>this.handleKeyPress(e)),this.on("mouseover",e=>this.handleMouseOver(e)),this.on("mouseout",e=>this.handleMouseOut(e)),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}createEl(){let e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),super.createEl("div",{className:"vjs-volume-panel vjs-control "+e})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){l.a.isEventKey(e,"Esc")&&this.muteToggle.focus()}handleMouseOver(e){this.addClass("vjs-hover"),ft(a.a,"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),mt(a.a,"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){l.a.isEventKey(e,"Esc")&&this.handleMouseOut()}}Jr.prototype.options_={children:["muteToggle","volumeControl"]},zt.registerComponent("VolumePanel",Jr);class Qr extends zt{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on("keydown",e=>this.handleKeyDown(e)),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof zt&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof zt&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))}removeChild(e){"string"===typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||"ul";this.contentEl_=Ee(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");const t=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return t.appendChild(this.contentEl_),ft(t,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||a.a.activeElement;if(!this.children().some(e=>e.el()===t)){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter(t=>t.el()===e.target)[0];if(!i)return;"CaptionSettingsMenuItem"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){l.a.isEventKey(e,"Left")||l.a.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(l.a.isEventKey(e,"Right")||l.a.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice(),i=t.length&&t[0].hasClass("vjs-menu-title");i&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}zt.registerComponent("Menu",Qr);class Zr extends zt{constructor(e,t={}){super(e,t),this.menuButton_=new vr(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const i=vr.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+i,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const r=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,"tap",r),this.on(this.menuButton_,"click",r),this.on(this.menuButton_,"keydown",e=>this.handleKeyDown(e)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),ft(a.a,"keyup",this.handleMenuKeyUp_)}),this.on("mouseleave",e=>this.handleMouseLeave(e)),this.on("keydown",e=>this.handleSubmenuKeyDown(e))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}createMenu(){const e=new Qr(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Ee("li",{className:"vjs-menu-title",textContent:qt(this.options_.title),tabIndex:-1}),i=new zt(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl("div",{className:this.buildWrapperCSSClass()},{})}buildWrapperCSSClass(){let e="vjs-menu-button";!0===this.options_.inline?e+="-inline":e+="-popup";const t=vr.prototype.buildCSSClass();return`vjs-menu-button ${e} ${t} ${super.buildCSSClass()}`}buildCSSClass(){let e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass("vjs-hover"),mt(a.a,"keyup",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){l.a.isEventKey(e,"Esc")||l.a.isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),l.a.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(l.a.isEventKey(e,"Up")||l.a.isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))}handleMenuKeyUp(e){(l.a.isEventKey(e,"Esc")||l.a.isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){(l.a.isEventKey(e,"Esc")||l.a.isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),l.a.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),me&&Se())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()}}zt.registerComponent("MenuButton",Zr);class es extends Zr{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const r=Tt(this,this.update);i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),i.addEventListener("labelchange",r),this.player_.on("ready",r),this.player_.on("dispose",(function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r),i.removeEventListener("labelchange",r)}))}}zt.registerComponent("TrackButton",es);const ts=["Tab","Esc","Up","Down","Right","Left"];class is extends dr{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute("role","menuitemcheckbox"):this.el_.setAttribute("role","menuitemradio"):this.el_.setAttribute("role","menuitem")}createEl(e,t,i){this.nonIconControl=!0;const r=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},t),i);return r.replaceChild(Ee("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)}),r.querySelector(".vjs-icon-placeholder")),r}handleKeyDown(e){ts.some(t=>l.a.isEventKey(e,t))||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))}}zt.registerComponent("MenuItem",is);class rs extends is{constructor(e,t){const i=t.track,r=e.textTracks();t.label=i.label||i.language||"Unknown",t.selected="showing"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const n=(...e)=>{this.handleTracksChange.apply(this,e)},o=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on(["loadstart","texttrackchange"],n),r.addEventListener("change",n),r.addEventListener("selectedlanguagechange",o),this.on("dispose",(function(){e.off(["loadstart","texttrackchange"],n),r.removeEventListener("change",n),r.removeEventListener("selectedlanguagechange",o)})),void 0===r.onchange){let e;this.on(["tap","click"],(function(){if("object"!==typeof s.a.Event)try{e=new s.a.Event("change")}catch(t){}e||(e=a.a.createEvent("Event"),e.initEvent("change",!0,!0)),r.dispatchEvent(e)}))}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let r=0;r<i.length;r++){const e=i[r];-1!==this.kinds.indexOf(e.kind)&&(e===t?"showing"!==e.mode&&(e.mode="showing"):"disabled"!==e.mode&&(e.mode="disabled"))}}handleTracksChange(e){const t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if("showing"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}zt.registerComponent("TextTrackMenuItem",rs);class ss extends rs{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:"disabled"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(" and ")+" off",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let r=0,s=t.length;r<s;r++){const e=t[r];if(this.options_.kinds.indexOf(e.kind)>-1&&"showing"===e.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let r=0,s=t.length;r<s;r++){const e=t[r];if(["captions","descriptions","subtitles"].indexOf(e.kind)>-1&&"showing"===e.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}}zt.registerComponent("OffTextTrackMenuItem",ss);class ns extends es{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=rs){let i;this.label_&&(i=this.label_+" off"),e.push(new ss(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let s=0;s<r.length;s++){const i=r[s];if(this.kinds_.indexOf(i.kind)>-1){const r=new t(this.player_,{track:i,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});r.addClass(`vjs-${i.kind}-menu-item`),e.push(r)}}return e}}zt.registerComponent("TextTrackButton",ns);class as extends is{constructor(e,t){const i=t.track,r=t.cue,s=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=r.text,t.selected=r.startTime<=s&&s<r.endTime,super(e,t),this.track=i,this.cue=r}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}zt.registerComponent("ChaptersTrackMenuItem",as);class os extends ns{constructor(e,t,i){super(e,t,i),this.selectCurrentItem_=()=>{this.items.forEach(e=>{e.selected(this.track_.activeCues[0]===e.cue)})}}buildCSSClass(){return"vjs-chapters-button "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-chapters-button "+super.buildWrapperCSSClass()}update(e){if(e&&e.track&&"chapters"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(qt(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,r=t.length;i<r;i++){const r=t[i],s=new as(this.player_,{track:this.track_,cue:r});e.push(s)}return e}}os.prototype.kind_="chapters",os.prototype.controlText_="Chapters",zt.registerComponent("ChaptersButton",os);class ls extends ns{constructor(e,t,i){super(e,t,i);const r=e.textTracks(),s=Tt(this,this.handleTracksChange);r.addEventListener("change",s),this.on("dispose",(function(){r.removeEventListener("change",s)}))}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let r=0,s=t.length;r<s;r++){const e=t[r];if(e.kind!==this.kind_&&"showing"===e.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return"vjs-descriptions-button "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-descriptions-button "+super.buildWrapperCSSClass()}}ls.prototype.kind_="descriptions",ls.prototype.controlText_="Descriptions",zt.registerComponent("DescriptionsButton",ls);class ds extends ns{constructor(e,t,i){super(e,t,i)}buildCSSClass(){return"vjs-subtitles-button "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-subtitles-button "+super.buildWrapperCSSClass()}}ds.prototype.kind_="subtitles",ds.prototype.controlText_="Subtitles",zt.registerComponent("SubtitlesButton",ds);class us extends rs{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+" settings",selectable:!1,default:!1,mode:"disabled"},t.selectable=!1,t.name="CaptionSettingsMenuItem",super(e,t),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+t.kind+" settings dialog")}handleClick(e){this.player().getChild("textTrackSettings").open()}}zt.registerComponent("CaptionSettingsMenuItem",us);class cs extends ns{constructor(e,t,i){super(e,t,i)}buildCSSClass(){return"vjs-captions-button "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-captions-button "+super.buildWrapperCSSClass()}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new us(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}cs.prototype.kind_="captions",cs.prototype.controlText_="Captions",zt.registerComponent("CaptionsButton",cs);class hs extends rs{createEl(e,t,i){const r=super.createEl(e,t,i),s=r.querySelector(".vjs-menu-item-text");return"captions"===this.options_.track.kind&&(s.appendChild(Ee("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),s.appendChild(Ee("span",{className:"vjs-control-text",textContent:" "+this.localize("Captions")}))),r}}zt.registerComponent("SubsCapsMenuItem",hs);class ps extends ns{constructor(e,t={}){super(e,t),this.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(this.player_.language_)>-1&&(this.label_="captions"),this.menuButton_.controlText(qt(this.label_))}buildCSSClass(){return"vjs-subs-caps-button "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-subs-caps-button "+super.buildWrapperCSSClass()}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new us(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,hs),e}}ps.prototype.kinds_=["captions","subtitles"],ps.prototype.controlText_="Subtitles",zt.registerComponent("SubsCapsButton",ps);class fs extends is{constructor(e,t){const i=t.track,r=e.audioTracks();t.label=i.label||i.language||"Unknown",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const s=(...e)=>{this.handleTracksChange.apply(this,e)};r.addEventListener("change",s),this.on("dispose",()=>{r.removeEventListener("change",s)})}createEl(e,t,i){const r=super.createEl(e,t,i),s=r.querySelector(".vjs-menu-item-text");return"main-desc"===this.options_.track.kind&&(s.appendChild(Ee("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),s.appendChild(Ee("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),r}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}zt.registerComponent("AudioTrackMenuItem",fs);class ms extends es{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t)}buildCSSClass(){return"vjs-audio-button "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-audio-button "+super.buildWrapperCSSClass()}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const r=t[i];e.push(new fs(this.player_,{track:r,selectable:!0,multiSelectable:!1}))}return e}}ms.prototype.controlText_="Audio Track",zt.registerComponent("AudioTrackButton",ms);class gs extends is{constructor(e,t){const i=t.rate,r=parseFloat(i,10);t.label=i,t.selected=r===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=r,this.on(e,"ratechange",e=>this.update(e))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}gs.prototype.contentElType="button",zt.registerComponent("PlaybackRateMenuItem",gs);class ys extends Zr{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",e=>this.updateVisibility(e)),this.on(e,"ratechange",e=>this.updateLabel(e)),this.on(e,"playbackrateschange",e=>this.handlePlaybackRateschange(e))}createEl(){const e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=Ee("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return"vjs-playback-rate "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-playback-rate "+super.buildWrapperCSSClass()}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new gs(this.player(),{rate:e[i]+"x"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}}ys.prototype.controlText_="Playback Rate",zt.registerComponent("PlaybackRateMenuButton",ys);class vs extends zt{buildCSSClass(){return"vjs-spacer "+super.buildCSSClass()}createEl(e="div",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}zt.registerComponent("Spacer",vs);class bs extends vs{buildCSSClass(){return"vjs-custom-control-spacer "+super.buildCSSClass()}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:" "})}}zt.registerComponent("CustomControlSpacer",bs);class _s extends zt{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}_s.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in a.a&&_s.prototype.options_.children.splice(_s.prototype.options_.children.length-1,0,"pictureInPictureToggle"),zt.registerComponent("ControlBar",_s);class Ts extends ui{constructor(e,t){super(e,t),this.on(e,"error",e=>this.open(e))}buildCSSClass(){return"vjs-error-display "+super.buildCSSClass()}content(){const e=this.player().error();return e?this.localize(e.message):""}}Ts.prototype.options_=Object.assign({},ui.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),zt.registerComponent("ErrorDisplay",Ts);const Ss="vjs-text-track-settings",ws=["#000","Black"],Es=["#00F","Blue"],Cs=["#0FF","Cyan"],xs=["#0F0","Green"],ks=["#F0F","Magenta"],Is=["#F00","Red"],As=["#FFF","White"],Os=["#FF0","Yellow"],Ps=["1","Opaque"],Ls=["0.5","Semi-Transparent"],Ds=["0","Transparent"],Ms={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[ws,As,Is,xs,Es,Os,ks,Cs]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Ps,Ls,Ds]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[As,ws,Is,xs,Es,Os,ks,Cs]},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:e=>"1.00"===e?null:Number(e)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[Ps,Ls]},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:[Ds,Ls,Ps]}};function Ns(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}function Rs(e,t){const i=e.options[e.options.selectedIndex].value;return Ns(i,t)}function Us(e,t,i){if(t)for(let r=0;r<e.options.length;r++)if(Ns(e.options[r].value,i)===t){e.selectedIndex=r;break}}Ms.windowColor.options=Ms.backgroundColor.options;class Bs extends ui{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.endDialog=Ee("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.on(this.$(".vjs-done-button"),"click",()=>{this.saveSettings(),this.close()}),this.on(this.$(".vjs-default-button"),"click",()=>{this.setDefaults(),this.updateDisplay()}),V(Ms,e=>{this.on(this.$(e.selector),"change",this.updateDisplay)}),this.options_.persistTextTrackSettings&&this.restoreSettings()}dispose(){this.endDialog=null,super.dispose()}createElSelect_(e,t="",i="label"){const r=Ms[e],s=r.id.replace("%s",this.id_),n=[t,s].join(" ").trim();return[`<${i} id="${s}" class="${"label"===i?"vjs-label":""}">`,this.localize(r.label),`</${i}>`,`<select aria-labelledby="${n}">`].concat(r.options.map(e=>{const t=s+"-"+e[1].replace(/\W+/g,"");return[`<option id="${t}" value="${e[0]}" `,`aria-labelledby="${n} ${t}">`,this.localize(e[1]),"</option>"].join("")})).concat("</select>").join("")}createElFgColor_(){const e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">',`<legend id="${e}">`,this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")}createElBgColor_(){const e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">',`<legend id="${e}">`,this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")}createElWinColor_(){const e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">',`<legend id="${e}">`,this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")}createElColors_(){return Ee("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})}createElFont_(){return Ee("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})}createElControls_(){const e=this.localize("restore all settings to the default values");return Ee("div",{className:"vjs-track-settings-controls",innerHTML:[`<button type="button" class="vjs-default-button" title="${e}">`,this.localize("Reset"),`<span class="vjs-control-text"> ${e}</span>`,"</button>",`<button type="button" class="vjs-done-button">${this.localize("Done")}</button>`].join("")})}content(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}getValues(){return G(Ms,(e,t,i)=>{const r=Rs(this.$(t.selector),t.parser);return void 0!==r&&(e[i]=r),e},{})}setValues(e){V(Ms,(t,i)=>{Us(this.$(t.selector),e[i],t.parser)})}setDefaults(){V(Ms,e=>{const t=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=t})}restoreSettings(){let e;try{e=JSON.parse(s.a.localStorage.getItem(Ss))}catch(t){q.warn(t)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?s.a.localStorage.setItem(Ss,JSON.stringify(e)):s.a.localStorage.removeItem(Ss)}catch(t){q.warn(t)}}updateDisplay(){const e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}conditionalBlur_(){this.previouslyActiveEl_=null;const e=this.player_.controlBar,t=e&&e.subsCapsButton,i=e&&e.captionsButton;t?t.focus():i&&i.focus()}}zt.registerComponent("TextTrackSettings",Bs);class js extends zt{constructor(e,t){let i=t.ResizeObserver||s.a.ResizeObserver;null===t.ResizeObserver&&(i=!1);const r=Y({createEl:!i,reportTouchActivity:!1},t);super(e,r),this.ResizeObserver=t.ResizeObserver||s.a.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=wt(()=>{this.resizeHandler()},100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){mt(this,"resize",e),mt(this,"unload",t),t=null};ft(this.el_.contentWindow,"unload",t),ft(this.el_.contentWindow,"resize",e)},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}}zt.registerComponent("ResizeManager",js);const Fs={trackingThreshold:20,liveTolerance:15};class qs extends zt{constructor(e,t){const i=Y(Fs,t,{createEl:!1});super(e,i),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,"durationchange",e=>this.handleDurationchange(e)),this.on(this.player_,"canplay",()=>this.toggleTracking())}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(s.a.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const r=this.liveCurrentTime(),n=this.player_.currentTime();let a=this.player_.paused()||this.seekedBehindLive_||Math.abs(r-n)>this.options_.liveTolerance;this.timeupdateSeen_&&r!==1/0||(a=!1),a!==this.behindLiveEdge_&&(this.behindLiveEdge_=a,this.trigger("liveedgechange"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,_t),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;while(i--)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;while(i--)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return"number"===typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}}zt.registerComponent("LiveTracker",qs);class $s extends zt{constructor(e,t){super(e,t),this.on("statechanged",e=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:Ee("div",{className:"vjs-title-bar-title",id:"vjs-title-bar-title-"+lt()}),description:Ee("div",{className:"vjs-title-bar-description",id:"vjs-title-bar-description-"+lt()})},Ee("div",{className:"vjs-title-bar"},{},Object.values(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(e=>{const r=this.state[e],s=this.els[e],n=i[e];$e(s),r&&Ce(s,r),t&&(t.removeAttribute(n),r&&t.setAttribute(n,s.id))}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute("aria-labelledby"),t.removeAttribute("aria-describedby")),super.dispose(),this.els=null}}zt.registerComponent("TitleBar",$s);const Hs=e=>{const t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;const i=e.$$("source"),r=[];let s="";if(!i.length)return!1;for(let n=0;n<i.length;n++){const e=i[n].src;e&&-1===r.indexOf(e)&&r.push(e)}return!!r.length&&(1===r.length&&(s=r[0]),e.triggerSourceset(s),!0)},zs=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=a.a.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=a.a.createDocumentFragment();while(t.childNodes.length)i.appendChild(t.childNodes[0]);return this.innerText="",s.a.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Vs=(e,t)=>{let i={};for(let r=0;r<e.length;r++)if(i=Object.getOwnPropertyDescriptor(e[r],t),i&&i.set&&i.get)break;return i.enumerable=!0,i.configurable=!0,i},Gs=e=>Vs([e.el(),s.a.HTMLMediaElement.prototype,s.a.Element.prototype,zs],"innerHTML"),Ws=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},r=Gs(e),s=i=>(...r)=>{const s=i.apply(t,r);return Hs(e),s};["append","appendChild","insertAdjacentHTML"].forEach(e=>{t[e]&&(i[e]=t[e],t[e]=s(i[e]))}),Object.defineProperty(t,"innerHTML",Y(r,{set:s(r.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach(e=>{t[e]=i[e]}),Object.defineProperty(t,"innerHTML",r)},e.one("sourceset",t.resetSourceWatch_)},Xs=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?Ci(s.a.Element.prototype.getAttribute.call(this,"src")):""},set(e){return s.a.Element.prototype.setAttribute.call(this,"src",e),e}}),Ys=e=>Vs([e.el(),s.a.HTMLMediaElement.prototype,Xs],"src"),Ks=function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=Ys(e),r=t.setAttribute,s=t.load;Object.defineProperty(t,"src",Y(i,{set:r=>{const s=i.set.call(t,r);return e.triggerSourceset(t.src),s}})),t.setAttribute=(i,s)=>{const n=r.call(t,i,s);return/src/i.test(i)&&e.triggerSourceset(t.src),n},t.load=()=>{const i=s.call(t);return Hs(e)||(e.triggerSourceset(""),Ws(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Hs(e)||Ws(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=s,t.setAttribute=r,Object.defineProperty(t,"src",i),t.resetSourceWatch_&&t.resetSourceWatch_()}};class Js extends ji{constructor(e,t){super(e,t);const i=e.source;let r=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&"VIDEO"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];while(t--){const s=e[t],n=s.nodeName.toLowerCase();"track"===n&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(s),this.remoteTextTracks().addTrack(s.track),this.textTracks().addTrack(s.track),r||this.el_.hasAttribute("crossorigin")||!ki(s.src)||(r=!0)):i.push(s))}for(let r=0;r<i.length;r++)this.el_.removeChild(i[r])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&r&&q.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),this.restoreMetadataTracksInIOSNativePlayer_(),(pe||he)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),Js.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Ks(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const r=e[i];"metadata"===r.kind&&t.push({track:r,storedMode:r.mode})}};i(),e.addEventListener("change",i),this.on("dispose",()=>e.removeEventListener("change",i));const r=()=>{for(let e=0;e<t.length;e++){const i=t[e];"disabled"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener("change",r)};this.on("webkitbeginfullscreen",()=>{e.removeEventListener("change",i),e.removeEventListener("change",r),e.addEventListener("change",r)}),this.on("webkitendfullscreen",()=>{e.removeEventListener("change",i),e.addEventListener("change",i),e.removeEventListener("change",r)})}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[i+"TracksListeners_"]&&Object.keys(this[i+"TracksListeners_"]).forEach(e=>{const t=this.el()[i+"Tracks"];t.removeEventListener(e,this[i+"TracksListeners_"][e])}),this[`featuresNative${e}Tracks`]=!t,this[i+"TracksListeners_"]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(e){const t=Ni[e],i=this.el()[t.getterName],r=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const s={change:t=>{const i={type:"change",target:r,currentTarget:r,srcElement:r};r.trigger(i),"text"===e&&this[Ri.remoteText.getterName]().trigger(i)},addtrack(e){r.addTrack(e.track)},removetrack(e){r.removeTrack(e.track)}},n=function(){const e=[];for(let t=0;t<r.length;t++){let s=!1;for(let e=0;e<i.length;e++)if(i[e]===r[t]){s=!0;break}s||e.push(r[t])}while(e.length)r.removeTrack(e.shift())};this[t.getterName+"Listeners_"]=s,Object.keys(s).forEach(e=>{const t=s[e];i.addEventListener(e,t),this.on("dispose",r=>i.removeEventListener(e,t))}),this.on("loadstart",n),this.on("dispose",e=>this.off("loadstart",n))}proxyNativeTracks_(){Ni.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),Js.disposeMediaElement(e),e=t}else{e=a.a.createElement("video");const t=this.options_.tag&&Le(this.options_.tag),i=Y({},t);pe&&!0===this.options_.nativeControlsForTouch||delete i.controls,Pe(e,Object.assign(i,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}"undefined"!==typeof this.options_.preload&&Me(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=["loop","muted","playsinline","autoplay"];for(let i=0;i<t.length;i++){const r=t[i],s=this.options_[r];"undefined"!==typeof s&&(s?Me(e,r,r):Ne(e,r),e[r]=s)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on("loadstart",t);const i=function(){e||this.trigger("loadstart")};return this.on("loadedmetadata",i),void this.ready((function(){this.off("loadstart",t),this.off("loadedmetadata",i),e||this.trigger("loadstart")}))}const t=["loadstart"];t.push("loadedmetadata"),e.readyState>=2&&t.push("loadeddata"),e.readyState>=3&&t.push("canplay"),e.readyState>=4&&t.push("canplaythrough"),this.ready((function(){t.forEach((function(e){this.trigger(e)}),this)}))}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&ge?this.el_.fastSeek(e):this.el_.currentTime=e}catch(t){q(t,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&te&&ne&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;const e=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",t),this.on("dispose",()=>{this.off("webkitbeginfullscreen",t),this.off("webkitendfullscreen",e)})}supportsFullScreen(){return"function"===typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)si(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}}),0);else try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}reset(){Js.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=a.a.createElement("track");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$("track");let i=t.length;while(i--)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if("function"===typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return"undefined"!==typeof this.el().webkitDroppedFrameCount&&"undefined"!==typeof this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),s.a.performance&&(e.creationTime=s.a.performance.now()),e}}K(Js,"TEST_VID",(function(){if(!_e())return;const e=a.a.createElement("video"),t=a.a.createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e})),Js.isSupported=function(){try{Js.TEST_VID.volume=.5}catch(e){return!1}return!(!Js.TEST_VID||!Js.TEST_VID.canPlayType)},Js.canPlayType=function(e){return Js.TEST_VID.canPlayType(e)},Js.canPlaySource=function(e,t){return Js.canPlayType(e.type)},Js.canControlVolume=function(){try{const e=Js.TEST_VID.volume;Js.TEST_VID.volume=e/2+.1;const t=e!==Js.TEST_VID.volume;return t&&me?(s.a.setTimeout(()=>{Js&&Js.prototype&&(Js.prototype.featuresVolumeControl=e!==Js.TEST_VID.volume)}),!1):t}catch(e){return!1}},Js.canMuteVolume=function(){try{const e=Js.TEST_VID.muted;return Js.TEST_VID.muted=!e,Js.TEST_VID.muted?Me(Js.TEST_VID,"muted","muted"):Ne(Js.TEST_VID,"muted","muted"),e!==Js.TEST_VID.muted}catch(e){return!1}},Js.canControlPlaybackRate=function(){if(te&&ne&&oe<58)return!1;try{const e=Js.TEST_VID.playbackRate;return Js.TEST_VID.playbackRate=e/2+.1,e!==Js.TEST_VID.playbackRate}catch(e){return!1}},Js.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(a.a.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(a.a.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(a.a.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(a.a.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},Js.supportsNativeTextTracks=function(){return ge||me&&ne},Js.supportsNativeVideoTracks=function(){return!(!Js.TEST_VID||!Js.TEST_VID.videoTracks)},Js.supportsNativeAudioTracks=function(){return!(!Js.TEST_VID||!Js.TEST_VID.audioTracks)},Js.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,t]){K(Js.prototype,e,()=>Js[t](),!0)})),Js.prototype.featuresVolumeControl=Js.canControlVolume(),Js.prototype.movingMediaElementInDOM=!me,Js.prototype.featuresFullscreenResize=!0,Js.prototype.featuresProgressEvents=!0,Js.prototype.featuresTimeupdateEvents=!0,Js.prototype.featuresVideoFrameCallback=!(!Js.TEST_VID||!Js.TEST_VID.requestVideoFrameCallback),Js.disposeMediaElement=function(e){if(e){e.parentNode&&e.parentNode.removeChild(e);while(e.hasChildNodes())e.removeChild(e.firstChild);e.removeAttribute("src"),"function"===typeof e.load&&function(){try{e.load()}catch(t){}}()}},Js.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll("source");let i=t.length;while(i--)e.removeChild(t[i]);e.removeAttribute("src"),"function"===typeof e.load&&function(){try{e.load()}catch(t){}}()},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){Js.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){Js.prototype["set"+qt(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){Js.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){Js.prototype["set"+qt(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){Js.prototype[e]=function(){return this.el_[e]()}})),ji.withSourceHandlers(Js),Js.nativeSourceHandler={},Js.nativeSourceHandler.canPlayType=function(e){try{return Js.TEST_VID.canPlayType(e)}catch(t){return""}},Js.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Js.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=xi(e.src);return Js.nativeSourceHandler.canPlayType("video/"+t)}return""},Js.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},Js.nativeSourceHandler.dispose=function(){},Js.registerSourceHandler(Js.nativeSourceHandler),ji.registerTech("Html5",Js);const Qs=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Zs={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},en=["tiny","xsmall","small","medium","large","xlarge","huge"],tn={};en.forEach(e=>{const t="x"===e.charAt(0)?"x-"+e.substring(1):e;tn[e]="vjs-layout-"+t});const rn={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class sn extends zt{constructor(e,t,i){if(e.id=e.id||t.id||"vjs_video_"+lt(),t=Object.assign(sn.getTagSettings(e),t),t.initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest("[lang]");i&&(t.language=i.getAttribute("lang"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.isFullscreen_=!1,this.log=$(this.id_),this.fsApi_=M,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=e,this.tagAttributes=e&&Le(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach((function(i){e[i.toLowerCase()]=t.languages[i]})),this.languages_=e}else this.languages_=sn.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||"",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach(e=>{if("function"!==typeof this[e])throw new Error(`plugin "${e}" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),Ut(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(ft(a.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const r=Y(this.options_);t.plugins&&Object.keys(t.plugins).forEach(e=>{this[e](t.plugins[e])}),t.debug&&this.debug(!0),this.options_.playerOptions=r,this.middleware_=[],this.playbackRates(t.playbackRates),this.initChildren(),this.isAudio("audio"===e.nodeName.toLowerCase()),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),pe&&this.addClass("vjs-touch-enabled"),me||this.addClass("vjs-workinghover"),sn.players[this.id_]=this;const s=I.split(".")[0];this.addClass("vjs-v"+s),this.userActive(!0),this.reportUserActivity(),this.one("play",e=>this.listenForUserActivity_(e)),this.on("keydown",e=>this.handleKeyDown(e)),this.on("languagechange",e=>this.handleLanguagechange(e)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){this.trigger("dispose"),this.off("dispose"),mt(a.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),mt(a.a,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),sn.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),er(this),Ui.names.forEach(e=>{const t=Ui[e],i=this[t.getterName]();i&&i.off&&i.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player");const r="video-js"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:r||(e=this.el_=super.createEl("div"));const n=Le(t);if(r){e=this.el_=t,t=this.tag=a.a.createElement("video");while(e.children.length)t.appendChild(e.firstChild);ke(e,"video-js")||Ie(e,"video-js"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach(i=>{try{t[i]=e[i]}catch(r){}})}if(t.setAttribute("tabindex","-1"),n.tabindex="-1",ne&&ue&&(t.setAttribute("role","application"),n.role="application"),t.removeAttribute("width"),t.removeAttribute("height"),"width"in n&&delete n.width,"height"in n&&delete n.height,Object.getOwnPropertyNames(n).forEach((function(i){r&&"class"===i||e.setAttribute(i,n[i]),r&&t.setAttribute(i,n[i])})),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=e.player=this,this.addClass("vjs-paused"),!0!==s.a.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=it("vjs-styles-dimensions");const e=We(".vjs-styles-defaults"),t=We("head");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const o=t.getElementsByTagName("a");for(let s=0;s<o.length;s++){const e=o.item(s);Ie(e,"vjs-hidden"),e.setAttribute("hidden","hidden")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),xe(t,e),this.children_.unshift(t),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=e,e}crossOrigin(e){if("undefined"===typeof e)return this.techGet_("crossOrigin");null===e||"anonymous"===e||"use-credentials"===e?(this.techCall_("setCrossOrigin",e),this.posterImage&&this.posterImage.crossOrigin(e)):q.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`)}width(e){return this.dimension("width",e)}height(e){return this.dimension("height",e)}dimension(e,t){const i=e+"_";if(void 0===t)return this[i]||0;if(""===t||"auto"===t)return this[i]=void 0,void this.updateStyleEl_();const r=parseFloat(t);isNaN(r)?q.error(`Improper value "${t}" supplied for for ${e}`):(this[i]=r,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;this.fluid_=!!e,It(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),At(this,()=>{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===s.a.VIDEOJS_NO_DYNAMIC_STYLE){const e="number"===typeof this.width_?this.width_:this.options_.width,t="number"===typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,r;i=void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9";const n=i.split(":"),a=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/a:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*a,r=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(r),rt(this.styleEl_,`\n .${r} {\n width: ${e}px;\n height: ${t}px;\n }\n\n .${r}.vjs-fluid:not(.vjs-audio-only-mode) {\n padding-top: ${100*a}%;\n }\n `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=qt(e),r=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==i&&this.tag&&(ji.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let s=this.autoplay();("string"===typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(s=!1);const n={source:t,autoplay:s,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${r}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};Ui.names.forEach(e=>{const t=Ui[e];n[t.getterName]=this[t.privateName]}),Object.assign(n,this.options_[i]),Object.assign(n,this.options_[r]),Object.assign(n,this.options_[e.toLowerCase()]),this.tag&&(n.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(n.startTime=this.cache_.currentTime);const a=ji.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new a(n),this.tech_.ready(Tt(this,this.handleTechReady_),!0),li.jsonToTextTracks(this.textTracksJson_||[],this.tech_),Qs.forEach(e=>{this.on(this.tech_,e,t=>this[`handleTech${qt(e)}_`](t))}),Object.keys(Zs).forEach(e=>{this.on(this.tech_,e,t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${Zs[e]}_`].bind(this),event:t}):this[`handleTech${Zs[e]}_`](t)})}),this.on(this.tech_,"loadstart",e=>this.handleTechLoadStart_(e)),this.on(this.tech_,"sourceset",e=>this.handleTechSourceset_(e)),this.on(this.tech_,"waiting",e=>this.handleTechWaiting_(e)),this.on(this.tech_,"ended",e=>this.handleTechEnded_(e)),this.on(this.tech_,"seeking",e=>this.handleTechSeeking_(e)),this.on(this.tech_,"play",e=>this.handleTechPlay_(e)),this.on(this.tech_,"pause",e=>this.handleTechPause_(e)),this.on(this.tech_,"durationchange",e=>this.handleTechDurationChange_(e)),this.on(this.tech_,"fullscreenchange",(e,t)=>this.handleTechFullscreenChange_(e,t)),this.on(this.tech_,"fullscreenerror",(e,t)=>this.handleTechFullscreenError_(e,t)),this.on(this.tech_,"enterpictureinpicture",e=>this.handleTechEnterPictureInPicture_(e)),this.on(this.tech_,"leavepictureinpicture",e=>this.handleTechLeavePictureInPicture_(e)),this.on(this.tech_,"error",e=>this.handleTechError_(e)),this.on(this.tech_,"posterchange",e=>this.handleTechPosterChange_(e)),this.on(this.tech_,"textdata",e=>this.handleTechTextData_(e)),this.on(this.tech_,"ratechange",e=>this.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"===i&&this.tag||xe(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){Ui.names.forEach(e=>{const t=Ui[e];this[t.privateName]=this[t.getterName]()}),this.textTracksJson_=li.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&q.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_}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(e){if(!this.tech_||"string"!==typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(ri(i))return i.catch(e=>{throw t(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(e||""))})};let i;return"any"!==e||this.muted()?i="muted"!==e||this.muted()?this.play():t():(i=this.play(),ri(i)&&(i=i.catch(t))),ri(i)?i.then(()=>{this.trigger({type:"autoplay-success",autoplay:e})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:e})}):void 0}updateSourceCaches_(e=""){let t=e,i="";"string"!==typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=nr(this,t)),this.cache_.source=Y({},e,{src:t,type:i});const r=this.cache_.sources.filter(e=>e.src&&e.src===t),s=[],n=this.$$("source"),a=[];for(let o=0;o<n.length;o++){const e=Le(n[o]);s.push(e),e.src&&e.src===t&&a.push(e.src)}a.length&&!r.length?this.cache_.sources=s:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,r=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(r)&&(!this.lastSource_||this.lastSource_.tech!==r&&this.lastSource_.player!==i)&&(t=()=>{}),t(r),e.src||this.tech_.any(["sourceset","loadstart"],e=>{if("sourceset"===e.type)return;const t=this.techGet("currentSrc");this.lastSource_.tech=t,this.updateSourceCaches_(t)})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(e=>e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",t))};this.on("timeupdate",t)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(e){this.controls_&&(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()?si(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;const t=Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),t=>t.contains(e.target));t||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())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let r=a.a[this.fsApi_.fullscreenElement]===i;!r&&i.matches?r=i.matches(":"+this.fsApi_.fullscreen):!r&&i.msMatchesSelector&&(r=i.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(r)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",()=>{this.removeClass("vjs-ios-native-fs")})),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger("fullscreenerror",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready((function(){if(e in Ki)return Wi(this.middleware_,this.tech_,e,t);if(e in Ji)return Xi(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(i){throw q(i),i}}),!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in Yi)return Gi(this.middleware_,this.tech_,e);if(e in Ji)return Xi(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw q(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if("TypeError"===t.name)throw q(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw q(t),t}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=si){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(t||!ge&&!me||this.load());const i=this.techGet_("play");null===i?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(i)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))}pause(){this.techCall_("pause")}paused(){return!1!==this.techGet_("paused")}played(){return this.techGet_("played")||Xt(0,0)}scrubbing(e){if("undefined"===typeof e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}currentTime(e){return"undefined"!==typeof 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)}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;e=parseFloat(e),e<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_("buffered");return e&&e.length||(e=Xt(0,0)),e}bufferedPercent(){return ti(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;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)}muted(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)}defaultMuted(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise((i,r)=>{function s(){t.off("fullscreenerror",a),t.off("fullscreenchange",n)}function n(){s(),i()}function a(e,t){s(),r(t)}t.one("fullscreenchange",n),t.one("fullscreenerror",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(s,s),o.then(i,r))})}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),e}this.tech_.supportsFullScreen()&&!0===!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise((t,i)=>{function r(){e.off("fullscreenerror",n),e.off("fullscreenchange",s)}function s(){r(),t()}function n(e,t){r(),i(t)}e.one("fullscreenchange",s),e.one("fullscreenerror",n);const a=e.exitFullscreenHelper_();a&&(a.then(r,r),a.then(t,i))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=a.a[this.fsApi_.exitFullscreen]();return e&&si(e.then(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0===!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=a.a.documentElement.style.overflow,ft(a.a,"keydown",this.boundFullWindowOnEscKey_),a.a.documentElement.style.overflow="hidden",Ie(a.a.body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(e){l.a.isEventKey(e,"Esc")&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,mt(a.a,"keydown",this.boundFullWindowOnEscKey_),a.a.documentElement.style.overflow=this.docOrigOverflow,Ae(a.a.body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if("pictureInPictureEnabled"in a.a&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")}exitPictureInPicture(){if("pictureInPictureEnabled"in a.a)return a.a.exitPictureInPicture()}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;const i=e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;const i=["button","checkbox","hidden","radio","reset","submit"];if("input"===t)return-1===i.indexOf(e.type);const r=["textarea"];return-1!==r.indexOf(t)};i(this.el_.ownerDocument.activeElement)||("function"===typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=(e=>l.a.isEventKey(e,"f")),muteKey:r=(e=>l.a.isEventKey(e,"m")),playPauseKey:s=(e=>l.a.isEventKey(e,"k")||l.a.isEventKey(e,"Space"))}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=zt.getComponent("FullscreenToggle");!1!==a.a[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(r.call(this,e)){e.preventDefault(),e.stopPropagation();const t=zt.getComponent("MuteToggle");t.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation();const t=zt.getComponent("PlayToggle");t.prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let i=0,r=this.options_.techOrder;i<r.length;i++){const s=r[i];let n=ji.getTech(s);if(n||(n=zt.getComponent(s)),n){if(n.isSupported()&&(t=n.canPlayType(e),t))return t}else q.error(`The "${s}" tech is undefined. Skipped browser support check for that tech.`)}return""}selectSource(e){const t=this.options_.techOrder.map(e=>[e,ji.getTech(e)]).filter(([e,t])=>t?t.isSupported():(q.error(`The "${e}" tech is undefined. Skipped browser support check for that tech.`),!1)),i=function(e,t,i){let r;return e.some(e=>t.some(t=>{if(r=i(e,t),r)return!0})),r};let r;const s=e=>(t,i)=>e(i,t),n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};return r=this.options_.sourceOrder?i(e,t,s(n)):i(t,e,n),r||!1}handleSrc_(e,t){if("undefined"===typeof e)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const i=ar(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),zi(this,i[0],(e,r)=>{this.middleware_=r,t||(this.cache_.sources=i),this.updateSourceCaches_(e);const s=this.src_(e);if(s)return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void this.triggerReady());Vi(r,this.tech_)}),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off("error",e)};this.one("error",e),this.one("playing",t),this.resetRetryOnError_=()=>{this.off("error",e),this.off("playing",t)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||($t(t.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1))}load(){this.techCall_("load")}reset(){if(this.paused())this.doReset_();else{const e=this.play();si(e.then(()=>this.doReset_()))}}doReset_(){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")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{durationDisplay:e,remainingTimeDisplay:t}=this.controlBar||{};e&&e.updateContent(),t&&t.updateContent()}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let 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="undefined"===typeof t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)}playsinline(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")}loop(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")}poster(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"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}}controls(e){if(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_()))}usingNativeControls(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")))}error(e){if(void 0===e)return this.error_||null;if(O("beforeerror").forEach(t=>{const i=t(this,e);W(i)&&!Array.isArray(i)||"string"===typeof i||"number"===typeof i||null===i?e=i:this.log.error("please return a value that MediaError expects in beforeerror hooks")}),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),void this.one("loadstart",(function(){this.off(["click","touchstart"],t)}))}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new ii(e),this.addClass("vjs-error"),q.error(`(CODE:${this.error_.code} ${ii.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),O("error").forEach(e=>e(this,this.error_))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if(e=!!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")}}listenForUserActivity_(){let e,t,i;const r=Tt(this,this.reportUserActivity),s=function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,r())},n=function(){r(),this.clearInterval(e),e=this.setInterval(r,250)},a=function(t){r(),this.clearInterval(e)};this.on("mousedown",n),this.on("mousemove",s),this.on("mouseup",a),this.on("mouseleave",a);const o=this.getChild("controlBar");let l;!o||me||te||(o.on("mouseenter",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),o.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_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(l);const e=this.options_.inactivityTimeout;e<=0||(l=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}),250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");const e=this.children(),t=this.getChild("ControlBar"),i=t&&t.currentHeight();e.forEach(e=>{e!==t&&e.el_&&!e.hasClass("vjs-hidden")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.height(i),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.audioOnlyCache_.hiddenChildren.forEach(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(e){if("boolean"!==typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){const e=this.tech_&&this.tech_;e.hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){const e=this.tech_&&this.tech_;e.show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(e){if("boolean"!==typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){const e=this.audioOnlyMode(!1);return e.then(()=>{this.enablePosterModeUI_()})}return Promise.resolve().then(()=>{this.enablePosterModeUI_()})}return Promise.resolve().then(()=>{this.disablePosterModeUI_()})}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),It(this)&&this.trigger("languagechange"))}languages(){return Y(sn.prototype.options_.languages,this.languages_)}toJSON(){const e=Y(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let r=t[i];r=Y(r),r.player=void 0,e.tracks[i]=r}return e}createModal(e,t){t=t||{},t.content=e||"";const i=new ui(this,t);return this.addChild(i),i.on("dispose",()=>{this.removeChild(i)}),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<en.length;i++){const r=en[i],s=this.breakpoints_[r];if(t<=s){if(e===r)return;e&&this.removeClass(tn[e]),this.addClass(tn[r]),this.breakpoint_=r;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=Object.assign({},rn,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;e=Boolean(e);const t=this.responsive_;return e!==t?(this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return tn[this.breakpoint_]||""}loadMedia(e,t){if(!e||"object"!==typeof e)return;this.reset(),this.cache_.media=Y(e);const{artist:i,artwork:r,description:s,poster:n,src:a,textTracks:o,title:l}=this.cache_.media;!r&&n&&(this.cache_.media.artwork=[{src:n,type:sr(n)}]),a&&this.src(a),n&&this.poster(n),Array.isArray(o)&&o.forEach(e=>this.addRemoteTextTrack(e,!1)),this.titleBar&&this.titleBar.update({title:l,description:s||i||""}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t=this.currentSources(),i=Array.prototype.map.call(this.remoteTextTracks(),e=>({kind:e.kind,label:e.label,language:e.language,src:e.src})),r={src:t,textTracks:i};return e&&(r.poster=e,r.artwork=[{src:r.poster,type:sr(r.poster)}]),r}return Y(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=Le(e),r=i["data-setup"];if(ke(e,"vjs-fill")&&(i.fill=!0),ke(e,"vjs-fluid")&&(i.fluid=!0),null!==r){const[e,t]=u()(r||"{}");e&&q.error(e),Object.assign(i,t)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,r=i.length;e<r;e++){const r=i[e],s=r.nodeName.toLowerCase();"source"===s?t.sources.push(Le(r)):"track"===s&&t.tracks.push(Le(r))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every(e=>"number"===typeof e)&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}}Ui.names.forEach((function(e){const t=Ui[e];sn.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),sn.prototype.crossorigin=sn.prototype.crossOrigin,sn.players={};const nn=s.a.navigator;sn.prototype.options_={techOrder:ji.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:nn&&(nn.languages&&nn.languages[0]||nn.userLanguage||nn.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1},["ended","seeking","seekable","networkState","readyState"].forEach((function(e){sn.prototype[e]=function(){return this.techGet_(e)}})),Qs.forEach((function(e){sn.prototype[`handleTech${qt(e)}_`]=function(){return this.trigger(e)}})),zt.registerComponent("Player",sn);const an="plugin",on="activePlugins_",ln={},dn=e=>ln.hasOwnProperty(e),un=e=>dn(e)?ln[e]:void 0,cn=(e,t)=>{e[on]=e[on]||{},e[on][t]=!0},hn=(e,t,i)=>{const r=(i?"before":"")+"pluginsetup";e.trigger(r,t),e.trigger(r+":"+t.name,t)},pn=function(e,t){const i=function(){hn(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return cn(this,e),hn(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach((function(e){i[e]=t[e]})),i},fn=(e,t)=>(t.prototype.name=e,function(...i){hn(this,{name:e,plugin:t,instance:null},!0);const r=new t(...[this,...i]);return this[e]=()=>r,hn(this,r.getEventHash()),r});class mn{constructor(e){if(this.constructor===mn)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),Ut(this),delete this.trigger,jt(this,this.constructor.defaultState),cn(e,this.name),this.dispose=this.dispose.bind(this),e.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return gt(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[on][e]=!1,this.player=this.state=null,t[e]=fn(e,ln[e])}static isBasic(e){const t="string"===typeof e?un(e):e;return"function"===typeof t&&!mn.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if("string"!==typeof e)throw new Error(`Illegal plugin name, "${e}", must be a string, was ${typeof e}.`);if(dn(e))q.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(sn.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, "${e}", cannot share a name with an existing player method!`);if("function"!==typeof t)throw new Error(`Illegal plugin for "${e}", must be a function, was ${typeof t}.`);return ln[e]=t,e!==an&&(mn.isBasic(t)?sn.prototype[e]=pn(e,t):sn.prototype[e]=fn(e,t)),t}static deregisterPlugin(e){if(e===an)throw new Error("Cannot de-register base plugin.");dn(e)&&(delete ln[e],delete sn.prototype[e])}static getPlugins(e=Object.keys(ln)){let t;return e.forEach(e=>{const i=un(e);i&&(t=t||{},t[e]=i)}),t}static getPluginVersion(e){const t=un(e);return t&&t.VERSION||""}}function gn(e,t){let i=!1;return function(...r){return i||q.warn(e),i=!0,t.apply(this,r)}}function yn(e,t,i,r){return gn(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,r)}mn.getPlugin=un,mn.BASE_PLUGIN_NAME=an,mn.registerPlugin(an,mn),sn.prototype.usingPlugin=function(e){return!!this[on]&&!0===this[on][e]},sn.prototype.hasPlugin=function(e){return!!dn(e)};const vn=e=>0===e.indexOf("#")?e.slice(1):e;function bn(e,t,i){let r=bn.getPlayer(e);if(r)return t&&q.warn(`Player "${e}" is already initialised. Options will not be applied.`),i&&r.ready(i),r;const s="string"===typeof e?We("#"+vn(e)):e;if(!Te(s))throw new TypeError("The element or ID supplied is not valid. (videojs)");s.ownerDocument.defaultView&&s.ownerDocument.body.contains(s)||q.warn("The element supplied is not included in the DOM"),t=t||{},!0===t.restoreEl&&(t.restoreEl=(s.parentNode&&s.parentNode.hasAttribute("data-vjs-player")?s.parentNode:s).cloneNode(!0)),O("beforesetup").forEach(e=>{const i=e(s,Y(t));W(i)&&!Array.isArray(i)?t=Y(t,i):q.error("please return an object in beforesetup hooks")});const n=zt.getComponent("Player");return r=new n(s,t,i),O("setup").forEach(e=>e(r)),r}if(bn.hooks_=A,bn.hooks=O,bn.hook=P,bn.hookOnce=D,bn.removeHook=L,!0!==s.a.VIDEOJS_NO_DYNAMIC_STYLE&&_e()){let e=We(".vjs-styles-defaults");if(!e){e=it("vjs-styles-defaults");const t=We("head");t&&t.insertBefore(e,t.firstChild),rt(e,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid:not(.vjs-audio-only-mode) {\n padding-top: 56.25%\n }\n ")}}et(1,bn),bn.VERSION=I,bn.options=sn.prototype.options_,bn.getPlayers=()=>sn.players,bn.getPlayer=e=>{const t=sn.players;let i;if("string"===typeof e){const r=vn(e),s=t[r];if(s)return s;i=We("#"+r)}else i=e;if(Te(i)){const{player:e,playerId:r}=i;if(e||t[r])return e||t[r]}},bn.getAllPlayers=()=>Object.keys(sn.players).map(e=>sn.players[e]).filter(Boolean),bn.players=sn.players,bn.getComponent=zt.getComponent,bn.registerComponent=(e,t)=>{ji.isTech(t)&&q.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),zt.registerComponent.call(zt,e,t)},bn.getTech=ji.getTech,bn.registerTech=ji.registerTech,bn.use=Hi,Object.defineProperty(bn,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(bn.middleware,"TERMINATOR",{value:$i,writeable:!1,enumerable:!0}),bn.browser=ye,bn.obj=J,bn.mergeOptions=yn(9,"videojs.mergeOptions","videojs.obj.merge",Y),bn.defineLazyProperty=yn(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",K),bn.bind=yn(9,"videojs.bind","native Function.prototype.bind",Tt),bn.registerPlugin=mn.registerPlugin,bn.deregisterPlugin=mn.deregisterPlugin,bn.plugin=(e,t)=>(q.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),mn.registerPlugin(e,t)),bn.getPlugins=mn.getPlugins,bn.getPlugin=mn.getPlugin,bn.getPluginVersion=mn.getPluginVersion,bn.addLanguage=function(e,t){return e=(""+e).toLowerCase(),bn.options.languages=Y(bn.options.languages,{[e]:t}),bn.options.languages[e]},bn.log=q,bn.createLogger=$,bn.time=ei,bn.createTimeRange=yn(9,"videojs.createTimeRange","videojs.time.createTimeRanges",Xt),bn.createTimeRanges=yn(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",Xt),bn.formatTime=yn(9,"videojs.formatTime","videojs.time.formatTime",Zt),bn.setFormatTime=yn(9,"videojs.setFormatTime","videojs.time.setFormatTime",Jt),bn.resetFormatTime=yn(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",Qt),bn.parseUrl=yn(9,"videojs.parseUrl","videojs.url.parseUrl",Ei),bn.isCrossOrigin=yn(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",ki),bn.EventTarget=xt,bn.any=vt,bn.on=ft,bn.one=yt,bn.off=mt,bn.trigger=gt,bn.xhr=h.a,bn.TextTrack=Pi,bn.AudioTrack=Li,bn.VideoTrack=Di,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(e=>{bn[e]=function(){return q.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),Ke[e].apply(null,arguments)}}),bn.computedStyle=yn(9,"videojs.computedStyle","videojs.dom.computedStyle",Ye),bn.dom=Ke,bn.fn=Et,bn.num=Or,bn.str=Ht,bn.url=Ii;
24
+ for(n=97;n<123;n++)r[String.fromCharCode(n)]=n-32;for(var n=48;n<58;n++)r[n-48]=n;for(n=1;n<13;n++)r["f"+n]=n+111;for(n=0;n<10;n++)r["numpad "+n]=n+96;var a=t.names=t.title={};for(n in r)a[r[n]]=n;for(var o in s)r[o]=s[o]},df7c:function(e,t,i){(function(e){function i(e,t){for(var i=0,r=e.length-1;r>=0;r--){var s=e[r];"."===s?e.splice(r,1):".."===s?(e.splice(r,1),i++):i&&(e.splice(r,1),i--)}if(t)for(;i--;i)e.unshift("..");return e}function r(e){"string"!==typeof e&&(e+="");var t,i=0,r=-1,s=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!s){i=t+1;break}}else-1===r&&(s=!1,r=t+1);return-1===r?"":e.slice(i,r)}function s(e,t){if(e.filter)return e.filter(t);for(var i=[],r=0;r<e.length;r++)t(e[r],r,e)&&i.push(e[r]);return i}t.resolve=function(){for(var t="",r=!1,n=arguments.length-1;n>=-1&&!r;n--){var a=n>=0?arguments[n]:e.cwd();if("string"!==typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(t=a+"/"+t,r="/"===a.charAt(0))}return t=i(s(t.split("/"),(function(e){return!!e})),!r).join("/"),(r?"/":"")+t||"."},t.normalize=function(e){var r=t.isAbsolute(e),a="/"===n(e,-1);return e=i(s(e.split("/"),(function(e){return!!e})),!r).join("/"),e||r||(e="."),e&&a&&(e+="/"),(r?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(s(e,(function(e,t){if("string"!==typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,i){function r(e){for(var t=0;t<e.length;t++)if(""!==e[t])break;for(var i=e.length-1;i>=0;i--)if(""!==e[i])break;return t>i?[]:e.slice(t,i-t+1)}e=t.resolve(e).substr(1),i=t.resolve(i).substr(1);for(var s=r(e.split("/")),n=r(i.split("/")),a=Math.min(s.length,n.length),o=a,l=0;l<a;l++)if(s[l]!==n[l]){o=l;break}var d=[];for(l=o;l<s.length;l++)d.push("..");return d=d.concat(n.slice(o)),d.join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!==typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),i=47===t,r=-1,s=!0,n=e.length-1;n>=1;--n)if(t=e.charCodeAt(n),47===t){if(!s){r=n;break}}else s=!1;return-1===r?i?"/":".":i&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var i=r(e);return t&&i.substr(-1*t.length)===t&&(i=i.substr(0,i.length-t.length)),i},t.extname=function(e){"string"!==typeof e&&(e+="");for(var t=-1,i=0,r=-1,s=!0,n=0,a=e.length-1;a>=0;--a){var o=e.charCodeAt(a);if(47!==o)-1===r&&(s=!1,r=a+1),46===o?-1===t?t=a:1!==n&&(n=1):-1!==t&&(n=-1);else if(!s){i=a+1;break}}return-1===t||-1===r||0===n||1===n&&t===r-1&&t===i+1?"":e.slice(t,r)};var n="b"==="ab".substr(-1)?function(e,t,i){return e.substr(t,i)}:function(e,t,i){return t<0&&(t=e.length+t),e.substr(t,i)}}).call(this,i("4362"))},e003:function(e,t,i){var r=i("89a7").NAMESPACE,s=/[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]/,n=new RegExp("[\\-\\.0-9"+s.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),a=new RegExp("^"+s.source+n.source+"*(?::"+s.source+n.source+"*)?$"),o=0,l=1,d=2,u=3,c=4,h=5,p=6,f=7;function m(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,m)}function g(){}function y(e,t,i,s,n){function a(e){if(e>65535){e-=65536;var t=55296+(e>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function o(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:"#"===t.charAt(0)?a(parseInt(t.substr(1).replace("x","0x"))):(n.error("entity not found:"+e),e)}function l(t){if(t>y){var i=e.substring(y,t).replace(/&#?\w+;/g,o);p&&d(y),s.characters(i,0,t-y),y=t}}function d(t,i){while(t>=c&&(i=h.exec(e)))u=i.index,c=u+i[0].length,p.lineNumber++;p.columnNumber=t-u+1}var u=0,c=0,h=/.*(?:\r\n?|\n)|.*$/g,p=s.locator,f=[{currentNSMap:t}],g={},y=0;while(1){try{var w=e.indexOf("<",y);if(w<0){if(!e.substr(y).match(/^\s*$/)){var k=s.doc,I=k.createTextNode(e.substr(y));k.appendChild(I),s.currentElement=I}return}switch(w>y&&l(w),e.charAt(w+1)){case"/":var A=e.indexOf(">",w+3),P=e.substring(w+2,A).replace(/[ \t\n\r]+$/g,""),O=f.pop();A<0?(P=e.substring(w+2).replace(/[\s<].*/,""),n.error("end tag name: "+P+" is not complete:"+O.tagName),A=w+1+P.length):P.match(/\s</)&&(P=P.replace(/[\s<].*/,""),n.error("end tag name: "+P+" maybe not complete"),A=w+1+P.length);var L=O.localNSMap,D=O.tagName==P,M=D||O.tagName&&O.tagName.toLowerCase()==P.toLowerCase();if(M){if(s.endElement(O.uri,O.localName,P),L)for(var N in L)Object.prototype.hasOwnProperty.call(L,N)&&s.endPrefixMapping(N);D||n.fatalError("end tag name: "+P+" is not match the current start tagName:"+O.tagName)}else f.push(O);A++;break;case"?":p&&d(w),A=C(e,w,s);break;case"!":p&&d(w),A=E(e,w,s,n);break;default:p&&d(w);var R=new x,U=f[f.length-1].currentNSMap,B=(A=b(e,w,R,U,o,n),R.length);if(!R.closed&&S(e,A,R.tagName,g)&&(R.closed=!0,i.nbsp||n.warning("unclosed xml attribute")),p&&B){for(var j=v(p,{}),F=0;F<B;F++){var q=R[F];d(q.offset),q.locator=v(p,{})}s.locator=j,_(R,s,U)&&f.push(R),s.locator=p}else _(R,s,U)&&f.push(R);r.isHTML(R.uri)&&!R.closed?A=T(e,A,R.tagName,o,s):A++}}catch($){if($ instanceof m)throw $;n.error("element parse error: "+$),A=-1}A>y?y=A:l(Math.max(w,y)+1)}}function v(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function b(e,t,i,s,n,a){function m(e,t,r){i.attributeNames.hasOwnProperty(e)&&a.fatalError("Attribute "+e+" redefined"),i.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,n),r)}var g,y=++t,v=o;while(1){var b=e.charAt(y);switch(b){case"=":if(v===l)g=e.slice(t,y),v=u;else{if(v!==d)throw new Error("attribute equal must after attrName");v=u}break;case"'":case'"':if(v===u||v===l){if(v===l&&(a.warning('attribute value must after "="'),g=e.slice(t,y)),t=y+1,y=e.indexOf(b,t),!(y>0))throw new Error("attribute value no end '"+b+"' match");_=e.slice(t,y),m(g,_,t-1),v=h}else{if(v!=c)throw new Error('attribute value must after "="');_=e.slice(t,y),m(g,_,t),a.warning('attribute "'+g+'" missed start quot('+b+")!!"),t=y+1,v=h}break;case"/":switch(v){case o:i.setTagName(e.slice(t,y));case h:case p:case f:v=f,i.closed=!0;case c:case l:break;case d:i.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),v==o&&i.setTagName(e.slice(t,y)),y;case">":switch(v){case o:i.setTagName(e.slice(t,y));case h:case p:case f:break;case c:case l:_=e.slice(t,y),"/"===_.slice(-1)&&(i.closed=!0,_=_.slice(0,-1));case d:v===d&&(_=g),v==c?(a.warning('attribute "'+_+'" missed quot(")!'),m(g,_,t)):(r.isHTML(s[""])&&_.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+_+'" missed value!! "'+_+'" instead!!'),m(_,_,t));break;case u:throw new Error("attribute value missed!!")}return y;case"€":b=" ";default:if(b<=" ")switch(v){case o:i.setTagName(e.slice(t,y)),v=p;break;case l:g=e.slice(t,y),v=d;break;case c:var _=e.slice(t,y);a.warning('attribute "'+_+'" missed quot(")!!'),m(g,_,t);case h:v=p;break}else switch(v){case d:i.tagName;r.isHTML(s[""])&&g.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+g+'" missed value!! "'+g+'" instead2!!'),m(g,g,t),t=y,v=l;break;case h:a.warning('attribute space is required"'+g+'"!!');case p:v=l,t=y;break;case u:v=c,t=y;break;case f:throw new Error("elements closed character '/' and '>' must be connected to")}}y++}}function _(e,t,i){var s=e.tagName,n=null,a=e.length;while(a--){var o=e[a],l=o.qName,d=o.value,u=l.indexOf(":");if(u>0)var c=o.prefix=l.slice(0,u),h=l.slice(u+1),p="xmlns"===c&&h;else h=l,c=null,p="xmlns"===l&&"";o.localName=h,!1!==p&&(null==n&&(n={},w(i,i={})),i[p]=n[p]=d,o.uri=r.XMLNS,t.startPrefixMapping(p,d))}a=e.length;while(a--){o=e[a];c=o.prefix;c&&("xml"===c&&(o.uri=r.XML),"xmlns"!==c&&(o.uri=i[c||""]))}u=s.indexOf(":");u>0?(c=e.prefix=s.slice(0,u),h=e.localName=s.slice(u+1)):(c=null,h=e.localName=s);var f=e.uri=i[c||""];if(t.startElement(f,h,s,e),!e.closed)return e.currentNSMap=i,e.localNSMap=n,!0;if(t.endElement(f,h,s),n)for(c in n)Object.prototype.hasOwnProperty.call(n,c)&&t.endPrefixMapping(c)}function T(e,t,i,r,s){if(/^(?:script|textarea)$/i.test(i)){var n=e.indexOf("</"+i+">",t),a=e.substring(t+1,n);if(/[&<]/.test(a))return/^script$/i.test(i)?(s.characters(a,0,a.length),n):(a=a.replace(/&#?\w+;/g,r),s.characters(a,0,a.length),n)}return t+1}function S(e,t,i,r){var s=r[i];return null==s&&(s=e.lastIndexOf("</"+i+">"),s<t&&(s=e.lastIndexOf("</"+i)),r[i]=s),s<t}function w(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function E(e,t,i,r){var s=e.charAt(t+2);switch(s){case"-":if("-"===e.charAt(t+3)){var n=e.indexOf("--\x3e",t+4);return n>t?(i.comment(e,t+4,n-t-4),n+3):(r.error("Unclosed comment"),-1)}return-1;default:if("CDATA["==e.substr(t+3,6)){n=e.indexOf("]]>",t+9);return i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3}var a=k(e,t),o=a.length;if(o>1&&/!doctype/i.test(a[0][0])){var l=a[1][0],d=!1,u=!1;o>3&&(/^public$/i.test(a[2][0])?(d=a[3][0],u=o>4&&a[4][0]):/^system$/i.test(a[2][0])&&(u=a[3][0]));var c=a[o-1];return i.startDTD(l,d,u),i.endDTD(),c.index+c[0].length}}return-1}function C(e,t,i){var r=e.indexOf("?>",t);if(r){var s=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(s){s[0].length;return i.processingInstruction(s[1],s[2]),r+2}return-1}return-1}function x(){this.attributeNames={}}function k(e,t){var i,r=[],s=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;s.lastIndex=t,s.exec(e);while(i=s.exec(e))if(r.push(i),i[1])return r}m.prototype=new Error,m.prototype.name=m.name,g.prototype={parse:function(e,t,i){var r=this.domBuilder;r.startDocument(),w(t,t={}),y(e,t,i,r,this.errorHandler),r.endDocument()}},x.prototype={setTagName:function(e){if(!a.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,i){if(!a.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},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=g,t.ParseError=m},e1c8:function(e,t,i){var r=i("89a7"),s=r.find,n=r.NAMESPACE;function a(e){return""!==e}function o(e){return e?e.split(/[\t\n\f\r ]+/).filter(a):[]}function l(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function d(e){if(!e)return[];var t=o(e);return Object.keys(t.reduce(l,{}))}function u(e){return function(t){return e&&-1!==e.indexOf(t)}}function c(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function h(e,t){var i=e.prototype;if(!(i instanceof t)){function r(){}r.prototype=t.prototype,r=new r,c(i,r),e.prototype=i=r}i.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),i.constructor=e)}var p={},f=p.ELEMENT_NODE=1,m=p.ATTRIBUTE_NODE=2,g=p.TEXT_NODE=3,y=p.CDATA_SECTION_NODE=4,v=p.ENTITY_REFERENCE_NODE=5,b=p.ENTITY_NODE=6,_=p.PROCESSING_INSTRUCTION_NODE=7,T=p.COMMENT_NODE=8,S=p.DOCUMENT_NODE=9,w=p.DOCUMENT_TYPE_NODE=10,E=p.DOCUMENT_FRAGMENT_NODE=11,C=p.NOTATION_NODE=12,x={},k={},I=(x.INDEX_SIZE_ERR=(k[1]="Index size error",1),x.DOMSTRING_SIZE_ERR=(k[2]="DOMString size error",2),x.HIERARCHY_REQUEST_ERR=(k[3]="Hierarchy request error",3)),A=(x.WRONG_DOCUMENT_ERR=(k[4]="Wrong document",4),x.INVALID_CHARACTER_ERR=(k[5]="Invalid character",5),x.NO_DATA_ALLOWED_ERR=(k[6]="No data allowed",6),x.NO_MODIFICATION_ALLOWED_ERR=(k[7]="No modification allowed",7),x.NOT_FOUND_ERR=(k[8]="Not found",8)),P=(x.NOT_SUPPORTED_ERR=(k[9]="Not supported",9),x.INUSE_ATTRIBUTE_ERR=(k[10]="Attribute in use",10));x.INVALID_STATE_ERR=(k[11]="Invalid state",11),x.SYNTAX_ERR=(k[12]="Syntax error",12),x.INVALID_MODIFICATION_ERR=(k[13]="Invalid modification",13),x.NAMESPACE_ERR=(k[14]="Invalid namespace",14),x.INVALID_ACCESS_ERR=(k[15]="Invalid access",15);function O(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,k[e]),this.message=k[e],Error.captureStackTrace&&Error.captureStackTrace(this,O);return i.code=e,t&&(this.message=this.message+": "+t),i}function L(){}function D(e,t){this._node=e,this._refresh=t,M(this)}function M(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(Ce(e,"length",i.length),!e.$$length||i.length<e.$$length)for(var r=i.length;r in e;r++)Object.prototype.hasOwnProperty.call(e,r)&&delete e[r];c(i,e),e._inc=t}}function N(){}function R(e,t){var i=e.length;while(i--)if(e[i]===t)return i}function U(e,t,i,r){if(r?t[R(t,r)]=i:t[t.length++]=i,e){i.ownerElement=e;var s=e.ownerDocument;s&&(r&&V(s,e,r),z(s,e,i))}}function B(e,t,i){var r=R(t,i);if(!(r>=0))throw new O(A,new Error(e.tagName+"@"+i));var s=t.length-1;while(r<s)t[r]=t[++r];if(t.length=s,e){var n=e.ownerDocument;n&&(V(n,e,i),i.ownerElement=null)}}function j(){}function F(){}function q(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function $(e,t){if(t(e))return!0;if(e=e.firstChild)do{if($(e,t))return!0}while(e=e.nextSibling)}function H(){this.ownerDocument=this}function z(e,t,i){e&&e._inc++;var r=i.namespaceURI;r===n.XMLNS&&(t._nsMap[i.prefix?i.localName:""]=i.value)}function V(e,t,i,r){e&&e._inc++;var s=i.namespaceURI;s===n.XMLNS&&delete t._nsMap[i.prefix?i.localName:""]}function G(e,t,i){if(e&&e._inc){e._inc++;var r=t.childNodes;if(i)r[r.length++]=i;else{var s=t.firstChild,n=0;while(s)r[n++]=s,s=s.nextSibling;r.length=n,delete r[r.length]}}}function W(e,t){var i=t.previousSibling,r=t.nextSibling;return i?i.nextSibling=r:e.firstChild=r,r?r.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,G(e.ownerDocument,e),t}function X(e){return e&&(e.nodeType===F.DOCUMENT_NODE||e.nodeType===F.DOCUMENT_FRAGMENT_NODE||e.nodeType===F.ELEMENT_NODE)}function Y(e){return e&&(J(e)||Q(e)||K(e)||e.nodeType===F.DOCUMENT_FRAGMENT_NODE||e.nodeType===F.COMMENT_NODE||e.nodeType===F.PROCESSING_INSTRUCTION_NODE)}function K(e){return e&&e.nodeType===F.DOCUMENT_TYPE_NODE}function J(e){return e&&e.nodeType===F.ELEMENT_NODE}function Q(e){return e&&e.nodeType===F.TEXT_NODE}function Z(e,t){var i=e.childNodes||[];if(s(i,J)||K(t))return!1;var r=s(i,K);return!(t&&r&&i.indexOf(r)>i.indexOf(t))}function ee(e,t){var i=e.childNodes||[];function r(e){return J(e)&&e!==t}if(s(i,r))return!1;var n=s(i,K);return!(t&&n&&i.indexOf(n)>i.indexOf(t))}function te(e,t,i){if(!X(e))throw new O(I,"Unexpected parent node type "+e.nodeType);if(i&&i.parentNode!==e)throw new O(A,"child not in parent");if(!Y(t)||K(t)&&e.nodeType!==F.DOCUMENT_NODE)throw new O(I,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function ie(e,t,i){var r=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===F.DOCUMENT_FRAGMENT_NODE){var a=n.filter(J);if(a.length>1||s(n,Q))throw new O(I,"More than one element or text in fragment");if(1===a.length&&!Z(e,i))throw new O(I,"Element in fragment can not be inserted before doctype")}if(J(t)&&!Z(e,i))throw new O(I,"Only one element can be added and only after doctype");if(K(t)){if(s(r,K))throw new O(I,"Only one doctype is allowed");var o=s(r,J);if(i&&r.indexOf(o)<r.indexOf(i))throw new O(I,"Doctype can only be inserted before an element");if(!i&&o)throw new O(I,"Doctype can not be appended since element is present")}}function re(e,t,i){var r=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===F.DOCUMENT_FRAGMENT_NODE){var a=n.filter(J);if(a.length>1||s(n,Q))throw new O(I,"More than one element or text in fragment");if(1===a.length&&!ee(e,i))throw new O(I,"Element in fragment can not be inserted before doctype")}if(J(t)&&!ee(e,i))throw new O(I,"Only one element can be added and only after doctype");if(K(t)){function o(e){return K(e)&&e!==i}if(s(r,o))throw new O(I,"Only one doctype is allowed");var l=s(r,J);if(i&&r.indexOf(l)<r.indexOf(i))throw new O(I,"Doctype can only be inserted before an element")}}function se(e,t,i,r){te(e,t,i),e.nodeType===F.DOCUMENT_NODE&&(r||ie)(e,t,i);var s=t.parentNode;if(s&&s.removeChild(t),t.nodeType===E){var n=t.firstChild;if(null==n)return t;var a=t.lastChild}else n=a=t;var o=i?i.previousSibling:e.lastChild;n.previousSibling=o,a.nextSibling=i,o?o.nextSibling=n:e.firstChild=n,null==i?e.lastChild=a:i.previousSibling=a;do{n.parentNode=e}while(n!==a&&(n=n.nextSibling));return G(e.ownerDocument||e,e),t.nodeType==E&&(t.firstChild=t.lastChild=null),t}function ne(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,G(e.ownerDocument,e,t),t}function ae(){this._nsMap={}}function oe(){}function le(){}function de(){}function ue(){}function ce(){}function he(){}function pe(){}function fe(){}function me(){}function ge(){}function ye(){}function ve(){}function be(e,t){var i=[],r=9==this.nodeType&&this.documentElement||this,s=r.prefix,n=r.namespaceURI;if(n&&null==s){s=r.lookupPrefix(n);if(null==s)var a=[{namespace:n,prefix:null}]}return Se(this,i,e,t,a),i.join("")}function _e(e,t,i){var r=e.prefix||"",s=e.namespaceURI;if(!s)return!1;if("xml"===r&&s===n.XML||s===n.XMLNS)return!1;var a=i.length;while(a--){var o=i[a];if(o.prefix===r)return o.namespace!==s}return!0}function Te(e,t,i){e.push(" ",t,'="',i.replace(/[<>&"\t\n\r]/g,q),'"')}function Se(e,t,i,r,s){if(s||(s=[]),r){if(e=r(e),!e)return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case f:var a=e.attributes,o=a.length,l=e.firstChild,d=e.tagName;i=n.isHTML(e.namespaceURI)||i;var u=d;if(!i&&!e.prefix&&e.namespaceURI){for(var c,h=0;h<a.length;h++)if("xmlns"===a.item(h).name){c=a.item(h).value;break}if(!c)for(var p=s.length-1;p>=0;p--){var b=s[p];if(""===b.prefix&&b.namespace===e.namespaceURI){c=b.namespace;break}}if(c!==e.namespaceURI)for(p=s.length-1;p>=0;p--){b=s[p];if(b.namespace===e.namespaceURI){b.prefix&&(u=b.prefix+":"+d);break}}}t.push("<",u);for(var C=0;C<o;C++){var x=a.item(C);"xmlns"==x.prefix?s.push({prefix:x.localName,namespace:x.value}):"xmlns"==x.nodeName&&s.push({prefix:"",namespace:x.value})}for(C=0;C<o;C++){x=a.item(C);if(_e(x,i,s)){var k=x.prefix||"",I=x.namespaceURI;Te(t,k?"xmlns:"+k:"xmlns",I),s.push({prefix:k,namespace:I})}Se(x,t,i,r,s)}if(d===u&&_e(e,i,s)){k=e.prefix||"",I=e.namespaceURI;Te(t,k?"xmlns:"+k:"xmlns",I),s.push({prefix:k,namespace:I})}if(l||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(d)){if(t.push(">"),i&&/^script$/i.test(d))while(l)l.data?t.push(l.data):Se(l,t,i,r,s.slice()),l=l.nextSibling;else while(l)Se(l,t,i,r,s.slice()),l=l.nextSibling;t.push("</",u,">")}else t.push("/>");return;case S:case E:l=e.firstChild;while(l)Se(l,t,i,r,s.slice()),l=l.nextSibling;return;case m:return Te(t,e.name,e.value);case g:return t.push(e.data.replace(/[<&>]/g,q));case y:return t.push("<![CDATA[",e.data,"]]>");case T:return t.push("\x3c!--",e.data,"--\x3e");case w:var A=e.publicId,P=e.systemId;if(t.push("<!DOCTYPE ",e.name),A)t.push(" PUBLIC ",A),P&&"."!=P&&t.push(" ",P),t.push(">");else if(P&&"."!=P)t.push(" SYSTEM ",P,">");else{var O=e.internalSubset;O&&t.push(" [",O,"]"),t.push(">")}return;case _:return t.push("<?",e.target," ",e.data,"?>");case v:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function we(e,t,i){var r;switch(t.nodeType){case f:r=t.cloneNode(!1),r.ownerDocument=e;case E:break;case m:i=!0;break}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,i){var s=t.firstChild;while(s)r.appendChild(we(e,s,i)),s=s.nextSibling}return r}function Ee(e,t,i){var r=new t.constructor;for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s)){var n=t[s];"object"!=typeof n&&n!=r[s]&&(r[s]=n)}switch(t.childNodes&&(r.childNodes=new L),r.ownerDocument=e,r.nodeType){case f:var a=t.attributes,o=r.attributes=new N,l=a.length;o._ownerElement=r;for(var d=0;d<l;d++)r.setAttributeNode(Ee(e,a.item(d),!0));break;case m:i=!0}if(i){var u=t.firstChild;while(u)r.appendChild(Ee(e,u,i)),u=u.nextSibling}return r}function Ce(e,t,i){e[t]=i}O.prototype=Error.prototype,c(x,O),L.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],r=0;r<this.length;r++)Se(this[r],i,e,t);return i.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},D.prototype.item=function(e){return M(this),this[e]||null},h(D,L),N.prototype={length:0,item:L.prototype.item,getNamedItem:function(e){var t=this.length;while(t--){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new O(P);var i=this.getNamedItem(e.nodeName);return U(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new O(P);return t=this.getNamedItemNS(e.namespaceURI,e.localName),U(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return B(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return B(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){var i=this.length;while(i--){var r=this[i];if(r.localName==t&&r.namespaceURI==e)return r}return null}},j.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var r=new H;if(r.implementation=this,r.childNodes=new L,r.doctype=i||null,i&&r.appendChild(i),t){var s=r.createElementNS(e,t);r.appendChild(s)}return r},createDocumentType:function(e,t,i){var r=new he;return r.name=e,r.nodeName=e,r.publicId=t||"",r.systemId=i||"",r}},F.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return se(this,e,t)},replaceChild:function(e,t){se(this,e,t,re),t&&this.removeChild(t)},removeChild:function(e){return W(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Ee(this.ownerDocument||this,this,e)},normalize:function(){var e=this.firstChild;while(e){var t=e.nextSibling;t&&t.nodeType==g&&e.nodeType==g?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){var t=this;while(t){var i=t._nsMap;if(i)for(var r in i)if(Object.prototype.hasOwnProperty.call(i,r)&&i[r]===e)return r;t=t.nodeType==m?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){var t=this;while(t){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==m?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){var t=this.lookupPrefix(e);return null==t}},c(p,F),c(p,F.prototype),H.prototype={nodeName:"#document",nodeType:S,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==E){var i=e.firstChild;while(i){var r=i.nextSibling;this.insertBefore(i,t),i=r}return e}return se(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===f&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),W(this,e)},replaceChild:function(e,t){se(this,e,t,re),e.ownerDocument=this,t&&this.removeChild(t),J(e)&&(this.documentElement=e)},importNode:function(e,t){return we(this,e,t)},getElementById:function(e){var t=null;return $(this.documentElement,(function(i){if(i.nodeType==f&&i.getAttribute("id")==e)return t=i,!0})),t},getElementsByClassName:function(e){var t=d(e);return new D(this,(function(i){var r=[];return t.length>0&&$(i.documentElement,(function(s){if(s!==i&&s.nodeType===f){var n=s.getAttribute("class");if(n){var a=e===n;if(!a){var o=d(n);a=t.every(u(o))}a&&r.push(s)}}})),r}))},createElement:function(e){var t=new ae;t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new L;var i=t.attributes=new N;return i._ownerElement=t,t},createDocumentFragment:function(){var e=new ge;return e.ownerDocument=this,e.childNodes=new L,e},createTextNode:function(e){var t=new de;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ue;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new ce;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new ye;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new oe;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new me;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new ae,r=t.split(":"),s=i.attributes=new N;return i.childNodes=new L,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==r.length?(i.prefix=r[0],i.localName=r[1]):i.localName=t,s._ownerElement=i,i},createAttributeNS:function(e,t){var i=new oe,r=t.split(":");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==r.length?(i.prefix=r[0],i.localName=r[1]):i.localName=t,i}},h(H,F),ae.prototype={nodeType:f,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 i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=""+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===E?this.insertBefore(e,null):ne(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 i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||""},setAttributeNS:function(e,t,i){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+i,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new D(this,(function(t){var i=[];return $(t,(function(r){r===t||r.nodeType!=f||"*"!==e&&r.tagName!=e||i.push(r)})),i}))},getElementsByTagNameNS:function(e,t){return new D(this,(function(i){var r=[];return $(i,(function(s){s===i||s.nodeType!==f||"*"!==e&&s.namespaceURI!==e||"*"!==t&&s.localName!=t||r.push(s)})),r}))}},H.prototype.getElementsByTagName=ae.prototype.getElementsByTagName,H.prototype.getElementsByTagNameNS=ae.prototype.getElementsByTagNameNS,h(ae,F),oe.prototype.nodeType=m,h(oe,F),le.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[I])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,i){var r=this.data.substring(0,e),s=this.data.substring(e+t);i=r+i+s,this.nodeValue=this.data=i,this.length=i.length}},h(le,F),de.prototype={nodeName:"#text",nodeType:g,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},h(de,le),ue.prototype={nodeName:"#comment",nodeType:T},h(ue,le),ce.prototype={nodeName:"#cdata-section",nodeType:y},h(ce,le),he.prototype.nodeType=w,h(he,F),pe.prototype.nodeType=C,h(pe,F),fe.prototype.nodeType=b,h(fe,F),me.prototype.nodeType=v,h(me,F),ge.prototype.nodeName="#document-fragment",ge.prototype.nodeType=E,h(ge,F),ye.prototype.nodeType=_,h(ye,F),ve.prototype.serializeToString=function(e,t,i){return be.call(e,t,i)},F.prototype.toString=be;try{if(Object.defineProperty){function xe(e){switch(e.nodeType){case f:case E:var t=[];e=e.firstChild;while(e)7!==e.nodeType&&8!==e.nodeType&&t.push(xe(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(D.prototype,"length",{get:function(){return M(this),this.$$length}}),Object.defineProperty(F.prototype,"textContent",{get:function(){return xe(this)},set:function(e){switch(this.nodeType){case f:case E:while(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}}}),Ce=function(e,t,i){e["$$"+t]=i}}}catch(ke){}t.DocumentType=he,t.DOMException=O,t.DOMImplementation=j,t.Element=ae,t.Node=F,t.NodeList=L,t.XMLSerializer=ve},e282:function(e,t,i){},e330:function(e,t,i){"use strict";var r=i("40d5"),s=Function.prototype,n=s.call,a=r&&s.bind.bind(n,n);e.exports=r?a:function(e){return function(){return n.apply(e,arguments)}}},e3db:function(e,t){var i={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==i.call(e)}},e683:function(e,t,i){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},e893:function(e,t,i){"use strict";var r=i("1a2d"),s=i("56ef"),n=i("06cf"),a=i("9bf2");e.exports=function(e,t,i){for(var o=s(t),l=a.f,d=n.f,u=0;u<o.length;u++){var c=o[u];r(e,c)||i&&r(i,c)||l(e,c,d(t,c))}}},e8b5:function(e,t,i){"use strict";var r=i("c6b6");e.exports=Array.isArray||function(e){return"Array"==r(e)}},eab8:function(e,t,i){"use strict";var r=i("6c71"),s=i.n(r);s.a},ef34:function(e,t,i){(function(t){var r,s="undefined"!==typeof t?t:"undefined"!==typeof window?window:{},n=i(0);"undefined"!==typeof document?r=document:(r=s["__GLOBAL_DOCUMENT_CACHE@4"],r||(r=s["__GLOBAL_DOCUMENT_CACHE@4"]=n)),e.exports=r}).call(this,i("24aa"))},f0e2:function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return bn}));var r=i("be09"),s=i.n(r),n=i("ef34"),a=i.n(n),o=i("df33"),l=i.n(o),d=i("8c10"),u=i.n(d),c=i("3603"),h=i.n(c),p=i("2b8c"),f=i.n(p),m=i("63ec"),g=i("a559"),y=i.n(g),v=i("d749"),b=i("17a3"),_=i("8b53"),T=i("de66"),S=i("8484"),w=i("81c0"),E=i.n(w),C=i("321f"),x=i("f8a8"),k=i("36c6"),I="8.0.4";const A={},P=function(e,t){return A[e]=A[e]||[],t&&(A[e]=A[e].concat(t)),A[e]},O=function(e,t){P(e,t)},L=function(e,t){const i=P(e).indexOf(t);return!(i<=-1)&&(A[e]=A[e].slice(),A[e].splice(i,1),!0)},D=function(e,t){P(e,[].concat(t).map(t=>{const i=(...r)=>(L(e,i),t(...r));return i}))},M={prefixed:!0},N=[["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"]],R=N[0];let U;for(let t=0;t<N.length;t++)if(N[t][1]in a.a){U=N[t];break}if(U){for(let e=0;e<U.length;e++)M[R[e]]=U[e];M.prefixed=U[0]!==R[0]}let B=[];const j=(e,t)=>(i,r,n)=>{const a=t.levels[r],o=new RegExp(`^(${a})$`);if("log"!==i&&n.unshift(i.toUpperCase()+":"),n.unshift(e+":"),B){B.push([].concat(n));const e=B.length-1e3;B.splice(0,e>0?e:0)}if(!s.a.console)return;let l=s.a.console[i];l||"debug"!==i||(l=s.a.console.info||s.a.console.log),l&&a&&o.test(i)&&l[Array.isArray(n)?"apply":"call"](s.a.console,n)};function F(e){let t,i="info";const r=function(...e){t("log",i,e)};return t=j(e,r),r.createLogger=t=>F(e+": "+t),r.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:i},r.level=e=>{if("string"===typeof e){if(!r.levels.hasOwnProperty(e))throw new Error(`"${e}" in not a valid log level`);i=e}return i},r.history=()=>B?[].concat(B):[],r.history.filter=e=>(B||[]).filter(t=>new RegExp(`.*${e}.*`).test(t[0])),r.history.clear=()=>{B&&(B.length=0)},r.history.disable=()=>{null!==B&&(B.length=0,B=null)},r.history.enable=()=>{null===B&&(B=[])},r.error=(...e)=>t("error",i,e),r.warn=(...e)=>t("warn",i,e),r.debug=(...e)=>t("debug",i,e),r}const q=F("VIDEOJS"),$=q.createLogger,H=Object.prototype.toString,z=function(e){return W(e)?Object.keys(e):[]};function V(e,t){z(e).forEach(i=>t(e[i],i))}function G(e,t,i=0){return z(e).reduce((i,r)=>t(i,e[r],r),i)}function W(e){return!!e&&"object"===typeof e}function X(e){return W(e)&&"[object Object]"===H.call(e)&&e.constructor===Object}function Y(...e){const t={};return e.forEach(e=>{e&&V(e,(e,i)=>{X(e)?(X(t[i])||(t[i]={}),t[i]=Y(t[i],e)):t[i]=e})}),t}function K(e,t,i,r=!0){const s=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),n={configurable:!0,enumerable:!0,get(){const e=i();return s(e),e}};return r&&(n.set=s),Object.defineProperty(e,t,n)}var J=Object.freeze({__proto__:null,each:V,reduce:G,isObject:W,isPlain:X,merge:Y,defineLazyProperty:K});let Q,Z=!1,ee=null,te=!1,ie=!1,re=!1,se=!1,ne=!1,ae=null,oe=null,le=null,de=!1,ue=!1,ce=!1,he=!1;const pe=Boolean(_e()&&("ontouchstart"in s.a||s.a.navigator.maxTouchPoints||s.a.DocumentTouch&&s.a.document instanceof s.a.DocumentTouch)),fe=s.a.navigator&&s.a.navigator.userAgentData;if(fe&&(te="Android"===fe.platform,re=Boolean(fe.brands.find(e=>"Microsoft Edge"===e.brand)),se=Boolean(fe.brands.find(e=>"Chromium"===e.brand)),ne=!re&&se,ae=oe=(fe.brands.find(e=>"Chromium"===e.brand)||{}).version||null,ue="Windows"===fe.platform),!se){const e=s.a.navigator&&s.a.navigator.userAgent||"";Z=/iPod/i.test(e),ee=function(){const t=e.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),te=/Android/i.test(e),Q=function(){const t=e.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;const i=t[1]&&parseFloat(t[1]),r=t[2]&&parseFloat(t[2]);return i&&r?parseFloat(t[1]+"."+t[2]):i||null}(),ie=/Firefox/i.test(e),re=/Edg/i.test(e),se=/Chrome/i.test(e)||/CriOS/i.test(e),ne=!re&&se,ae=oe=function(){const t=e.match(/(Chrome|CriOS)\/(\d+)/);return t&&t[2]?parseFloat(t[2]):null}(),le=function(){const t=/MSIE\s(\d+)\.\d/.exec(e);let i=t&&parseFloat(t[1]);return!i&&/Trident\/7.0/i.test(e)&&/rv:11.0/.test(e)&&(i=11),i}(),de=/Safari/i.test(e)&&!ne&&!te&&!re,ue=/Windows/i.test(e),ce=/iPad/i.test(e)||de&&pe&&!/iPhone/i.test(e),he=/iPhone/i.test(e)&&!ce}const me=he||ce||Z,ge=(de||me)&&!ne;var ye=Object.freeze({__proto__:null,get IS_IPOD(){return Z},get IOS_VERSION(){return ee},get IS_ANDROID(){return te},get ANDROID_VERSION(){return Q},get IS_FIREFOX(){return ie},get IS_EDGE(){return re},get IS_CHROMIUM(){return se},get IS_CHROME(){return ne},get CHROMIUM_VERSION(){return ae},get CHROME_VERSION(){return oe},get IE_VERSION(){return le},get IS_SAFARI(){return de},get IS_WINDOWS(){return ue},get IS_IPAD(){return ce},get IS_IPHONE(){return he},TOUCH_ENABLED:pe,IS_IOS:me,IS_ANY_SAFARI:ge});function ve(e){return"string"===typeof e&&Boolean(e.trim())}function be(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function _e(){return a.a===s.a.document}function Te(e){return W(e)&&1===e.nodeType}function Se(){try{return s.a.parent!==s.a.self}catch(e){return!0}}function we(e){return function(t,i){if(!ve(t))return a.a[e](null);ve(i)&&(i=a.a.querySelector(i));const r=Te(i)?i:a.a;return r[e]&&r[e](t)}}function Ee(e="div",t={},i={},r){const s=a.a.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){const i=t[e];"textContent"===e?Ce(s,i):s[e]===i&&"tabIndex"!==e||(s[e]=i)})),Object.getOwnPropertyNames(i).forEach((function(e){s.setAttribute(e,i[e])})),r&&ze(s,r),s}function Ce(e,t){return"undefined"===typeof e.textContent?e.innerText=t:e.textContent=t,e}function xe(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function ke(e,t){return be(t),e.classList.contains(t)}function Ie(e,...t){return e.classList.add(...t.reduce((e,t)=>e.concat(t.split(/\s+/)),[])),e}function Ae(e,...t){return e?(e.classList.remove(...t.reduce((e,t)=>e.concat(t.split(/\s+/)),[])),e):(q.warn("removeClass was called with an element that doesn't exist"),null)}function Pe(e,t,i){return"function"===typeof i&&(i=i(e,t)),"boolean"!==typeof i&&(i=void 0),t.split(/\s+/).forEach(t=>e.classList.toggle(t,i)),e}function Oe(e,t){Object.getOwnPropertyNames(t).forEach((function(i){const r=t[i];null===r||"undefined"===typeof r||!1===r?e.removeAttribute(i):e.setAttribute(i,!0===r?"":r)}))}function Le(e){const t={},i=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&e.attributes.length>0){const r=e.attributes;for(let s=r.length-1;s>=0;s--){const n=r[s].name;let a=r[s].value;"boolean"!==typeof e[n]&&-1===i.indexOf(","+n+",")||(a=null!==a),t[n]=a}}return t}function De(e,t){return e.getAttribute(t)}function Me(e,t,i){e.setAttribute(t,i)}function Ne(e,t){e.removeAttribute(t)}function Re(){a.a.body.focus(),a.a.onselectstart=function(){return!1}}function Ue(){a.a.onselectstart=function(){return!0}}function Be(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach(e=>{void 0!==t[e]&&(i[e]=t[e])}),i.height||(i.height=parseFloat(Ye(e,"height"))),i.width||(i.width=parseFloat(Ye(e,"width"))),i}}function je(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let r=0,s=0;while(e.offsetParent&&e!==a.a[M.fullscreenElement])r+=e.offsetLeft,s+=e.offsetTop,e=e.offsetParent;return{left:r,top:s,width:t,height:i}}function Fe(e,t){const i={x:0,y:0};if(me){let t=e;while(t&&"html"!==t.nodeName.toLowerCase()){const e=Ye(t,"transform");if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\s/).map(Number);i.x+=t[12],i.y+=t[13]}t=t.parentNode}}const r={},s=je(t.target),n=je(e),a=n.width,o=n.height;let l=t.offsetY-(n.top-s.top),d=t.offsetX-(n.left-s.left);return t.changedTouches&&(d=t.changedTouches[0].pageX-n.left,l=t.changedTouches[0].pageY+n.top,me&&(d-=i.x,l-=i.y)),r.y=1-Math.max(0,Math.min(1,l/o)),r.x=Math.max(0,Math.min(1,d/a)),r}function qe(e){return W(e)&&3===e.nodeType}function $e(e){while(e.firstChild)e.removeChild(e.firstChild);return e}function He(e){return"function"===typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(e=>("function"===typeof e&&(e=e()),Te(e)||qe(e)?e:"string"===typeof e&&/\S/.test(e)?a.a.createTextNode(e):void 0)).filter(e=>e)}function ze(e,t){return He(t).forEach(t=>e.appendChild(t)),e}function Ve(e,t){return ze($e(e),t)}function Ge(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))}const We=we("querySelector"),Xe=we("querySelectorAll");function Ye(e,t){if(!e||!t)return"";if("function"===typeof s.a.getComputedStyle){let r;try{r=s.a.getComputedStyle(e)}catch(i){return""}return r?r.getPropertyValue(t)||r[t]:""}return""}var Ke=Object.freeze({__proto__:null,isReal:_e,isEl:Te,isInFrame:Se,createEl:Ee,textContent:Ce,prependTo:xe,hasClass:ke,addClass:Ie,removeClass:Ae,toggleClass:Pe,setAttributes:Oe,getAttributes:Le,getAttribute:De,setAttribute:Me,removeAttribute:Ne,blockTextSelection:Re,unblockTextSelection:Ue,getBoundingClientRect:Be,findPosition:je,getPointerPosition:Fe,isTextNode:qe,emptyEl:$e,normalizeContent:He,appendContent:ze,insertContent:Ve,isSingleLeftClick:Ge,$:We,$$:Xe,computedStyle:Ye});let Je,Qe=!1;const Ze=function(){if(!1===Je.options.autoSetup)return;const e=Array.prototype.slice.call(a.a.getElementsByTagName("video")),t=Array.prototype.slice.call(a.a.getElementsByTagName("audio")),i=Array.prototype.slice.call(a.a.getElementsByTagName("video-js")),r=e.concat(t,i);if(r&&r.length>0)for(let s=0,n=r.length;s<n;s++){const e=r[s];if(!e||!e.getAttribute){et(1);break}if(void 0===e.player){const t=e.getAttribute("data-setup");null!==t&&Je(e)}}else Qe||et(1)};function et(e,t){_e()&&(t&&(Je=t),s.a.setTimeout(Ze,e))}function tt(){Qe=!0,s.a.removeEventListener("load",tt)}_e()&&("complete"===a.a.readyState?tt():s.a.addEventListener("load",tt));const it=function(e){const t=a.a.createElement("style");return t.className=e,t},rt=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var st=new WeakMap;const nt=3;let at,ot=nt;function lt(){return ot++}function dt(e,t){if(!st.has(e))return;const i=st.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&st.delete(e)}function ut(e,t,i,r){i.forEach((function(i){e(t,i,r)}))}function ct(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const r=e||s.a.event;e={};for(const t in r)"layerX"!==t&&"layerY"!==t&&"keyLocation"!==t&&"webkitMovementX"!==t&&"webkitMovementY"!==t&&"path"!==t&&("returnValue"===t&&r.preventDefault||(e[t]=r[t]));if(e.target||(e.target=e.srcElement||a.a),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){r.preventDefault&&r.preventDefault(),e.returnValue=!1,r.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),e.cancelBubble=!0,r.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=a.a.documentElement,i=a.a.body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}const ht=function(){if("boolean"!==typeof at){at=!1;try{const e=Object.defineProperty({},"passive",{get(){at=!0}});s.a.addEventListener("test",null,e),s.a.removeEventListener("test",null,e)}catch(e){}}return at},pt=["touchstart","touchmove"];function ft(e,t,i){if(Array.isArray(t))return ut(ft,e,t,i);st.has(e)||st.set(e,{});const r=st.get(e);if(r.handlers||(r.handlers={}),r.handlers[t]||(r.handlers[t]=[]),i.guid||(i.guid=lt()),r.handlers[t].push(i),r.dispatcher||(r.disabled=!1,r.dispatcher=function(t,i){if(r.disabled)return;t=ct(t);const s=r.handlers[t.type];if(s){const r=s.slice(0);for(let s=0,a=r.length;s<a;s++){if(t.isImmediatePropagationStopped())break;try{r[s].call(e,t,i)}catch(n){q.error(n)}}}}),1===r.handlers[t].length)if(e.addEventListener){let i=!1;ht()&&pt.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,r.dispatcher,i)}else e.attachEvent&&e.attachEvent("on"+t,r.dispatcher)}function mt(e,t,i){if(!st.has(e))return;const r=st.get(e);if(!r.handlers)return;if(Array.isArray(t))return ut(mt,e,t,i);const s=function(e,t){r.handlers[t]=[],dt(e,t)};if(void 0===t){for(const t in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},t)&&s(e,t);return}const n=r.handlers[t];if(n)if(i){if(i.guid)for(let e=0;e<n.length;e++)n[e].guid===i.guid&&n.splice(e--,1);dt(e,t)}else s(e,t)}function gt(e,t,i){const r=st.has(e)?st.get(e):{},s=e.parentNode||e.ownerDocument;if("string"===typeof t?t={type:t,target:e}:t.target||(t.target=e),t=ct(t),r.dispatcher&&r.dispatcher.call(e,t,i),s&&!t.isPropagationStopped()&&!0===t.bubbles)gt.call(null,s,t,i);else if(!s&&!t.defaultPrevented&&t.target&&t.target[t.type]){st.has(t.target)||st.set(t.target,{});const e=st.get(t.target);t.target[t.type]&&(e.disabled=!0,"function"===typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function yt(e,t,i){if(Array.isArray(t))return ut(yt,e,t,i);const r=function(){mt(e,t,r),i.apply(this,arguments)};r.guid=i.guid=i.guid||lt(),ft(e,t,r)}function vt(e,t,i){const r=function(){mt(e,t,r),i.apply(this,arguments)};r.guid=i.guid=i.guid||lt(),ft(e,t,r)}var bt=Object.freeze({__proto__:null,fixEvent:ct,on:ft,off:mt,trigger:gt,one:yt,any:vt});const _t=30,Tt=function(e,t,i){t.guid||(t.guid=lt());const r=t.bind(e);return r.guid=i?i+"_"+t.guid:t.guid,r},St=function(e,t){let i=s.a.performance.now();const r=function(...r){const n=s.a.performance.now();n-i>=t&&(e(...r),i=n)};return r},wt=function(e,t,i,r=s.a){let n;const a=()=>{r.clearTimeout(n),n=null},o=function(){const s=this,a=arguments;let o=function(){n=null,o=null,i||e.apply(s,a)};!n&&i&&e.apply(s,a),r.clearTimeout(n),n=r.setTimeout(o,t)};return o.cancel=a,o};var Et=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:_t,bind_:Tt,throttle:St,debounce:wt});let Ct;class xt{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},ft(this,e,t),this.addEventListener=i}off(e,t){mt(this,e,t)}one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},yt(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},vt(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;"string"===typeof e&&(e={type:t}),e=ct(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),gt(this,e)}queueTrigger(e){Ct||(Ct=new Map);const t=e.type||e;let i=Ct.get(this);i||(i=new Map,Ct.set(this,i));const r=i.get(t);i.delete(t),s.a.clearTimeout(r);const n=s.a.setTimeout(()=>{i.delete(t),0===i.size&&(i=null,Ct.delete(this)),this.trigger(e)},0);i.set(t,n)}}xt.prototype.allowedEvents_={},xt.prototype.addEventListener=xt.prototype.on,xt.prototype.removeEventListener=xt.prototype.off,xt.prototype.dispatchEvent=xt.prototype.trigger;const kt=e=>"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=e=>e instanceof xt||!!e.eventBusEl_&&["on","one","off","trigger"].every(t=>"function"===typeof e[t]),At=(e,t)=>{It(e)?t():(e.eventedCallbacks||(e.eventedCallbacks=[]),e.eventedCallbacks.push(t))},Pt=e=>"string"===typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length,Ot=(e,t,i)=>{if(!e||!e.nodeName&&!It(e))throw new Error(`Invalid target for ${kt(t)}#${i}; must be a DOM node or evented object.`)},Lt=(e,t,i)=>{if(!Pt(e))throw new Error(`Invalid event type for ${kt(t)}#${i}; must be a non-empty string or array.`)},Dt=(e,t,i)=>{if("function"!==typeof e)throw new Error(`Invalid listener for ${kt(t)}#${i}; must be a function.`)},Mt=(e,t,i)=>{const r=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let s,n,a;return r?(s=e.eventBusEl_,t.length>=3&&t.shift(),[n,a]=t):[s,n,a]=t,Ot(s,e,i),Lt(n,e,i),Dt(a,e,i),a=Tt(e,a),{isTargetingSelf:r,target:s,type:n,listener:a}},Nt=(e,t,i,r)=>{Ot(e,e,t),e.nodeName?bt[t](e,i,r):e[t](i,r)},Rt={on(...e){const{isTargetingSelf:t,target:i,type:r,listener:s}=Mt(this,e,"on");if(Nt(i,"on",r,s),!t){const e=()=>this.off(i,r,s);e.guid=s.guid;const t=()=>this.off("dispose",e);t.guid=s.guid,Nt(this,"on","dispose",e),Nt(i,"on","dispose",t)}},one(...e){const{isTargetingSelf:t,target:i,type:r,listener:s}=Mt(this,e,"one");if(t)Nt(i,"one",r,s);else{const e=(...t)=>{this.off(i,r,e),s.apply(null,t)};e.guid=s.guid,Nt(i,"one",r,e)}},any(...e){const{isTargetingSelf:t,target:i,type:r,listener:s}=Mt(this,e,"any");if(t)Nt(i,"any",r,s);else{const e=(...t)=>{this.off(i,r,e),s.apply(null,t)};e.guid=s.guid,Nt(i,"any",r,e)}},off(e,t,i){if(!e||Pt(e))mt(this.eventBusEl_,e,t);else{const r=e,s=t;Ot(r,this,"off"),Lt(s,this,"off"),Dt(i,this,"off"),i=Tt(this,i),this.off("dispose",i),r.nodeName?(mt(r,s,i),mt(r,"dispose",i)):It(r)&&(r.off(s,i),r.off("dispose",i))}},trigger(e,t){Ot(this.eventBusEl_,this,"trigger");const i=e&&"string"!==typeof e?e.type:e;if(!Pt(i))throw new Error(`Invalid event type for ${kt(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return gt(this.eventBusEl_,e,t)}};function Ut(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey "${i}" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=Ee("span",{className:"vjs-event-bus"});return Object.assign(e,Rt),e.eventedCallbacks&&e.eventedCallbacks.forEach(e=>{e()}),e.on("dispose",()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&st.has(e)&&st.delete(e)})),s.a.setTimeout(()=>{e.eventBusEl_=null},0)}),e}const Bt={state:{},setState(e){let t;return"function"===typeof e&&(e=e()),V(e,(e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e}),t&&It(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function jt(e,t){return Object.assign(e,Bt),e.state=Object.assign({},e.state,t),"function"===typeof e.handleStateChanged&&It(e)&&e.on("statechanged",e.handleStateChanged),e}const Ft=function(e){return"string"!==typeof e?e:e.replace(/./,e=>e.toLowerCase())},qt=function(e){return"string"!==typeof e?e:e.replace(/./,e=>e.toUpperCase())},$t=function(e,t){return qt(e)===qt(t)};var Ht=Object.freeze({__proto__:null,toLowerCase:Ft,toTitleCase:qt,titleCaseEquals:$t});class zt{constructor(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=Y({},this.options_),t=this.options_=Y(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const t=e&&e.id&&e.id()||"no_player";this.id_=`${t}_component_${lt()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(" ").forEach(e=>this.addClass(e)),!1!==t.evented&&(Ut(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),jt(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=Y(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return Ee(e,t,i)}localize(e,t,i=e){const r=this.player_.language&&this.player_.language(),s=this.player_.languages&&this.player_.languages(),n=s&&s[r],a=r&&r.split("-")[0],o=s&&s[a];let l=i;return n&&n[e]?l=n[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\{(\d+)\}/g,(function(e,i){const r=t[i-1];let s=r;return"undefined"===typeof r&&(s=e),s}))),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((e,t)=>e.concat(t),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}addChild(e,t={},i=this.children_.length){let r,s;if("string"===typeof e){s=qt(e);const i=t.componentClass||s;t.name=s;const n=zt.getComponent(i);if(!n)throw new Error(`Component ${i} does not exist`);if("function"!==typeof n)return null;r=new n(this.player_||this,t)}else r=e;if(r.parentComponent_&&r.parentComponent_.removeChild(r),this.children_.splice(i,0,r),r.parentComponent_=this,"function"===typeof r.id&&(this.childIndex_[r.id()]=r),s=s||r.name&&qt(r.name()),s&&(this.childNameIndex_[s]=r,this.childNameIndex_[Ft(s)]=r),"function"===typeof r.el&&r.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:Te(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(r.el(),e)}return r}removeChild(e){if("string"===typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let r=this.children_.length-1;r>=0;r--)if(this.children_[r]===e){t=!0,this.children_.splice(r,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[qt(e.name())]=null,this.childNameIndex_[Ft(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let r=e.opts;if(void 0!==t[i]&&(r=t[i]),!1===r)return;!0===r&&(r={}),r.playerOptions=this.options_.playerOptions;const s=this.addChild(i,r);s&&(this[i]=s)};let r;const s=zt.getComponent("Tech");r=Array.isArray(e)?e:Object.keys(e),r.concat(Object.keys(this.options_).filter((function(e){return!r.some((function(t){return"string"===typeof t?e===t:e===t.name}))}))).map(t=>{let i,r;return"string"===typeof t?(i=t,r=e[i]||this.options_[i]||{}):(i=t.name,r=t),{name:i,opts:r}}).filter(e=>{const t=zt.getComponent(e.opts.componentClass||qt(e.name));return t&&!s.isTech(t)}).forEach(i)}}buildCSSClass(){return""}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout((function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)}$(e,t){return We(e,t||this.contentEl())}$$(e,t){return Xe(e,t||this.contentEl())}hasClass(e){return ke(this.el_,e)}addClass(...e){Ie(this.el_,...e)}removeClass(...e){Ae(this.el_,...e)}toggleClass(e,t){Pe(this.el_,e,t)}show(){this.removeClass("vjs-hidden")}hide(){this.addClass("vjs-hidden")}lockShowing(){this.addClass("vjs-lock-showing")}unlockShowing(){this.removeClass("vjs-lock-showing")}getAttribute(e){return De(this.el_,e)}setAttribute(e,t){Me(this.el_,e,t)}removeAttribute(e){Ne(this.el_,e)}width(e,t){return this.dimension("width",e,t)}height(e,t){return this.dimension("height",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){if(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(i||this.trigger("componentresize"));if(!this.el_)return 0;const r=this.el_.style[e],s=r.indexOf("px");return-1!==s?parseInt(r.slice(0,s),10):parseInt(this.el_["offset"+qt(e)],10)}currentDimension(e){let t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=Ye(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i="offset"+qt(e);t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}currentWidth(){return this.currentDimension("width")}currentHeight(){return this.currentDimension("height")}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(l.a.isEventKey(e,"Tab")||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,t=null;const i=10,r=200;let n;this.on("touchstart",(function(i){1===i.touches.length&&(t={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY},e=s.a.performance.now(),n=!0)})),this.on("touchmove",(function(e){if(e.touches.length>1)n=!1;else if(t){const r=e.touches[0].pageX-t.pageX,s=e.touches[0].pageY-t.pageY,a=Math.sqrt(r*r+s*s);a>i&&(n=!1)}}));const a=function(){n=!1};this.on("touchleave",a),this.on("touchcancel",a),this.on("touchend",(function(i){if(t=null,!0===n){const t=s.a.performance.now()-e;t<r&&(i.preventDefault(),this.trigger("tap"))}}))}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Tt(this.player(),this.player().reportUserActivity);let t;this.on("touchstart",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));const i=function(i){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",i),this.on("touchcancel",i)}setTimeout(e,t){var i;return e=Tt(this,e),this.clearTimersOnDispose_(),i=s.a.setTimeout(()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()},t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),s.a.clearTimeout(e)),e}setInterval(e,t){e=Tt(this,e),this.clearTimersOnDispose_();const i=s.a.setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),s.a.clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=Tt(this,e),t=s.a.requestAnimationFrame(()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()}),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){if(this.namedRafs_.has(e))return;this.clearTimersOnDispose_(),t=Tt(this,t);const i=this.requestAnimationFrame(()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),s.a.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(([e,t])=>{this[e].forEach((e,i)=>this[t](i))}),this.clearingTimersOnDispose_=!1}))}static registerComponent(e,t){if("string"!==typeof e||!e)throw new Error(`Illegal component name, "${e}"; must be a non-empty string.`);const i=zt.getComponent("Tech"),r=i&&i.isTech(t),s=zt===t||zt.prototype.isPrototypeOf(t.prototype);if(r||!s){let t;throw t=r?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error(`Illegal component, "${e}"; ${t}.`)}e=qt(e),zt.components_||(zt.components_={});const n=zt.getComponent("Player");if("Player"===e&&n&&n.players){const e=n.players,t=Object.keys(e);if(e&&t.length>0&&t.map(t=>e[t]).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return zt.components_[e]=t,zt.components_[Ft(e)]=t,t}static getComponent(e){if(e&&zt.components_)return zt.components_[e]}}function Vt(e,t,i){if("number"!==typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}function Gt(e,t,i,r){return Vt(e,r,i.length-1),i[r][t]}function Wt(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error("This TimeRanges object is empty")},end(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:Gt.bind(null,"start",0,e),end:Gt.bind(null,"end",1,e)},s.a.Symbol&&s.a.Symbol.iterator&&(t[s.a.Symbol.iterator]=()=>(e||[]).values()),t}function Xt(e,t){return Array.isArray(e)?Wt(e):void 0===e||void 0===t?Wt():Wt([[e,t]])}zt.registerComponent("Component",zt);const Yt=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),r=Math.floor(e/60%60),s=Math.floor(e/3600);const n=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(s=r=i="-"),s=s>0||a>0?s+":":"",r=((s||n>=10)&&r<10?"0"+r:r)+":",i=i<10?"0"+i:i,s+r+i};let Kt=Yt;function Jt(e){Kt=e}function Qt(){Kt=Yt}function Zt(e,t=e){return Kt(e,t)}var ei=Object.freeze({__proto__:null,createTimeRanges:Xt,createTimeRange:Xt,setFormatTime:Jt,resetFormatTime:Qt,formatTime:Zt});function ti(e,t){let i,r,s=0;if(!t)return 0;e&&e.length||(e=Xt(0,0));for(let n=0;n<e.length;n++)i=e.start(n),r=e.end(n),r>t&&(r=t),s+=r-i;return s/t}function ii(e){if(e instanceof ii)return e;"number"===typeof e?this.code=e:"string"===typeof e?this.message=e:W(e)&&("number"===typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=ii.defaultMessages[this.code]||"")}ii.prototype.code=0,ii.prototype.message="",ii.prototype.status=null,ii.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],ii.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(let t=0;t<ii.errorTypes.length;t++)ii[ii.errorTypes[t]]=t,ii.prototype[ii.errorTypes[t]]=t;function ri(e){return void 0!==e&&null!==e&&"function"===typeof e.then}function si(e){ri(e)&&e.then(null,e=>{})}const ni=function(e){const t=["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((t,i,r)=>(e[i]&&(t[i]=e[i]),t),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))});return t},ai=function(e){const t=e.$$("track"),i=Array.prototype.map.call(t,e=>e.track),r=Array.prototype.map.call(t,(function(e){const t=ni(e.track);return e.src&&(t.src=e.src),t}));return r.concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===i.indexOf(e)})).map(ni))},oi=function(e,t){return e.forEach((function(e){const i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(e=>i.addCue(e))})),t.textTracks()};var li={textTracksToJson:ai,jsonToTextTracks:oi,trackToJson_:ni};const di="vjs-modal-dialog";class ui extends zt{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Ee("div",{className:di+"-content"},{role:"document"}),this.descEl_=Ee("p",{className:di+"-description vjs-control-text",id:this.el().getAttribute("aria-describedby")}),Ce(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${di} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||"Modal Window")}description(){let e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e}open(){if(!this.opened_){const e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}}opened(e){return"boolean"===typeof e&&this[e?"open":"close"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if("boolean"===typeof e){const t=this.closeable_=!!e;let i=this.getChild("closeButton");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=e,this.on(i,"close",this.close_)}!t&&i&&(this.off(i,"close",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,r=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),Ve(t,e),this.trigger("modalfill"),r?i.insertBefore(t,r):i.appendChild(t);const s=this.getChild("closeButton");s&&i.appendChild(s.el_)}empty(){this.trigger("beforemodalempty"),$e(this.contentEl()),this.trigger("modalempty")}content(e){return"undefined"!==typeof e&&(this.content_=e),this.content_}conditionalFocus_(){const e=a.a.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(e.stopPropagation(),l.a.isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(!l.a.isEventKey(e,"Tab"))return;const t=this.focusableEls_(),i=this.el_.querySelector(":focus");let r;for(let s=0;s<t.length;s++)if(i===t[s]){r=s;break}a.a.activeElement===this.el_&&(r=0),e.shiftKey&&0===r?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||r!==t.length-1||(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,e=>(e instanceof s.a.HTMLAnchorElement||e instanceof s.a.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof s.a.HTMLInputElement||e instanceof s.a.HTMLSelectElement||e instanceof s.a.HTMLTextAreaElement||e instanceof s.a.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof s.a.HTMLIFrameElement||e instanceof s.a.HTMLObjectElement||e instanceof s.a.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable"))}}ui.prototype.options_={pauseOnOpen:!0,temporary:!0},zt.registerComponent("ModalDialog",ui);class ci extends xt{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,"length",{get(){return this.tracks_.length}});for(let t=0;t<e.length;t++)this.addTrack(e[t])}addTrack(e){const t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:"labelchange",target:this})},It(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let t;for(let i=0,r=this.length;i<r;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})}getTrackById(e){let t=null;for(let i=0,r=this.length;i<r;i++){const r=this[i];if(r.id===e){t=r;break}}return t}}ci.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const t in ci.prototype.allowedEvents_)ci.prototype["on"+t]=null;const hi=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};class pi extends ci{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){hi(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&hi(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,hi(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}}const fi=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class mi extends ci{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){fi(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&fi(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,fi(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)}}class gi extends ci{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),e.addEventListener("modechange",this.queueChange_);const t=["metadata","chapters"];-1===t.indexOf(e.kind)&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))}}class yi{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,r=this.trackElements_.length;i<r;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"===typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"===typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}}class vi{constructor(e){vi.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const r=e.length;this.cues_=e,this.length_=e.length;const s=function(e){""+e in this||Object.defineProperty(this,""+e,{get(){return this.cues_[e]}})};if(t<r)for(i=t;i<r;i++)s.call(this,i)}getCueById(e){let t=null;for(let i=0,r=this.length;i<r;i++){const r=this[i];if(r.id===e){t=r;break}}return t}}const bi={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},_i={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Ti={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Si={disabled:"disabled",hidden:"hidden",showing:"showing"};class wi extends xt{constructor(e={}){super();const t={id:e.id||"vjs_track_"+lt(),kind:e.kind||"",language:e.language||""};let i=e.label||"";for(const r in t)Object.defineProperty(this,r,{get(){return t[r]},set(){}});Object.defineProperty(this,"label",{get(){return i},set(e){e!==i&&(i=e,this.trigger("labelchange"))}})}}const Ei=function(e){const t=["protocol","hostname","port","pathname","search","hash","host"],i=a.a.createElement("a");i.href=e;const r={};for(let s=0;s<t.length;s++)r[t[s]]=i[t[s]];return"http:"===r.protocol&&(r.host=r.host.replace(/:80$/,"")),"https:"===r.protocol&&(r.host=r.host.replace(/:443$/,"")),r.protocol||(r.protocol=s.a.location.protocol),r.host||(r.host=s.a.location.host),r},Ci=function(e){if(!e.match(/^https?:\/\//)){const t=a.a.createElement("a");t.href=e,e=t.href}return e},xi=function(e){if("string"===typeof e){const t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/,i=t.exec(e);if(i)return i.pop().toLowerCase()}return""},ki=function(e,t=s.a.location){const i=Ei(e),r=":"===i.protocol?t.protocol:i.protocol,n=r+i.host!==t.protocol+t.host;return n};var Ii=Object.freeze({__proto__:null,parseUrl:Ei,getAbsoluteURL:Ci,getFileExtension:xi,isCrossOrigin:ki});const Ai=function(e,t){const i=new s.a.WebVTT.Parser(s.a,s.a.vttjs,s.a.WebVTT.StringDecoder()),r=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){r.push(e)},i.onflush=function(){t.trigger({type:"loadeddata",target:t})},i.parse(e),r.length>0&&(s.a.console&&s.a.console.groupCollapsed&&s.a.console.groupCollapsed("Text Track parsing errors for "+t.src),r.forEach(e=>q.error(e)),s.a.console&&s.a.console.groupEnd&&s.a.console.groupEnd()),i.flush()},Pi=function(e,t){const i={uri:e},r=ki(e);r&&(i.cors=r);const n="use-credentials"===t.tech_.crossOrigin();n&&(i.withCredentials=n),h()(i,Tt(this,(function(e,i,r){if(e)return q.error(e,i);t.loaded_=!0,"function"!==typeof s.a.WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],e=>{if("vttjserror"!==e.type)return Ai(r,t);q.error("vttjs failed to load, stopping trying to process "+t.src)}):Ai(r,t)})))};class Oi extends wi{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const t=Y(e,{kind:Ti[e.kind]||"subtitles",language:e.language||e.srclang||""});let i=Si[t.mode]||"disabled";const r=t.default;"metadata"!==t.kind&&"chapters"!==t.kind||(i="hidden"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const s=new vi(this.cues_),n=new vi(this.activeCues_);let a=!1;this.timeupdateHandler=Tt(this,(function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger("cuechange"),a=!1),"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))}));const o=()=>{this.stopTracking()};this.tech_.one("dispose",o),"disabled"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get(){return r},set(){}},mode:{get(){return i},set(e){Si[e]&&i!==e&&(i=e,this.preload_||"disabled"===i||0!==this.cues.length||Pi(this.src,this),this.stopTracking(),"disabled"!==i&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?s:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return n;const e=this.tech_.currentTime(),t=[];for(let i=0,r=this.cues.length;i<r;i++){const r=this.cues[i];r.startTime<=e&&r.endTime>=e&&t.push(r)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let i=0;i<t.length;i++)-1===this.activeCues_.indexOf(t[i])&&(a=!0);return this.activeCues_=t,n.setCues_(this.activeCues_),n},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||"subtitles"!==t.kind&&"captions"!==t.kind)&&Pi(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)}addCue(e){let t=e;if(s.a.vttjs&&!(e instanceof s.a.vttjs.VTTCue)){t=new s.a.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let r=0;r<i.length;r++)i[r]!==this&&i[r].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}removeCue(e){let t=this.cues_.length;while(t--){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}Oi.prototype.allowedEvents_={cuechange:"cuechange"};class Li extends wi{constructor(e={}){const t=Y(e,{kind:_i[e.kind]||""});super(t);let i=!1;Object.defineProperty(this,"enabled",{get(){return i},set(e){"boolean"===typeof e&&e!==i&&(i=e,this.trigger("enabledchange"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class Di extends wi{constructor(e={}){const t=Y(e,{kind:bi[e.kind]||""});super(t);let i=!1;Object.defineProperty(this,"selected",{get(){return i},set(e){"boolean"===typeof e&&e!==i&&(i=e,this.trigger("selectedchange"))}}),t.selected&&(this.selected=t.selected)}}class Mi extends xt{constructor(e={}){let t;super();const i=new Oi(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get(){return t}},track:{get(){return i}}}),t=Mi.NONE,i.addEventListener("loadeddata",()=>{t=Mi.LOADED,this.trigger({type:"load",target:this})})}}Mi.prototype.allowedEvents_={load:"load"},Mi.NONE=0,Mi.LOADING=1,Mi.LOADED=2,Mi.ERROR=3;const Ni={audio:{ListClass:pi,TrackClass:Li,capitalName:"Audio"},video:{ListClass:mi,TrackClass:Di,capitalName:"Video"},text:{ListClass:gi,TrackClass:Oi,capitalName:"Text"}};Object.keys(Ni).forEach((function(e){Ni[e].getterName=e+"Tracks",Ni[e].privateName=e+"Tracks_"}));const Ri={remoteText:{ListClass:gi,TrackClass:Oi,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:yi,TrackClass:Mi,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Ui=Object.assign({},Ni,Ri);function Bi(e,t,i,r,s={}){const n=e.textTracks();s.kind=t,i&&(s.label=i),r&&(s.language=r),s.tech=e;const a=new Ui.text.TrackClass(s);return n.addTrack(a),a}Ri.names=Object.keys(Ri),Ni.names=Object.keys(Ni),Ui.names=[].concat(Ri.names).concat(Ni.names);class ji extends zt{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",(function(){this.hasStarted_=!0})),this.on("loadstart",(function(){this.hasStarted_=!1})),Ui.names.forEach(t=>{const i=Ui[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)}),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new Ui.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Tt(this,(function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return Xt(0,0)}bufferedPercent(){return ti(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(Ni.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){e=[].concat(e),e.forEach(e=>{const t=this[e+"Tracks"]()||[];let i=t.length;while(i--){const r=t[i];"text"===e&&this.removeRemoteTextTrack(r),t.removeTrack(r)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;while(t--){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new ii(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?Xt(0,0):Xt()}play(){}setScrubbing(){}scrubbing(){}setCurrentTime(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){Ni.names.forEach(e=>{const t=Ni[e],i=()=>{this.trigger(e+"trackchange")},r=this[t.getterName]();r.addEventListener("removetrack",i),r.addEventListener("addtrack",i),this.on("dispose",()=>{r.removeEventListener("removetrack",i),r.removeEventListener("addtrack",i)})})}addWebVttScript_(){if(!s.a.WebVTT)if(a.a.body.contains(this.el())){if(!this.options_["vtt.js"]&&X(f.a)&&Object.keys(f.a).length>0)return void this.trigger("vttjsloaded");const e=a.a.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=()=>{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",()=>{e.onload=null,e.onerror=null}),s.a.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),r=t=>e.removeTrack(t.track);t.on("addtrack",i),t.on("removetrack",r),this.addWebVttScript_();const s=()=>this.trigger("texttrackchange"),n=()=>{s();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener("cuechange",s),"showing"===i.mode&&i.addEventListener("cuechange",s)}};n(),e.addEventListener("change",n),e.addEventListener("addtrack",n),e.addEventListener("removetrack",n),this.on("dispose",(function(){t.off("addtrack",i),t.off("removetrack",r),e.removeEventListener("change",n),e.removeEventListener("addtrack",n),e.removeEventListener("removetrack",n);for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener("cuechange",s)}}))}addTextTrack(e,t,i){if(!e)throw new Error("TextTrack kind is required but was not provided");return Bi(this,e,t,i)}createRemoteTextTrack(e){const t=Y(e,{tech:this});return new Ri.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return"boolean"!==typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(i.track)),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=lt();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one("playing",()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())})):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(){}overrideNativeVideoTracks(){}canPlayType(){return""}static canPlayType(){return""}static canPlaySource(e,t){return ji.canPlayType(e.type)}static isTech(e){return e.prototype instanceof ji||e instanceof ji||e===ji}static registerTech(e,t){if(ji.techs_||(ji.techs_={}),!ji.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!ji.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!ji.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=qt(e),ji.techs_[e]=t,ji.techs_[Ft(e)]=t,"Tech"!==e&&ji.defaultTechOrder_.push(e),t}static getTech(e){if(e)return ji.techs_&&ji.techs_[e]?ji.techs_[e]:(e=qt(e),s.a&&s.a.videojs&&s.a.videojs[e]?(q.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),s.a.videojs[e]):void 0)}}Ui.names.forEach((function(e){const t=Ui[e];ji.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),ji.prototype.featuresVolumeControl=!0,ji.prototype.featuresMuteControl=!0,ji.prototype.featuresFullscreenResize=!1,ji.prototype.featuresPlaybackRate=!1,ji.prototype.featuresProgressEvents=!1,ji.prototype.featuresSourceset=!1,ji.prototype.featuresTimeupdateEvents=!1,ji.prototype.featuresNativeTextTracks=!1,ji.prototype.featuresVideoFrameCallback=!1,ji.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let r=e.sourceHandlers;r||(r=e.sourceHandlers=[]),void 0===i&&(i=r.length),r.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let r;for(let e=0;e<i.length;e++)if(r=i[e].canPlayType(t),r)return r;return""},e.selectSourceHandler=function(t,i){const r=e.sourceHandlers||[];let s;for(let e=0;e<r.length;e++)if(s=r[e].canHandleSource(t,i),s)return r[e];return null},e.canPlaySource=function(t,i){const r=e.selectSourceHandler(t,i);return r?r.canHandleSource(t,i):""};const t=["seekable","seeking","duration"];t.forEach((function(e){const t=this[e];"function"===typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:q.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.handleSource(t,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},zt.registerComponent("Tech",ji),ji.registerTech("Tech",ji),ji.defaultTechOrder_=[];const Fi={},qi={},$i={};function Hi(e,t){Fi[e]=Fi[e]||[],Fi[e].push(t)}function zi(e,t,i){e.setTimeout(()=>ir(t,Fi[t.type],i,e),1)}function Vi(e,t){e.forEach(e=>e.setTech&&e.setTech(t))}function Gi(e,t,i){return e.reduceRight(Qi(i),t[i]())}function Wi(e,t,i,r){return t[i](e.reduce(Qi(i),r))}function Xi(e,t,i,r=null){const s="call"+qt(i),n=e.reduce(Qi(s),r),a=n===$i,o=a?null:t[i](n);return Zi(e,i,o,a),o}const Yi={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},Ki={setCurrentTime:1,setMuted:1,setVolume:1},Ji={play:1,pause:1};function Qi(e){return(t,i)=>t===$i?$i:i[e]?i[e](t):t}function Zi(e,t,i,r){for(let s=e.length-1;s>=0;s--){const n=e[s];n[t]&&n[t](r,i)}}function er(e){qi[e.id()]=null}function tr(e,t){const i=qi[e.id()];let r=null;if(void 0===i||null===i)return r=t(e),qi[e.id()]=[[t,r]],r;for(let s=0;s<i.length;s++){const[e,n]=i[s];e===t&&(r=n)}return null===r&&(r=t(e),i.push([t,r])),r}function ir(e={},t=[],i,r,s=[],n=!1){const[a,...o]=t;if("string"===typeof a)ir(e,Fi[a],i,r,s,n);else if(a){const t=tr(r,a);if(!t.setSource)return s.push(t),ir(e,o,i,r,s,n);t.setSource(Object.assign({},e),(function(a,l){if(a)return ir(e,o,i,r,s,n);s.push(t),ir(l,e.type===l.type?o:Fi[l.type],i,r,s,n)}))}else o.length?ir(e,o,i,r,s,n):n?i(e,s):ir(e,Fi["*"],i,r,s,!0)}const rr={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"},sr=function(e=""){const t=xi(e),i=rr[t.toLowerCase()];return i||""},nr=(e,t)=>{if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter(e=>e.src===t);if(i.length)return i[0].type;const r=e.$$("source");for(let s=0;s<r.length;s++){const e=r[s];if(e.type&&e.src&&e.src===t)return e.type}return sr(t)},ar=function(e){if(Array.isArray(e)){let t=[];e.forEach((function(e){e=ar(e),Array.isArray(e)?t=t.concat(e):W(e)&&t.push(e)})),e=t}else e="string"===typeof e&&e.trim()?[or({src:e})]:W(e)&&"string"===typeof e.src&&e.src&&e.src.trim()?[or(e)]:[];return e};function or(e){if(!e.type){const t=sr(e.src);t&&(e.type=t)}return e}class lr extends zt{constructor(e,t,i){const r=Y({createEl:!1},t);if(super(e,r,i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let s=0,n=t.playerOptions.techOrder;s<n.length;s++){const t=qt(n[s]);let i=ji.getTech(t);if(t||(i=zt.getComponent(t)),i&&i.isSupported()){e.loadTech_(t);break}}}}zt.registerComponent("MediaLoader",lr);class dr extends zt{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e="div",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&q.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:"button"},i),this.tabIndex_=t.tabIndex;const r=Ee(e,t,i);return r.appendChild(Ee("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(r),r}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Ee("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||"Need Text";const i=this.localize(e);this.controlText_=e,Ce(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute("title",i)}buildCSSClass(){return"vjs-control vjs-button "+super.buildCSSClass()}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!==typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),"undefined"!==typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){l.a.isEventKey(e,"Space")||l.a.isEventKey(e,"Enter")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}zt.registerComponent("ClickableComponent",dr);class ur extends dr{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){const e=Ee("picture",{className:"vjs-poster",tabIndex:-1},{},Ee("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}));return e}crossOrigin(e){if("undefined"===typeof e)return this.el_?this.el_.querySelector("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||"anonymous"===e||"use-credentials"===e?this.el_.querySelector("img").crossOrigin=e:this.player_.log.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){this.el_.querySelector("img").src=e}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?si(this.player_.play()):this.player_.pause())}}ur.prototype.crossorigin=ur.prototype.crossOrigin,zt.registerComponent("PosterImage",ur);const cr="#222",hr="#ccc",pr={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 fr(e,t){let i;if(4===e.length)i=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.");i=e.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}function mr(e,t,i){try{e.style[t]=i}catch(r){return}}class gr extends zt{constructor(e,t,i){super(e,t,i);const r=e=>this.updateDisplay(e);e.on("loadstart",e=>this.toggleDisplay(e)),e.on("texttrackchange",r),e.on("loadedmetadata",e=>this.preselectTrack(e)),e.ready(Tt(this,(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on("fullscreenchange",r),e.on("playerresize",r);const t=s.a.screen.orientation||s.a,i=s.a.screen.orientation?"change":"orientationchange";t.addEventListener(i,r),e.on("dispose",()=>t.removeEventListener(i,r));const n=this.options_.playerOptions.tracks||[];for(let e=0;e<n.length;e++)this.player_.addRemoteTextTrack(n[e],!0);this.preselectTrack()})))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let r,s,n;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?n=o:n||(n=o):i&&!i.enabled?(n=null,r=null,s=null):o.default&&("descriptions"!==o.kind||r?o.kind in e&&!s&&(s=o):r=o)}n?n.mode="showing":s?s.mode="showing":r&&(r.mode="showing")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl("div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})}clearDisplay(){"function"===typeof s.a.WebVTT&&s.a.WebVTT.processCues(s.a,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const r=e[i];"showing"===r.mode&&t.push(r)}return void this.updateForTrack(t)}let i=null,r=null,s=e.length;while(s--){const t=e[s];"showing"===t.mode&&("descriptions"===t.kind?i=t:r=t)}r?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(r)):i&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(i))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let r=i.length;while(r--){const e=i[r];if(!e)continue;const n=e.displayState;if(t.color&&(n.firstChild.style.color=t.color),t.textOpacity&&mr(n.firstChild,"color",fr(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(n.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&mr(n.firstChild,"backgroundColor",fr(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?mr(n,"backgroundColor",fr(t.windowColor,t.windowOpacity)):n.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?n.firstChild.style.textShadow=`2px 2px 3px ${cr}, 2px 2px 4px ${cr}, 2px 2px 5px ${cr}`:"raised"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${cr}, 2px 2px ${cr}, 3px 3px ${cr}`:"depressed"===t.edgeStyle?n.firstChild.style.textShadow=`1px 1px ${hr}, 0 1px ${hr}, -1px -1px ${cr}, 0 -1px ${cr}`:"uniform"===t.edgeStyle&&(n.firstChild.style.textShadow=`0 0 4px ${cr}, 0 0 4px ${cr}, 0 0 4px ${cr}, 0 0 4px ${cr}`)),t.fontPercent&&1!==t.fontPercent){const e=s.a.parseFloat(n.style.fontSize);n.style.fontSize=e*t.fontPercent+"px",n.style.height="auto",n.style.top="auto"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?n.firstChild.style.fontVariant="small-caps":n.firstChild.style.fontFamily=pr[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),"function"!==typeof s.a.WebVTT||e.every(e=>!e.activeCues))return;const t=[];for(let i=0;i<e.length;++i){const r=e[i];for(let e=0;e<r.activeCues.length;++e)t.push(r.activeCues[e])}s.a.WebVTT.processCues(s.a,t,this.el_);for(let i=0;i<e.length;++i){const t=e[i];for(let e=0;e<t.activeCues.length;++e){const r=t.activeCues[e].displayState;Ie(r,"vjs-text-track-cue","vjs-text-track-cue-"+(t.language?t.language:i)),t.language&&Me(r,"lang",t.language)}this.player_.textTrackSettings&&this.updateDisplayState(t)}}}zt.registerComponent("TextTrackDisplay",gr);class yr extends zt{createEl(){const e=this.player_.isAudio(),t=this.localize(e?"Audio Player":"Video Player"),i=Ee("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[t])}),r=super.createEl("div",{className:"vjs-loading-spinner",dir:"ltr"});return r.appendChild(i),r}}zt.registerComponent("LoadingSpinner",yr);class vr extends dr{createEl(e,t={},i={}){e="button",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:"button"},i);const r=Ee(e,t,i);return r.appendChild(Ee("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(r),r}addChild(e,t={}){const i=this.constructor.name;return q.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),zt.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute("disabled")}disable(){super.disable(),this.el_.setAttribute("disabled","disabled")}handleKeyDown(e){l.a.isEventKey(e,"Space")||l.a.isEventKey(e,"Enter")?e.stopPropagation():super.handleKeyDown(e)}}zt.registerComponent("Button",vr);class br extends vr{constructor(e,t){super(e,t),this.mouseused_=!1,this.on("mousedown",e=>this.handleMouseDown(e))}buildCSSClass(){return"vjs-big-play-button"}handleClick(e){const t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY)return si(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild("controlBar"),r=i&&i.getChild("playToggle");if(!r)return void this.player_.tech(!0).focus();const s=()=>r.focus();ri(t)?t.then(s,()=>{}):this.setTimeout(s,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}br.prototype.controlText_="Play Video",zt.registerComponent("BigPlayButton",br);class _r extends vr{constructor(e,t){super(e,t),this.controlText(t&&t.controlText||this.localize("Close"))}buildCSSClass(){return"vjs-close-button "+super.buildCSSClass()}handleClick(e){this.trigger({type:"close",bubbles:!1})}handleKeyDown(e){l.a.isEventKey(e,"Esc")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}zt.registerComponent("CloseButton",_r);class Tr extends vr{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.on(e,"play",e=>this.handlePlay(e)),this.on(e,"pause",e=>this.handlePause(e)),t.replay&&this.on(e,"ended",e=>this.handleEnded(e))}buildCSSClass(){return"vjs-play-control "+super.buildCSSClass()}handleClick(e){this.player_.paused()?si(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")}handlePause(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")}handleEnded(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",e=>this.handleSeeked(e))}}Tr.prototype.controlText_="Play",zt.registerComponent("PlayToggle",Tr);class Sr extends zt{constructor(e,t){super(e,t),this.on(e,["timeupdate","ended"],e=>this.updateContent(e)),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl("div",{className:e+" vjs-time-control vjs-control"}),i=Ee("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+" "},{role:"presentation"});return t.appendChild(i),this.contentEl_=Ee("span",{className:e+"-display"},{"aria-live":"off",role:"presentation"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}updateTextNode_(e=0){e=Zt(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,q.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=a.a.createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}}Sr.prototype.labelText_="Time",Sr.prototype.controlText_="Time",zt.registerComponent("TimeDisplay",Sr);class wr extends Sr{buildCSSClass(){return"vjs-current-time"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}wr.prototype.labelText_="Current Time",wr.prototype.controlText_="Current Time",zt.registerComponent("CurrentTimeDisplay",wr);class Er extends Sr{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);this.on(e,"durationchange",i),this.on(e,"loadstart",i),this.on(e,"loadedmetadata",i)}buildCSSClass(){return"vjs-duration"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}Er.prototype.labelText_="Duration",Er.prototype.controlText_="Duration",zt.registerComponent("DurationDisplay",Er);class Cr extends zt{createEl(){const e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),t=super.createEl("div"),i=super.createEl("span",{textContent:"/"});return t.appendChild(i),e.appendChild(t),e}}zt.registerComponent("TimeDivider",Cr);class xr extends Sr{constructor(e,t){super(e,t),this.on(e,"durationchange",e=>this.updateContent(e))}buildCSSClass(){return"vjs-remaining-time"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(Ee("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e}updateContent(e){if("number"!==typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}xr.prototype.labelText_="Remaining Time",xr.prototype.controlText_="Remaining Time",zt.registerComponent("RemainingTimeDisplay",xr);class kr extends zt{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),"durationchange",e=>this.updateShowing(e))}createEl(){const e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Ee("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Ee("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+" "})),this.contentEl_.appendChild(a.a.createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}}zt.registerComponent("LiveDisplay",kr);class Ir extends vr{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=Ee("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function Ar(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}Ir.prototype.controlText_="Seek to live, currently playing live",zt.registerComponent("SeekToLive",Ir);var Pr=Object.freeze({__proto__:null,clamp:Ar});class Or extends zt{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,t={},i={}){return t.className=t.className+" vjs-slider",t=Object.assign({tabIndex:0},t),i=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||ne||e.preventDefault(),Re(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove_),this.on(t,"mouseup",this.handleMouseUp_),this.on(t,"touchmove",this.handleMouseMove_),this.on(t,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(){const e=this.bar.el_.ownerDocument;Ue(),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()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",()=>{const t=this.vertical()?"height":"width";this.bar.el().style[t]=(100*e).toFixed(2)+"%"})),e}getProgress(){return Number(Ar(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=Fe(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){l.a.isEventKey(e,"Left")||l.a.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepBack()):l.a.isEventKey(e,"Right")||l.a.isEventKey(e,"Up")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}}zt.registerComponent("Slider",Or);const Lr=(e,t)=>Ar(e/t*100,0,100).toFixed(2)+"%";class Dr extends zt{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,"progress",e=>this.update(e))}createEl(){const e=super.createEl("div",{className:"vjs-load-progress"}),t=Ee("span",{className:"vjs-control-text"}),i=Ee("span",{textContent:this.localize("Loaded")}),r=a.a.createTextNode(": ");return this.percentageEl_=Ee("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(t),t.appendChild(i),t.appendChild(r),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),r=this.player_.bufferedEnd(),s=this.partEls_,n=Lr(r,i);this.percent_!==n&&(this.el_.style.width=n,Ce(this.percentageEl_,n),this.percent_=n);for(let a=0;a<t.length;a++){const e=t.start(a),i=t.end(a);let n=s[a];n||(n=this.el_.appendChild(Ee()),s[a]=n),n.dataset.start===e&&n.dataset.end===i||(n.dataset.start=e,n.dataset.end=i,n.style.left=Lr(e,r),n.style.width=Lr(i-e,r))}for(let a=s.length;a>t.length;a--)this.el_.removeChild(s[a-1]);s.length=t.length})}}zt.registerComponent("LoadProgressBar",Dr);class Mr extends zt{constructor(e,t){super(e,t),this.update=St(Tt(this,this.update),_t)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(e,t,i){const r=je(this.el_),s=Be(this.player_.el()),n=e.width*t;if(!s||!r)return;const a=e.left-s.left+n,o=e.width-n+(s.right-e.right);let l=r.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>r.width&&(l=r.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){Ce(this.el_,e)}updateTime(e,t,i,r){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let s;const n=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;s=(i<1?"":"-")+Zt(i,e)}else s=Zt(i,n);this.update(e,t,s),r&&r()})}}zt.registerComponent("TimeTooltip",Mr);class Nr extends zt{constructor(e,t){super(e,t),this.update=St(Tt(this,this.update),_t)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,t){const i=this.getChild("timeTooltip");if(!i)return;const r=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(e,t,r)}}Nr.prototype.options_={children:[]},me||te||Nr.prototype.options_.children.push("timeTooltip"),zt.registerComponent("PlayProgressBar",Nr);class Rr extends zt{constructor(e,t){super(e,t),this.update=St(Tt(this,this.update),_t)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t){const i=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,i,()=>{this.el_.style.left=e.width*t+"px"})}}Rr.prototype.options_={children:["timeTooltip"]},zt.registerComponent("MouseTimeDisplay",Rr);const Ur=5,Br=12;class jr extends Or{constructor(e,t){super(e,t),this.setEventHandlers_()}setEventHandlers_(){this.update_=Tt(this,this.update),this.update=St(this.update_,_t),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in a.a&&"visibilityState"in a.a&&this.on(a.a,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){"hidden"===a.a.visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,_t))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(e){if("hidden"===a.a.visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame("SeekBar#update",()=>{const e=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),i=this.player_.liveTracker;let r=this.player_.duration();i&&i.isLive()&&(r=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===e&&this.duration_===r||(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Zt(e,r),Zt(r,r)],"{1} of {2}")),this.currentTime_=e,this.duration_=r),this.bar&&this.bar.update(Be(this.el()),this.getProgress())}),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}getPercent(){const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){Ge(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!Ge(e))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const r=this.calculateDistance(e),s=this.player_.liveTracker;if(s&&s.isLive()){if(r>=.99)return void s.seekToLiveEdge();const e=s.seekableStart(),t=s.liveCurrentTime();if(i=e+r*s.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=r*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.userSeek_(i)}enable(){super.enable();const e=this.getChild("mouseTimeDisplay");e&&e.show()}disable(){super.disable();const e=this.getChild("mouseTimeDisplay");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?si(this.player_.play()):this.update_()}stepForward(){this.userSeek_(this.player_.currentTime()+Ur)}stepBack(){this.userSeek_(this.player_.currentTime()-Ur)}handleAction(e){this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(l.a.isEventKey(e,"Space")||l.a.isEventKey(e,"Enter"))e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(l.a.isEventKey(e,"Home"))e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(l.a.isEventKey(e,"End"))e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(l()(e))){e.preventDefault(),e.stopPropagation();const i=10*(l.a.codes[l()(e)]-l.a.codes["0"])/100;t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else l.a.isEventKey(e,"PgDn")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-Ur*Br)):l.a.isEventKey(e,"PgUp")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+Ur*Br)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in a.a&&"visibilityState"in a.a&&this.off(a.a,"visibilitychange",this.toggleVisibility_),super.dispose()}}jr.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},me||te||jr.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),zt.registerComponent("SeekBar",jr);class Fr extends zt{constructor(e,t){super(e,t),this.handleMouseMove=St(Tt(this,this.handleMouseMove),_t),this.throttledHandleMouseSeek=St(Tt(this,this.handleMouseSeek),_t),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(e){const t=this.getChild("seekBar");if(!t)return;const i=t.getChild("playProgressBar"),r=t.getChild("mouseTimeDisplay");if(!i&&!r)return;const s=t.el(),n=je(s);let a=Fe(s,e).x;a=Ar(a,0,1),r&&r.update(n,a),i&&i.update(n,t.getProgress())}handleMouseSeek(e){const t=this.getChild("seekBar");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach(e=>e.disable&&e.disable()),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&si(this.player_.play())}}enable(){this.children().forEach(e=>e.enable&&e.enable()),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}Fr.prototype.options_={children:["seekBar"]},zt.registerComponent("ProgressControl",Fr);class qr extends vr{constructor(e,t){super(e,t),this.on(e,["enterpictureinpicture","leavepictureinpicture"],e=>this.handlePictureInPictureChange(e)),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],e=>this.handlePictureInPictureEnabledChange(e)),this.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],()=>{const t="audio"===e.currentType().substring(0,5);t||e.audioPosterMode()||e.audioOnlyMode()?(e.isInPictureInPicture()&&e.exitPictureInPicture(),this.hide()):this.show()}),this.disable()}buildCSSClass(){return"vjs-picture-in-picture-control "+super.buildCSSClass()}handlePictureInPictureEnabledChange(){a.a.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}}qr.prototype.controlText_="Picture-in-Picture",zt.registerComponent("PictureInPictureToggle",qr);class $r extends vr{constructor(e,t){super(e,t),this.on(e,"fullscreenchange",e=>this.handleFullscreenChange(e)),!1===a.a[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return"vjs-fullscreen-control "+super.buildCSSClass()}handleFullscreenChange(e){this.player_.isFullscreen()?this.controlText("Exit Fullscreen"):this.controlText("Fullscreen")}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}$r.prototype.controlText_="Fullscreen",zt.registerComponent("FullscreenToggle",$r);const Hr=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")}))};class zr extends zt{createEl(){const e=super.createEl("div",{className:"vjs-volume-level"});return e.appendChild(super.createEl("span",{className:"vjs-control-text"})),e}}zt.registerComponent("VolumeLevel",zr);class Vr extends zt{constructor(e,t){super(e,t),this.update=St(Tt(this,this.update),_t)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(e,t,i,r){if(!i){const i=Be(this.el_),r=Be(this.player_.el()),s=e.width*t;if(!r||!i)return;const n=e.left-r.left+s,a=e.width-s+(r.right-e.right);let o=i.width/2;n<o?o+=o-n:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(r+"%")}write(e){Ce(this.el_,e)}updateVolume(e,t,i,r,s){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(e,t,i,r.toFixed(0)),s&&s()})}}zt.registerComponent("VolumeLevelTooltip",Vr);class Gr extends zt{constructor(e,t){super(e,t),this.update=St(Tt(this,this.update),_t)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t,i){const r=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,i,r,()=>{i?this.el_.style.bottom=e.height*t+"px":this.el_.style.left=e.width*t+"px"})}}Gr.prototype.options_={children:["volumeLevelTooltip"]},zt.registerComponent("MouseVolumeLevelDisplay",Gr);class Wr extends Or{constructor(e,t){super(e,t),this.on("slideractive",e=>this.updateLastVolume_(e)),this.on(e,"volumechange",e=>this.updateARIAAttributes(e)),e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(e){Ge(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild("mouseVolumeLevelDisplay");if(t){const i=this.el(),r=Be(i),s=this.vertical();let n=Fe(i,e);n=s?n.y:n.x,n=Ar(n,0,1),t.update(r,n,s)}Ge(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one("sliderinactive",()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)})}}Wr.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},me||te||Wr.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),Wr.prototype.playerEvent="volumechange",zt.registerComponent("VolumeBar",Wr);class Xr extends zt{constructor(e,t={}){t.vertical=t.vertical||!1,("undefined"===typeof t.volumeBar||X(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),Hr(this,e),this.throttledHandleMouseMove=St(Tt(this,this.handleMouseMove),_t),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on("mousedown",e=>this.handleMouseDown(e)),this.on("touchstart",e=>this.handleMouseDown(e)),this.on("mousemove",e=>this.handleMouseMove(e)),this.on(this.volumeBar,["focus","slideractive"],()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")}),this.on(this.volumeBar,["blur","sliderinactive"],()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")})}createEl(){let e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),super.createEl("div",{className:"vjs-volume-control vjs-control "+e})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}Xr.prototype.options_={children:["volumeBar"]},zt.registerComponent("VolumeControl",Xr);const Yr=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")}))};class Kr extends vr{constructor(e,t){super(e,t),Yr(this,e),this.on(e,["loadstart","volumechange"],e=>this.update(e))}buildCSSClass(){return"vjs-mute-control "+super.buildCSSClass()}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;me&&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),Ae(this.el_,[0,1,2,3].reduce((e,t)=>e+`${t?" ":""}vjs-vol-${t}`,"")),Ie(this.el_,"vjs-vol-"+t)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume(),t=e?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)}}Kr.prototype.controlText_="Mute",zt.registerComponent("MuteToggle",Kr);class Jr extends zt{constructor(e,t={}){"undefined"!==typeof t.inline?t.inline=t.inline:t.inline=!0,("undefined"===typeof t.volumeControl||X(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,["loadstart"],e=>this.volumePanelState_(e)),this.on(this.muteToggle,"keyup",e=>this.handleKeyPress(e)),this.on(this.volumeControl,"keyup",e=>this.handleVolumeControlKeyUp(e)),this.on("keydown",e=>this.handleKeyPress(e)),this.on("mouseover",e=>this.handleMouseOver(e)),this.on("mouseout",e=>this.handleMouseOut(e)),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}createEl(){let e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),super.createEl("div",{className:"vjs-volume-panel vjs-control "+e})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){l.a.isEventKey(e,"Esc")&&this.muteToggle.focus()}handleMouseOver(e){this.addClass("vjs-hover"),ft(a.a,"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),mt(a.a,"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){l.a.isEventKey(e,"Esc")&&this.handleMouseOut()}}Jr.prototype.options_={children:["muteToggle","volumeControl"]},zt.registerComponent("VolumePanel",Jr);class Qr extends zt{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on("keydown",e=>this.handleKeyDown(e)),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof zt&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof zt&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))}removeChild(e){"string"===typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||"ul";this.contentEl_=Ee(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");const t=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return t.appendChild(this.contentEl_),ft(t,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||a.a.activeElement;if(!this.children().some(e=>e.el()===t)){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter(t=>t.el()===e.target)[0];if(!i)return;"CaptionSettingsMenuItem"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){l.a.isEventKey(e,"Left")||l.a.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(l.a.isEventKey(e,"Right")||l.a.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice(),i=t.length&&t[0].hasClass("vjs-menu-title");i&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}zt.registerComponent("Menu",Qr);class Zr extends zt{constructor(e,t={}){super(e,t),this.menuButton_=new vr(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const i=vr.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+i,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const r=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,"tap",r),this.on(this.menuButton_,"click",r),this.on(this.menuButton_,"keydown",e=>this.handleKeyDown(e)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),ft(a.a,"keyup",this.handleMenuKeyUp_)}),this.on("mouseleave",e=>this.handleMouseLeave(e)),this.on("keydown",e=>this.handleSubmenuKeyDown(e))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}createMenu(){const e=new Qr(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=Ee("li",{className:"vjs-menu-title",textContent:qt(this.options_.title),tabIndex:-1}),i=new zt(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl("div",{className:this.buildWrapperCSSClass()},{})}buildWrapperCSSClass(){let e="vjs-menu-button";!0===this.options_.inline?e+="-inline":e+="-popup";const t=vr.prototype.buildCSSClass();return`vjs-menu-button ${e} ${t} ${super.buildCSSClass()}`}buildCSSClass(){let e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass("vjs-hover"),mt(a.a,"keyup",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){l.a.isEventKey(e,"Esc")||l.a.isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),l.a.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(l.a.isEventKey(e,"Up")||l.a.isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))}handleMenuKeyUp(e){(l.a.isEventKey(e,"Esc")||l.a.isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){(l.a.isEventKey(e,"Esc")||l.a.isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),l.a.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),me&&Se())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()}}zt.registerComponent("MenuButton",Zr);class es extends Zr{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const r=Tt(this,this.update);i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),i.addEventListener("labelchange",r),this.player_.on("ready",r),this.player_.on("dispose",(function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r),i.removeEventListener("labelchange",r)}))}}zt.registerComponent("TrackButton",es);const ts=["Tab","Esc","Up","Down","Right","Left"];class is extends dr{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute("role","menuitemcheckbox"):this.el_.setAttribute("role","menuitemradio"):this.el_.setAttribute("role","menuitem")}createEl(e,t,i){this.nonIconControl=!0;const r=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},t),i);return r.replaceChild(Ee("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)}),r.querySelector(".vjs-icon-placeholder")),r}handleKeyDown(e){ts.some(t=>l.a.isEventKey(e,t))||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))}}zt.registerComponent("MenuItem",is);class rs extends is{constructor(e,t){const i=t.track,r=e.textTracks();t.label=i.label||i.language||"Unknown",t.selected="showing"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const n=(...e)=>{this.handleTracksChange.apply(this,e)},o=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on(["loadstart","texttrackchange"],n),r.addEventListener("change",n),r.addEventListener("selectedlanguagechange",o),this.on("dispose",(function(){e.off(["loadstart","texttrackchange"],n),r.removeEventListener("change",n),r.removeEventListener("selectedlanguagechange",o)})),void 0===r.onchange){let e;this.on(["tap","click"],(function(){if("object"!==typeof s.a.Event)try{e=new s.a.Event("change")}catch(t){}e||(e=a.a.createEvent("Event"),e.initEvent("change",!0,!0)),r.dispatchEvent(e)}))}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let r=0;r<i.length;r++){const e=i[r];-1!==this.kinds.indexOf(e.kind)&&(e===t?"showing"!==e.mode&&(e.mode="showing"):"disabled"!==e.mode&&(e.mode="disabled"))}}handleTracksChange(e){const t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if("showing"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}zt.registerComponent("TextTrackMenuItem",rs);class ss extends rs{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:"disabled"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(" and ")+" off",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let r=0,s=t.length;r<s;r++){const e=t[r];if(this.options_.kinds.indexOf(e.kind)>-1&&"showing"===e.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let r=0,s=t.length;r<s;r++){const e=t[r];if(["captions","descriptions","subtitles"].indexOf(e.kind)>-1&&"showing"===e.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}}zt.registerComponent("OffTextTrackMenuItem",ss);class ns extends es{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=rs){let i;this.label_&&(i=this.label_+" off"),e.push(new ss(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let s=0;s<r.length;s++){const i=r[s];if(this.kinds_.indexOf(i.kind)>-1){const r=new t(this.player_,{track:i,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});r.addClass(`vjs-${i.kind}-menu-item`),e.push(r)}}return e}}zt.registerComponent("TextTrackButton",ns);class as extends is{constructor(e,t){const i=t.track,r=t.cue,s=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=r.text,t.selected=r.startTime<=s&&s<r.endTime,super(e,t),this.track=i,this.cue=r}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}zt.registerComponent("ChaptersTrackMenuItem",as);class os extends ns{constructor(e,t,i){super(e,t,i),this.selectCurrentItem_=()=>{this.items.forEach(e=>{e.selected(this.track_.activeCues[0]===e.cue)})}}buildCSSClass(){return"vjs-chapters-button "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-chapters-button "+super.buildWrapperCSSClass()}update(e){if(e&&e.track&&"chapters"!==e.track.kind)return;const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(qt(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,r=t.length;i<r;i++){const r=t[i],s=new as(this.player_,{track:this.track_,cue:r});e.push(s)}return e}}os.prototype.kind_="chapters",os.prototype.controlText_="Chapters",zt.registerComponent("ChaptersButton",os);class ls extends ns{constructor(e,t,i){super(e,t,i);const r=e.textTracks(),s=Tt(this,this.handleTracksChange);r.addEventListener("change",s),this.on("dispose",(function(){r.removeEventListener("change",s)}))}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let r=0,s=t.length;r<s;r++){const e=t[r];if(e.kind!==this.kind_&&"showing"===e.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return"vjs-descriptions-button "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-descriptions-button "+super.buildWrapperCSSClass()}}ls.prototype.kind_="descriptions",ls.prototype.controlText_="Descriptions",zt.registerComponent("DescriptionsButton",ls);class ds extends ns{constructor(e,t,i){super(e,t,i)}buildCSSClass(){return"vjs-subtitles-button "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-subtitles-button "+super.buildWrapperCSSClass()}}ds.prototype.kind_="subtitles",ds.prototype.controlText_="Subtitles",zt.registerComponent("SubtitlesButton",ds);class us extends rs{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+" settings",selectable:!1,default:!1,mode:"disabled"},t.selectable=!1,t.name="CaptionSettingsMenuItem",super(e,t),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+t.kind+" settings dialog")}handleClick(e){this.player().getChild("textTrackSettings").open()}}zt.registerComponent("CaptionSettingsMenuItem",us);class cs extends ns{constructor(e,t,i){super(e,t,i)}buildCSSClass(){return"vjs-captions-button "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-captions-button "+super.buildWrapperCSSClass()}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new us(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}cs.prototype.kind_="captions",cs.prototype.controlText_="Captions",zt.registerComponent("CaptionsButton",cs);class hs extends rs{createEl(e,t,i){const r=super.createEl(e,t,i),s=r.querySelector(".vjs-menu-item-text");return"captions"===this.options_.track.kind&&(s.appendChild(Ee("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),s.appendChild(Ee("span",{className:"vjs-control-text",textContent:" "+this.localize("Captions")}))),r}}zt.registerComponent("SubsCapsMenuItem",hs);class ps extends ns{constructor(e,t={}){super(e,t),this.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(this.player_.language_)>-1&&(this.label_="captions"),this.menuButton_.controlText(qt(this.label_))}buildCSSClass(){return"vjs-subs-caps-button "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-subs-caps-button "+super.buildWrapperCSSClass()}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new us(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,hs),e}}ps.prototype.kinds_=["captions","subtitles"],ps.prototype.controlText_="Subtitles",zt.registerComponent("SubsCapsButton",ps);class fs extends is{constructor(e,t){const i=t.track,r=e.audioTracks();t.label=i.label||i.language||"Unknown",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const s=(...e)=>{this.handleTracksChange.apply(this,e)};r.addEventListener("change",s),this.on("dispose",()=>{r.removeEventListener("change",s)})}createEl(e,t,i){const r=super.createEl(e,t,i),s=r.querySelector(".vjs-menu-item-text");return"main-desc"===this.options_.track.kind&&(s.appendChild(Ee("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),s.appendChild(Ee("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),r}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}zt.registerComponent("AudioTrackMenuItem",fs);class ms extends es{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t)}buildCSSClass(){return"vjs-audio-button "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-audio-button "+super.buildWrapperCSSClass()}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const r=t[i];e.push(new fs(this.player_,{track:r,selectable:!0,multiSelectable:!1}))}return e}}ms.prototype.controlText_="Audio Track",zt.registerComponent("AudioTrackButton",ms);class gs extends is{constructor(e,t){const i=t.rate,r=parseFloat(i,10);t.label=i,t.selected=r===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=r,this.on(e,"ratechange",e=>this.update(e))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}gs.prototype.contentElType="button",zt.registerComponent("PlaybackRateMenuItem",gs);class ys extends Zr{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",e=>this.updateVisibility(e)),this.on(e,"ratechange",e=>this.updateLabel(e)),this.on(e,"playbackrateschange",e=>this.handlePlaybackRateschange(e))}createEl(){const e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=Ee("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return"vjs-playback-rate "+super.buildCSSClass()}buildWrapperCSSClass(){return"vjs-playback-rate "+super.buildWrapperCSSClass()}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new gs(this.player(),{rate:e[i]+"x"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}}ys.prototype.controlText_="Playback Rate",zt.registerComponent("PlaybackRateMenuButton",ys);class vs extends zt{buildCSSClass(){return"vjs-spacer "+super.buildCSSClass()}createEl(e="div",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}zt.registerComponent("Spacer",vs);class bs extends vs{buildCSSClass(){return"vjs-custom-control-spacer "+super.buildCSSClass()}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:" "})}}zt.registerComponent("CustomControlSpacer",bs);class _s extends zt{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}_s.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in a.a&&_s.prototype.options_.children.splice(_s.prototype.options_.children.length-1,0,"pictureInPictureToggle"),zt.registerComponent("ControlBar",_s);class Ts extends ui{constructor(e,t){super(e,t),this.on(e,"error",e=>this.open(e))}buildCSSClass(){return"vjs-error-display "+super.buildCSSClass()}content(){const e=this.player().error();return e?this.localize(e.message):""}}Ts.prototype.options_=Object.assign({},ui.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),zt.registerComponent("ErrorDisplay",Ts);const Ss="vjs-text-track-settings",ws=["#000","Black"],Es=["#00F","Blue"],Cs=["#0FF","Cyan"],xs=["#0F0","Green"],ks=["#F0F","Magenta"],Is=["#F00","Red"],As=["#FFF","White"],Ps=["#FF0","Yellow"],Os=["1","Opaque"],Ls=["0.5","Semi-Transparent"],Ds=["0","Transparent"],Ms={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[ws,As,Is,xs,Es,Ps,ks,Cs]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Os,Ls,Ds]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[As,ws,Is,xs,Es,Ps,ks,Cs]},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:e=>"1.00"===e?null:Number(e)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[Os,Ls]},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:[Ds,Ls,Os]}};function Ns(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}function Rs(e,t){const i=e.options[e.options.selectedIndex].value;return Ns(i,t)}function Us(e,t,i){if(t)for(let r=0;r<e.options.length;r++)if(Ns(e.options[r].value,i)===t){e.selectedIndex=r;break}}Ms.windowColor.options=Ms.backgroundColor.options;class Bs extends ui{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.endDialog=Ee("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.on(this.$(".vjs-done-button"),"click",()=>{this.saveSettings(),this.close()}),this.on(this.$(".vjs-default-button"),"click",()=>{this.setDefaults(),this.updateDisplay()}),V(Ms,e=>{this.on(this.$(e.selector),"change",this.updateDisplay)}),this.options_.persistTextTrackSettings&&this.restoreSettings()}dispose(){this.endDialog=null,super.dispose()}createElSelect_(e,t="",i="label"){const r=Ms[e],s=r.id.replace("%s",this.id_),n=[t,s].join(" ").trim();return[`<${i} id="${s}" class="${"label"===i?"vjs-label":""}">`,this.localize(r.label),`</${i}>`,`<select aria-labelledby="${n}">`].concat(r.options.map(e=>{const t=s+"-"+e[1].replace(/\W+/g,"");return[`<option id="${t}" value="${e[0]}" `,`aria-labelledby="${n} ${t}">`,this.localize(e[1]),"</option>"].join("")})).concat("</select>").join("")}createElFgColor_(){const e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">',`<legend id="${e}">`,this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")}createElBgColor_(){const e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">',`<legend id="${e}">`,this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")}createElWinColor_(){const e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">',`<legend id="${e}">`,this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")}createElColors_(){return Ee("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})}createElFont_(){return Ee("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})}createElControls_(){const e=this.localize("restore all settings to the default values");return Ee("div",{className:"vjs-track-settings-controls",innerHTML:[`<button type="button" class="vjs-default-button" title="${e}">`,this.localize("Reset"),`<span class="vjs-control-text"> ${e}</span>`,"</button>",`<button type="button" class="vjs-done-button">${this.localize("Done")}</button>`].join("")})}content(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}getValues(){return G(Ms,(e,t,i)=>{const r=Rs(this.$(t.selector),t.parser);return void 0!==r&&(e[i]=r),e},{})}setValues(e){V(Ms,(t,i)=>{Us(this.$(t.selector),e[i],t.parser)})}setDefaults(){V(Ms,e=>{const t=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=t})}restoreSettings(){let e;try{e=JSON.parse(s.a.localStorage.getItem(Ss))}catch(t){q.warn(t)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?s.a.localStorage.setItem(Ss,JSON.stringify(e)):s.a.localStorage.removeItem(Ss)}catch(t){q.warn(t)}}updateDisplay(){const e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}conditionalBlur_(){this.previouslyActiveEl_=null;const e=this.player_.controlBar,t=e&&e.subsCapsButton,i=e&&e.captionsButton;t?t.focus():i&&i.focus()}}zt.registerComponent("TextTrackSettings",Bs);class js extends zt{constructor(e,t){let i=t.ResizeObserver||s.a.ResizeObserver;null===t.ResizeObserver&&(i=!1);const r=Y({createEl:!i,reportTouchActivity:!1},t);super(e,r),this.ResizeObserver=t.ResizeObserver||s.a.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=wt(()=>{this.resizeHandler()},100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){mt(this,"resize",e),mt(this,"unload",t),t=null};ft(this.el_.contentWindow,"unload",t),ft(this.el_.contentWindow,"resize",e)},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}}zt.registerComponent("ResizeManager",js);const Fs={trackingThreshold:20,liveTolerance:15};class qs extends zt{constructor(e,t){const i=Y(Fs,t,{createEl:!1});super(e,i),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,"durationchange",e=>this.handleDurationchange(e)),this.on(this.player_,"canplay",()=>this.toggleTracking())}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(s.a.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const r=this.liveCurrentTime(),n=this.player_.currentTime();let a=this.player_.paused()||this.seekedBehindLive_||Math.abs(r-n)>this.options_.liveTolerance;this.timeupdateSeen_&&r!==1/0||(a=!1),a!==this.behindLiveEdge_&&(this.behindLiveEdge_=a,this.trigger("liveedgechange"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,_t),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;while(i--)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;while(i--)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return"number"===typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}}zt.registerComponent("LiveTracker",qs);class $s extends zt{constructor(e,t){super(e,t),this.on("statechanged",e=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:Ee("div",{className:"vjs-title-bar-title",id:"vjs-title-bar-title-"+lt()}),description:Ee("div",{className:"vjs-title-bar-description",id:"vjs-title-bar-description-"+lt()})},Ee("div",{className:"vjs-title-bar"},{},Object.values(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(e=>{const r=this.state[e],s=this.els[e],n=i[e];$e(s),r&&Ce(s,r),t&&(t.removeAttribute(n),r&&t.setAttribute(n,s.id))}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute("aria-labelledby"),t.removeAttribute("aria-describedby")),super.dispose(),this.els=null}}zt.registerComponent("TitleBar",$s);const Hs=e=>{const t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;const i=e.$$("source"),r=[];let s="";if(!i.length)return!1;for(let n=0;n<i.length;n++){const e=i[n].src;e&&-1===r.indexOf(e)&&r.push(e)}return!!r.length&&(1===r.length&&(s=r[0]),e.triggerSourceset(s),!0)},zs=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=a.a.createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=a.a.createDocumentFragment();while(t.childNodes.length)i.appendChild(t.childNodes[0]);return this.innerText="",s.a.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Vs=(e,t)=>{let i={};for(let r=0;r<e.length;r++)if(i=Object.getOwnPropertyDescriptor(e[r],t),i&&i.set&&i.get)break;return i.enumerable=!0,i.configurable=!0,i},Gs=e=>Vs([e.el(),s.a.HTMLMediaElement.prototype,s.a.Element.prototype,zs],"innerHTML"),Ws=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},r=Gs(e),s=i=>(...r)=>{const s=i.apply(t,r);return Hs(e),s};["append","appendChild","insertAdjacentHTML"].forEach(e=>{t[e]&&(i[e]=t[e],t[e]=s(i[e]))}),Object.defineProperty(t,"innerHTML",Y(r,{set:s(r.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(i).forEach(e=>{t[e]=i[e]}),Object.defineProperty(t,"innerHTML",r)},e.one("sourceset",t.resetSourceWatch_)},Xs=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?Ci(s.a.Element.prototype.getAttribute.call(this,"src")):""},set(e){return s.a.Element.prototype.setAttribute.call(this,"src",e),e}}),Ys=e=>Vs([e.el(),s.a.HTMLMediaElement.prototype,Xs],"src"),Ks=function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=Ys(e),r=t.setAttribute,s=t.load;Object.defineProperty(t,"src",Y(i,{set:r=>{const s=i.set.call(t,r);return e.triggerSourceset(t.src),s}})),t.setAttribute=(i,s)=>{const n=r.call(t,i,s);return/src/i.test(i)&&e.triggerSourceset(t.src),n},t.load=()=>{const i=s.call(t);return Hs(e)||(e.triggerSourceset(""),Ws(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):Hs(e)||Ws(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=s,t.setAttribute=r,Object.defineProperty(t,"src",i),t.resetSourceWatch_&&t.resetSourceWatch_()}};class Js extends ji{constructor(e,t){super(e,t);const i=e.source;let r=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&"VIDEO"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];while(t--){const s=e[t],n=s.nodeName.toLowerCase();"track"===n&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(s),this.remoteTextTracks().addTrack(s.track),this.textTracks().addTrack(s.track),r||this.el_.hasAttribute("crossorigin")||!ki(s.src)||(r=!0)):i.push(s))}for(let r=0;r<i.length;r++)this.el_.removeChild(i[r])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&r&&q.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),this.restoreMetadataTracksInIOSNativePlayer_(),(pe||he)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),Js.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Ks(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const r=e[i];"metadata"===r.kind&&t.push({track:r,storedMode:r.mode})}};i(),e.addEventListener("change",i),this.on("dispose",()=>e.removeEventListener("change",i));const r=()=>{for(let e=0;e<t.length;e++){const i=t[e];"disabled"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener("change",r)};this.on("webkitbeginfullscreen",()=>{e.removeEventListener("change",i),e.removeEventListener("change",r),e.addEventListener("change",r)}),this.on("webkitendfullscreen",()=>{e.removeEventListener("change",i),e.addEventListener("change",i),e.removeEventListener("change",r)})}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[i+"TracksListeners_"]&&Object.keys(this[i+"TracksListeners_"]).forEach(e=>{const t=this.el()[i+"Tracks"];t.removeEventListener(e,this[i+"TracksListeners_"][e])}),this[`featuresNative${e}Tracks`]=!t,this[i+"TracksListeners_"]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(e){const t=Ni[e],i=this.el()[t.getterName],r=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const s={change:t=>{const i={type:"change",target:r,currentTarget:r,srcElement:r};r.trigger(i),"text"===e&&this[Ri.remoteText.getterName]().trigger(i)},addtrack(e){r.addTrack(e.track)},removetrack(e){r.removeTrack(e.track)}},n=function(){const e=[];for(let t=0;t<r.length;t++){let s=!1;for(let e=0;e<i.length;e++)if(i[e]===r[t]){s=!0;break}s||e.push(r[t])}while(e.length)r.removeTrack(e.shift())};this[t.getterName+"Listeners_"]=s,Object.keys(s).forEach(e=>{const t=s[e];i.addEventListener(e,t),this.on("dispose",r=>i.removeEventListener(e,t))}),this.on("loadstart",n),this.on("dispose",e=>this.off("loadstart",n))}proxyNativeTracks_(){Ni.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),Js.disposeMediaElement(e),e=t}else{e=a.a.createElement("video");const t=this.options_.tag&&Le(this.options_.tag),i=Y({},t);pe&&!0===this.options_.nativeControlsForTouch||delete i.controls,Oe(e,Object.assign(i,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}"undefined"!==typeof this.options_.preload&&Me(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=["loop","muted","playsinline","autoplay"];for(let i=0;i<t.length;i++){const r=t[i],s=this.options_[r];"undefined"!==typeof s&&(s?Me(e,r,r):Ne(e,r),e[r]=s)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on("loadstart",t);const i=function(){e||this.trigger("loadstart")};return this.on("loadedmetadata",i),void this.ready((function(){this.off("loadstart",t),this.off("loadedmetadata",i),e||this.trigger("loadstart")}))}const t=["loadstart"];t.push("loadedmetadata"),e.readyState>=2&&t.push("loadeddata"),e.readyState>=3&&t.push("canplay"),e.readyState>=4&&t.push("canplaythrough"),this.ready((function(){t.forEach((function(e){this.trigger(e)}),this)}))}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&ge?this.el_.fastSeek(e):this.el_.currentTime=e}catch(t){q(t,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&te&&ne&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;const e=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",t),this.on("dispose",()=>{this.off("webkitbeginfullscreen",t),this.off("webkitendfullscreen",e)})}supportsFullScreen(){return"function"===typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)si(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}}),0);else try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}reset(){Js.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=a.a.createElement("track");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$("track");let i=t.length;while(i--)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if("function"===typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return"undefined"!==typeof this.el().webkitDroppedFrameCount&&"undefined"!==typeof this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),s.a.performance&&(e.creationTime=s.a.performance.now()),e}}K(Js,"TEST_VID",(function(){if(!_e())return;const e=a.a.createElement("video"),t=a.a.createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e})),Js.isSupported=function(){try{Js.TEST_VID.volume=.5}catch(e){return!1}return!(!Js.TEST_VID||!Js.TEST_VID.canPlayType)},Js.canPlayType=function(e){return Js.TEST_VID.canPlayType(e)},Js.canPlaySource=function(e,t){return Js.canPlayType(e.type)},Js.canControlVolume=function(){try{const e=Js.TEST_VID.volume;Js.TEST_VID.volume=e/2+.1;const t=e!==Js.TEST_VID.volume;return t&&me?(s.a.setTimeout(()=>{Js&&Js.prototype&&(Js.prototype.featuresVolumeControl=e!==Js.TEST_VID.volume)}),!1):t}catch(e){return!1}},Js.canMuteVolume=function(){try{const e=Js.TEST_VID.muted;return Js.TEST_VID.muted=!e,Js.TEST_VID.muted?Me(Js.TEST_VID,"muted","muted"):Ne(Js.TEST_VID,"muted","muted"),e!==Js.TEST_VID.muted}catch(e){return!1}},Js.canControlPlaybackRate=function(){if(te&&ne&&oe<58)return!1;try{const e=Js.TEST_VID.playbackRate;return Js.TEST_VID.playbackRate=e/2+.1,e!==Js.TEST_VID.playbackRate}catch(e){return!1}},Js.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(a.a.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(a.a.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(a.a.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(a.a.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},Js.supportsNativeTextTracks=function(){return ge||me&&ne},Js.supportsNativeVideoTracks=function(){return!(!Js.TEST_VID||!Js.TEST_VID.videoTracks)},Js.supportsNativeAudioTracks=function(){return!(!Js.TEST_VID||!Js.TEST_VID.audioTracks)},Js.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,t]){K(Js.prototype,e,()=>Js[t](),!0)})),Js.prototype.featuresVolumeControl=Js.canControlVolume(),Js.prototype.movingMediaElementInDOM=!me,Js.prototype.featuresFullscreenResize=!0,Js.prototype.featuresProgressEvents=!0,Js.prototype.featuresTimeupdateEvents=!0,Js.prototype.featuresVideoFrameCallback=!(!Js.TEST_VID||!Js.TEST_VID.requestVideoFrameCallback),Js.disposeMediaElement=function(e){if(e){e.parentNode&&e.parentNode.removeChild(e);while(e.hasChildNodes())e.removeChild(e.firstChild);e.removeAttribute("src"),"function"===typeof e.load&&function(){try{e.load()}catch(t){}}()}},Js.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll("source");let i=t.length;while(i--)e.removeChild(t[i]);e.removeAttribute("src"),"function"===typeof e.load&&function(){try{e.load()}catch(t){}}()},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){Js.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){Js.prototype["set"+qt(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){Js.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){Js.prototype["set"+qt(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){Js.prototype[e]=function(){return this.el_[e]()}})),ji.withSourceHandlers(Js),Js.nativeSourceHandler={},Js.nativeSourceHandler.canPlayType=function(e){try{return Js.TEST_VID.canPlayType(e)}catch(t){return""}},Js.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Js.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=xi(e.src);return Js.nativeSourceHandler.canPlayType("video/"+t)}return""},Js.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},Js.nativeSourceHandler.dispose=function(){},Js.registerSourceHandler(Js.nativeSourceHandler),ji.registerTech("Html5",Js);const Qs=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Zs={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},en=["tiny","xsmall","small","medium","large","xlarge","huge"],tn={};en.forEach(e=>{const t="x"===e.charAt(0)?"x-"+e.substring(1):e;tn[e]="vjs-layout-"+t});const rn={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class sn extends zt{constructor(e,t,i){if(e.id=e.id||t.id||"vjs_video_"+lt(),t=Object.assign(sn.getTagSettings(e),t),t.initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest("[lang]");i&&(t.language=i.getAttribute("lang"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.isFullscreen_=!1,this.log=$(this.id_),this.fsApi_=M,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=e,this.tagAttributes=e&&Le(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach((function(i){e[i.toLowerCase()]=t.languages[i]})),this.languages_=e}else this.languages_=sn.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||"",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach(e=>{if("function"!==typeof this[e])throw new Error(`plugin "${e}" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),Ut(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(ft(a.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const r=Y(this.options_);t.plugins&&Object.keys(t.plugins).forEach(e=>{this[e](t.plugins[e])}),t.debug&&this.debug(!0),this.options_.playerOptions=r,this.middleware_=[],this.playbackRates(t.playbackRates),this.initChildren(),this.isAudio("audio"===e.nodeName.toLowerCase()),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),pe&&this.addClass("vjs-touch-enabled"),me||this.addClass("vjs-workinghover"),sn.players[this.id_]=this;const s=I.split(".")[0];this.addClass("vjs-v"+s),this.userActive(!0),this.reportUserActivity(),this.one("play",e=>this.listenForUserActivity_(e)),this.on("keydown",e=>this.handleKeyDown(e)),this.on("languagechange",e=>this.handleLanguagechange(e)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){this.trigger("dispose"),this.off("dispose"),mt(a.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),mt(a.a,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),sn.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),er(this),Ui.names.forEach(e=>{const t=Ui[e],i=this[t.getterName]();i&&i.off&&i.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player");const r="video-js"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:r||(e=this.el_=super.createEl("div"));const n=Le(t);if(r){e=this.el_=t,t=this.tag=a.a.createElement("video");while(e.children.length)t.appendChild(e.firstChild);ke(e,"video-js")||Ie(e,"video-js"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach(i=>{try{t[i]=e[i]}catch(r){}})}if(t.setAttribute("tabindex","-1"),n.tabindex="-1",ne&&ue&&(t.setAttribute("role","application"),n.role="application"),t.removeAttribute("width"),t.removeAttribute("height"),"width"in n&&delete n.width,"height"in n&&delete n.height,Object.getOwnPropertyNames(n).forEach((function(i){r&&"class"===i||e.setAttribute(i,n[i]),r&&t.setAttribute(i,n[i])})),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=e.player=this,this.addClass("vjs-paused"),!0!==s.a.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=it("vjs-styles-dimensions");const e=We(".vjs-styles-defaults"),t=We("head");t.insertBefore(this.styleEl_,e?e.nextSibling:t.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const o=t.getElementsByTagName("a");for(let s=0;s<o.length;s++){const e=o.item(s);Ie(e,"vjs-hidden"),e.setAttribute("hidden","hidden")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),xe(t,e),this.children_.unshift(t),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=e,e}crossOrigin(e){if("undefined"===typeof e)return this.techGet_("crossOrigin");null===e||"anonymous"===e||"use-credentials"===e?(this.techCall_("setCrossOrigin",e),this.posterImage&&this.posterImage.crossOrigin(e)):q.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`)}width(e){return this.dimension("width",e)}height(e){return this.dimension("height",e)}dimension(e,t){const i=e+"_";if(void 0===t)return this[i]||0;if(""===t||"auto"===t)return this[i]=void 0,void this.updateStyleEl_();const r=parseFloat(t);isNaN(r)?q.error(`Improper value "${t}" supplied for for ${e}`):(this[i]=r,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;this.fluid_=!!e,It(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),At(this,()=>{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(!0===s.a.VIDEOJS_NO_DYNAMIC_STYLE){const e="number"===typeof this.width_?this.width_:this.options_.width,t="number"===typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,r;i=void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9";const n=i.split(":"),a=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/a:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*a,r=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(r),rt(this.styleEl_,`\n .${r} {\n width: ${e}px;\n height: ${t}px;\n }\n\n .${r}.vjs-fluid:not(.vjs-audio-only-mode) {\n padding-top: ${100*a}%;\n }\n `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=qt(e),r=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==i&&this.tag&&(ji.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let s=this.autoplay();("string"===typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(s=!1);const n={source:t,autoplay:s,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${r}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};Ui.names.forEach(e=>{const t=Ui[e];n[t.getterName]=this[t.privateName]}),Object.assign(n,this.options_[i]),Object.assign(n,this.options_[r]),Object.assign(n,this.options_[e.toLowerCase()]),this.tag&&(n.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(n.startTime=this.cache_.currentTime);const a=ji.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new a(n),this.tech_.ready(Tt(this,this.handleTechReady_),!0),li.jsonToTextTracks(this.textTracksJson_||[],this.tech_),Qs.forEach(e=>{this.on(this.tech_,e,t=>this[`handleTech${qt(e)}_`](t))}),Object.keys(Zs).forEach(e=>{this.on(this.tech_,e,t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${Zs[e]}_`].bind(this),event:t}):this[`handleTech${Zs[e]}_`](t)})}),this.on(this.tech_,"loadstart",e=>this.handleTechLoadStart_(e)),this.on(this.tech_,"sourceset",e=>this.handleTechSourceset_(e)),this.on(this.tech_,"waiting",e=>this.handleTechWaiting_(e)),this.on(this.tech_,"ended",e=>this.handleTechEnded_(e)),this.on(this.tech_,"seeking",e=>this.handleTechSeeking_(e)),this.on(this.tech_,"play",e=>this.handleTechPlay_(e)),this.on(this.tech_,"pause",e=>this.handleTechPause_(e)),this.on(this.tech_,"durationchange",e=>this.handleTechDurationChange_(e)),this.on(this.tech_,"fullscreenchange",(e,t)=>this.handleTechFullscreenChange_(e,t)),this.on(this.tech_,"fullscreenerror",(e,t)=>this.handleTechFullscreenError_(e,t)),this.on(this.tech_,"enterpictureinpicture",e=>this.handleTechEnterPictureInPicture_(e)),this.on(this.tech_,"leavepictureinpicture",e=>this.handleTechLeavePictureInPicture_(e)),this.on(this.tech_,"error",e=>this.handleTechError_(e)),this.on(this.tech_,"posterchange",e=>this.handleTechPosterChange_(e)),this.on(this.tech_,"textdata",e=>this.handleTechTextData_(e)),this.on(this.tech_,"ratechange",e=>this.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"===i&&this.tag||xe(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){Ui.names.forEach(e=>{const t=Ui[e];this[t.privateName]=this[t.getterName]()}),this.textTracksJson_=li.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&q.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_}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(e){if(!this.tech_||"string"!==typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(ri(i))return i.catch(e=>{throw t(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(e||""))})};let i;return"any"!==e||this.muted()?i="muted"!==e||this.muted()?this.play():t():(i=this.play(),ri(i)&&(i=i.catch(t))),ri(i)?i.then(()=>{this.trigger({type:"autoplay-success",autoplay:e})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:e})}):void 0}updateSourceCaches_(e=""){let t=e,i="";"string"!==typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=nr(this,t)),this.cache_.source=Y({},e,{src:t,type:i});const r=this.cache_.sources.filter(e=>e.src&&e.src===t),s=[],n=this.$$("source"),a=[];for(let o=0;o<n.length;o++){const e=Le(n[o]);s.push(e),e.src&&e.src===t&&a.push(e.src)}a.length&&!r.length?this.cache_.sources=s:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,r=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(r)&&(!this.lastSource_||this.lastSource_.tech!==r&&this.lastSource_.player!==i)&&(t=()=>{}),t(r),e.src||this.tech_.any(["sourceset","loadstart"],e=>{if("sourceset"===e.type)return;const t=this.techGet("currentSrc");this.lastSource_.tech=t,this.updateSourceCaches_(t)})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(e=>e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",t))};this.on("timeupdate",t)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(e){this.controls_&&(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()?si(this.play()):this.pause()))}handleTechDoubleClick_(e){if(!this.controls_)return;const t=Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),t=>t.contains(e.target));t||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())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let r=a.a[this.fsApi_.fullscreenElement]===i;!r&&i.matches?r=i.matches(":"+this.fsApi_.fullscreen):!r&&i.msMatchesSelector&&(r=i.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(r)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",()=>{this.removeClass("vjs-ios-native-fs")})),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger("fullscreenerror",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready((function(){if(e in Ki)return Wi(this.middleware_,this.tech_,e,t);if(e in Ji)return Xi(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(i){throw q(i),i}}),!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in Yi)return Gi(this.middleware_,this.tech_,e);if(e in Ji)return Xi(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw q(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if("TypeError"===t.name)throw q(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw q(t),t}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=si){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(t||!ge&&!me||this.load());const i=this.techGet_("play");null===i?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(i)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))}pause(){this.techCall_("pause")}paused(){return!1!==this.techGet_("paused")}played(){return this.techGet_("played")||Xt(0,0)}scrubbing(e){if("undefined"===typeof e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}currentTime(e){return"undefined"!==typeof 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)}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;e=parseFloat(e),e<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_("buffered");return e&&e.length||(e=Xt(0,0)),e}bufferedPercent(){return ti(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;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)}muted(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)}defaultMuted(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise((i,r)=>{function s(){t.off("fullscreenerror",a),t.off("fullscreenchange",n)}function n(){s(),i()}function a(e,t){s(),r(t)}t.one("fullscreenchange",n),t.one("fullscreenerror",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(s,s),o.then(i,r))})}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),e}this.tech_.supportsFullScreen()&&!0===!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise((t,i)=>{function r(){e.off("fullscreenerror",n),e.off("fullscreenchange",s)}function s(){r(),t()}function n(e,t){r(),i(t)}e.one("fullscreenchange",s),e.one("fullscreenerror",n);const a=e.exitFullscreenHelper_();a&&(a.then(r,r),a.then(t,i))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=a.a[this.fsApi_.exitFullscreen]();return e&&si(e.then(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&!0===!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=a.a.documentElement.style.overflow,ft(a.a,"keydown",this.boundFullWindowOnEscKey_),a.a.documentElement.style.overflow="hidden",Ie(a.a.body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(e){l.a.isEventKey(e,"Esc")&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,mt(a.a,"keydown",this.boundFullWindowOnEscKey_),a.a.documentElement.style.overflow=this.docOrigOverflow,Ae(a.a.body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if("pictureInPictureEnabled"in a.a&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")}exitPictureInPicture(){if("pictureInPictureEnabled"in a.a)return a.a.exitPictureInPicture()}handleKeyDown(e){const{userActions:t}=this.options_;if(!t||!t.hotkeys)return;const i=e=>{const t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;const i=["button","checkbox","hidden","radio","reset","submit"];if("input"===t)return-1===i.indexOf(e.type);const r=["textarea"];return-1!==r.indexOf(t)};i(this.el_.ownerDocument.activeElement)||("function"===typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=(e=>l.a.isEventKey(e,"f")),muteKey:r=(e=>l.a.isEventKey(e,"m")),playPauseKey:s=(e=>l.a.isEventKey(e,"k")||l.a.isEventKey(e,"Space"))}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=zt.getComponent("FullscreenToggle");!1!==a.a[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else if(r.call(this,e)){e.preventDefault(),e.stopPropagation();const t=zt.getComponent("MuteToggle");t.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation();const t=zt.getComponent("PlayToggle");t.prototype.handleClick.call(this,e)}}canPlayType(e){let t;for(let i=0,r=this.options_.techOrder;i<r.length;i++){const s=r[i];let n=ji.getTech(s);if(n||(n=zt.getComponent(s)),n){if(n.isSupported()&&(t=n.canPlayType(e),t))return t}else q.error(`The "${s}" tech is undefined. Skipped browser support check for that tech.`)}return""}selectSource(e){const t=this.options_.techOrder.map(e=>[e,ji.getTech(e)]).filter(([e,t])=>t?t.isSupported():(q.error(`The "${e}" tech is undefined. Skipped browser support check for that tech.`),!1)),i=function(e,t,i){let r;return e.some(e=>t.some(t=>{if(r=i(e,t),r)return!0})),r};let r;const s=e=>(t,i)=>e(i,t),n=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};return r=this.options_.sourceOrder?i(e,t,s(n)):i(t,e,n),r||!1}handleSrc_(e,t){if("undefined"===typeof e)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const i=ar(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),zi(this,i[0],(e,r)=>{this.middleware_=r,t||(this.cache_.sources=i),this.updateSourceCaches_(e);const s=this.src_(e);if(s)return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void this.triggerReady());Vi(r,this.tech_)}),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off("error",e)};this.one("error",e),this.one("playing",t),this.resetRetryOnError_=()=>{this.off("error",e),this.off("playing",t)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||($t(t.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1))}load(){this.techCall_("load")}reset(){if(this.paused())this.doReset_();else{const e=this.play();si(e.then(()=>this.doReset_()))}}doReset_(){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")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{durationDisplay:e,remainingTimeDisplay:t}=this.controlBar||{};e&&e.updateContent(),t&&t.updateContent()}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let 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="undefined"===typeof t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)}playsinline(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")}loop(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")}poster(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"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}}controls(e){if(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_()))}usingNativeControls(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")))}error(e){if(void 0===e)return this.error_||null;if(P("beforeerror").forEach(t=>{const i=t(this,e);W(i)&&!Array.isArray(i)||"string"===typeof i||"number"===typeof i||null===i?e=i:this.log.error("please return a value that MediaError expects in beforeerror hooks")}),this.options_.suppressNotSupportedError&&e&&4===e.code){const t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),void this.one("loadstart",(function(){this.off(["click","touchstart"],t)}))}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new ii(e),this.addClass("vjs-error"),q.error(`(CODE:${this.error_.code} ${ii.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),P("error").forEach(e=>e(this,this.error_))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(void 0===e)return this.userActive_;if(e=!!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")}}listenForUserActivity_(){let e,t,i;const r=Tt(this,this.reportUserActivity),s=function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,r())},n=function(){r(),this.clearInterval(e),e=this.setInterval(r,250)},a=function(t){r(),this.clearInterval(e)};this.on("mousedown",n),this.on("mousemove",s),this.on("mouseup",a),this.on("mouseleave",a);const o=this.getChild("controlBar");let l;!o||me||te||(o.on("mouseenter",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),o.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_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(l);const e=this.options_.inactivityTimeout;e<=0||(l=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}),250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");const e=this.children(),t=this.getChild("ControlBar"),i=t&&t.currentHeight();e.forEach(e=>{e!==t&&e.el_&&!e.hasClass("vjs-hidden")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.height(i),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.audioOnlyCache_.hiddenChildren.forEach(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(e){if("boolean"!==typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){const e=this.tech_&&this.tech_;e.hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){const e=this.tech_&&this.tech_;e.show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(e){if("boolean"!==typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;if(this.audioPosterMode_=e,e){if(this.audioOnlyMode()){const e=this.audioOnlyMode(!1);return e.then(()=>{this.enablePosterModeUI_()})}return Promise.resolve().then(()=>{this.enablePosterModeUI_()})}return Promise.resolve().then(()=>{this.disablePosterModeUI_()})}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),It(this)&&this.trigger("languagechange"))}languages(){return Y(sn.prototype.options_.languages,this.languages_)}toJSON(){const e=Y(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let r=t[i];r=Y(r),r.player=void 0,e.tracks[i]=r}return e}createModal(e,t){t=t||{},t.content=e||"";const i=new ui(this,t);return this.addChild(i),i.on("dispose",()=>{this.removeChild(i)}),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<en.length;i++){const r=en[i],s=this.breakpoints_[r];if(t<=s){if(e===r)return;e&&this.removeClass(tn[e]),this.addClass(tn[r]),this.breakpoint_=r;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=Object.assign({},rn,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){if(void 0===e)return this.responsive_;e=Boolean(e);const t=this.responsive_;return e!==t?(this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return tn[this.breakpoint_]||""}loadMedia(e,t){if(!e||"object"!==typeof e)return;this.reset(),this.cache_.media=Y(e);const{artist:i,artwork:r,description:s,poster:n,src:a,textTracks:o,title:l}=this.cache_.media;!r&&n&&(this.cache_.media.artwork=[{src:n,type:sr(n)}]),a&&this.src(a),n&&this.poster(n),Array.isArray(o)&&o.forEach(e=>this.addRemoteTextTrack(e,!1)),this.titleBar&&this.titleBar.update({title:l,description:s||i||""}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t=this.currentSources(),i=Array.prototype.map.call(this.remoteTextTracks(),e=>({kind:e.kind,label:e.label,language:e.language,src:e.src})),r={src:t,textTracks:i};return e&&(r.poster=e,r.artwork=[{src:r.poster,type:sr(r.poster)}]),r}return Y(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=Le(e),r=i["data-setup"];if(ke(e,"vjs-fill")&&(i.fill=!0),ke(e,"vjs-fluid")&&(i.fluid=!0),null!==r){const[e,t]=u()(r||"{}");e&&q.error(e),Object.assign(i,t)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,r=i.length;e<r;e++){const r=i[e],s=r.nodeName.toLowerCase();"source"===s?t.sources.push(Le(r)):"track"===s&&t.tracks.push(Le(r))}}return t}debug(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every(e=>"number"===typeof e)&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}}Ui.names.forEach((function(e){const t=Ui[e];sn.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),sn.prototype.crossorigin=sn.prototype.crossOrigin,sn.players={};const nn=s.a.navigator;sn.prototype.options_={techOrder:ji.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:nn&&(nn.languages&&nn.languages[0]||nn.userLanguage||nn.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1},["ended","seeking","seekable","networkState","readyState"].forEach((function(e){sn.prototype[e]=function(){return this.techGet_(e)}})),Qs.forEach((function(e){sn.prototype[`handleTech${qt(e)}_`]=function(){return this.trigger(e)}})),zt.registerComponent("Player",sn);const an="plugin",on="activePlugins_",ln={},dn=e=>ln.hasOwnProperty(e),un=e=>dn(e)?ln[e]:void 0,cn=(e,t)=>{e[on]=e[on]||{},e[on][t]=!0},hn=(e,t,i)=>{const r=(i?"before":"")+"pluginsetup";e.trigger(r,t),e.trigger(r+":"+t.name,t)},pn=function(e,t){const i=function(){hn(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return cn(this,e),hn(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach((function(e){i[e]=t[e]})),i},fn=(e,t)=>(t.prototype.name=e,function(...i){hn(this,{name:e,plugin:t,instance:null},!0);const r=new t(...[this,...i]);return this[e]=()=>r,hn(this,r.getEventHash()),r});class mn{constructor(e){if(this.constructor===mn)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),Ut(this),delete this.trigger,jt(this,this.constructor.defaultState),cn(e,this.name),this.dispose=this.dispose.bind(this),e.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return gt(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[on][e]=!1,this.player=this.state=null,t[e]=fn(e,ln[e])}static isBasic(e){const t="string"===typeof e?un(e):e;return"function"===typeof t&&!mn.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if("string"!==typeof e)throw new Error(`Illegal plugin name, "${e}", must be a string, was ${typeof e}.`);if(dn(e))q.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(sn.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, "${e}", cannot share a name with an existing player method!`);if("function"!==typeof t)throw new Error(`Illegal plugin for "${e}", must be a function, was ${typeof t}.`);return ln[e]=t,e!==an&&(mn.isBasic(t)?sn.prototype[e]=pn(e,t):sn.prototype[e]=fn(e,t)),t}static deregisterPlugin(e){if(e===an)throw new Error("Cannot de-register base plugin.");dn(e)&&(delete ln[e],delete sn.prototype[e])}static getPlugins(e=Object.keys(ln)){let t;return e.forEach(e=>{const i=un(e);i&&(t=t||{},t[e]=i)}),t}static getPluginVersion(e){const t=un(e);return t&&t.VERSION||""}}function gn(e,t){let i=!1;return function(...r){return i||q.warn(e),i=!0,t.apply(this,r)}}function yn(e,t,i,r){return gn(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,r)}mn.getPlugin=un,mn.BASE_PLUGIN_NAME=an,mn.registerPlugin(an,mn),sn.prototype.usingPlugin=function(e){return!!this[on]&&!0===this[on][e]},sn.prototype.hasPlugin=function(e){return!!dn(e)};const vn=e=>0===e.indexOf("#")?e.slice(1):e;function bn(e,t,i){let r=bn.getPlayer(e);if(r)return t&&q.warn(`Player "${e}" is already initialised. Options will not be applied.`),i&&r.ready(i),r;const s="string"===typeof e?We("#"+vn(e)):e;if(!Te(s))throw new TypeError("The element or ID supplied is not valid. (videojs)");s.ownerDocument.defaultView&&s.ownerDocument.body.contains(s)||q.warn("The element supplied is not included in the DOM"),t=t||{},!0===t.restoreEl&&(t.restoreEl=(s.parentNode&&s.parentNode.hasAttribute("data-vjs-player")?s.parentNode:s).cloneNode(!0)),P("beforesetup").forEach(e=>{const i=e(s,Y(t));W(i)&&!Array.isArray(i)?t=Y(t,i):q.error("please return an object in beforesetup hooks")});const n=zt.getComponent("Player");return r=new n(s,t,i),P("setup").forEach(e=>e(r)),r}if(bn.hooks_=A,bn.hooks=P,bn.hook=O,bn.hookOnce=D,bn.removeHook=L,!0!==s.a.VIDEOJS_NO_DYNAMIC_STYLE&&_e()){let e=We(".vjs-styles-defaults");if(!e){e=it("vjs-styles-defaults");const t=We("head");t&&t.insertBefore(e,t.firstChild),rt(e,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid:not(.vjs-audio-only-mode) {\n padding-top: 56.25%\n }\n ")}}et(1,bn),bn.VERSION=I,bn.options=sn.prototype.options_,bn.getPlayers=()=>sn.players,bn.getPlayer=e=>{const t=sn.players;let i;if("string"===typeof e){const r=vn(e),s=t[r];if(s)return s;i=We("#"+r)}else i=e;if(Te(i)){const{player:e,playerId:r}=i;if(e||t[r])return e||t[r]}},bn.getAllPlayers=()=>Object.keys(sn.players).map(e=>sn.players[e]).filter(Boolean),bn.players=sn.players,bn.getComponent=zt.getComponent,bn.registerComponent=(e,t)=>{ji.isTech(t)&&q.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),zt.registerComponent.call(zt,e,t)},bn.getTech=ji.getTech,bn.registerTech=ji.registerTech,bn.use=Hi,Object.defineProperty(bn,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(bn.middleware,"TERMINATOR",{value:$i,writeable:!1,enumerable:!0}),bn.browser=ye,bn.obj=J,bn.mergeOptions=yn(9,"videojs.mergeOptions","videojs.obj.merge",Y),bn.defineLazyProperty=yn(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",K),bn.bind=yn(9,"videojs.bind","native Function.prototype.bind",Tt),bn.registerPlugin=mn.registerPlugin,bn.deregisterPlugin=mn.deregisterPlugin,bn.plugin=(e,t)=>(q.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),mn.registerPlugin(e,t)),bn.getPlugins=mn.getPlugins,bn.getPlugin=mn.getPlugin,bn.getPluginVersion=mn.getPluginVersion,bn.addLanguage=function(e,t){return e=(""+e).toLowerCase(),bn.options.languages=Y(bn.options.languages,{[e]:t}),bn.options.languages[e]},bn.log=q,bn.createLogger=$,bn.time=ei,bn.createTimeRange=yn(9,"videojs.createTimeRange","videojs.time.createTimeRanges",Xt),bn.createTimeRanges=yn(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",Xt),bn.formatTime=yn(9,"videojs.formatTime","videojs.time.formatTime",Zt),bn.setFormatTime=yn(9,"videojs.setFormatTime","videojs.time.setFormatTime",Jt),bn.resetFormatTime=yn(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",Qt),bn.parseUrl=yn(9,"videojs.parseUrl","videojs.url.parseUrl",Ei),bn.isCrossOrigin=yn(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",ki),bn.EventTarget=xt,bn.any=vt,bn.on=ft,bn.one=yt,bn.off=mt,bn.trigger=gt,bn.xhr=h.a,bn.TextTrack=Oi,bn.AudioTrack=Li,bn.VideoTrack=Di,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(e=>{bn[e]=function(){return q.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),Ke[e].apply(null,arguments)}}),bn.computedStyle=yn(9,"videojs.computedStyle","videojs.dom.computedStyle",Ye),bn.dom=Ke,bn.fn=Et,bn.num=Pr,bn.str=Ht,bn.url=Ii;
25
25
  /*! @name videojs-contrib-quality-levels @version 3.0.0 @license Apache-2.0 */
26
26
  class _n{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,"enabled",{get(){return t.enabled_()},set(e){t.enabled_(e)}}),t}}class Tn extends bn.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get(){return e.selectedIndex_}}),Object.defineProperty(e,"length",{get(){return e.levels_.length}}),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new _n(e),""+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t}removeQualityLevel(e){let t=null;for(let i=0,r=this.length;i<r;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Tn.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const t in Tn.prototype.allowedEvents_)Tn.prototype["on"+t]=null;var Sn="3.0.0";const wn=bn.registerPlugin||bn.plugin,En=function(e,t){const i=e.qualityLevels,r=new Tn,s=function(){r.dispose(),e.qualityLevels=i,e.off("dispose",s)};return e.on("dispose",s),e.qualityLevels=()=>r,e.qualityLevels.VERSION=Sn,r},Cn=function(e){return En(this,bn.mergeOptions({},e))};wn("qualityLevels",Cn),Cn.VERSION=Sn;
27
27
  /*! @name @videojs/http-streaming @version 3.0.0 @license Apache-2.0 */
28
- const xn=m["a"],kn=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,In=e=>bn.log.debug?bn.log.debug.bind(bn,"VHS:",e+" >"):function(){};function An(...e){const t=bn.obj||bn,i=t.merge||t.mergeOptions;return i.apply(t,e)}function On(...e){const t=bn.time||bn,i=t.createTimeRanges||t.createTimeRanges;return i.apply(t,e)}const Pn=1/30,Ln=3*Pn,Dn=function(e,t){const i=[];let r;if(e&&e.length)for(r=0;r<e.length;r++)t(e.start(r),e.end(r))&&i.push([e.start(r),e.end(r)]);return On(i)},Mn=function(e,t){return Dn(e,(function(e,i){return e-Ln<=t&&i+Ln>=t}))},Nn=function(e,t){return Dn(e,(function(e){return e-Pn>=t}))},Rn=function(e){if(e.length<2)return On();const t=[];for(let i=1;i<e.length;i++){const r=e.end(i-1),s=e.start(i);t.push([r,s])}return On(t)},Un=function(e,t){let i=null,r=null,s=0;const n=[],a=[];if(!e||!e.length||!t||!t.length)return On();let o=e.length;while(o--)n.push({time:e.start(o),type:"start"}),n.push({time:e.end(o),type:"end"});o=t.length;while(o--)n.push({time:t.start(o),type:"start"}),n.push({time:t.end(o),type:"end"});for(n.sort((function(e,t){return e.time-t.time})),o=0;o<n.length;o++)"start"===n[o].type?(s++,2===s&&(i=n[o].time)):"end"===n[o].type&&(s--,1===s&&(r=n[o].time)),null!==i&&null!==r&&(a.push([i,r]),i=null,r=null);return On(a)},Bn=e=>{const t=[];if(!e||!e.length)return"";for(let i=0;i<e.length;i++)t.push(e.start(i)+" => "+e.end(i));return t.join(", ")},jn=function(e,t,i=1){const r=e.length?e.end(e.length-1):0;return(r-t)/i},Fn=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},qn=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1},$n=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Hn=function(e,t){let i=0;if(!e||!e.length)return i;for(let r=0;r<e.length;r++){const s=e.start(r),n=e.end(r);t>n||(i+=t>s&&t<=n?n-t:n-s)}return i},zn=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach((function(e){i+=e.duration})),(t.preloadHints||[]).forEach((function(t){"PART"===t.type&&(i+=e.partTargetDuration)})),i},Vn=e=>(e.segments||[]).reduce((e,t,i)=>(t.parts?t.parts.forEach((function(r,s){e.push({duration:r.duration,segmentIndex:i,partIndex:s,part:r,segment:t})})):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e),[]),Gn=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},Wn=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let r=(i||[]).reduce((e,t)=>e+("PART"===t.type?1:0),0);return r+=t&&t.length?t.length:0,r},Xn=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Gn(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},Yn=function(e,t){let i=0,r=t-e.mediaSequence,s=e.segments[r];if(s){if("undefined"!==typeof s.start)return{result:s.start,precise:!0};if("undefined"!==typeof s.end)return{result:s.end-s.duration,precise:!0}}while(r--){if(s=e.segments[r],"undefined"!==typeof s.end)return{result:i+s.end,precise:!0};if(i+=zn(e,s),"undefined"!==typeof s.start)return{result:i+s.start,precise:!0}}return{result:i,precise:!1}},Kn=function(e,t){let i,r=0,s=t-e.mediaSequence;for(;s<e.segments.length;s++){if(i=e.segments[s],"undefined"!==typeof i.start)return{result:i.start-r,precise:!0};if(r+=zn(e,i),"undefined"!==typeof i.end)return{result:i.end-r,precise:!0}}return{result:-1,precise:!1}},Jn=function(e,t,i){if("undefined"===typeof t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const r=Yn(e,t);if(r.precise)return r.result;const s=Kn(e,t);return s.precise?s.result:r.result+i},Qn=function(e,t,i){if(!e)return 0;if("number"!==typeof i&&(i=0),"undefined"===typeof t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return s.a.Infinity}return Jn(e,t,i)},Zn=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:r}){let s=0;if(i>r&&([i,r]=[r,i]),i<0){for(let t=i;t<Math.min(0,r);t++)s+=e;i=0}for(let n=i;n<r;n++)s+=t[n].duration;return s},ea=function(e,t,i,r){if(!e||!e.segments)return null;if(e.endList)return Qn(e);if(null===t)return null;t=t||0;let s=Jn(e,e.mediaSequence+e.segments.length,t);return i&&(r="number"===typeof r?r:Xn(null,e),s-=r),Math.max(0,s)},ta=function(e,t,i){const r=!0,s=t||0,n=ea(e,t,r,i);return null===n?On():On(s,n)},ia=function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:r,startTime:s,exactManifestTimings:n}){let a=t-s;const o=Vn(e);let l=0;for(let d=0;d<o.length;d++){const e=o[d];if(i===e.segmentIndex&&("number"!==typeof r||"number"!==typeof e.partIndex||r===e.partIndex)){l=d;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,n){if(a<0)continue}else if(a+Pn<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:s-Zn({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let d=l;d<o.length;d++){const t=o[d];if(a-=t.duration,n){if(a>0)continue}else if(a-Pn>=0)continue;return{partIndex:t.partIndex,segmentIndex:t.segmentIndex,startTime:s+Zn({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:d})}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},ra=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},sa=function(e){return e.excludeUntil&&e.excludeUntil===1/0},na=function(e){const t=ra(e);return!e.disabled&&!t},aa=function(e){return e.disabled},oa=function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},la=function(e,t){return t.attributes&&t.attributes[e]},da=function(e,t,i,r=0){if(!la("BANDWIDTH",i))return NaN;const s=e*i.attributes.BANDWIDTH;return(s-8*r)/t},ua=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter(e=>!!na(e)&&(e.attributes.BANDWIDTH||0)<i).length},ca=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),ha=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let r=!1;for(const s in i){for(const e in i[s])if(r=t(i[s][e]),r)break;if(r)break}return!!r},pa=e=>{if(!e||!e.playlists||!e.playlists.length){const t=ha(e,e=>e.playlists&&e.playlists.length||e.uri);return t}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],r=i.attributes&&i.attributes.CODECS;if(r&&r.split(",").every(e=>Object(b["f"])(e)))continue;const s=ha(e,e=>ca(i,e));if(!s)return!1}return!0};var fa={liveEdgeDelay:Xn,duration:Qn,seekable:ta,getMediaInfoForTime:ia,isEnabled:na,isDisabled:aa,isExcluded:ra,isIncompatible:sa,playlistEnd:ea,isAes:oa,hasAttribute:la,estimateSegmentRequestTime:da,isLowestEnabledRendition:ua,isAudioOnly:pa,playlistMatch:ca,segmentDurationWithParts:zn};const{log:ma}=bn,ga=(e,t)=>`${e}-${t}`,ya=({onwarn:e,oninfo:t,manifestString:i,customTagParsers:r=[],customTagMappers:s=[],llhls:n})=>{const a=new v["a"];e&&a.on("warn",e),t&&a.on("info",t),r.forEach(e=>a.addParser(e)),s.forEach(e=>a.addTagMapper(e)),a.push(i),a.end();const o=a.manifest;if(n||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach((function(e){o.hasOwnProperty(e)&&delete o[e]})),o.segments&&o.segments.forEach((function(e){["parts","preloadHints"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce((e,t)=>Math.max(e,t.duration),0)),e&&e("manifest has no targetDuration defaulting to "+t),o.targetDuration=t}const l=Gn(o);if(l.length&&!o.partTargetDuration){const t=l.reduce((e,t)=>Math.max(e,t.duration),0);e&&(e("manifest has no partTargetDuration defaulting to "+t),ma.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),o.partTargetDuration=t}return o},va=(e,t)=>{e.mediaGroups&&["AUDIO","SUBTITLES"].forEach(i=>{if(e.mediaGroups[i])for(const r in e.mediaGroups[i])for(const s in e.mediaGroups[i][r]){const n=e.mediaGroups[i][r][s];t(n,i,r,s)}})},ba=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},_a=e=>{let t=e.playlists.length;while(t--){const i=e.playlists[t];ba({playlist:i,id:ga(t,i.uri)}),i.resolvedUri=xn(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||ma.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},Ta=e=>{va(e,t=>{t.uri&&(t.resolvedUri=xn(e.uri,t.uri))})},Sa=(e,t)=>{const i=ga(0,t),r={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:s.a.location.href,resolvedUri:s.a.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return r.playlists[i]=r.playlists[0],r.playlists[t]=r.playlists[0],r},wa=(e,t)=>{e.uri=t;for(let r=0;r<e.playlists.length;r++)if(!e.playlists[r].uri){const t="placeholder-uri-"+r;e.playlists[r].uri=t}const i=pa(e);va(e,(t,r,s,n)=>{const a=`placeholder-uri-${r}-${s}-${n}`;if(!t.playlists||!t.playlists.length){if(i&&"AUDIO"===r&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===s)return}t.playlists=[y()({},t)]}t.playlists.forEach((function(t,i){const r=ga(i,a);t.uri?t.resolvedUri=t.resolvedUri||xn(e.uri,t.uri):(t.uri=0===i?a:r,t.resolvedUri=t.uri),t.id=t.id||r,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))}),_a(e),Ta(e)},{EventTarget:Ea}=bn,Ca=(e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let r=t.mediaSequence+t.segments.length;if(e){const s=e.parts||[],n=Wn(t)-1;n>-1&&n!==s.length-1&&(i._HLS_part=n),(n>-1||s.length)&&r--}i._HLS_msn=r}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(i).length){const t=new s.a.URL(e);["_HLS_skip","_HLS_msn","_HLS_part"].forEach((function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])})),e=t.toString()}return e},xa=(e,t)=>{if(!e)return t;const i=An(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let r=0;r<t.parts.length;r++)e.parts&&e.parts[r]&&(i.parts[r]=An(e.parts[r],t.parts[r]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},ka=(e,t,i)=>{const r=e.slice(),s=t.slice();i=i||0;const n=[];let a;for(let o=0;o<s.length;o++){const e=r[o+i],t=s[o];e?(a=e.map||a,n.push(xa(e,t))):(a&&!t.map&&(t.map=a),n.push(t))}return n},Ia=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=xn(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=xn(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=xn(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=xn(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach(e=>{e.resolvedUri||(e.resolvedUri=xn(t,e.uri))}),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach(e=>{e.resolvedUri||(e.resolvedUri=xn(t,e.uri))})},Aa=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if("MAP"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},Oa=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Pa=(e,t,i=Oa)=>{const r=An(e,{}),s=r.playlists[t.id];if(!s)return null;if(i(s,t))return null;t.segments=Aa(t);const n=An(s,t);if(n.preloadSegment&&!t.preloadSegment&&delete n.preloadSegment,s.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}n.segments=ka(s.segments,t.segments,t.mediaSequence-s.mediaSequence)}n.segments.forEach(e=>{Ia(e,n.resolvedUri)});for(let a=0;a<r.playlists.length;a++)r.playlists[a].id===t.id&&(r.playlists[a]=n);return r.playlists[t.id]=n,r.playlists[t.uri]=n,va(e,(e,i,r,s)=>{if(e.playlists)for(let a=0;a<e.playlists.length;a++)t.id===e.playlists[a].id&&(e.playlists[a]=n)}),r},La=(e,t)=>{const i=e.segments||[],r=i[i.length-1],s=r&&r.parts&&r.parts[r.parts.length-1],n=s&&s.duration||r&&r.duration;return t&&n?1e3*n:500*(e.partTargetDuration||e.targetDuration||10)};class Da extends Ea{constructor(e,t,i={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=In("PlaylistLoader");const{withCredentials:r=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=r;const s=t.options_;this.customTagParsers=s&&s.customTagParsers||[],this.customTagMappers=s&&s.customTagMappers||[],this.llhls=s&&s.llhls,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_)}handleMediaupdatetimeout_(){if("HAVE_METADATA"!==this.state)return;const e=this.media();let t=xn(this.main.uri,e.uri);this.llhls&&(t=Ca(t,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials},(e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),"HAVE_METADATA"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})})}playlistRequestError(e,t,i){const{uri:r,id:s}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[s],status:e.status,message:`HLS playlist request error at URL: ${r}.`,responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")}parseManifest_({url:e,manifestString:t}){return ya({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls})}haveMetadata({playlistString:e,playlistObject:t,url:i,id:r}){this.request=null,this.state="HAVE_METADATA";const s=t||this.parseManifest_({url:i,manifestString:e});s.lastRequest=Date.now(),ba({playlist:s,uri:i,id:r});const n=Pa(this.main,s);this.targetDuration=s.partTargetDuration||s.targetDuration,this.pendingMedia_=null,n?(this.main=n,this.media_=this.main.playlists[r]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(La(this.media(),!!n)),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),s.a.clearTimeout(this.mediaUpdateTimeout),s.a.clearTimeout(this.finalRenditionTimeout),this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"===typeof e){if(!this.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.main.playlists[e]}if(s.a.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=s.a.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,r=!this.media_||e.id!==this.media_.id,n=this.main.playlists[e.id];if(n&&n.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(r&&(this.trigger("mediachanging"),"HAVE_MAIN_MANIFEST"===i?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(this.updateMediaUpdateTimeout_(La(e,!0)),r){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e,this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},(t,r)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=kn(e.resolvedUri,r),t)return this.playlistRequestError(this.request,e,i);this.haveMetadata({playlistString:r.responseText,url:e.uri,id:e.id}),"HAVE_MAIN_MANIFEST"===i?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}}pause(){this.mediaUpdateTimeout&&(s.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_MAIN_MANIFEST":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")}load(e){this.mediaUpdateTimeout&&(s.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=s.a.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},e)}else this.started?t&&!t.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(s.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=s.a.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(e)},e))}start(){if(this.started=!0,"object"===typeof this.src)return this.src.uri||(this.src.uri=s.a.location.href),this.src.resolvedUri=this.src.uri,void setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},(e,t)=>{if(!this.request)return;if(this.request=null,e)return this.error={status:t.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:t.responseText,code:2},"HAVE_NOTHING"===this.state&&(this.started=!1),this.trigger("error");this.src=kn(this.src,t);const i=this.parseManifest_({manifestString:t.responseText,url:this.src});this.setupInitialPlaylist(i)})}srcUri(){return"string"===typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state="HAVE_MAIN_MANIFEST",e.playlists)return this.main=e,wa(this.main,this.srcUri()),e.playlists.forEach(e=>{e.segments=Aa(e),e.segments.forEach(t=>{Ia(t,e.resolvedUri)})}),this.trigger("loadedplaylist"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||s.a.location.href;this.main=Sa(e,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}}const{xhr:Ma}=bn,Na=function(e,t,i,r){const s="arraybuffer"===e.responseType?e.response:e.responseText;!t&&s&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=s.byteLength||s.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(s||e.responseText)))),r(t,e)},Ra=function(){const e=function e(t,i){t=An({timeout:45e3},t);const r=e.beforeRequest||bn.Vhs.xhr.beforeRequest;if(r&&"function"===typeof r){const e=r(t);e&&(t=e)}const s=!0===bn.Vhs.xhr.original?Ma:bn.Vhs.xhr,n=s(t,(function(e,t){return Na(n,e,t,i)})),a=n.abort;return n.abort=function(){return n.aborted=!0,a.apply(n,arguments)},n.uri=t.uri,n.requestTime=Date.now(),n};return e.original=!0,e},Ua=function(e){let t;const i=e.offset;return t="bigint"===typeof e.offset||"bigint"===typeof e.length?s.a.BigInt(e.offset)+s.a.BigInt(e.length)-s.a.BigInt(1):e.offset+e.length-1,"bytes="+i+"-"+t},Ba=function(e){const t={};return e.byterange&&(t.Range=Ua(e.byterange)),t},ja=function(e,t){return e.start(t)+"-"+e.end(t)},Fa=function(e,t){const i=e.toString(16);return"00".substring(0,2-i.length)+i+(t%2?" ":"")},qa=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},$a=function(e){const t={};return Object.keys(e).forEach(i=>{const r=e[i];Object(T["e"])(r)?t[i]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:t[i]=r}),t},Ha=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},za=function(e){return e.resolvedUri},Va=e=>{const t=Array.prototype.slice.call(e),i=16;let r,s,n="";for(let a=0;a<t.length/i;a++)r=t.slice(a*i,a*i+i).map(Fa).join(""),s=t.slice(a*i,a*i+i).map(qa).join(""),n+=r+" "+s+"\n";return n},Ga=({bytes:e})=>Va(e),Wa=e=>{let t,i="";for(t=0;t<e.length;t++)i+=ja(e,t)+" ";return i};var Xa=Object.freeze({__proto__:null,createTransferableMessage:$a,initSegmentId:Ha,segmentKeyId:za,hexDump:Va,tagDump:Ga,textRanges:Wa});const Ya=.25,Ka=(e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,r=t.videoTimingInfo.transmuxedPresentationStart,s=r+i,n=e-s;return new Date(t.dateTimeObject.getTime()+1e3*n)},Ja=e=>e.transmuxedPresentationEnd-e.transmuxedPresentationStart-e.transmuxerPrependedSeconds,Qa=(e,t)=>{let i;try{i=new Date(e)}catch(l){return null}if(!t||!t.segments||0===t.segments.length)return null;let r=t.segments[0];if(i<r.dateTimeObject)return null;for(let d=0;d<t.segments.length-1;d++){r=t.segments[d];const e=t.segments[d+1].dateTimeObject;if(i<e)break}const s=t.segments[t.segments.length-1],n=s.dateTimeObject,a=s.videoTimingInfo?Ja(s.videoTimingInfo):s.duration+s.duration*Ya,o=new Date(n.getTime()+1e3*a);return i>o?null:(i>n&&(r=s),{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:fa.duration(t,t.mediaSequence+t.segments.indexOf(r)),type:r.videoTimingInfo?"accurate":"estimate"})},Za=(e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,r=0;for(let n=0;n<t.segments.length;n++)if(i=t.segments[n],r=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:r+i.duration,e<=r)break;const s=t.segments[t.segments.length-1];if(s.videoTimingInfo&&s.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>r){if(e>r+s.duration*Ya)return null;i=s}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:r-i.duration,type:i.videoTimingInfo?"accurate":"estimate"}},eo=(e,t)=>{let i,r;try{i=new Date(e),r=new Date(t)}catch(a){}const s=i.getTime(),n=r.getTime();return(n-s)/1e3},to=e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++){const i=e.segments[t];if(!i.dateTimeObject)return!1}return!0},io=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error("getProgramTime: callback must be provided");if(!e||void 0===t)return i({message:"getProgramTime: playlist and time must be provided"});const r=Za(t,e);if(!r)return i({message:"valid programTime was not found"});if("estimate"===r.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:r.estimatedStart});const s={mediaSeconds:t},n=Ka(t,r.segment);return n&&(s.programDateTime=n.toISOString()),i(null,s)},ro=({programTime:e,playlist:t,retryCount:i=2,seekTo:r,pauseAfterSeek:s=!0,tech:n,callback:a})=>{if(!a)throw new Error("seekToProgramTime: callback must be provided");if("undefined"===typeof e||!t||!r)return a({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!t.endList&&!n.hasStarted_)return a({message:"player must be playing a live stream to start buffering"});if(!to(t))return a({message:"programDateTime tags must be provided in the manifest "+t.resolvedUri});const o=Qa(e,t);if(!o)return a({message:e+" was not found in the stream"});const l=o.segment,d=eo(l.dateTimeObject,e);if("estimate"===o.type)return 0===i?a({message:e+" is not buffered yet. Try again"}):(r(o.estimatedStart+d),void n.one("seeked",()=>{ro({programTime:e,playlist:t,retryCount:i-1,seekTo:r,pauseAfterSeek:s,tech:n,callback:a})}));const u=l.start+d,c=()=>a(null,n.currentTime());n.one("seeked",c),s&&n.pause(),r(u)},so=(e,t)=>{if(4===e.readyState)return t()},no=(e,t,i)=>{let r,s=[],n=!1;const a=function(e,t,r,s){return t.abort(),n=!0,i(e,t,r,s)},o=function(e,t){if(n)return;if(e)return a(e,t,"",s);const i=t.responseText.substring(s&&s.byteLength||0,t.responseText.length);if(s=Object(T["d"])(s,Object(T["h"])(i,!0)),r=r||Object(C["a"])(s),s.length<10||r&&s.length<r+2)return so(t,()=>a(e,t,"",s));const o=Object(x["a"])(s);return"ts"===o&&s.length<188||!o&&s.length<376?so(t,()=>a(e,t,"",s)):a(null,t,o,s)},l={uri:e,beforeSend(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",(function({total:t,loaded:i}){return Na(e,null,{statusCode:e.status},o)}))}},d=t(l,(function(e,t){return Na(d,e,t,o)}));return d},{EventTarget:ao}=bn,oo=function(e,t){if(!Oa(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(let i=0;i<e.segments.length;i++){const r=e.segments[i],s=t.segments[i];if(r.uri!==s.uri)return!1;if(!r.byterange&&!s.byterange)continue;const n=r.byterange,a=s.byterange;if(n&&!a||!n&&a)return!1;if(n.offset!==a.offset||n.length!==a.length)return!1}return!0},lo=({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:r,previousManifest:s})=>{const n=Object(S["c"])(e,{manifestUri:t,clientOffset:i,sidxMapping:r,previousManifest:s});return wa(n,t),n},uo=(e,t,i)=>{let r=!0,s=An(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let n=0;n<t.playlists.length;n++){const e=t.playlists[n];if(e.sidx){const t=Object(S["b"])(e.sidx);i&&i[t]&&i[t].sidx&&Object(S["a"])(e,i[t].sidx,e.sidx.resolvedUri)}const a=Pa(s,e,oo);a&&(s=a,r=!1)}return va(t,(e,t,i,n)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Pa(s,e.playlists[0],oo);o&&(s=o,s.mediaGroups[t][i][n].playlists[0]=s.playlists[a],r=!1)}}),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(r=!1),r?null:s},co=(e,t)=>{const i=Boolean(!e.map&&!t.map),r=i||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length);return r&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length},ho=(e,t)=>{const i={};for(const r in e){const s=e[r],n=s.sidx;if(n){const e=Object(S["b"])(n);if(!t[e])break;const r=t[e].sidxInfo;co(r,n)&&(i[e]=t[e])}}return i},po=(e,t)=>{const i=ho(e.playlists,t);let r=i;return va(e,(e,i,s,n)=>{if(e.playlists&&e.playlists.length){const i=e.playlists;r=An(r,ho(i,t))}}),r};class fo extends ao{constructor(e,t,i={},r){super(),this.mainPlaylistLoader_=r||this,r||(this.isMain_=!0);const{withCredentials:s=!1}=i;if(this.vhs_=t,this.withCredentials=s,!e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",()=>{this.refreshXml_()}),this.on("mediaupdatetimeout",()=>{this.refreshMedia_(this.media().id)}),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=In("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error="object"!==typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2}:e,i&&(this.state=i),this.trigger("error"),!0):void 0)}addSidxSegments_(e,t,i){const r=e.sidx&&Object(S["b"])(e.sidx);if(!e.sidx||!r||this.mainPlaylistLoader_.sidxMapping_[r])return void(this.mediaRequest_=s.a.setTimeout(()=>i(!1),0));const n=kn(e.sidx.resolvedUri),a=(s,n)=>{if(this.requestErrored_(s,n,t))return;const a=this.mainPlaylistLoader_.sidxMapping_;let o;try{o=E()(Object(T["k"])(n.response).subarray(8))}catch(l){return void this.requestErrored_(l,n,t)}return a[r]={sidxInfo:e.sidx,sidx:o},Object(S["a"])(e,o,e.sidx.resolvedUri),i(!0)};this.request=no(n,this.vhs_.xhr,(t,i,r,s)=>{if(t)return a(t,i);if(!r||"mp4"!==r)return a({status:i.status,message:`Unsupported ${r||"unknown"} container type for sidx segment at URL: ${n}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i);const{offset:o,length:l}=e.sidx.byterange;if(s.length>=l+o)return a(t,{response:s.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:n,responseType:"arraybuffer",headers:Ba({byterange:e.sidx.byterange})},a)})}dispose(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},s.a.clearTimeout(this.minimumUpdatePeriodTimeout_),s.a.clearTimeout(this.mediaRequest_),s.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);const t=this.state;if("string"===typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(i&&(this.trigger("mediachanging"),this.trigger("mediachange")));i&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,t,i=>{this.haveMetadata({startingState:t,playlist:e})}))}haveMetadata({startingState:e,playlist:t}){this.state="HAVE_METADATA",this.loadedPlaylists_[t.id]=t,this.mediaRequest_=null,this.refreshMedia_(t.id),"HAVE_MAIN_MANIFEST"===e?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),s.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(s.a.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)}load(e){s.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=s.a.setTimeout(()=>this.load(),e)}else this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()}start(){this.started=!0,this.isMain_?this.requestMain_((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}):this.mediaRequest_=s.a.setTimeout(()=>this.haveMain_(),0)}requestMain_(e){this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},(t,i)=>{if(this.requestErrored_(t,i))return void("HAVE_NOTHING"===this.state&&(this.started=!1));const r=i.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=i.responseText,i.responseHeaders&&i.responseHeaders.date?this.mainLoaded_=Date.parse(i.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=kn(this.mainPlaylistLoader_.srcUrl,i),r?(this.handleMain_(),void this.syncClientServerClock_(()=>e(i,r))):e(i,r)})}syncClientServerClock_(e){const t=Object(S["d"])(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):"DIRECT"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:xn(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials},(i,r)=>{if(!this.request)return;if(i)return this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e();let s;s="HEAD"===t.method?r.responseHeaders&&r.responseHeaders.date?Date.parse(r.responseHeaders.date):this.mainLoaded_:Date.parse(r.responseText),this.mainPlaylistLoader_.clientOffset_=s-Date.now(),e()}))}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main;let t=lo({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e});e&&(t=uo(e,t,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=t||e;const i=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];return i&&i!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=i),(!e||t&&t.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(t)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(s.a.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.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)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=s.a.setTimeout(()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=po(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,e=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(e){if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=s.a.setTimeout(()=>{this.trigger("mediaupdatetimeout"),e()},La(this.media(),Boolean(i))))};e()}this.trigger("loadedplaylist")}}var mo={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const go=e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer},yo=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},vo=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}},bo=function(e){return function(){const t=vo(e),i=yo(new Worker(t));i.objURL=t;const r=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),r.call(this)},i}},_o=function(e){return`var browserWorkerPolyFill = ${yo.toString()};\nbrowserWorkerPolyFill(self);\n`+e},To=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},So=_o(To((function(){var t="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},i=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var r;return!!e[t]&&(r=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(r,1),r>-1)},this.trigger=function(t){var i,r,s,n;if(i=e[t],i)if(2===arguments.length)for(s=i.length,r=0;r<s;++r)i[r].call(this,arguments[1]);else{for(n=[],r=arguments.length,r=1;r<arguments.length;++r)n.push(arguments[r]);for(s=i.length,r=0;r<s;++r)i[r].apply(this,n)}},this.dispose=function(){e={}}}};i.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},i.prototype.push=function(e){this.trigger("data",e)},i.prototype.flush=function(e){this.trigger("done",e)},i.prototype.partialFlush=function(e){this.trigger("partialdone",e)},i.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},i.prototype.reset=function(e){this.trigger("reset",e)};var r,s,n,a,o,l,d,u,c,h,p,f,m,g,y,v,b,_,T,S,w,E,C,x,k,I,A,O,P,L,D,M,N,R,U,B,j=i,F=Math.pow(2,32),q=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0),t<Number.MAX_SAFE_INTEGER?Number(t):t):i.getUint32(0)*F+i.getUint32(4)},$={getUint64:q,MAX_UINT32:F},H=$.MAX_UINT32;(function(){var e;if(C={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!==typeof Uint8Array){for(e in C)C.hasOwnProperty(e)&&(C[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);x=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),I=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),k=new Uint8Array([0,0,0,1]),A=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),O=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),P={video:A,audio:O},M=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),N=new Uint8Array([0,0,0,0,0,0,0,0]),R=N,U=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),B=N,L=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),r=function(e){var t,i,r,s=[],n=0;for(t=1;t<arguments.length;t++)s.push(arguments[t]);t=s.length;while(t--)n+=s[t].byteLength;for(i=new Uint8Array(n+8),r=new DataView(i.buffer,i.byteOffset,i.byteLength),r.setUint32(0,i.byteLength),i.set(e,4),t=0,n=8;t<s.length;t++)i.set(s[t],n),n+=s[t].byteLength;return i},s=function(){return r(C.dinf,r(C.dref,M))},n=function(e){return r(C.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},a=function(){return r(C.ftyp,x,k,x,I)},v=function(e){return r(C.hdlr,P[e])},o=function(e){return r(C.mdat,e)},y=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),r(C.mdhd,t)},g=function(e){return r(C.mdia,y(e),v(e.type),d(e))},l=function(e){return r(C.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},d=function(e){return r(C.minf,"video"===e.type?r(C.vmhd,L):r(C.smhd,D),s(),_(e))},u=function(e,t){var i=[],s=t.length;while(s--)i[s]=S(t[s]);return r.apply(null,[C.moof,l(e)].concat(i))},c=function(e){var t=e.length,i=[];while(t--)i[t]=f(e[t]);return r.apply(null,[C.moov,p(4294967295)].concat(i).concat(h(e)))},h=function(e){var t=e.length,i=[];while(t--)i[t]=w(e[t]);return r.apply(null,[C.mvex].concat(i))},p=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 r(C.mvhd,t)},b=function(e){var t,i,s=e.samples||[],n=new Uint8Array(4+s.length);for(i=0;i<s.length;i++)t=s[i].flags,n[i+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return r(C.sdtp,n)},_=function(e){return r(C.stbl,T(e),r(C.stts,B),r(C.stsc,R),r(C.stsz,U),r(C.stco,N))},function(){var e,t;T=function(i){return r(C.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===i.type?e(i):t(i))},e=function(e){var t,i,s=e.sps||[],n=e.pps||[],a=[],o=[];for(t=0;t<s.length;t++)a.push((65280&s[t].byteLength)>>>8),a.push(255&s[t].byteLength),a=a.concat(Array.prototype.slice.call(s[t]));for(t=0;t<n.length;t++)o.push((65280&n[t].byteLength)>>>8),o.push(255&n[t].byteLength),o=o.concat(Array.prototype.slice.call(n[t]));if(i=[C.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]),r(C.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([s.length],a,[n.length],o))),r(C.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],d=e.sarRatio[1];i.push(r(C.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&d)>>24,(16711680&d)>>16,(65280&d)>>8,255&d])))}return r.apply(null,i)},t=function(e){return r(C.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]),n(e))}}(),m=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 r(C.tkhd,t)},S=function(e){var t,i,s,n,a,o,l;return t=r(C.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])),o=Math.floor(e.baseMediaDecodeTime/H),l=Math.floor(e.baseMediaDecodeTime%H),i=r(C.tfdt,new Uint8Array([1,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o,l>>>24&255,l>>>16&255,l>>>8&255,255&l])),a=92,"audio"===e.type?(s=E(e,a),r(C.traf,t,i,s)):(n=b(e),s=E(e,n.length+a),r(C.traf,t,i,s,n))},f=function(e){return e.duration=e.duration||4294967295,r(C.trak,m(e),g(e))},w=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),r(C.trex,t)},function(){var e,t,i;i=function(e,t){var i=0,r=0,s=0,n=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(r=2),void 0!==e[0].flags&&(s=4),void 0!==e[0].compositionTimeOffset&&(n=8)),[0,0,i|r|s|n,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]},t=function(e,t){var s,n,a,o,l,d;for(o=e.samples||[],t+=20+16*o.length,a=i(o,t),n=new Uint8Array(a.length+16*o.length),n.set(a),s=a.length,d=0;d<o.length;d++)l=o[d],n[s++]=(4278190080&l.duration)>>>24,n[s++]=(16711680&l.duration)>>>16,n[s++]=(65280&l.duration)>>>8,n[s++]=255&l.duration,n[s++]=(4278190080&l.size)>>>24,n[s++]=(16711680&l.size)>>>16,n[s++]=(65280&l.size)>>>8,n[s++]=255&l.size,n[s++]=l.flags.isLeading<<2|l.flags.dependsOn,n[s++]=l.flags.isDependedOn<<6|l.flags.hasRedundancy<<4|l.flags.paddingValue<<1|l.flags.isNonSyncSample,n[s++]=61440&l.flags.degradationPriority,n[s++]=15&l.flags.degradationPriority,n[s++]=(4278190080&l.compositionTimeOffset)>>>24,n[s++]=(16711680&l.compositionTimeOffset)>>>16,n[s++]=(65280&l.compositionTimeOffset)>>>8,n[s++]=255&l.compositionTimeOffset;return r(C.trun,n)},e=function(e,t){var s,n,a,o,l,d;for(o=e.samples||[],t+=20+8*o.length,a=i(o,t),s=new Uint8Array(a.length+8*o.length),s.set(a),n=a.length,d=0;d<o.length;d++)l=o[d],s[n++]=(4278190080&l.duration)>>>24,s[n++]=(16711680&l.duration)>>>16,s[n++]=(65280&l.duration)>>>8,s[n++]=255&l.duration,s[n++]=(4278190080&l.size)>>>24,s[n++]=(16711680&l.size)>>>16,s[n++]=(65280&l.size)>>>8,s[n++]=255&l.size;return r(C.trun,s)},E=function(i,r){return"audio"===i.type?e(i,r):t(i,r)}}();var z,V,G,W,X,Y,K,J,Q={ftyp:a,mdat:o,moof:u,moov:c,initSegment:function(e){var t,i=a(),r=c(e);return t=new Uint8Array(i.byteLength+r.byteLength),t.set(i),t.set(r,i.byteLength),t}},Z=function(e){var t,i,r=[],s=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,r.byteLength=0,t=0;t<e.length;t++)i=e[t],"access_unit_delimiter_rbsp"===i.nalUnitType?(r.length&&(r.duration=i.dts-r.dts,s.byteLength+=r.byteLength,s.nalCount+=r.length,s.duration+=r.duration,s.push(r)),r=[i],r.byteLength=i.data.byteLength,r.pts=i.pts,r.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(r.keyFrame=!0),r.duration=i.dts-r.dts,r.byteLength+=i.data.byteLength,r.push(i));return s.length&&(!r.duration||r.duration<=0)&&(r.duration=s[s.length-1].duration),s.byteLength+=r.byteLength,s.nalCount+=r.length,s.duration+=r.duration,s.push(r),s},ee=function(e){var t,i,r=[],s=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,t=0;t<e.length;t++)i=e[t],i.keyFrame?(r.length&&(s.push(r),s.byteLength+=r.byteLength,s.nalCount+=r.nalCount,s.duration+=r.duration),r=[i],r.nalCount=i.length,r.byteLength=i.byteLength,r.pts=i.pts,r.dts=i.dts,r.duration=i.duration):(r.duration+=i.duration,r.nalCount+=i.length,r.byteLength+=i.byteLength,r.push(i));return s.length&&r.duration<=0&&(r.duration=s[s.length-1].duration),s.byteLength+=r.byteLength,s.nalCount+=r.nalCount,s.duration+=r.duration,s.push(r),s},te=function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(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},ie=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},re=function(e,t){var i=ie();return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},se=function(e,t){var i,r,s,n,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(n=e[i],r=0;r<n.length;r++)a=n[r],s=re(a,o),o+=s.size,l.push(s);return l},ne=function(e){var t,i,r,s,n,a,o=0,l=e.byteLength,d=e.nalCount,u=l+4*d,c=new Uint8Array(u),h=new DataView(c.buffer);for(t=0;t<e.length;t++)for(s=e[t],i=0;i<s.length;i++)for(n=s[i],r=0;r<n.length;r++)a=n[r],h.setUint32(o,a.data.byteLength),o+=4,c.set(a.data,o),o+=a.data.byteLength;return c},ae=function(e,t){var i,r=t||0,s=[];return i=re(e,r),s.push(i),s},oe=function(e){var t,i,r=0,s=e.byteLength,n=e.length,a=s+4*n,o=new Uint8Array(a),l=new DataView(o.buffer);for(t=0;t<e.length;t++)i=e[t],l.setUint32(r,i.data.byteLength),r+=4,o.set(i.data,r),r+=i.data.byteLength;return o},le={groupNalsIntoFrames:Z,groupFramesIntoGops:ee,extendFirstKeyFrame:te,generateSampleTable:se,concatenateNalData:ne,generateSampleTableForFrame:ae,concatenateNalDataForFrame:oe},de=[33,16,5,32,164,27],ue=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ce=function(e){var t=[];while(e--)t.push(0);return t},he=function(e){return Object.keys(e).reduce((function(t,i){return t[i]=new Uint8Array(e[i].reduce((function(e,t){return e.concat(t)}),[])),t}),{})},pe=function(){if(!z){var e={96e3:[de,[227,64],ce(154),[56]],88200:[de,[231],ce(170),[56]],64e3:[de,[248,192],ce(240),[56]],48e3:[de,[255,192],ce(268),[55,148,128],ce(54),[112]],44100:[de,[255,192],ce(268),[55,163,128],ce(84),[112]],32e3:[de,[255,192],ce(268),[55,234],ce(226),[112]],24e3:[de,[255,192],ce(268),[55,255,128],ce(268),[111,112],ce(126),[224]],16e3:[de,[255,192],ce(268),[55,255,128],ce(268),[111,255],ce(269),[223,108],ce(195),[1,192]],12e3:[ue,ce(268),[3,127,248],ce(268),[6,255,240],ce(268),[13,255,224],ce(268),[27,253,128],ce(259),[56]],11025:[ue,ce(268),[3,127,248],ce(268),[6,255,240],ce(268),[13,255,224],ce(268),[27,255,192],ce(268),[55,175,128],ce(108),[112]],8e3:[ue,ce(268),[3,121,16],ce(47),[7]]};z=he(e)}return z},fe=9e4;V=function(e){return e*fe},G=function(e,t){return e*t},W=function(e){return e/fe},X=function(e,t){return e/t},Y=function(e,t){return V(X(e,t))},K=function(e,t){return G(W(e),t)},J=function(e,t,i){return W(i?e:e-t)};var me={ONE_SECOND_IN_TS:fe,secondsToVideoTs:V,secondsToAudioTs:G,videoTsToSeconds:W,audioTsToSeconds:X,audioTsToVideoTs:Y,videoTsToAudioTs:K,metadataTsToSeconds:J},ge=pe,ye=me,ve=function(e){var t,i,r=0;for(t=0;t<e.length;t++)i=e[t],r+=i.data.byteLength;return r},be=function(e,t,i,r){var s,n,a,o,l=0,d=0,u=0,c=0;if(t.length&&(s=ye.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),l=Math.ceil(ye.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&r&&(d=s-Math.max(i,r),u=Math.floor(d/l),c=u*l),!(u<1||c>ye.ONE_SECOND_IN_TS/2))){for(n=ge()[e.samplerate],n||(n=t[0].data),a=0;a<u;a++)o=t[0],t.splice(0,0,{data:n,dts:o.dts-l,pts:o.pts-l});return e.baseMediaDecodeTime-=Math.floor(ye.videoTsToAudioTs(c,e.samplerate)),c}},_e=function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},Te=function(e){var t,i,r=[];for(t=0;t<e.length;t++)i=e[t],r.push({size:i.data.byteLength,duration:1024});return r},Se=function(e){var t,i,r=0,s=new Uint8Array(ve(e));for(t=0;t<e.length;t++)i=e[t],s.set(i.data,r),r+=i.data.byteLength;return s},we={prefixWithSilence:be,trimAdtsFramesByEarliestDts:_e,generateSampleTable:Te,concatenateFrameData:Se},Ee=me.ONE_SECOND_IN_TS,Ce=function(e,t){"number"===typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"===typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},xe=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},ke=function(e,t){var i,r,s=e.minSegmentDts;return t||(s-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=s,i=Math.max(0,i),"audio"===e.type&&(r=e.samplerate/Ee,i*=r,i=Math.floor(i)),i},Ie={clearDtsInfo:xe,calculateTrackBaseMediaDecodeTime:ke,collectDtsInfo:Ce},Ae=4,Oe=128,Pe=function(e){var t=0,i={payloadType:-1,payloadSize:0},r=0,s=0;while(t<e.byteLength){if(e[t]===Oe)break;while(255===e[t])r+=255,t++;r+=e[t++];while(255===e[t])s+=255,t++;if(s+=e[t++],!i.payload&&r===Ae){var n=String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6]);if("GA94"===n){i.payloadType=r,i.payloadSize=s,i.payload=e.subarray(t,t+s);break}i.payload=void 0}t+=s,r=0,s=0}return i},Le=function(e){return 181!==e.payload[0]||49!==(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},De=function(e,t){var i,r,s,n,a=[];if(!(64&t[0]))return a;for(r=31&t[0],i=0;i<r;i++)s=3*i,n={type:3&t[s+2],pts:e},4&t[s+2]&&(n.ccData=t[s+3]<<8|t[s+4],a.push(n));return a},Me=function(e){var t,i,r=e.byteLength,s=[],n=1;while(n<r-2)0===e[n]&&0===e[n+1]&&3===e[n+2]?(s.push(n+2),n+=2):n++;if(0===s.length)return e;t=r-s.length,i=new Uint8Array(t);var a=0;for(n=0;n<t;a++,n++)a===s[0]&&(a++,s.shift()),i[n]=e[a];return i},Ne={parseSei:Pe,parseUserData:Le,parseCaptionPackets:De,discardEmulationPreventionBytes:Me,USER_DATA_REGISTERED_ITU_T_T35:Ae},Re=j,Ue=Ne,Be=function(e){e=e||{},Be.prototype.init.call(this),this.parse708captions_="boolean"!==typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ke(0,0),new Ke(0,1),new Ke(1,0),new Ke(1,1)],this.parse708captions_&&(this.cc708Stream_=new ze({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))}),this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};Be.prototype=new Re,Be.prototype.push=function(e){var t,i,r;if("sei_rbsp"===e.nalUnitType&&(t=Ue.parseSei(e.escapedRBSP),t.payload&&t.payloadType===Ue.USER_DATA_REGISTERED_ITU_T_T35&&(i=Ue.parseUserData(t),i)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));r=Ue.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(r),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},Be.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},Be.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},Be.prototype.flush=function(){return this.flushStream("flush")},Be.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Be.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},Be.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},Be.prototype.setsChannel1Active=function(e){return 4096===(30720&e.ccData)},Be.prototype.setsChannel2Active=function(e){return 6144===(30720&e.ccData)},Be.prototype.setsTextOrXDSActive=function(e){return 256===(28928&e.ccData)||4138===(30974&e.ccData)||6186===(30974&e.ccData)},Be.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var je={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Fe=function(e){var t=je[e]||e;return 4096&e&&e===t?"":String.fromCharCode(t)},qe=function(e){return 32<=e&&e<=127||160<=e&&e<=255},$e=function(e){this.windowNum=e,this.reset()};$e.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},$e.prototype.getText=function(){return this.rows.join("\n")},$e.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},$e.prototype.newLine=function(e){this.rows.length>=this.virtualRowCount&&"function"===typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);while(this.rows.length>this.virtualRowCount)this.rows.shift(),this.rowIdx--},$e.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},$e.prototype.addText=function(e){this.rows[this.rowIdx]+=e},$e.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var He=function(e,t,i){this.serviceNum=e,this.text="",this.currentWindow=new $e(-1),this.windows=[],this.stream=i,"string"===typeof t&&this.createTextDecoder(t)};He.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new $e(i),"function"===typeof t&&(this.windows[i].beforeRowOverflow=t)},He.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},He.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 ze=function(e){e=e||{},ze.prototype.init.call(this);var t,i=this,r=e.captionServices||{},s={};Object.keys(r).forEach(e=>{t=r[e],/^SERVICE/.test(e)&&(s[e]=t.encoding)}),this.serviceEncodings=s,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};ze.prototype=new Re,ze.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},ze.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,r=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(r)},ze.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,r=null,s=0,n=t[s++];for(e.seq=n>>6,e.sizeCode=63&n;s<t.length;s++)n=t[s++],i=n>>5,r=31&n,7===i&&r>0&&(n=t[s++],i=n),this.pushServiceBlock(i,s,r),r>0&&(s+=r-1)},ze.prototype.pushServiceBlock=function(e,t,i){var r,s=t,n=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,s));s<t+i&&s<n.length;s++)r=n[s],qe(r)?s=this.handleText(s,a):24===r?s=this.multiByteCharacter(s,a):16===r?s=this.extendedCommands(s,a):128<=r&&r<=135?s=this.setCurrentWindow(s,a):152<=r&&r<=159?s=this.defineWindow(s,a):136===r?s=this.clearWindows(s,a):140===r?s=this.deleteWindows(s,a):137===r?s=this.displayWindows(s,a):138===r?s=this.hideWindows(s,a):139===r?s=this.toggleWindows(s,a):151===r?s=this.setWindowAttributes(s,a):144===r?s=this.setPenAttributes(s,a):145===r?s=this.setPenColor(s,a):146===r?s=this.setPenLocation(s,a):143===r?a=this.reset(s,a):8===r?a.currentWindow.backspace():12===r?a.currentWindow.clearText():13===r?a.currentWindow.pendingNewLine=!0:14===r?a.currentWindow.clearText():141===r&&s++},ze.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data,r=i[++e];return qe(r)&&(e=this.handleText(e,t,{isExtended:!0})),e},ze.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},ze.prototype.initService=function(e,t){var i,r="SERVICE"+e,s=this;return r in this.serviceEncodings&&(i=this.serviceEncodings[r]),this.services[e]=new He(e,i,s),this.services[e].init(this.getPts(t),(function(t){s.flushDisplayed(t,s.services[e])})),this.services[e]},ze.prototype.handleText=function(e,t,i){var r,s,n=i&&i.isExtended,a=i&&i.isMultiByte,o=this.current708Packet.data,l=n?4096:0,d=o[e],u=o[e+1],c=t.currentWindow;return t.textDecoder_&&!n?(a?(s=[d,u],e++):s=[d],r=t.textDecoder_.decode(new Uint8Array(s))):r=Fe(l|d),c.pendingNewLine&&!c.isEmpty()&&c.newLine(this.getPts(e)),c.pendingNewLine=!1,c.addText(r),e},ze.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,r=i[e+1],s=i[e+2];return qe(r)&&qe(s)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},ze.prototype.setCurrentWindow=function(e,t){var i=this.current708Packet.data,r=i[e],s=7&r;return t.setCurrentWindow(s),e},ze.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,r=i[e],s=7&r;t.setCurrentWindow(s);var n=t.currentWindow;return r=i[++e],n.visible=(32&r)>>5,n.rowLock=(16&r)>>4,n.columnLock=(8&r)>>3,n.priority=7&r,r=i[++e],n.relativePositioning=(128&r)>>7,n.anchorVertical=127&r,r=i[++e],n.anchorHorizontal=r,r=i[++e],n.anchorPoint=(240&r)>>4,n.rowCount=15&r,r=i[++e],n.columnCount=63&r,r=i[++e],n.windowStyle=(56&r)>>3,n.penStyle=7&r,n.virtualRowCount=n.rowCount+1,e},ze.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,r=i[e],s=t.currentWindow.winAttr;return r=i[++e],s.fillOpacity=(192&r)>>6,s.fillRed=(48&r)>>4,s.fillGreen=(12&r)>>2,s.fillBlue=3&r,r=i[++e],s.borderType=(192&r)>>6,s.borderRed=(48&r)>>4,s.borderGreen=(12&r)>>2,s.borderBlue=3&r,r=i[++e],s.borderType+=(128&r)>>5,s.wordWrap=(64&r)>>6,s.printDirection=(48&r)>>4,s.scrollDirection=(12&r)>>2,s.justify=3&r,r=i[++e],s.effectSpeed=(240&r)>>4,s.effectDirection=(12&r)>>2,s.displayEffect=3&r,e},ze.prototype.flushDisplayed=function(e,t){for(var i=[],r=0;r<8;r++)t.windows[r].visible&&!t.windows[r].isEmpty()&&i.push(t.windows[r].getText());t.endPts=e,t.text=i.join("\n\n"),this.pushCaption(t),t.startPts=e},ze.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)},ze.prototype.displayWindows=function(e,t){var i=this.current708Packet.data,r=i[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)r&1<<n&&(t.windows[n].visible=1);return e},ze.prototype.hideWindows=function(e,t){var i=this.current708Packet.data,r=i[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)r&1<<n&&(t.windows[n].visible=0);return e},ze.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data,r=i[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)r&1<<n&&(t.windows[n].visible^=1);return e},ze.prototype.clearWindows=function(e,t){var i=this.current708Packet.data,r=i[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)r&1<<n&&t.windows[n].clearText();return e},ze.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data,r=i[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)r&1<<n&&t.windows[n].reset();return e},ze.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,r=i[e],s=t.currentWindow.penAttr;return r=i[++e],s.textTag=(240&r)>>4,s.offset=(12&r)>>2,s.penSize=3&r,r=i[++e],s.italics=(128&r)>>7,s.underline=(64&r)>>6,s.edgeType=(56&r)>>3,s.fontStyle=7&r,e},ze.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,r=i[e],s=t.currentWindow.penColor;return r=i[++e],s.fgOpacity=(192&r)>>6,s.fgRed=(48&r)>>4,s.fgGreen=(12&r)>>2,s.fgBlue=3&r,r=i[++e],s.bgOpacity=(192&r)>>6,s.bgRed=(48&r)>>4,s.bgGreen=(12&r)>>2,s.bgBlue=3&r,r=i[++e],s.edgeRed=(48&r)>>4,s.edgeGreen=(12&r)>>2,s.edgeBlue=3&r,e},ze.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,r=i[e],s=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,r=i[++e],s.row=15&r,r=i[++e],s.column=63&r,e},ze.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Ve={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},Ge=function(e){return null===e?"":(e=Ve[e]||e,String.fromCharCode(e))},We=14,Xe=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Ye=function(){var e=[],t=We+1;while(t--)e.push("");return e},Ke=function(e,t){Ke.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,r,s,n;if(t=32639&e.ccData,t!==this.lastControlCode_){if(4096===(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),r=t>>>8,s=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),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,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_=Ye();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Ye();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=Ye()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(r,s))r=(3&r)<<8,n=Ge(r|s),this[this.mode_](e.pts,n),this.column_++;else if(this.isExtCharacter(r,s))"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),r=(3&r)<<8,n=Ge(r|s),this[this.mode_](e.pts,n),this.column_++;else if(this.isMidRowCode(r,s))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14===(14&s)&&this.addFormatting(e.pts,["i"]),1===(1&s)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(r,s))this.column_+=3&s;else if(this.isPAC(r,s)){var a=Xe.indexOf(7968&t);"rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&(this.clearFormatting(e.pts),this.row_=a),1&s&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16===(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(s)&&14===(14&s)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(r)&&(0===s&&(s=null),n=Ge(r),n+=Ge(s),this[this.mode_](e.pts,n),this.column_+=n.length)}else this.lastControlCode_=null}};Ke.prototype=new Re,Ke.prototype.flushDisplayed=function(e){var t=this.displayed_.map((function(e,t){try{return e.trim()}catch(i){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_})},Ke.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Ye(),this.nonDisplayed_=Ye(),this.lastControlCode_=null,this.column_=0,this.row_=We,this.rollUpRows_=2,this.formatting_=[]},Ke.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_},Ke.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ke.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ke.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ke.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ke.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ke.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ke.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ke.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=We,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=Ye(),this.displayed_=Ye()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ke.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce((function(e,t){return e+"<"+t+">"}),"");this[this.mode_](e,i)},Ke.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+"</"+t+">"}),"");this.formatting_=[],this[this.mode_](e,t)}},Ke.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_];i+=t,this.nonDisplayed_[this.row_]=i},Ke.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i},Ke.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.row_+1;e<We+1;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},Ke.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i};var Je={CaptionStream:Be,Cea608Stream:Ke,Cea708Stream:ze},Qe={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ze=j,et=8589934592,tt=4294967296,it="shared",rt=function(e,t){var i=1;e>t&&(i=-1);while(Math.abs(t-e)>tt)e+=i*et;return e},st=function(e){var t,i;st.prototype.init.call(this),this.type_=e||it,this.push=function(e){this.type_!==it&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=rt(e.dts,i),e.pts=rt(e.pts,i),t=e.dts,this.trigger("data",e))},this.flush=function(){i=t,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};st.prototype=new Ze;var nt,at={TimestampRolloverStream:st,handleRollover:rt},ot=(e,t,i)=>{if(!e)return-1;for(var r=i;r<e.length;r++)if(e[r]===t)return r;return-1},lt={typedArrayIndexOf:ot},dt=j,ut=Qe,ct=lt.typedArrayIndexOf,ht={Iso88591:0,Utf16:1,Utf16be:2,Utf8:3},pt=function(e,t,i){var r,s="";for(r=t;r<i;r++)s+="%"+("00"+e[r].toString(16)).slice(-2);return s},ft=function(e,t,i){return decodeURIComponent(pt(e,t,i))},mt=function(e,t,i){return unescape(pt(e,t,i))},gt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},yt={APIC:function(e){var t,i,r=1,s="--\x3e";e.data[0]===ht.Utf8&&(t=ct(e.data,0,r),t<0||(e.mimeType=mt(e.data,r,t),r=t+1,e.pictureType=e.data[r],r++,i=ct(e.data,0,r),i<0||(e.description=ft(e.data,r,i),r=i+1,e.mimeType===s?e.url=mt(e.data,r,e.data.length):e.pictureData=e.data.subarray(r,e.data.length))))},"T*":function(e){e.data[0]===ht.Utf8&&(e.value=ft(e.data,1,e.data.length).replace(/\0*$/,""),e.values=e.value.split("\0"))},TXXX:function(e){var t;e.data[0]===ht.Utf8&&(t=ct(e.data,0,1),-1!==t&&(e.description=ft(e.data,1,t),e.value=ft(e.data,t+1,e.data.length).replace(/\0*$/,""),e.data=e.value))},"W*":function(e){e.url=mt(e.data,0,e.data.length).replace(/\0.*$/,"")},WXXX:function(e){var t;e.data[0]===ht.Utf8&&(t=ct(e.data,0,1),-1!==t&&(e.description=ft(e.data,1,t),e.url=mt(e.data,t+1,e.data.length).replace(/\0.*$/,"")))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=mt(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};nt=function(e){var t,i={descriptor:e&&e.descriptor},r=0,s=[],n=0;if(nt.prototype.init.call(this),this.dispatchType=ut.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=("00"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l,d;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(n=0,s.length=0),0===s.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});else if(s.push(e),n+=e.data.byteLength,1===s.length&&(r=gt(e.data.subarray(6,10)),r+=10),!(n<r)){for(t={data:new Uint8Array(r),frames:[],pts:s[0].pts,dts:s[0].dts},l=0;l<r;)t.data.set(s[0].data.subarray(0,r-l),l),l+=s[0].data.byteLength,n-=s[0].data.byteLength,s.shift();i=10,64&t.data[5]&&(i+=4,i+=gt(t.data.subarray(10,14)),r-=gt(t.data.subarray(16,20)));do{if(a=gt(t.data.subarray(i+4,i+8)),a<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(d=String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),o={id:d,data:t.data.subarray(i+10,i+a+10)},o.key=o.id,yt[o.id]?yt[o.id](o):"T"===o.id[0]?yt["T*"](o):"W"===o.id[0]&&yt["W*"](o),"com.apple.streaming.transportStreamTimestamp"===o.owner){var u=o.data,c=(1&u[3])<<30|u[4]<<22|u[5]<<14|u[6]<<6|u[7]>>>2;c*=4,c+=3&u[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),i+=10,i+=a}while(i<r);this.trigger("data",t)}}},nt.prototype=new dt;var vt,bt,_t,Tt=nt,St=j,wt=Je,Et=Qe,Ct=at.TimestampRolloverStream,xt=188,kt=71;vt=function(){var e=new Uint8Array(xt),t=0;vt.prototype.init.call(this),this.push=function(i){var r,s=0,n=xt;t?(r=new Uint8Array(i.byteLength+t),r.set(e.subarray(0,t)),r.set(i,t),t=0):r=i;while(n<r.byteLength)r[s]!==kt||r[n]!==kt?(s++,n++):(this.trigger("data",r.subarray(s,n)),s+=xt,n+=xt);s<r.byteLength&&(e.set(r.subarray(s),0),t=r.byteLength-s)},this.flush=function(){t===xt&&e[0]===kt&&(this.trigger("data",e),t=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){t=0,this.trigger("reset")}},vt.prototype=new St,bt=function(){var e,t,i,r;bt.prototype.init.call(this),r=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,r){var s=0;r.payloadUnitStartIndicator&&(s+=e[s]+1),"pat"===r.type?t(e.subarray(s),r):i(e.subarray(s),r)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],r.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=r.pmtPid},i=function(e,t){var i,s,n,a;if(1&e[5]){r.programMapTable={video:null,audio:null,"timed-metadata":{}},i=(15&e[1])<<8|e[2],s=3+i-4,n=(15&e[10])<<8|e[11],a=12+n;while(a<s){var o=e[a],l=(31&e[a+1])<<8|e[a+2];o===Et.H264_STREAM_TYPE&&null===r.programMapTable.video?r.programMapTable.video=l:o===Et.ADTS_STREAM_TYPE&&null===r.programMapTable.audio?r.programMapTable.audio=l:o===Et.METADATA_STREAM_TYPE&&(r.programMapTable["timed-metadata"][l]=o),a+=5+((15&e[a+3])<<8|e[a+4])}t.programMapTable=r.programMapTable}},this.push=function(t){var i={},r=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(r+=t[r]+1),0===i.pid)i.type="pat",e(t.subarray(r),i),this.trigger("data",i);else if(i.pid===this.pmtPid){i.type="pmt",e(t.subarray(r),i),this.trigger("data",i);while(this.packetsWaitingForPmt.length)this.processPes_.apply(this,this.packetsWaitingForPmt.shift())}else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,r,i]):this.processPes_(t,r,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Et.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Et.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=e.subarray(t),this.trigger("data",i)}},bt.prototype=new St,bt.STREAM_TYPES={h264:27,adts:15},_t=function(){var e,t=this,i=!1,r={data:[],size:0},s={data:[],size:0},n={data:[],size:0},a=function(e,t){var i;const r=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===r&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=0!==(4&e[6]),i=e[7],192&i&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))},o=function(e,i,r){var s,n=new Uint8Array(e.size),o={type:i},l=0,d=0,u=!1;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)s=e.data[l],n.set(s.data,d),d+=s.data.byteLength;a(n,o),u="video"===i||o.packetLength<=e.size,(r||u)&&(e.size=0,e.data.length=0),u&&t.trigger("data",o)}};_t.prototype.init.call(this),this.push=function(a){({pat:function(){},pes:function(){var e,t;switch(a.streamType){case Et.H264_STREAM_TYPE:e=r,t="video";break;case Et.ADTS_STREAM_TYPE:e=s,t="audio";break;case Et.METADATA_STREAM_TYPE:e=n,t="timed-metadata";break;default:return}a.payloadUnitStartIndicator&&o(e,t,!0),e.data.push(a),e.size+=a.data.byteLength},pmt:function(){var r={type:"metadata",tracks:[]};e=a.programMapTable,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"}),i=!0,t.trigger("data",r)}})[a.type]()},this.reset=function(){r.size=0,r.data.length=0,s.size=0,s.data.length=0,this.trigger("reset")},this.flushStreams_=function(){o(r,"video"),o(s,"audio"),o(n,"timed-metadata")},this.flush=function(){if(!i&&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)}i=!1,this.flushStreams_(),this.trigger("done")}},_t.prototype=new St;var It={PAT_PID:0,MP2T_PACKET_LENGTH:xt,TransportPacketStream:vt,TransportParseStream:bt,ElementaryStream:_t,TimestampRolloverStream:Ct,CaptionStream:wt.CaptionStream,Cea608Stream:wt.Cea608Stream,Cea708Stream:wt.Cea708Stream,MetadataStream:Tt};for(var At in Et)Et.hasOwnProperty(At)&&(It[At]=Et[At]);var Ot,Pt=It,Lt=j,Dt=me.ONE_SECOND_IN_TS,Mt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];Ot=function(e){var t,i=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 ${i} outside syncword`})},this.push=function(r){var s,n,a,o,l,d=0;if(e||(i=0),"audio"===r.type){var u;t&&t.length?(a=t,t=new Uint8Array(a.byteLength+r.data.byteLength),t.set(a),t.set(r.data,a.byteLength)):t=r.data;while(d+7<t.length)if(255===t[d]&&240===(246&t[d+1])){if("number"===typeof u&&(this.skipWarn_(u,d),u=null),n=2*(1&~t[d+1]),s=(3&t[d+3])<<11|t[d+4]<<3|(224&t[d+5])>>5,o=1024*(1+(3&t[d+6])),l=o*Dt/Mt[(60&t[d+2])>>>2],t.byteLength-d<s)break;this.trigger("data",{pts:r.pts+i*l,dts:r.dts+i*l,sampleCount:o,audioobjecttype:1+(t[d+2]>>>6&3),channelcount:(1&t[d+2])<<2|(192&t[d+3])>>>6,samplerate:Mt[(60&t[d+2])>>>2],samplingfrequencyindex:(60&t[d+2])>>>2,samplesize:16,data:t.subarray(d+7+n,d+s)}),i++,d+=s}else"number"!==typeof u&&(u=d),d++;"number"===typeof u&&(this.skipWarn_(u,d),u=null),t=t.subarray(d)}},this.flush=function(){i=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}},Ot.prototype=new Lt;var Nt,Rt=Ot;Nt=function(e){var t=e.byteLength,i=0,r=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+r},this.loadWord=function(){var s=e.byteLength-t,n=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");n.set(e.subarray(s,s+a)),i=new DataView(n.buffer).getUint32(0),r=8*a,t-=a},this.skipBits=function(e){var s;r>e?(i<<=e,r-=e):(e-=r,s=Math.floor(e/8),e-=8*s,t-=s,this.loadWord(),i<<=e,r-=e)},this.readBits=function(e){var s=Math.min(r,e),n=i>>>32-s;return r-=s,r>0?i<<=s:t>0&&this.loadWord(),s=e-s,s>0?n<<s|this.readBits(s):n},this.skipLeadingZeros=function(){var e;for(e=0;e<r;++e)if(0!==(i&2147483648>>>e))return i<<=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()};var Ut,Bt,jt,Ft=Nt,qt=j,$t=Ft;Bt=function(){var e,t,i=0;Bt.prototype.init.call(this),this.push=function(r){var s;t?(s=new Uint8Array(t.byteLength+r.data.byteLength),s.set(t),s.set(r.data,t.byteLength),t=s):t=r.data;for(var n=t.byteLength;i<n-3;i++)if(1===t[i+2]){e=i+5;break}while(e<n)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger("data",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<n);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3;break}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger("reset")},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(i+3)),t=null,i=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},Bt.prototype=new qt,jt={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Ut=function(){var e,t,i,r,s,n,a,o=new Bt;Ut.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,i=e.pts,r=e.dts,o.push(e))},o.on("data",(function(a){var o={trackId:t,pts:i,dts:r,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp",o.escapedRBSP=s(a.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp",o.escapedRBSP=s(a.subarray(1)),o.config=n(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp";break}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()},a=function(e,t){var i,r,s=8,n=8;for(i=0;i<e;i++)0!==n&&(r=t.readExpGolomb(),n=(s+r+256)%256),s=0===n?s:n},s=function(e){var t,i,r=e.byteLength,s=[],n=1;while(n<r-2)0===e[n]&&0===e[n+1]&&3===e[n+2]?(s.push(n+2),n+=2):n++;if(0===s.length)return e;t=r-s.length,i=new Uint8Array(t);var a=0;for(n=0;n<t;a++,n++)a===s[0]&&(a++,s.shift()),i[n]=e[a];return i},n=function(e){var t,i,r,s,n,o,l,d,u,c,h,p,f,m=0,g=0,y=0,v=0,b=[1,1];if(t=new $t(e),i=t.readUnsignedByte(),s=t.readUnsignedByte(),r=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),jt[i]&&(n=t.readUnsignedExpGolomb(),3===n&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==n?8:12,f=0;f<h;f++)t.readBoolean()&&a(f<6?16:64,t);if(t.skipUnsignedExpGolomb(),o=t.readUnsignedExpGolomb(),0===o)t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),f=0;f<l;f++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),d=t.readUnsignedExpGolomb(),u=t.readUnsignedExpGolomb(),c=t.readBits(1),0===c&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(p=t.readUnsignedByte(),p){case 1:b=[1,1];break;case 2:b=[12,11];break;case 3:b=[10,11];break;case 4:b=[16,11];break;case 5:b=[40,33];break;case 6:b=[24,11];break;case 7:b=[20,11];break;case 8:b=[32,11];break;case 9:b=[80,33];break;case 10:b=[18,11];break;case 11:b=[15,11];break;case 12:b=[64,33];break;case 13:b=[160,99];break;case 14:b=[4,3];break;case 15:b=[3,2];break;case 16:b=[2,1];break;case 255:b=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()];break}b&&(b[0],b[1])}return{profileIdc:i,levelIdc:r,profileCompatibility:s,width:16*(d+1)-2*m-2*g,height:(2-c)*(u+1)*16-2*y-2*v,sarRatio:b}}},Ut.prototype=new qt;var Ht,zt={H264Stream:Ut,NalByteStream:Bt},Vt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Gt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9],r=e[t+5],s=(16&r)>>4;return i=i>=0?i:0,s?i+20:i+10},Wt=function(e,t){return e.length-t<10||e[t]!=="I".charCodeAt(0)||e[t+1]!=="D".charCodeAt(0)||e[t+2]!=="3".charCodeAt(0)?t:(t+=Gt(e,t),Wt(e,t))},Xt=function(e){var t=Wt(e,0);return e.length>=t+2&&255===(255&e[t])&&240===(240&e[t+1])&&16===(22&e[t+1])},Yt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Kt=function(e,t,i){var r,s="";for(r=t;r<i;r++)s+="%"+("00"+e[r].toString(16)).slice(-2);return s},Jt=function(e,t,i){return unescape(Kt(e,t,i))},Qt=function(e,t){var i=(224&e[t+5])>>5,r=e[t+4]<<3,s=6144&e[t+3];return s|r|i},Zt=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},ei=function(e){var t=0;while(t+5<e.length){if(255===e[t]&&240===(246&e[t+1]))return Vt[(60&e[t+2])>>>2];t++}return null},ti=function(e){var t,i,r,s;t=10,64&e[5]&&(t+=4,t+=Yt(e.subarray(10,14)));do{if(i=Yt(e.subarray(t+4,t+8)),i<1)return null;if(s=String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3]),"PRIV"===s){r=e.subarray(t+10,t+i+10);for(var n=0;n<r.byteLength;n++)if(0===r[n]){var a=Jt(r,0,n);if("com.apple.streaming.transportStreamTimestamp"===a){var o=r.subarray(n+1),l=(1&o[3])<<30|o[4]<<22|o[5]<<14|o[6]<<6|o[7]>>>2;return l*=4,l+=3&o[7],l}break}}t+=10,t+=i}while(t<e.byteLength);return null},ii={isLikelyAacData:Xt,parseId3TagSize:Gt,parseAdtsSize:Qt,parseType:Zt,parseSampleRate:ei,parseAacTimestamp:ti},ri=j,si=ii;Ht=function(){var e=new Uint8Array,t=0;Ht.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var r,s,n,a,o=0,l=0;e.length?(a=e.length,e=new Uint8Array(i.byteLength+a),e.set(e.subarray(0,a)),e.set(i,a)):e=i;while(e.length-l>=3)if(e[l]!=="I".charCodeAt(0)||e[l+1]!=="D".charCodeAt(0)||e[l+2]!=="3".charCodeAt(0))if(255!==(255&e[l])||240!==(240&e[l+1]))l++;else{if(e.length-l<7)break;if(o=si.parseAdtsSize(e,l),l+o>e.length)break;n={type:"audio",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger("data",n),l+=o}else{if(e.length-l<10)break;if(o=si.parseId3TagSize(e,l),l+o>e.length)break;s={type:"timed-metadata",data:e.subarray(l,l+o)},this.trigger("data",s),l+=o}r=e.length-l,e=r>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}},Ht.prototype=new ri;var ni,ai,oi,li,di=Ht,ui=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],ci=ui,hi=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],pi=hi,fi=j,mi=Q,gi=le,yi=we,vi=Ie,bi=Pt,_i=me,Ti=Rt,Si=zt.H264Stream,wi=di,Ei=ii.isLikelyAacData,Ci=me.ONE_SECOND_IN_TS,xi=ci,ki=pi,Ii=function(e,t){t.stream=e,this.trigger("log",t)},Ai=function(e,t){for(var i=Object.keys(t),r=0;r<i.length;r++){var s=i[r];"headOfPipeline"!==s&&t[s].on&&t[s].on("log",Ii.bind(e,s))}},Oi=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},Pi=function(e,t,i,r,s,n){var a=i-t,o=r-t,l=s-i;return{start:{dts:e,pts:e+a},end:{dts:e+o,pts:e+l},prependedContentDuration:n,baseMediaDecodeTime:e}};ai=function(e,t){var i,r=[],s=0,n=0,a=1/0;t=t||{},i=t.firstSequenceNumber||0,ai.prototype.init.call(this),this.push=function(t){vi.collectDtsInfo(e,t),e&&xi.forEach((function(i){e[i]=t[i]})),r.push(t)},this.setEarliestDts=function(e){s=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){n=e},this.flush=function(){var o,l,d,u,c,h,p;0!==r.length?(o=yi.trimAdtsFramesByEarliestDts(r,e,s),e.baseMediaDecodeTime=vi.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=yi.prefixWithSilence(e,o,n,a),e.samples=yi.generateSampleTable(o),d=mi.mdat(yi.concatenateFrameData(o)),r=[],l=mi.moof(i,[e]),u=new Uint8Array(l.byteLength+d.byteLength),i++,u.set(l),u.set(d,l.byteLength),vi.clearDtsInfo(e),c=Math.ceil(1024*Ci/e.samplerate),o.length&&(h=o.length*c,this.trigger("segmentTimingInfo",Pi(_i.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger("timingInfo",{start:o[0].pts,end:o[0].pts+h})),this.trigger("data",{track:e,boxes:u}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){vi.clearDtsInfo(e),r=[],this.trigger("reset")}},ai.prototype=new fi,ni=function(e,t){var i,r,s,n=[],a=[];t=t||{},i=t.firstSequenceNumber||0,ni.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){vi.collectDtsInfo(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.config,e.sps=[t.data],ki.forEach((function(t){e[t]=r[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||s||(s=t.data,e.pps=[t.data]),n.push(t)},this.flush=function(){var r,s,o,l,d,u,c,h,p=0;while(n.length){if("access_unit_delimiter_rbsp"===n[0].nalUnitType)break;n.shift()}if(0===n.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(r=gi.groupNalsIntoFrames(n),o=gi.groupFramesIntoGops(r),o[0][0].keyFrame||(s=this.getGopForFusion_(n[0],e),s?(p=s.duration,o.unshift(s),o.byteLength+=s.byteLength,o.nalCount+=s.nalCount,o.pts=s.pts,o.dts=s.dts,o.duration+=s.duration):o=gi.extendFirstKeyFrame(o)),a.length){var f;if(f=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o),!f)return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),n=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");vi.clearDtsInfo(e),o=f}vi.collectDtsInfo(e,o),e.samples=gi.generateSampleTable(o),d=mi.mdat(gi.concatenateNalData(o)),e.baseMediaDecodeTime=vi.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),c=o[0],h=o[o.length-1],this.trigger("segmentTimingInfo",Pi(e.baseMediaDecodeTime,c.dts,c.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger("timingInfo",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),n=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),l=mi.moof(i,[e]),u=new Uint8Array(l.byteLength+d.byteLength),i++,u.set(l),u.set(d,l.byteLength),this.trigger("data",{track:e,boxes:u}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),n=[],this.gopCache_.length=0,a.length=0,this.trigger("reset")},this.resetStream_=function(){vi.clearDtsInfo(e),r=void 0,s=void 0},this.getGopForFusion_=function(t){var i,r,s,n,a,o=45e3,l=1e4,d=1/0;for(a=0;a<this.gopCache_.length;a++)n=this.gopCache_[a],s=n.gop,e.pps&&Oi(e.pps[0],n.pps[0])&&e.sps&&Oi(e.sps[0],n.sps[0])&&(s.dts<e.timelineStartInfo.dts||(i=t.dts-s.dts-s.duration,i>=-l&&i<=o&&(!r||d>i)&&(r=n,d=i)));return r?r.gop:null},this.alignGopsAtStart_=function(e){var t,i,r,s,n,o,l,d;n=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;while(t<a.length&&i<e.length){if(r=a[t],s=e[i],r.pts===s.pts)break;s.pts>r.pts?t++:(i++,n-=s.byteLength,o-=s.nalCount,l-=s.duration)}return 0===i?e:i===e.length?null:(d=e.slice(i),d.byteLength=n,d.duration=l,d.nalCount=o,d.pts=d[0].pts,d.dts=d[0].dts,d)},this.alignGopsAtEnd_=function(e){var t,i,r,s,n,o,l;t=a.length-1,i=e.length-1,n=null,o=!1;while(t>=0&&i>=0){if(r=a[t],s=e[i],r.pts===s.pts){o=!0;break}r.pts>s.pts?t--:(t===a.length-1&&(n=i),i--)}if(!o&&null===n)return null;if(l=o?i:n,0===l)return e;var d=e.slice(l),u=d.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 d.byteLength=u.byteLength,d.duration=u.duration,d.nalCount=u.nalCount,d.pts=d[0].pts,d.dts=d[0].dts,d},this.alignGopsWith=function(e){a=e}},ni.prototype=new fi,li=function(e,t){this.numberOfTracks=0,this.metadataStream=t,e=e||{},"undefined"!==typeof 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,li.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))))}},li.prototype=new fi,li.prototype.flush=function(e){var t,i,r,s,n=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,ki.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,xi.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,r=mi.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(r.byteLength),a.initSegment.set(r),a.data=new Uint8Array(this.pendingBytes),s=0;s<this.pendingBoxes.length;s++)a.data.set(this.pendingBoxes[s],n),n+=this.pendingBoxes[s].byteLength;for(s=0;s<this.pendingCaptions.length;s++)t=this.pendingCaptions[s],t.startTime=_i.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=_i.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(s=0;s<this.pendingMetadata.length;s++)i=this.pendingMetadata[s],i.cueTime=_i.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",a),s=0;s<a.captions.length;s++)t=a.captions[s],this.trigger("caption",t);for(s=0;s<a.metadata.length;s++)i=a.metadata[s],this.trigger("id3Frame",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},li.prototype.setRemux=function(e){this.remuxTracks=e},oi=function(e){var t,i,r=this,s=!0;oi.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var s={};this.transmuxPipeline_=s,s.type="aac",s.metadataStream=new bi.MetadataStream,s.aacStream=new wi,s.audioTimestampRolloverStream=new bi.TimestampRolloverStream("audio"),s.timedMetadataTimestampRolloverStream=new bi.TimestampRolloverStream("timed-metadata"),s.adtsStream=new Ti,s.coalesceStream=new li(e,s.metadataStream),s.headOfPipeline=s.aacStream,s.aacStream.pipe(s.audioTimestampRolloverStream).pipe(s.adtsStream),s.aacStream.pipe(s.timedMetadataTimestampRolloverStream).pipe(s.metadataStream).pipe(s.coalesceStream),s.metadataStream.on("timestamp",(function(e){s.aacStream.setTimestamp(e.timeStamp)})),s.aacStream.on("data",(function(n){"timed-metadata"!==n.type&&"audio"!==n.type||s.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},s.coalesceStream.numberOfTracks++,s.audioSegmentStream=new ai(i,e),s.audioSegmentStream.on("log",r.getLogTrigger_("audioSegmentStream")),s.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),s.adtsStream.pipe(s.audioSegmentStream).pipe(s.coalesceStream),r.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!t}))})),s.coalesceStream.on("data",this.trigger.bind(this,"data")),s.coalesceStream.on("done",this.trigger.bind(this,"done")),Ai(this,s)},this.setupTsPipeline=function(){var s={};this.transmuxPipeline_=s,s.type="ts",s.metadataStream=new bi.MetadataStream,s.packetStream=new bi.TransportPacketStream,s.parseStream=new bi.TransportParseStream,s.elementaryStream=new bi.ElementaryStream,s.timestampRolloverStream=new bi.TimestampRolloverStream,s.adtsStream=new Ti,s.h264Stream=new Si,s.captionStream=new bi.CaptionStream(e),s.coalesceStream=new li(e,s.metadataStream),s.headOfPipeline=s.packetStream,s.packetStream.pipe(s.parseStream).pipe(s.elementaryStream).pipe(s.timestampRolloverStream),s.timestampRolloverStream.pipe(s.h264Stream),s.timestampRolloverStream.pipe(s.adtsStream),s.timestampRolloverStream.pipe(s.metadataStream).pipe(s.coalesceStream),s.h264Stream.pipe(s.captionStream).pipe(s.coalesceStream),s.elementaryStream.on("data",(function(n){var a;if("metadata"===n.type){a=n.tracks.length;while(a--)t||"video"!==n.tracks[a].type?i||"audio"!==n.tracks[a].type||(i=n.tracks[a],i.timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime):(t=n.tracks[a],t.timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime);t&&!s.videoSegmentStream&&(s.coalesceStream.numberOfTracks++,s.videoSegmentStream=new ni(t,e),s.videoSegmentStream.on("log",r.getLogTrigger_("videoSegmentStream")),s.videoSegmentStream.on("timelineStartInfo",(function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,s.audioSegmentStream.setEarliestDts(t.dts-r.baseMediaDecodeTime))})),s.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo")),s.videoSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"videoSegmentTimingInfo")),s.videoSegmentStream.on("baseMediaDecodeTime",(function(e){i&&s.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),s.videoSegmentStream.on("timingInfo",r.trigger.bind(r,"videoTimingInfo")),s.h264Stream.pipe(s.videoSegmentStream).pipe(s.coalesceStream)),i&&!s.audioSegmentStream&&(s.coalesceStream.numberOfTracks++,s.audioSegmentStream=new ai(i,e),s.audioSegmentStream.on("log",r.getLogTrigger_("audioSegmentStream")),s.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),s.audioSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"audioSegmentTimingInfo")),s.adtsStream.pipe(s.audioSegmentStream).pipe(s.coalesceStream)),r.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!t})}})),s.coalesceStream.on("data",this.trigger.bind(this,"data")),s.coalesceStream.on("id3Frame",(function(e){e.dispatchType=s.metadataStream.dispatchType,r.trigger("id3Frame",e)})),s.coalesceStream.on("caption",this.trigger.bind(this,"caption")),s.coalesceStream.on("done",this.trigger.bind(this,"done")),Ai(this,s)},this.setBaseMediaDecodeTime=function(r){var s=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=r),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,vi.clearDtsInfo(i),s.audioTimestampRolloverStream&&s.audioTimestampRolloverStream.discontinuity()),t&&(s.videoSegmentStream&&(s.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,vi.clearDtsInfo(t),s.captionStream.reset()),s.timestampRolloverStream&&s.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.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(i){i.stream=e,t.trigger("log",i)}},this.push=function(e){if(s){var t=Ei(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),s=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){s=!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()}},oi.prototype=new fi;var Li,Di={Transmuxer:oi,VideoSegmentStream:ni,AudioSegmentStream:ai,AUDIO_PROPERTIES:xi,VIDEO_PROPERTIES:ki,generateSegmentTimingInfo:Pi},Mi=function(e){return e>>>0},Ni=function(e){return("00"+e.toString(16)).slice(-2)},Ri={toUnsigned:Mi,toHexString:Ni},Ui=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]),t},Bi=Ui,ji=Ri.toUnsigned,Fi=Bi,qi=function(e,t){var i,r,s,n,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)r=ji(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),s=Fi(e.subarray(i+4,i+8)),n=r>1?i+r:e.byteLength,s===t[0]&&(1===t.length?o.push(e.subarray(i+8,n)):(a=qi(e.subarray(i+8,n),t.slice(1)),a.length&&(o=o.concat(a)))),i=n;return o},$i=qi,Hi=Ri.toUnsigned,zi=$.getUint64,Vi=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=zi(e.subarray(4)):t.baseMediaDecodeTime=Hi(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},Gi=Vi,Wi=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]}},Xi=Wi,Yi=Xi,Ki=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},r=new DataView(e.buffer,e.byteOffset,e.byteLength),s=1&i.flags[2],n=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],d=8&i.flags[1],u=r.getUint32(4),c=8;s&&(i.dataOffset=r.getInt32(c),c+=4),n&&u&&(t={flags:Yi(e.subarray(c,c+4))},c+=4,a&&(t.duration=r.getUint32(c),c+=4),o&&(t.size=r.getUint32(c),c+=4),d&&(1===i.version?t.compositionTimeOffset=r.getInt32(c):t.compositionTimeOffset=r.getUint32(c),c+=4),i.samples.push(t),u--);while(u--)t={},a&&(t.duration=r.getUint32(c),c+=4),o&&(t.size=r.getUint32(c),c+=4),l&&(t.flags=Yi(e.subarray(c,c+4)),c+=4),d&&(1===i.version?t.compositionTimeOffset=r.getInt32(c):t.compositionTimeOffset=r.getUint32(c),c+=4),i.samples.push(t);return i},Ji=Ki,Qi=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},s=1&r.flags[2],n=2&r.flags[2],a=8&r.flags[2],o=16&r.flags[2],l=32&r.flags[2],d=65536&r.flags[0],u=131072&r.flags[0];return t=8,s&&(t+=4,r.baseDataOffset=i.getUint32(12),t+=4),n&&(r.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(r.defaultSampleDuration=i.getUint32(t),t+=4),o&&(r.defaultSampleSize=i.getUint32(t),t+=4),l&&(r.defaultSampleFlags=i.getUint32(t)),d&&(r.durationIsEmpty=!0),!s&&u&&(r.baseDataOffsetIsMoof=!0),r},Zi=Qi;Li="undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{};var er,tr,ir,rr,sr,nr,ar=Li,or=Ne.discardEmulationPreventionBytes,lr=Je.CaptionStream,dr=$i,ur=Gi,cr=Ji,hr=Zi,pr=ar,fr=function(e,t){for(var i=e,r=0;r<t.length;r++){var s=t[r];if(i<s.size)return s;i-=s.size}return null},mr=function(e,t,i){var r,s,n,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(s=0;s+4<e.length;s+=n)if(n=o.getUint32(s),s+=4,!(n<=0))switch(31&e[s]){case 6:var d=e.subarray(s+1,s+1+n),u=fr(s,t);if(r={nalUnitType:"sei_rbsp",size:n,data:d,escapedRBSP:or(d),trackId:i},u)r.pts=u.pts,r.dts=u.dts,a=u;else{if(!a){l.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+s+" for trackId "+i+". See mux.js#223."});break}r.pts=a.pts,r.dts=a.dts}l.seiNals.push(r);break}return l},gr=function(e,t,i){var r=t,s=i.defaultSampleDuration||0,n=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach((function(e){var t=cr(e),i=t.samples;i.forEach((function(e){void 0===e.duration&&(e.duration=s),void 0===e.size&&(e.size=n),e.trackId=a,e.dts=r,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),"bigint"===typeof r?(e.pts=r+pr.BigInt(e.compositionTimeOffset),r+=pr.BigInt(e.duration)):(e.pts=r+e.compositionTimeOffset,r+=e.duration)})),o=o.concat(i)})),o},yr=function(e,t){var i=dr(e,["moof","traf"]),r=dr(e,["mdat"]),s={},n=[];return r.forEach((function(e,t){var r=i[t];n.push({mdat:e,traf:r})})),n.forEach((function(e){var i,r,n=e.mdat,a=e.traf,o=dr(a,["tfhd"]),l=hr(o[0]),d=l.trackId,u=dr(a,["tfdt"]),c=u.length>0?ur(u[0]).baseMediaDecodeTime:0,h=dr(a,["trun"]);t===d&&h.length>0&&(i=gr(h,c,l),r=mr(n,i,d),s[d]||(s[d]={seiNals:[],logs:[]}),s[d].seiNals=s[d].seiNals.concat(r.seiNals),s[d].logs=s[d].logs.concat(r.logs))})),s},vr=function(e,t,i){var r;if(null===t)return null;r=yr(e,t);var s=r[t]||{};return{seiNals:s.seiNals,logs:s.logs,timescale:i}},br=function(){var e,t,i,r,s,n,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new lr,a=!0,n=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/r,e.endTime=e.endPts/r,s.captions.push(e),s.captionStreams[e.stream]=!0})),e.on("log",(function(e){s.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"===typeof t&&0===Object.keys(t).length)&&(i!==e[0]||r!==t[i])},this.parse=function(e,n,a){var o;if(!this.isInitialized())return null;if(!n||!a)return null;if(this.isNewInit(n,a))i=n[0],r=a[i];else if(null===i||!r)return t.push(e),null;while(t.length>0){var l=t.shift();this.parse(l,n,a)}return o=vr(e,i,r),o&&o.logs&&(s.logs=s.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),s):s.logs.length?{logs:s.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;n?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){s.captions=[],s.captionStreams={},s.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,r=null,s?this.clearParsedCaptions():s={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},_r=br,Tr=Ri.toUnsigned,Sr=Ri.toHexString,wr=$i,Er=Bi,Cr=Zi,xr=Ji,kr=Gi,Ir=$.getUint64,Ar=ar;er=function(e){var t={},i=wr(e,["moov","trak"]);return i.reduce((function(e,t){var i,r,s,n,a;return i=wr(t,["tkhd"])[0],i?(r=i[0],s=0===r?12:20,n=Tr(i[s]<<24|i[s+1]<<16|i[s+2]<<8|i[s+3]),a=wr(t,["mdia","mdhd"])[0],a?(r=a[0],s=0===r?12:20,e[n]=Tr(a[s]<<24|a[s+1]<<16|a[s+2]<<8|a[s+3]),e):null):null}),t)},tr=function(e,t){var i;i=wr(t,["moof","traf"]);var r=i.reduce((function(t,i){var r,s=wr(i,["tfhd"])[0],n=Tr(s[4]<<24|s[5]<<16|s[6]<<8|s[7]),a=e[n]||9e4,o=wr(i,["tfdt"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let d;return r=1===o[0]?Ir(o.subarray(4,12)):l.getUint32(4),"bigint"===typeof r?d=r/Ar.BigInt(a):"number"!==typeof r||isNaN(r)||(d=r/a),d<Number.MAX_SAFE_INTEGER&&(d=Number(d)),d<t&&(t=d),t}),1/0);return"bigint"===typeof r||isFinite(r)?r:0},ir=function(e,t){var i,r=wr(t,["moof","traf"]),s=0,n=0;if(r&&r.length){var a=wr(r[0],["tfhd"])[0],o=wr(r[0],["trun"])[0],l=wr(r[0],["tfdt"])[0];if(a){var d=Cr(a);i=d.trackId}if(l){var u=kr(l);s=u.baseMediaDecodeTime}if(o){var c=xr(o);c.samples&&c.samples.length&&(n=c.samples[0].compositionTimeOffset||0)}}var h=e[i]||9e4;"bigint"===typeof s&&(n=Ar.BigInt(n),h=Ar.BigInt(h));var p=(s+n)/h;return"bigint"===typeof p&&p<Number.MAX_SAFE_INTEGER&&(p=Number(p)),p},rr=function(e){var t=wr(e,["moov","trak"]),i=[];return t.forEach((function(e){var t=wr(e,["mdia","hdlr"]),r=wr(e,["tkhd"]);t.forEach((function(e,t){var s,n,a,o=Er(e.subarray(8,12)),l=r[t];"vide"===o&&(s=new DataView(l.buffer,l.byteOffset,l.byteLength),n=s.getUint8(0),a=0===n?s.getUint32(12):s.getUint32(20),i.push(a))}))})),i},nr=function(e){var t=e[0],i=0===t?12:20;return Tr(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3])},sr=function(e){var t=wr(e,["moov","trak"]),i=[];return t.forEach((function(e){var t,r,s={},n=wr(e,["tkhd"])[0];n&&(t=new DataView(n.buffer,n.byteOffset,n.byteLength),r=t.getUint8(0),s.id=0===r?t.getUint32(12):t.getUint32(20));var a=wr(e,["mdia","hdlr"])[0];if(a){var o=Er(a.subarray(8,12));s.type="vide"===o?"video":"soun"===o?"audio":o}var l=wr(e,["mdia","minf","stbl","stsd"])[0];if(l){var d=l.subarray(8);s.codec=Er(d.subarray(4,8));var u,c,h=wr(d,[s.codec])[0];h&&(/^[asm]vc[1-9]$/i.test(s.codec)?(u=h.subarray(78),c=Er(u.subarray(4,8)),"avcC"===c&&u.length>11?(s.codec+=".",s.codec+=Sr(u[9]),s.codec+=Sr(u[10]),s.codec+=Sr(u[11])):s.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(s.codec)?(u=h.subarray(28),c=Er(u.subarray(4,8)),"esds"===c&&u.length>20&&0!==u[19]?(s.codec+="."+Sr(u[19]),s.codec+="."+Sr(u[20]>>>2&63).replace(/^0/,"")):s.codec="mp4a.40.2"):s.codec=s.codec.toLowerCase())}var p=wr(e,["mdia","mdhd"])[0];p&&(s.timescale=nr(p)),i.push(s)})),i};var Or={findBox:wr,parseType:Er,timescale:er,startTime:tr,compositionStartTime:ir,videoTrackIds:rr,tracks:sr,getTimescaleFromMediaHeader:nr},Pr=Qe,Lr=function(e){var t=31&e[1];return t<<=8,t|=e[2],t},Dr=function(e){return!!(64&e[1])},Mr=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},Nr=function(e,t){var i=Lr(e);return 0===i?"pat":i===t?"pmt":t?"pes":null},Rr=function(e){var t=Dr(e),i=4+Mr(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},Ur=function(e){var t={},i=Dr(e),r=4+Mr(e);if(i&&(r+=e[r]+1),1&e[r+5]){var s,n,a;s=(15&e[r+1])<<8|e[r+2],n=3+s-4,a=(15&e[r+10])<<8|e[r+11];var o=12+a;while(o<n){var l=r+o;t[(31&e[l+1])<<8|e[l+2]]=e[l],o+=5+((15&e[l+3])<<8|e[l+4])}return t}},Br=function(e,t){var i=Lr(e),r=t[i];switch(r){case Pr.H264_STREAM_TYPE:return"video";case Pr.ADTS_STREAM_TYPE:return"audio";case Pr.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},jr=function(e){var t=Dr(e);if(!t)return null;var i=4+Mr(e);if(i>=e.byteLength)return null;var r,s=null;return r=e[i+7],192&r&&(s={},s.pts=(14&e[i+9])<<27|(255&e[i+10])<<20|(254&e[i+11])<<12|(255&e[i+12])<<5|(254&e[i+13])>>>3,s.pts*=4,s.pts+=(6&e[i+13])>>>1,s.dts=s.pts,64&r&&(s.dts=(14&e[i+14])<<27|(255&e[i+15])<<20|(254&e[i+16])<<12|(255&e[i+17])<<5|(254&e[i+18])>>>3,s.dts*=4,s.dts+=(6&e[i+18])>>>1)),s},Fr=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}},qr=function(e){for(var t,i=4+Mr(e),r=e.subarray(i),s=0,n=0,a=!1;n<r.byteLength-3;n++)if(1===r[n+2]){s=n+5;break}while(s<r.byteLength)switch(r[s]){case 0:if(0!==r[s-1]){s+=2;break}if(0!==r[s-2]){s++;break}n+3!==s-2&&(t=Fr(31&r[n+3]),"slice_layer_without_partitioning_rbsp_idr"===t&&(a=!0));do{s++}while(1!==r[s]&&s<r.length);n=s-2,s+=3;break;case 1:if(0!==r[s-1]||0!==r[s-2]){s+=3;break}t=Fr(31&r[n+3]),"slice_layer_without_partitioning_rbsp_idr"===t&&(a=!0),n=s-2,s+=3;break;default:s+=3;break}return r=r.subarray(n),s-=n,n=0,r&&r.byteLength>3&&(t=Fr(31&r[n+3]),"slice_layer_without_partitioning_rbsp_idr"===t&&(a=!0)),a},$r={parseType:Nr,parsePat:Rr,parsePmt:Ur,parsePayloadUnitStartIndicator:Dr,parsePesType:Br,parsePesTime:jr,videoPacketContainsKeyFrame:qr},Hr=Qe,zr=at.handleRollover,Vr={};Vr.ts=$r,Vr.aac=ii;var Gr=me.ONE_SECOND_IN_TS,Wr=188,Xr=71,Yr=function(e,t){var i,r,s=0,n=Wr;while(n<e.byteLength)if(e[s]!==Xr||e[n]!==Xr)s++,n++;else{switch(i=e.subarray(s,n),r=Vr.ts.parseType(i,t.pid),r){case"pat":t.pid=Vr.ts.parsePat(i);break;case"pmt":var a=Vr.ts.parsePmt(i);t.table=t.table||{},Object.keys(a).forEach((function(e){t.table[e]=a[e]}));break}s+=Wr,n+=Wr}},Kr=function(e,t,i){var r,s,n,a,o,l=0,d=Wr,u=!1;while(d<=e.byteLength)if(e[l]!==Xr||e[d]!==Xr&&d!==e.byteLength)l++,d++;else{switch(r=e.subarray(l,d),s=Vr.ts.parseType(r,t.pid),s){case"pes":n=Vr.ts.parsePesType(r,t.table),a=Vr.ts.parsePayloadUnitStartIndicator(r),"audio"===n&&a&&(o=Vr.ts.parsePesTime(r),o&&(o.type="audio",i.audio.push(o),u=!0));break}if(u)break;l+=Wr,d+=Wr}d=e.byteLength,l=d-Wr,u=!1;while(l>=0)if(e[l]!==Xr||e[d]!==Xr&&d!==e.byteLength)l--,d--;else{switch(r=e.subarray(l,d),s=Vr.ts.parseType(r,t.pid),s){case"pes":n=Vr.ts.parsePesType(r,t.table),a=Vr.ts.parsePayloadUnitStartIndicator(r),"audio"===n&&a&&(o=Vr.ts.parsePesTime(r),o&&(o.type="audio",i.audio.push(o),u=!0));break}if(u)break;l-=Wr,d-=Wr}},Jr=function(e,t,i){var r,s,n,a,o,l,d,u,c=0,h=Wr,p=!1,f={data:[],size:0};while(h<e.byteLength)if(e[c]!==Xr||e[h]!==Xr)c++,h++;else{switch(r=e.subarray(c,h),s=Vr.ts.parseType(r,t.pid),s){case"pes":if(n=Vr.ts.parsePesType(r,t.table),a=Vr.ts.parsePayloadUnitStartIndicator(r),"video"===n&&(a&&!p&&(o=Vr.ts.parsePesTime(r),o&&(o.type="video",i.video.push(o),p=!0)),!i.firstKeyFrame)){if(a&&0!==f.size){l=new Uint8Array(f.size),d=0;while(f.data.length)u=f.data.shift(),l.set(u,d),d+=u.byteLength;if(Vr.ts.videoPacketContainsKeyFrame(l)){var m=Vr.ts.parsePesTime(l);m?(i.firstKeyFrame=m,i.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}f.size=0}f.data.push(r),f.size+=r.byteLength}break}if(p&&i.firstKeyFrame)break;c+=Wr,h+=Wr}h=e.byteLength,c=h-Wr,p=!1;while(c>=0)if(e[c]!==Xr||e[h]!==Xr)c--,h--;else{switch(r=e.subarray(c,h),s=Vr.ts.parseType(r,t.pid),s){case"pes":n=Vr.ts.parsePesType(r,t.table),a=Vr.ts.parsePayloadUnitStartIndicator(r),"video"===n&&a&&(o=Vr.ts.parsePesTime(r),o&&(o.type="video",i.video.push(o),p=!0));break}if(p)break;c-=Wr,h-=Wr}},Qr=function(e,t){if(e.audio&&e.audio.length){var i=t;("undefined"===typeof i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach((function(e){e.dts=zr(e.dts,i),e.pts=zr(e.pts,i),e.dtsTime=e.dts/Gr,e.ptsTime=e.pts/Gr}))}if(e.video&&e.video.length){var r=t;if(("undefined"===typeof r||isNaN(r))&&(r=e.video[0].dts),e.video.forEach((function(e){e.dts=zr(e.dts,r),e.pts=zr(e.pts,r),e.dtsTime=e.dts/Gr,e.ptsTime=e.pts/Gr})),e.firstKeyFrame){var s=e.firstKeyFrame;s.dts=zr(s.dts,r),s.pts=zr(s.pts,r),s.dtsTime=s.dts/Gr,s.ptsTime=s.pts/Gr}}},Zr=function(e){var t,i=!1,r=0,s=null,n=null,a=0,o=0;while(e.length-o>=3){var l=Vr.aac.parseType(e,o);switch(l){case"timed-metadata":if(e.length-o<10){i=!0;break}if(a=Vr.aac.parseId3TagSize(e,o),a>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+a),n=Vr.aac.parseAacTimestamp(t)),o+=a;break;case"audio":if(e.length-o<7){i=!0;break}if(a=Vr.aac.parseAdtsSize(e,o),a>e.length){i=!0;break}null===s&&(t=e.subarray(o,o+a),s=Vr.aac.parseSampleRate(t)),r++,o+=a;break;default:o++;break}if(i)return null}if(null===s||null===n)return null;var d=Gr/s,u={audio:[{type:"audio",dts:n,pts:n},{type:"audio",dts:n+1024*r*d,pts:n+1024*r*d}]};return u},es=function(e){var t={pid:null,table:null},i={};for(var r in Yr(e,t),t.table)if(t.table.hasOwnProperty(r)){var s=t.table[r];switch(s){case Hr.H264_STREAM_TYPE:i.video=[],Jr(e,t,i),0===i.video.length&&delete i.video;break;case Hr.ADTS_STREAM_TYPE:i.audio=[],Kr(e,t,i),0===i.audio.length&&delete i.audio;break}}return i},ts=function(e,t){var i,r=Vr.aac.isLikelyAacData(e);return i=r?Zr(e):es(e),i&&(i.audio||i.video)?(Qr(i,t),i):null},is={inspect:ts,parseAudioPes_:Kr};const rs=function(e,t){t.on("data",(function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const 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){const i={start:{decode:me.videoTsToSeconds(t.start.dts),presentation:me.videoTsToSeconds(t.start.pts)},end:{decode:me.videoTsToSeconds(t.end.dts),presentation:me.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:me.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=me.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:i})})),t.on("audioSegmentTimingInfo",(function(t){const i={start:{decode:me.videoTsToSeconds(t.start.dts),presentation:me.videoTsToSeconds(t.start.pts)},end:{decode:me.videoTsToSeconds(t.end.dts),presentation:me.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:me.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=me.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:i})})),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.videoTsToSeconds(t.start),end:me.videoTsToSeconds(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:me.videoTsToSeconds(t.start),end:me.videoTsToSeconds(t.end)}})})),t.on("log",(function(t){e.postMessage({action:"log",log:t})}))};class ss{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Di.Transmuxer(this.options),rs(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new _r,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=Or.startTime(e,t);this.self.postMessage({action:"probeMp4StartTime",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=Or.tracks(e);this.self.postMessage({action:"probeMp4Tracks",tracks:t,data:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i="number"!==typeof t||isNaN(t)?void 0:t*me.ONE_SECOND_IN_TS,r=is.inspect(e,i);let s=null;r&&(s={hasVideo:r.video&&2===r.video.length||!1,hasAudio:r.audio&&2===r.audio.length||!1},s.hasVideo&&(s.videoStart=r.video[0].ptsTime),s.hasAudio&&(s.audioStart=r.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:s,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(me.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(me.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new ss(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new ss(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})));var wo=bo(So);const Eo=(e,t,i)=>{const{type:r,initSegment:s,captions:n,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:d}=e.data.segment;t.buffer.push({captions:n,captionStreams:a,metadata:o});const u=e.data.segment.boxes||{data:e.data.segment.data},c={type:r,data:new Uint8Array(u.data,u.data.byteOffset,u.data.byteLength),initSegment:new Uint8Array(s.data,s.byteOffset,s.byteLength)};"undefined"!==typeof l&&(c.videoFrameDtsTime=l),"undefined"!==typeof d&&(c.videoFramePtsTime=d),i(c)},Co=({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)},xo=(e,t)=>{t.gopInfo=e.data.gopInfo},ko=e=>{const{transmuxer:t,bytes:i,audioAppendStart:r,gopsToAlignWith:s,remux:n,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:d,onVideoSegmentTimingInfo:u,onAudioSegmentTimingInfo:c,onId3:h,onCaptions:p,onDone:f,onEndedTimeline:m,onTransmuxerLog:g,isEndOfTimeline:y}=e,v={buffer:[]};let b=y;const _=i=>{t.currentTransmux===e&&("data"===i.data.action&&Eo(i,v,a),"trackinfo"===i.data.action&&o(i.data.trackInfo),"gopInfo"===i.data.action&&xo(i,v),"audioTimingInfo"===i.data.action&&l(i.data.audioTimingInfo),"videoTimingInfo"===i.data.action&&d(i.data.videoTimingInfo),"videoSegmentTimingInfo"===i.data.action&&u(i.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===i.data.action&&c(i.data.audioSegmentTimingInfo),"id3Frame"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),"caption"===i.data.action&&p(i.data.caption),"endedtimeline"===i.data.action&&(b=!1,m()),"log"===i.data.action&&g(i.data.log),"transmuxed"===i.data.type&&(b||(t.onmessage=null,Co({transmuxedData:v,callback:f}),Io(t))))};if(t.onmessage=_,r&&t.postMessage({action:"setAudioAppendStart",appendStart:r}),Array.isArray(s)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:s}),"undefined"!==typeof n&&t.postMessage({action:"setRemux",remux:n}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,r=i instanceof ArrayBuffer?0:i.byteOffset;t.postMessage({action:"push",data:e,byteOffset:r,byteLength:i.byteLength},[e])}y&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},Io=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"===typeof e.currentTransmux?e.currentTransmux():ko(e.currentTransmux))},Ao=(e,t)=>{e.postMessage({action:t}),Io(e)},Oo=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void Ao(t,e);t.transmuxQueue.push(Ao.bind(null,t,e))},Po=e=>{Oo("reset",e)},Lo=e=>{Oo("endTimeline",e)},Do=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ko(e);e.transmuxer.transmuxQueue.push(e)},Mo=e=>{const t=new wo;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:"init",options:e}),t};var No={reset:Po,endTimeline:Lo,transmux:Do,createTransmuxer:Mo};const Ro=function(e){const t=e.transmuxer,i=e.endAction||e.action,r=e.callback,s=y()({},e,{endAction:null,transmuxer:null,callback:null}),n=s=>{s.data.action===i&&(t.removeEventListener("message",n),s.data.data&&(s.data.data=new Uint8Array(s.data.data,e.byteOffset||0,e.byteLength||s.data.data.byteLength),e.data&&(e.data=s.data.data)),r(s.data))};if(t.addEventListener("message",n),e.data){const i=e.data instanceof ArrayBuffer;s.byteOffset=i?0:e.data.byteOffset,s.byteLength=e.data.byteLength;const r=[i?e.data:e.data.buffer];t.postMessage(s,r)}else t.postMessage(s)},Uo={FAILURE:2,TIMEOUT:-101,ABORTED:-102},Bo=e=>{e.forEach(e=>{e.abort()})},jo=e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}),Fo=e=>{const t=e.target,i=Date.now()-t.requestTime,r={bandwidth:1/0,bytesReceived:0,roundTripTime:i||0};return r.bytesReceived=e.loaded,r.bandwidth=Math.floor(r.bytesReceived/r.roundTripTime*8*1e3),r},qo=(e,t)=>t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:Uo.TIMEOUT,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Uo.ABORTED,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:Uo.FAILURE,xhr:t}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:Uo.FAILURE,xhr:t}:null,$o=(e,t,i)=>(r,s)=>{const n=s.response,a=qo(r,s);if(a)return i(a,e);if(16!==n.byteLength)return i({status:s.status,message:"Invalid HLS key at URL: "+s.uri,code:Uo.FAILURE,xhr:s},e);const o=new DataView(n),l=new Uint32Array([o.getUint32(0),o.getUint32(4),o.getUint32(8),o.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=l;return i(null,e)},Ho=(e,t)=>{const i=Object(x["a"])(e.map.bytes);if("mp4"!==i){const r=e.map.resolvedUri||e.map.uri;return t({internal:!0,message:`Found unsupported ${i||"unknown"} container for initialization segment at URL: ${r}`,code:Uo.FAILURE})}Ro({action:"probeMp4Tracks",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:r})=>(e.map.bytes=r,i.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,"number"===typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale))})),t(null))})},zo=({segment:e,finishProcessingFn:t})=>(i,r)=>{const s=qo(i,r);if(s)return t(s,e);const n=new Uint8Array(r.response);if(e.map.key)return e.map.encryptedBytes=n,t(null,e);e.map.bytes=n,Ho(e,(function(i){if(i)return i.xhr=r,i.status=r.status,t(i,e);t(null,e)}))},Vo=({segment:e,finishProcessingFn:t,responseType:i})=>(r,s)=>{const n=qo(r,s);if(n)return t(n,e);const a="arraybuffer"!==i&&s.responseText?go(s.responseText.substring(e.lastReachedChar||0)):s.response;return e.stats=jo(s),e.key?e.encryptedBytes=new Uint8Array(a):e.bytes=new Uint8Array(a),t(null,e)},Go=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h})=>{const p=e.map&&e.map.tracks||{},f=Boolean(p.audio&&p.video);let m=r.bind(null,e,"audio","start");const g=r.bind(null,e,"audio","end");let y=r.bind(null,e,"video","start");const v=r.bind(null,e,"video","end"),b=()=>Do({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:f,onData:t=>{t.type="combined"===t.type?"video":t.type,u(e,t)},onTrackInfo:t=>{i&&(f&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{m&&"undefined"!==typeof e.start&&(m(e.start),m=null),g&&"undefined"!==typeof e.end&&g(e.end)},onVideoTimingInfo:e=>{y&&"undefined"!==typeof e.start&&(y(e.start),y=null),v&&"undefined"!==typeof e.end&&v(e.end)},onVideoSegmentTimingInfo:e=>{s(e)},onAudioSegmentTimingInfo:e=>{n(e)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{d()},onTransmuxerLog:h,onDone:t=>{c&&(t.type="combined"===t.type?"video":t.type,c(null,e,t))}});Ro({action:"probeTs",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:r=>{e.bytes=t=r.data;const s=r.result;s&&(i(e,{hasAudio:s.hasAudio,hasVideo:s.hasVideo,isMuxed:f}),i=null,s.hasAudio&&!f&&m(s.audioStart),s.hasVideo&&y(s.videoStart),m=null,y=null),b()}})},Wo=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h})=>{let p=new Uint8Array(t);if(Object(x["b"])(p)){e.isFmp4=!0;const{tracks:s}=e.map,n={isFmp4:!0,hasVideo:!!s.video,hasAudio:!!s.audio};s.audio&&s.audio.codec&&"enca"!==s.audio.codec&&(n.audioCodec=s.audio.codec),s.video&&s.video.codec&&"encv"!==s.video.codec&&(n.videoCodec=s.video.codec),s.video&&s.audio&&(n.isMuxed=!0),i(e,n);const a=t=>{u(e,{data:p,type:n.hasAudio&&!n.isMuxed?"audio":"video"}),t&&t.length&&o(e,t),c(null,e,{})};Ro({action:"probeMp4StartTime",timescales:e.map.timescales,data:p,transmuxer:e.transmuxer,callback:({data:i,startTime:o})=>{t=i.buffer,e.bytes=p=i,n.hasAudio&&!n.isMuxed&&r(e,"audio","start",o),n.hasVideo&&r(e,"video","start",o),s.video&&i.byteLength&&e.transmuxer?Ro({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:e.transmuxer,data:p,timescales:e.map.timescales,trackIds:[s.video.id],callback:i=>{t=i.data.buffer,e.bytes=p=i.data,i.logs.forEach((function(e){h(An(e,{stream:"mp4CaptionParser"}))})),a(i.captions)}}):a()}})}else if(e.transmuxer){if("undefined"===typeof e.container&&(e.container=Object(x["a"])(p)),"ts"!==e.container&&"aac"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void c(null,e,{});Go({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h})}else c(null,e,{})},Xo=function({id:e,key:t,encryptedBytes:i,decryptionWorker:r},s){const n=t=>{if(t.data.source===e){r.removeEventListener("message",n);const e=t.data.decrypted;s(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let a;r.addEventListener("message",n),a=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),r.postMessage($a({source:e,encrypted:i,key:a,iv:t.iv}),[i.buffer,a.buffer])},Yo=({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h})=>{Xo({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e},e=>{t.bytes=e,Wo({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h})})},Ko=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h})=>{let p=0,f=!1;return(m,g)=>{if(!f){if(m)return f=!0,Bo(e),c(m,g);if(p+=1,p===e.length){const p=function(){if(g.encryptedBytes)return Yo({decryptionWorker:t,segment:g,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h});Wo({segment:g,bytes:g.bytes,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h})};if(g.endOfAllRequests=Date.now(),g.map&&g.map.encryptedBytes&&!g.map.bytes)return Xo({decryptionWorker:t,id:g.requestId+"-init",encryptedBytes:g.map.encryptedBytes,key:g.map.key},t=>{g.map.bytes=t,Ho(g,t=>{if(t)return Bo(e),c(t,g);p()})});p()}}}},Jo=({loadendState:e,abortFn:t})=>i=>{const r=i.target;r.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)},Qo=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u})=>i=>{const r=i.target;if(!r.aborted)return e.stats=An(e.stats,Fo(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},Zo=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:r,abortFn:s,progressFn:n,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:d,id3Fn:u,captionsFn:c,isEndOfTimeline:h,endedTimelineFn:p,dataFn:f,doneFn:m,onTransmuxerLog:g})=>{const y=[],v=Ko({activeXhrs:y,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:d,id3Fn:u,captionsFn:c,isEndOfTimeline:h,endedTimelineFn:p,dataFn:f,doneFn:m,onTransmuxerLog:g});if(r.key&&!r.key.bytes){const i=[r.key];r.map&&!r.map.bytes&&r.map.key&&r.map.key.resolvedUri===r.key.resolvedUri&&i.push(r.map.key);const s=An(t,{uri:r.key.resolvedUri,responseType:"arraybuffer"}),n=$o(r,i,v),a=e(s,n);y.push(a)}if(r.map&&!r.map.bytes){const i=r.map.key&&(!r.key||r.key.resolvedUri!==r.map.key.resolvedUri);if(i){const i=An(t,{uri:r.map.key.resolvedUri,responseType:"arraybuffer"}),s=$o(r,[r.map.key],v),n=e(i,s);y.push(n)}const s=An(t,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:Ba(r.map)}),n=zo({segment:r,finishProcessingFn:v}),a=e(s,n);y.push(a)}const b=An(t,{uri:r.part&&r.part.resolvedUri||r.resolvedUri,responseType:"arraybuffer",headers:Ba(r)}),_=Vo({segment:r,finishProcessingFn:v,responseType:b.responseType}),T=e(b,_);T.addEventListener("progress",Qo({segment:r,progressFn:n,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:d,id3Fn:u,captionsFn:c,isEndOfTimeline:h,endedTimelineFn:p,dataFn:f})),y.push(T);const S={};return y.forEach(e=>{e.addEventListener("loadend",Jo({loadendState:S,abortFn:s}))}),()=>Bo(y)},el=In("CodecUtils"),tl=function(e){const t=e.attributes||{};if(t.CODECS)return Object(b["h"])(t.CODECS)},il=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},rl=(e,t)=>{if(!il(e,t))return!0;const i=t.attributes||{},r=e.mediaGroups.AUDIO[i.AUDIO];for(const s in r)if(!r[s].uri&&!r[s].playlists)return!0;return!1},sl=function(e){const t={};return e.forEach(({mediaType:e,type:i,details:r})=>{t[e]=t[e]||[],t[e].push(Object(b["i"])(`${i}${r}`))}),Object.keys(t).forEach((function(e){if(t[e].length>1)return el(`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},nl=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},al=function(e,t){const i=t.attributes||{},r=sl(tl(t)||[]);if(il(e,t)&&!r.audio&&!rl(e,t)){const t=sl(Object(b["d"])(e,i.AUDIO)||[]);t.audio&&(r.audio=t.audio)}return r},ol=In("PlaylistSelector"),ll=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})},dl=function(e,t){if(!e)return"";const i=s.a.getComputedStyle(e);return i?i[t]:""},ul=function(e,t){const i=e.slice();e.sort((function(e,r){const s=t(e,r);return 0===s?i.indexOf(e)-i.indexOf(r):s}))},cl=function(e,t){let i,r;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||s.a.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(r=t.attributes.BANDWIDTH),r=r||s.a.Number.MAX_VALUE,i-r},hl=function(e,t){let i,r;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||s.a.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(r=t.attributes.RESOLUTION.width),r=r||s.a.Number.MAX_VALUE,i===r&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-r};let pl=function(e,t,i,r,n,a){if(!e)return;const o={bandwidth:t,width:i,height:r,limitRenditionByPlayerDimensions:n};let l=e.playlists;fa.isAudioOnly(e)&&(l=a.getAudioTrackPlaylists_(),o.audioOnly=!0);let d=l.map(e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,r=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||s.a.Number.MAX_VALUE,{bandwidth:t,width:i,height:r,playlist:e}});ul(d,(e,t)=>e.bandwidth-t.bandwidth),d=d.filter(e=>!fa.isIncompatible(e.playlist));let u=d.filter(e=>fa.isEnabled(e.playlist));u.length||(u=d.filter(e=>!fa.isDisabled(e.playlist)));const c=u.filter(e=>e.bandwidth*mo.BANDWIDTH_VARIANCE<t);let h=c[c.length-1];const p=c.filter(e=>e.bandwidth===h.bandwidth)[0];if(!1===n){const e=p||u[0]||d[0];if(e&&e.playlist){let t="sortedPlaylistReps";return p&&(t="bandwidthBestRep"),u[0]&&(t="enabledPlaylistReps"),ol(`choosing ${ll(e)} using ${t} with options`,o),e.playlist}return ol("could not choose a playlist with options",o),null}const f=c.filter(e=>e.width&&e.height);ul(f,(e,t)=>e.width-t.width);const m=f.filter(e=>e.width===i&&e.height===r);h=m[m.length-1];const g=m.filter(e=>e.bandwidth===h.bandwidth)[0];let y,v,b,_;if(g||(y=f.filter(e=>e.width>i||e.height>r),v=y.filter(e=>e.width===y[0].width&&e.height===y[0].height),h=v[v.length-1],b=v.filter(e=>e.bandwidth===h.bandwidth)[0]),a.leastPixelDiffSelector){const e=f.map(e=>(e.pixelDiff=Math.abs(e.width-i)+Math.abs(e.height-r),e));ul(e,(e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff),_=e[0]}const T=_||b||g||p||u[0]||d[0];if(T&&T.playlist){let e="sortedPlaylistReps";return _?e="leastPixelDiffRep":b?e="resolutionPlusOneRep":g?e="resolutionBestRep":p?e="bandwidthBestRep":u[0]&&(e="enabledPlaylistReps"),ol(`choosing ${ll(T)} using ${e} with options`,o),T.playlist}return ol("could not choose a playlist with options",o),null};const fl=function(){const e=this.useDevicePixelRatio&&s.a.devicePixelRatio||1;return pl(this.playlists.main,this.systemBandwidth,parseInt(dl(this.tech_.el(),"width"),10)*e,parseInt(dl(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.playlistController_)},ml=function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){const r=this.useDevicePixelRatio&&s.a.devicePixelRatio||1;return t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),pl(this.playlists.main,t,parseInt(dl(this.tech_.el(),"width"),10)*r,parseInt(dl(this.tech_.el(),"height"),10)*r,this.limitRenditionByPlayerDimensions,this.playlistController_)}},gl=function(e){const{main:t,currentTime:i,bandwidth:r,duration:s,segmentDuration:n,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,d=t.playlists.filter(e=>!fa.isIncompatible(e));let u=d.filter(fa.isEnabled);u.length||(u=d.filter(e=>!fa.isDisabled(e)));const c=u.filter(fa.hasAttribute.bind(null,"BANDWIDTH")),h=c.map(e=>{const t=l.getSyncPoint(e,s,o,i),d=t?1:2,u=fa.estimateSegmentRequestTime(n,r,e),c=u*d-a;return{playlist:e,rebufferingImpact:c}}),p=h.filter(e=>e.rebufferingImpact<=0);return ul(p,(e,t)=>cl(t.playlist,e.playlist)),p.length?p[0]:(ul(h,(e,t)=>e.rebufferingImpact-t.rebufferingImpact),h[0]||null)},yl=function(){const e=this.playlists.main.playlists.filter(fa.isEnabled);ul(e,(e,t)=>cl(e,t));const t=e.filter(e=>!!al(this.playlists.main,e).video);return t[0]||null},vl=e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach(e=>{t.set(e,i),i+=e.byteLength})),t},bl=function(e,t,i){if(!e[i]){t.trigger({type:"usage",name:"vhs-608"});let r=i;/^cc708_/.test(i)&&(r="SERVICE"+i.split("_")[1]);const s=t.textTracks().getTrackById(r);if(s)e[i]=s;else{const s=t.options_.vhs&&t.options_.vhs.captionServices||{};let n=i,a=i,o=!1;const l=s[r];l&&(n=l.label,a=l.language,o=l.default),e[i]=t.addRemoteTextTrack({kind:"captions",id:r,default:o,label:n,language:a},!1).track}}},_l=function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const r=s.a.WebKitDataCue||s.a.VTTCue;t.forEach(t=>{const s=t.stream;e[s].addCue(new r(t.startTime+i,t.endTime+i,t.text))})},Tl=function(e){Object.defineProperties(e.frame,{id:{get(){return bn.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get(){return bn.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get(){return bn.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})},Sl=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:r})=>{if(!t)return;const n=s.a.WebKitDataCue||s.a.VTTCue,a=e.metadataTrack_;if(!a)return;if(t.forEach(e=>{const t=e.cueTime+i;!("number"!==typeof t||s.a.isNaN(t)||t<0)&&t<1/0&&e.frames.forEach(e=>{const i=new n(t,t,e.value||e.url||e.data||"");i.frame=e,i.value=e,Tl(i),a.addCue(i)})}),!a.cues||!a.cues.length)return;const o=a.cues,l=[];for(let s=0;s<o.length;s++)o[s]&&l.push(o[s]);const d=l.reduce((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e},{}),u=Object.keys(d).sort((e,t)=>Number(e)-Number(t));u.forEach((e,t)=>{const i=d[e],s=Number(u[t+1])||r;i.forEach(e=>{e.endTime=s})})},wl=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=t)},El=function(e,t,i){let r,s;if(i&&i.cues){r=i.cues.length;while(r--)s=i.cues[r],s.startTime>=e&&s.endTime<=t&&i.removeCue(s)}},Cl=function(e){const t=e.cues;if(t)for(let i=0;i<t.length;i++){const r=[];let s=0;for(let e=0;e<t.length;e++)t[i].startTime===t[e].startTime&&t[i].endTime===t[e].endTime&&t[i].text===t[e].text&&(s++,s>1&&r.push(t[e]));r.length&&r.forEach(t=>e.removeCue(t))}},xl=(e,t,i)=>{if("undefined"===typeof t||null===t||!e.length)return[];const r=Math.ceil((t-i+3)*k["ONE_SECOND_IN_TS"]);let s;for(s=0;s<e.length;s++)if(e[s].pts>r)break;return e.slice(s)},kl=(e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const r=t[0].pts;let s=0;for(s;s<e.length;s++)if(e[s].pts>=r)break;return e.slice(0,s).concat(t)},Il=(e,t,i,r)=>{const s=Math.ceil((t-r)*k["ONE_SECOND_IN_TS"]),n=Math.ceil((i-r)*k["ONE_SECOND_IN_TS"]),a=e.slice();let o=e.length;while(o--)if(e[o].pts<=n)break;if(-1===o)return a;let l=o+1;while(l--)if(e[l].pts<=s)break;return l=Math.max(l,0),a.splice(l,o-l+1),a},Al=function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),r=Object.keys(t).sort();if(i.length!==r.length)return!1;for(let s=0;s<i.length;s++){const n=i[s];if(n!==r[s])return!1;if(e[n]!==t[n])return!1}return!0},Ol=22,Pl=function(e,t,i){t=t||[];const r=[];let s=0;for(let n=0;n<t.length;n++){const a=t[n];if(e===a.timeline&&(r.push(n),s+=a.duration,s>i))return n}return 0===r.length?0:r[r.length-1]},Ll=1,Dl=500,Ml=e=>"number"===typeof e&&isFinite(e),Nl=1/60,Rl=(e,t,i)=>"main"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.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&&i.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,Ul=(e,t,i)=>{let r=t-mo.BACK_BUFFER_LENGTH;e.length&&(r=Math.max(r,e.start(0)));const s=t-i;return Math.min(s,r)},Bl=e=>{const{startOfSegment:t,duration:i,segment:r,part:s,playlist:{mediaSequence:n,id:a,segments:o=[]},mediaIndex:l,partIndex:d,timeline:u}=e,c=o.length-1;let h="mediaIndex/partIndex increment";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(h+=" with independent "+e.independent);const p="number"===typeof d,f=e.segment.uri?"segment":"pre-segment",m=p?Wn({preloadSegment:r})-1:0;return`${f} [${n+l}/${n+c}]`+(p?` part [${d}/${m}]`:"")+` segment start/end [${r.start} => ${r.end}]`+(p?` part start/end [${s.start} => ${s.end}]`:"")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${u}]`+` selected by [${h}]`+` playlist [${a}]`},jl=e=>e+"TimingInfo",Fl=({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:r,overrideCheck:s})=>s||e!==t?e<t?i:r.length?r.end(r.length-1):i:null,ql=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:r,audioDisabled:s})=>{if(t===i)return!1;if("audio"===r){const t=e.lastTimelineChange({type:"main"});return!t||t.to!==i}if("main"===r&&s){const t=e.pendingTimelineChange({type:"audio"});return!t||t.to!==i}return!1},$l=e=>{let t=0;return["video","audio"].forEach((function(i){const r=e[i+"TimingInfo"];if(!r)return;const{start:n,end:a}=r;let o;"bigint"===typeof n||"bigint"===typeof a?o=s.a.BigInt(a)-s.a.BigInt(n):"number"===typeof n&&"number"===typeof a&&(o=a-n),"undefined"!==typeof o&&o>t&&(t=o)})),"bigint"===typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t},Hl=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Pn,zl=(e,t)=>{if("hls"!==t)return null;const i=$l({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const r=e.playlist.targetDuration,s=Hl({segmentDuration:i,maxDuration:2*r}),n=Hl({segmentDuration:i,maxDuration:r}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${r}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return s||n?{severity:s?"warn":"info",message:a}:null};class Vl extends bn.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError("Initialization settings are required");if("function"!==typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=bn.browser.IE_VERSION>=11,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=In(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",()=>{this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}),"main"===this.loaderType_&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}),"audio"===this.loaderType_&&this.timelineChangeController_.on("timelinechange",()=>{this.hasEnoughInfoToLoad_()&&this.processLoadQueue_(),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()})}createTransmuxer_(){return No.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&s.a.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,s.a.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)}error(e){return"undefined"!==typeof e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&No.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return On();if("main"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:r}=e;if(i&&t&&!this.audioDisabled_&&!r)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ha(e);let r=this.initSegments_[i];return t&&!r&&e.bytes&&(this.initSegments_[i]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),r||e}segmentKey(e,t=!1){if(!e)return null;const i=za(e);let r=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!r&&e.bytes&&(this.keyCache_[i]=r={resolvedUri:e.resolvedUri,bytes:e.bytes});const s={resolvedUri:(r||e).resolvedUri};return r&&(s.bytes=r.bytes),s}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){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"))}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;const i=this.playlist_,r=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let s=null;if(i&&(i.id?s=i.id:i.uri&&(s=i.uri)),this.logger_(`playlist update [${s} => ${e.id||e.uri}]`),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri)return null!==this.mediaIndex&&(e.endList?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");const n=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${n}]`),null!==this.mediaIndex)if(this.mediaIndex-=n,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}r&&(r.mediaIndex-=n,r.mediaIndex<0?(r.mediaIndex=null,r.partIndex=null):(r.mediaIndex>=0&&(r.segment=e.segments[r.mediaIndex]),r.partIndex>=0&&r.segment.parts&&(r.part=r.segment.parts[r.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(s.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}resetLoader(){this.fetchAtBuffer_=!1,this.resyncLoader()}resyncLoader(){this.transmuxer_&&No.reset(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"})}remove(e,t,i=(()=>{}),r=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_("skipping remove because end ${end} is <= start ${start}");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_("skipping remove because no source updater or starting media info");let s=1;const n=()=>{s--,0===s&&i()};!r&&this.audioDisabled_||(s++,this.sourceUpdater_.removeAudio(e,t,n)),(r||"main"===this.loaderType_)&&(this.gopBuffer_=Il(this.gopBuffer_,e,t,this.timeMapping_),s++,this.sourceUpdater_.removeVideo(e,t,n));for(const a in this.inbandTextTracks_)El(e,t,this.inbandTextTracks_[a]);El(e,t,this.segmentMetadataTrack_),n()}monitorBuffer_(){this.checkBufferTimeout_&&s.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=s.a.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&s.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=s.a.setTimeout(this.monitorBufferTick_.bind(this),Dl)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const 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))}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const r="number"===typeof e&&t.segments[e],s=e+1===t.segments.length,n=!r||!r.parts||i+1===r.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&s&&n}chooseNextRequest_(){const e=this.buffered_(),t=$n(e)||0,i=Hn(e,this.currentTime_()),r=!this.hasPlayed_()&&i>=1,s=i>=this.goalBufferLength_(),n=this.playlist_.segments;if(!n.length||r||s)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=Pl(this.currentTimeline_,n,t);else if(null!==this.mediaIndex){const e=n[this.mediaIndex],i="number"===typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{const{segmentIndex:e,startTime:i,partIndex:r}=fa.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?t:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});a.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+t:"currentTime "+this.currentTime_(),a.mediaIndex=e,a.startOfSegment=i,a.partIndex=r}const o=n[a.mediaIndex];let l=o&&"number"===typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||"number"===typeof a.partIndex&&!l)return null;if("number"!==typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]),!i&&l&&!l.independent)if(0===a.partIndex){const e=n[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent="previous segment")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent="previous part");const d=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return a.mediaIndex>=n.length-1&&d&&!this.seeking_()?null:this.generateSegmentInfo_(a)}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:r,startOfSegment:s,isSyncRequest:n,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,d=i.segments[r],u="number"===typeof a&&d.parts[a],c={requestId:"segment-loader-"+Math.random(),uri:u&&u.resolvedUri||d.resolvedUri,mediaIndex:r,partIndex:u?a:null,isSyncRequest:n,startOfSegment:s,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:d.timeline,duration:u&&u.duration||d.duration,segment:d,part:u,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h="undefined"!==typeof o?o:this.isPendingTimestampOffset_;c.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:d.timeline,currentTimeline:this.currentTimeline_,startOfSegment:s,buffered:this.buffered_(),overrideCheck:h});const p=$n(this.sourceUpdater_.audioBuffered());return"number"===typeof p&&(c.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(c.gopsToAlignWith=xl(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),c}timestampOffsetForSegment_(e){return Fl(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,r=this.pendingSegment_.duration,s=fa.estimateSegmentRequestTime(r,i,this.playlist_,e.bytesReceived),n=jn(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(s<=n)return;const a=gl({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:r,timeUntilRebuffer:n,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=s-n,l=o-a.rebufferingImpact;let d=.5;n<=Pn&&(d=1),!a.playlist||a.playlist.uri===this.playlist_.uri||l<d||(this.bandwidth=a.playlist.attributes.BANDWIDTH*mo.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_("Aborting "+Bl(e)),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")}handleTrackInfo_(e,t){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},Al(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()))}handleTimingInfo_(e,t,i,r){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const s=this.pendingSegment_,n=jl(t);s[n]=s[n]||{},s[n][i]=r,this.logger_(`timinginfo: ${t} - ${i} - ${r}`),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_("SegmentLoader received no captions from a caption event");const i=this.pendingSegment_;if(!i.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};t.forEach(e=>{s[e.stream]=s[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+r),t.endTime=Math.max(t.endTime,e.endTime+r),t.captions.push(e)}),Object.keys(s).forEach(e=>{const{startTime:t,endTime:i,captions:n}=s[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${i} for ${e}`),bl(a,this.vhs_.tech_,e),El(t,i,a[e]),_l({captionArray:n,inbandTextTracks:a,timestampOffset:r})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const r=this.pendingSegment_;if(!r.hasAppendedData_)return void this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i));const s=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();wl(this.inbandTextTracks_,i,this.vhs_.tech_),Sl({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:this.duration_()})}processMetadataQueue_(){this.metadataQueue_.id3.forEach(e=>e()),this.metadataQueue_.caption.forEach(e=>e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach(e=>e())}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach(e=>e())}hasEnoughInfoToLoad_(){if("audio"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!ql({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:r,isMuxed:s}=t;return!(r&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!s&&!e.audioTimingInfo)&&!ql({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger("fmp4"),i.timingInfo.start=i[jl(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t="main"===this.loaderType_&&e&&e.hasVideo;let r;t&&(r=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:r,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:"main"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(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)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:r}){if(i){const e=Ha(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=r,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},r){const n=this.sourceUpdater_.audioBuffered(),a=this.sourceUpdater_.videoBuffered();n.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+Fn(n).join(", ")),a.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+Fn(a).join(", "));const o=n.length?n.start(0):0,l=n.length?n.end(n.length-1):0,d=a.length?a.start(0):0,u=a.length?a.end(a.length-1):0;if(l-o<=Ll&&u-d<=Ll)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Fn(n).join(", ")}, video buffer: ${Fn(a).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:e,type:t,bytes:i}));const c=this.currentTime_(),h=c-Ll;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+h),this.remove(0,h,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${Ll}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=s.a.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},1e3*Ll)},!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},r){r&&(r.code!==Ol?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",r),this.error(`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:r,bytes:s}){if(!s){const e=[r];let t=r.byteLength;i&&(e.unshift(i),t+=i.byteLength),s=vl({bytes:t,segments:e})}this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:s},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:s}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const r=this.pendingSegment_.segment,s=e+"TimingInfo";r[s]||(r[s]={}),r[s].transmuxerPrependedSeconds=i.prependedContentDuration||0,r[s].transmuxedPresentationStart=i.start.presentation,r[s].transmuxedDecodeStart=i.start.decode,r[s].transmuxedPresentationEnd=i.end.presentation,r[s].transmuxedDecodeEnd=i.end.decode,r[s].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:r}=t;if(!r||!r.byteLength)return;if("audio"===i&&this.audioDisabled_)return;const s=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:s,data:r})}loadSegment_(e){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(()=>{const t=y()({},e,{forceTimestampOffset:!0});y()(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)})}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),r=null!==this.mediaIndex,s=e.timeline!==this.currentTimeline_&&e.timeline>0,n=i||r&&s;this.logger_("Requesting "+Bl(e)),t.map&&!t.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Zo({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:n,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:r})=>{this.logger_(`${Bl(e)} logged from transmuxer stream ${r} as a ${i}: ${t}`)}})}trimBackBuffer_(e){const t=Ul(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},s=e.playlist.segments[e.mediaIndex-1];if(s&&s.timeline===t.timeline&&(s.videoTimingInfo?r.baseStartTime=s.videoTimingInfo.transmuxedDecodeEnd:s.audioTimingInfo&&(r.baseStartTime=s.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=i}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e<Nl?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record "+Nl):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state="READY",e.code===Uo.ABORTED)return;return this.pause(),e.code===Uo.TIMEOUT?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}const r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,t.stats),r.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=kl(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(r)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){"number"===typeof e.start&&"number"===typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:r,currentVideoTimestampOffset:s,useVideoTimingInfo:n,videoTimingInfo:a,audioTimingInfo:o}){if("undefined"!==typeof e)return e;if(!n)return o.start;const l=t.segments[i-1];return 0!==i&&l&&"undefined"!==typeof l.start&&l.end===r+s?a.start:r}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0}),void this.trigger("error");const{hasAudio:i,hasVideo:r,isMuxed:s}=t,n="main"===this.loaderType_&&r,a=!this.audioDisabled_&&i&&!s;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);n&&e.waitingOnAppends++,a&&e.waitingOnAppends++,n&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=Rl(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger("error"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||"number"!==typeof e.timingInfo.start||e.changedTimestampOffset||"main"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&"number"===typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&"number"===typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i="main"===this.loaderType_&&t&&t.hasVideo,r=i&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;r&&(e.timingInfo.end="number"===typeof r.end?r.end:r.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});const t=zl(e,this.sourceType_);if(t&&("warn"===t.severity?bn.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest&&(this.trigger("syncinfoupdate"),!e.hasAppendedData_))return void this.logger_("Throwing away un-appended sync request "+Bl(e));this.logger_("Appended "+Bl(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");const i=e.segment,r=e.part,s=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,n=r&&r.end&&this.currentTime_()-r.end>3*e.playlist.partTargetDuration;if(s||n)return this.logger_(`bad ${s?"segment":"part"} ${Bl(e)}`),void this.resetEverything();const a=null!==this.mediaIndex;a&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Nl)return void this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record "+Nl);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,r=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(r-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,r=t.end;if(!Ml(i)||!Ml(r))return;El(i,r,this.segmentMetadataTrack_);const n=s.a.WebKitDataCue||s.a.VTTCue,a={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:i,end:r},o=JSON.stringify(a),l=new n(i,r,o);l.value=a,this.segmentMetadataTrack_.addCue(l)}}function Gl(){}const Wl=function(e){return"string"!==typeof e?e:e.replace(/./,e=>e.toUpperCase())},Xl=["video","audio"],Yl=(e,t)=>{const i=t[e+"Buffer"];return i&&i.updating||t.queuePending[e]},Kl=(e,t)=>{for(let i=0;i<t.length;i++){const r=t[i];if("mediaSource"===r.type)return null;if(r.type===e)return i}return null},Jl=(e,t)=>{if(0===t.queue.length)return;let i=0,r=t.queue[i];if("mediaSource"!==r.type){if("mediaSource"!==e&&t.ready()&&"closed"!==t.mediaSource.readyState&&!Yl(e,t)){if(r.type!==e){if(i=Kl(e,t.queue),null===i)return;r=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=r,r.action(e,t),r.doneFn?void 0:(t.queuePending[e]=null,void Jl(e,t))}}else t.updating()||"closed"===t.mediaSource.readyState||(t.queue.shift(),r.action(t),r.doneFn&&r.doneFn(),Jl("audio",t),Jl("video",t))},Ql=(e,t)=>{const i=t[e+"Buffer"],r=Wl(e);i&&(i.removeEventListener("updateend",t[`on${r}UpdateEnd_`]),i.removeEventListener("error",t[`on${r}Error_`]),t.codecs[e]=null,t[e+"Buffer"]=null)},Zl=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),ed={appendBuffer:(e,t,i)=>(r,s)=>{const n=s[r+"Buffer"];if(Zl(s.mediaSource,n)){s.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${r}Buffer`);try{n.appendBuffer(e)}catch(a){s.logger_(`Error with code ${a.code} `+(a.code===Ol?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${t.mediaIndex} to ${r}Buffer`),s.queuePending[r]=null,i(a)}}},remove:(e,t)=>(i,r)=>{const s=r[i+"Buffer"];if(Zl(r.mediaSource,s)){r.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{s.remove(e,t)}catch(n){r.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},timestampOffset:e=>(t,i)=>{const r=i[t+"Buffer"];Zl(i.mediaSource,r)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),r.timestampOffset=e)},callback:e=>(t,i)=>{e()},endOfStream:e=>t=>{if("open"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||""})`);try{t.mediaSource.endOfStream(e)}catch(i){bn.log.warn("Failed to call media source endOfStream",i)}}},duration:e=>t=>{t.logger_("Setting mediaSource duration to "+e);try{t.mediaSource.duration=e}catch(i){bn.log.warn("Failed to set media source duration",i)}},abort:()=>(e,t)=>{if("open"!==t.mediaSource.readyState)return;const i=t[e+"Buffer"];if(Zl(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(r){bn.log.warn(`Failed to abort on ${e}Buffer`,r)}}},addSourceBuffer:(e,t)=>i=>{const r=Wl(e),s=Object(b["e"])(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const n=i.mediaSource.addSourceBuffer(s);n.addEventListener("updateend",i[`on${r}UpdateEnd_`]),n.addEventListener("error",i[`on${r}Error_`]),i.codecs[e]=t,i[e+"Buffer"]=n},removeSourceBuffer:e=>t=>{const i=t[e+"Buffer"];if(Ql(e,t),Zl(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(r){bn.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,r)}}},changeType:e=>(t,i)=>{const r=i[t+"Buffer"],s=Object(b["e"])(e);Zl(i.mediaSource,r)&&i.codecs[t]!==e&&(i.logger_(`changing ${t}Buffer codec from ${i.codecs[t]} to ${e}`),r.changeType(s),i.codecs[t]=e)}},td=({type:e,sourceUpdater:t,action:i,doneFn:r,name:s})=>{t.queue.push({type:e,action:i,doneFn:r,name:s}),Jl(e,t)},id=(e,t)=>i=>{if(t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[e+"Error_"])}Jl(e,t)};class rd extends bn.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Jl("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=In("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=id("video",this),this.onAudioUpdateEnd_=id("audio",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}addSourceBuffer(e,t){td({type:"mediaSource",sourceUpdater:this,action:ed.addSourceBuffer(e,t),name:"addSourceBuffer"})}abort(e){td({type:e,sourceUpdater:this,action:ed.abort(e),name:"abort"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?td({type:"mediaSource",sourceUpdater:this,action:ed.removeSourceBuffer(e),name:"removeSourceBuffer"}):bn.log.error("removeSourceBuffer is not supported!")}canRemoveSourceBuffer(){return!bn.browser.IE_VERSION&&!bn.browser.IS_FIREFOX&&s.a.MediaSource&&s.a.MediaSource.prototype&&"function"===typeof s.a.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return s.a.SourceBuffer&&s.a.SourceBuffer.prototype&&"function"===typeof s.a.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?td({type:e,sourceUpdater:this,action:ed.changeType(t),name:"changeType"}):bn.log.error("changeType is not supported!")}addOrChangeSourceBuffers(e){if(!e||"object"!==typeof e||0===Object.keys(e).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach(t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)})}appendBuffer(e,t){const{segmentInfo:i,type:r,bytes:s}=e;if(this.processedAppend_=!0,"audio"===r&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${s.length} until video append`);const n=t;if(td({type:r,sourceUpdater:this,action:ed.appendBuffer(s,i||{mediaIndex:-1},n),doneFn:t,name:"appendBuffer"}),"video"===r){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach(e=>{this.appendBuffer.apply(this,e)})}}audioBuffered(){return Zl(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:On()}videoBuffered(){return Zl(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:On()}buffered(){const e=Zl(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Zl(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():Un(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Gl){td({type:"mediaSource",sourceUpdater:this,action:ed.duration(e),name:"duration",doneFn:t})}endOfStream(e=null,t=Gl){"string"!==typeof e&&(e=void 0),td({type:"mediaSource",sourceUpdater:this,action:ed.endOfStream(e),name:"endOfStream",doneFn:t})}removeAudio(e,t,i=Gl){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?td({type:"audio",sourceUpdater:this,action:ed.remove(e,t),doneFn:i,name:"remove"}):i()}removeVideo(e,t,i=Gl){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?td({type:"video",sourceUpdater:this,action:ed.remove(e,t),doneFn:i,name:"remove"}):i()}updating(){return!(!Yl("audio",this)&&!Yl("video",this))}audioTimestampOffset(e){return"undefined"!==typeof e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(td({type:"audio",sourceUpdater:this,action:ed.timestampOffset(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return"undefined"!==typeof e&&this.videoBuffer&&this.videoTimestampOffset!==e&&(td({type:"video",sourceUpdater:this,action:ed.timestampOffset(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&td({type:"audio",sourceUpdater:this,action:ed.callback(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&&td({type:"video",sourceUpdater:this,action:ed.callback(e),name:"callback"})}dispose(){this.trigger("dispose"),Xl.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[e+"QueueCallback"](()=>Ql(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const sd=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),nd=new Uint8Array("\n\n".split("").map(e=>e.charCodeAt(0)));class ad extends Vl{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.loaderType_="subtitle",this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.shouldSaveSegmentTimingInfo_=!1}createTransmuxer_(){return null}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return On();const e=this.subtitlesTrack_.cues,t=e[0].startTime,i=e[e.length-1].startTime;return On([[t,i]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ha(e);let r=this.initSegments_[i];if(t&&!r&&e.bytes){const t=nd.byteLength+e.bytes.byteLength,s=new Uint8Array(t);s.set(e.bytes),s.set(nd,e.bytes.byteLength),this.initSegments_[i]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:s}}return r||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(e){return"undefined"===typeof e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){El(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};return this.syncController_.one("timestampoffset",e),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){while(e&&e.segment.empty){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state="READY");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===Uo.TIMEOUT&&this.handleTimeout_(),e.code===Uo.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");const n=r.segment;if(n.map&&(n.map.bytes=t.map.bytes),r.bytes=t.bytes,"function"!==typeof s.a.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){let r;const s=()=>{this.subtitlesTrack_.tech_.off("vttjsloaded",r),this.stopForError({message:"Error loading vtt.js"})};return r=()=>{this.subtitlesTrack_.tech_.off("vttjserror",s),this.segmentRequestFinished_(e,t,i)},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",r),void this.subtitlesTrack_.tech_.one("vttjserror",s)}n.requested=!0;try{this.parseVTTCues_(r)}catch(a){return void this.stopForError({message:a.message})}if(this.updateTimeMapping_(r,this.syncController_.timelines[r.timeline],this.playlist_),r.cues.length?r.timingInfo={start:r.cues[0].startTime,end:r.cues[r.cues.length-1].endTime}:r.timingInfo={start:r.startOfSegment,end:r.startOfSegment+r.duration},r.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");r.byteLength=r.bytes.byteLength,this.mediaSecondsLoaded+=n.duration,r.cues.forEach(e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new s.a.VTTCue(e.startTime,e.endTime,e.text):e)}),Cl(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(){}updateTimingInfoEnd_(){}parseVTTCues_(e){let t,i=!1;"function"===typeof s.a.TextDecoder?t=new s.a.TextDecoder("utf8"):(t=s.a.WebVTT.StringDecoder(),i=!0);const r=new s.a.WebVTT.Parser(s.a,s.a.vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},r.oncue=e.cues.push.bind(e.cues),r.ontimestampmap=t=>{e.timestampmap=t},r.onparsingerror=e=>{bn.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=sd(t)),r.parse(t)}let n=e.bytes;i&&(n=sd(n)),r.parse(n),r.flush()}updateTimeMapping_(e,t,i){const r=e.segment;if(!t)return;if(!e.cues.length)return void(r.empty=!0);const s=e.timestampmap,n=s.MPEGTS/k["ONE_SECOND_IN_TS"]-s.LOCAL+t.mapping;if(e.cues.forEach(e=>{e.startTime+=n,e.endTime+=n}),!i.syncInfo){const t=e.cues[0].startTime,s=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,s-r.duration)}}}}const od=function(e,t){const i=e.cues;for(let r=0;r<i.length;r++){const e=i[r];if(t>=e.adStartTime&&t<=e.adEndTime)return e}return null},ld=function(e,t,i=0){if(!e.segments)return;let r,n=i;for(let a=0;a<e.segments.length;a++){const i=e.segments[a];if(r||(r=od(t,n+i.duration/2)),r){if("cueIn"in i){r.endTime=n,r.adEndTime=n,n+=i.duration,r=null;continue}if(n<r.endTime){n+=i.duration;continue}r.endTime+=i.duration}else if("cueOut"in i&&(r=new s.a.VTTCue(n,n+i.duration,i.cueOut),r.adStartTime=n,r.adEndTime=n+parseFloat(i.cueOut),t.addCue(r)),"cueOutCont"in i){const[e,a]=i.cueOutCont.split("/").map(parseFloat);r=new s.a.VTTCue(n,n+i.duration,""),r.adStartTime=n-e,r.adEndTime=r.adStartTime+a,t.addCue(r)}n+=i.duration}},dd=86400,ud=[{name:"VOD",run:(e,t,i,r,s)=>{if(i!==1/0){const e={time:0,segmentIndex:0,partIndex:null};return e}return null}},{name:"ProgramDateTime",run:(e,t,i,r,s)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let n=null,a=null;const o=Vn(t);s=s||0;for(let l=0;l<o.length;l++){const i=t.endList||0===s?l:o.length-(l+1),r=o[i],d=r.segment,u=e.timelineToDatetimeMappings[d.timeline];if(!u||!d.dateTimeObject)continue;const c=d.dateTimeObject.getTime()/1e3;let h=c+u;if(d.parts&&"number"===typeof r.partIndex)for(let e=0;e<r.partIndex;e++)h+=d.parts[e].duration;const p=Math.abs(s-h);if(null!==a&&(0===p||a<p))break;a=p,n={time:h,segmentIndex:r.segmentIndex,partIndex:r.partIndex}}return n}},{name:"Segment",run:(e,t,i,r,s)=>{let n=null,a=null;s=s||0;const o=Vn(t);for(let l=0;l<o.length;l++){const e=t.endList||0===s?l:o.length-(l+1),i=o[e],d=i.segment,u=i.part&&i.part.start||d&&d.start;if(d.timeline===r&&"undefined"!==typeof u){const e=Math.abs(s-u);if(null!==a&&a<e)break;(!n||null===a||a>=e)&&(a=e,n={time:u,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return n}},{name:"Discontinuity",run:(e,t,i,r,s)=>{let n=null;if(s=s||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let r=0;r<t.discontinuityStarts.length;r++){const a=t.discontinuityStarts[r],o=t.discontinuitySequence+r+1,l=e.discontinuities[o];if(l){const e=Math.abs(s-l.time);if(null!==i&&i<e)break;(!n||null===i||i>=e)&&(i=e,n={time:l.time,segmentIndex:a,partIndex:null})}}}return n}},{name:"Playlist",run:(e,t,i,r,s)=>{if(t.syncInfo){const e={time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null};return e}return null}}];class cd extends bn.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={},this.logger_=In("SyncController")}getSyncPoint(e,t,i,r){const s=this.runStrategies_(e,t,i,r);return s.length?this.selectSyncPoint_(s,{key:"time",value:r}):null}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const r=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});return r.segmentIndex>0&&(r.time*=-1),Math.abs(r.time+Zn({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:r.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,r){const s=[];for(let n=0;n<ud.length;n++){const a=ud[n],o=a.run(this,e,t,i,r);o&&(o.strategy=a.name,s.push({strategy:a.name,syncPoint:o}))}return s}selectSyncPoint_(e,t){let i=e[0].syncPoint,r=Math.abs(e[0].syncPoint[t.key]-t.value),s=e[0].strategy;for(let n=1;n<e.length;n++){const a=Math.abs(e[n].syncPoint[t.key]-t.value);a<r&&(r=a,i=e[n].syncPoint,s=e[n].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${s}]: [time:${i.time}, segmentIndex:`+i.segmentIndex+("number"===typeof i.partIndex?",partIndex:"+i.partIndex:"")+"]"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>dd)bn.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let r=i-1;r>=0;r--){const i=e.segments[r];if(i&&"undefined"!==typeof 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}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),r=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:r.start}));const s=r.dateTimeObject;r.discontinuity&&t&&s&&(this.timelineToDatetimeMappings[r.timeline]=-s.getTime()/1e3)}timestampOffsetForTimeline(e){return"undefined"===typeof this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return"undefined"===typeof this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const r=e.segment,s=e.part;let n,a,o=this.timelines[e.timeline];if("number"===typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),n=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;n=t.start+o.mapping,a=t.end+o.mapping}return s&&(s.start=n,s.end=a),(!r.start||n<r.start)&&(r.start=n),r.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let r=0;r<t.discontinuityStarts.length;r++){const s=t.discontinuityStarts[r],n=t.discontinuitySequence+r+1,a=s-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[n]||this.discontinuities[n].accuracy>o){let r;r=a<0?i.start-Zn({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:s}):i.end+Zn({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:s}),this.discontinuities[n]={time:r,accuracy:o}}}}dispose(){this.trigger("dispose"),this.off()}}class hd extends bn.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:t,to:i}){return"number"===typeof t&&"number"===typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){return"number"===typeof t&&"number"===typeof i&&(this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e],this.trigger("timelinechange")),this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const pd=_o(To((function(){var t=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,r=0;r<i;++r)t[r].call(this,arguments[1]);else for(var s=Array.prototype.slice.call(arguments,1),n=t.length,a=0;a<n;++a)t[a].apply(this,s)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();
28
+ const xn=m["a"],kn=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,In=e=>bn.log.debug?bn.log.debug.bind(bn,"VHS:",e+" >"):function(){};function An(...e){const t=bn.obj||bn,i=t.merge||t.mergeOptions;return i.apply(t,e)}function Pn(...e){const t=bn.time||bn,i=t.createTimeRanges||t.createTimeRanges;return i.apply(t,e)}const On=1/30,Ln=3*On,Dn=function(e,t){const i=[];let r;if(e&&e.length)for(r=0;r<e.length;r++)t(e.start(r),e.end(r))&&i.push([e.start(r),e.end(r)]);return Pn(i)},Mn=function(e,t){return Dn(e,(function(e,i){return e-Ln<=t&&i+Ln>=t}))},Nn=function(e,t){return Dn(e,(function(e){return e-On>=t}))},Rn=function(e){if(e.length<2)return Pn();const t=[];for(let i=1;i<e.length;i++){const r=e.end(i-1),s=e.start(i);t.push([r,s])}return Pn(t)},Un=function(e,t){let i=null,r=null,s=0;const n=[],a=[];if(!e||!e.length||!t||!t.length)return Pn();let o=e.length;while(o--)n.push({time:e.start(o),type:"start"}),n.push({time:e.end(o),type:"end"});o=t.length;while(o--)n.push({time:t.start(o),type:"start"}),n.push({time:t.end(o),type:"end"});for(n.sort((function(e,t){return e.time-t.time})),o=0;o<n.length;o++)"start"===n[o].type?(s++,2===s&&(i=n[o].time)):"end"===n[o].type&&(s--,1===s&&(r=n[o].time)),null!==i&&null!==r&&(a.push([i,r]),i=null,r=null);return Pn(a)},Bn=e=>{const t=[];if(!e||!e.length)return"";for(let i=0;i<e.length;i++)t.push(e.start(i)+" => "+e.end(i));return t.join(", ")},jn=function(e,t,i=1){const r=e.length?e.end(e.length-1):0;return(r-t)/i},Fn=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},qn=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1},$n=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Hn=function(e,t){let i=0;if(!e||!e.length)return i;for(let r=0;r<e.length;r++){const s=e.start(r),n=e.end(r);t>n||(i+=t>s&&t<=n?n-t:n-s)}return i},zn=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach((function(e){i+=e.duration})),(t.preloadHints||[]).forEach((function(t){"PART"===t.type&&(i+=e.partTargetDuration)})),i},Vn=e=>(e.segments||[]).reduce((e,t,i)=>(t.parts?t.parts.forEach((function(r,s){e.push({duration:r.duration,segmentIndex:i,partIndex:s,part:r,segment:t})})):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e),[]),Gn=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},Wn=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let r=(i||[]).reduce((e,t)=>e+("PART"===t.type?1:0),0);return r+=t&&t.length?t.length:0,r},Xn=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Gn(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},Yn=function(e,t){let i=0,r=t-e.mediaSequence,s=e.segments[r];if(s){if("undefined"!==typeof s.start)return{result:s.start,precise:!0};if("undefined"!==typeof s.end)return{result:s.end-s.duration,precise:!0}}while(r--){if(s=e.segments[r],"undefined"!==typeof s.end)return{result:i+s.end,precise:!0};if(i+=zn(e,s),"undefined"!==typeof s.start)return{result:i+s.start,precise:!0}}return{result:i,precise:!1}},Kn=function(e,t){let i,r=0,s=t-e.mediaSequence;for(;s<e.segments.length;s++){if(i=e.segments[s],"undefined"!==typeof i.start)return{result:i.start-r,precise:!0};if(r+=zn(e,i),"undefined"!==typeof i.end)return{result:i.end-r,precise:!0}}return{result:-1,precise:!1}},Jn=function(e,t,i){if("undefined"===typeof t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const r=Yn(e,t);if(r.precise)return r.result;const s=Kn(e,t);return s.precise?s.result:r.result+i},Qn=function(e,t,i){if(!e)return 0;if("number"!==typeof i&&(i=0),"undefined"===typeof t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return s.a.Infinity}return Jn(e,t,i)},Zn=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:r}){let s=0;if(i>r&&([i,r]=[r,i]),i<0){for(let t=i;t<Math.min(0,r);t++)s+=e;i=0}for(let n=i;n<r;n++)s+=t[n].duration;return s},ea=function(e,t,i,r){if(!e||!e.segments)return null;if(e.endList)return Qn(e);if(null===t)return null;t=t||0;let s=Jn(e,e.mediaSequence+e.segments.length,t);return i&&(r="number"===typeof r?r:Xn(null,e),s-=r),Math.max(0,s)},ta=function(e,t,i){const r=!0,s=t||0,n=ea(e,t,r,i);return null===n?Pn():Pn(s,n)},ia=function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:r,startTime:s,exactManifestTimings:n}){let a=t-s;const o=Vn(e);let l=0;for(let d=0;d<o.length;d++){const e=o[d];if(i===e.segmentIndex&&("number"!==typeof r||"number"!==typeof e.partIndex||r===e.partIndex)){l=d;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,n){if(a<0)continue}else if(a+On<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:s-Zn({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let d=l;d<o.length;d++){const t=o[d];if(a-=t.duration,n){if(a>0)continue}else if(a-On>=0)continue;return{partIndex:t.partIndex,segmentIndex:t.segmentIndex,startTime:s+Zn({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:d})}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},ra=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},sa=function(e){return e.excludeUntil&&e.excludeUntil===1/0},na=function(e){const t=ra(e);return!e.disabled&&!t},aa=function(e){return e.disabled},oa=function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},la=function(e,t){return t.attributes&&t.attributes[e]},da=function(e,t,i,r=0){if(!la("BANDWIDTH",i))return NaN;const s=e*i.attributes.BANDWIDTH;return(s-8*r)/t},ua=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter(e=>!!na(e)&&(e.attributes.BANDWIDTH||0)<i).length},ca=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),ha=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let r=!1;for(const s in i){for(const e in i[s])if(r=t(i[s][e]),r)break;if(r)break}return!!r},pa=e=>{if(!e||!e.playlists||!e.playlists.length){const t=ha(e,e=>e.playlists&&e.playlists.length||e.uri);return t}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],r=i.attributes&&i.attributes.CODECS;if(r&&r.split(",").every(e=>Object(b["f"])(e)))continue;const s=ha(e,e=>ca(i,e));if(!s)return!1}return!0};var fa={liveEdgeDelay:Xn,duration:Qn,seekable:ta,getMediaInfoForTime:ia,isEnabled:na,isDisabled:aa,isExcluded:ra,isIncompatible:sa,playlistEnd:ea,isAes:oa,hasAttribute:la,estimateSegmentRequestTime:da,isLowestEnabledRendition:ua,isAudioOnly:pa,playlistMatch:ca,segmentDurationWithParts:zn};const{log:ma}=bn,ga=(e,t)=>`${e}-${t}`,ya=({onwarn:e,oninfo:t,manifestString:i,customTagParsers:r=[],customTagMappers:s=[],llhls:n})=>{const a=new v["a"];e&&a.on("warn",e),t&&a.on("info",t),r.forEach(e=>a.addParser(e)),s.forEach(e=>a.addTagMapper(e)),a.push(i),a.end();const o=a.manifest;if(n||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach((function(e){o.hasOwnProperty(e)&&delete o[e]})),o.segments&&o.segments.forEach((function(e){["parts","preloadHints"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce((e,t)=>Math.max(e,t.duration),0)),e&&e("manifest has no targetDuration defaulting to "+t),o.targetDuration=t}const l=Gn(o);if(l.length&&!o.partTargetDuration){const t=l.reduce((e,t)=>Math.max(e,t.duration),0);e&&(e("manifest has no partTargetDuration defaulting to "+t),ma.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),o.partTargetDuration=t}return o},va=(e,t)=>{e.mediaGroups&&["AUDIO","SUBTITLES"].forEach(i=>{if(e.mediaGroups[i])for(const r in e.mediaGroups[i])for(const s in e.mediaGroups[i][r]){const n=e.mediaGroups[i][r][s];t(n,i,r,s)}})},ba=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},_a=e=>{let t=e.playlists.length;while(t--){const i=e.playlists[t];ba({playlist:i,id:ga(t,i.uri)}),i.resolvedUri=xn(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||ma.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},Ta=e=>{va(e,t=>{t.uri&&(t.resolvedUri=xn(e.uri,t.uri))})},Sa=(e,t)=>{const i=ga(0,t),r={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:s.a.location.href,resolvedUri:s.a.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return r.playlists[i]=r.playlists[0],r.playlists[t]=r.playlists[0],r},wa=(e,t)=>{e.uri=t;for(let r=0;r<e.playlists.length;r++)if(!e.playlists[r].uri){const t="placeholder-uri-"+r;e.playlists[r].uri=t}const i=pa(e);va(e,(t,r,s,n)=>{const a=`placeholder-uri-${r}-${s}-${n}`;if(!t.playlists||!t.playlists.length){if(i&&"AUDIO"===r&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===s)return}t.playlists=[y()({},t)]}t.playlists.forEach((function(t,i){const r=ga(i,a);t.uri?t.resolvedUri=t.resolvedUri||xn(e.uri,t.uri):(t.uri=0===i?a:r,t.resolvedUri=t.uri),t.id=t.id||r,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))}),_a(e),Ta(e)},{EventTarget:Ea}=bn,Ca=(e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let r=t.mediaSequence+t.segments.length;if(e){const s=e.parts||[],n=Wn(t)-1;n>-1&&n!==s.length-1&&(i._HLS_part=n),(n>-1||s.length)&&r--}i._HLS_msn=r}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(i).length){const t=new s.a.URL(e);["_HLS_skip","_HLS_msn","_HLS_part"].forEach((function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])})),e=t.toString()}return e},xa=(e,t)=>{if(!e)return t;const i=An(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let r=0;r<t.parts.length;r++)e.parts&&e.parts[r]&&(i.parts[r]=An(e.parts[r],t.parts[r]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},ka=(e,t,i)=>{const r=e.slice(),s=t.slice();i=i||0;const n=[];let a;for(let o=0;o<s.length;o++){const e=r[o+i],t=s[o];e?(a=e.map||a,n.push(xa(e,t))):(a&&!t.map&&(t.map=a),n.push(t))}return n},Ia=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=xn(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=xn(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=xn(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=xn(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach(e=>{e.resolvedUri||(e.resolvedUri=xn(t,e.uri))}),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach(e=>{e.resolvedUri||(e.resolvedUri=xn(t,e.uri))})},Aa=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if("MAP"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},Pa=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Oa=(e,t,i=Pa)=>{const r=An(e,{}),s=r.playlists[t.id];if(!s)return null;if(i(s,t))return null;t.segments=Aa(t);const n=An(s,t);if(n.preloadSegment&&!t.preloadSegment&&delete n.preloadSegment,s.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}n.segments=ka(s.segments,t.segments,t.mediaSequence-s.mediaSequence)}n.segments.forEach(e=>{Ia(e,n.resolvedUri)});for(let a=0;a<r.playlists.length;a++)r.playlists[a].id===t.id&&(r.playlists[a]=n);return r.playlists[t.id]=n,r.playlists[t.uri]=n,va(e,(e,i,r,s)=>{if(e.playlists)for(let a=0;a<e.playlists.length;a++)t.id===e.playlists[a].id&&(e.playlists[a]=n)}),r},La=(e,t)=>{const i=e.segments||[],r=i[i.length-1],s=r&&r.parts&&r.parts[r.parts.length-1],n=s&&s.duration||r&&r.duration;return t&&n?1e3*n:500*(e.partTargetDuration||e.targetDuration||10)};class Da extends Ea{constructor(e,t,i={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=In("PlaylistLoader");const{withCredentials:r=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=r;const s=t.options_;this.customTagParsers=s&&s.customTagParsers||[],this.customTagMappers=s&&s.customTagMappers||[],this.llhls=s&&s.llhls,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_)}handleMediaupdatetimeout_(){if("HAVE_METADATA"!==this.state)return;const e=this.media();let t=xn(this.main.uri,e.uri);this.llhls&&(t=Ca(t,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials},(e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),"HAVE_METADATA"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})})}playlistRequestError(e,t,i){const{uri:r,id:s}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[s],status:e.status,message:`HLS playlist request error at URL: ${r}.`,responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")}parseManifest_({url:e,manifestString:t}){return ya({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls})}haveMetadata({playlistString:e,playlistObject:t,url:i,id:r}){this.request=null,this.state="HAVE_METADATA";const s=t||this.parseManifest_({url:i,manifestString:e});s.lastRequest=Date.now(),ba({playlist:s,uri:i,id:r});const n=Oa(this.main,s);this.targetDuration=s.partTargetDuration||s.targetDuration,this.pendingMedia_=null,n?(this.main=n,this.media_=this.main.playlists[r]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(La(this.media(),!!n)),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),s.a.clearTimeout(this.mediaUpdateTimeout),s.a.clearTimeout(this.finalRenditionTimeout),this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"===typeof e){if(!this.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.main.playlists[e]}if(s.a.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=s.a.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,r=!this.media_||e.id!==this.media_.id,n=this.main.playlists[e.id];if(n&&n.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(r&&(this.trigger("mediachanging"),"HAVE_MAIN_MANIFEST"===i?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(this.updateMediaUpdateTimeout_(La(e,!0)),r){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e,this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},(t,r)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=kn(e.resolvedUri,r),t)return this.playlistRequestError(this.request,e,i);this.haveMetadata({playlistString:r.responseText,url:e.uri,id:e.id}),"HAVE_MAIN_MANIFEST"===i?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}}pause(){this.mediaUpdateTimeout&&(s.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_MAIN_MANIFEST":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")}load(e){this.mediaUpdateTimeout&&(s.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=s.a.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},e)}else this.started?t&&!t.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(s.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=s.a.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(e)},e))}start(){if(this.started=!0,"object"===typeof this.src)return this.src.uri||(this.src.uri=s.a.location.href),this.src.resolvedUri=this.src.uri,void setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},(e,t)=>{if(!this.request)return;if(this.request=null,e)return this.error={status:t.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:t.responseText,code:2},"HAVE_NOTHING"===this.state&&(this.started=!1),this.trigger("error");this.src=kn(this.src,t);const i=this.parseManifest_({manifestString:t.responseText,url:this.src});this.setupInitialPlaylist(i)})}srcUri(){return"string"===typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state="HAVE_MAIN_MANIFEST",e.playlists)return this.main=e,wa(this.main,this.srcUri()),e.playlists.forEach(e=>{e.segments=Aa(e),e.segments.forEach(t=>{Ia(t,e.resolvedUri)})}),this.trigger("loadedplaylist"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||s.a.location.href;this.main=Sa(e,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}}const{xhr:Ma}=bn,Na=function(e,t,i,r){const s="arraybuffer"===e.responseType?e.response:e.responseText;!t&&s&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=s.byteLength||s.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(s||e.responseText)))),r(t,e)},Ra=function(){const e=function e(t,i){t=An({timeout:45e3},t);const r=e.beforeRequest||bn.Vhs.xhr.beforeRequest;if(r&&"function"===typeof r){const e=r(t);e&&(t=e)}const s=!0===bn.Vhs.xhr.original?Ma:bn.Vhs.xhr,n=s(t,(function(e,t){return Na(n,e,t,i)})),a=n.abort;return n.abort=function(){return n.aborted=!0,a.apply(n,arguments)},n.uri=t.uri,n.requestTime=Date.now(),n};return e.original=!0,e},Ua=function(e){let t;const i=e.offset;return t="bigint"===typeof e.offset||"bigint"===typeof e.length?s.a.BigInt(e.offset)+s.a.BigInt(e.length)-s.a.BigInt(1):e.offset+e.length-1,"bytes="+i+"-"+t},Ba=function(e){const t={};return e.byterange&&(t.Range=Ua(e.byterange)),t},ja=function(e,t){return e.start(t)+"-"+e.end(t)},Fa=function(e,t){const i=e.toString(16);return"00".substring(0,2-i.length)+i+(t%2?" ":"")},qa=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},$a=function(e){const t={};return Object.keys(e).forEach(i=>{const r=e[i];Object(T["e"])(r)?t[i]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:t[i]=r}),t},Ha=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},za=function(e){return e.resolvedUri},Va=e=>{const t=Array.prototype.slice.call(e),i=16;let r,s,n="";for(let a=0;a<t.length/i;a++)r=t.slice(a*i,a*i+i).map(Fa).join(""),s=t.slice(a*i,a*i+i).map(qa).join(""),n+=r+" "+s+"\n";return n},Ga=({bytes:e})=>Va(e),Wa=e=>{let t,i="";for(t=0;t<e.length;t++)i+=ja(e,t)+" ";return i};var Xa=Object.freeze({__proto__:null,createTransferableMessage:$a,initSegmentId:Ha,segmentKeyId:za,hexDump:Va,tagDump:Ga,textRanges:Wa});const Ya=.25,Ka=(e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,r=t.videoTimingInfo.transmuxedPresentationStart,s=r+i,n=e-s;return new Date(t.dateTimeObject.getTime()+1e3*n)},Ja=e=>e.transmuxedPresentationEnd-e.transmuxedPresentationStart-e.transmuxerPrependedSeconds,Qa=(e,t)=>{let i;try{i=new Date(e)}catch(l){return null}if(!t||!t.segments||0===t.segments.length)return null;let r=t.segments[0];if(i<r.dateTimeObject)return null;for(let d=0;d<t.segments.length-1;d++){r=t.segments[d];const e=t.segments[d+1].dateTimeObject;if(i<e)break}const s=t.segments[t.segments.length-1],n=s.dateTimeObject,a=s.videoTimingInfo?Ja(s.videoTimingInfo):s.duration+s.duration*Ya,o=new Date(n.getTime()+1e3*a);return i>o?null:(i>n&&(r=s),{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:fa.duration(t,t.mediaSequence+t.segments.indexOf(r)),type:r.videoTimingInfo?"accurate":"estimate"})},Za=(e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,r=0;for(let n=0;n<t.segments.length;n++)if(i=t.segments[n],r=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:r+i.duration,e<=r)break;const s=t.segments[t.segments.length-1];if(s.videoTimingInfo&&s.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>r){if(e>r+s.duration*Ya)return null;i=s}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:r-i.duration,type:i.videoTimingInfo?"accurate":"estimate"}},eo=(e,t)=>{let i,r;try{i=new Date(e),r=new Date(t)}catch(a){}const s=i.getTime(),n=r.getTime();return(n-s)/1e3},to=e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++){const i=e.segments[t];if(!i.dateTimeObject)return!1}return!0},io=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error("getProgramTime: callback must be provided");if(!e||void 0===t)return i({message:"getProgramTime: playlist and time must be provided"});const r=Za(t,e);if(!r)return i({message:"valid programTime was not found"});if("estimate"===r.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:r.estimatedStart});const s={mediaSeconds:t},n=Ka(t,r.segment);return n&&(s.programDateTime=n.toISOString()),i(null,s)},ro=({programTime:e,playlist:t,retryCount:i=2,seekTo:r,pauseAfterSeek:s=!0,tech:n,callback:a})=>{if(!a)throw new Error("seekToProgramTime: callback must be provided");if("undefined"===typeof e||!t||!r)return a({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!t.endList&&!n.hasStarted_)return a({message:"player must be playing a live stream to start buffering"});if(!to(t))return a({message:"programDateTime tags must be provided in the manifest "+t.resolvedUri});const o=Qa(e,t);if(!o)return a({message:e+" was not found in the stream"});const l=o.segment,d=eo(l.dateTimeObject,e);if("estimate"===o.type)return 0===i?a({message:e+" is not buffered yet. Try again"}):(r(o.estimatedStart+d),void n.one("seeked",()=>{ro({programTime:e,playlist:t,retryCount:i-1,seekTo:r,pauseAfterSeek:s,tech:n,callback:a})}));const u=l.start+d,c=()=>a(null,n.currentTime());n.one("seeked",c),s&&n.pause(),r(u)},so=(e,t)=>{if(4===e.readyState)return t()},no=(e,t,i)=>{let r,s=[],n=!1;const a=function(e,t,r,s){return t.abort(),n=!0,i(e,t,r,s)},o=function(e,t){if(n)return;if(e)return a(e,t,"",s);const i=t.responseText.substring(s&&s.byteLength||0,t.responseText.length);if(s=Object(T["d"])(s,Object(T["h"])(i,!0)),r=r||Object(C["a"])(s),s.length<10||r&&s.length<r+2)return so(t,()=>a(e,t,"",s));const o=Object(x["a"])(s);return"ts"===o&&s.length<188||!o&&s.length<376?so(t,()=>a(e,t,"",s)):a(null,t,o,s)},l={uri:e,beforeSend(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",(function({total:t,loaded:i}){return Na(e,null,{statusCode:e.status},o)}))}},d=t(l,(function(e,t){return Na(d,e,t,o)}));return d},{EventTarget:ao}=bn,oo=function(e,t){if(!Pa(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(let i=0;i<e.segments.length;i++){const r=e.segments[i],s=t.segments[i];if(r.uri!==s.uri)return!1;if(!r.byterange&&!s.byterange)continue;const n=r.byterange,a=s.byterange;if(n&&!a||!n&&a)return!1;if(n.offset!==a.offset||n.length!==a.length)return!1}return!0},lo=({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:r,previousManifest:s})=>{const n=Object(S["c"])(e,{manifestUri:t,clientOffset:i,sidxMapping:r,previousManifest:s});return wa(n,t),n},uo=(e,t,i)=>{let r=!0,s=An(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let n=0;n<t.playlists.length;n++){const e=t.playlists[n];if(e.sidx){const t=Object(S["b"])(e.sidx);i&&i[t]&&i[t].sidx&&Object(S["a"])(e,i[t].sidx,e.sidx.resolvedUri)}const a=Oa(s,e,oo);a&&(s=a,r=!1)}return va(t,(e,t,i,n)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Oa(s,e.playlists[0],oo);o&&(s=o,s.mediaGroups[t][i][n].playlists[0]=s.playlists[a],r=!1)}}),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(r=!1),r?null:s},co=(e,t)=>{const i=Boolean(!e.map&&!t.map),r=i||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length);return r&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length},ho=(e,t)=>{const i={};for(const r in e){const s=e[r],n=s.sidx;if(n){const e=Object(S["b"])(n);if(!t[e])break;const r=t[e].sidxInfo;co(r,n)&&(i[e]=t[e])}}return i},po=(e,t)=>{const i=ho(e.playlists,t);let r=i;return va(e,(e,i,s,n)=>{if(e.playlists&&e.playlists.length){const i=e.playlists;r=An(r,ho(i,t))}}),r};class fo extends ao{constructor(e,t,i={},r){super(),this.mainPlaylistLoader_=r||this,r||(this.isMain_=!0);const{withCredentials:s=!1}=i;if(this.vhs_=t,this.withCredentials=s,!e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",()=>{this.refreshXml_()}),this.on("mediaupdatetimeout",()=>{this.refreshMedia_(this.media().id)}),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=In("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error="object"!==typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2}:e,i&&(this.state=i),this.trigger("error"),!0):void 0)}addSidxSegments_(e,t,i){const r=e.sidx&&Object(S["b"])(e.sidx);if(!e.sidx||!r||this.mainPlaylistLoader_.sidxMapping_[r])return void(this.mediaRequest_=s.a.setTimeout(()=>i(!1),0));const n=kn(e.sidx.resolvedUri),a=(s,n)=>{if(this.requestErrored_(s,n,t))return;const a=this.mainPlaylistLoader_.sidxMapping_;let o;try{o=E()(Object(T["k"])(n.response).subarray(8))}catch(l){return void this.requestErrored_(l,n,t)}return a[r]={sidxInfo:e.sidx,sidx:o},Object(S["a"])(e,o,e.sidx.resolvedUri),i(!0)};this.request=no(n,this.vhs_.xhr,(t,i,r,s)=>{if(t)return a(t,i);if(!r||"mp4"!==r)return a({status:i.status,message:`Unsupported ${r||"unknown"} container type for sidx segment at URL: ${n}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i);const{offset:o,length:l}=e.sidx.byterange;if(s.length>=l+o)return a(t,{response:s.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:n,responseType:"arraybuffer",headers:Ba({byterange:e.sidx.byterange})},a)})}dispose(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},s.a.clearTimeout(this.minimumUpdatePeriodTimeout_),s.a.clearTimeout(this.mediaRequest_),s.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);const t=this.state;if("string"===typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(i&&(this.trigger("mediachanging"),this.trigger("mediachange")));i&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,t,i=>{this.haveMetadata({startingState:t,playlist:e})}))}haveMetadata({startingState:e,playlist:t}){this.state="HAVE_METADATA",this.loadedPlaylists_[t.id]=t,this.mediaRequest_=null,this.refreshMedia_(t.id),"HAVE_MAIN_MANIFEST"===e?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),s.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(s.a.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)}load(e){s.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=s.a.setTimeout(()=>this.load(),e)}else this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()}start(){this.started=!0,this.isMain_?this.requestMain_((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}):this.mediaRequest_=s.a.setTimeout(()=>this.haveMain_(),0)}requestMain_(e){this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},(t,i)=>{if(this.requestErrored_(t,i))return void("HAVE_NOTHING"===this.state&&(this.started=!1));const r=i.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=i.responseText,i.responseHeaders&&i.responseHeaders.date?this.mainLoaded_=Date.parse(i.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=kn(this.mainPlaylistLoader_.srcUrl,i),r?(this.handleMain_(),void this.syncClientServerClock_(()=>e(i,r))):e(i,r)})}syncClientServerClock_(e){const t=Object(S["d"])(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):"DIRECT"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:xn(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials},(i,r)=>{if(!this.request)return;if(i)return this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e();let s;s="HEAD"===t.method?r.responseHeaders&&r.responseHeaders.date?Date.parse(r.responseHeaders.date):this.mainLoaded_:Date.parse(r.responseText),this.mainPlaylistLoader_.clientOffset_=s-Date.now(),e()}))}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main;let t=lo({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e});e&&(t=uo(e,t,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=t||e;const i=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];return i&&i!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=i),(!e||t&&t.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(t)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(s.a.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.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)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=s.a.setTimeout(()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=po(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,e=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(e){if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=s.a.setTimeout(()=>{this.trigger("mediaupdatetimeout"),e()},La(this.media(),Boolean(i))))};e()}this.trigger("loadedplaylist")}}var mo={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const go=e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer},yo=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},vo=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}},bo=function(e){return function(){const t=vo(e),i=yo(new Worker(t));i.objURL=t;const r=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),r.call(this)},i}},_o=function(e){return`var browserWorkerPolyFill = ${yo.toString()};\nbrowserWorkerPolyFill(self);\n`+e},To=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},So=_o(To((function(){var t="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},i=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var r;return!!e[t]&&(r=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(r,1),r>-1)},this.trigger=function(t){var i,r,s,n;if(i=e[t],i)if(2===arguments.length)for(s=i.length,r=0;r<s;++r)i[r].call(this,arguments[1]);else{for(n=[],r=arguments.length,r=1;r<arguments.length;++r)n.push(arguments[r]);for(s=i.length,r=0;r<s;++r)i[r].apply(this,n)}},this.dispose=function(){e={}}}};i.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},i.prototype.push=function(e){this.trigger("data",e)},i.prototype.flush=function(e){this.trigger("done",e)},i.prototype.partialFlush=function(e){this.trigger("partialdone",e)},i.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},i.prototype.reset=function(e){this.trigger("reset",e)};var r,s,n,a,o,l,d,u,c,h,p,f,m,g,y,v,b,_,T,S,w,E,C,x,k,I,A,P,O,L,D,M,N,R,U,B,j=i,F=Math.pow(2,32),q=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0),t<Number.MAX_SAFE_INTEGER?Number(t):t):i.getUint32(0)*F+i.getUint32(4)},$={getUint64:q,MAX_UINT32:F},H=$.MAX_UINT32;(function(){var e;if(C={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!==typeof Uint8Array){for(e in C)C.hasOwnProperty(e)&&(C[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);x=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),I=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),k=new Uint8Array([0,0,0,1]),A=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),P=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),O={video:A,audio:P},M=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),N=new Uint8Array([0,0,0,0,0,0,0,0]),R=N,U=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),B=N,L=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),r=function(e){var t,i,r,s=[],n=0;for(t=1;t<arguments.length;t++)s.push(arguments[t]);t=s.length;while(t--)n+=s[t].byteLength;for(i=new Uint8Array(n+8),r=new DataView(i.buffer,i.byteOffset,i.byteLength),r.setUint32(0,i.byteLength),i.set(e,4),t=0,n=8;t<s.length;t++)i.set(s[t],n),n+=s[t].byteLength;return i},s=function(){return r(C.dinf,r(C.dref,M))},n=function(e){return r(C.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},a=function(){return r(C.ftyp,x,k,x,I)},v=function(e){return r(C.hdlr,O[e])},o=function(e){return r(C.mdat,e)},y=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),r(C.mdhd,t)},g=function(e){return r(C.mdia,y(e),v(e.type),d(e))},l=function(e){return r(C.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},d=function(e){return r(C.minf,"video"===e.type?r(C.vmhd,L):r(C.smhd,D),s(),_(e))},u=function(e,t){var i=[],s=t.length;while(s--)i[s]=S(t[s]);return r.apply(null,[C.moof,l(e)].concat(i))},c=function(e){var t=e.length,i=[];while(t--)i[t]=f(e[t]);return r.apply(null,[C.moov,p(4294967295)].concat(i).concat(h(e)))},h=function(e){var t=e.length,i=[];while(t--)i[t]=w(e[t]);return r.apply(null,[C.mvex].concat(i))},p=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 r(C.mvhd,t)},b=function(e){var t,i,s=e.samples||[],n=new Uint8Array(4+s.length);for(i=0;i<s.length;i++)t=s[i].flags,n[i+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return r(C.sdtp,n)},_=function(e){return r(C.stbl,T(e),r(C.stts,B),r(C.stsc,R),r(C.stsz,U),r(C.stco,N))},function(){var e,t;T=function(i){return r(C.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===i.type?e(i):t(i))},e=function(e){var t,i,s=e.sps||[],n=e.pps||[],a=[],o=[];for(t=0;t<s.length;t++)a.push((65280&s[t].byteLength)>>>8),a.push(255&s[t].byteLength),a=a.concat(Array.prototype.slice.call(s[t]));for(t=0;t<n.length;t++)o.push((65280&n[t].byteLength)>>>8),o.push(255&n[t].byteLength),o=o.concat(Array.prototype.slice.call(n[t]));if(i=[C.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]),r(C.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([s.length],a,[n.length],o))),r(C.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],d=e.sarRatio[1];i.push(r(C.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&d)>>24,(16711680&d)>>16,(65280&d)>>8,255&d])))}return r.apply(null,i)},t=function(e){return r(C.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]),n(e))}}(),m=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 r(C.tkhd,t)},S=function(e){var t,i,s,n,a,o,l;return t=r(C.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])),o=Math.floor(e.baseMediaDecodeTime/H),l=Math.floor(e.baseMediaDecodeTime%H),i=r(C.tfdt,new Uint8Array([1,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o,l>>>24&255,l>>>16&255,l>>>8&255,255&l])),a=92,"audio"===e.type?(s=E(e,a),r(C.traf,t,i,s)):(n=b(e),s=E(e,n.length+a),r(C.traf,t,i,s,n))},f=function(e){return e.duration=e.duration||4294967295,r(C.trak,m(e),g(e))},w=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),r(C.trex,t)},function(){var e,t,i;i=function(e,t){var i=0,r=0,s=0,n=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(r=2),void 0!==e[0].flags&&(s=4),void 0!==e[0].compositionTimeOffset&&(n=8)),[0,0,i|r|s|n,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]},t=function(e,t){var s,n,a,o,l,d;for(o=e.samples||[],t+=20+16*o.length,a=i(o,t),n=new Uint8Array(a.length+16*o.length),n.set(a),s=a.length,d=0;d<o.length;d++)l=o[d],n[s++]=(4278190080&l.duration)>>>24,n[s++]=(16711680&l.duration)>>>16,n[s++]=(65280&l.duration)>>>8,n[s++]=255&l.duration,n[s++]=(4278190080&l.size)>>>24,n[s++]=(16711680&l.size)>>>16,n[s++]=(65280&l.size)>>>8,n[s++]=255&l.size,n[s++]=l.flags.isLeading<<2|l.flags.dependsOn,n[s++]=l.flags.isDependedOn<<6|l.flags.hasRedundancy<<4|l.flags.paddingValue<<1|l.flags.isNonSyncSample,n[s++]=61440&l.flags.degradationPriority,n[s++]=15&l.flags.degradationPriority,n[s++]=(4278190080&l.compositionTimeOffset)>>>24,n[s++]=(16711680&l.compositionTimeOffset)>>>16,n[s++]=(65280&l.compositionTimeOffset)>>>8,n[s++]=255&l.compositionTimeOffset;return r(C.trun,n)},e=function(e,t){var s,n,a,o,l,d;for(o=e.samples||[],t+=20+8*o.length,a=i(o,t),s=new Uint8Array(a.length+8*o.length),s.set(a),n=a.length,d=0;d<o.length;d++)l=o[d],s[n++]=(4278190080&l.duration)>>>24,s[n++]=(16711680&l.duration)>>>16,s[n++]=(65280&l.duration)>>>8,s[n++]=255&l.duration,s[n++]=(4278190080&l.size)>>>24,s[n++]=(16711680&l.size)>>>16,s[n++]=(65280&l.size)>>>8,s[n++]=255&l.size;return r(C.trun,s)},E=function(i,r){return"audio"===i.type?e(i,r):t(i,r)}}();var z,V,G,W,X,Y,K,J,Q={ftyp:a,mdat:o,moof:u,moov:c,initSegment:function(e){var t,i=a(),r=c(e);return t=new Uint8Array(i.byteLength+r.byteLength),t.set(i),t.set(r,i.byteLength),t}},Z=function(e){var t,i,r=[],s=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,r.byteLength=0,t=0;t<e.length;t++)i=e[t],"access_unit_delimiter_rbsp"===i.nalUnitType?(r.length&&(r.duration=i.dts-r.dts,s.byteLength+=r.byteLength,s.nalCount+=r.length,s.duration+=r.duration,s.push(r)),r=[i],r.byteLength=i.data.byteLength,r.pts=i.pts,r.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(r.keyFrame=!0),r.duration=i.dts-r.dts,r.byteLength+=i.data.byteLength,r.push(i));return s.length&&(!r.duration||r.duration<=0)&&(r.duration=s[s.length-1].duration),s.byteLength+=r.byteLength,s.nalCount+=r.length,s.duration+=r.duration,s.push(r),s},ee=function(e){var t,i,r=[],s=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,t=0;t<e.length;t++)i=e[t],i.keyFrame?(r.length&&(s.push(r),s.byteLength+=r.byteLength,s.nalCount+=r.nalCount,s.duration+=r.duration),r=[i],r.nalCount=i.length,r.byteLength=i.byteLength,r.pts=i.pts,r.dts=i.dts,r.duration=i.duration):(r.duration+=i.duration,r.nalCount+=i.length,r.byteLength+=i.byteLength,r.push(i));return s.length&&r.duration<=0&&(r.duration=s[s.length-1].duration),s.byteLength+=r.byteLength,s.nalCount+=r.nalCount,s.duration+=r.duration,s.push(r),s},te=function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(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},ie=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},re=function(e,t){var i=ie();return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},se=function(e,t){var i,r,s,n,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(n=e[i],r=0;r<n.length;r++)a=n[r],s=re(a,o),o+=s.size,l.push(s);return l},ne=function(e){var t,i,r,s,n,a,o=0,l=e.byteLength,d=e.nalCount,u=l+4*d,c=new Uint8Array(u),h=new DataView(c.buffer);for(t=0;t<e.length;t++)for(s=e[t],i=0;i<s.length;i++)for(n=s[i],r=0;r<n.length;r++)a=n[r],h.setUint32(o,a.data.byteLength),o+=4,c.set(a.data,o),o+=a.data.byteLength;return c},ae=function(e,t){var i,r=t||0,s=[];return i=re(e,r),s.push(i),s},oe=function(e){var t,i,r=0,s=e.byteLength,n=e.length,a=s+4*n,o=new Uint8Array(a),l=new DataView(o.buffer);for(t=0;t<e.length;t++)i=e[t],l.setUint32(r,i.data.byteLength),r+=4,o.set(i.data,r),r+=i.data.byteLength;return o},le={groupNalsIntoFrames:Z,groupFramesIntoGops:ee,extendFirstKeyFrame:te,generateSampleTable:se,concatenateNalData:ne,generateSampleTableForFrame:ae,concatenateNalDataForFrame:oe},de=[33,16,5,32,164,27],ue=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ce=function(e){var t=[];while(e--)t.push(0);return t},he=function(e){return Object.keys(e).reduce((function(t,i){return t[i]=new Uint8Array(e[i].reduce((function(e,t){return e.concat(t)}),[])),t}),{})},pe=function(){if(!z){var e={96e3:[de,[227,64],ce(154),[56]],88200:[de,[231],ce(170),[56]],64e3:[de,[248,192],ce(240),[56]],48e3:[de,[255,192],ce(268),[55,148,128],ce(54),[112]],44100:[de,[255,192],ce(268),[55,163,128],ce(84),[112]],32e3:[de,[255,192],ce(268),[55,234],ce(226),[112]],24e3:[de,[255,192],ce(268),[55,255,128],ce(268),[111,112],ce(126),[224]],16e3:[de,[255,192],ce(268),[55,255,128],ce(268),[111,255],ce(269),[223,108],ce(195),[1,192]],12e3:[ue,ce(268),[3,127,248],ce(268),[6,255,240],ce(268),[13,255,224],ce(268),[27,253,128],ce(259),[56]],11025:[ue,ce(268),[3,127,248],ce(268),[6,255,240],ce(268),[13,255,224],ce(268),[27,255,192],ce(268),[55,175,128],ce(108),[112]],8e3:[ue,ce(268),[3,121,16],ce(47),[7]]};z=he(e)}return z},fe=9e4;V=function(e){return e*fe},G=function(e,t){return e*t},W=function(e){return e/fe},X=function(e,t){return e/t},Y=function(e,t){return V(X(e,t))},K=function(e,t){return G(W(e),t)},J=function(e,t,i){return W(i?e:e-t)};var me={ONE_SECOND_IN_TS:fe,secondsToVideoTs:V,secondsToAudioTs:G,videoTsToSeconds:W,audioTsToSeconds:X,audioTsToVideoTs:Y,videoTsToAudioTs:K,metadataTsToSeconds:J},ge=pe,ye=me,ve=function(e){var t,i,r=0;for(t=0;t<e.length;t++)i=e[t],r+=i.data.byteLength;return r},be=function(e,t,i,r){var s,n,a,o,l=0,d=0,u=0,c=0;if(t.length&&(s=ye.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),l=Math.ceil(ye.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&r&&(d=s-Math.max(i,r),u=Math.floor(d/l),c=u*l),!(u<1||c>ye.ONE_SECOND_IN_TS/2))){for(n=ge()[e.samplerate],n||(n=t[0].data),a=0;a<u;a++)o=t[0],t.splice(0,0,{data:n,dts:o.dts-l,pts:o.pts-l});return e.baseMediaDecodeTime-=Math.floor(ye.videoTsToAudioTs(c,e.samplerate)),c}},_e=function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},Te=function(e){var t,i,r=[];for(t=0;t<e.length;t++)i=e[t],r.push({size:i.data.byteLength,duration:1024});return r},Se=function(e){var t,i,r=0,s=new Uint8Array(ve(e));for(t=0;t<e.length;t++)i=e[t],s.set(i.data,r),r+=i.data.byteLength;return s},we={prefixWithSilence:be,trimAdtsFramesByEarliestDts:_e,generateSampleTable:Te,concatenateFrameData:Se},Ee=me.ONE_SECOND_IN_TS,Ce=function(e,t){"number"===typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"===typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},xe=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},ke=function(e,t){var i,r,s=e.minSegmentDts;return t||(s-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=s,i=Math.max(0,i),"audio"===e.type&&(r=e.samplerate/Ee,i*=r,i=Math.floor(i)),i},Ie={clearDtsInfo:xe,calculateTrackBaseMediaDecodeTime:ke,collectDtsInfo:Ce},Ae=4,Pe=128,Oe=function(e){var t=0,i={payloadType:-1,payloadSize:0},r=0,s=0;while(t<e.byteLength){if(e[t]===Pe)break;while(255===e[t])r+=255,t++;r+=e[t++];while(255===e[t])s+=255,t++;if(s+=e[t++],!i.payload&&r===Ae){var n=String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6]);if("GA94"===n){i.payloadType=r,i.payloadSize=s,i.payload=e.subarray(t,t+s);break}i.payload=void 0}t+=s,r=0,s=0}return i},Le=function(e){return 181!==e.payload[0]||49!==(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},De=function(e,t){var i,r,s,n,a=[];if(!(64&t[0]))return a;for(r=31&t[0],i=0;i<r;i++)s=3*i,n={type:3&t[s+2],pts:e},4&t[s+2]&&(n.ccData=t[s+3]<<8|t[s+4],a.push(n));return a},Me=function(e){var t,i,r=e.byteLength,s=[],n=1;while(n<r-2)0===e[n]&&0===e[n+1]&&3===e[n+2]?(s.push(n+2),n+=2):n++;if(0===s.length)return e;t=r-s.length,i=new Uint8Array(t);var a=0;for(n=0;n<t;a++,n++)a===s[0]&&(a++,s.shift()),i[n]=e[a];return i},Ne={parseSei:Oe,parseUserData:Le,parseCaptionPackets:De,discardEmulationPreventionBytes:Me,USER_DATA_REGISTERED_ITU_T_T35:Ae},Re=j,Ue=Ne,Be=function(e){e=e||{},Be.prototype.init.call(this),this.parse708captions_="boolean"!==typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ke(0,0),new Ke(0,1),new Ke(1,0),new Ke(1,1)],this.parse708captions_&&(this.cc708Stream_=new ze({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))}),this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};Be.prototype=new Re,Be.prototype.push=function(e){var t,i,r;if("sei_rbsp"===e.nalUnitType&&(t=Ue.parseSei(e.escapedRBSP),t.payload&&t.payloadType===Ue.USER_DATA_REGISTERED_ITU_T_T35&&(i=Ue.parseUserData(t),i)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));r=Ue.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(r),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},Be.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},Be.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},Be.prototype.flush=function(){return this.flushStream("flush")},Be.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Be.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},Be.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},Be.prototype.setsChannel1Active=function(e){return 4096===(30720&e.ccData)},Be.prototype.setsChannel2Active=function(e){return 6144===(30720&e.ccData)},Be.prototype.setsTextOrXDSActive=function(e){return 256===(28928&e.ccData)||4138===(30974&e.ccData)||6186===(30974&e.ccData)},Be.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var je={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Fe=function(e){var t=je[e]||e;return 4096&e&&e===t?"":String.fromCharCode(t)},qe=function(e){return 32<=e&&e<=127||160<=e&&e<=255},$e=function(e){this.windowNum=e,this.reset()};$e.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},$e.prototype.getText=function(){return this.rows.join("\n")},$e.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},$e.prototype.newLine=function(e){this.rows.length>=this.virtualRowCount&&"function"===typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);while(this.rows.length>this.virtualRowCount)this.rows.shift(),this.rowIdx--},$e.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},$e.prototype.addText=function(e){this.rows[this.rowIdx]+=e},$e.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var He=function(e,t,i){this.serviceNum=e,this.text="",this.currentWindow=new $e(-1),this.windows=[],this.stream=i,"string"===typeof t&&this.createTextDecoder(t)};He.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new $e(i),"function"===typeof t&&(this.windows[i].beforeRowOverflow=t)},He.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},He.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 ze=function(e){e=e||{},ze.prototype.init.call(this);var t,i=this,r=e.captionServices||{},s={};Object.keys(r).forEach(e=>{t=r[e],/^SERVICE/.test(e)&&(s[e]=t.encoding)}),this.serviceEncodings=s,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};ze.prototype=new Re,ze.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},ze.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,r=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(r)},ze.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,r=null,s=0,n=t[s++];for(e.seq=n>>6,e.sizeCode=63&n;s<t.length;s++)n=t[s++],i=n>>5,r=31&n,7===i&&r>0&&(n=t[s++],i=n),this.pushServiceBlock(i,s,r),r>0&&(s+=r-1)},ze.prototype.pushServiceBlock=function(e,t,i){var r,s=t,n=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,s));s<t+i&&s<n.length;s++)r=n[s],qe(r)?s=this.handleText(s,a):24===r?s=this.multiByteCharacter(s,a):16===r?s=this.extendedCommands(s,a):128<=r&&r<=135?s=this.setCurrentWindow(s,a):152<=r&&r<=159?s=this.defineWindow(s,a):136===r?s=this.clearWindows(s,a):140===r?s=this.deleteWindows(s,a):137===r?s=this.displayWindows(s,a):138===r?s=this.hideWindows(s,a):139===r?s=this.toggleWindows(s,a):151===r?s=this.setWindowAttributes(s,a):144===r?s=this.setPenAttributes(s,a):145===r?s=this.setPenColor(s,a):146===r?s=this.setPenLocation(s,a):143===r?a=this.reset(s,a):8===r?a.currentWindow.backspace():12===r?a.currentWindow.clearText():13===r?a.currentWindow.pendingNewLine=!0:14===r?a.currentWindow.clearText():141===r&&s++},ze.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data,r=i[++e];return qe(r)&&(e=this.handleText(e,t,{isExtended:!0})),e},ze.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},ze.prototype.initService=function(e,t){var i,r="SERVICE"+e,s=this;return r in this.serviceEncodings&&(i=this.serviceEncodings[r]),this.services[e]=new He(e,i,s),this.services[e].init(this.getPts(t),(function(t){s.flushDisplayed(t,s.services[e])})),this.services[e]},ze.prototype.handleText=function(e,t,i){var r,s,n=i&&i.isExtended,a=i&&i.isMultiByte,o=this.current708Packet.data,l=n?4096:0,d=o[e],u=o[e+1],c=t.currentWindow;return t.textDecoder_&&!n?(a?(s=[d,u],e++):s=[d],r=t.textDecoder_.decode(new Uint8Array(s))):r=Fe(l|d),c.pendingNewLine&&!c.isEmpty()&&c.newLine(this.getPts(e)),c.pendingNewLine=!1,c.addText(r),e},ze.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,r=i[e+1],s=i[e+2];return qe(r)&&qe(s)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},ze.prototype.setCurrentWindow=function(e,t){var i=this.current708Packet.data,r=i[e],s=7&r;return t.setCurrentWindow(s),e},ze.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,r=i[e],s=7&r;t.setCurrentWindow(s);var n=t.currentWindow;return r=i[++e],n.visible=(32&r)>>5,n.rowLock=(16&r)>>4,n.columnLock=(8&r)>>3,n.priority=7&r,r=i[++e],n.relativePositioning=(128&r)>>7,n.anchorVertical=127&r,r=i[++e],n.anchorHorizontal=r,r=i[++e],n.anchorPoint=(240&r)>>4,n.rowCount=15&r,r=i[++e],n.columnCount=63&r,r=i[++e],n.windowStyle=(56&r)>>3,n.penStyle=7&r,n.virtualRowCount=n.rowCount+1,e},ze.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,r=i[e],s=t.currentWindow.winAttr;return r=i[++e],s.fillOpacity=(192&r)>>6,s.fillRed=(48&r)>>4,s.fillGreen=(12&r)>>2,s.fillBlue=3&r,r=i[++e],s.borderType=(192&r)>>6,s.borderRed=(48&r)>>4,s.borderGreen=(12&r)>>2,s.borderBlue=3&r,r=i[++e],s.borderType+=(128&r)>>5,s.wordWrap=(64&r)>>6,s.printDirection=(48&r)>>4,s.scrollDirection=(12&r)>>2,s.justify=3&r,r=i[++e],s.effectSpeed=(240&r)>>4,s.effectDirection=(12&r)>>2,s.displayEffect=3&r,e},ze.prototype.flushDisplayed=function(e,t){for(var i=[],r=0;r<8;r++)t.windows[r].visible&&!t.windows[r].isEmpty()&&i.push(t.windows[r].getText());t.endPts=e,t.text=i.join("\n\n"),this.pushCaption(t),t.startPts=e},ze.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)},ze.prototype.displayWindows=function(e,t){var i=this.current708Packet.data,r=i[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)r&1<<n&&(t.windows[n].visible=1);return e},ze.prototype.hideWindows=function(e,t){var i=this.current708Packet.data,r=i[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)r&1<<n&&(t.windows[n].visible=0);return e},ze.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data,r=i[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)r&1<<n&&(t.windows[n].visible^=1);return e},ze.prototype.clearWindows=function(e,t){var i=this.current708Packet.data,r=i[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)r&1<<n&&t.windows[n].clearText();return e},ze.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data,r=i[++e],s=this.getPts(e);this.flushDisplayed(s,t);for(var n=0;n<8;n++)r&1<<n&&t.windows[n].reset();return e},ze.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,r=i[e],s=t.currentWindow.penAttr;return r=i[++e],s.textTag=(240&r)>>4,s.offset=(12&r)>>2,s.penSize=3&r,r=i[++e],s.italics=(128&r)>>7,s.underline=(64&r)>>6,s.edgeType=(56&r)>>3,s.fontStyle=7&r,e},ze.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,r=i[e],s=t.currentWindow.penColor;return r=i[++e],s.fgOpacity=(192&r)>>6,s.fgRed=(48&r)>>4,s.fgGreen=(12&r)>>2,s.fgBlue=3&r,r=i[++e],s.bgOpacity=(192&r)>>6,s.bgRed=(48&r)>>4,s.bgGreen=(12&r)>>2,s.bgBlue=3&r,r=i[++e],s.edgeRed=(48&r)>>4,s.edgeGreen=(12&r)>>2,s.edgeBlue=3&r,e},ze.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,r=i[e],s=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,r=i[++e],s.row=15&r,r=i[++e],s.column=63&r,e},ze.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Ve={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},Ge=function(e){return null===e?"":(e=Ve[e]||e,String.fromCharCode(e))},We=14,Xe=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Ye=function(){var e=[],t=We+1;while(t--)e.push("");return e},Ke=function(e,t){Ke.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,r,s,n;if(t=32639&e.ccData,t!==this.lastControlCode_){if(4096===(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),r=t>>>8,s=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),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,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_=Ye();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Ye();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=Ye()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(r,s))r=(3&r)<<8,n=Ge(r|s),this[this.mode_](e.pts,n),this.column_++;else if(this.isExtCharacter(r,s))"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),r=(3&r)<<8,n=Ge(r|s),this[this.mode_](e.pts,n),this.column_++;else if(this.isMidRowCode(r,s))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14===(14&s)&&this.addFormatting(e.pts,["i"]),1===(1&s)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(r,s))this.column_+=3&s;else if(this.isPAC(r,s)){var a=Xe.indexOf(7968&t);"rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&(this.clearFormatting(e.pts),this.row_=a),1&s&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16===(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(s)&&14===(14&s)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(r)&&(0===s&&(s=null),n=Ge(r),n+=Ge(s),this[this.mode_](e.pts,n),this.column_+=n.length)}else this.lastControlCode_=null}};Ke.prototype=new Re,Ke.prototype.flushDisplayed=function(e){var t=this.displayed_.map((function(e,t){try{return e.trim()}catch(i){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_})},Ke.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Ye(),this.nonDisplayed_=Ye(),this.lastControlCode_=null,this.column_=0,this.row_=We,this.rollUpRows_=2,this.formatting_=[]},Ke.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_},Ke.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ke.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ke.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ke.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ke.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ke.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ke.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ke.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=We,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=Ye(),this.displayed_=Ye()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ke.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce((function(e,t){return e+"<"+t+">"}),"");this[this.mode_](e,i)},Ke.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+"</"+t+">"}),"");this.formatting_=[],this[this.mode_](e,t)}},Ke.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_];i+=t,this.nonDisplayed_[this.row_]=i},Ke.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i},Ke.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.row_+1;e<We+1;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},Ke.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i};var Je={CaptionStream:Be,Cea608Stream:Ke,Cea708Stream:ze},Qe={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ze=j,et=8589934592,tt=4294967296,it="shared",rt=function(e,t){var i=1;e>t&&(i=-1);while(Math.abs(t-e)>tt)e+=i*et;return e},st=function(e){var t,i;st.prototype.init.call(this),this.type_=e||it,this.push=function(e){this.type_!==it&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=rt(e.dts,i),e.pts=rt(e.pts,i),t=e.dts,this.trigger("data",e))},this.flush=function(){i=t,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};st.prototype=new Ze;var nt,at={TimestampRolloverStream:st,handleRollover:rt},ot=(e,t,i)=>{if(!e)return-1;for(var r=i;r<e.length;r++)if(e[r]===t)return r;return-1},lt={typedArrayIndexOf:ot},dt=j,ut=Qe,ct=lt.typedArrayIndexOf,ht={Iso88591:0,Utf16:1,Utf16be:2,Utf8:3},pt=function(e,t,i){var r,s="";for(r=t;r<i;r++)s+="%"+("00"+e[r].toString(16)).slice(-2);return s},ft=function(e,t,i){return decodeURIComponent(pt(e,t,i))},mt=function(e,t,i){return unescape(pt(e,t,i))},gt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},yt={APIC:function(e){var t,i,r=1,s="--\x3e";e.data[0]===ht.Utf8&&(t=ct(e.data,0,r),t<0||(e.mimeType=mt(e.data,r,t),r=t+1,e.pictureType=e.data[r],r++,i=ct(e.data,0,r),i<0||(e.description=ft(e.data,r,i),r=i+1,e.mimeType===s?e.url=mt(e.data,r,e.data.length):e.pictureData=e.data.subarray(r,e.data.length))))},"T*":function(e){e.data[0]===ht.Utf8&&(e.value=ft(e.data,1,e.data.length).replace(/\0*$/,""),e.values=e.value.split("\0"))},TXXX:function(e){var t;e.data[0]===ht.Utf8&&(t=ct(e.data,0,1),-1!==t&&(e.description=ft(e.data,1,t),e.value=ft(e.data,t+1,e.data.length).replace(/\0*$/,""),e.data=e.value))},"W*":function(e){e.url=mt(e.data,0,e.data.length).replace(/\0.*$/,"")},WXXX:function(e){var t;e.data[0]===ht.Utf8&&(t=ct(e.data,0,1),-1!==t&&(e.description=ft(e.data,1,t),e.url=mt(e.data,t+1,e.data.length).replace(/\0.*$/,"")))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=mt(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};nt=function(e){var t,i={descriptor:e&&e.descriptor},r=0,s=[],n=0;if(nt.prototype.init.call(this),this.dispatchType=ut.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=("00"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l,d;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(n=0,s.length=0),0===s.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});else if(s.push(e),n+=e.data.byteLength,1===s.length&&(r=gt(e.data.subarray(6,10)),r+=10),!(n<r)){for(t={data:new Uint8Array(r),frames:[],pts:s[0].pts,dts:s[0].dts},l=0;l<r;)t.data.set(s[0].data.subarray(0,r-l),l),l+=s[0].data.byteLength,n-=s[0].data.byteLength,s.shift();i=10,64&t.data[5]&&(i+=4,i+=gt(t.data.subarray(10,14)),r-=gt(t.data.subarray(16,20)));do{if(a=gt(t.data.subarray(i+4,i+8)),a<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(d=String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),o={id:d,data:t.data.subarray(i+10,i+a+10)},o.key=o.id,yt[o.id]?yt[o.id](o):"T"===o.id[0]?yt["T*"](o):"W"===o.id[0]&&yt["W*"](o),"com.apple.streaming.transportStreamTimestamp"===o.owner){var u=o.data,c=(1&u[3])<<30|u[4]<<22|u[5]<<14|u[6]<<6|u[7]>>>2;c*=4,c+=3&u[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),i+=10,i+=a}while(i<r);this.trigger("data",t)}}},nt.prototype=new dt;var vt,bt,_t,Tt=nt,St=j,wt=Je,Et=Qe,Ct=at.TimestampRolloverStream,xt=188,kt=71;vt=function(){var e=new Uint8Array(xt),t=0;vt.prototype.init.call(this),this.push=function(i){var r,s=0,n=xt;t?(r=new Uint8Array(i.byteLength+t),r.set(e.subarray(0,t)),r.set(i,t),t=0):r=i;while(n<r.byteLength)r[s]!==kt||r[n]!==kt?(s++,n++):(this.trigger("data",r.subarray(s,n)),s+=xt,n+=xt);s<r.byteLength&&(e.set(r.subarray(s),0),t=r.byteLength-s)},this.flush=function(){t===xt&&e[0]===kt&&(this.trigger("data",e),t=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){t=0,this.trigger("reset")}},vt.prototype=new St,bt=function(){var e,t,i,r;bt.prototype.init.call(this),r=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,r){var s=0;r.payloadUnitStartIndicator&&(s+=e[s]+1),"pat"===r.type?t(e.subarray(s),r):i(e.subarray(s),r)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],r.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=r.pmtPid},i=function(e,t){var i,s,n,a;if(1&e[5]){r.programMapTable={video:null,audio:null,"timed-metadata":{}},i=(15&e[1])<<8|e[2],s=3+i-4,n=(15&e[10])<<8|e[11],a=12+n;while(a<s){var o=e[a],l=(31&e[a+1])<<8|e[a+2];o===Et.H264_STREAM_TYPE&&null===r.programMapTable.video?r.programMapTable.video=l:o===Et.ADTS_STREAM_TYPE&&null===r.programMapTable.audio?r.programMapTable.audio=l:o===Et.METADATA_STREAM_TYPE&&(r.programMapTable["timed-metadata"][l]=o),a+=5+((15&e[a+3])<<8|e[a+4])}t.programMapTable=r.programMapTable}},this.push=function(t){var i={},r=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(r+=t[r]+1),0===i.pid)i.type="pat",e(t.subarray(r),i),this.trigger("data",i);else if(i.pid===this.pmtPid){i.type="pmt",e(t.subarray(r),i),this.trigger("data",i);while(this.packetsWaitingForPmt.length)this.processPes_.apply(this,this.packetsWaitingForPmt.shift())}else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,r,i]):this.processPes_(t,r,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Et.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Et.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=e.subarray(t),this.trigger("data",i)}},bt.prototype=new St,bt.STREAM_TYPES={h264:27,adts:15},_t=function(){var e,t=this,i=!1,r={data:[],size:0},s={data:[],size:0},n={data:[],size:0},a=function(e,t){var i;const r=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===r&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=0!==(4&e[6]),i=e[7],192&i&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))},o=function(e,i,r){var s,n=new Uint8Array(e.size),o={type:i},l=0,d=0,u=!1;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)s=e.data[l],n.set(s.data,d),d+=s.data.byteLength;a(n,o),u="video"===i||o.packetLength<=e.size,(r||u)&&(e.size=0,e.data.length=0),u&&t.trigger("data",o)}};_t.prototype.init.call(this),this.push=function(a){({pat:function(){},pes:function(){var e,t;switch(a.streamType){case Et.H264_STREAM_TYPE:e=r,t="video";break;case Et.ADTS_STREAM_TYPE:e=s,t="audio";break;case Et.METADATA_STREAM_TYPE:e=n,t="timed-metadata";break;default:return}a.payloadUnitStartIndicator&&o(e,t,!0),e.data.push(a),e.size+=a.data.byteLength},pmt:function(){var r={type:"metadata",tracks:[]};e=a.programMapTable,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"}),i=!0,t.trigger("data",r)}})[a.type]()},this.reset=function(){r.size=0,r.data.length=0,s.size=0,s.data.length=0,this.trigger("reset")},this.flushStreams_=function(){o(r,"video"),o(s,"audio"),o(n,"timed-metadata")},this.flush=function(){if(!i&&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)}i=!1,this.flushStreams_(),this.trigger("done")}},_t.prototype=new St;var It={PAT_PID:0,MP2T_PACKET_LENGTH:xt,TransportPacketStream:vt,TransportParseStream:bt,ElementaryStream:_t,TimestampRolloverStream:Ct,CaptionStream:wt.CaptionStream,Cea608Stream:wt.Cea608Stream,Cea708Stream:wt.Cea708Stream,MetadataStream:Tt};for(var At in Et)Et.hasOwnProperty(At)&&(It[At]=Et[At]);var Pt,Ot=It,Lt=j,Dt=me.ONE_SECOND_IN_TS,Mt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];Pt=function(e){var t,i=0;Pt.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger("log",{level:"warn",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(r){var s,n,a,o,l,d=0;if(e||(i=0),"audio"===r.type){var u;t&&t.length?(a=t,t=new Uint8Array(a.byteLength+r.data.byteLength),t.set(a),t.set(r.data,a.byteLength)):t=r.data;while(d+7<t.length)if(255===t[d]&&240===(246&t[d+1])){if("number"===typeof u&&(this.skipWarn_(u,d),u=null),n=2*(1&~t[d+1]),s=(3&t[d+3])<<11|t[d+4]<<3|(224&t[d+5])>>5,o=1024*(1+(3&t[d+6])),l=o*Dt/Mt[(60&t[d+2])>>>2],t.byteLength-d<s)break;this.trigger("data",{pts:r.pts+i*l,dts:r.dts+i*l,sampleCount:o,audioobjecttype:1+(t[d+2]>>>6&3),channelcount:(1&t[d+2])<<2|(192&t[d+3])>>>6,samplerate:Mt[(60&t[d+2])>>>2],samplingfrequencyindex:(60&t[d+2])>>>2,samplesize:16,data:t.subarray(d+7+n,d+s)}),i++,d+=s}else"number"!==typeof u&&(u=d),d++;"number"===typeof u&&(this.skipWarn_(u,d),u=null),t=t.subarray(d)}},this.flush=function(){i=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}},Pt.prototype=new Lt;var Nt,Rt=Pt;Nt=function(e){var t=e.byteLength,i=0,r=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+r},this.loadWord=function(){var s=e.byteLength-t,n=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");n.set(e.subarray(s,s+a)),i=new DataView(n.buffer).getUint32(0),r=8*a,t-=a},this.skipBits=function(e){var s;r>e?(i<<=e,r-=e):(e-=r,s=Math.floor(e/8),e-=8*s,t-=s,this.loadWord(),i<<=e,r-=e)},this.readBits=function(e){var s=Math.min(r,e),n=i>>>32-s;return r-=s,r>0?i<<=s:t>0&&this.loadWord(),s=e-s,s>0?n<<s|this.readBits(s):n},this.skipLeadingZeros=function(){var e;for(e=0;e<r;++e)if(0!==(i&2147483648>>>e))return i<<=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()};var Ut,Bt,jt,Ft=Nt,qt=j,$t=Ft;Bt=function(){var e,t,i=0;Bt.prototype.init.call(this),this.push=function(r){var s;t?(s=new Uint8Array(t.byteLength+r.data.byteLength),s.set(t),s.set(r.data,t.byteLength),t=s):t=r.data;for(var n=t.byteLength;i<n-3;i++)if(1===t[i+2]){e=i+5;break}while(e<n)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger("data",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<n);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3;break}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger("reset")},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(i+3)),t=null,i=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},Bt.prototype=new qt,jt={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Ut=function(){var e,t,i,r,s,n,a,o=new Bt;Ut.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,i=e.pts,r=e.dts,o.push(e))},o.on("data",(function(a){var o={trackId:t,pts:i,dts:r,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp",o.escapedRBSP=s(a.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp",o.escapedRBSP=s(a.subarray(1)),o.config=n(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp";break}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()},a=function(e,t){var i,r,s=8,n=8;for(i=0;i<e;i++)0!==n&&(r=t.readExpGolomb(),n=(s+r+256)%256),s=0===n?s:n},s=function(e){var t,i,r=e.byteLength,s=[],n=1;while(n<r-2)0===e[n]&&0===e[n+1]&&3===e[n+2]?(s.push(n+2),n+=2):n++;if(0===s.length)return e;t=r-s.length,i=new Uint8Array(t);var a=0;for(n=0;n<t;a++,n++)a===s[0]&&(a++,s.shift()),i[n]=e[a];return i},n=function(e){var t,i,r,s,n,o,l,d,u,c,h,p,f,m=0,g=0,y=0,v=0,b=[1,1];if(t=new $t(e),i=t.readUnsignedByte(),s=t.readUnsignedByte(),r=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),jt[i]&&(n=t.readUnsignedExpGolomb(),3===n&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==n?8:12,f=0;f<h;f++)t.readBoolean()&&a(f<6?16:64,t);if(t.skipUnsignedExpGolomb(),o=t.readUnsignedExpGolomb(),0===o)t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),f=0;f<l;f++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),d=t.readUnsignedExpGolomb(),u=t.readUnsignedExpGolomb(),c=t.readBits(1),0===c&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(p=t.readUnsignedByte(),p){case 1:b=[1,1];break;case 2:b=[12,11];break;case 3:b=[10,11];break;case 4:b=[16,11];break;case 5:b=[40,33];break;case 6:b=[24,11];break;case 7:b=[20,11];break;case 8:b=[32,11];break;case 9:b=[80,33];break;case 10:b=[18,11];break;case 11:b=[15,11];break;case 12:b=[64,33];break;case 13:b=[160,99];break;case 14:b=[4,3];break;case 15:b=[3,2];break;case 16:b=[2,1];break;case 255:b=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()];break}b&&(b[0],b[1])}return{profileIdc:i,levelIdc:r,profileCompatibility:s,width:16*(d+1)-2*m-2*g,height:(2-c)*(u+1)*16-2*y-2*v,sarRatio:b}}},Ut.prototype=new qt;var Ht,zt={H264Stream:Ut,NalByteStream:Bt},Vt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Gt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9],r=e[t+5],s=(16&r)>>4;return i=i>=0?i:0,s?i+20:i+10},Wt=function(e,t){return e.length-t<10||e[t]!=="I".charCodeAt(0)||e[t+1]!=="D".charCodeAt(0)||e[t+2]!=="3".charCodeAt(0)?t:(t+=Gt(e,t),Wt(e,t))},Xt=function(e){var t=Wt(e,0);return e.length>=t+2&&255===(255&e[t])&&240===(240&e[t+1])&&16===(22&e[t+1])},Yt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Kt=function(e,t,i){var r,s="";for(r=t;r<i;r++)s+="%"+("00"+e[r].toString(16)).slice(-2);return s},Jt=function(e,t,i){return unescape(Kt(e,t,i))},Qt=function(e,t){var i=(224&e[t+5])>>5,r=e[t+4]<<3,s=6144&e[t+3];return s|r|i},Zt=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},ei=function(e){var t=0;while(t+5<e.length){if(255===e[t]&&240===(246&e[t+1]))return Vt[(60&e[t+2])>>>2];t++}return null},ti=function(e){var t,i,r,s;t=10,64&e[5]&&(t+=4,t+=Yt(e.subarray(10,14)));do{if(i=Yt(e.subarray(t+4,t+8)),i<1)return null;if(s=String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3]),"PRIV"===s){r=e.subarray(t+10,t+i+10);for(var n=0;n<r.byteLength;n++)if(0===r[n]){var a=Jt(r,0,n);if("com.apple.streaming.transportStreamTimestamp"===a){var o=r.subarray(n+1),l=(1&o[3])<<30|o[4]<<22|o[5]<<14|o[6]<<6|o[7]>>>2;return l*=4,l+=3&o[7],l}break}}t+=10,t+=i}while(t<e.byteLength);return null},ii={isLikelyAacData:Xt,parseId3TagSize:Gt,parseAdtsSize:Qt,parseType:Zt,parseSampleRate:ei,parseAacTimestamp:ti},ri=j,si=ii;Ht=function(){var e=new Uint8Array,t=0;Ht.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var r,s,n,a,o=0,l=0;e.length?(a=e.length,e=new Uint8Array(i.byteLength+a),e.set(e.subarray(0,a)),e.set(i,a)):e=i;while(e.length-l>=3)if(e[l]!=="I".charCodeAt(0)||e[l+1]!=="D".charCodeAt(0)||e[l+2]!=="3".charCodeAt(0))if(255!==(255&e[l])||240!==(240&e[l+1]))l++;else{if(e.length-l<7)break;if(o=si.parseAdtsSize(e,l),l+o>e.length)break;n={type:"audio",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger("data",n),l+=o}else{if(e.length-l<10)break;if(o=si.parseId3TagSize(e,l),l+o>e.length)break;s={type:"timed-metadata",data:e.subarray(l,l+o)},this.trigger("data",s),l+=o}r=e.length-l,e=r>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}},Ht.prototype=new ri;var ni,ai,oi,li,di=Ht,ui=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],ci=ui,hi=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],pi=hi,fi=j,mi=Q,gi=le,yi=we,vi=Ie,bi=Ot,_i=me,Ti=Rt,Si=zt.H264Stream,wi=di,Ei=ii.isLikelyAacData,Ci=me.ONE_SECOND_IN_TS,xi=ci,ki=pi,Ii=function(e,t){t.stream=e,this.trigger("log",t)},Ai=function(e,t){for(var i=Object.keys(t),r=0;r<i.length;r++){var s=i[r];"headOfPipeline"!==s&&t[s].on&&t[s].on("log",Ii.bind(e,s))}},Pi=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},Oi=function(e,t,i,r,s,n){var a=i-t,o=r-t,l=s-i;return{start:{dts:e,pts:e+a},end:{dts:e+o,pts:e+l},prependedContentDuration:n,baseMediaDecodeTime:e}};ai=function(e,t){var i,r=[],s=0,n=0,a=1/0;t=t||{},i=t.firstSequenceNumber||0,ai.prototype.init.call(this),this.push=function(t){vi.collectDtsInfo(e,t),e&&xi.forEach((function(i){e[i]=t[i]})),r.push(t)},this.setEarliestDts=function(e){s=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){n=e},this.flush=function(){var o,l,d,u,c,h,p;0!==r.length?(o=yi.trimAdtsFramesByEarliestDts(r,e,s),e.baseMediaDecodeTime=vi.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=yi.prefixWithSilence(e,o,n,a),e.samples=yi.generateSampleTable(o),d=mi.mdat(yi.concatenateFrameData(o)),r=[],l=mi.moof(i,[e]),u=new Uint8Array(l.byteLength+d.byteLength),i++,u.set(l),u.set(d,l.byteLength),vi.clearDtsInfo(e),c=Math.ceil(1024*Ci/e.samplerate),o.length&&(h=o.length*c,this.trigger("segmentTimingInfo",Oi(_i.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger("timingInfo",{start:o[0].pts,end:o[0].pts+h})),this.trigger("data",{track:e,boxes:u}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){vi.clearDtsInfo(e),r=[],this.trigger("reset")}},ai.prototype=new fi,ni=function(e,t){var i,r,s,n=[],a=[];t=t||{},i=t.firstSequenceNumber||0,ni.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){vi.collectDtsInfo(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.config,e.sps=[t.data],ki.forEach((function(t){e[t]=r[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||s||(s=t.data,e.pps=[t.data]),n.push(t)},this.flush=function(){var r,s,o,l,d,u,c,h,p=0;while(n.length){if("access_unit_delimiter_rbsp"===n[0].nalUnitType)break;n.shift()}if(0===n.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(r=gi.groupNalsIntoFrames(n),o=gi.groupFramesIntoGops(r),o[0][0].keyFrame||(s=this.getGopForFusion_(n[0],e),s?(p=s.duration,o.unshift(s),o.byteLength+=s.byteLength,o.nalCount+=s.nalCount,o.pts=s.pts,o.dts=s.dts,o.duration+=s.duration):o=gi.extendFirstKeyFrame(o)),a.length){var f;if(f=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o),!f)return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),n=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");vi.clearDtsInfo(e),o=f}vi.collectDtsInfo(e,o),e.samples=gi.generateSampleTable(o),d=mi.mdat(gi.concatenateNalData(o)),e.baseMediaDecodeTime=vi.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),c=o[0],h=o[o.length-1],this.trigger("segmentTimingInfo",Oi(e.baseMediaDecodeTime,c.dts,c.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger("timingInfo",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),n=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),l=mi.moof(i,[e]),u=new Uint8Array(l.byteLength+d.byteLength),i++,u.set(l),u.set(d,l.byteLength),this.trigger("data",{track:e,boxes:u}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),n=[],this.gopCache_.length=0,a.length=0,this.trigger("reset")},this.resetStream_=function(){vi.clearDtsInfo(e),r=void 0,s=void 0},this.getGopForFusion_=function(t){var i,r,s,n,a,o=45e3,l=1e4,d=1/0;for(a=0;a<this.gopCache_.length;a++)n=this.gopCache_[a],s=n.gop,e.pps&&Pi(e.pps[0],n.pps[0])&&e.sps&&Pi(e.sps[0],n.sps[0])&&(s.dts<e.timelineStartInfo.dts||(i=t.dts-s.dts-s.duration,i>=-l&&i<=o&&(!r||d>i)&&(r=n,d=i)));return r?r.gop:null},this.alignGopsAtStart_=function(e){var t,i,r,s,n,o,l,d;n=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;while(t<a.length&&i<e.length){if(r=a[t],s=e[i],r.pts===s.pts)break;s.pts>r.pts?t++:(i++,n-=s.byteLength,o-=s.nalCount,l-=s.duration)}return 0===i?e:i===e.length?null:(d=e.slice(i),d.byteLength=n,d.duration=l,d.nalCount=o,d.pts=d[0].pts,d.dts=d[0].dts,d)},this.alignGopsAtEnd_=function(e){var t,i,r,s,n,o,l;t=a.length-1,i=e.length-1,n=null,o=!1;while(t>=0&&i>=0){if(r=a[t],s=e[i],r.pts===s.pts){o=!0;break}r.pts>s.pts?t--:(t===a.length-1&&(n=i),i--)}if(!o&&null===n)return null;if(l=o?i:n,0===l)return e;var d=e.slice(l),u=d.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 d.byteLength=u.byteLength,d.duration=u.duration,d.nalCount=u.nalCount,d.pts=d[0].pts,d.dts=d[0].dts,d},this.alignGopsWith=function(e){a=e}},ni.prototype=new fi,li=function(e,t){this.numberOfTracks=0,this.metadataStream=t,e=e||{},"undefined"!==typeof 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,li.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))))}},li.prototype=new fi,li.prototype.flush=function(e){var t,i,r,s,n=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,ki.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,xi.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,r=mi.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(r.byteLength),a.initSegment.set(r),a.data=new Uint8Array(this.pendingBytes),s=0;s<this.pendingBoxes.length;s++)a.data.set(this.pendingBoxes[s],n),n+=this.pendingBoxes[s].byteLength;for(s=0;s<this.pendingCaptions.length;s++)t=this.pendingCaptions[s],t.startTime=_i.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=_i.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(s=0;s<this.pendingMetadata.length;s++)i=this.pendingMetadata[s],i.cueTime=_i.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",a),s=0;s<a.captions.length;s++)t=a.captions[s],this.trigger("caption",t);for(s=0;s<a.metadata.length;s++)i=a.metadata[s],this.trigger("id3Frame",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},li.prototype.setRemux=function(e){this.remuxTracks=e},oi=function(e){var t,i,r=this,s=!0;oi.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var s={};this.transmuxPipeline_=s,s.type="aac",s.metadataStream=new bi.MetadataStream,s.aacStream=new wi,s.audioTimestampRolloverStream=new bi.TimestampRolloverStream("audio"),s.timedMetadataTimestampRolloverStream=new bi.TimestampRolloverStream("timed-metadata"),s.adtsStream=new Ti,s.coalesceStream=new li(e,s.metadataStream),s.headOfPipeline=s.aacStream,s.aacStream.pipe(s.audioTimestampRolloverStream).pipe(s.adtsStream),s.aacStream.pipe(s.timedMetadataTimestampRolloverStream).pipe(s.metadataStream).pipe(s.coalesceStream),s.metadataStream.on("timestamp",(function(e){s.aacStream.setTimestamp(e.timeStamp)})),s.aacStream.on("data",(function(n){"timed-metadata"!==n.type&&"audio"!==n.type||s.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},s.coalesceStream.numberOfTracks++,s.audioSegmentStream=new ai(i,e),s.audioSegmentStream.on("log",r.getLogTrigger_("audioSegmentStream")),s.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),s.adtsStream.pipe(s.audioSegmentStream).pipe(s.coalesceStream),r.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!t}))})),s.coalesceStream.on("data",this.trigger.bind(this,"data")),s.coalesceStream.on("done",this.trigger.bind(this,"done")),Ai(this,s)},this.setupTsPipeline=function(){var s={};this.transmuxPipeline_=s,s.type="ts",s.metadataStream=new bi.MetadataStream,s.packetStream=new bi.TransportPacketStream,s.parseStream=new bi.TransportParseStream,s.elementaryStream=new bi.ElementaryStream,s.timestampRolloverStream=new bi.TimestampRolloverStream,s.adtsStream=new Ti,s.h264Stream=new Si,s.captionStream=new bi.CaptionStream(e),s.coalesceStream=new li(e,s.metadataStream),s.headOfPipeline=s.packetStream,s.packetStream.pipe(s.parseStream).pipe(s.elementaryStream).pipe(s.timestampRolloverStream),s.timestampRolloverStream.pipe(s.h264Stream),s.timestampRolloverStream.pipe(s.adtsStream),s.timestampRolloverStream.pipe(s.metadataStream).pipe(s.coalesceStream),s.h264Stream.pipe(s.captionStream).pipe(s.coalesceStream),s.elementaryStream.on("data",(function(n){var a;if("metadata"===n.type){a=n.tracks.length;while(a--)t||"video"!==n.tracks[a].type?i||"audio"!==n.tracks[a].type||(i=n.tracks[a],i.timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime):(t=n.tracks[a],t.timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime);t&&!s.videoSegmentStream&&(s.coalesceStream.numberOfTracks++,s.videoSegmentStream=new ni(t,e),s.videoSegmentStream.on("log",r.getLogTrigger_("videoSegmentStream")),s.videoSegmentStream.on("timelineStartInfo",(function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,s.audioSegmentStream.setEarliestDts(t.dts-r.baseMediaDecodeTime))})),s.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo")),s.videoSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"videoSegmentTimingInfo")),s.videoSegmentStream.on("baseMediaDecodeTime",(function(e){i&&s.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),s.videoSegmentStream.on("timingInfo",r.trigger.bind(r,"videoTimingInfo")),s.h264Stream.pipe(s.videoSegmentStream).pipe(s.coalesceStream)),i&&!s.audioSegmentStream&&(s.coalesceStream.numberOfTracks++,s.audioSegmentStream=new ai(i,e),s.audioSegmentStream.on("log",r.getLogTrigger_("audioSegmentStream")),s.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),s.audioSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"audioSegmentTimingInfo")),s.adtsStream.pipe(s.audioSegmentStream).pipe(s.coalesceStream)),r.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!t})}})),s.coalesceStream.on("data",this.trigger.bind(this,"data")),s.coalesceStream.on("id3Frame",(function(e){e.dispatchType=s.metadataStream.dispatchType,r.trigger("id3Frame",e)})),s.coalesceStream.on("caption",this.trigger.bind(this,"caption")),s.coalesceStream.on("done",this.trigger.bind(this,"done")),Ai(this,s)},this.setBaseMediaDecodeTime=function(r){var s=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=r),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,vi.clearDtsInfo(i),s.audioTimestampRolloverStream&&s.audioTimestampRolloverStream.discontinuity()),t&&(s.videoSegmentStream&&(s.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,vi.clearDtsInfo(t),s.captionStream.reset()),s.timestampRolloverStream&&s.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.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(i){i.stream=e,t.trigger("log",i)}},this.push=function(e){if(s){var t=Ei(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),s=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){s=!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()}},oi.prototype=new fi;var Li,Di={Transmuxer:oi,VideoSegmentStream:ni,AudioSegmentStream:ai,AUDIO_PROPERTIES:xi,VIDEO_PROPERTIES:ki,generateSegmentTimingInfo:Oi},Mi=function(e){return e>>>0},Ni=function(e){return("00"+e.toString(16)).slice(-2)},Ri={toUnsigned:Mi,toHexString:Ni},Ui=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]),t},Bi=Ui,ji=Ri.toUnsigned,Fi=Bi,qi=function(e,t){var i,r,s,n,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)r=ji(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),s=Fi(e.subarray(i+4,i+8)),n=r>1?i+r:e.byteLength,s===t[0]&&(1===t.length?o.push(e.subarray(i+8,n)):(a=qi(e.subarray(i+8,n),t.slice(1)),a.length&&(o=o.concat(a)))),i=n;return o},$i=qi,Hi=Ri.toUnsigned,zi=$.getUint64,Vi=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=zi(e.subarray(4)):t.baseMediaDecodeTime=Hi(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},Gi=Vi,Wi=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]}},Xi=Wi,Yi=Xi,Ki=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},r=new DataView(e.buffer,e.byteOffset,e.byteLength),s=1&i.flags[2],n=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],d=8&i.flags[1],u=r.getUint32(4),c=8;s&&(i.dataOffset=r.getInt32(c),c+=4),n&&u&&(t={flags:Yi(e.subarray(c,c+4))},c+=4,a&&(t.duration=r.getUint32(c),c+=4),o&&(t.size=r.getUint32(c),c+=4),d&&(1===i.version?t.compositionTimeOffset=r.getInt32(c):t.compositionTimeOffset=r.getUint32(c),c+=4),i.samples.push(t),u--);while(u--)t={},a&&(t.duration=r.getUint32(c),c+=4),o&&(t.size=r.getUint32(c),c+=4),l&&(t.flags=Yi(e.subarray(c,c+4)),c+=4),d&&(1===i.version?t.compositionTimeOffset=r.getInt32(c):t.compositionTimeOffset=r.getUint32(c),c+=4),i.samples.push(t);return i},Ji=Ki,Qi=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},s=1&r.flags[2],n=2&r.flags[2],a=8&r.flags[2],o=16&r.flags[2],l=32&r.flags[2],d=65536&r.flags[0],u=131072&r.flags[0];return t=8,s&&(t+=4,r.baseDataOffset=i.getUint32(12),t+=4),n&&(r.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(r.defaultSampleDuration=i.getUint32(t),t+=4),o&&(r.defaultSampleSize=i.getUint32(t),t+=4),l&&(r.defaultSampleFlags=i.getUint32(t)),d&&(r.durationIsEmpty=!0),!s&&u&&(r.baseDataOffsetIsMoof=!0),r},Zi=Qi;Li="undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{};var er,tr,ir,rr,sr,nr,ar=Li,or=Ne.discardEmulationPreventionBytes,lr=Je.CaptionStream,dr=$i,ur=Gi,cr=Ji,hr=Zi,pr=ar,fr=function(e,t){for(var i=e,r=0;r<t.length;r++){var s=t[r];if(i<s.size)return s;i-=s.size}return null},mr=function(e,t,i){var r,s,n,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(s=0;s+4<e.length;s+=n)if(n=o.getUint32(s),s+=4,!(n<=0))switch(31&e[s]){case 6:var d=e.subarray(s+1,s+1+n),u=fr(s,t);if(r={nalUnitType:"sei_rbsp",size:n,data:d,escapedRBSP:or(d),trackId:i},u)r.pts=u.pts,r.dts=u.dts,a=u;else{if(!a){l.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+s+" for trackId "+i+". See mux.js#223."});break}r.pts=a.pts,r.dts=a.dts}l.seiNals.push(r);break}return l},gr=function(e,t,i){var r=t,s=i.defaultSampleDuration||0,n=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach((function(e){var t=cr(e),i=t.samples;i.forEach((function(e){void 0===e.duration&&(e.duration=s),void 0===e.size&&(e.size=n),e.trackId=a,e.dts=r,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),"bigint"===typeof r?(e.pts=r+pr.BigInt(e.compositionTimeOffset),r+=pr.BigInt(e.duration)):(e.pts=r+e.compositionTimeOffset,r+=e.duration)})),o=o.concat(i)})),o},yr=function(e,t){var i=dr(e,["moof","traf"]),r=dr(e,["mdat"]),s={},n=[];return r.forEach((function(e,t){var r=i[t];n.push({mdat:e,traf:r})})),n.forEach((function(e){var i,r,n=e.mdat,a=e.traf,o=dr(a,["tfhd"]),l=hr(o[0]),d=l.trackId,u=dr(a,["tfdt"]),c=u.length>0?ur(u[0]).baseMediaDecodeTime:0,h=dr(a,["trun"]);t===d&&h.length>0&&(i=gr(h,c,l),r=mr(n,i,d),s[d]||(s[d]={seiNals:[],logs:[]}),s[d].seiNals=s[d].seiNals.concat(r.seiNals),s[d].logs=s[d].logs.concat(r.logs))})),s},vr=function(e,t,i){var r;if(null===t)return null;r=yr(e,t);var s=r[t]||{};return{seiNals:s.seiNals,logs:s.logs,timescale:i}},br=function(){var e,t,i,r,s,n,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new lr,a=!0,n=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/r,e.endTime=e.endPts/r,s.captions.push(e),s.captionStreams[e.stream]=!0})),e.on("log",(function(e){s.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"===typeof t&&0===Object.keys(t).length)&&(i!==e[0]||r!==t[i])},this.parse=function(e,n,a){var o;if(!this.isInitialized())return null;if(!n||!a)return null;if(this.isNewInit(n,a))i=n[0],r=a[i];else if(null===i||!r)return t.push(e),null;while(t.length>0){var l=t.shift();this.parse(l,n,a)}return o=vr(e,i,r),o&&o.logs&&(s.logs=s.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),s):s.logs.length?{logs:s.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;n?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){s.captions=[],s.captionStreams={},s.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,r=null,s?this.clearParsedCaptions():s={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},_r=br,Tr=Ri.toUnsigned,Sr=Ri.toHexString,wr=$i,Er=Bi,Cr=Zi,xr=Ji,kr=Gi,Ir=$.getUint64,Ar=ar;er=function(e){var t={},i=wr(e,["moov","trak"]);return i.reduce((function(e,t){var i,r,s,n,a;return i=wr(t,["tkhd"])[0],i?(r=i[0],s=0===r?12:20,n=Tr(i[s]<<24|i[s+1]<<16|i[s+2]<<8|i[s+3]),a=wr(t,["mdia","mdhd"])[0],a?(r=a[0],s=0===r?12:20,e[n]=Tr(a[s]<<24|a[s+1]<<16|a[s+2]<<8|a[s+3]),e):null):null}),t)},tr=function(e,t){var i;i=wr(t,["moof","traf"]);var r=i.reduce((function(t,i){var r,s=wr(i,["tfhd"])[0],n=Tr(s[4]<<24|s[5]<<16|s[6]<<8|s[7]),a=e[n]||9e4,o=wr(i,["tfdt"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let d;return r=1===o[0]?Ir(o.subarray(4,12)):l.getUint32(4),"bigint"===typeof r?d=r/Ar.BigInt(a):"number"!==typeof r||isNaN(r)||(d=r/a),d<Number.MAX_SAFE_INTEGER&&(d=Number(d)),d<t&&(t=d),t}),1/0);return"bigint"===typeof r||isFinite(r)?r:0},ir=function(e,t){var i,r=wr(t,["moof","traf"]),s=0,n=0;if(r&&r.length){var a=wr(r[0],["tfhd"])[0],o=wr(r[0],["trun"])[0],l=wr(r[0],["tfdt"])[0];if(a){var d=Cr(a);i=d.trackId}if(l){var u=kr(l);s=u.baseMediaDecodeTime}if(o){var c=xr(o);c.samples&&c.samples.length&&(n=c.samples[0].compositionTimeOffset||0)}}var h=e[i]||9e4;"bigint"===typeof s&&(n=Ar.BigInt(n),h=Ar.BigInt(h));var p=(s+n)/h;return"bigint"===typeof p&&p<Number.MAX_SAFE_INTEGER&&(p=Number(p)),p},rr=function(e){var t=wr(e,["moov","trak"]),i=[];return t.forEach((function(e){var t=wr(e,["mdia","hdlr"]),r=wr(e,["tkhd"]);t.forEach((function(e,t){var s,n,a,o=Er(e.subarray(8,12)),l=r[t];"vide"===o&&(s=new DataView(l.buffer,l.byteOffset,l.byteLength),n=s.getUint8(0),a=0===n?s.getUint32(12):s.getUint32(20),i.push(a))}))})),i},nr=function(e){var t=e[0],i=0===t?12:20;return Tr(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3])},sr=function(e){var t=wr(e,["moov","trak"]),i=[];return t.forEach((function(e){var t,r,s={},n=wr(e,["tkhd"])[0];n&&(t=new DataView(n.buffer,n.byteOffset,n.byteLength),r=t.getUint8(0),s.id=0===r?t.getUint32(12):t.getUint32(20));var a=wr(e,["mdia","hdlr"])[0];if(a){var o=Er(a.subarray(8,12));s.type="vide"===o?"video":"soun"===o?"audio":o}var l=wr(e,["mdia","minf","stbl","stsd"])[0];if(l){var d=l.subarray(8);s.codec=Er(d.subarray(4,8));var u,c,h=wr(d,[s.codec])[0];h&&(/^[asm]vc[1-9]$/i.test(s.codec)?(u=h.subarray(78),c=Er(u.subarray(4,8)),"avcC"===c&&u.length>11?(s.codec+=".",s.codec+=Sr(u[9]),s.codec+=Sr(u[10]),s.codec+=Sr(u[11])):s.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(s.codec)?(u=h.subarray(28),c=Er(u.subarray(4,8)),"esds"===c&&u.length>20&&0!==u[19]?(s.codec+="."+Sr(u[19]),s.codec+="."+Sr(u[20]>>>2&63).replace(/^0/,"")):s.codec="mp4a.40.2"):s.codec=s.codec.toLowerCase())}var p=wr(e,["mdia","mdhd"])[0];p&&(s.timescale=nr(p)),i.push(s)})),i};var Pr={findBox:wr,parseType:Er,timescale:er,startTime:tr,compositionStartTime:ir,videoTrackIds:rr,tracks:sr,getTimescaleFromMediaHeader:nr},Or=Qe,Lr=function(e){var t=31&e[1];return t<<=8,t|=e[2],t},Dr=function(e){return!!(64&e[1])},Mr=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},Nr=function(e,t){var i=Lr(e);return 0===i?"pat":i===t?"pmt":t?"pes":null},Rr=function(e){var t=Dr(e),i=4+Mr(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},Ur=function(e){var t={},i=Dr(e),r=4+Mr(e);if(i&&(r+=e[r]+1),1&e[r+5]){var s,n,a;s=(15&e[r+1])<<8|e[r+2],n=3+s-4,a=(15&e[r+10])<<8|e[r+11];var o=12+a;while(o<n){var l=r+o;t[(31&e[l+1])<<8|e[l+2]]=e[l],o+=5+((15&e[l+3])<<8|e[l+4])}return t}},Br=function(e,t){var i=Lr(e),r=t[i];switch(r){case Or.H264_STREAM_TYPE:return"video";case Or.ADTS_STREAM_TYPE:return"audio";case Or.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},jr=function(e){var t=Dr(e);if(!t)return null;var i=4+Mr(e);if(i>=e.byteLength)return null;var r,s=null;return r=e[i+7],192&r&&(s={},s.pts=(14&e[i+9])<<27|(255&e[i+10])<<20|(254&e[i+11])<<12|(255&e[i+12])<<5|(254&e[i+13])>>>3,s.pts*=4,s.pts+=(6&e[i+13])>>>1,s.dts=s.pts,64&r&&(s.dts=(14&e[i+14])<<27|(255&e[i+15])<<20|(254&e[i+16])<<12|(255&e[i+17])<<5|(254&e[i+18])>>>3,s.dts*=4,s.dts+=(6&e[i+18])>>>1)),s},Fr=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}},qr=function(e){for(var t,i=4+Mr(e),r=e.subarray(i),s=0,n=0,a=!1;n<r.byteLength-3;n++)if(1===r[n+2]){s=n+5;break}while(s<r.byteLength)switch(r[s]){case 0:if(0!==r[s-1]){s+=2;break}if(0!==r[s-2]){s++;break}n+3!==s-2&&(t=Fr(31&r[n+3]),"slice_layer_without_partitioning_rbsp_idr"===t&&(a=!0));do{s++}while(1!==r[s]&&s<r.length);n=s-2,s+=3;break;case 1:if(0!==r[s-1]||0!==r[s-2]){s+=3;break}t=Fr(31&r[n+3]),"slice_layer_without_partitioning_rbsp_idr"===t&&(a=!0),n=s-2,s+=3;break;default:s+=3;break}return r=r.subarray(n),s-=n,n=0,r&&r.byteLength>3&&(t=Fr(31&r[n+3]),"slice_layer_without_partitioning_rbsp_idr"===t&&(a=!0)),a},$r={parseType:Nr,parsePat:Rr,parsePmt:Ur,parsePayloadUnitStartIndicator:Dr,parsePesType:Br,parsePesTime:jr,videoPacketContainsKeyFrame:qr},Hr=Qe,zr=at.handleRollover,Vr={};Vr.ts=$r,Vr.aac=ii;var Gr=me.ONE_SECOND_IN_TS,Wr=188,Xr=71,Yr=function(e,t){var i,r,s=0,n=Wr;while(n<e.byteLength)if(e[s]!==Xr||e[n]!==Xr)s++,n++;else{switch(i=e.subarray(s,n),r=Vr.ts.parseType(i,t.pid),r){case"pat":t.pid=Vr.ts.parsePat(i);break;case"pmt":var a=Vr.ts.parsePmt(i);t.table=t.table||{},Object.keys(a).forEach((function(e){t.table[e]=a[e]}));break}s+=Wr,n+=Wr}},Kr=function(e,t,i){var r,s,n,a,o,l=0,d=Wr,u=!1;while(d<=e.byteLength)if(e[l]!==Xr||e[d]!==Xr&&d!==e.byteLength)l++,d++;else{switch(r=e.subarray(l,d),s=Vr.ts.parseType(r,t.pid),s){case"pes":n=Vr.ts.parsePesType(r,t.table),a=Vr.ts.parsePayloadUnitStartIndicator(r),"audio"===n&&a&&(o=Vr.ts.parsePesTime(r),o&&(o.type="audio",i.audio.push(o),u=!0));break}if(u)break;l+=Wr,d+=Wr}d=e.byteLength,l=d-Wr,u=!1;while(l>=0)if(e[l]!==Xr||e[d]!==Xr&&d!==e.byteLength)l--,d--;else{switch(r=e.subarray(l,d),s=Vr.ts.parseType(r,t.pid),s){case"pes":n=Vr.ts.parsePesType(r,t.table),a=Vr.ts.parsePayloadUnitStartIndicator(r),"audio"===n&&a&&(o=Vr.ts.parsePesTime(r),o&&(o.type="audio",i.audio.push(o),u=!0));break}if(u)break;l-=Wr,d-=Wr}},Jr=function(e,t,i){var r,s,n,a,o,l,d,u,c=0,h=Wr,p=!1,f={data:[],size:0};while(h<e.byteLength)if(e[c]!==Xr||e[h]!==Xr)c++,h++;else{switch(r=e.subarray(c,h),s=Vr.ts.parseType(r,t.pid),s){case"pes":if(n=Vr.ts.parsePesType(r,t.table),a=Vr.ts.parsePayloadUnitStartIndicator(r),"video"===n&&(a&&!p&&(o=Vr.ts.parsePesTime(r),o&&(o.type="video",i.video.push(o),p=!0)),!i.firstKeyFrame)){if(a&&0!==f.size){l=new Uint8Array(f.size),d=0;while(f.data.length)u=f.data.shift(),l.set(u,d),d+=u.byteLength;if(Vr.ts.videoPacketContainsKeyFrame(l)){var m=Vr.ts.parsePesTime(l);m?(i.firstKeyFrame=m,i.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}f.size=0}f.data.push(r),f.size+=r.byteLength}break}if(p&&i.firstKeyFrame)break;c+=Wr,h+=Wr}h=e.byteLength,c=h-Wr,p=!1;while(c>=0)if(e[c]!==Xr||e[h]!==Xr)c--,h--;else{switch(r=e.subarray(c,h),s=Vr.ts.parseType(r,t.pid),s){case"pes":n=Vr.ts.parsePesType(r,t.table),a=Vr.ts.parsePayloadUnitStartIndicator(r),"video"===n&&a&&(o=Vr.ts.parsePesTime(r),o&&(o.type="video",i.video.push(o),p=!0));break}if(p)break;c-=Wr,h-=Wr}},Qr=function(e,t){if(e.audio&&e.audio.length){var i=t;("undefined"===typeof i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach((function(e){e.dts=zr(e.dts,i),e.pts=zr(e.pts,i),e.dtsTime=e.dts/Gr,e.ptsTime=e.pts/Gr}))}if(e.video&&e.video.length){var r=t;if(("undefined"===typeof r||isNaN(r))&&(r=e.video[0].dts),e.video.forEach((function(e){e.dts=zr(e.dts,r),e.pts=zr(e.pts,r),e.dtsTime=e.dts/Gr,e.ptsTime=e.pts/Gr})),e.firstKeyFrame){var s=e.firstKeyFrame;s.dts=zr(s.dts,r),s.pts=zr(s.pts,r),s.dtsTime=s.dts/Gr,s.ptsTime=s.pts/Gr}}},Zr=function(e){var t,i=!1,r=0,s=null,n=null,a=0,o=0;while(e.length-o>=3){var l=Vr.aac.parseType(e,o);switch(l){case"timed-metadata":if(e.length-o<10){i=!0;break}if(a=Vr.aac.parseId3TagSize(e,o),a>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+a),n=Vr.aac.parseAacTimestamp(t)),o+=a;break;case"audio":if(e.length-o<7){i=!0;break}if(a=Vr.aac.parseAdtsSize(e,o),a>e.length){i=!0;break}null===s&&(t=e.subarray(o,o+a),s=Vr.aac.parseSampleRate(t)),r++,o+=a;break;default:o++;break}if(i)return null}if(null===s||null===n)return null;var d=Gr/s,u={audio:[{type:"audio",dts:n,pts:n},{type:"audio",dts:n+1024*r*d,pts:n+1024*r*d}]};return u},es=function(e){var t={pid:null,table:null},i={};for(var r in Yr(e,t),t.table)if(t.table.hasOwnProperty(r)){var s=t.table[r];switch(s){case Hr.H264_STREAM_TYPE:i.video=[],Jr(e,t,i),0===i.video.length&&delete i.video;break;case Hr.ADTS_STREAM_TYPE:i.audio=[],Kr(e,t,i),0===i.audio.length&&delete i.audio;break}}return i},ts=function(e,t){var i,r=Vr.aac.isLikelyAacData(e);return i=r?Zr(e):es(e),i&&(i.audio||i.video)?(Qr(i,t),i):null},is={inspect:ts,parseAudioPes_:Kr};const rs=function(e,t){t.on("data",(function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const 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){const i={start:{decode:me.videoTsToSeconds(t.start.dts),presentation:me.videoTsToSeconds(t.start.pts)},end:{decode:me.videoTsToSeconds(t.end.dts),presentation:me.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:me.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=me.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:i})})),t.on("audioSegmentTimingInfo",(function(t){const i={start:{decode:me.videoTsToSeconds(t.start.dts),presentation:me.videoTsToSeconds(t.start.pts)},end:{decode:me.videoTsToSeconds(t.end.dts),presentation:me.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:me.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=me.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:i})})),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.videoTsToSeconds(t.start),end:me.videoTsToSeconds(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:me.videoTsToSeconds(t.start),end:me.videoTsToSeconds(t.end)}})})),t.on("log",(function(t){e.postMessage({action:"log",log:t})}))};class ss{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Di.Transmuxer(this.options),rs(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new _r,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=Pr.startTime(e,t);this.self.postMessage({action:"probeMp4StartTime",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=Pr.tracks(e);this.self.postMessage({action:"probeMp4Tracks",tracks:t,data:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i="number"!==typeof t||isNaN(t)?void 0:t*me.ONE_SECOND_IN_TS,r=is.inspect(e,i);let s=null;r&&(s={hasVideo:r.video&&2===r.video.length||!1,hasAudio:r.audio&&2===r.audio.length||!1},s.hasVideo&&(s.videoStart=r.video[0].ptsTime),s.hasAudio&&(s.audioStart=r.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:s,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(me.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(me.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new ss(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new ss(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})));var wo=bo(So);const Eo=(e,t,i)=>{const{type:r,initSegment:s,captions:n,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:d}=e.data.segment;t.buffer.push({captions:n,captionStreams:a,metadata:o});const u=e.data.segment.boxes||{data:e.data.segment.data},c={type:r,data:new Uint8Array(u.data,u.data.byteOffset,u.data.byteLength),initSegment:new Uint8Array(s.data,s.byteOffset,s.byteLength)};"undefined"!==typeof l&&(c.videoFrameDtsTime=l),"undefined"!==typeof d&&(c.videoFramePtsTime=d),i(c)},Co=({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)},xo=(e,t)=>{t.gopInfo=e.data.gopInfo},ko=e=>{const{transmuxer:t,bytes:i,audioAppendStart:r,gopsToAlignWith:s,remux:n,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:d,onVideoSegmentTimingInfo:u,onAudioSegmentTimingInfo:c,onId3:h,onCaptions:p,onDone:f,onEndedTimeline:m,onTransmuxerLog:g,isEndOfTimeline:y}=e,v={buffer:[]};let b=y;const _=i=>{t.currentTransmux===e&&("data"===i.data.action&&Eo(i,v,a),"trackinfo"===i.data.action&&o(i.data.trackInfo),"gopInfo"===i.data.action&&xo(i,v),"audioTimingInfo"===i.data.action&&l(i.data.audioTimingInfo),"videoTimingInfo"===i.data.action&&d(i.data.videoTimingInfo),"videoSegmentTimingInfo"===i.data.action&&u(i.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===i.data.action&&c(i.data.audioSegmentTimingInfo),"id3Frame"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),"caption"===i.data.action&&p(i.data.caption),"endedtimeline"===i.data.action&&(b=!1,m()),"log"===i.data.action&&g(i.data.log),"transmuxed"===i.data.type&&(b||(t.onmessage=null,Co({transmuxedData:v,callback:f}),Io(t))))};if(t.onmessage=_,r&&t.postMessage({action:"setAudioAppendStart",appendStart:r}),Array.isArray(s)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:s}),"undefined"!==typeof n&&t.postMessage({action:"setRemux",remux:n}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,r=i instanceof ArrayBuffer?0:i.byteOffset;t.postMessage({action:"push",data:e,byteOffset:r,byteLength:i.byteLength},[e])}y&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},Io=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"===typeof e.currentTransmux?e.currentTransmux():ko(e.currentTransmux))},Ao=(e,t)=>{e.postMessage({action:t}),Io(e)},Po=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void Ao(t,e);t.transmuxQueue.push(Ao.bind(null,t,e))},Oo=e=>{Po("reset",e)},Lo=e=>{Po("endTimeline",e)},Do=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ko(e);e.transmuxer.transmuxQueue.push(e)},Mo=e=>{const t=new wo;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:"init",options:e}),t};var No={reset:Oo,endTimeline:Lo,transmux:Do,createTransmuxer:Mo};const Ro=function(e){const t=e.transmuxer,i=e.endAction||e.action,r=e.callback,s=y()({},e,{endAction:null,transmuxer:null,callback:null}),n=s=>{s.data.action===i&&(t.removeEventListener("message",n),s.data.data&&(s.data.data=new Uint8Array(s.data.data,e.byteOffset||0,e.byteLength||s.data.data.byteLength),e.data&&(e.data=s.data.data)),r(s.data))};if(t.addEventListener("message",n),e.data){const i=e.data instanceof ArrayBuffer;s.byteOffset=i?0:e.data.byteOffset,s.byteLength=e.data.byteLength;const r=[i?e.data:e.data.buffer];t.postMessage(s,r)}else t.postMessage(s)},Uo={FAILURE:2,TIMEOUT:-101,ABORTED:-102},Bo=e=>{e.forEach(e=>{e.abort()})},jo=e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}),Fo=e=>{const t=e.target,i=Date.now()-t.requestTime,r={bandwidth:1/0,bytesReceived:0,roundTripTime:i||0};return r.bytesReceived=e.loaded,r.bandwidth=Math.floor(r.bytesReceived/r.roundTripTime*8*1e3),r},qo=(e,t)=>t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:Uo.TIMEOUT,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Uo.ABORTED,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:Uo.FAILURE,xhr:t}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:Uo.FAILURE,xhr:t}:null,$o=(e,t,i)=>(r,s)=>{const n=s.response,a=qo(r,s);if(a)return i(a,e);if(16!==n.byteLength)return i({status:s.status,message:"Invalid HLS key at URL: "+s.uri,code:Uo.FAILURE,xhr:s},e);const o=new DataView(n),l=new Uint32Array([o.getUint32(0),o.getUint32(4),o.getUint32(8),o.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=l;return i(null,e)},Ho=(e,t)=>{const i=Object(x["a"])(e.map.bytes);if("mp4"!==i){const r=e.map.resolvedUri||e.map.uri;return t({internal:!0,message:`Found unsupported ${i||"unknown"} container for initialization segment at URL: ${r}`,code:Uo.FAILURE})}Ro({action:"probeMp4Tracks",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:r})=>(e.map.bytes=r,i.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,"number"===typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale))})),t(null))})},zo=({segment:e,finishProcessingFn:t})=>(i,r)=>{const s=qo(i,r);if(s)return t(s,e);const n=new Uint8Array(r.response);if(e.map.key)return e.map.encryptedBytes=n,t(null,e);e.map.bytes=n,Ho(e,(function(i){if(i)return i.xhr=r,i.status=r.status,t(i,e);t(null,e)}))},Vo=({segment:e,finishProcessingFn:t,responseType:i})=>(r,s)=>{const n=qo(r,s);if(n)return t(n,e);const a="arraybuffer"!==i&&s.responseText?go(s.responseText.substring(e.lastReachedChar||0)):s.response;return e.stats=jo(s),e.key?e.encryptedBytes=new Uint8Array(a):e.bytes=new Uint8Array(a),t(null,e)},Go=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h})=>{const p=e.map&&e.map.tracks||{},f=Boolean(p.audio&&p.video);let m=r.bind(null,e,"audio","start");const g=r.bind(null,e,"audio","end");let y=r.bind(null,e,"video","start");const v=r.bind(null,e,"video","end"),b=()=>Do({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:f,onData:t=>{t.type="combined"===t.type?"video":t.type,u(e,t)},onTrackInfo:t=>{i&&(f&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{m&&"undefined"!==typeof e.start&&(m(e.start),m=null),g&&"undefined"!==typeof e.end&&g(e.end)},onVideoTimingInfo:e=>{y&&"undefined"!==typeof e.start&&(y(e.start),y=null),v&&"undefined"!==typeof e.end&&v(e.end)},onVideoSegmentTimingInfo:e=>{s(e)},onAudioSegmentTimingInfo:e=>{n(e)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{d()},onTransmuxerLog:h,onDone:t=>{c&&(t.type="combined"===t.type?"video":t.type,c(null,e,t))}});Ro({action:"probeTs",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:r=>{e.bytes=t=r.data;const s=r.result;s&&(i(e,{hasAudio:s.hasAudio,hasVideo:s.hasVideo,isMuxed:f}),i=null,s.hasAudio&&!f&&m(s.audioStart),s.hasVideo&&y(s.videoStart),m=null,y=null),b()}})},Wo=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h})=>{let p=new Uint8Array(t);if(Object(x["b"])(p)){e.isFmp4=!0;const{tracks:s}=e.map,n={isFmp4:!0,hasVideo:!!s.video,hasAudio:!!s.audio};s.audio&&s.audio.codec&&"enca"!==s.audio.codec&&(n.audioCodec=s.audio.codec),s.video&&s.video.codec&&"encv"!==s.video.codec&&(n.videoCodec=s.video.codec),s.video&&s.audio&&(n.isMuxed=!0),i(e,n);const a=t=>{u(e,{data:p,type:n.hasAudio&&!n.isMuxed?"audio":"video"}),t&&t.length&&o(e,t),c(null,e,{})};Ro({action:"probeMp4StartTime",timescales:e.map.timescales,data:p,transmuxer:e.transmuxer,callback:({data:i,startTime:o})=>{t=i.buffer,e.bytes=p=i,n.hasAudio&&!n.isMuxed&&r(e,"audio","start",o),n.hasVideo&&r(e,"video","start",o),s.video&&i.byteLength&&e.transmuxer?Ro({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:e.transmuxer,data:p,timescales:e.map.timescales,trackIds:[s.video.id],callback:i=>{t=i.data.buffer,e.bytes=p=i.data,i.logs.forEach((function(e){h(An(e,{stream:"mp4CaptionParser"}))})),a(i.captions)}}):a()}})}else if(e.transmuxer){if("undefined"===typeof e.container&&(e.container=Object(x["a"])(p)),"ts"!==e.container&&"aac"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void c(null,e,{});Go({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h})}else c(null,e,{})},Xo=function({id:e,key:t,encryptedBytes:i,decryptionWorker:r},s){const n=t=>{if(t.data.source===e){r.removeEventListener("message",n);const e=t.data.decrypted;s(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let a;r.addEventListener("message",n),a=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),r.postMessage($a({source:e,encrypted:i,key:a,iv:t.iv}),[i.buffer,a.buffer])},Yo=({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h})=>{Xo({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e},e=>{t.bytes=e,Wo({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h})})},Ko=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h})=>{let p=0,f=!1;return(m,g)=>{if(!f){if(m)return f=!0,Bo(e),c(m,g);if(p+=1,p===e.length){const p=function(){if(g.encryptedBytes)return Yo({decryptionWorker:t,segment:g,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h});Wo({segment:g,bytes:g.bytes,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h})};if(g.endOfAllRequests=Date.now(),g.map&&g.map.encryptedBytes&&!g.map.bytes)return Xo({decryptionWorker:t,id:g.requestId+"-init",encryptedBytes:g.map.encryptedBytes,key:g.map.key},t=>{g.map.bytes=t,Ho(g,t=>{if(t)return Bo(e),c(t,g);p()})});p()}}}},Jo=({loadendState:e,abortFn:t})=>i=>{const r=i.target;r.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)},Qo=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:n,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u})=>i=>{const r=i.target;if(!r.aborted)return e.stats=An(e.stats,Fo(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},Zo=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:r,abortFn:s,progressFn:n,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:d,id3Fn:u,captionsFn:c,isEndOfTimeline:h,endedTimelineFn:p,dataFn:f,doneFn:m,onTransmuxerLog:g})=>{const y=[],v=Ko({activeXhrs:y,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:d,id3Fn:u,captionsFn:c,isEndOfTimeline:h,endedTimelineFn:p,dataFn:f,doneFn:m,onTransmuxerLog:g});if(r.key&&!r.key.bytes){const i=[r.key];r.map&&!r.map.bytes&&r.map.key&&r.map.key.resolvedUri===r.key.resolvedUri&&i.push(r.map.key);const s=An(t,{uri:r.key.resolvedUri,responseType:"arraybuffer"}),n=$o(r,i,v),a=e(s,n);y.push(a)}if(r.map&&!r.map.bytes){const i=r.map.key&&(!r.key||r.key.resolvedUri!==r.map.key.resolvedUri);if(i){const i=An(t,{uri:r.map.key.resolvedUri,responseType:"arraybuffer"}),s=$o(r,[r.map.key],v),n=e(i,s);y.push(n)}const s=An(t,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:Ba(r.map)}),n=zo({segment:r,finishProcessingFn:v}),a=e(s,n);y.push(a)}const b=An(t,{uri:r.part&&r.part.resolvedUri||r.resolvedUri,responseType:"arraybuffer",headers:Ba(r)}),_=Vo({segment:r,finishProcessingFn:v,responseType:b.responseType}),T=e(b,_);T.addEventListener("progress",Qo({segment:r,progressFn:n,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:d,id3Fn:u,captionsFn:c,isEndOfTimeline:h,endedTimelineFn:p,dataFn:f})),y.push(T);const S={};return y.forEach(e=>{e.addEventListener("loadend",Jo({loadendState:S,abortFn:s}))}),()=>Bo(y)},el=In("CodecUtils"),tl=function(e){const t=e.attributes||{};if(t.CODECS)return Object(b["h"])(t.CODECS)},il=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},rl=(e,t)=>{if(!il(e,t))return!0;const i=t.attributes||{},r=e.mediaGroups.AUDIO[i.AUDIO];for(const s in r)if(!r[s].uri&&!r[s].playlists)return!0;return!1},sl=function(e){const t={};return e.forEach(({mediaType:e,type:i,details:r})=>{t[e]=t[e]||[],t[e].push(Object(b["i"])(`${i}${r}`))}),Object.keys(t).forEach((function(e){if(t[e].length>1)return el(`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},nl=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},al=function(e,t){const i=t.attributes||{},r=sl(tl(t)||[]);if(il(e,t)&&!r.audio&&!rl(e,t)){const t=sl(Object(b["d"])(e,i.AUDIO)||[]);t.audio&&(r.audio=t.audio)}return r},ol=In("PlaylistSelector"),ll=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})},dl=function(e,t){if(!e)return"";const i=s.a.getComputedStyle(e);return i?i[t]:""},ul=function(e,t){const i=e.slice();e.sort((function(e,r){const s=t(e,r);return 0===s?i.indexOf(e)-i.indexOf(r):s}))},cl=function(e,t){let i,r;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||s.a.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(r=t.attributes.BANDWIDTH),r=r||s.a.Number.MAX_VALUE,i-r},hl=function(e,t){let i,r;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||s.a.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(r=t.attributes.RESOLUTION.width),r=r||s.a.Number.MAX_VALUE,i===r&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-r};let pl=function(e,t,i,r,n,a){if(!e)return;const o={bandwidth:t,width:i,height:r,limitRenditionByPlayerDimensions:n};let l=e.playlists;fa.isAudioOnly(e)&&(l=a.getAudioTrackPlaylists_(),o.audioOnly=!0);let d=l.map(e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,r=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||s.a.Number.MAX_VALUE,{bandwidth:t,width:i,height:r,playlist:e}});ul(d,(e,t)=>e.bandwidth-t.bandwidth),d=d.filter(e=>!fa.isIncompatible(e.playlist));let u=d.filter(e=>fa.isEnabled(e.playlist));u.length||(u=d.filter(e=>!fa.isDisabled(e.playlist)));const c=u.filter(e=>e.bandwidth*mo.BANDWIDTH_VARIANCE<t);let h=c[c.length-1];const p=c.filter(e=>e.bandwidth===h.bandwidth)[0];if(!1===n){const e=p||u[0]||d[0];if(e&&e.playlist){let t="sortedPlaylistReps";return p&&(t="bandwidthBestRep"),u[0]&&(t="enabledPlaylistReps"),ol(`choosing ${ll(e)} using ${t} with options`,o),e.playlist}return ol("could not choose a playlist with options",o),null}const f=c.filter(e=>e.width&&e.height);ul(f,(e,t)=>e.width-t.width);const m=f.filter(e=>e.width===i&&e.height===r);h=m[m.length-1];const g=m.filter(e=>e.bandwidth===h.bandwidth)[0];let y,v,b,_;if(g||(y=f.filter(e=>e.width>i||e.height>r),v=y.filter(e=>e.width===y[0].width&&e.height===y[0].height),h=v[v.length-1],b=v.filter(e=>e.bandwidth===h.bandwidth)[0]),a.leastPixelDiffSelector){const e=f.map(e=>(e.pixelDiff=Math.abs(e.width-i)+Math.abs(e.height-r),e));ul(e,(e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff),_=e[0]}const T=_||b||g||p||u[0]||d[0];if(T&&T.playlist){let e="sortedPlaylistReps";return _?e="leastPixelDiffRep":b?e="resolutionPlusOneRep":g?e="resolutionBestRep":p?e="bandwidthBestRep":u[0]&&(e="enabledPlaylistReps"),ol(`choosing ${ll(T)} using ${e} with options`,o),T.playlist}return ol("could not choose a playlist with options",o),null};const fl=function(){const e=this.useDevicePixelRatio&&s.a.devicePixelRatio||1;return pl(this.playlists.main,this.systemBandwidth,parseInt(dl(this.tech_.el(),"width"),10)*e,parseInt(dl(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.playlistController_)},ml=function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){const r=this.useDevicePixelRatio&&s.a.devicePixelRatio||1;return t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),pl(this.playlists.main,t,parseInt(dl(this.tech_.el(),"width"),10)*r,parseInt(dl(this.tech_.el(),"height"),10)*r,this.limitRenditionByPlayerDimensions,this.playlistController_)}},gl=function(e){const{main:t,currentTime:i,bandwidth:r,duration:s,segmentDuration:n,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,d=t.playlists.filter(e=>!fa.isIncompatible(e));let u=d.filter(fa.isEnabled);u.length||(u=d.filter(e=>!fa.isDisabled(e)));const c=u.filter(fa.hasAttribute.bind(null,"BANDWIDTH")),h=c.map(e=>{const t=l.getSyncPoint(e,s,o,i),d=t?1:2,u=fa.estimateSegmentRequestTime(n,r,e),c=u*d-a;return{playlist:e,rebufferingImpact:c}}),p=h.filter(e=>e.rebufferingImpact<=0);return ul(p,(e,t)=>cl(t.playlist,e.playlist)),p.length?p[0]:(ul(h,(e,t)=>e.rebufferingImpact-t.rebufferingImpact),h[0]||null)},yl=function(){const e=this.playlists.main.playlists.filter(fa.isEnabled);ul(e,(e,t)=>cl(e,t));const t=e.filter(e=>!!al(this.playlists.main,e).video);return t[0]||null},vl=e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach(e=>{t.set(e,i),i+=e.byteLength})),t},bl=function(e,t,i){if(!e[i]){t.trigger({type:"usage",name:"vhs-608"});let r=i;/^cc708_/.test(i)&&(r="SERVICE"+i.split("_")[1]);const s=t.textTracks().getTrackById(r);if(s)e[i]=s;else{const s=t.options_.vhs&&t.options_.vhs.captionServices||{};let n=i,a=i,o=!1;const l=s[r];l&&(n=l.label,a=l.language,o=l.default),e[i]=t.addRemoteTextTrack({kind:"captions",id:r,default:o,label:n,language:a},!1).track}}},_l=function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const r=s.a.WebKitDataCue||s.a.VTTCue;t.forEach(t=>{const s=t.stream;e[s].addCue(new r(t.startTime+i,t.endTime+i,t.text))})},Tl=function(e){Object.defineProperties(e.frame,{id:{get(){return bn.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get(){return bn.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get(){return bn.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})},Sl=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:r})=>{if(!t)return;const n=s.a.WebKitDataCue||s.a.VTTCue,a=e.metadataTrack_;if(!a)return;if(t.forEach(e=>{const t=e.cueTime+i;!("number"!==typeof t||s.a.isNaN(t)||t<0)&&t<1/0&&e.frames.forEach(e=>{const i=new n(t,t,e.value||e.url||e.data||"");i.frame=e,i.value=e,Tl(i),a.addCue(i)})}),!a.cues||!a.cues.length)return;const o=a.cues,l=[];for(let s=0;s<o.length;s++)o[s]&&l.push(o[s]);const d=l.reduce((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e},{}),u=Object.keys(d).sort((e,t)=>Number(e)-Number(t));u.forEach((e,t)=>{const i=d[e],s=Number(u[t+1])||r;i.forEach(e=>{e.endTime=s})})},wl=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=t)},El=function(e,t,i){let r,s;if(i&&i.cues){r=i.cues.length;while(r--)s=i.cues[r],s.startTime>=e&&s.endTime<=t&&i.removeCue(s)}},Cl=function(e){const t=e.cues;if(t)for(let i=0;i<t.length;i++){const r=[];let s=0;for(let e=0;e<t.length;e++)t[i].startTime===t[e].startTime&&t[i].endTime===t[e].endTime&&t[i].text===t[e].text&&(s++,s>1&&r.push(t[e]));r.length&&r.forEach(t=>e.removeCue(t))}},xl=(e,t,i)=>{if("undefined"===typeof t||null===t||!e.length)return[];const r=Math.ceil((t-i+3)*k["ONE_SECOND_IN_TS"]);let s;for(s=0;s<e.length;s++)if(e[s].pts>r)break;return e.slice(s)},kl=(e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const r=t[0].pts;let s=0;for(s;s<e.length;s++)if(e[s].pts>=r)break;return e.slice(0,s).concat(t)},Il=(e,t,i,r)=>{const s=Math.ceil((t-r)*k["ONE_SECOND_IN_TS"]),n=Math.ceil((i-r)*k["ONE_SECOND_IN_TS"]),a=e.slice();let o=e.length;while(o--)if(e[o].pts<=n)break;if(-1===o)return a;let l=o+1;while(l--)if(e[l].pts<=s)break;return l=Math.max(l,0),a.splice(l,o-l+1),a},Al=function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),r=Object.keys(t).sort();if(i.length!==r.length)return!1;for(let s=0;s<i.length;s++){const n=i[s];if(n!==r[s])return!1;if(e[n]!==t[n])return!1}return!0},Pl=22,Ol=function(e,t,i){t=t||[];const r=[];let s=0;for(let n=0;n<t.length;n++){const a=t[n];if(e===a.timeline&&(r.push(n),s+=a.duration,s>i))return n}return 0===r.length?0:r[r.length-1]},Ll=1,Dl=500,Ml=e=>"number"===typeof e&&isFinite(e),Nl=1/60,Rl=(e,t,i)=>"main"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.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&&i.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,Ul=(e,t,i)=>{let r=t-mo.BACK_BUFFER_LENGTH;e.length&&(r=Math.max(r,e.start(0)));const s=t-i;return Math.min(s,r)},Bl=e=>{const{startOfSegment:t,duration:i,segment:r,part:s,playlist:{mediaSequence:n,id:a,segments:o=[]},mediaIndex:l,partIndex:d,timeline:u}=e,c=o.length-1;let h="mediaIndex/partIndex increment";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(h+=" with independent "+e.independent);const p="number"===typeof d,f=e.segment.uri?"segment":"pre-segment",m=p?Wn({preloadSegment:r})-1:0;return`${f} [${n+l}/${n+c}]`+(p?` part [${d}/${m}]`:"")+` segment start/end [${r.start} => ${r.end}]`+(p?` part start/end [${s.start} => ${s.end}]`:"")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${u}]`+` selected by [${h}]`+` playlist [${a}]`},jl=e=>e+"TimingInfo",Fl=({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:r,overrideCheck:s})=>s||e!==t?e<t?i:r.length?r.end(r.length-1):i:null,ql=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:r,audioDisabled:s})=>{if(t===i)return!1;if("audio"===r){const t=e.lastTimelineChange({type:"main"});return!t||t.to!==i}if("main"===r&&s){const t=e.pendingTimelineChange({type:"audio"});return!t||t.to!==i}return!1},$l=e=>{let t=0;return["video","audio"].forEach((function(i){const r=e[i+"TimingInfo"];if(!r)return;const{start:n,end:a}=r;let o;"bigint"===typeof n||"bigint"===typeof a?o=s.a.BigInt(a)-s.a.BigInt(n):"number"===typeof n&&"number"===typeof a&&(o=a-n),"undefined"!==typeof o&&o>t&&(t=o)})),"bigint"===typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t},Hl=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+On,zl=(e,t)=>{if("hls"!==t)return null;const i=$l({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const r=e.playlist.targetDuration,s=Hl({segmentDuration:i,maxDuration:2*r}),n=Hl({segmentDuration:i,maxDuration:r}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${r}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return s||n?{severity:s?"warn":"info",message:a}:null};class Vl extends bn.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError("Initialization settings are required");if("function"!==typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=bn.browser.IE_VERSION>=11,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=In(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",()=>{this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}),"main"===this.loaderType_&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}),"audio"===this.loaderType_&&this.timelineChangeController_.on("timelinechange",()=>{this.hasEnoughInfoToLoad_()&&this.processLoadQueue_(),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()})}createTransmuxer_(){return No.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&s.a.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,s.a.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)}error(e){return"undefined"!==typeof e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&No.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Pn();if("main"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:r}=e;if(i&&t&&!this.audioDisabled_&&!r)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ha(e);let r=this.initSegments_[i];return t&&!r&&e.bytes&&(this.initSegments_[i]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),r||e}segmentKey(e,t=!1){if(!e)return null;const i=za(e);let r=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!r&&e.bytes&&(this.keyCache_[i]=r={resolvedUri:e.resolvedUri,bytes:e.bytes});const s={resolvedUri:(r||e).resolvedUri};return r&&(s.bytes=r.bytes),s}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){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"))}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;const i=this.playlist_,r=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let s=null;if(i&&(i.id?s=i.id:i.uri&&(s=i.uri)),this.logger_(`playlist update [${s} => ${e.id||e.uri}]`),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri)return null!==this.mediaIndex&&(e.endList?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");const n=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${n}]`),null!==this.mediaIndex)if(this.mediaIndex-=n,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}r&&(r.mediaIndex-=n,r.mediaIndex<0?(r.mediaIndex=null,r.partIndex=null):(r.mediaIndex>=0&&(r.segment=e.segments[r.mediaIndex]),r.partIndex>=0&&r.segment.parts&&(r.part=r.segment.parts[r.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(s.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}resetLoader(){this.fetchAtBuffer_=!1,this.resyncLoader()}resyncLoader(){this.transmuxer_&&No.reset(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"})}remove(e,t,i=(()=>{}),r=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_("skipping remove because end ${end} is <= start ${start}");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_("skipping remove because no source updater or starting media info");let s=1;const n=()=>{s--,0===s&&i()};!r&&this.audioDisabled_||(s++,this.sourceUpdater_.removeAudio(e,t,n)),(r||"main"===this.loaderType_)&&(this.gopBuffer_=Il(this.gopBuffer_,e,t,this.timeMapping_),s++,this.sourceUpdater_.removeVideo(e,t,n));for(const a in this.inbandTextTracks_)El(e,t,this.inbandTextTracks_[a]);El(e,t,this.segmentMetadataTrack_),n()}monitorBuffer_(){this.checkBufferTimeout_&&s.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=s.a.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&s.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=s.a.setTimeout(this.monitorBufferTick_.bind(this),Dl)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const 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))}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const r="number"===typeof e&&t.segments[e],s=e+1===t.segments.length,n=!r||!r.parts||i+1===r.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&s&&n}chooseNextRequest_(){const e=this.buffered_(),t=$n(e)||0,i=Hn(e,this.currentTime_()),r=!this.hasPlayed_()&&i>=1,s=i>=this.goalBufferLength_(),n=this.playlist_.segments;if(!n.length||r||s)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=Ol(this.currentTimeline_,n,t);else if(null!==this.mediaIndex){const e=n[this.mediaIndex],i="number"===typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{const{segmentIndex:e,startTime:i,partIndex:r}=fa.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?t:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});a.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+t:"currentTime "+this.currentTime_(),a.mediaIndex=e,a.startOfSegment=i,a.partIndex=r}const o=n[a.mediaIndex];let l=o&&"number"===typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||"number"===typeof a.partIndex&&!l)return null;if("number"!==typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]),!i&&l&&!l.independent)if(0===a.partIndex){const e=n[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent="previous segment")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent="previous part");const d=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return a.mediaIndex>=n.length-1&&d&&!this.seeking_()?null:this.generateSegmentInfo_(a)}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:r,startOfSegment:s,isSyncRequest:n,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,d=i.segments[r],u="number"===typeof a&&d.parts[a],c={requestId:"segment-loader-"+Math.random(),uri:u&&u.resolvedUri||d.resolvedUri,mediaIndex:r,partIndex:u?a:null,isSyncRequest:n,startOfSegment:s,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:d.timeline,duration:u&&u.duration||d.duration,segment:d,part:u,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h="undefined"!==typeof o?o:this.isPendingTimestampOffset_;c.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:d.timeline,currentTimeline:this.currentTimeline_,startOfSegment:s,buffered:this.buffered_(),overrideCheck:h});const p=$n(this.sourceUpdater_.audioBuffered());return"number"===typeof p&&(c.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(c.gopsToAlignWith=xl(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),c}timestampOffsetForSegment_(e){return Fl(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,r=this.pendingSegment_.duration,s=fa.estimateSegmentRequestTime(r,i,this.playlist_,e.bytesReceived),n=jn(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(s<=n)return;const a=gl({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:r,timeUntilRebuffer:n,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=s-n,l=o-a.rebufferingImpact;let d=.5;n<=On&&(d=1),!a.playlist||a.playlist.uri===this.playlist_.uri||l<d||(this.bandwidth=a.playlist.attributes.BANDWIDTH*mo.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_("Aborting "+Bl(e)),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")}handleTrackInfo_(e,t){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},Al(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()))}handleTimingInfo_(e,t,i,r){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const s=this.pendingSegment_,n=jl(t);s[n]=s[n]||{},s[n][i]=r,this.logger_(`timinginfo: ${t} - ${i} - ${r}`),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_("SegmentLoader received no captions from a caption event");const i=this.pendingSegment_;if(!i.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};t.forEach(e=>{s[e.stream]=s[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=s[e.stream];t.startTime=Math.min(t.startTime,e.startTime+r),t.endTime=Math.max(t.endTime,e.endTime+r),t.captions.push(e)}),Object.keys(s).forEach(e=>{const{startTime:t,endTime:i,captions:n}=s[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${i} for ${e}`),bl(a,this.vhs_.tech_,e),El(t,i,a[e]),_l({captionArray:n,inbandTextTracks:a,timestampOffset:r})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const r=this.pendingSegment_;if(!r.hasAppendedData_)return void this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i));const s=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();wl(this.inbandTextTracks_,i,this.vhs_.tech_),Sl({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:this.duration_()})}processMetadataQueue_(){this.metadataQueue_.id3.forEach(e=>e()),this.metadataQueue_.caption.forEach(e=>e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach(e=>e())}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach(e=>e())}hasEnoughInfoToLoad_(){if("audio"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!ql({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:r,isMuxed:s}=t;return!(r&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!s&&!e.audioTimingInfo)&&!ql({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger("fmp4"),i.timingInfo.start=i[jl(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t="main"===this.loaderType_&&e&&e.hasVideo;let r;t&&(r=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:r,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:"main"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(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)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:r}){if(i){const e=Ha(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=r,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},r){const n=this.sourceUpdater_.audioBuffered(),a=this.sourceUpdater_.videoBuffered();n.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+Fn(n).join(", ")),a.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+Fn(a).join(", "));const o=n.length?n.start(0):0,l=n.length?n.end(n.length-1):0,d=a.length?a.start(0):0,u=a.length?a.end(a.length-1):0;if(l-o<=Ll&&u-d<=Ll)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${Fn(n).join(", ")}, video buffer: ${Fn(a).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:e,type:t,bytes:i}));const c=this.currentTime_(),h=c-Ll;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+h),this.remove(0,h,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${Ll}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=s.a.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},1e3*Ll)},!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},r){r&&(r.code!==Pl?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",r),this.error(`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:r,bytes:s}){if(!s){const e=[r];let t=r.byteLength;i&&(e.unshift(i),t+=i.byteLength),s=vl({bytes:t,segments:e})}this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:s},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:s}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const r=this.pendingSegment_.segment,s=e+"TimingInfo";r[s]||(r[s]={}),r[s].transmuxerPrependedSeconds=i.prependedContentDuration||0,r[s].transmuxedPresentationStart=i.start.presentation,r[s].transmuxedDecodeStart=i.start.decode,r[s].transmuxedPresentationEnd=i.end.presentation,r[s].transmuxedDecodeEnd=i.end.decode,r[s].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:r}=t;if(!r||!r.byteLength)return;if("audio"===i&&this.audioDisabled_)return;const s=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:s,data:r})}loadSegment_(e){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(()=>{const t=y()({},e,{forceTimestampOffset:!0});y()(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)})}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),r=null!==this.mediaIndex,s=e.timeline!==this.currentTimeline_&&e.timeline>0,n=i||r&&s;this.logger_("Requesting "+Bl(e)),t.map&&!t.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Zo({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:n,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:r})=>{this.logger_(`${Bl(e)} logged from transmuxer stream ${r} as a ${i}: ${t}`)}})}trimBackBuffer_(e){const t=Ul(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},s=e.playlist.segments[e.mediaIndex-1];if(s&&s.timeline===t.timeline&&(s.videoTimingInfo?r.baseStartTime=s.videoTimingInfo.transmuxedDecodeEnd:s.audioTimingInfo&&(r.baseStartTime=s.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=i}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e<Nl?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record "+Nl):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state="READY",e.code===Uo.ABORTED)return;return this.pause(),e.code===Uo.TIMEOUT?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}const r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,t.stats),r.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=kl(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(r)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){"number"===typeof e.start&&"number"===typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:r,currentVideoTimestampOffset:s,useVideoTimingInfo:n,videoTimingInfo:a,audioTimingInfo:o}){if("undefined"!==typeof e)return e;if(!n)return o.start;const l=t.segments[i-1];return 0!==i&&l&&"undefined"!==typeof l.start&&l.end===r+s?a.start:r}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0}),void this.trigger("error");const{hasAudio:i,hasVideo:r,isMuxed:s}=t,n="main"===this.loaderType_&&r,a=!this.audioDisabled_&&i&&!s;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);n&&e.waitingOnAppends++,a&&e.waitingOnAppends++,n&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=Rl(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger("error"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||"number"!==typeof e.timingInfo.start||e.changedTimestampOffset||"main"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&"number"===typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&"number"===typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i="main"===this.loaderType_&&t&&t.hasVideo,r=i&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;r&&(e.timingInfo.end="number"===typeof r.end?r.end:r.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});const t=zl(e,this.sourceType_);if(t&&("warn"===t.severity?bn.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest&&(this.trigger("syncinfoupdate"),!e.hasAppendedData_))return void this.logger_("Throwing away un-appended sync request "+Bl(e));this.logger_("Appended "+Bl(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");const i=e.segment,r=e.part,s=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,n=r&&r.end&&this.currentTime_()-r.end>3*e.playlist.partTargetDuration;if(s||n)return this.logger_(`bad ${s?"segment":"part"} ${Bl(e)}`),void this.resetEverything();const a=null!==this.mediaIndex;a&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Nl)return void this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record "+Nl);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,r=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(r-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,r=t.end;if(!Ml(i)||!Ml(r))return;El(i,r,this.segmentMetadataTrack_);const n=s.a.WebKitDataCue||s.a.VTTCue,a={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:i,end:r},o=JSON.stringify(a),l=new n(i,r,o);l.value=a,this.segmentMetadataTrack_.addCue(l)}}function Gl(){}const Wl=function(e){return"string"!==typeof e?e:e.replace(/./,e=>e.toUpperCase())},Xl=["video","audio"],Yl=(e,t)=>{const i=t[e+"Buffer"];return i&&i.updating||t.queuePending[e]},Kl=(e,t)=>{for(let i=0;i<t.length;i++){const r=t[i];if("mediaSource"===r.type)return null;if(r.type===e)return i}return null},Jl=(e,t)=>{if(0===t.queue.length)return;let i=0,r=t.queue[i];if("mediaSource"!==r.type){if("mediaSource"!==e&&t.ready()&&"closed"!==t.mediaSource.readyState&&!Yl(e,t)){if(r.type!==e){if(i=Kl(e,t.queue),null===i)return;r=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=r,r.action(e,t),r.doneFn?void 0:(t.queuePending[e]=null,void Jl(e,t))}}else t.updating()||"closed"===t.mediaSource.readyState||(t.queue.shift(),r.action(t),r.doneFn&&r.doneFn(),Jl("audio",t),Jl("video",t))},Ql=(e,t)=>{const i=t[e+"Buffer"],r=Wl(e);i&&(i.removeEventListener("updateend",t[`on${r}UpdateEnd_`]),i.removeEventListener("error",t[`on${r}Error_`]),t.codecs[e]=null,t[e+"Buffer"]=null)},Zl=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),ed={appendBuffer:(e,t,i)=>(r,s)=>{const n=s[r+"Buffer"];if(Zl(s.mediaSource,n)){s.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${r}Buffer`);try{n.appendBuffer(e)}catch(a){s.logger_(`Error with code ${a.code} `+(a.code===Pl?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${t.mediaIndex} to ${r}Buffer`),s.queuePending[r]=null,i(a)}}},remove:(e,t)=>(i,r)=>{const s=r[i+"Buffer"];if(Zl(r.mediaSource,s)){r.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{s.remove(e,t)}catch(n){r.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},timestampOffset:e=>(t,i)=>{const r=i[t+"Buffer"];Zl(i.mediaSource,r)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),r.timestampOffset=e)},callback:e=>(t,i)=>{e()},endOfStream:e=>t=>{if("open"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||""})`);try{t.mediaSource.endOfStream(e)}catch(i){bn.log.warn("Failed to call media source endOfStream",i)}}},duration:e=>t=>{t.logger_("Setting mediaSource duration to "+e);try{t.mediaSource.duration=e}catch(i){bn.log.warn("Failed to set media source duration",i)}},abort:()=>(e,t)=>{if("open"!==t.mediaSource.readyState)return;const i=t[e+"Buffer"];if(Zl(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(r){bn.log.warn(`Failed to abort on ${e}Buffer`,r)}}},addSourceBuffer:(e,t)=>i=>{const r=Wl(e),s=Object(b["e"])(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const n=i.mediaSource.addSourceBuffer(s);n.addEventListener("updateend",i[`on${r}UpdateEnd_`]),n.addEventListener("error",i[`on${r}Error_`]),i.codecs[e]=t,i[e+"Buffer"]=n},removeSourceBuffer:e=>t=>{const i=t[e+"Buffer"];if(Ql(e,t),Zl(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(r){bn.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,r)}}},changeType:e=>(t,i)=>{const r=i[t+"Buffer"],s=Object(b["e"])(e);Zl(i.mediaSource,r)&&i.codecs[t]!==e&&(i.logger_(`changing ${t}Buffer codec from ${i.codecs[t]} to ${e}`),r.changeType(s),i.codecs[t]=e)}},td=({type:e,sourceUpdater:t,action:i,doneFn:r,name:s})=>{t.queue.push({type:e,action:i,doneFn:r,name:s}),Jl(e,t)},id=(e,t)=>i=>{if(t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[e+"Error_"])}Jl(e,t)};class rd extends bn.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Jl("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=In("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=id("video",this),this.onAudioUpdateEnd_=id("audio",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}addSourceBuffer(e,t){td({type:"mediaSource",sourceUpdater:this,action:ed.addSourceBuffer(e,t),name:"addSourceBuffer"})}abort(e){td({type:e,sourceUpdater:this,action:ed.abort(e),name:"abort"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?td({type:"mediaSource",sourceUpdater:this,action:ed.removeSourceBuffer(e),name:"removeSourceBuffer"}):bn.log.error("removeSourceBuffer is not supported!")}canRemoveSourceBuffer(){return!bn.browser.IE_VERSION&&!bn.browser.IS_FIREFOX&&s.a.MediaSource&&s.a.MediaSource.prototype&&"function"===typeof s.a.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return s.a.SourceBuffer&&s.a.SourceBuffer.prototype&&"function"===typeof s.a.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?td({type:e,sourceUpdater:this,action:ed.changeType(t),name:"changeType"}):bn.log.error("changeType is not supported!")}addOrChangeSourceBuffers(e){if(!e||"object"!==typeof e||0===Object.keys(e).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach(t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)})}appendBuffer(e,t){const{segmentInfo:i,type:r,bytes:s}=e;if(this.processedAppend_=!0,"audio"===r&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${s.length} until video append`);const n=t;if(td({type:r,sourceUpdater:this,action:ed.appendBuffer(s,i||{mediaIndex:-1},n),doneFn:t,name:"appendBuffer"}),"video"===r){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach(e=>{this.appendBuffer.apply(this,e)})}}audioBuffered(){return Zl(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Pn()}videoBuffered(){return Zl(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Pn()}buffered(){const e=Zl(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Zl(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():Un(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Gl){td({type:"mediaSource",sourceUpdater:this,action:ed.duration(e),name:"duration",doneFn:t})}endOfStream(e=null,t=Gl){"string"!==typeof e&&(e=void 0),td({type:"mediaSource",sourceUpdater:this,action:ed.endOfStream(e),name:"endOfStream",doneFn:t})}removeAudio(e,t,i=Gl){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?td({type:"audio",sourceUpdater:this,action:ed.remove(e,t),doneFn:i,name:"remove"}):i()}removeVideo(e,t,i=Gl){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?td({type:"video",sourceUpdater:this,action:ed.remove(e,t),doneFn:i,name:"remove"}):i()}updating(){return!(!Yl("audio",this)&&!Yl("video",this))}audioTimestampOffset(e){return"undefined"!==typeof e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(td({type:"audio",sourceUpdater:this,action:ed.timestampOffset(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return"undefined"!==typeof e&&this.videoBuffer&&this.videoTimestampOffset!==e&&(td({type:"video",sourceUpdater:this,action:ed.timestampOffset(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&td({type:"audio",sourceUpdater:this,action:ed.callback(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&&td({type:"video",sourceUpdater:this,action:ed.callback(e),name:"callback"})}dispose(){this.trigger("dispose"),Xl.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[e+"QueueCallback"](()=>Ql(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const sd=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),nd=new Uint8Array("\n\n".split("").map(e=>e.charCodeAt(0)));class ad extends Vl{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.loaderType_="subtitle",this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.shouldSaveSegmentTimingInfo_=!1}createTransmuxer_(){return null}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Pn();const e=this.subtitlesTrack_.cues,t=e[0].startTime,i=e[e.length-1].startTime;return Pn([[t,i]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Ha(e);let r=this.initSegments_[i];if(t&&!r&&e.bytes){const t=nd.byteLength+e.bytes.byteLength,s=new Uint8Array(t);s.set(e.bytes),s.set(nd,e.bytes.byteLength),this.initSegments_[i]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:s}}return r||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(e){return"undefined"===typeof e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){El(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};return this.syncController_.one("timestampoffset",e),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){while(e&&e.segment.empty){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state="READY");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===Uo.TIMEOUT&&this.handleTimeout_(),e.code===Uo.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");const n=r.segment;if(n.map&&(n.map.bytes=t.map.bytes),r.bytes=t.bytes,"function"!==typeof s.a.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){let r;const s=()=>{this.subtitlesTrack_.tech_.off("vttjsloaded",r),this.stopForError({message:"Error loading vtt.js"})};return r=()=>{this.subtitlesTrack_.tech_.off("vttjserror",s),this.segmentRequestFinished_(e,t,i)},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",r),void this.subtitlesTrack_.tech_.one("vttjserror",s)}n.requested=!0;try{this.parseVTTCues_(r)}catch(a){return void this.stopForError({message:a.message})}if(this.updateTimeMapping_(r,this.syncController_.timelines[r.timeline],this.playlist_),r.cues.length?r.timingInfo={start:r.cues[0].startTime,end:r.cues[r.cues.length-1].endTime}:r.timingInfo={start:r.startOfSegment,end:r.startOfSegment+r.duration},r.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");r.byteLength=r.bytes.byteLength,this.mediaSecondsLoaded+=n.duration,r.cues.forEach(e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new s.a.VTTCue(e.startTime,e.endTime,e.text):e)}),Cl(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(){}updateTimingInfoEnd_(){}parseVTTCues_(e){let t,i=!1;"function"===typeof s.a.TextDecoder?t=new s.a.TextDecoder("utf8"):(t=s.a.WebVTT.StringDecoder(),i=!0);const r=new s.a.WebVTT.Parser(s.a,s.a.vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},r.oncue=e.cues.push.bind(e.cues),r.ontimestampmap=t=>{e.timestampmap=t},r.onparsingerror=e=>{bn.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=sd(t)),r.parse(t)}let n=e.bytes;i&&(n=sd(n)),r.parse(n),r.flush()}updateTimeMapping_(e,t,i){const r=e.segment;if(!t)return;if(!e.cues.length)return void(r.empty=!0);const s=e.timestampmap,n=s.MPEGTS/k["ONE_SECOND_IN_TS"]-s.LOCAL+t.mapping;if(e.cues.forEach(e=>{e.startTime+=n,e.endTime+=n}),!i.syncInfo){const t=e.cues[0].startTime,s=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,s-r.duration)}}}}const od=function(e,t){const i=e.cues;for(let r=0;r<i.length;r++){const e=i[r];if(t>=e.adStartTime&&t<=e.adEndTime)return e}return null},ld=function(e,t,i=0){if(!e.segments)return;let r,n=i;for(let a=0;a<e.segments.length;a++){const i=e.segments[a];if(r||(r=od(t,n+i.duration/2)),r){if("cueIn"in i){r.endTime=n,r.adEndTime=n,n+=i.duration,r=null;continue}if(n<r.endTime){n+=i.duration;continue}r.endTime+=i.duration}else if("cueOut"in i&&(r=new s.a.VTTCue(n,n+i.duration,i.cueOut),r.adStartTime=n,r.adEndTime=n+parseFloat(i.cueOut),t.addCue(r)),"cueOutCont"in i){const[e,a]=i.cueOutCont.split("/").map(parseFloat);r=new s.a.VTTCue(n,n+i.duration,""),r.adStartTime=n-e,r.adEndTime=r.adStartTime+a,t.addCue(r)}n+=i.duration}},dd=86400,ud=[{name:"VOD",run:(e,t,i,r,s)=>{if(i!==1/0){const e={time:0,segmentIndex:0,partIndex:null};return e}return null}},{name:"ProgramDateTime",run:(e,t,i,r,s)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let n=null,a=null;const o=Vn(t);s=s||0;for(let l=0;l<o.length;l++){const i=t.endList||0===s?l:o.length-(l+1),r=o[i],d=r.segment,u=e.timelineToDatetimeMappings[d.timeline];if(!u||!d.dateTimeObject)continue;const c=d.dateTimeObject.getTime()/1e3;let h=c+u;if(d.parts&&"number"===typeof r.partIndex)for(let e=0;e<r.partIndex;e++)h+=d.parts[e].duration;const p=Math.abs(s-h);if(null!==a&&(0===p||a<p))break;a=p,n={time:h,segmentIndex:r.segmentIndex,partIndex:r.partIndex}}return n}},{name:"Segment",run:(e,t,i,r,s)=>{let n=null,a=null;s=s||0;const o=Vn(t);for(let l=0;l<o.length;l++){const e=t.endList||0===s?l:o.length-(l+1),i=o[e],d=i.segment,u=i.part&&i.part.start||d&&d.start;if(d.timeline===r&&"undefined"!==typeof u){const e=Math.abs(s-u);if(null!==a&&a<e)break;(!n||null===a||a>=e)&&(a=e,n={time:u,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return n}},{name:"Discontinuity",run:(e,t,i,r,s)=>{let n=null;if(s=s||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let r=0;r<t.discontinuityStarts.length;r++){const a=t.discontinuityStarts[r],o=t.discontinuitySequence+r+1,l=e.discontinuities[o];if(l){const e=Math.abs(s-l.time);if(null!==i&&i<e)break;(!n||null===i||i>=e)&&(i=e,n={time:l.time,segmentIndex:a,partIndex:null})}}}return n}},{name:"Playlist",run:(e,t,i,r,s)=>{if(t.syncInfo){const e={time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null};return e}return null}}];class cd extends bn.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={},this.logger_=In("SyncController")}getSyncPoint(e,t,i,r){const s=this.runStrategies_(e,t,i,r);return s.length?this.selectSyncPoint_(s,{key:"time",value:r}):null}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const r=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});return r.segmentIndex>0&&(r.time*=-1),Math.abs(r.time+Zn({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:r.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,r){const s=[];for(let n=0;n<ud.length;n++){const a=ud[n],o=a.run(this,e,t,i,r);o&&(o.strategy=a.name,s.push({strategy:a.name,syncPoint:o}))}return s}selectSyncPoint_(e,t){let i=e[0].syncPoint,r=Math.abs(e[0].syncPoint[t.key]-t.value),s=e[0].strategy;for(let n=1;n<e.length;n++){const a=Math.abs(e[n].syncPoint[t.key]-t.value);a<r&&(r=a,i=e[n].syncPoint,s=e[n].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${s}]: [time:${i.time}, segmentIndex:`+i.segmentIndex+("number"===typeof i.partIndex?",partIndex:"+i.partIndex:"")+"]"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>dd)bn.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let r=i-1;r>=0;r--){const i=e.segments[r];if(i&&"undefined"!==typeof 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}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),r=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:r.start}));const s=r.dateTimeObject;r.discontinuity&&t&&s&&(this.timelineToDatetimeMappings[r.timeline]=-s.getTime()/1e3)}timestampOffsetForTimeline(e){return"undefined"===typeof this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return"undefined"===typeof this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const r=e.segment,s=e.part;let n,a,o=this.timelines[e.timeline];if("number"===typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),n=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;n=t.start+o.mapping,a=t.end+o.mapping}return s&&(s.start=n,s.end=a),(!r.start||n<r.start)&&(r.start=n),r.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let r=0;r<t.discontinuityStarts.length;r++){const s=t.discontinuityStarts[r],n=t.discontinuitySequence+r+1,a=s-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[n]||this.discontinuities[n].accuracy>o){let r;r=a<0?i.start-Zn({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:s}):i.end+Zn({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:s}),this.discontinuities[n]={time:r,accuracy:o}}}}dispose(){this.trigger("dispose"),this.off()}}class hd extends bn.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:t,to:i}){return"number"===typeof t&&"number"===typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){return"number"===typeof t&&"number"===typeof i&&(this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e],this.trigger("timelinechange")),this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const pd=_o(To((function(){var t=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,r=0;r<i;++r)t[r].call(this,arguments[1]);else for(var s=Array.prototype.slice.call(arguments,1),n=t.length,a=0;a<n;++a)t[a].apply(this,s)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();
29
29
  /*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function i(e){return e.subarray(0,e.byteLength-e[e.byteLength-1])}
30
- /*! @name aes-decrypter @version 4.0.1 @license Apache-2.0 */const r=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],r=t[4],s=i[4];let n,a,o;const l=[],d=[];let u,c,h,p,f,m;for(n=0;n<256;n++)d[(l[n]=n<<1^283*(n>>7))^n]=n;for(a=o=0;!r[a];a^=u||1,o=d[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,r[a]=p,s[p]=a,h=l[c=l[u=l[a]]],m=16843009*h^65537*c^257*u^16843008*a,f=257*l[p]^16843008*p,n=0;n<4;n++)t[n][a]=f=f<<24^f>>>8,i[n][p]=m=m<<24^m>>>8;for(n=0;n<5;n++)t[n]=t[n].slice(0),i[n]=i[n].slice(0);return e};let s=null;class n{constructor(e){let t,i,n;s||(s=r()),this._tables=[[s[0][0].slice(),s[0][1].slice(),s[0][2].slice(),s[0][3].slice(),s[0][4].slice()],[s[1][0].slice(),s[1][1].slice(),s[1][2].slice(),s[1][3].slice(),s[1][4].slice()]];const a=this._tables[0][4],o=this._tables[1],l=e.length;let d=1;if(4!==l&&6!==l&&8!==l)throw new Error("Invalid aes key size");const u=e.slice(0),c=[];for(this._key=[u,c],t=l;t<4*l+28;t++)n=u[t-1],(t%l===0||8===l&&t%l===4)&&(n=a[n>>>24]<<24^a[n>>16&255]<<16^a[n>>8&255]<<8^a[255&n],t%l===0&&(n=n<<8^n>>>24^d<<24,d=d<<1^283*(d>>7))),u[t]=u[t-l]^n;for(i=0;t;i++,t--)n=u[3&i?t:t-4],c[i]=t<=4||i<4?n:o[0][a[n>>>24]]^o[1][a[n>>16&255]]^o[2][a[n>>8&255]]^o[3][a[255&n]]}decrypt(e,t,i,r,s,n){const a=this._key[1];let o,l,d,u=e^a[0],c=r^a[1],h=i^a[2],p=t^a[3];const f=a.length/4-2;let m,g=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(m=0;m<f;m++)o=v[u>>>24]^b[c>>16&255]^_[h>>8&255]^T[255&p]^a[g],l=v[c>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&u]^a[g+1],d=v[h>>>24]^b[p>>16&255]^_[u>>8&255]^T[255&c]^a[g+2],p=v[p>>>24]^b[u>>16&255]^_[c>>8&255]^T[255&h]^a[g+3],g+=4,u=o,c=l,h=d;for(m=0;m<4;m++)s[(3&-m)+n]=S[u>>>24]<<24^S[c>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[g++],o=u,u=c,c=h,h=p,p=o}}class a extends t{constructor(){super(t),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const o=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},l=function(e,t,i){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),s=new n(Array.prototype.slice.call(t)),a=new Uint8Array(e.byteLength),l=new Int32Array(a.buffer);let d,u,c,h,p,f,m,g,y;for(d=i[0],u=i[1],c=i[2],h=i[3],y=0;y<r.length;y+=4)p=o(r[y]),f=o(r[y+1]),m=o(r[y+2]),g=o(r[y+3]),s.decrypt(p,f,m,g,l,y),l[y]=o(l[y]^d),l[y+1]=o(l[y+1]^u),l[y+2]=o(l[y+2]^c),l[y+3]=o(l[y+3]^h),d=p,u=f,c=m,h=g;return a};class d{constructor(e,t,r,s){const n=d.STEP,l=new Int32Array(e.buffer),u=new Uint8Array(e.byteLength);let c=0;for(this.asyncStream_=new a,this.asyncStream_.push(this.decryptChunk_(l.subarray(c,c+n),t,r,u)),c=n;c<l.length;c+=n)r=new Uint32Array([o(l[c-4]),o(l[c-3]),o(l[c-2]),o(l[c-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(c,c+n),t,r,u));this.asyncStream_.push((function(){s(null,i(u))}))}static get STEP(){return 32e3}decryptChunk_(e,t,i,r){return function(){const s=l(e,t,i);r.set(s,e.byteOffset)}}}var u,c="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{};u="undefined"!==typeof window?window:"undefined"!==typeof c?c:"undefined"!==typeof self?self:{};var h=u,p=function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},f=h.BigInt||Number;f("0x1"),f("0x100"),f("0x10000"),f("0x1000000"),f("0x100000000"),f("0x10000000000"),f("0x1000000000000"),f("0x100000000000000"),f("0x10000000000000000"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const m=function(e){const t={};return Object.keys(e).forEach(i=>{const r=e[i];p(r)?t[i]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:t[i]=r}),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),r=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),s=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new d(i,r,s,(function(e,i){self.postMessage(m({source:t.source,decrypted:i}),[i.buffer])}))}})));var fd=bo(pd);const md=e=>{let t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},gd=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},yd=(e,t)=>{t.activePlaylistLoader=e,e.load()},vd=(e,t)=>()=>{const{segmentLoaders:{[e]:i,main:r},mediaTypes:{[e]:s}}=t,n=s.activeTrack(),a=s.getActiveGroup(),o=s.activePlaylistLoader,l=s.lastGroup_;a&&l&&a.id===l.id||(s.lastGroup_=a,s.lastTrack_=n,gd(i,s),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),yd(a.playlistLoader,s)):o&&r.resetEverything()))},bd=(e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:r}}=t;r.lastGroup_=null,i.abort(),i.pause()},_d=(e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:r,main:s},mediaTypes:{[e]:n}}=t,a=n.activeTrack(),o=n.getActiveGroup(),l=n.activePlaylistLoader,d=n.lastTrack_;if((!d||!a||d.id!==a.id)&&(n.lastGroup_=o,n.lastTrack_=a,gd(r,n),o)){if(o.isMainPlaylist){if(!a||!d||a.id===d.id)return;const e=t.vhs.playlistController_,r=e.selectPlaylist();if(e.media()===r)return;return n.logger_(`track change. Switching main audio from ${d.id} to ${a.id}`),i.pause(),s.resetEverything(),void e.fastQualityChange_(r)}if("AUDIO"===e){if(!o.playlistLoader)return s.setAudio(!0),void s.resetEverything();r.setAudio(!0),s.setAudio(!1)}l!==o.playlistLoader?(r.track&&r.track(a),r.resetEverything(),yd(o.playlistLoader,n)):yd(o.playlistLoader,n)}},Td={AUDIO:(e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:r},excludePlaylist:s}=t;gd(i,r);const n=r.activeTrack(),a=r.activeGroup(),o=(a.filter(e=>e.default)[0]||a[0]).id,l=r.tracks[o];if(n!==l){bn.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const e in r.tracks)r.tracks[e].enabled=r.tracks[e]===l;r.onTrackChanged()}else s({error:{message:"Problem encountered loading the default audio track."}})},SUBTITLES:(e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:r}}=t;bn.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),gd(i,r);const s=r.activeTrack();s&&(s.mode="disabled"),r.onTrackChanged()}},Sd={AUDIO:(e,t,i)=>{if(!t)return;const{tech:r,requestOptions:s,segmentLoaders:{[e]:n}}=i;t.on("loadedmetadata",()=>{const e=t.media();n.playlist(e,s),(!r.paused()||e.endList&&"none"!==r.preload())&&n.load()}),t.on("loadedplaylist",()=>{n.playlist(t.media(),s),r.paused()||n.load()}),t.on("error",Td[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:r,requestOptions:s,segmentLoaders:{[e]:n},mediaTypes:{[e]:a}}=i;t.on("loadedmetadata",()=>{const e=t.media();n.playlist(e,s),n.track(a.activeTrack()),(!r.paused()||e.endList&&"none"!==r.preload())&&n.load()}),t.on("loadedplaylist",()=>{n.playlist(t.media(),s),r.paused()||n.load()}),t.on("error",Td[e](e,i))}},wd={AUDIO:(e,t)=>{const{vhs:i,sourceType:r,segmentLoaders:{[e]:s},requestOptions:n,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:d}},mainPlaylistLoader:u}=t,c=pa(u.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},c&&(a[e].main.default.playlists=u.main.playlists));for(const h in a[e]){o[h]||(o[h]=[]);for(const s in a[e][h]){let p,f=a[e][h][s];if(c?(d(`AUDIO group '${h}' label '${s}' is a main playlist`),f.isMainPlaylist=!0,p=null):p="vhs-json"===r&&f.playlists?new Da(f.playlists[0],i,n):f.resolvedUri?new Da(f.resolvedUri,i,n):f.playlists&&"dash"===r?new fo(f.playlists[0],i,n,u):null,f=An({id:s,playlistLoader:p},f),Sd[e](e,f.playlistLoader,t),o[h].push(f),"undefined"===typeof l[s]){const e=new bn.AudioTrack({id:s,kind:md(f),enabled:!1,language:f.language,default:f.default,label:s});l[s]=e}}}s.on("error",Td[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:r,sourceType:s,segmentLoaders:{[e]:n},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:d}},mainPlaylistLoader:u}=t;for(const c in o[e]){l[c]||(l[c]=[]);for(const n in o[e][c]){if(o[e][c][n].forced)continue;let h,p=o[e][c][n];if("hls"===s)h=new Da(p.resolvedUri,r,a);else if("dash"===s){const e=p.playlists.filter(e=>e.excludeUntil!==1/0);if(!e.length)return;h=new fo(p.playlists[0],r,a,u)}else"vhs-json"===s&&(h=new Da(p.playlists?p.playlists[0]:p.resolvedUri,r,a));if(p=An({id:n,playlistLoader:h},p),Sd[e](e,p.playlistLoader,t),l[c].push(p),"undefined"===typeof d[n]){const e=i.addRemoteTextTrack({id:n,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:n},!1).track;d[n]=e}}}n.on("error",Td[e](e,t))},"CLOSED-CAPTIONS":(e,t)=>{const{tech:i,main:{mediaGroups:r},mediaTypes:{[e]:{groups:s,tracks:n}}}=t;for(const a in r[e]){s[a]||(s[a]=[]);for(const t in r[e][a]){const o=r[e][a][t];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let d={label:t,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[d.instreamId]&&(d=An(d,l[d.instreamId])),void 0===d.default&&delete d.default,s[a].push(An({id:t},o)),"undefined"===typeof n[t]){const e=i.addRemoteTextTrack({id:d.instreamId,kind:"captions",default:d.default,language:d.language,label:d.label},!1).track;n[t]=e}}}}},Ed=(e,t)=>{for(let i=0;i<e.length;i++){if(ca(t,e[i]))return!0;if(e[i].playlists&&Ed(e[i].playlists,t))return!0}return!1},Cd=(e,t)=>i=>{const{mainPlaylistLoader:r,mediaTypes:{[e]:{groups:s}}}=t,n=r.media();if(!n)return null;let a=null;n.attributes[e]&&(a=s[n.attributes[e]]);const o=Object.keys(s);if(!a)if("AUDIO"===e&&o.length>1&&pa(t.main))for(let e=0;e<o.length;e++){const t=s[o[e]];if(Ed(t,n)){a=t;break}}else s.main?a=s.main:1===o.length&&(a=s[o[0]]);return"undefined"===typeof i?a:null!==i&&a&&a.filter(e=>e.id===i.id)[0]||null},xd={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if("showing"===i[e].mode||"hidden"===i[e].mode)return i[e];return null}},kd=(e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null},Id=e=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(t=>{wd[t](t,e)});const{mediaTypes:t,mainPlaylistLoader:i,tech:r,vhs:s,segmentLoaders:{["AUDIO"]:n,main:a}}=e;["AUDIO","SUBTITLES"].forEach(i=>{t[i].activeGroup=Cd(i,e),t[i].activeTrack=xd[i](i,e),t[i].onGroupChanged=vd(i,e),t[i].onGroupChanging=bd(i,e),t[i].onTrackChanged=_d(i,e),t[i].getActiveGroup=kd(i,e)});const o=t.AUDIO.activeGroup();if(o){const e=(o.filter(e=>e.default)[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();const i=t.AUDIO.getActiveGroup();i.playlistLoader?(a.setAudio(!1),n.setAudio(!0)):a.setAudio(!0)}i.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(e=>t[e].onGroupChanged())}),i.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(e=>t[e].onGroupChanging())});const l=()=>{t.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"vhs-audio-change"})};r.audioTracks().addEventListener("change",l),r.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),s.on("dispose",()=>{r.audioTracks().removeEventListener("change",l),r.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)}),r.clearTracks("audio");for(const d in t.AUDIO.tracks)r.audioTracks().addTrack(t.AUDIO.tracks[d])},Ad=()=>{const e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Gl,activeTrack:Gl,getActiveGroup:Gl,onGroupChanged:Gl,onTrackChanged:Gl,lastTrack_:null,logger_:In(`MediaGroups[${t}]`)}}),e},Od=120;let Pd;const Ld=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],Dd=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},Md=function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:r,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:a,bufferBasedABR:o,log:l}){if(!r)return bn.log.warn("We received no playlist to switch to. Please check your stream."),!1;const d=`allowing switch ${e&&e.id||"null"} -> ${r.id}`;if(!e)return l(d+" as current playlist is not set"),!0;if(r.id===e.id)return!1;const u=Boolean(Mn(t,i).length);if(!e.endList)return u||"number"!==typeof e.partTargetDuration?(l(d+" as current playlist is live"),!0):(l(`not ${d} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const c=Hn(t,i),h=o?mo.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:mo.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${d} as duration < max low water line (${a} < ${h})`),!0;const p=r.attributes.BANDWIDTH,f=e.attributes.BANDWIDTH;if(p<f&&(!o||c<n)){let e=`${d} as next bandwidth < current bandwidth (${p} < ${f})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${c} < ${n})`),l(e),!0}if((!o||p>f)&&c>=s){let e=`${d} as forwardBuffer >= bufferLowWaterLine (${c} >= ${s})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${f})`),l(e),!0}return l(`not ${d} as no switching criteria met`),!1};class Nd extends bn.EventTarget{constructor(e){super();const{src:t,withCredentials:i,tech:r,bandwidth:n,externVhs:a,useCueTags:o,playlistExclusionDuration:l,enableLowInitialPlaylist:d,sourceType:u,cacheEncryptionKeys:c,bufferBasedABR:h,leastPixelDiffSelector:p,captionServices:f}=e;if(!t)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:m}=e;null!==m&&"undefined"!==typeof m||(m=1/0),Pd=a,this.bufferBasedABR=Boolean(h),this.leastPixelDiffSelector=Boolean(p),this.withCredentials=i,this.tech_=r,this.vhs_=r.vhs,this.sourceType_=u,this.useCueTags_=o,this.playlistExclusionDuration=l,this.maxPlaylistRetries=m,this.enableLowInitialPlaylist=d,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:i,maxPlaylistRetries:m,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=Ad(),this.mediaSource=new s.a.MediaSource,this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.seekable_=On(),this.hasPlayed_=!1,this.syncController_=new cd(e),this.segmentMetadataTrack_=r.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.decrypter_=new fd,this.sourceUpdater_=new rd(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new hd;const g={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:f,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:n,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:c,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings};this.mainPlaylistLoader_="dash"===this.sourceType_?new fo(t,this.vhs_,this.requestOptions_):new Da(t,this.vhs_,this.requestOptions_),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Vl(An(g,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new Vl(An(g,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new ad(An(g,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks}),e),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),Ld.forEach(e=>{this[e+"_"]=Dd.bind(this,e)}),this.logger_=In("pc"),this.triggeredFmp4Usage=!1,"none"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y="none"===this.tech_.preload()?"play":"loadstart";this.tech_.one(y,()=>{const e=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const r=this.media(),s=r&&(r.id||r.uri),n=e.id||e.uri;s&&s!==n&&(this.logger_(`switch media ${s} -> ${n} from ${t}`),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+t})),this.mainPlaylistLoader_.media(e,i)}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=s.a.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(s.a.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,r=Object.keys(i);let s;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)s=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||r.length&&i[r[0]];for(const t in e)if(e[t].default){s={label:t};break}}if(!s)return t;const n=[];for(const a in i)if(i[a][s.label]){const t=i[a][s.label];if(t.playlists&&t.playlists.length)n.push.apply(n,t.playlists);else if(t.uri)n.push(t);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const t=e.playlists[i];t.attributes&&t.attributes.AUDIO&&t.attributes.AUDIO===a&&n.push(t)}}return n.length?n:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;ua(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&"none"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Id({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,"initial");const i="vhs-json"===this.sourceType_&&this.initialMedia_.segments;if(!i)return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)}),this.mainPlaylistLoader_.on("error",()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;ua(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const e=this.mainPlaylistLoader_.media();if("playlist-unchanged"===e.lastExcludeReason_)return;const t=this.stuckAtPlaylistEnd_(e);t&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let r=!0;const s=Object.keys(i.AUDIO);for(const n in i.AUDIO)for(const e in i.AUDIO[n]){const t=i.AUDIO[n][e];t.uri||(r=!1)}r&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),Pd.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),s.length&&Object.keys(i.AUDIO[s[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),r=this.bufferLowWaterLine(),s=this.bufferHighWaterLine(),n=this.tech_.buffered();return Md({buffered:n,currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:r,bufferHighWaterLine:s,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",e=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:Od}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}fastQualityChange_(e=this.selectPlaylist()){e!==this.mainPlaylistLoader_.media()?(this.switchMedia_(e,"fast-quality"),this.mainSegmentLoader_.resetEverything(()=>{bn.browser.IE_VERSION||bn.browser.IS_EDGE?this.tech_.setCurrentTime(this.tech_.currentTime()+.04):this.tech_.setCurrentTime(this.tech_.currentTime())})):this.logger_("skipping fastQualityChange because new media is same as old")}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList){const e=this.seekable();if(!e.length)return!1;if(bn.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",()=>{this.trigger("firstplay"),this.tech_.setCurrentTime(e.end(0)),this.hasPlayed_=!0}),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(e.end(0))}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();"undefined"!==typeof e&&"function"===typeof e.then&&e.then(null,e=>{})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){const t=this.seekable();if(!t.length)return!1;const i=this.syncController_.getExpiredTime(e,this.duration());if(null===i)return!1;const r=Pd.Playlist.playlistEnd(e,i),s=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return r-s<=Ln;const a=n.end(n.length-1);return a-s<=Ln&&r-a<=Ln}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));e.playlistErrors_++;const r=this.mainPlaylistLoader_.main.playlists,s=r.filter(na),n=1===s.length&&s[0]===e;if(1===r.length&&i!==1/0)return bn.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(n);if(n){let t=!1;r.forEach(i=>{if(i===e)return;const r=i.excludeUntil;"undefined"!==typeof r&&r!==1/0&&(t=!0,delete i.excludeUntil)}),t&&(bn.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const o=this.selectPlaylist();if(!o)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");const l=t.internal?this.logger_:bn.log.warn,d=t.message?" "+t.message:"";l(`${t.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${d} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const u=o.targetDuration/2*1e3||5e3,c="number"===typeof o.lastRequest&&Date.now()-o.lastRequest<=u;return this.switchMedia_(o,"exclude",n||c)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],r="all"===e;(r||"main"===e)&&i.push(this.mainPlaylistLoader_);const s=[];(r||"audio"===e)&&s.push("AUDIO"),(r||"subtitle"===e)&&(s.push("CLOSED-CAPTIONS"),s.push("SUBTITLES")),s.forEach(e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)}),["main","audio","subtitle"].forEach(t=>{const r=this[t+"SegmentLoader_"];!r||e!==t&&"all"!==e||i.push(r)}),i.forEach(e=>t.forEach(t=>{"function"===typeof e[t]&&e[t]()}))}setCurrentTime(e){const t=Mn(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.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}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Pd.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}onSyncInfoUpdate_(){let e;if(!this.mainPlaylistLoader_)return;let t=this.mainPlaylistLoader_.media();if(!t)return;let i=this.syncController_.getExpiredTime(t,this.duration());if(null===i)return;const r=this.mainPlaylistLoader_.main,s=Pd.Playlist.seekable(t,i,Pd.Playlist.liveEdgeDelay(r,t));if(0===s.length)return;if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),i=this.syncController_.getExpiredTime(t,this.duration()),null===i)return;if(e=Pd.Playlist.seekable(t,i,Pd.Playlist.liveEdgeDelay(r,t)),0===e.length)return}let n,a;this.seekable_&&this.seekable_.length&&(n=this.seekable_.end(0),a=this.seekable_.start(0)),e?e.start(0)>s.end(0)||s.start(0)>e.end(0)?this.seekable_=s:this.seekable_=On([[e.start(0)>s.start(0)?e.start(0):s.start(0),e.end(0)<s.end(0)?e.end(0):s.end(0)]]):this.seekable_=s,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===n&&this.seekable_.start(0)===a||(this.logger_(`seekable updated [${Bn(this.seekable_)}]`),this.tech_.trigger("seekablechanged"))}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Pd.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(e=>{const t=this.mediaTypes_[e].groups;for(const i in t)t[i].forEach(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()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}};e.video=e.main;const t=al(this.main(),this.media()),i={},r=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(i.video=t.video||e.main.videoCodec||b["b"]),e.main.isMuxed&&(i.video+=","+(t.audio||e.main.audioCodec||b["a"])),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||r)&&(i.audio=t.audio||e.main.audioCodec||e.audio.audioCodec||b["a"],e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!i.audio&&!i.video)return void this.excludePlaylist({playlistToExclude:this.media(),error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});const s=(e,t)=>e?Object(b["c"])(t):Object(b["g"])(t),n={};let a;if(["video","audio"].forEach((function(t){if(i.hasOwnProperty(t)&&!s(e[t].isFmp4,i[t])){const r=e[t].isFmp4?"browser":"muxer";n[r]=n[r]||[],n[r].push(i[t]),"audio"===t&&(a=r)}})),r&&a&&this.media().attributes.AUDIO){const e=this.media().attributes.AUDIO;this.main().playlists.forEach(t=>{const i=t.attributes&&t.attributes.AUDIO;i===e&&t!==this.media()&&(t.excludeUntil=1/0)}),this.logger_(`excluding audio group ${e} as ${a} does not support codec(s): "${i.audio}"`)}if(!Object.keys(n).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if(["video","audio"].forEach(t=>{const r=(Object(b["h"])(this.sourceUpdater_.codecs[t]||"")[0]||{}).type,s=(Object(b["h"])(i[t]||"")[0]||{}).type;r&&s&&r.toLowerCase()!==s.toLowerCase()&&e.push(`"${this.sourceUpdater_.codecs[t]}" -> "${i[t]}"`)}),e.length)return void this.excludePlaylist({playlistToExclude:this.media(),error:{message:`Codec switching not supported: ${e.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0})}return i}{const e=Object.keys(n).reduce((e,t)=>(e&&(e+=", "),e+=`${t} does not support codec(s): "${n[t].join(",")}"`,e),"")+".";this.excludePlaylist({playlistToExclude:this.media(),error:{internal:!0,message:e},playlistExclusionDuration:1/0})}}tryToCreateSourceBuffers_(){if("open"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach(i=>{const r=e[i];if(-1!==t.indexOf(r.id))return;t.push(r.id);const s=al(this.main,r),n=[];!s.audio||Object(b["g"])(s.audio)||Object(b["c"])(s.audio)||n.push("audio codec "+s.audio),!s.video||Object(b["g"])(s.video)||Object(b["c"])(s.video)||n.push("video codec "+s.video),s.text&&"stpp.ttml.im1t"===s.text&&n.push("text codec "+s.text),n.length&&(r.excludeUntil=1/0,this.logger_(`excluding ${r.id} for unsupported: ${n.join(", ")}`))})}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,r=sl(Object(b["h"])(e)),s=nl(r),n=r.video&&Object(b["h"])(r.video)[0]||null,a=r.audio&&Object(b["h"])(r.audio)[0]||null;Object.keys(i).forEach(e=>{const r=i[e];if(-1!==t.indexOf(r.id)||r.excludeUntil===1/0)return;t.push(r.id);const o=[],l=al(this.mainPlaylistLoader_.main,r),d=nl(l);if(l.audio||l.video){if(d!==s&&o.push(`codec count "${d}" !== "${s}"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&Object(b["h"])(l.video)[0]||null,t=l.audio&&Object(b["h"])(l.audio)[0]||null;e&&n&&e.type.toLowerCase()!==n.type.toLowerCase()&&o.push(`video codec "${e.type}" !== "${n.type}"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec "${t.type}" !== "${a.type}"`)}o.length&&(r.excludeUntil=1/0,this.logger_(`excluding ${r.id}: ${o.join(" && ")}`))}})}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),ld(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=mo.GOAL_BUFFER_LENGTH,i=mo.GOAL_BUFFER_LENGTH_RATE,r=Math.max(t,mo.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,r)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=mo.BUFFER_LOW_WATER_LINE,i=mo.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(t,mo.MAX_BUFFER_LOW_WATER_LINE),s=Math.max(t,mo.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?s:r)}bufferHighWaterLine(){return mo.BUFFER_HIGH_WATER_LINE}}const Rd=(e,t,i)=>r=>{const s=e.main.playlists[t],n=sa(s),a=na(s);return"undefined"===typeof r?a:(r?delete s.disabled:s.disabled=!0,r===a||n||(i(),r?e.trigger("renditionenabled"):e.trigger("renditiondisabled")),r)};class Ud{constructor(e,t,i){const{playlistController_:r}=e,s=r.fastQualityChange_.bind(r);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]}this.codecs=al(r.main(),t),this.playlist=t,this.id=i,this.enabled=Rd(e.playlists,t.id,s)}}const Bd=function(e){e.representations=()=>{const t=e.playlistController_.main(),i=pa(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter(e=>!sa(e)).map((t,i)=>new Ud(e,t,t.id)):[]}},jd=["seeking","seeked","pause","playing","error"];class Fd{constructor(e){this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=In("PlaybackWatcher"),this.logger_("initialize");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),r=()=>this.techWaiting_(),n=()=>this.resetTimeUpdate_(),a=this.playlistController_,o=["main","subtitle","audio"],l={};o.forEach(e=>{l[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},a[e+"SegmentLoader_"].on("appendsdone",l[e].updateend),a[e+"SegmentLoader_"].on("playlistupdate",l[e].reset),this.tech_.on(["seeked","seeking"],l[e].reset)});const d=e=>{["main","audio"].forEach(t=>{a[t+"SegmentLoader_"][e]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),d("off"))},this.clearSeekingAppendCheck_=()=>d("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),d("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",r),this.tech_.on(jd,n),this.tech_.on("canplay",i),this.tech_.one("play",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",r),this.tech_.off(jd,n),this.tech_.off("canplay",i),this.tech_.off("play",t),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),o.forEach(e=>{a[e+"SegmentLoader_"].off("appendsdone",l[e].updateend),a[e+"SegmentLoader_"].off("playlistupdate",l[e].reset),this.tech_.off(["seeked","seeking"],l[e].reset)}),this.checkCurrentTimeTimeout_&&s.a.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&s.a.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=s.a.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[e+"SegmentLoader_"];this[e+"StalledDownloads_"]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[e+"StalledDownloads_"]=0,this[e+"Buffered_"]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[e+"SegmentLoader_"],r=i.buffered_(),s=qn(this[e+"Buffered_"],r);this[e+"Buffered_"]=r,s?this.resetSegmentDownloads_(e):(this[e+"StalledDownloads_"]++,this.logger_(`found #${this[e+"StalledDownloads_"]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Fn(r)}),this[e+"StalledDownloads_"]<10||(this.logger_(e+" loader stalled download exclusion"),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:`vhs-${e}-download-exclusion`}),"subtitle"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0})))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+Ln>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){const e=this.tech_.seeking();if(!e)return!1;const t=this.seekable(),i=this.tech_.currentTime(),r=this.afterSeekableWindow_(t,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let s;if(r){const e=t.end(t.length-1);s=e}if(this.beforeSeekableWindow_(t,i)){const e=t.start(0);s=e+(e===t.end(0)?0:Ln)}if("undefined"!==typeof s)return this.logger_(`Trying to seek outside of seekable at time ${i} with seekable range ${Bn(t)}. Seeking to `+s+"."),this.tech_.setCurrentTime(s),!0;const n=this.playlistController_.sourceUpdater_,a=this.tech_.buffered(),o=n.audioBuffer?n.audioBuffered():null,l=n.videoBuffer?n.videoBuffered():null,d=this.media(),u=d.partTargetDuration?d.partTargetDuration:2*(d.targetDuration-Pn),c=[o,l];for(let p=0;p<c.length;p++){if(!c[p])continue;const e=Hn(c[p],i);if(e<u)return!1}const h=Nn(a,i);return 0!==h.length&&(s=h.start(0)+Ln,this.logger_(`Buffered region starts (${h.start(0)}) just beyond seek point (${i}). Seeking to ${s}.`),this.tech_.setCurrentTime(s),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Mn(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) `+i),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,r=this.tech_.buffered(),s=this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t});if(s)return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const n=Nn(r,t);return n.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${n.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,r=!1){if(!e.length)return!1;let s=e.end(e.length-1)+Ln;const n=!i.endList;return n&&r&&(s=e.end(e.length-1)+3*i.targetDuration),t>s}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let r;if(e.length&&t.length){const s=Mn(e,i-3),n=Mn(e,i),a=Mn(t,i);a.length&&!n.length&&s.length&&(r={start:s.end(0),end:a.end(0)})}else{const t=Nn(e,i);t.length||(r=this.gapFromVideoUnderflow_(e,i))}return!!r&&(this.logger_(`Encountered a gap in video from ${r.start} to ${r.end}. Seeking to current time `+i),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),r=Nn(t,i);this.resetTimeUpdate_(),0!==r.length&&i===e&&(this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",e,"nextRange start:",r.start(0)),this.tech_.setCurrentTime(r.start(0)+Pn),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}))}gapFromVideoUnderflow_(e,t){const i=Rn(e);for(let r=0;r<i.length;r++){const e=i.start(r),s=i.end(r);if(t-e<4&&t-e>2)return{start:e,end:s}}return null}}const qd={errorInterval:30,getSource(e){const t=this.tech({IWillNotUseThisInPlugins:!0}),i=t.currentSource_||this.currentSource();return e(i)}},$d=function(e,t){let i=0,r=0;const s=An(qd,t);e.ready(()=>{e.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const n=function(){r&&e.currentTime(r)},a=function(t){null!==t&&void 0!==t&&(r=e.duration()!==1/0&&e.currentTime()||0,e.one("loadedmetadata",n),e.src(t),e.trigger({type:"usage",name:"vhs-error-reload"}),e.play())},o=function(){if(Date.now()-i<1e3*s.errorInterval)e.trigger({type:"usage",name:"vhs-error-reload-canceled"});else{if(s.getSource&&"function"===typeof s.getSource)return i=Date.now(),s.getSource.call(e,a);bn.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}},l=function(){e.off("loadedmetadata",n),e.off("error",o),e.off("dispose",l)},d=function(t){l(),$d(e,t)};e.on("error",o),e.on("dispose",l),e.reloadSourceOnError=d},Hd=function(e){$d(this,e)};var zd="3.0.0",Vd="6.2.0",Gd="1.0.1",Wd="6.0.0",Xd="4.0.1";const Yd={PlaylistLoader:Da,Playlist:fa,utils:Xa,STANDARD_PLAYLIST_SELECTOR:fl,INITIAL_PLAYLIST_SELECTOR:yl,lastBandwidthSelector:fl,movingAverageBandwidthSelector:ml,comparePlaylistBandwidth:cl,comparePlaylistResolution:hl,xhr:Ra()};Object.keys(mo).forEach(e=>{Object.defineProperty(Yd,e,{get(){return bn.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),mo[e]},set(t){bn.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),"number"!==typeof t||t<0?bn.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):mo[e]=t}})});const Kd="videojs-vhs",Jd=function(e,t){const i=t.media();let r=-1;for(let s=0;s<e.length;s++)if(e[s].id===i.id){r=s;break}e.selectedIndex_=r,e.trigger({selectedIndex:r,type:"change"})},Qd=function(e,t){t.representations().forEach(t=>{e.addQualityLevel(t)}),Jd(e,t.playlists)};Yd.canPlaySource=function(){return bn.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const Zd=(e,t,i)=>{if(!e)return e;let r={};t&&t.attributes&&t.attributes.CODECS&&(r=sl(Object(b["h"])(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(r.audio=i.attributes.CODECS);const s=Object(b["e"])(r.video),n=Object(b["e"])(r.audio),a={};for(const o in e)a[o]={},n&&(a[o].audioContentType=n),s&&(a[o].videoContentType=s),t.contentProtection&&t.contentProtection[o]&&t.contentProtection[o].pssh&&(a[o].pssh=t.contentProtection[o].pssh),"string"===typeof e[o]&&(a[o].url=e[o]);return An(e,a)},eu=(e,t)=>e.reduce((e,i)=>{if(!i.contentProtection)return e;const r=t.reduce((e,t)=>{const r=i.contentProtection[t];return r&&r.pssh&&(e[t]={pssh:r.pssh}),e},{});return Object.keys(r).length&&e.push(r),e},[]),tu=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:r})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const s=i?r.concat([i]):r,n=eu(s,Object.keys(t)),a=[],o=[];return n.forEach(t=>{o.push(new Promise((t,i)=>{e.tech_.one("keysessioncreated",t)})),a.push(new Promise((i,r)=>{e.eme.initializeMediaKeys({keySystems:t},e=>{e?r(e):i()})}))}),Promise.race([Promise.all(a),Promise.race(o)])},iu=({player:e,sourceKeySystems:t,media:i,audioMedia:r})=>{const s=Zd(t,i,r);return!!s&&(e.currentSource().keySystems=s,!(s&&!e.eme)||(bn.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))},ru=()=>{if(!s.a.localStorage)return null;const e=s.a.localStorage.getItem(Kd);if(!e)return null;try{return JSON.parse(e)}catch(t){return null}},su=e=>{if(!s.a.localStorage)return!1;let t=ru();t=t?An(t,e):e;try{s.a.localStorage.setItem(Kd,JSON.stringify(t))}catch(i){return!1}return t},nu=e=>0===e.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(e.substring(e.indexOf(",")+1)):e;Yd.supportsNativeHls=function(){if(!a.a||!a.a.createElement)return!1;const e=a.a.createElement("video");if(!bn.getTech("Html5").isSupported())return!1;const t=["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"];return t.some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),Yd.supportsNativeDash=function(){return!!(a.a&&a.a.createElement&&bn.getTech("Html5").isSupported())&&/maybe|probably/i.test(a.a.createElement("video").canPlayType("application/dash+xml"))}(),Yd.supportsTypeNatively=e=>"hls"===e?Yd.supportsNativeHls:"dash"===e&&Yd.supportsNativeDash,Yd.isSupported=function(){return bn.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const au=bn.getComponent("Component");class ou extends au{constructor(e,t,i){if(super(t,i.vhs),"number"===typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=In("VhsHandler"),t.options_&&t.options_.playerId){const e=bn.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(a.a,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],e=>{const t=a.a.fullscreenElement||a.a.webkitFullscreenElement||a.a.mozFullScreenElement||a.a.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,"error",(function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()})),this.on(this.tech_,"play",this.play)}setOptions_(){if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.useBandwidthFromLocalStorage="undefined"!==typeof this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,"number"!==typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=300),"number"!==typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=ru();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}"number"!==typeof this.options_.bandwidth&&(this.options_.bandwidth=mo.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===mo.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(e=>{"undefined"!==typeof this.source_[e]&&(this.options_[e]=this.source_[e])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio}src(e,t){if(!e)return;this.setOptions_(),this.options_.src=nu(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=Yd,this.options_.sourceType=Object(_["a"])(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.playlistController_=new Nd(this.options_);const i=An({liveRangeSafeTimeDelta:Ln},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new Fd(i),this.playlistController_.on("error",()=>{const e=bn.players[this.tech_.options_.playerId];let t=this.playlistController_.error;"object"!==typeof t||t.code?"string"===typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)});const r=this.options_.bufferBasedABR?Yd.movingAverageBandwidthSelector(.55):Yd.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):r.bind(this),this.playlistController_.selectInitialPlaylist=Yd.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=s.a.navigator.connection||s.a.navigator.mozConnection||s.a.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const r=1e3*t.downlink*1e3;e=r>=i&&e>=i?Math.max(e,r):r}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;const i=Math.floor(1/(e+t));return i},set(){bn.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Fn(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Fn(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&su({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{Bd(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.playlistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=s.a.URL.createObjectURL(this.playlistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),tu({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(e=>{this.logger_("error while creating EME key session",e),this.player_.error({message:"Failed to initialize media keys for EME",code:3})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=iu({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on("keystatuschange",e=>{if("output-restricted"!==e.status)return;const t=this.playlistController_.main();if(!t||!t.playlists)return;const i=[];t.playlists.forEach(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&&(bn.log.warn('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.',...i),this.playlistController_.fastQualityChange_())}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),11!==bn.browser.IE_VERSION&&t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=bn.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{Qd(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{Jd(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":zd,"mux.js":Vd,"mpd-parser":Gd,"m3u8-parser":Wd,"aes-decrypter":Xd}}version(){return this.constructor.version()}canChangeType(){return rd.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&s.a.URL.revokeObjectURL&&(s.a.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return io({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,r=2){return ro({programTime:e,playlist:this.playlistController_.media(),retryCount:r,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}}const lu={name:"videojs-http-streaming",VERSION:zd,canHandleSource(e,t={}){const i=An(bn.options,t);return lu.canPlayType(e.type,i)},handleSource(e,t,i={}){const r=An(bn.options,i);return t.vhs=new ou(e,t,r),t.vhs.xhr=Ra(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t={}){const{vhs:{overrideNative:i=!bn.browser.IS_ANY_SAFARI}={}}=An(bn.options,t),r=Object(_["a"])(e),s=r&&(!Yd.supportsTypeNatively(r)||i);return s?"maybe":""}},du=()=>Object(b["c"])("avc1.4d400d,mp4a.40.2");du()&&bn.getTech("Html5").registerSourceHandler(lu,0),bn.VhsHandler=ou,bn.VhsSourceHandler=lu,bn.Vhs=Yd,bn.use||bn.registerComponent("Vhs",Yd),bn.options.vhs=bn.options.vhs||{},bn.getPlugin&&bn.getPlugin("reloadSourceOnError")||bn.registerPlugin("reloadSourceOnError",Hd)}).call(this,i("24aa"))},f6b4:function(e,t,i){"use strict";var r=i("c532");function s(){this.handlers=[]}s.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},s.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},s.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=s},f772:function(e,t,i){"use strict";var r=i("5692"),s=i("90e3"),n=r("keys");e.exports=function(e){return n[e]||(n[e]=s(e))}},f8a8:function(e,t,i){"use strict";i.d(t,"a",(function(){return A})),i.d(t,"b",(function(){return O}));var r,s=i("de66"),n=(new Uint8Array([79,112,117,115,72,101,97,100]),function(e){return"string"===typeof e?Object(s["h"])(e):e}),a=function(e){return Array.isArray(e)?e.map((function(e){return n(e)})):[n(e)]},o=function(e){e=Object(s["k"])(e);var t=[],i=0;while(e.length>i){var n=e[i],a=0,o=0;o++;var l=e[o];o++;while(128&l)a=(127&l)<<7,l=e[o],o++;a+=127&l;for(var d=0;d<r.length;d++){var u=r[d],c=u.id,h=u.parser;if(n===c){t.push(h(e.subarray(o,o+a)));break}}i+=a+o}return t};r=[{id:3,parser:function(e){var t={tag:3,id:e[0]<<8|e[1],flags:e[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(128&t.flags&&(t.dependsOnEsId=e[t.size]<<8|e[t.size+1],t.size+=2),64&t.flags){var i=e[t.size];t.url=Object(s["c"])(e.subarray(t.size+1,t.size+1+i)),t.size+=i}return 32&t.flags&&(t.ocrEsId=e[t.size]<<8|e[t.size+1],t.size+=2),t.descriptors=o(e.subarray(t.size))||[],t}},{id:4,parser:function(e){var t={tag:4,oti:e[0],streamType:e[1],bufferSize:e[2]<<16|e[3]<<8|e[4],maxBitrate:e[5]<<24|e[6]<<16|e[7]<<8|e[8],avgBitrate:e[9]<<24|e[10]<<16|e[11]<<8|e[12],descriptors:o(e.subarray(13))};return t}},{id:5,parser:function(e){return{tag:5,bytes:e}}},{id:6,parser:function(e){return{tag:6,bytes:e}}}];var l=function e(t,i,r){void 0===r&&(r=!1),i=a(i),t=Object(s["k"])(t);var n=[];if(!i.length)return n;var o=0;while(o<t.length){var l=(t[o]<<24|t[o+1]<<16|t[o+2]<<8|t[o+3])>>>0,d=t.subarray(o+4,o+8);if(0===l)break;var u=o+l;if(u>t.length){if(r)break;u=t.length}var c=t.subarray(o+8,u);Object(s["a"])(d,i[0])&&(1===i.length?n.push(c):n.push.apply(n,e(c,i.slice(1),r))),o=u}return n},d={EBML:Object(s["k"])([26,69,223,163]),DocType:Object(s["k"])([66,130]),Segment:Object(s["k"])([24,83,128,103]),SegmentInfo:Object(s["k"])([21,73,169,102]),Tracks:Object(s["k"])([22,84,174,107]),Track:Object(s["k"])([174]),TrackNumber:Object(s["k"])([215]),DefaultDuration:Object(s["k"])([35,227,131]),TrackEntry:Object(s["k"])([174]),TrackType:Object(s["k"])([131]),FlagDefault:Object(s["k"])([136]),CodecID:Object(s["k"])([134]),CodecPrivate:Object(s["k"])([99,162]),VideoTrack:Object(s["k"])([224]),AudioTrack:Object(s["k"])([225]),Cluster:Object(s["k"])([31,67,182,117]),Timestamp:Object(s["k"])([231]),TimestampScale:Object(s["k"])([42,215,177]),BlockGroup:Object(s["k"])([160]),BlockDuration:Object(s["k"])([155]),Block:Object(s["k"])([161]),SimpleBlock:Object(s["k"])([163])},u=[128,64,32,16,8,4,2,1],c=function(e){for(var t=1,i=0;i<u.length;i++){if(e&u[i])break;t++}return t},h=function(e,t,i,r){void 0===i&&(i=!0),void 0===r&&(r=!1);var n=c(e[t]),a=e.subarray(t,t+n);return i&&(a=Array.prototype.slice.call(e,t,t+n),a[0]^=u[n-1]),{length:n,value:Object(s["b"])(a,{signed:r}),bytes:a}},p=function e(t){return"string"===typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):"number"===typeof t?Object(s["f"])(t):t},f=function(e){return Array.isArray(e)?e.map((function(e){return p(e)})):[p(e)]},m=function e(t,i,r){if(r>=i.length)return i.length;var n=h(i,r,!1);if(Object(s["a"])(t.bytes,n.bytes))return r;var a=h(i,r+n.length);return e(t,i,r+a.length+a.value+n.length)},g=function e(t,i){i=f(i),t=Object(s["k"])(t);var r=[];if(!i.length)return r;var n=0;while(n<t.length){var a=h(t,n,!1),o=h(t,n+a.length),l=n+a.length+o.length;127===o.value&&(o.value=m(a,t,l),o.value!==t.length&&(o.value-=l));var d=l+o.value>t.length?t.length:l+o.value,u=t.subarray(l,d);Object(s["a"])(i[0],a.bytes)&&(1===i.length?r.push(u):r=r.concat(e(u,i.slice(1))));var c=a.length+o.length+u.length;n+=c}return r},y=i("321f"),v=Object(s["k"])([0,0,0,1]),b=Object(s["k"])([0,0,1]),_=Object(s["k"])([0,0,3]),T=function(e){var t=[],i=1;while(i<e.length-2)Object(s["a"])(e.subarray(i,i+3),_)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var r=e.length-t.length,n=new Uint8Array(r),a=0;for(i=0;i<r;a++,i++)a===t[0]&&(a++,t.shift()),n[i]=e[a];return n},S=function(e,t,i,r){void 0===r&&(r=1/0),e=Object(s["k"])(e),i=[].concat(i);var n,a=0,o=0;while(a<e.length&&(o<r||n)){var l=void 0;if(Object(s["a"])(e.subarray(a),v)?l=4:Object(s["a"])(e.subarray(a),b)&&(l=3),l){if(o++,n)return T(e.subarray(n,a));var d=void 0;"h264"===t?d=31&e[a+l]:"h265"===t&&(d=e[a+l]>>1&63),-1!==i.indexOf(d)&&(n=a+l),a+=l+("h264"===t?1:2)}else a++}return e.subarray(0,0)},w=function(e,t,i){return S(e,"h264",t,i)},E=function(e,t,i){return S(e,"h265",t,i)},C={webm:Object(s["k"])([119,101,98,109]),matroska:Object(s["k"])([109,97,116,114,111,115,107,97]),flac:Object(s["k"])([102,76,97,67]),ogg:Object(s["k"])([79,103,103,83]),ac3:Object(s["k"])([11,119]),riff:Object(s["k"])([82,73,70,70]),avi:Object(s["k"])([65,86,73]),wav:Object(s["k"])([87,65,86,69]),"3gp":Object(s["k"])([102,116,121,112,51,103]),mp4:Object(s["k"])([102,116,121,112]),fmp4:Object(s["k"])([115,116,121,112]),mov:Object(s["k"])([102,116,121,112,113,116]),moov:Object(s["k"])([109,111,111,118]),moof:Object(s["k"])([109,111,111,102])},x={aac:function(e){var t=Object(y["a"])(e);return Object(s["a"])(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Object(y["a"])(e);return Object(s["a"])(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=g(e,[d.EBML,d.DocType])[0];return Object(s["a"])(t,C.webm)},mkv:function(e){var t=g(e,[d.EBML,d.DocType])[0];return Object(s["a"])(t,C.matroska)},mp4:function(e){return!x["3gp"](e)&&!x.mov(e)&&(!(!Object(s["a"])(e,C.mp4,{offset:4})&&!Object(s["a"])(e,C.fmp4,{offset:4}))||(!(!Object(s["a"])(e,C.moof,{offset:4})&&!Object(s["a"])(e,C.moov,{offset:4}))||void 0))},mov:function(e){return Object(s["a"])(e,C.mov,{offset:4})},"3gp":function(e){return Object(s["a"])(e,C["3gp"],{offset:4})},ac3:function(e){var t=Object(y["a"])(e);return Object(s["a"])(e,C.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];var t=0;while(t+188<e.length&&t<188){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Object(y["a"])(e);return Object(s["a"])(e,C.flac,{offset:t})},ogg:function(e){return Object(s["a"])(e,C.ogg)},avi:function(e){return Object(s["a"])(e,C.riff)&&Object(s["a"])(e,C.avi,{offset:8})},wav:function(e){return Object(s["a"])(e,C.riff)&&Object(s["a"])(e,C.wav,{offset:8})},h264:function(e){return w(e,7,3).length},h265:function(e){return E(e,[32,33],3).length}},k=Object.keys(x).filter((function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e})).concat(["ts","h264","h265"]);k.forEach((function(e){var t=x[e];x[e]=function(e){return t(Object(s["k"])(e))}}));var I=x,A=function(e){e=Object(s["k"])(e);for(var t=0;t<k.length;t++){var i=k[t];if(I[i](e))return i}return""},O=function(e){return l(e,["moof"]).length>0}},f97d:function(e,t){var i={"":!0,up:!0};function r(e){if("string"!==typeof e)return!1;var t=i[e.toLowerCase()];return!!t&&e.toLowerCase()}function s(e){return"number"===typeof e&&e>=0&&e<=100}function n(){var e=100,t=3,i=0,n=100,a=0,o=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!s(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 n},set:function(e){if(!s(e))throw new Error("RegionAnchorX must be between 0 and 100.");n=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!s(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!s(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return a},set:function(e){if(!s(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var t=r(e);!1===t?console.warn("Scroll: an invalid or illegal string was specified."):l=t}}})}e.exports=n},fb15:function(e,t,i){"use strict";if(i.r(t),i.d(t,"cms",(function(){return Vt})),"undefined"!==typeof window){var r=window.document.currentScript,s=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);s&&(i.p=s[1])}var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{ref:"cms"},[i("div",{class:["lay-wrap",{mobile:"mobile"==e.mode}]},e._l(e.cmsList,(function(t){return i("div",{key:t.sort,staticClass:"lay-item"},[i("div",{staticClass:"layout-set",style:{width:t.attributeJson.layoutStyle&&2===t.attributeJson.layoutStyle.widthStyle.type?t.attributeJson.layoutStyle.widthStyle.width+"%":"100%",height:t.attributeJson.layoutStyle?Math.round(t.attributeJson.layoutStyle.height*e.ratio)+"px":"auto"}},[i(e.layOutObj[t.layoutType],e._g(e._b({ref:"layModule",refInFor:!0,tag:"component",attrs:{layOutData:t.attributeJson,sort:t.attributeJson.sort,ratio:e.ratio,mode:e.mode,recordId:t.originalId,envUrl:e.envUrl,path:e.path,isClient:e.isClient},scopedSlots:e._u([{key:"customComponent",fn:function(i){return 3==t.layoutType?[e._t("customComponent",null,{attributeJson:i.attributeJson})]:void 0}},{key:"dgCustomComponent",fn:function(t){return[e._t("dgCustomComponent",null,{data:t.attributeJson})]}}],null,!0)},"component",e.$attrs,!1),e.$listeners))],1)])})),0)])},a=[],o=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"single-layout",style:e.layoutStyle},[i("div",{staticStyle:{width:"100%",height:"100%"}},[e._l(e.layOutData.componentList.filter((function(e){return e.type<=100})),(function(t,r){return i("div",{key:r},[1==t.displayType?i(t.component,e._g(e._b({key:t.sort,ref:"singleComponent",refInFor:!0,tag:"component",style:{zIndex:r+1},attrs:{ratio:e.ratio,attributeJson:t.attributeJson,sortId:t.sort}},"component",e.$attrs,!1),e.$listeners)):e._e()],1)})),i("div",[e._t("dgCustomComponent",null,{attributeJson:e.getCustom()})],2)],2)])},l=[],d=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"text-wrap entrance-con",style:[e.conStyle,e.animationInStyle],attrs:{id:[e.recordId+"_"+e.sortId,"entrance-con"],name:[e.recordId+"_"+e.sortId,"entrance-con"],"data-sensors-click":"","data-sensorsClick":"true"},on:{click:e.pageClick}},[i("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData,envUrl:e.envUrl},expression:"{data:tipReportData, envUrl}"}],class:["text-con","text-con-"+e.sortId,e.animationInObj.type?e.enterClass:""],domProps:{innerHTML:e._s(e.attributeJson.label)}})])},u=[],c=(i("be35"),i("a7a3"),i("77ed"),i("1e09"),i("fda2"),i("14d9"),i("bc3a")),h=i.n(c);const p={json:"application/json;",form:"application/x-www-form-urlencoded;",html:"text/html;",file:"multipart/form-data",excel:"msexcel",xml:"application/xml",javascript:"application/x-javascript;charset=utf-8"},f={lang:"Accept-Language",contentType:"Content-Type"};function m(e){if(200===e.status){let t=e.data;return"0"===t.errorCode?t.data:e.data}}h.a.interceptors.response.use(m,e=>Promise.reject(e));class g{static async call(e,{method:t="get",headers:i={},body:r=null,responseType:s=null}={}){let n=e,a={method:t,url:n,responseType:s||"json",headers:i};"get"===t?a.params=r:a.data=r;const o=await h()(a).catch(e=>{e.response?console.error(e.response.status,e.response.data):e.request?console.error(e.request):console.error("Error",e.message?e.message:"")});return o}static get(e,{mask:t=!0,external:i=!1,headers:r={}}={}){return g.call(e,{headers:r,external:i,mask:t})}static postBody(e,{body:t={},language:i="zh-CN",module:r="",method:s="post",mask:n=!0,postData:a=!0,external:o=!1,headers:l={},compat:d}){return g.call(e,{module:r,method:s,headers:Object.assign(l,{[f.contentType]:p.json,common:{languageCode:i}}),body:t,postData:a,external:o,mask:n,compat:d})}}class y{getProductInfo(e,t,i){return g.postBody(e+"service-zuul/manage/search/plp/standard",{body:t,language:i})}getSortProductInfo(e,t,i){return g.postBody(e+"service-zuul/manage/search/cms/sort",{body:t,language:i})}dataSaveDecorationPageComponentEvent(e,t){return g.postBody(e+"service-zuul/data/collect/acquisition",{body:t})}acquisitionBatch(e,t){return g.postBody(e+"/service-zuul/data/collect/acquisitionBatch",{body:t})}}const v=new y;class b{constructor(){this.intersectionObserver=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(_(e,this.intersectionObserver),this.intersectionObserver.unobserve(e.target))})}),this.interval=T()}observe(e,t){e.setAttribute("report-data",JSON.stringify(t.value?t.value.data:null)),this.intersectionObserver.observe(e)}disconnect(){this.intersectionObserver&&(this.intersectionObserver.disconnect(),sessionStorage.setItem("reportData","[]"),this.interval&&(clearInterval(this.interval),this.interval=null))}static getInstance(e){return this.instance||(this.instance=new b),e&&(this.instance.envUrl=e.value?e.value.envUrl:this.instance.envUrl),this.instance}}const _=function(e,t){const i=e.target,r=i.getAttribute("report-data");let s=JSON.parse(sessionStorage.getItem("reportData")||null)||[];"null"!=r&&"undefined"!=r?(s.push(r),sessionStorage.setItem("reportData",JSON.stringify(s))):t.unobserve(i)},T=function(){let e=setInterval(()=>{let e=JSON.parse(sessionStorage.getItem("reportData")||null)||[];e.length>0&&(sessionStorage.setItem("reportData","[]"),S(e))},1500);return e},S=function(e){let t=e.map(e=>w(e)),i=b.getInstance().envUrl;i&&v.acquisitionBatch(i,t)},w=function(e){let t=JSON.parse(e);const i={source:"",medium:"",commodity_id:t.popData&&t.popData.productCode||"",commodity_name:t.popData&&t.popData.selectDataShow||"",commodity_sku_id:"",component_name:t.uniqueName,component_id:t.uniqueId,component_type:t.componentType,hot_zone_id:t.popData&&t.popData.uniqueId||"",hot_zone_name:t.popData&&t.popData.uniqueName||"",material_id:t.materialId,material_name:t.materialName,url_path:t.path||"/",refer_info:t.refererPagePath,position:t.position,trigger_Method_Type:t.componentMethodType};let r="";return localStorage.getItem(t.brand+"Cookie")?r=localStorage.getItem(t.brand+"Cookie"):(r=`${parseInt((new Date).getTime())}${Math.floor(1e4*Math.random())}`,localStorage.setItem(t.brand+"Cookie",r)),{eventProperty:JSON.stringify({...i}),event:t.event,distinctId:r}};var E={bind(e,t){"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype&&b.getInstance(t).observe(e,t)},unbind(){b.getInstance().disconnect()}};function C(e,t,i){const r=new y,s={source:"",medium:"",commodity_id:e.popData.productCode||"",commodity_name:e.popData.selectDataShow||"",commodity_sku_id:"",component_name:e.uniqueName,component_id:e.uniqueId,component_type:e.componentType,hot_zone_id:e.popData.uniqueId||"",hot_zone_name:e.popData.uniqueName||"",material_id:e.materialId,material_name:e.materialName,url_path:e.path,refer_info:e.refererPagePath,position:e.position,trigger_Method_Type:e.componentMethodType};let n="";localStorage.getItem(e.brand+"Cookie")?n=localStorage.getItem(e.brand+"Cookie"):(n=`${parseInt((new Date).getTime())}${Math.floor(1e4*Math.random())}`,localStorage.setItem(e.brand+"Cookie",n));let a={eventProperty:JSON.stringify({...s}),event:e.event,distinctId:n};if("click"==i)return a;r.dataSaveDecorationPageComponentEvent(t,a)}function x(e,t){var i=null,r=Date.now();return function(){var s=Date.now(),n=t-(s-r),a=this,o=arguments;clearTimeout(i),n<=0?(e.apply(a,o),r=Date.now()):i=setTimeout(e,n)}}const k={inheritAttrs:!1,props:{attributeJson:{type:Object,default:function(){}},item:{type:Object,default:()=>{}},ratio:{type:Number,default:1},envUrl:{type:String,default:""},fontRatio:{type:Number,default:1},mode:{type:String,default:"pc"},language:{type:String,default:"zh-CN"},sortId:{type:Number,default:0},sort:{type:[String,Number],default:0},recordId:{type:[String,Number],default:0},refererPagePath:{type:String},brand:{type:String},path:{type:String},isClient:{type:Boolean,default:!0}},data(){return{scrollHandle:x(this.scrollThrottle,200),hoverStyle:{},hoverStyleShow:!1,hoverImage:"",fillStyle:{},hoverDirection:"",finishAnimation:!1,entranceShow:!0,enterClass:"",animationInStyle:{},entranceAnimate:{fade:"animate__animated animate__fadeIn",scale:"animate__animated animate__zoomIn"}}},computed:{animationInObj:function(){return this.attributeJson.animationInObj},animationHoverObj:function(){return this.attributeJson.animationHoverObj},baseStyle(){return this.attributeJson.baseStyle},styleType(){return this.attributeJson.styleType},conStyle(){let{attributeJson:e,ratio:t}=this;return{width:Math.round(e.baseStyle.w*t)+"px",height:Math.round(e.baseStyle.h*t)+"px",left:Math.round(e.baseStyle.l*t)+"px",top:Math.round(e.baseStyle.t*t)+"px"}}},watch:{animationHoverObj:{handler(e){this.disposeHoverAnimate(e)},immediate:!0,deep:!0},animationInObj:{handler(){let{type:e,direction:t,delay:i,duration:r}=this.attributeJson.animationInObj;e&&(this.enterClass="",this.enterClass=this.entranceAnimate[e],this.animationInStyle={animationDuration:r+"s",amimationDelay:i+"s",animationName:"slide"!=e?this.entranceAnimate[e]:t,animationPlayState:"paused"})},immediate:!0}},methods:{isInCurrentScreenArea(){const{top:e}=this.$el.getBoundingClientRect();return e<=window.innerHeight-100},scrollThrottle(){this.isInCurrentScreenArea()&&!this.finishAnimation&&(this.animationInStyle.animationName&&(this.$el.style.animationPlayState="running"),this.finishAnimation=!0,this.endObserver())},startObserver(){window.addEventListener("scroll",this.scrollHandle,!0)},endObserver(){window.removeEventListener("scroll",this.scrollHandle,!0)},disposeHoverAnimate(e){let t={};if(2===e.type){let i=e.borderStyle;if(1==i.type&&(t={border:i.borderColor?"2px solid "+i.borderColor:"none"}),2==i.type){let{borderTop:e,borderRight:r,borderBottom:s,borderLeft:n}=i;t={borderTop:e?"2px solid "+e:"none",borderRight:r?"2px solid "+r:"none",borderBottom:s?"2px solid "+s:"none",borderLeft:n?"2px solid "+n:"none"}}}if(3===e.type&&(t={transform:"scale(1.2)",transformOrigin:"center center"}),4===e.type&&(this.hoverDirection=e.bgStyle.direction),5===e.type){let{hoverImgList:t}=e;this.hoverImage=t[0]?t[0].resourcePath:""}this.hoverStyle=t},onDrag:function(e,t){let i=this.ratio;this.attributeJson.baseStyle.l=e/i,this.attributeJson.baseStyle.t=t/i,this.$set(this.attributeJson,"baseStyle",this.attributeJson.baseStyle)},onResize:function(e,t,i,r){let s=this.ratio,n=this.attributeJson.baseStyle;n={w:i/s,h:r/s,l:e/s,t:t/s,isLocked:n.isLocked},this.$set(this.attributeJson,"baseStyle",n)},getRefLineParams(e){this.$emit("getRefLineParams",e)}},directives:{hoverAnimate:{inserted:function(e,t,i){e.onmouseover=function(){i.context.hoverStyleShow=!0,t.value&&(i.context[t.value.key]=t.value.value)},e.onmouseleave=function(){i.context.hoverStyleShow=!1,t.value&&(i.context[t.value.key]=-1)}}},treport:E}};var I={name:"textItem",mixins:[k],components:{},props:{},data(){return{}},computed:{tipReportData(){return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:12,popData:{},refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:1,event:"bannerShow"}}},methods:{pageClick(){if(this.attributeJson.linkObj.jumpLinkType)try{let e=JSON.parse(JSON.stringify(this.tipReportData));e.event="bannerClick";let t=C(e,this.envUrl,"click"),i=new Blob([JSON.stringify(t)],{type:"application/json"});navigator.sendBeacon(this.envUrl+"service-zuul/data/collect/acquisition",i)}catch(e){console.log(e)}this.$emit("jumpLink",this.attributeJson.linkObj)}}},A=I,O=A;i("4e30");function P(e,t,i,r,s,n,a,o){var l,d="function"===typeof e?e.options:e;if(t&&(d.render=t,d.staticRenderFns=i,d._compiled=!0),r&&(d.functional=!0),n&&(d._scopeId="data-v-"+n),a?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),s&&s.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},d._ssrRegister=l):s&&(l=o?function(){s.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:s),l)if(d.functional){d._injectStyles=l;var u=d.render;d.render=function(e,t){return l.call(t),u(e,t)}}else{var c=d.beforeCreate;d.beforeCreate=c?[].concat(c,l):[l]}return{exports:e,options:d}}var L=P(O,d,u,!1,null,"1e5d96ce",null),D=L.exports,M=D,N=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{key:e.attributeJson.sort,staticClass:"image-list entrance-con",style:Object.assign({},{width:Math.ceil(e.attributeJson.baseStyle.w*e.ratio)+"px",height:Math.round(e.attributeJson.baseStyle.h*e.ratio)+"px",left:Math.round(e.attributeJson.baseStyle.l*e.ratio)+"px",top:Math.round(e.attributeJson.baseStyle.t*e.ratio)+"px"},e.animationInStyle)},[e.hasConfig?[i("div",{ref:"img"+e.attributeJson.sort,class:["image-warp","image-warp-"+e.sortId],style:{animationDuration:e.animationInObj.duration+"s"}},[e.isSwiper?i("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate"}],style:[e.picStyle,3===e.animationHoverObj.type&&e.hoverStyleShow?e.hoverStyle:""]},[i("div",{class:["swiper-container swiper-container-"+e.sortId]},[i("div",{staticClass:"swiper-wrapper",style:{height:(e.baseStyle.h-(e.hasScrollBar?30:0))*e.ratio+"px!important"}},e._l(e.attributeJson.list,(function(t,r){return i("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData(r),envUrl:e.envUrl},expression:"{data:tipReportData(index), envUrl}"}],key:t.id,staticClass:"swiper-slide",style:{width:e.baseStyle.w/4*e.ratio+"px"}},[i("div",{staticClass:"slide-con",style:{height:(e.baseStyle.h-(e.hasScrollBar?30:0))*e.ratio+"px"}},[i("img",{attrs:{src:t.picList[0].resourcePath,alt:t.picList[0].resourceName.split(".")[0]}}),0!=t.picList.length&&0!=t.popList.length?[i("hotspot",e._g(e._b({ref:"hotspot"+e.sortId+r,refInFor:!0,attrs:{componentType:2,item:t,ratio:e.ratio,path:e.path,envUrl:e.envUrl,sortId:e.sortId,recordId:e.recordId,laySort:e.sort,brand:e.brand,uniqueName:e.attributeJson.uniqueName,language:e.language}},"hotspot",e.$attrs,!1),e.$listeners))]:e._e()],2)])})),0),e.hasSwiperButton?i("div",{class:"swiper-button-prev swiper-button-prev-"+e.sortId},[e._t("swiper-button-prev",(function(){return[2==e.indicatorType||3==e.indicatorType?i("div",[i("span",{staticClass:"cms2iconfont iconleft"})]):e._e()]}))],2):e._e(),e.hasSwiperButton?i("div",{class:"swiper-button-next swiper-button-next-"+e.sortId},[e._t("swiper-button-next",(function(){return[2==e.indicatorType||3==e.indicatorType?i("div",[i("span",{staticClass:"cms2iconfont iconright"})]):e._e()]}))],2):e._e(),e.hasScrollBar?i("div",{class:"swiper-scrollbar swiper-scrollbar-"+e.sortId}):e._e()]),2===e.animationHoverObj.type?i("div",{staticClass:"hover-con",style:[e.hoverStyle,{opacity:e.hoverStyleShow?1:0}]}):e._e()]):i("div",{class:["image-warp",3==e.styleType&&"pc"!=e.mode?"image-type3":""],style:[e.picStyle,3===e.animationHoverObj.type&&e.hoverStyleShow?e.hoverStyle:""]},e._l(e.attributeJson.list,(function(t,r){return i("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate"},{name:"treport",rawName:"v-treport",value:{data:e.tipReportData(r),envUrl:e.envUrl},expression:"{data:tipReportData(index), envUrl}"}],key:r,staticClass:"image-item",style:[e.picItemStyle]},[i("img",{class:{contain:1!=e.styleType},attrs:{src:t.picList[0].resourcePath,alt:t.picList[0].resourceName.split(".")[0]}}),2===e.animationHoverObj.type?i("div",{staticClass:"hover-con",style:[e.hoverStyle,{opacity:e.hoverStyleShow?1:0}]}):e._e(),5===e.animationHoverObj.type&&e.hoverImage&&e.hoverStyleShow?i("img",{staticClass:"hover-image",attrs:{src:e.hoverImage,alt:""}}):e._e(),0!=t.picList.length&&0!=t.popList.length?i("div",[i("hotspot",e._g(e._b({ref:"hotspot"+e.sortId+r,refInFor:!0,attrs:{item:t,ratio:e.ratio,path:e.path,brand:e.brand,envUrl:e.envUrl,sortId:e.sortId,recordId:e.recordId,componentType:2,uniqueName:e.attributeJson.uniqueName,language:e.language}},"hotspot",e.$attrs,!1),e.$listeners))],1):e._e()])})),0)])]:e._e()],2)},R=[],U=(i("13d5"),i("02a3")),B=i.n(U),j=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"pop-wrap",style:{left:e.item.left,top:e.item.top,width:e.item.realWidth*e.ratio+"px"||!1,height:e.item.realHeight*e.ratio+"px"||!1}},e._l(e.item.popList,(function(t,r){return i("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData(r),envUrl:e.envUrl},expression:"{data:tipReportData(index), envUrl}"}],key:r,ref:""+e.sortId+r,refInFor:!0,class:"pop-item",style:{width:t.width/750*100+"%",height:t.height/(e.item.height/e.proportion)*100+"%",left:t.left/750*100+"%",top:t.top/(e.item.height/e.proportion)*100+"%"},attrs:{id:[e.recordId+"_"+e.sortId+"_"+t.uniqueId.split("_")[2],"pop-item"],"data-sensors-click":"","data-sensorsClick":"true",name:[e.recordId+"_"+e.sortId+"_"+t.uniqueId.split("_")[2],"pop-item"]},on:{click:function(i){return e.pageClick(t,r)}}},[t.product.openHot?i("div",{staticClass:"product-hover",on:{mouseover:function(t){return e.mouseover(r)},mouseleave:e.mouseLeave}},[0!=t.product.initImage.length?i("div",{staticStyle:{"{ fontsize":"0"}},[i("img",{attrs:{src:e.hoverIndex==r?t.product.hoverImage[0].resourcePath:t.product.initImage[0].resourcePath,alt:""}})]):e._e(),e.hoverIndex==r?i("div",{staticClass:"product-image"},[i("img",{attrs:{src:1==t.product.imageType?e.productImage[t.productCode]:t.product.productImage[0].resourcePath,alt:""}})]):e._e()]):e._e()])})),0)},F=[],q={name:"hotspot",props:{item:{type:Object,default:()=>{}},width:{type:Number,default:0},height:{type:Number,default:0},ratio:{type:Number,default:1},envUrl:{type:String,default:""},sortId:{type:Number,default:0},recordId:{type:Number,default:0},brand:{type:String},componentType:{type:Number},refererPagePath:{type:String},path:{type:String},pathType:{type:Number},uniqueName:{type:String},language:{type:String,default:"zh-CN"},prePosition:{type:Number}},data(){return{hotList:[],proportion:1,hoverIndex:1,needReport:!0,preTotal:0,productImage:{},service:new y}},watch:{"item.width":{handler(e){this.proportion=e/750},deep:!0,immediate:!0},itemCodeList:{handler(e){this.getProductList(e)},immediate:!0,deep:!0}},computed:{itemCodeList(){let e=this.item.popList.filter(e=>1==e.jumpLinkType&&1==e.product.imageType&&e.product.openHot);return e.map(e=>e.productCode)},tipReportData(){let e=JSON.parse(JSON.stringify(this.item.popList));return function(t){let i=e[t];return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.uniqueName,componentMethodType:0,popData:{productCode:i.productCode,selectDataShow:i.selectDataShow,uniqueName:i.uniqueName,uniqueId:this.recordId+"_"+this.sortId+"_"+i.uniqueId.split("_")[2],brand:1===this.pathType?"defaultPath":this.brand},materialId:this.item.sort?this.recordId+"_"+this.item.sort:this.recordId+"_"+this.sortId,materialName:this.item.uniqueName?this.item.uniqueName:this.uniqueName,refererPagePath:this.refererPagePath,path:this.path,componentType:this.componentType,brand:this.brand,position:this.preTotal+t+1,event:"bannerShow"}}}},mounted(){this.hotList=JSON.parse(JSON.stringify(this.item.popList))},methods:{pageClick(e,t){if(e.jumpLinkType)try{this.dataSend(e,t,1)}catch(i){console.log(i)}this.$emit("jumpLink",e)},dataSend(e,t,i){let r={uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.uniqueName,componentMethodType:i,popData:{...e,uniqueId:this.recordId+"_"+this.sortId+"_"+e.uniqueId.split("_")[2],brand:1===this.pathType?"defaultPath":this.brand},materialId:this.item.sort?this.recordId+"_"+this.item.sort:this.recordId+"_"+this.sortId,materialName:this.item.uniqueName?this.item.uniqueName:this.uniqueName,refererPagePath:this.refererPagePath,path:this.path,componentType:this.componentType,brand:this.brand,position:this.prePosition?this.prePosition+t+1:1*this.preTotal+t+1,event:0==i?"bannerShow":"bannerClick"};if(0==i)C(r,this.envUrl);else{let e=C(r,this.envUrl,"click"),t=new Blob([JSON.stringify(e)],{type:"application/json"});navigator.sendBeacon(this.envUrl+"service-zuul/data/collect/acquisition",t)}},getProductList(e){if(0==e.length)return;let t={itemCodeList:e,pageNum:1,pageSize:e.length},i={};this.service.getProductInfo(this.envUrl,t,this.language).then(e=>{e&&e.list&&(this.productList=e.list,e.list.forEach(e=>{i[e.code]=e.mainPicUrl}),this.productImage=i)})},mouseover(e){this.hoverIndex=e},mouseLeave(){this.hoverIndex=-1}},directives:{treport:E}},$=q,H=$,z=(i("55f9"),P(H,j,F,!1,null,"4c0eac42",null)),V=z.exports,G=V,W={name:"imgNav",mixins:[k],components:{hotspot:G},props:{},data(){return{swiper:"",imageList:[],popList:[],positionList:[],positionTotal:[],hasInitSwiper:!1}},computed:{indicatorType(){return this.attributeJson.indicatorType},picStyle(){let{attributeJson:e,ratio:t,animationInObj:i}=this;return{animationDuration:i.duration+"s",padding:`0 ${e.paddingSpacing*t}px`,width:Math.ceil(e.baseStyle.w*t)+"px"}},picItemStyle(){let{attributeJson:e,ratio:t}=this,{oneLineCount:i}=e;return{width:Math.ceil((e.baseStyle.w*t-2*e.paddingSpacing*t)/i)+"px",height:Math.ceil(e.baseStyle.h*t)+"px",padding:"0 "+e.itemSpacing*t+"px"}},list(){return this.attributeJson.list},isSwiper(){return 3==this.styleType&&2==this.indicatorType&&"pc"==this.mode||2==this.styleType&&2==this.indicatorType&&"mobile"==this.mode},hasConfig(){return this.attributeJson.list.some(e=>0!=e.picList.length)},hasSwiperButton(){return 3==this.styleType&&2==this.indicatorType&&"pc"==this.mode},hasScrollBar(){return 2==this.styleType&&2==this.indicatorType&&"mobile"==this.mode},tipReportData(){let{list:e}=this,t=[],i=[];return e.forEach(e=>{0!=e.popList.length?t.push(e.popList.length):t.push(1)}),t.forEach((e,r)=>{let s=t.slice(0,r),n=s.reduce((e,t)=>e+t,0);i.push(n)}),this.positionList=t,this.positionTotal=i,function(t){let i=e[t];return 0!=i.popList.length?void 0:{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:2,materialId:this.recordId+"_"+this.sortId+"_"+i.sort,materialName:i.uniqueName,refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:this.positionTotal[t]+1,event:"bannerShow"}}}},watch:{isSwiper:{handler(e){e&&this.initSwiper()},immediate:!0}},mounted(){},methods:{initSwiper(){this.hasConfig&&this.isSwiper&&this.$nextTick(()=>{this.swiper&&(this.swiper.destroy(!0,!0),this.swiper=null);let{attributeJson:e}=this;this.options={effect:"slide",autoplay:!1,slidesPerView:this.attributeJson.oneLineCount,spaceBetween:e.itemSpacing},this.hasSwiperButton&&(this.options.navigation={nextEl:".swiper-button-next-"+this.sortId,prevEl:".swiper-button-prev-"+this.sortId}),this.hasScrollBar&&(this.options.scrollbar={el:".swiper-scrollbar-"+this.sortId,draggable:!0},this.options.freeMode=!0),this.swiper=new B.a(".swiper-container-"+this.sortId,this.options),console.log("%s","初始化轮播图",this.swiper)})}}},X=W,Y=X,K=(i("dc72"),P(Y,N,R,!1,null,"5e573198",null)),J=K.exports,Q=J,Z=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"video-wrap entrance-con",style:[e.conStyle,e.animationInStyle]},[0!==e.videoItem.length?i("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData,envUrl:e.envUrl},expression:"{data: tipReportData, envUrl}"}],class:["video-con","video-con-"+e.sortId,e.animationInObj.type?e.enterClass:""],style:{width:Math.round(e.attributeJson.baseStyle.w*e.ratio)+"px",height:Math.round(e.attributeJson.baseStyle.h*e.ratio)+"px"}},[i("myVideoPlayer",{attrs:{sort:(new Date).getTime(),videoInfo:e.videoInfo,autoPlay:e.autoPlay,recordId:e.recordId,sortId:e.sortId}}),1===e.attributeJson.isVideoHasHot&&0!=e.videoHotPic.length?i("div",{staticClass:"hot-image"},[i("img",{attrs:{src:e.videoHotPic[0].resourcePath,alt:""}}),i("hotspot",e._g(e._b({ref:"hotspot",attrs:{componentType:3,item:e.hotData,ratio:e.ratio,envUrl:e.envUrl,language:e.language,recordId:e.recordId,sortId:e.sortId,path:e.path,brand:e.brand,uniqueName:e.attributeJson.uniqueName}},"hotspot",e.$attrs,!1),e.$listeners))],1):e._e()],1):e._e()])},ee=[],te=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticStyle:{height:"100%",position:"relative"}},[i("video",{ref:"myVideo-"+e.sort,staticClass:"video-js vjs-default-skin vjs-big-play-centered vjs-16-9 video-item",attrs:{preload:"auto","data-setup":"{}","x5-playsinline":"","x5-video-orientation":"landscape|portrait","x5-video-player-type":"h5","webkit-playsinline":"true",playsinline:"true",controls:e.videoInfo.checkedAttr.indexOf("controls")>-1,autoplay:e.autoPlay,loop:e.videoInfo.checkedAttr.indexOf("loop")>-1,muted:"",poster:0!=e.videoInfo.list.length?e.videoInfo.list[0].imgUrl:""},domProps:{muted:!0}},[i("source",{attrs:{src:0!=e.videoInfo.list.length?e.videoInfo.list[0].resourcePath:""}})]),e.videoInfo.checkedAttr.indexOf("controls")<0?i("div",{staticClass:"video-cover",attrs:{id:[e.recordId+"_"+e.sortId,"video-cover"],"data-sensors-click":"","data-sensorsClick":"true",name:[e.recordId+"_"+e.sortId,"video-cover"]},on:{click:e.clickVideo}}):e._e()])},ie=[],re=i("f0e2"),se={name:"videoPlayer",props:{videoInfo:{type:Object,default:()=>{}},autoPlay:{type:Boolean,default:!1},sort:{type:Number,default:0},recordId:{type:Number,default:0},sortId:{type:Number,default:0}},data(){return{isPlay:!1}},watch:{autoPlay:{handler(e){this.player&&(e?this.player.play():this.player.pause())},immediate:!0}},mounted(){let e=this;setTimeout(()=>{this.player=Object(re["a"])(this.$refs["myVideo-"+this.sort],{},(function(){this.on("play",()=>{e.isPlay=!0}),this.on("pause",()=>{e.isPlay=!1})})),this.$nextTick(()=>{this.play()})},50)},methods:{play(){0!=this.videoInfo.list.length&&this.autoPlay&&this.player.play()},clickVideo(){this.isPlay?this.player.pause():this.player.play()}}},ne=se,ae=ne,oe=(i("eab8"),P(ae,te,ie,!1,null,"ebbd756a",null)),le=oe.exports,de=le,ue={name:"videoItem",mixins:[k],components:{hotspot:G,myVideoPlayer:de},props:{attributeJson:{type:Object,default:function(){}},ratio:{type:Number,default:1,positionList:[]}},data(){return{autoPlay:!1}},watch:{"videoInfo.checkedAttr":{handler(e){this.autoPlay=e.indexOf("autoPlay")>-1},immediate:!0,deep:!0}},computed:{videoItem(){return this.attributeJson.videoInfo.list},videoHotPic(){return this.attributeJson.videoHotInfo.picList},videoHotPop(){return this.attributeJson.videoHotInfo.popList},videoInfo(){return this.attributeJson.videoInfo},hotData(){let{attributeJson:e}=this;return{popList:e.videoHotInfo.popList,width:e.videoHotInfo.picList[0].width,height:e.videoHotInfo.picList[0].height,realWidth:e.baseStyle.w,realHeight:e.baseStyle.h,top:0,left:0}},tipReportData(){return 1==this.attributeJson.isVideoHasHot?void 0:{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:3,popData:{},refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,event:"bannerShow",position:1}}},methods:{}},ce=ue,he=ce,pe=(i("1abf"),P(he,Z,ee,!1,null,"27d3e021",null)),fe=pe.exports,me=fe,ge=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"swiper-wrap",style:[e.conStyle,e.animationInStyle]},[e.hasSwiperItem||1===e.bgStyle.status&&0!=e.bgStyle.picList.length?i("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate"}],class:["swiper-con","swiper-con-"+e.mode],style:{backgroundImage:0!=e.bgStyle.picList.length?"url("+e.bgStyle.picList[0].resourcePath+")":""}},[i("div",{staticClass:"entrance-con",style:{"--hoverColor":e.paginationStyle.hoverColor||e.paginationStyle.color,"--activeColor":e.paginationStyle.activeColor,"--color":e.paginationStyle.color,width:e.baseStyle.w*e.ratio+"px",height:e.baseStyle.h*e.ratio+"px"}},[i("div",{key:e.indicatorType,ref:"swiper"+e.attributeJson.sort,class:["swiper-container swiper-container-"+e.sortId+" swiper-container-"+e.indicatorType,e.animationInObj.type?e.enterClass:""],style:{animationDuration:e.animationInObj.duration+"s"},attrs:{id:"mySwiper-"+e.sortId}},[i("div",{staticClass:"swiper-wrapper"},e._l(e.swiperList,(function(t,r){return i("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData(r),envUrl:e.envUrl},expression:"{data:tipReportData(index), envUrl}"}],key:t.sort+r,class:["swiper-slide",{"slide-auto":e.isSpaceSwiper}]},[i("div",{staticClass:"swiper-width",style:{width:(e.baseStyle.w-(2==e.styleType?100:0))*e.ratio+"px!important",height:e.baseStyle.h*e.ratio+"px"}},[1===t.type?i("img",{attrs:{src:t.picList[0].resourcePath,alt:t.picList[0].resourceName.split(".")[0]}}):e._e(),2===t.type?i("div",{staticClass:"video-player-con"},[i("myVideoPlayer",{attrs:{recordId:e.recordId,sortId:e.sortId,sort:(new Date).getTime(),videoInfo:t.videoInfo,autoPlay:t.videoInfo.checkedAttr.indexOf("autoPlay")>-1&&e.activeIndex==r}}),2==t.type&&1==t.isVideoHasHot&&0!=t.videoHotInfo.picList.length?i("div",{staticClass:"video-hot-image"},[i("img",{attrs:{src:t.videoHotInfo.picList[0].resourcePath,alt:t.videoHotInfo.picList[0].resourceName.split(".")[0]}}),0!=t.videoHotInfo.picList.length?i("div",{staticClass:"swiper-hot"},[i("hotspot",e._g(e._b({ref:"hotspot"+e.sortId+r,refInFor:!0,attrs:{item:{realWidth:t.realWidth,realHeight:t.realHeight,popList:t.videoHotInfo.popList,width:t.videoHotInfo.picList[0].width,height:t.videoHotInfo.picList[0].height},componentType:1,ratio:e.ratio,uniqueName:e.attributeJson.uniqueName,envUrl:e.envUrl,sortId:e.sortId,laySort:e.sort,path:e.path,brand:e.brand,prePosition:e.positionTotal[t.i],recordId:e.recordId}},"hotspot",e.$attrs,!1),e.$listeners))],1):e._e()]):e._e()],1):e._e(),1==t.type&&0!=t.picList.length?[i("hotspot",e._g(e._b({ref:"hotspot"+e.sortId+r,refInFor:!0,attrs:{item:t,ratio:e.ratio,componentType:1,uniqueName:e.attributeJson.uniqueName,path:e.path,envUrl:e.envUrl,sortId:e.sortId,brand:e.brand,prePosition:e.positionTotal[t.i],recordId:e.recordId}},"hotspot",e.$attrs,!1),e.$listeners))]:e._e()],2)])})),0),e.hasScrollBar?i("div",{staticClass:"swiper-scrollbar-own"},[i("div",{staticClass:"swiper-scrollbar-drag",style:{width:100/e.list.length+"%",left:(e.activeIndex>e.list.length?0:100/e.list.length*(e.activeIndex-1))+"%"}})]):e._e(),e.hasSwiperPagination?i("div",{staticClass:"swiper-pagination-custom"},e._l(e.list,(function(t,r){return i("span",{key:r,class:["pagination-custom-bullt",{"bullt-active":e.slideIndex==r}],attrs:{id:[e.recordId+"_"+e.sortId+"_"+Number(r+1),"pagination-custom-bullt"],name:[e.recordId+"_"+e.sortId+"_"+Number(r+1),"pagination-custom-bullt"],"data-sensors-click":"","data-sensorsClick":"true"},on:{click:function(t){return e.swiperSlide(r)}}})})),0):e._e(),e.hasSwiperButton?[i("div",{class:["swiper-button-prev","swiper-button-prev-"+e.sortId]},[e._t("swiper-button-prev",(function(){return[2==e.indicatorType||3==e.indicatorType?i("div",[i("span",{staticClass:"cms2iconfont iconleft",style:e.pageStyle})]):e._e(),4==e.indicatorType?i("div",{staticClass:"arrow"},[i("span",{staticClass:"cms2iconfont iconarrow-left",style:e.pageStyle})]):e._e()]}))],2),i("div",{class:["swiper-button-next","swiper-button-next-"+e.sortId]},[e._t("swiper-button-next",(function(){return[2==e.indicatorType||3==e.indicatorType?i("div",[i("span",{staticClass:"cms2iconfont iconright",style:e.pageStyle})]):e._e(),4==e.indicatorType?i("div",{staticClass:"arrow"},[i("span",{staticClass:"cms2iconfont iconarrow-right",style:e.pageStyle})]):e._e()]}))],2)]:e._e()],2)]),2===e.animationHoverObj.type?i("div",{staticClass:"hover-con",style:[e.hoverStyle,{opacity:e.hoverStyleShow?1:0}]}):e._e()]):e._e()])},ye=[];let ve=16.7;var be={name:"swiperItem",mixins:[k],components:{hotspot:G,myVideoPlayer:de},props:{sortId:{type:Number}},data(){return{hasSwiperItem:!1,swiper:"",activeIndex:0,slideIndex:0,hasInitSwiper:!1,positionList:[],positionTotal:[]}},computed:{bgStyle(){return this.attributeJson.bgStyle},list(){return this.attributeJson.list},styleType(){return this.attributeJson.styleType},indicatorType(){return this.attributeJson.indicatorType},paginationStyle(){return this.attributeJson.paginationStyle},pageStyle(){return{color:this.attributeJson.paginationStyle.color}},hasSwiperPagination(){return 3==this.indicatorType},hasSwiperButton(){return 1!=this.indicatorType},hasScrollBar(){return"pc"==this.mode&&2==this.indicatorType},isSpaceSwiper(){return"mobile"==this.mode&&2==this.styleType},tipReportData(){let e=[],t=[];return this.list.forEach(t=>{1==t.type&&0!=t.popList.length||0!=t.videoHotInfo.popList.length?e.push(1==t.type?t.popList.length:t.videoHotInfo.popList.length):e.push(1)}),e.forEach((i,r)=>{let s=e.slice(0,r),n=s.reduce((e,t)=>e+t,0);t.push(n)}),this.positionList=e,this.positionTotal=t,function(e){let t=this.swiperList[e];return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:1,popData:{},materialId:this.recordId+"_"+this.sortId+"_"+t.sort,materialName:t.uniqueName,refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:this.positionTotal[e]+1,event:"bannerShow"}}}},mounted(){this.$nextTick(()=>{this.judgeSwiper()})},methods:{judgeSwiper(){let e=this.attributeJson.list,t=e.findIndex(e=>0!=e.picList.length||0!=e.videoInfo.list.length);if(this.hasSwiperItem=t>-1,this.hasSwiperItem){e.forEach((e,t)=>{e.i=t});let t=JSON.parse(JSON.stringify(e));this.swiperList=e.concat(JSON.parse(JSON.stringify(t))),this.swiperList=t.concat(this.swiperList),this.initSwiper(!0)}},initSwiper:function(e){(this.hasSwiperItem||1===this.bgStyle.status&&0!=this.bgStyle.picList.length)&&this.$nextTick(()=>{this.swiper&&(this.swiper.destroy(!0,!0),this.swiper=null);let{attributeJson:e}=this;this.options={effect:"slide",observer:!0,observeParents:!0,preventInteractionOnTransition:!0,autoplay:!!e.autoPlay&&{delay:1e3*e.interval,disableOnInteraction:!1,stopOnLastSlide:!1}},"mobile"==this.mode&&2==this.styleType&&(this.options.spaceBetween=10,this.options.loop=!1,this.options.slidesPerView="auto",this.options.centeredSlides=!0),this.hasSwiperButton&&(this.options.navigation={nextEl:".swiper-button-next-"+this.sortId,prevEl:".swiper-button-prev-"+this.sortId});let t=this,i=this.list.length;this.options.on={slideChangeTransitionEnd:function(){t.activeIndex=this.activeIndex,t.slideIndex=t.swiperList[this.activeIndex].i},slideNextTransitionEnd:function(){this.activeIndex==2*i&&this.slideTo(i,ve)},slidePrevTransitionEnd:function(){this.activeIndex==i-1&&this.slideTo(2*i-1,ve)}},this.swiper=new B.a(".swiper-container-"+this.sortId,this.options),this.swiper instanceof Array?this.swiper.forEach(e=>{e.slideTo(i,ve)}):this.swiper.slideTo(i,ve)})},swiperSlide(e){this.swiper.slideTo(e),this.slideIndex=e}}},_e=be,Te=_e,Se=(i("6e0e"),P(Te,ge,ye,!1,null,"5b4a67cf",null)),we=Se.exports,Ee=we,Ce=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"button-wrap",style:[e.conStyle,e.animationInStyle]},[i("div",{ref:"button"+e.attributeJson.sort,class:["button-cl","button-cl-"+e.sortId],attrs:{id:[e.recordId+"_"+e.sortId,"button-cl"],name:[e.recordId+"_"+e.sortId,"button-cl"],"data-sensors-click":"","data-sensorsClick":"true"},on:{click:e.pageClick}},[i("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate"},{name:"treport",rawName:"v-treport",value:{data:e.tipReportData,envUrl:e.envUrl},expression:"{data:tipReportData, envUrl}"}],staticClass:"button-content",class:[{flexCenterBetween:e.iconImage},4===e.animationHoverObj.type?e.hoverDirection:""],style:[e.buttonStyle,{"--width":e.hoverStyleShow?"100%":"0","--height":e.hoverStyleShow?"100%":"0","--bgColor":e.animationHoverObj.bgStyle.backgroundColor}]},[1===e.iconStyle.type&&1===e.iconStyle.position&&e.iconImage?i("img",{attrs:{src:e.iconImage,alt:""}}):e._e(),i("div",{staticClass:"label",style:e.buttonTextStyle},[e._v(e._s(e.attributeJson.label||"按钮"))]),1===e.iconStyle.type&&2===e.iconStyle.position&&e.iconImage?i("img",{attrs:{src:e.iconImage,alt:""}}):e._e(),5===e.animationHoverObj.type&&e.hoverImage&&e.hoverStyleShow?i("img",{staticClass:"hover-image",attrs:{src:e.hoverImage,alt:""}}):e._e()]),2===e.animationHoverObj.type?i("div",{staticClass:"hover-con",style:[e.hoverStyle,{opacity:e.hoverStyleShow?1:0,borderRadius:e.attributeJson.borderStyle.borderRadius+"px"}]}):e._e()])])},xe=[],ke={name:"buttonItem",mixins:[k],components:{},props:{},data(){return{iconImage:"",backgroundImage:"",hoverButtonStyle:{}}},watch:{bgStyle:{handler(e){0!=e.picList.length&&(this.backgroundImage=2===e.type?e.picList[0].resourcePath:"")},immediate:!0,deep:!0},iconStyle:{handler(e){0!=e.picList.length&&(this.iconImage=1===e.type?e.picList[0].resourcePath:"")},immediate:!0,deep:!0}},computed:{iconStyle(){return this.attributeJson.iconStyle},bgStyle(){return this.attributeJson.bgStyle},buttonStyle(){let{bgStyle:e,fontStyle:t,borderStyle:i,space:r}=this.attributeJson,{borderTop:s,borderRight:n,borderBottom:a,borderLeft:o,borderColor:l}=i,d="mobile"==this.mode?2*this.ratio:this.ratio,u={fontSize:parseFloat(t.fontSize)*d+"px",color:t.color,backgroundColor:1===e.type?e.backgroundColor:"",fontWeight:t.fontWeight?"bold":"",textDecoration:t.textDecoration?"underline":"",fontStyle:t.fontItalic?"italic":"",borderRadius:i.borderRadius+"px",backgroundImage:`url('${this.backgroundImage}')`,paddingLeft:r.left+"px",paddingRight:r.right+"px"};return 1===i.type&&l&&(u.border="1px solid "+l),2===i.type&&(u.borderTop=s?"1px solid "+s:"none",u.borderRight=n?"1px solid "+n:"none",u.borderBottom=a?"1px solid "+a:"none",u.borderLeft=o?"1px solid "+o:"none"),u},buttonTextStyle(){return{color:this.attributeJson.fontStyle.color,"--hoverColor":this.attributeJson.fontStyle.hoverObj.color||this.attributeJson.fontStyle.color}},tipReportData(){return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:17,popData:{},refererPagePath:this.refererPagePath,path:this.path,brand:this.brand,position:1,event:"bannerShow"}}},methods:{pageClick(){if(this.attributeJson.linkObj.jumpLinkType)try{let e=JSON.parse(JSON.stringify(this.tipReportData));e.event="bannerClick";let t=C(e,this.envUrl,"click"),i=new Blob([JSON.stringify(t)],{type:"application/json"});navigator.sendBeacon(this.envUrl+"service-zuul/data/collect/acquisition",i)}catch(e){}this.$emit("jumpLink",this.attributeJson.linkObj)}}},Ie=ke,Ae=Ie,Oe=(i("69a3"),P(Ae,Ce,xe,!1,null,"7c618edb",null)),Pe=Oe.exports,Le=Pe,De=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"product-wrap entrance-con",style:[e.conStyle,e.paginationShow,e.animationInStyle]},[i("div",{class:["product-con",e.animationInObj.type?e.enterClass:""],style:[{width:e.baseStyle.w*e.ratio+"px",height:e.baseStyle.h*e.ratio+"px",padding:"0 "+e.attributeJson.goodsPaddingSpacing+"px",animationDuration:e.animationInObj.duration+"s"}]},[e.isSwiper?e._e():i("div",{ref:"slide"+e.sortId,class:"slide-con slide-con-"+e.styleType+"-"+e.mode,style:{width:e.attributeJson.baseStyle.w*e.ratio+e.attributeJson.goodsSpacing+"px",margin:"0px -"+e.attributeJson.goodsSpacing/2+"px"}},e._l(e.productList,(function(t,r){return i("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData(r),envUrl:e.envUrl},expression:"{data:tipReportData(index), envUrl}"},{name:"hoverAnimate",rawName:"v-hoverAnimate",value:{key:"productIndex",value:r},expression:"{ key: 'productIndex', value: index }"}],key:t.id,ref:"product"+t.code+r,refInFor:!0,class:["product-item","product"+t.code+r],style:[e.productStyle],attrs:{id:[e.recordId+"_"+e.sortId+"_"+t.code,"product-item"],name:[e.recordId+"_"+e.sortId+"_"+t.code,"product-item"],"data-sensors-click":"","data-sensorsClick":"true"},on:{click:function(i){return e.gotoPDP(t.code,t.colorCode,t.name,r)}}},[i("div",{staticClass:"product-image"},[i("img",{style:[3===e.animationHoverObj.type&&e.productIndex==r?e.hoverStyle:""],attrs:{src:2==e.attributeJson.goodsImgType&&t.customImage?t.customImage:t.mainPicUrl,alt:t.name}})]),0!=e.attributeJson.showInfo.length?i("div",{class:["product-info","position"+e.attributeJson.infoPoisition,{transparent:2==e.attributeJson.isHover&&e.productIndex!=r}]},[e._t("productInfo",(function(){return[e.attributeJson.showInfo.indexOf(1)>-1?i("div",{staticClass:"product-name"},[e._v(e._s(t.name))]):e._e(),i("div",{staticClass:"price-con"},[e.attributeJson.showInfo.indexOf(2)>-1?i("div",[e._v("¥"+e._s(t.salesPrice||0))]):e._e(),t.salesPrice!=t.standardPrice&&e.attributeJson.showInfo.indexOf(3)>-1?i("div",{staticClass:"standardPrice"},[e._v(" ¥"+e._s(t.standardPrice||0)+" ")]):e._e()])]}))],2):e._e(),2===e.animationHoverObj.type?i("div",{staticClass:"hover-con",style:[e.hoverStyle,{opacity:e.productIndex===r?1:0,margin:"0 "+e.goodsSpacing/2+"px"}]}):e._e()])})),0),e.isSwiper?i("div",{key:e.styleType+e.indicatorType,ref:"slide"+e.sortId,class:"swiper-container swiper-container-"+e.sortId,attrs:{id:"mySwiper-"+e.sortId}},[i("div",{staticClass:"swiper-wrapper",style:[{width:e.baseStyle.w*e.ratio+"px"}]},e._l(e.productList,(function(t,r){return i("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate",value:{key:"productIndex",value:r},expression:"{ key: 'productIndex', value: index }"},{name:"treport",rawName:"v-treport",value:{data:e.tipReportData(r),envUrl:e.envUrl},expression:"{data:tipReportData(index), envUrl}"}],key:t.id,class:"swiper-slide swiper-slide-"+e.styleType+"-"+e.mode,style:[e.productStyle]},[i("div",{ref:"product"+t.code+r,refInFor:!0,style:{height:e.attributeJson.baseStyle.h*e.ratio+"px"},attrs:{id:[e.recordId+"_"+e.sortId+"_"+t.code,"product-item"],"data-sensors-click":"","data-sensorsClick":"true",name:[e.recordId+"_"+e.sortId+"_"+t.code,"product-item"]},on:{click:function(i){return e.gotoPDP(t.code,t.colorCode,t.name,r)}}},[i("div",{staticClass:"product-image"},[i("img",{style:[3===e.animationHoverObj.type&&e.productIndex==r?e.hoverStyle:""],attrs:{src:2==e.attributeJson.goodsImgType&&t.customImage?t.customImage:t.mainPicUrl,alt:""}})]),0!=e.attributeJson.showInfo.length?i("div",{class:["product-info","position"+e.attributeJson.infoPoisition,{transparent:2==e.attributeJson.isHover&&e.productIndex!=r}]},[e._t("productInfo",(function(){return[e.attributeJson.showInfo.indexOf(1)>-1?i("div",{staticClass:"product-name"},[e._v(" "+e._s(t.name)+" ")]):e._e(),i("div",{staticClass:"price-con"},[e.attributeJson.showInfo.indexOf(2)>-1?i("div",[e._v("¥"+e._s(t.salesPrice||0))]):e._e(),t.salesPrice!=t.standardPrice&&e.attributeJson.showInfo.indexOf(3)>-1?i("div",{staticClass:"standardPrice"},[e._v(" ¥"+e._s(t.standardPrice||0)+" ")]):e._e()])]}))],2):e._e(),2===e.animationHoverObj.type?i("div",{staticClass:"hover-con",style:[e.hoverStyle,{opacity:e.productIndex===r?1:0}]}):e._e()])])})),0),e.hasScrollBar?i("div",{class:"swiper-scrollbar swiper-scrollbar-"+e.sortId}):e._e(),e.hasSwiperButton?i("div",{class:"swiper-button-prev swiper-button-prev-"+e.sortId},[e._t("swiper-button-prev",(function(){return[2==e.indicatorType?i("div",[i("span",{staticClass:"cms2iconfont iconleft",style:e.pageStyle})]):e._e()]}))],2):e._e(),e.hasSwiperButton?i("div",{class:"swiper-button-next swiper-button-next-"+e.sortId},[e._t("swiper-button-next",(function(){return[2==e.indicatorType?i("div",[i("span",{staticClass:"cms2iconfont iconright",style:e.pageStyle})]):e._e()]}))],2):e._e()]):e._e()])])},Me=[],Ne={name:"productItem",mixins:[k],components:{},props:{sortId:{type:Number}},data(){return{productList:[],swiper:"",productStyle:{},service:new y,productIndex:"",windowHeight:0}},watch:{addProduct:{handler(e){this.isClient&&(1==e.type&&0==e.itemCodeList.length||(2!=e.type||e.categoryGroupCode)&&(3!=e.type||e.cmsSortCode)&&this.getProductList())},immediate:!0,deep:!0},ratio:{handler(){!this.isSwiper&&this.productStyle.width&&(this.productStyle.width=(this.attributeJson.baseStyle.w*this.ratio-2*this.attributeJson.goodsPaddingSpacing+this.goodsSpacing)/this.showNum+"px")}}},computed:{addProduct(){return this.attributeJson.addProduct},goodsPaddingSpacing(){return this.attributeJson.goodsPaddingSpacing},goodsSpacing(){return this.attributeJson.goodsSpacing},itemsPerLine(){return this.attributeJson.itemsPerLine},indicatorType(){return this.attributeJson.indicatorType},isSwiper(){return"pc"==this.mode&&1==this.styleType||"mobile"==this.mode&&2==this.styleType&&(2==this.indicatorType||3==this.indicatorType)},hasSwiperButton(){return"pc"==this.mode&&1==this.styleType&&2==this.indicatorType||"mobile"==this.mode&&2==this.styleType&&2==this.indicatorType},hasScrollBar(){return"mobile"==this.mode&&2==this.styleType&&3==this.indicatorType},paginationShow(){let{paginationStyle:e}=this.attributeJson;return{"--hoverColor":e.hoverColor||e.color,"--activeColor":e.activeColor,"--color":e.color}},pageStyle(){return{color:this.attributeJson.paginationStyle.color}},showNum(){let e=1;return"pc"==this.mode?e=this.attributeJson.itemsPerLine:1==this.attributeJson.styleType?e=2.5:2==this.attributeJson.styleType&&(e=this.attributeJson.itemsPerLine),e},tipReportData(){return function(e){let t=this.productList[e];return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:4,popData:{productCode:t.code,selectDataShow:t.name},materialId:this.recordId+"_"+this.sortId,materialName:this.attributeJson.uniqueName,refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:e+1,event:"bannerShow"}}}},mounted(){this.productList=this.attributeJson.productList,this.initProduct()},methods:{getProductList:function(){let e={};switch(this.addProduct.type){case 1:e={itemCodeList:this.addProduct.itemCodeList,pageNum:1,pageSize:this.addProduct.itemCodeList.length};break;case 2:e={categoryParam:{categoryCodeList:this.addProduct.categoryCodeList,categoryGroupCode:this.addProduct.categoryGroupCode},pageNum:1,pageSize:this.addProduct.max,sortRuleId:this.addProduct.sortId};break;case 3:e={pageNum:1,pageSize:this.addProduct.max,sortField:this.addProduct.cmsSortCode};break}3==this.addProduct.type?this.service.getSortProductInfo(this.envUrl,e,this.language).then(e=>{if(e&&e.list){let t=document.querySelector(".entrance-con"+this.sortId),i=t&&t.classList.contains("entrance-demonstrate");i&&t.firstChild.style&&(t.firstChild.style.display="block"),this.productList=e.list,this.initProduct()}else this.productList=[]}):this.service.getProductInfo(this.envUrl,e,this.language).then(e=>{if(e&&e.list){let t=document.querySelector(".entrance-con"+this.sortId),i=t&&t.classList.contains("entrance-demonstrate");i&&t.firstChild.style&&(t.firstChild.style.display="block"),this.productList=e.list,this.initProduct()}else this.productList=[]})},initProduct:function(){let{attributeJson:e,addProduct:t}=this;2==e.goodsImgType&&0!=t.customImageList.length&&this.productList.forEach((e,i)=>{0!=t.customImageList[i].picList.length&&this.$set(e,"customImage",t.customImageList[i].picList[0].resourcePath)}),this.productList&&this.productList.length>0&&(this.isSwiper?this.initSwiper():this.initSlide())},initSwiper:function(){let{attributeJson:e,indicatorType:t,styleType:i}=this;this.$nextTick(()=>{this.swiper&&(this.swiper.destroy(!0,!0),this.swiper=null),this.options={effect:"slide",autoplay:!1,slidesPerView:this.showNum,spaceBetween:e.goodsSpacing},2==i&&2==t&&(this.options.pagination={el:".swiper-pagination-"+this.sortId,clickable:!0}),this.hasSwiperButton&&(this.options.navigation={nextEl:".swiper-button-next-"+this.sortId,prevEl:".swiper-button-prev-"+this.sortId}),this.hasScrollBar&&(this.options.scrollbar={el:".swiper-scrollbar-"+this.sortId,draggable:!0},this.options.freeMode=!0),this.swiper=new B.a(".swiper-container-"+this.sortId,this.options)})},initSlide(){this.productStyle={padding:`0 ${this.goodsSpacing/2}px`,width:(this.attributeJson.baseStyle.w*this.ratio-2*this.attributeJson.goodsPaddingSpacing+this.goodsSpacing)/this.showNum+"px",marginBottom:this.goodsSpacing+"px"}},gotoPDP(e,t,i,r){try{let e=JSON.parse(JSON.stringify(this.tipReportData(r)));e.event="bannerClick";let t=C(e,this.envUrl,"click"),i=new Blob([JSON.stringify(t)],{type:"application/json"});navigator.sendBeacon(this.envUrl+"service-zuul/data/collect/acquisition",i)}catch(s){}this.$emit("gotoPDP",{code:e,colorCode:t})}}},Re=Ne,Ue=Re,Be=(i("8ee5"),P(Ue,De,Me,!1,null,"5f1e1175",null)),je=Be.exports,Fe=je,qe=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"simplyText-wrap entrance-con",style:[e.conStyle,e.animationInStyle],on:{click:e.pageClick}},[i("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate"},{name:"cursor",rawName:"v-cursor"}],staticClass:"text-con"},[i("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData,envUrl:e.envUrl},expression:"{data:tipReportData, envUrl}"}],staticClass:"text-show",style:[e.textStyle,e.hoverStyleShow?e.hoverStyle:""]},[e._v(e._s(e.attributeJson.label))])])])},$e=[],He={name:"simplyText",inheritAttrs:!1,mixins:[k],computed:{textStyle(){let{fontStyle:{fontSize:e,color:t,fontWeight:i,textDecoration:r,lineHeight:s,fontItalic:n,letterSpacing:a,fontBackColor:o,fontFamily:l},textAlign:d}=this.attributeJson,u="mobile"==this.mode?2*this.ratio:this.ratio,c={fontSize:parseFloat(e)*u+"px",color:t,fontWeight:i?"bold":"",textDecoration:r?"underline":"",fontStyle:n?"italic":"",lineHeight:s,letterSpacing:(a||0)+"px",backgroundColor:o||"",fontFamily:l,textAlign:d};return c},tipReportData(){return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:24,popData:{},refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:1,event:"bannerShow"}}},methods:{pageClick(){if(this.attributeJson.linkObj.jumpLinkType)try{let e=JSON.parse(JSON.stringify(this.tipReportData));e.event="bannerClick";let t=C(e,this.envUrl,"click"),i=new Blob([JSON.stringify(t)],{type:"application/json"});navigator.sendBeacon(this.envUrl+"service-zuul/data/collect/acquisition",i)}catch(e){console.log(e)}this.$emit("jumpLink",this.attributeJson.linkObj)}}},ze=He,Ve=ze,Ge=(i("2e43"),P(Ve,qe,$e,!1,null,"1d184ad9",null)),We=Ge.exports,Xe=We,Ye={name:"singleLayout",inheritAttrs:!1,components:{textItem:M,imgNav:Q,videoItem:me,swiperItem:Ee,buttonItem:Le,productItem:Fe,simplyText:Xe},props:{layOutData:{type:Object,default:()=>{}},ratio:{type:Number,default:1},canDragInc:{type:Boolean,default:!0}},data(){return{vLine:[],hLine:[],componentName:""}},computed:{layoutStyle:function(){return this.layOutData.layoutStyle?{backgroundImage:2===this.layOutData.layoutStyle.bgStyle.type&&0!=this.layOutData.layoutStyle.bgStyle.picList.length&&`url(${this.layOutData.layoutStyle.bgStyle.picList[0].resourcePath})`,backgroundColor:1===this.layOutData.layoutStyle.bgStyle.type&&this.layOutData.layoutStyle.bgStyle.backgroundColor}:{}}},methods:{getCustom(){let e=this.layOutData.componentList.filter(e=>e.type>100);return e}}},Ke=Ye,Je=Ke,Qe=(i("6013"),P(Je,o,l,!1,null,"916fe080",null)),Ze=Qe.exports,et=Ze,tt=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{key:e.layOutData.layoutStyle.height,staticClass:"multiple-layout",style:{height:Math.round(e.layOutData.layoutStyle.height*e.ratio)+"px"}},[e._l(e.layOutData.list,(function(t,r){return[i("div",{key:r,staticClass:"multiple-item",style:{width:Math.round(t.baseStyle.w*e.ratio)+"px",height:Math.round(e.layOutData.layoutStyle.height*e.ratio)+"px",zIndex:e.currentIndex==r?1:"auto"}},[i("singleLayout",e._g(e._b({ref:"multipleSingle",refInFor:!0,attrs:{layOutData:t,componentList:t.componentList,"parent-l":t.baseStyle.l,ratio:e.ratio,recordId:e.recordId,mode:e.mode}},"singleLayout",e.$attrs,!1),e.$listeners))],1)]}))],2)},it=[],rt={name:"multipleLayout",components:{singleLayout:et},props:{layOutData:{type:Object,default:()=>{}},ratio:{type:Number,default:1},mode:{type:String,default:"pc"},recordId:{type:Number,default:0}},inheritAttrs:!1,data(){return{w:200,currentItem:null,currentIndex:""}},watch:{},mounted(){},methods:{}},st=rt,nt=st,at=(i("8b28"),P(nt,tt,it,!1,null,"62f273ef",null)),ot=at.exports,lt=ot,dt=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData,envUrl:e.envUrl,isClient:e.isClient},expression:"{data:tipReportData, envUrl, isClient}"}],ref:"custom"+e.layOutData.sort,staticClass:"custom-layout"},[i("div",{staticClass:"add-con"}),e._t("customComponent",null,{attributeJson:e.layOutData})],2)},ut=[],ct={name:"customLayout",props:{layOutData:{type:Object,default:()=>{}},envUrl:{type:String,default:""},path:{type:String},isClient:{type:Boolean,default:!0}},inheritAttrs:!1,computed:{tipReportData(){return{uniqueId:this.layOutData.sort,uniqueName:this.uniqueName,componentType:7,popData:{},refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:1}}},methods:{},directives:{treport:E}},ht=ct,pt=ht,ft=(i("3de5"),P(pt,dt,ut,!1,null,"2e732634",null)),mt=ft.exports,gt=mt,yt=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"tab-layout"},[e.hasTab?i("div",{staticClass:"tab-detail tab-con"},[i("div",[2==e.tabHeadInfo.showTitle?i("div",{ref:"tabHeadTitleDom",style:e.titleStyle},[i("span",[e._v(e._s(1==e.tabHeadInfo.customTitle?e.tabHeadInfo.title:e.list[e.tabIndex].title))])]):e._e(),i("div",{staticClass:"tab-list"},[i("div",{staticClass:"tab-line"},e._l(e.list,(function(t,r){return i("navItem",{key:r,attrs:{id:[e.recordId+"_"+e.sort+"_"+Number(r+1),"nav-item"],name:[e.recordId+"_"+e.sort+"_"+Number(r+1),"nav-item"],item:t,ratio:e.ratio,mode:e.mode,spacing:e.layOutData.fontStyle.spacing*e.ratio,active:e.tabIndex==r,navStyle:e.navStyle(r),"data-sensors-click":"","data-sensorsClick":"true"},nativeOn:{click:function(i){return e.chooseTab(t,r)}}})})),1)]),i("div",{staticClass:"tab-content",style:{height:e.list[e.tabIndex].height*e.ratio+"px",transform:"translateX("+100*-e.tabIndex+"%)"}},e._l(e.list,(function(t,r){return i("div",{key:r,staticClass:"tab-single"},[i("singleLayout",e._g(e._b({ref:"tabSingle"+r,refInFor:!0,attrs:{layOutData:t,componentList:t.componentList,ratio:e.ratio,recordId:e.recordId,mode:e.mode}},"singleLayout",e.$attrs,!1),e.$listeners))],1)})),0)])]):e._e()])},vt=[],bt=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"nav-item",style:[e.navStyle,e.backStyle]},[i("span",{style:{marginLeft:e.spacing+"px"}},[e._v(e._s(e.item.title))])])},_t=[],Tt={name:"navItem",props:{item:{type:Object,default:()=>{}},active:{type:Boolean,default:!1},navStyle:{type:Object,default:()=>{}},spacing:{type:[String,Number],default:0}},data(){return{}},watch:{},computed:{backStyle(){let{item:e,active:t}=this;return{backgroundColor:1==e.navStyle.type?t?e.navStyle.activeColor:e.navStyle.backgroundColor:"",backgroundImage:2==e.navStyle.type?t?`url('${e.navStyle.activeBackImage}')`:`url('${e.navStyle.backImage}')`:""}}},methods:{}},St=Tt,wt=St,Et=(i("ae5c"),P(wt,bt,_t,!1,null,"45583ab2",null)),Ct=Et.exports,xt=Ct,kt={name:"tabLayout",components:{navItem:xt,singleLayout:et},props:{sort:{type:Number,default:0},layOutData:{type:Object,default:()=>{}},ratio:{type:Number,default:1},mode:{type:String,default:"pc"},recordId:{type:Number,default:0}},data(){return{tabIndex:0,activeSort:"",tabHeadTitleH:0}},computed:{hasTab(){return this.layOutData.list.some(e=>e.title)},list(){return this.layOutData.list},tabHeadInfo(){return this.layOutData.tabHeadInfo},navStyle(){let{tabHeadInfo:{width:e,height:t},borderStyle:i,fontStyle:{fontSize:r,color:s,fontWeight:n,textDecoration:a,fontItalic:o,hoverObj:{color:l}}}=this.layOutData,{borderTop:d,borderRight:u,borderBottom:c,borderLeft:h,borderColor:p,hoverObj:f}=i;return function(){return{width:e*this.ratio+"px",height:t*this.ratio+"px",color:s,fontSize:r,fontWeight:n?"bold":"",textDecoration:a?"underline":"",fontStyle:o?"italic":"",borderTop:2===i.type&&d?"1px solid "+d:1===i.type&&p?"1px solid "+p:"none",borderRight:2===i.type&&u?"1px solid "+u:1===i.type&&p?"1px solid "+p:"none",borderBottom:2===i.type&&c?"1px solid "+c:1===i.type&&p?"1px solid "+p:"none",borderLeft:2===i.type&&h?"1px solid "+h:1===i.type&&p?"1px solid "+p:"none","--hoverColor":l,"--hoverBorderTop":2===f.type&&f.borderTop?"1px solid "+f.borderTop:1===f.type&&f.borderColor?"1px solid "+f.borderColor:"none","--hoverBorderRight":2===f.type&&f.borderRight?"1px solid "+f.borderRight:1===f.type&&f.borderColor?"1px solid "+f.borderColor:"none","--hoverBorderBottom":2===f.type&&f.borderBottom?"1px solid "+f.borderBottom:1===f.type&&f.borderColor?"1px solid "+f.borderColor:"none","--hoverBorderLeft":2===f.type&&f.borderLeft?"1px solid "+f.borderLeft:1===f.type&&f.borderColor?"1px solid "+f.borderColor:"none"}}},titleStyle(){let{tabHeadInfo:{titleStyle:{fontSize:e,color:t,fontWeight:i,textDecoration:r,fontItalic:s}}}=this.layOutData;return{color:t,fontSize:e,fontWeight:i?"bold":"",textDecoration:r?"underline":"",fontStyle:s?"italic":"",paddingLeft:("pc"==this.mode?30:60)*this.ratio+"px",paddingBottom:("pc"==this.mode?40:80)*this.ratio+"px"}}},watch:{"layOutData.tabHeadInfo":{handler:function(){this.$nextTick(()=>{this.tabHeadTitleH=2==this.layOutData.tabHeadInfo.showTitle&&this.$refs["tabHeadTitleDom"]?this.$refs["tabHeadTitleDom"].clientHeight:0,this.setLayoutH()})},immediate:!0,deep:!0},"list.length":{handler:function(){let e=this.list.findIndex(e=>e.sort==this.activeSort);e>-1?this.tabIndex=e:(this.tabIndex=this.tabIndex>0?this.tabIndex-1:0,this.activeSort=this.list[this.tabIndex].sort)},deep:!0},hasTab:{handler:function(e){e&&(this.activeSort=this.list[0].sort,this.tabIndex=0)}}},methods:{chooseTab(e,t){this.activeSort=e.sort,this.tabIndex=t,this.setLayoutH(),this.$emit("updateLayOut",{sort:this.layOutData.sort})},setLayoutH:function(){this.$set(this.layOutData.layoutStyle,"height",1*this.layOutData.list[this.tabIndex].height+1*this.layOutData.tabHeadInfo.height+1*this.tabHeadTitleH/this.ratio)}}},It=kt,At=It,Ot=(i("266b"),P(At,yt,vt,!1,null,"6ab7fd00",null)),Pt=Ot.exports,Lt=Pt,Dt=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"slide-wrap",style:{"--hoverColor":e.paginationStyle.hoverColor||e.paginationStyle.color,"--activeColor":e.paginationStyle.activeColor,"--color":e.paginationStyle.color}},[i("div",{key:e.indicatorType,class:["swiper-container swiper-container-"+e.recordId+" swiper-container-"+e.indicatorType],attrs:{id:"mySwiper-"+e.recordId}},[i("div",{staticClass:"swiper-wrapper"},e._l(e.slideList,(function(t,r){return i("div",{key:r,class:["swiper-slide",{"slide-auto":1==e.widthStyle.type||e.centeredSlides}],style:[e.backStyle(t.i),{width:1==e.widthStyle.type?t.slideWidth*e.ratio+"px":e.backStyle(t.i).width}]},[i("singleLayout",e._g(e._b({ref:t.isCopy?"":"slideSingle",refInFor:!0,attrs:{layOutData:t,ratio:e.ratio,recordId:e.recordId,mode:e.mode}},"singleLayout",e.$attrs,!1),e.$listeners))],1)})),0),e.hasSwiperButton?i("div",{class:["swiper-button-prev","swiper-button-prev-"+e.recordId]},[e._t("swiper-button-prev",(function(){return[i("div",{staticClass:"arrow"},[i("span",{staticClass:"cms2iconfont iconarrow-left",style:e.pageStyle})])]}))],2):e._e(),e.hasSwiperButton?i("div",{class:["swiper-button-next","swiper-button-next-"+e.recordId]},[e._t("swiper-button-next",(function(){return[i("div",{staticClass:"arrow"},[i("span",{staticClass:"cms2iconfont iconarrow-right",style:e.pageStyle})])]}))],2):e._e()])])},Mt=[],Nt={name:"slideLayout",components:{singleLayout:et},props:{layOutData:{type:Object,default:()=>{}},ratio:{type:Number,default:1},mode:{type:String,default:"pc"},recordId:{type:Number,default:0}},data(){return{swiper:"",slideIndex:0,layWidth:1920,isInit:!1,slideList:[]}},watch:{layoutStyle:{handler(e){this.layWidth=("pc"==this.mode?1920:750)*(e.widthStyle.width/100)},deep:!0,immediate:!0},slideLen:{handler(){this.calculateWidth()},immediate:!0}},computed:{layoutStyle(){return this.layOutData.layoutStyle},paginationStyle(){return this.layOutData.paginationStyle},bgStyle(){return this.layOutData.bgStyle},list(){return this.layOutData.list},styleType(){return this.layOutData.styleType},indicatorType(){return this.layOutData.indicatorType},widthStyle(){return this.layOutData.widthStyle},hasSwiperButton(){return 2==this.indicatorType},pageStyle(){return{color:this.layOutData.paginationStyle.color}},backStyle(){let{bgStyle:e,layoutStyle:t,styleType:i,mode:r}=this;return function(s){let n=this.list[s],a="",o="";1==e.status?1==e.type?a=e.backgroundColor||"":o=0!=e.picList.length?`url(${e.picList[0].resourcePath})`:"":1==n.bgStyle.type?a=n.bgStyle.backgroundColor||"":o=0!=n.bgStyle.picList.length?`url(${n.bgStyle.picList[0].resourcePath})`:"";let l="mobile"==r||"pc"==r&&2==i,d=l?this.layWidth-0*(this.layOutData.lineSlideNum+1)-("mobile"==r?20:556):this.layWidth;return{width:d/this.layOutData.lineSlideNum*this.ratio+"px",height:Math.ceil(t.height*this.ratio)+"px",backgroundColor:a,backgroundImage:o}}},slideLen(){return this.layOutData.list.length},centeredSlides(){return"mobile"==this.mode||"pc"==this.mode&&2==this.styleType}},methods:{calculateWidth:function(){let{list:e}=this;e.forEach((e,t)=>{e.i=t});let t=JSON.parse(JSON.stringify(e));t.forEach(e=>{e.isCopy=!0}),this.slideList=e.concat(JSON.parse(JSON.stringify(t))),this.slideList=t.concat(this.slideList),this.$nextTick(()=>{if(2==this.layOutData.widthStyle.type)return void this.initSwiper();let{layWidth:e}=this;this.slideList.forEach(t=>{let i=t.componentList[0],r=0;if(i){let t=i.attributeJson;if(2==i.type){let i=t.list.some(e=>0!=e.picList.length);r=i?t.baseStyle.w+t.baseStyle.l:e}else if(3==i.type){let i=0!=t.videoInfo.list.length;r=i?t.baseStyle.w+t.baseStyle.l:e}else r=t.baseStyle.w+t.baseStyle.l}else r=e;this.$set(t,"slideWidth",r)}),this.$nextTick(()=>{this.initSwiper()})})},initSwiper(){this.$nextTick(()=>{this.swiper&&(this.swiper.destroy(!0,!0),this.swiper=null);let{layOutData:e,widthStyle:t,ratio:i,slideLen:r}=this;this.options={effect:"slide",observer:!0,observeParents:!0,slidesPerView:this.centeredSlides||1==t.type?"auto":e.lineSlideNum,preventInteractionOnTransition:!0,slidesPerGroup:1,slidesPerGroupAuto:!0,centeredSlides:this.centeredSlides||1==t.type,spaceBetween:this.centeredSlides?0*i:0,autoplay:!!(e.autoPlay&&this.list.length>1)&&{delay:1e3*e.interval,disableOnInteraction:!1,stopOnLastSlide:!1}},1==t.type&&(this.options.loopedSlides=4,this.options.loopAdditionalSlides=2);let s=this;this.options.on={slideNextTransitionEnd:function(){this.activeIndex==2*r&&this.slideTo(r,0),s.slideIndex=this.activeIndex},slidePrevTransitionEnd:function(){this.activeIndex==r-1&&this.slideTo(2*r-1,0)}},this.hasSwiperButton&&(this.options.navigation={nextEl:".swiper-button-next-"+this.recordId,prevEl:".swiper-button-prev-"+this.recordId}),this.swiper=new B.a(".swiper-container-"+this.recordId,this.options),this.swiper.slideTo(r,0)})}}},Rt=Nt,Ut=Rt,Bt=(i("1cfd"),P(Ut,Dt,Mt,!1,null,"407dcfa9",null)),jt=Bt.exports,Ft=jt,qt={name:"cms",inheritAttrs:!1,components:{singleLayout:et,multipleLayout:lt,customLayout:gt,tabLayout:Lt,slideLayout:Ft},props:{cmsList:{type:Array,default:()=>[]},canDrag:{type:Boolean,default:!0},mode:{type:String,default:"pc"},ratio:{type:Number,default:1},envUrl:{type:String,default:""},path:{type:String},isClient:{type:Boolean,default:!0}},data(){return{chooseSort:"",activeIndex:-1,layOutObj:{1:"singleLayout",2:"multipleLayout",3:"customLayout",4:"tabLayout",5:"slideLayout"}}},computed:{},mounted(){},methods:{chooseLayout(e,t){this.chooseSort=t,this.$emit("updateLayOut",{layoutType:e,sort:t})},updateSort(e){this.chooseSort=e},deleteModule(e,t){t===this.chooseSort?this.$emit("deleteModule",e):(this.cmsList.splice(e,1),this.$emit("saveVersionId"))},showOrHide(e){let t=this.cmsList[e];this.$set(t,"displayType",t.displayType?0:1),this.$emit("componentChange",t.sort)}}},$t=qt,Ht=$t,zt=(i("4664"),P(Ht,n,a,!1,null,"443f8186",null)),Vt=zt.exports;const Gt=[Vt],Wt=function(e){Wt.installed||Gt.map(t=>e.component(t.name,t))};var Xt={install:Wt};t["default"]=Xt},fc6a:function(e,t,i){"use strict";var r=i("44ad"),s=i("1d80");e.exports=function(e){return r(s(e))}},fda2:function(e,t,i){},fdbf:function(e,t,i){"use strict";var r=i("04f8");e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},fdcb:function(e,t,i){},fe0f:function(e,t,i){},fe1c:function(e,t,i){}});
30
+ /*! @name aes-decrypter @version 4.0.1 @license Apache-2.0 */const r=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],r=t[4],s=i[4];let n,a,o;const l=[],d=[];let u,c,h,p,f,m;for(n=0;n<256;n++)d[(l[n]=n<<1^283*(n>>7))^n]=n;for(a=o=0;!r[a];a^=u||1,o=d[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,r[a]=p,s[p]=a,h=l[c=l[u=l[a]]],m=16843009*h^65537*c^257*u^16843008*a,f=257*l[p]^16843008*p,n=0;n<4;n++)t[n][a]=f=f<<24^f>>>8,i[n][p]=m=m<<24^m>>>8;for(n=0;n<5;n++)t[n]=t[n].slice(0),i[n]=i[n].slice(0);return e};let s=null;class n{constructor(e){let t,i,n;s||(s=r()),this._tables=[[s[0][0].slice(),s[0][1].slice(),s[0][2].slice(),s[0][3].slice(),s[0][4].slice()],[s[1][0].slice(),s[1][1].slice(),s[1][2].slice(),s[1][3].slice(),s[1][4].slice()]];const a=this._tables[0][4],o=this._tables[1],l=e.length;let d=1;if(4!==l&&6!==l&&8!==l)throw new Error("Invalid aes key size");const u=e.slice(0),c=[];for(this._key=[u,c],t=l;t<4*l+28;t++)n=u[t-1],(t%l===0||8===l&&t%l===4)&&(n=a[n>>>24]<<24^a[n>>16&255]<<16^a[n>>8&255]<<8^a[255&n],t%l===0&&(n=n<<8^n>>>24^d<<24,d=d<<1^283*(d>>7))),u[t]=u[t-l]^n;for(i=0;t;i++,t--)n=u[3&i?t:t-4],c[i]=t<=4||i<4?n:o[0][a[n>>>24]]^o[1][a[n>>16&255]]^o[2][a[n>>8&255]]^o[3][a[255&n]]}decrypt(e,t,i,r,s,n){const a=this._key[1];let o,l,d,u=e^a[0],c=r^a[1],h=i^a[2],p=t^a[3];const f=a.length/4-2;let m,g=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(m=0;m<f;m++)o=v[u>>>24]^b[c>>16&255]^_[h>>8&255]^T[255&p]^a[g],l=v[c>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&u]^a[g+1],d=v[h>>>24]^b[p>>16&255]^_[u>>8&255]^T[255&c]^a[g+2],p=v[p>>>24]^b[u>>16&255]^_[c>>8&255]^T[255&h]^a[g+3],g+=4,u=o,c=l,h=d;for(m=0;m<4;m++)s[(3&-m)+n]=S[u>>>24]<<24^S[c>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[g++],o=u,u=c,c=h,h=p,p=o}}class a extends t{constructor(){super(t),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const o=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},l=function(e,t,i){const r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),s=new n(Array.prototype.slice.call(t)),a=new Uint8Array(e.byteLength),l=new Int32Array(a.buffer);let d,u,c,h,p,f,m,g,y;for(d=i[0],u=i[1],c=i[2],h=i[3],y=0;y<r.length;y+=4)p=o(r[y]),f=o(r[y+1]),m=o(r[y+2]),g=o(r[y+3]),s.decrypt(p,f,m,g,l,y),l[y]=o(l[y]^d),l[y+1]=o(l[y+1]^u),l[y+2]=o(l[y+2]^c),l[y+3]=o(l[y+3]^h),d=p,u=f,c=m,h=g;return a};class d{constructor(e,t,r,s){const n=d.STEP,l=new Int32Array(e.buffer),u=new Uint8Array(e.byteLength);let c=0;for(this.asyncStream_=new a,this.asyncStream_.push(this.decryptChunk_(l.subarray(c,c+n),t,r,u)),c=n;c<l.length;c+=n)r=new Uint32Array([o(l[c-4]),o(l[c-3]),o(l[c-2]),o(l[c-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(c,c+n),t,r,u));this.asyncStream_.push((function(){s(null,i(u))}))}static get STEP(){return 32e3}decryptChunk_(e,t,i,r){return function(){const s=l(e,t,i);r.set(s,e.byteOffset)}}}var u,c="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{};u="undefined"!==typeof window?window:"undefined"!==typeof c?c:"undefined"!==typeof self?self:{};var h=u,p=function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},f=h.BigInt||Number;f("0x1"),f("0x100"),f("0x10000"),f("0x1000000"),f("0x100000000"),f("0x10000000000"),f("0x1000000000000"),f("0x100000000000000"),f("0x10000000000000000"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const m=function(e){const t={};return Object.keys(e).forEach(i=>{const r=e[i];p(r)?t[i]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:t[i]=r}),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),r=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),s=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new d(i,r,s,(function(e,i){self.postMessage(m({source:t.source,decrypted:i}),[i.buffer])}))}})));var fd=bo(pd);const md=e=>{let t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},gd=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},yd=(e,t)=>{t.activePlaylistLoader=e,e.load()},vd=(e,t)=>()=>{const{segmentLoaders:{[e]:i,main:r},mediaTypes:{[e]:s}}=t,n=s.activeTrack(),a=s.getActiveGroup(),o=s.activePlaylistLoader,l=s.lastGroup_;a&&l&&a.id===l.id||(s.lastGroup_=a,s.lastTrack_=n,gd(i,s),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),yd(a.playlistLoader,s)):o&&r.resetEverything()))},bd=(e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:r}}=t;r.lastGroup_=null,i.abort(),i.pause()},_d=(e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:r,main:s},mediaTypes:{[e]:n}}=t,a=n.activeTrack(),o=n.getActiveGroup(),l=n.activePlaylistLoader,d=n.lastTrack_;if((!d||!a||d.id!==a.id)&&(n.lastGroup_=o,n.lastTrack_=a,gd(r,n),o)){if(o.isMainPlaylist){if(!a||!d||a.id===d.id)return;const e=t.vhs.playlistController_,r=e.selectPlaylist();if(e.media()===r)return;return n.logger_(`track change. Switching main audio from ${d.id} to ${a.id}`),i.pause(),s.resetEverything(),void e.fastQualityChange_(r)}if("AUDIO"===e){if(!o.playlistLoader)return s.setAudio(!0),void s.resetEverything();r.setAudio(!0),s.setAudio(!1)}l!==o.playlistLoader?(r.track&&r.track(a),r.resetEverything(),yd(o.playlistLoader,n)):yd(o.playlistLoader,n)}},Td={AUDIO:(e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:r},excludePlaylist:s}=t;gd(i,r);const n=r.activeTrack(),a=r.activeGroup(),o=(a.filter(e=>e.default)[0]||a[0]).id,l=r.tracks[o];if(n!==l){bn.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const e in r.tracks)r.tracks[e].enabled=r.tracks[e]===l;r.onTrackChanged()}else s({error:{message:"Problem encountered loading the default audio track."}})},SUBTITLES:(e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:r}}=t;bn.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),gd(i,r);const s=r.activeTrack();s&&(s.mode="disabled"),r.onTrackChanged()}},Sd={AUDIO:(e,t,i)=>{if(!t)return;const{tech:r,requestOptions:s,segmentLoaders:{[e]:n}}=i;t.on("loadedmetadata",()=>{const e=t.media();n.playlist(e,s),(!r.paused()||e.endList&&"none"!==r.preload())&&n.load()}),t.on("loadedplaylist",()=>{n.playlist(t.media(),s),r.paused()||n.load()}),t.on("error",Td[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:r,requestOptions:s,segmentLoaders:{[e]:n},mediaTypes:{[e]:a}}=i;t.on("loadedmetadata",()=>{const e=t.media();n.playlist(e,s),n.track(a.activeTrack()),(!r.paused()||e.endList&&"none"!==r.preload())&&n.load()}),t.on("loadedplaylist",()=>{n.playlist(t.media(),s),r.paused()||n.load()}),t.on("error",Td[e](e,i))}},wd={AUDIO:(e,t)=>{const{vhs:i,sourceType:r,segmentLoaders:{[e]:s},requestOptions:n,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:d}},mainPlaylistLoader:u}=t,c=pa(u.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},c&&(a[e].main.default.playlists=u.main.playlists));for(const h in a[e]){o[h]||(o[h]=[]);for(const s in a[e][h]){let p,f=a[e][h][s];if(c?(d(`AUDIO group '${h}' label '${s}' is a main playlist`),f.isMainPlaylist=!0,p=null):p="vhs-json"===r&&f.playlists?new Da(f.playlists[0],i,n):f.resolvedUri?new Da(f.resolvedUri,i,n):f.playlists&&"dash"===r?new fo(f.playlists[0],i,n,u):null,f=An({id:s,playlistLoader:p},f),Sd[e](e,f.playlistLoader,t),o[h].push(f),"undefined"===typeof l[s]){const e=new bn.AudioTrack({id:s,kind:md(f),enabled:!1,language:f.language,default:f.default,label:s});l[s]=e}}}s.on("error",Td[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:r,sourceType:s,segmentLoaders:{[e]:n},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:d}},mainPlaylistLoader:u}=t;for(const c in o[e]){l[c]||(l[c]=[]);for(const n in o[e][c]){if(o[e][c][n].forced)continue;let h,p=o[e][c][n];if("hls"===s)h=new Da(p.resolvedUri,r,a);else if("dash"===s){const e=p.playlists.filter(e=>e.excludeUntil!==1/0);if(!e.length)return;h=new fo(p.playlists[0],r,a,u)}else"vhs-json"===s&&(h=new Da(p.playlists?p.playlists[0]:p.resolvedUri,r,a));if(p=An({id:n,playlistLoader:h},p),Sd[e](e,p.playlistLoader,t),l[c].push(p),"undefined"===typeof d[n]){const e=i.addRemoteTextTrack({id:n,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:n},!1).track;d[n]=e}}}n.on("error",Td[e](e,t))},"CLOSED-CAPTIONS":(e,t)=>{const{tech:i,main:{mediaGroups:r},mediaTypes:{[e]:{groups:s,tracks:n}}}=t;for(const a in r[e]){s[a]||(s[a]=[]);for(const t in r[e][a]){const o=r[e][a][t];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let d={label:t,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[d.instreamId]&&(d=An(d,l[d.instreamId])),void 0===d.default&&delete d.default,s[a].push(An({id:t},o)),"undefined"===typeof n[t]){const e=i.addRemoteTextTrack({id:d.instreamId,kind:"captions",default:d.default,language:d.language,label:d.label},!1).track;n[t]=e}}}}},Ed=(e,t)=>{for(let i=0;i<e.length;i++){if(ca(t,e[i]))return!0;if(e[i].playlists&&Ed(e[i].playlists,t))return!0}return!1},Cd=(e,t)=>i=>{const{mainPlaylistLoader:r,mediaTypes:{[e]:{groups:s}}}=t,n=r.media();if(!n)return null;let a=null;n.attributes[e]&&(a=s[n.attributes[e]]);const o=Object.keys(s);if(!a)if("AUDIO"===e&&o.length>1&&pa(t.main))for(let e=0;e<o.length;e++){const t=s[o[e]];if(Ed(t,n)){a=t;break}}else s.main?a=s.main:1===o.length&&(a=s[o[0]]);return"undefined"===typeof i?a:null!==i&&a&&a.filter(e=>e.id===i.id)[0]||null},xd={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if("showing"===i[e].mode||"hidden"===i[e].mode)return i[e];return null}},kd=(e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null},Id=e=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(t=>{wd[t](t,e)});const{mediaTypes:t,mainPlaylistLoader:i,tech:r,vhs:s,segmentLoaders:{["AUDIO"]:n,main:a}}=e;["AUDIO","SUBTITLES"].forEach(i=>{t[i].activeGroup=Cd(i,e),t[i].activeTrack=xd[i](i,e),t[i].onGroupChanged=vd(i,e),t[i].onGroupChanging=bd(i,e),t[i].onTrackChanged=_d(i,e),t[i].getActiveGroup=kd(i,e)});const o=t.AUDIO.activeGroup();if(o){const e=(o.filter(e=>e.default)[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();const i=t.AUDIO.getActiveGroup();i.playlistLoader?(a.setAudio(!1),n.setAudio(!0)):a.setAudio(!0)}i.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(e=>t[e].onGroupChanged())}),i.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(e=>t[e].onGroupChanging())});const l=()=>{t.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"vhs-audio-change"})};r.audioTracks().addEventListener("change",l),r.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),s.on("dispose",()=>{r.audioTracks().removeEventListener("change",l),r.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)}),r.clearTracks("audio");for(const d in t.AUDIO.tracks)r.audioTracks().addTrack(t.AUDIO.tracks[d])},Ad=()=>{const e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Gl,activeTrack:Gl,getActiveGroup:Gl,onGroupChanged:Gl,onTrackChanged:Gl,lastTrack_:null,logger_:In(`MediaGroups[${t}]`)}}),e},Pd=120;let Od;const Ld=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],Dd=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},Md=function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:r,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:a,bufferBasedABR:o,log:l}){if(!r)return bn.log.warn("We received no playlist to switch to. Please check your stream."),!1;const d=`allowing switch ${e&&e.id||"null"} -> ${r.id}`;if(!e)return l(d+" as current playlist is not set"),!0;if(r.id===e.id)return!1;const u=Boolean(Mn(t,i).length);if(!e.endList)return u||"number"!==typeof e.partTargetDuration?(l(d+" as current playlist is live"),!0):(l(`not ${d} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const c=Hn(t,i),h=o?mo.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:mo.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${d} as duration < max low water line (${a} < ${h})`),!0;const p=r.attributes.BANDWIDTH,f=e.attributes.BANDWIDTH;if(p<f&&(!o||c<n)){let e=`${d} as next bandwidth < current bandwidth (${p} < ${f})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${c} < ${n})`),l(e),!0}if((!o||p>f)&&c>=s){let e=`${d} as forwardBuffer >= bufferLowWaterLine (${c} >= ${s})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${f})`),l(e),!0}return l(`not ${d} as no switching criteria met`),!1};class Nd extends bn.EventTarget{constructor(e){super();const{src:t,withCredentials:i,tech:r,bandwidth:n,externVhs:a,useCueTags:o,playlistExclusionDuration:l,enableLowInitialPlaylist:d,sourceType:u,cacheEncryptionKeys:c,bufferBasedABR:h,leastPixelDiffSelector:p,captionServices:f}=e;if(!t)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:m}=e;null!==m&&"undefined"!==typeof m||(m=1/0),Od=a,this.bufferBasedABR=Boolean(h),this.leastPixelDiffSelector=Boolean(p),this.withCredentials=i,this.tech_=r,this.vhs_=r.vhs,this.sourceType_=u,this.useCueTags_=o,this.playlistExclusionDuration=l,this.maxPlaylistRetries=m,this.enableLowInitialPlaylist=d,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:i,maxPlaylistRetries:m,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=Ad(),this.mediaSource=new s.a.MediaSource,this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.seekable_=Pn(),this.hasPlayed_=!1,this.syncController_=new cd(e),this.segmentMetadataTrack_=r.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.decrypter_=new fd,this.sourceUpdater_=new rd(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new hd;const g={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:f,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:n,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:c,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings};this.mainPlaylistLoader_="dash"===this.sourceType_?new fo(t,this.vhs_,this.requestOptions_):new Da(t,this.vhs_,this.requestOptions_),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Vl(An(g,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new Vl(An(g,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new ad(An(g,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks}),e),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),Ld.forEach(e=>{this[e+"_"]=Dd.bind(this,e)}),this.logger_=In("pc"),this.triggeredFmp4Usage=!1,"none"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const y="none"===this.tech_.preload()?"play":"loadstart";this.tech_.one(y,()=>{const e=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const r=this.media(),s=r&&(r.id||r.uri),n=e.id||e.uri;s&&s!==n&&(this.logger_(`switch media ${s} -> ${n} from ${t}`),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+t})),this.mainPlaylistLoader_.media(e,i)}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=s.a.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(s.a.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,r=Object.keys(i);let s;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)s=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||r.length&&i[r[0]];for(const t in e)if(e[t].default){s={label:t};break}}if(!s)return t;const n=[];for(const a in i)if(i[a][s.label]){const t=i[a][s.label];if(t.playlists&&t.playlists.length)n.push.apply(n,t.playlists);else if(t.uri)n.push(t);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const t=e.playlists[i];t.attributes&&t.attributes.AUDIO&&t.attributes.AUDIO===a&&n.push(t)}}return n.length?n:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;ua(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&"none"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Id({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,"initial");const i="vhs-json"===this.sourceType_&&this.initialMedia_.segments;if(!i)return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)}),this.mainPlaylistLoader_.on("error",()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;ua(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const e=this.mainPlaylistLoader_.media();if("playlist-unchanged"===e.lastExcludeReason_)return;const t=this.stuckAtPlaylistEnd_(e);t&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let r=!0;const s=Object.keys(i.AUDIO);for(const n in i.AUDIO)for(const e in i.AUDIO[n]){const t=i.AUDIO[n][e];t.uri||(r=!1)}r&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),Od.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),s.length&&Object.keys(i.AUDIO[s[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),r=this.bufferLowWaterLine(),s=this.bufferHighWaterLine(),n=this.tech_.buffered();return Md({buffered:n,currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:r,bufferHighWaterLine:s,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",e=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:Pd}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}fastQualityChange_(e=this.selectPlaylist()){e!==this.mainPlaylistLoader_.media()?(this.switchMedia_(e,"fast-quality"),this.mainSegmentLoader_.resetEverything(()=>{bn.browser.IE_VERSION||bn.browser.IS_EDGE?this.tech_.setCurrentTime(this.tech_.currentTime()+.04):this.tech_.setCurrentTime(this.tech_.currentTime())})):this.logger_("skipping fastQualityChange because new media is same as old")}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList){const e=this.seekable();if(!e.length)return!1;if(bn.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",()=>{this.trigger("firstplay"),this.tech_.setCurrentTime(e.end(0)),this.hasPlayed_=!0}),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(e.end(0))}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();"undefined"!==typeof e&&"function"===typeof e.then&&e.then(null,e=>{})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){const t=this.seekable();if(!t.length)return!1;const i=this.syncController_.getExpiredTime(e,this.duration());if(null===i)return!1;const r=Od.Playlist.playlistEnd(e,i),s=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return r-s<=Ln;const a=n.end(n.length-1);return a-s<=Ln&&r-a<=Ln}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));e.playlistErrors_++;const r=this.mainPlaylistLoader_.main.playlists,s=r.filter(na),n=1===s.length&&s[0]===e;if(1===r.length&&i!==1/0)return bn.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(n);if(n){let t=!1;r.forEach(i=>{if(i===e)return;const r=i.excludeUntil;"undefined"!==typeof r&&r!==1/0&&(t=!0,delete i.excludeUntil)}),t&&(bn.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const o=this.selectPlaylist();if(!o)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");const l=t.internal?this.logger_:bn.log.warn,d=t.message?" "+t.message:"";l(`${t.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${d} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const u=o.targetDuration/2*1e3||5e3,c="number"===typeof o.lastRequest&&Date.now()-o.lastRequest<=u;return this.switchMedia_(o,"exclude",n||c)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],r="all"===e;(r||"main"===e)&&i.push(this.mainPlaylistLoader_);const s=[];(r||"audio"===e)&&s.push("AUDIO"),(r||"subtitle"===e)&&(s.push("CLOSED-CAPTIONS"),s.push("SUBTITLES")),s.forEach(e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)}),["main","audio","subtitle"].forEach(t=>{const r=this[t+"SegmentLoader_"];!r||e!==t&&"all"!==e||i.push(r)}),i.forEach(e=>t.forEach(t=>{"function"===typeof e[t]&&e[t]()}))}setCurrentTime(e){const t=Mn(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.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}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Od.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}onSyncInfoUpdate_(){let e;if(!this.mainPlaylistLoader_)return;let t=this.mainPlaylistLoader_.media();if(!t)return;let i=this.syncController_.getExpiredTime(t,this.duration());if(null===i)return;const r=this.mainPlaylistLoader_.main,s=Od.Playlist.seekable(t,i,Od.Playlist.liveEdgeDelay(r,t));if(0===s.length)return;if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),i=this.syncController_.getExpiredTime(t,this.duration()),null===i)return;if(e=Od.Playlist.seekable(t,i,Od.Playlist.liveEdgeDelay(r,t)),0===e.length)return}let n,a;this.seekable_&&this.seekable_.length&&(n=this.seekable_.end(0),a=this.seekable_.start(0)),e?e.start(0)>s.end(0)||s.start(0)>e.end(0)?this.seekable_=s:this.seekable_=Pn([[e.start(0)>s.start(0)?e.start(0):s.start(0),e.end(0)<s.end(0)?e.end(0):s.end(0)]]):this.seekable_=s,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===n&&this.seekable_.start(0)===a||(this.logger_(`seekable updated [${Bn(this.seekable_)}]`),this.tech_.trigger("seekablechanged"))}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Od.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(e=>{const t=this.mediaTypes_[e].groups;for(const i in t)t[i].forEach(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()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}};e.video=e.main;const t=al(this.main(),this.media()),i={},r=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(i.video=t.video||e.main.videoCodec||b["b"]),e.main.isMuxed&&(i.video+=","+(t.audio||e.main.audioCodec||b["a"])),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||r)&&(i.audio=t.audio||e.main.audioCodec||e.audio.audioCodec||b["a"],e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!i.audio&&!i.video)return void this.excludePlaylist({playlistToExclude:this.media(),error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});const s=(e,t)=>e?Object(b["c"])(t):Object(b["g"])(t),n={};let a;if(["video","audio"].forEach((function(t){if(i.hasOwnProperty(t)&&!s(e[t].isFmp4,i[t])){const r=e[t].isFmp4?"browser":"muxer";n[r]=n[r]||[],n[r].push(i[t]),"audio"===t&&(a=r)}})),r&&a&&this.media().attributes.AUDIO){const e=this.media().attributes.AUDIO;this.main().playlists.forEach(t=>{const i=t.attributes&&t.attributes.AUDIO;i===e&&t!==this.media()&&(t.excludeUntil=1/0)}),this.logger_(`excluding audio group ${e} as ${a} does not support codec(s): "${i.audio}"`)}if(!Object.keys(n).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if(["video","audio"].forEach(t=>{const r=(Object(b["h"])(this.sourceUpdater_.codecs[t]||"")[0]||{}).type,s=(Object(b["h"])(i[t]||"")[0]||{}).type;r&&s&&r.toLowerCase()!==s.toLowerCase()&&e.push(`"${this.sourceUpdater_.codecs[t]}" -> "${i[t]}"`)}),e.length)return void this.excludePlaylist({playlistToExclude:this.media(),error:{message:`Codec switching not supported: ${e.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0})}return i}{const e=Object.keys(n).reduce((e,t)=>(e&&(e+=", "),e+=`${t} does not support codec(s): "${n[t].join(",")}"`,e),"")+".";this.excludePlaylist({playlistToExclude:this.media(),error:{internal:!0,message:e},playlistExclusionDuration:1/0})}}tryToCreateSourceBuffers_(){if("open"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach(i=>{const r=e[i];if(-1!==t.indexOf(r.id))return;t.push(r.id);const s=al(this.main,r),n=[];!s.audio||Object(b["g"])(s.audio)||Object(b["c"])(s.audio)||n.push("audio codec "+s.audio),!s.video||Object(b["g"])(s.video)||Object(b["c"])(s.video)||n.push("video codec "+s.video),s.text&&"stpp.ttml.im1t"===s.text&&n.push("text codec "+s.text),n.length&&(r.excludeUntil=1/0,this.logger_(`excluding ${r.id} for unsupported: ${n.join(", ")}`))})}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,r=sl(Object(b["h"])(e)),s=nl(r),n=r.video&&Object(b["h"])(r.video)[0]||null,a=r.audio&&Object(b["h"])(r.audio)[0]||null;Object.keys(i).forEach(e=>{const r=i[e];if(-1!==t.indexOf(r.id)||r.excludeUntil===1/0)return;t.push(r.id);const o=[],l=al(this.mainPlaylistLoader_.main,r),d=nl(l);if(l.audio||l.video){if(d!==s&&o.push(`codec count "${d}" !== "${s}"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&Object(b["h"])(l.video)[0]||null,t=l.audio&&Object(b["h"])(l.audio)[0]||null;e&&n&&e.type.toLowerCase()!==n.type.toLowerCase()&&o.push(`video codec "${e.type}" !== "${n.type}"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec "${t.type}" !== "${a.type}"`)}o.length&&(r.excludeUntil=1/0,this.logger_(`excluding ${r.id}: ${o.join(" && ")}`))}})}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),ld(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=mo.GOAL_BUFFER_LENGTH,i=mo.GOAL_BUFFER_LENGTH_RATE,r=Math.max(t,mo.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,r)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=mo.BUFFER_LOW_WATER_LINE,i=mo.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(t,mo.MAX_BUFFER_LOW_WATER_LINE),s=Math.max(t,mo.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?s:r)}bufferHighWaterLine(){return mo.BUFFER_HIGH_WATER_LINE}}const Rd=(e,t,i)=>r=>{const s=e.main.playlists[t],n=sa(s),a=na(s);return"undefined"===typeof r?a:(r?delete s.disabled:s.disabled=!0,r===a||n||(i(),r?e.trigger("renditionenabled"):e.trigger("renditiondisabled")),r)};class Ud{constructor(e,t,i){const{playlistController_:r}=e,s=r.fastQualityChange_.bind(r);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]}this.codecs=al(r.main(),t),this.playlist=t,this.id=i,this.enabled=Rd(e.playlists,t.id,s)}}const Bd=function(e){e.representations=()=>{const t=e.playlistController_.main(),i=pa(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter(e=>!sa(e)).map((t,i)=>new Ud(e,t,t.id)):[]}},jd=["seeking","seeked","pause","playing","error"];class Fd{constructor(e){this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=In("PlaybackWatcher"),this.logger_("initialize");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),r=()=>this.techWaiting_(),n=()=>this.resetTimeUpdate_(),a=this.playlistController_,o=["main","subtitle","audio"],l={};o.forEach(e=>{l[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},a[e+"SegmentLoader_"].on("appendsdone",l[e].updateend),a[e+"SegmentLoader_"].on("playlistupdate",l[e].reset),this.tech_.on(["seeked","seeking"],l[e].reset)});const d=e=>{["main","audio"].forEach(t=>{a[t+"SegmentLoader_"][e]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),d("off"))},this.clearSeekingAppendCheck_=()=>d("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),d("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",r),this.tech_.on(jd,n),this.tech_.on("canplay",i),this.tech_.one("play",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",r),this.tech_.off(jd,n),this.tech_.off("canplay",i),this.tech_.off("play",t),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),o.forEach(e=>{a[e+"SegmentLoader_"].off("appendsdone",l[e].updateend),a[e+"SegmentLoader_"].off("playlistupdate",l[e].reset),this.tech_.off(["seeked","seeking"],l[e].reset)}),this.checkCurrentTimeTimeout_&&s.a.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&s.a.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=s.a.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[e+"SegmentLoader_"];this[e+"StalledDownloads_"]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[e+"StalledDownloads_"]=0,this[e+"Buffered_"]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[e+"SegmentLoader_"],r=i.buffered_(),s=qn(this[e+"Buffered_"],r);this[e+"Buffered_"]=r,s?this.resetSegmentDownloads_(e):(this[e+"StalledDownloads_"]++,this.logger_(`found #${this[e+"StalledDownloads_"]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:Fn(r)}),this[e+"StalledDownloads_"]<10||(this.logger_(e+" loader stalled download exclusion"),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:`vhs-${e}-download-exclusion`}),"subtitle"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0})))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+Ln>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){const e=this.tech_.seeking();if(!e)return!1;const t=this.seekable(),i=this.tech_.currentTime(),r=this.afterSeekableWindow_(t,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let s;if(r){const e=t.end(t.length-1);s=e}if(this.beforeSeekableWindow_(t,i)){const e=t.start(0);s=e+(e===t.end(0)?0:Ln)}if("undefined"!==typeof s)return this.logger_(`Trying to seek outside of seekable at time ${i} with seekable range ${Bn(t)}. Seeking to `+s+"."),this.tech_.setCurrentTime(s),!0;const n=this.playlistController_.sourceUpdater_,a=this.tech_.buffered(),o=n.audioBuffer?n.audioBuffered():null,l=n.videoBuffer?n.videoBuffered():null,d=this.media(),u=d.partTargetDuration?d.partTargetDuration:2*(d.targetDuration-On),c=[o,l];for(let p=0;p<c.length;p++){if(!c[p])continue;const e=Hn(c[p],i);if(e<u)return!1}const h=Nn(a,i);return 0!==h.length&&(s=h.start(0)+Ln,this.logger_(`Buffered region starts (${h.start(0)}) just beyond seek point (${i}). Seeking to ${s}.`),this.tech_.setCurrentTime(s),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Mn(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) `+i),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,r=this.tech_.buffered(),s=this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t});if(s)return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const n=Nn(r,t);return n.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${n.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,r=!1){if(!e.length)return!1;let s=e.end(e.length-1)+Ln;const n=!i.endList;return n&&r&&(s=e.end(e.length-1)+3*i.targetDuration),t>s}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let r;if(e.length&&t.length){const s=Mn(e,i-3),n=Mn(e,i),a=Mn(t,i);a.length&&!n.length&&s.length&&(r={start:s.end(0),end:a.end(0)})}else{const t=Nn(e,i);t.length||(r=this.gapFromVideoUnderflow_(e,i))}return!!r&&(this.logger_(`Encountered a gap in video from ${r.start} to ${r.end}. Seeking to current time `+i),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),r=Nn(t,i);this.resetTimeUpdate_(),0!==r.length&&i===e&&(this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",e,"nextRange start:",r.start(0)),this.tech_.setCurrentTime(r.start(0)+On),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}))}gapFromVideoUnderflow_(e,t){const i=Rn(e);for(let r=0;r<i.length;r++){const e=i.start(r),s=i.end(r);if(t-e<4&&t-e>2)return{start:e,end:s}}return null}}const qd={errorInterval:30,getSource(e){const t=this.tech({IWillNotUseThisInPlugins:!0}),i=t.currentSource_||this.currentSource();return e(i)}},$d=function(e,t){let i=0,r=0;const s=An(qd,t);e.ready(()=>{e.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const n=function(){r&&e.currentTime(r)},a=function(t){null!==t&&void 0!==t&&(r=e.duration()!==1/0&&e.currentTime()||0,e.one("loadedmetadata",n),e.src(t),e.trigger({type:"usage",name:"vhs-error-reload"}),e.play())},o=function(){if(Date.now()-i<1e3*s.errorInterval)e.trigger({type:"usage",name:"vhs-error-reload-canceled"});else{if(s.getSource&&"function"===typeof s.getSource)return i=Date.now(),s.getSource.call(e,a);bn.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}},l=function(){e.off("loadedmetadata",n),e.off("error",o),e.off("dispose",l)},d=function(t){l(),$d(e,t)};e.on("error",o),e.on("dispose",l),e.reloadSourceOnError=d},Hd=function(e){$d(this,e)};var zd="3.0.0",Vd="6.2.0",Gd="1.0.1",Wd="6.0.0",Xd="4.0.1";const Yd={PlaylistLoader:Da,Playlist:fa,utils:Xa,STANDARD_PLAYLIST_SELECTOR:fl,INITIAL_PLAYLIST_SELECTOR:yl,lastBandwidthSelector:fl,movingAverageBandwidthSelector:ml,comparePlaylistBandwidth:cl,comparePlaylistResolution:hl,xhr:Ra()};Object.keys(mo).forEach(e=>{Object.defineProperty(Yd,e,{get(){return bn.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),mo[e]},set(t){bn.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),"number"!==typeof t||t<0?bn.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):mo[e]=t}})});const Kd="videojs-vhs",Jd=function(e,t){const i=t.media();let r=-1;for(let s=0;s<e.length;s++)if(e[s].id===i.id){r=s;break}e.selectedIndex_=r,e.trigger({selectedIndex:r,type:"change"})},Qd=function(e,t){t.representations().forEach(t=>{e.addQualityLevel(t)}),Jd(e,t.playlists)};Yd.canPlaySource=function(){return bn.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const Zd=(e,t,i)=>{if(!e)return e;let r={};t&&t.attributes&&t.attributes.CODECS&&(r=sl(Object(b["h"])(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(r.audio=i.attributes.CODECS);const s=Object(b["e"])(r.video),n=Object(b["e"])(r.audio),a={};for(const o in e)a[o]={},n&&(a[o].audioContentType=n),s&&(a[o].videoContentType=s),t.contentProtection&&t.contentProtection[o]&&t.contentProtection[o].pssh&&(a[o].pssh=t.contentProtection[o].pssh),"string"===typeof e[o]&&(a[o].url=e[o]);return An(e,a)},eu=(e,t)=>e.reduce((e,i)=>{if(!i.contentProtection)return e;const r=t.reduce((e,t)=>{const r=i.contentProtection[t];return r&&r.pssh&&(e[t]={pssh:r.pssh}),e},{});return Object.keys(r).length&&e.push(r),e},[]),tu=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:r})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const s=i?r.concat([i]):r,n=eu(s,Object.keys(t)),a=[],o=[];return n.forEach(t=>{o.push(new Promise((t,i)=>{e.tech_.one("keysessioncreated",t)})),a.push(new Promise((i,r)=>{e.eme.initializeMediaKeys({keySystems:t},e=>{e?r(e):i()})}))}),Promise.race([Promise.all(a),Promise.race(o)])},iu=({player:e,sourceKeySystems:t,media:i,audioMedia:r})=>{const s=Zd(t,i,r);return!!s&&(e.currentSource().keySystems=s,!(s&&!e.eme)||(bn.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))},ru=()=>{if(!s.a.localStorage)return null;const e=s.a.localStorage.getItem(Kd);if(!e)return null;try{return JSON.parse(e)}catch(t){return null}},su=e=>{if(!s.a.localStorage)return!1;let t=ru();t=t?An(t,e):e;try{s.a.localStorage.setItem(Kd,JSON.stringify(t))}catch(i){return!1}return t},nu=e=>0===e.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(e.substring(e.indexOf(",")+1)):e;Yd.supportsNativeHls=function(){if(!a.a||!a.a.createElement)return!1;const e=a.a.createElement("video");if(!bn.getTech("Html5").isSupported())return!1;const t=["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"];return t.some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),Yd.supportsNativeDash=function(){return!!(a.a&&a.a.createElement&&bn.getTech("Html5").isSupported())&&/maybe|probably/i.test(a.a.createElement("video").canPlayType("application/dash+xml"))}(),Yd.supportsTypeNatively=e=>"hls"===e?Yd.supportsNativeHls:"dash"===e&&Yd.supportsNativeDash,Yd.isSupported=function(){return bn.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const au=bn.getComponent("Component");class ou extends au{constructor(e,t,i){if(super(t,i.vhs),"number"===typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=In("VhsHandler"),t.options_&&t.options_.playerId){const e=bn.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(a.a,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],e=>{const t=a.a.fullscreenElement||a.a.webkitFullscreenElement||a.a.mozFullScreenElement||a.a.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,"error",(function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()})),this.on(this.tech_,"play",this.play)}setOptions_(){if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.useBandwidthFromLocalStorage="undefined"!==typeof this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,"number"!==typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=300),"number"!==typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=ru();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}"number"!==typeof this.options_.bandwidth&&(this.options_.bandwidth=mo.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===mo.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(e=>{"undefined"!==typeof this.source_[e]&&(this.options_[e]=this.source_[e])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio}src(e,t){if(!e)return;this.setOptions_(),this.options_.src=nu(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=Yd,this.options_.sourceType=Object(_["a"])(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.playlistController_=new Nd(this.options_);const i=An({liveRangeSafeTimeDelta:Ln},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new Fd(i),this.playlistController_.on("error",()=>{const e=bn.players[this.tech_.options_.playerId];let t=this.playlistController_.error;"object"!==typeof t||t.code?"string"===typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)});const r=this.options_.bufferBasedABR?Yd.movingAverageBandwidthSelector(.55):Yd.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):r.bind(this),this.playlistController_.selectInitialPlaylist=Yd.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=s.a.navigator.connection||s.a.navigator.mozConnection||s.a.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const r=1e3*t.downlink*1e3;e=r>=i&&e>=i?Math.max(e,r):r}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;const i=Math.floor(1/(e+t));return i},set(){bn.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Fn(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Fn(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&su({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{Bd(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.playlistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=s.a.URL.createObjectURL(this.playlistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),tu({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(e=>{this.logger_("error while creating EME key session",e),this.player_.error({message:"Failed to initialize media keys for EME",code:3})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=iu({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on("keystatuschange",e=>{if("output-restricted"!==e.status)return;const t=this.playlistController_.main();if(!t||!t.playlists)return;const i=[];t.playlists.forEach(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&&(bn.log.warn('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.',...i),this.playlistController_.fastQualityChange_())}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),11!==bn.browser.IE_VERSION&&t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=bn.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{Qd(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{Jd(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":zd,"mux.js":Vd,"mpd-parser":Gd,"m3u8-parser":Wd,"aes-decrypter":Xd}}version(){return this.constructor.version()}canChangeType(){return rd.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&s.a.URL.revokeObjectURL&&(s.a.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return io({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,r=2){return ro({programTime:e,playlist:this.playlistController_.media(),retryCount:r,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}}const lu={name:"videojs-http-streaming",VERSION:zd,canHandleSource(e,t={}){const i=An(bn.options,t);return lu.canPlayType(e.type,i)},handleSource(e,t,i={}){const r=An(bn.options,i);return t.vhs=new ou(e,t,r),t.vhs.xhr=Ra(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t={}){const{vhs:{overrideNative:i=!bn.browser.IS_ANY_SAFARI}={}}=An(bn.options,t),r=Object(_["a"])(e),s=r&&(!Yd.supportsTypeNatively(r)||i);return s?"maybe":""}},du=()=>Object(b["c"])("avc1.4d400d,mp4a.40.2");du()&&bn.getTech("Html5").registerSourceHandler(lu,0),bn.VhsHandler=ou,bn.VhsSourceHandler=lu,bn.Vhs=Yd,bn.use||bn.registerComponent("Vhs",Yd),bn.options.vhs=bn.options.vhs||{},bn.getPlugin&&bn.getPlugin("reloadSourceOnError")||bn.registerPlugin("reloadSourceOnError",Hd)}).call(this,i("24aa"))},f6b4:function(e,t,i){"use strict";var r=i("c532");function s(){this.handlers=[]}s.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},s.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},s.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=s},f772:function(e,t,i){"use strict";var r=i("5692"),s=i("90e3"),n=r("keys");e.exports=function(e){return n[e]||(n[e]=s(e))}},f8a8:function(e,t,i){"use strict";i.d(t,"a",(function(){return A})),i.d(t,"b",(function(){return P}));var r,s=i("de66"),n=(new Uint8Array([79,112,117,115,72,101,97,100]),function(e){return"string"===typeof e?Object(s["h"])(e):e}),a=function(e){return Array.isArray(e)?e.map((function(e){return n(e)})):[n(e)]},o=function(e){e=Object(s["k"])(e);var t=[],i=0;while(e.length>i){var n=e[i],a=0,o=0;o++;var l=e[o];o++;while(128&l)a=(127&l)<<7,l=e[o],o++;a+=127&l;for(var d=0;d<r.length;d++){var u=r[d],c=u.id,h=u.parser;if(n===c){t.push(h(e.subarray(o,o+a)));break}}i+=a+o}return t};r=[{id:3,parser:function(e){var t={tag:3,id:e[0]<<8|e[1],flags:e[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(128&t.flags&&(t.dependsOnEsId=e[t.size]<<8|e[t.size+1],t.size+=2),64&t.flags){var i=e[t.size];t.url=Object(s["c"])(e.subarray(t.size+1,t.size+1+i)),t.size+=i}return 32&t.flags&&(t.ocrEsId=e[t.size]<<8|e[t.size+1],t.size+=2),t.descriptors=o(e.subarray(t.size))||[],t}},{id:4,parser:function(e){var t={tag:4,oti:e[0],streamType:e[1],bufferSize:e[2]<<16|e[3]<<8|e[4],maxBitrate:e[5]<<24|e[6]<<16|e[7]<<8|e[8],avgBitrate:e[9]<<24|e[10]<<16|e[11]<<8|e[12],descriptors:o(e.subarray(13))};return t}},{id:5,parser:function(e){return{tag:5,bytes:e}}},{id:6,parser:function(e){return{tag:6,bytes:e}}}];var l=function e(t,i,r){void 0===r&&(r=!1),i=a(i),t=Object(s["k"])(t);var n=[];if(!i.length)return n;var o=0;while(o<t.length){var l=(t[o]<<24|t[o+1]<<16|t[o+2]<<8|t[o+3])>>>0,d=t.subarray(o+4,o+8);if(0===l)break;var u=o+l;if(u>t.length){if(r)break;u=t.length}var c=t.subarray(o+8,u);Object(s["a"])(d,i[0])&&(1===i.length?n.push(c):n.push.apply(n,e(c,i.slice(1),r))),o=u}return n},d={EBML:Object(s["k"])([26,69,223,163]),DocType:Object(s["k"])([66,130]),Segment:Object(s["k"])([24,83,128,103]),SegmentInfo:Object(s["k"])([21,73,169,102]),Tracks:Object(s["k"])([22,84,174,107]),Track:Object(s["k"])([174]),TrackNumber:Object(s["k"])([215]),DefaultDuration:Object(s["k"])([35,227,131]),TrackEntry:Object(s["k"])([174]),TrackType:Object(s["k"])([131]),FlagDefault:Object(s["k"])([136]),CodecID:Object(s["k"])([134]),CodecPrivate:Object(s["k"])([99,162]),VideoTrack:Object(s["k"])([224]),AudioTrack:Object(s["k"])([225]),Cluster:Object(s["k"])([31,67,182,117]),Timestamp:Object(s["k"])([231]),TimestampScale:Object(s["k"])([42,215,177]),BlockGroup:Object(s["k"])([160]),BlockDuration:Object(s["k"])([155]),Block:Object(s["k"])([161]),SimpleBlock:Object(s["k"])([163])},u=[128,64,32,16,8,4,2,1],c=function(e){for(var t=1,i=0;i<u.length;i++){if(e&u[i])break;t++}return t},h=function(e,t,i,r){void 0===i&&(i=!0),void 0===r&&(r=!1);var n=c(e[t]),a=e.subarray(t,t+n);return i&&(a=Array.prototype.slice.call(e,t,t+n),a[0]^=u[n-1]),{length:n,value:Object(s["b"])(a,{signed:r}),bytes:a}},p=function e(t){return"string"===typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):"number"===typeof t?Object(s["f"])(t):t},f=function(e){return Array.isArray(e)?e.map((function(e){return p(e)})):[p(e)]},m=function e(t,i,r){if(r>=i.length)return i.length;var n=h(i,r,!1);if(Object(s["a"])(t.bytes,n.bytes))return r;var a=h(i,r+n.length);return e(t,i,r+a.length+a.value+n.length)},g=function e(t,i){i=f(i),t=Object(s["k"])(t);var r=[];if(!i.length)return r;var n=0;while(n<t.length){var a=h(t,n,!1),o=h(t,n+a.length),l=n+a.length+o.length;127===o.value&&(o.value=m(a,t,l),o.value!==t.length&&(o.value-=l));var d=l+o.value>t.length?t.length:l+o.value,u=t.subarray(l,d);Object(s["a"])(i[0],a.bytes)&&(1===i.length?r.push(u):r=r.concat(e(u,i.slice(1))));var c=a.length+o.length+u.length;n+=c}return r},y=i("321f"),v=Object(s["k"])([0,0,0,1]),b=Object(s["k"])([0,0,1]),_=Object(s["k"])([0,0,3]),T=function(e){var t=[],i=1;while(i<e.length-2)Object(s["a"])(e.subarray(i,i+3),_)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var r=e.length-t.length,n=new Uint8Array(r),a=0;for(i=0;i<r;a++,i++)a===t[0]&&(a++,t.shift()),n[i]=e[a];return n},S=function(e,t,i,r){void 0===r&&(r=1/0),e=Object(s["k"])(e),i=[].concat(i);var n,a=0,o=0;while(a<e.length&&(o<r||n)){var l=void 0;if(Object(s["a"])(e.subarray(a),v)?l=4:Object(s["a"])(e.subarray(a),b)&&(l=3),l){if(o++,n)return T(e.subarray(n,a));var d=void 0;"h264"===t?d=31&e[a+l]:"h265"===t&&(d=e[a+l]>>1&63),-1!==i.indexOf(d)&&(n=a+l),a+=l+("h264"===t?1:2)}else a++}return e.subarray(0,0)},w=function(e,t,i){return S(e,"h264",t,i)},E=function(e,t,i){return S(e,"h265",t,i)},C={webm:Object(s["k"])([119,101,98,109]),matroska:Object(s["k"])([109,97,116,114,111,115,107,97]),flac:Object(s["k"])([102,76,97,67]),ogg:Object(s["k"])([79,103,103,83]),ac3:Object(s["k"])([11,119]),riff:Object(s["k"])([82,73,70,70]),avi:Object(s["k"])([65,86,73]),wav:Object(s["k"])([87,65,86,69]),"3gp":Object(s["k"])([102,116,121,112,51,103]),mp4:Object(s["k"])([102,116,121,112]),fmp4:Object(s["k"])([115,116,121,112]),mov:Object(s["k"])([102,116,121,112,113,116]),moov:Object(s["k"])([109,111,111,118]),moof:Object(s["k"])([109,111,111,102])},x={aac:function(e){var t=Object(y["a"])(e);return Object(s["a"])(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Object(y["a"])(e);return Object(s["a"])(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=g(e,[d.EBML,d.DocType])[0];return Object(s["a"])(t,C.webm)},mkv:function(e){var t=g(e,[d.EBML,d.DocType])[0];return Object(s["a"])(t,C.matroska)},mp4:function(e){return!x["3gp"](e)&&!x.mov(e)&&(!(!Object(s["a"])(e,C.mp4,{offset:4})&&!Object(s["a"])(e,C.fmp4,{offset:4}))||(!(!Object(s["a"])(e,C.moof,{offset:4})&&!Object(s["a"])(e,C.moov,{offset:4}))||void 0))},mov:function(e){return Object(s["a"])(e,C.mov,{offset:4})},"3gp":function(e){return Object(s["a"])(e,C["3gp"],{offset:4})},ac3:function(e){var t=Object(y["a"])(e);return Object(s["a"])(e,C.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];var t=0;while(t+188<e.length&&t<188){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Object(y["a"])(e);return Object(s["a"])(e,C.flac,{offset:t})},ogg:function(e){return Object(s["a"])(e,C.ogg)},avi:function(e){return Object(s["a"])(e,C.riff)&&Object(s["a"])(e,C.avi,{offset:8})},wav:function(e){return Object(s["a"])(e,C.riff)&&Object(s["a"])(e,C.wav,{offset:8})},h264:function(e){return w(e,7,3).length},h265:function(e){return E(e,[32,33],3).length}},k=Object.keys(x).filter((function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e})).concat(["ts","h264","h265"]);k.forEach((function(e){var t=x[e];x[e]=function(e){return t(Object(s["k"])(e))}}));var I=x,A=function(e){e=Object(s["k"])(e);for(var t=0;t<k.length;t++){var i=k[t];if(I[i](e))return i}return""},P=function(e){return l(e,["moof"]).length>0}},f97d:function(e,t){var i={"":!0,up:!0};function r(e){if("string"!==typeof e)return!1;var t=i[e.toLowerCase()];return!!t&&e.toLowerCase()}function s(e){return"number"===typeof e&&e>=0&&e<=100}function n(){var e=100,t=3,i=0,n=100,a=0,o=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!s(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 n},set:function(e){if(!s(e))throw new Error("RegionAnchorX must be between 0 and 100.");n=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!s(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!s(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return a},set:function(e){if(!s(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var t=r(e);!1===t?console.warn("Scroll: an invalid or illegal string was specified."):l=t}}})}e.exports=n},fb15:function(e,t,i){"use strict";if(i.r(t),i.d(t,"cms",(function(){return Vt})),"undefined"!==typeof window){var r=window.document.currentScript,s=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);s&&(i.p=s[1])}var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{ref:"cms"},[i("div",{class:["lay-wrap",{mobile:"mobile"==e.mode}]},e._l(e.cmsList,(function(t){return i("div",{key:t.sort,staticClass:"lay-item"},[i("div",{staticClass:"layout-set",style:{width:t.attributeJson.layoutStyle&&2===t.attributeJson.layoutStyle.widthStyle.type?t.attributeJson.layoutStyle.widthStyle.width+"%":"100%",height:t.attributeJson.layoutStyle?Math.round(t.attributeJson.layoutStyle.height*e.ratio)+"px":"auto"}},[i(e.layOutObj[t.layoutType],e._g(e._b({ref:"layModule",refInFor:!0,tag:"component",attrs:{layOutData:t.attributeJson,sort:t.attributeJson.sort,ratio:e.ratio,mode:e.mode,recordId:t.originalId,envUrl:e.envUrl,path:e.path,isClient:e.isClient},scopedSlots:e._u([{key:"customComponent",fn:function(i){return 3==t.layoutType?[e._t("customComponent",null,{attributeJson:i.attributeJson})]:void 0}},{key:"dgCustomComponent",fn:function(t){return[e._t("dgCustomComponent",null,{data:t.attributeJson})]}}],null,!0)},"component",e.$attrs,!1),e.$listeners))],1)])})),0)])},a=[],o=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"single-layout",style:e.layoutStyle},[i("div",{staticStyle:{width:"100%",height:"100%"}},[e._l(e.layOutData.componentList.filter((function(e){return e.type<=100})),(function(t,r){return i("div",{key:r},[1==t.displayType?i(t.component,e._g(e._b({key:t.sort,ref:"singleComponent",refInFor:!0,tag:"component",style:{zIndex:r+1},attrs:{ratio:e.ratio,attributeJson:t.attributeJson,sortId:t.sort}},"component",e.$attrs,!1),e.$listeners)):e._e()],1)})),i("div",[e._t("dgCustomComponent",null,{attributeJson:e.getCustom()})],2)],2)])},l=[],d=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"text-wrap entrance-con",style:[e.conStyle,e.animationInStyle],attrs:{id:[e.recordId+"_"+e.sortId,"entrance-con"],name:[e.recordId+"_"+e.sortId,"entrance-con"],"data-sensors-click":"","data-sensorsClick":"true"},on:{click:e.pageClick}},[i("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData,envUrl:e.envUrl},expression:"{data:tipReportData, envUrl}"}],class:["text-con","text-con-"+e.sortId,e.animationInObj.type?e.enterClass:""],domProps:{innerHTML:e._s(e.attributeJson.label)}})])},u=[],c=(i("be35"),i("a7a3"),i("77ed"),i("1e09"),i("fda2"),i("14d9"),i("bc3a")),h=i.n(c);const p={json:"application/json;",form:"application/x-www-form-urlencoded;",html:"text/html;",file:"multipart/form-data",excel:"msexcel",xml:"application/xml",javascript:"application/x-javascript;charset=utf-8"},f={lang:"Accept-Language",contentType:"Content-Type"};function m(e){if(200===e.status){let t=e.data;return"0"===t.errorCode?t.data:e.data}}h.a.interceptors.response.use(m,e=>Promise.reject(e));class g{static async call(e,{method:t="get",headers:i={},body:r=null,responseType:s=null}={}){let n=e,a={method:t,url:n,responseType:s||"json",headers:i};"get"===t?a.params=r:a.data=r;const o=await h()(a).catch(e=>{e.response?console.error(e.response.status,e.response.data):e.request?console.error(e.request):console.error("Error",e.message?e.message:"")});return o}static get(e,{mask:t=!0,external:i=!1,headers:r={}}={}){return g.call(e,{headers:r,external:i,mask:t})}static postBody(e,{body:t={},language:i="zh-CN",module:r="",method:s="post",mask:n=!0,postData:a=!0,external:o=!1,headers:l={},compat:d}){return g.call(e,{module:r,method:s,headers:Object.assign(l,{[f.contentType]:p.json,common:{languageCode:i}}),body:t,postData:a,external:o,mask:n,compat:d})}}class y{getProductInfo(e,t,i){return g.postBody(e+"service-zuul/manage/search/plp/standard",{body:t,language:i})}getSortProductInfo(e,t,i){return g.postBody(e+"service-zuul/manage/search/cms/sort",{body:t,language:i})}dataSaveDecorationPageComponentEvent(e,t){return g.postBody(e+"service-zuul/data/collect/acquisition",{body:t})}acquisitionBatch(e,t){return g.postBody(e+"/service-zuul/data/collect/acquisitionBatch",{body:t})}}const v=new y;class b{constructor(){this.intersectionObserver=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(_(e,this.intersectionObserver),this.intersectionObserver.unobserve(e.target))})}),this.interval=T()}observe(e,t){e.setAttribute("report-data",JSON.stringify(t.value?t.value.data:null)),this.intersectionObserver.observe(e)}disconnect(){this.intersectionObserver&&(this.intersectionObserver.disconnect(),sessionStorage.setItem("reportData","[]"),this.interval&&(clearInterval(this.interval),this.interval=null))}static getInstance(e){return this.instance||(this.instance=new b),e&&(this.instance.envUrl=e.value?e.value.envUrl:this.instance.envUrl),this.instance}}const _=function(e,t){const i=e.target,r=i.getAttribute("report-data");let s=JSON.parse(sessionStorage.getItem("reportData")||null)||[];"null"!=r&&"undefined"!=r?(s.push(r),sessionStorage.setItem("reportData",JSON.stringify(s))):t.unobserve(i)},T=function(){let e=setInterval(()=>{let e=JSON.parse(sessionStorage.getItem("reportData")||null)||[];e.length>0&&(sessionStorage.setItem("reportData","[]"),S(e))},1500);return e},S=function(e){let t=e.map(e=>w(e)),i=b.getInstance().envUrl;i&&v.acquisitionBatch(i,t)},w=function(e){let t=JSON.parse(e);const i={source:"",medium:"",commodity_id:t.popData&&t.popData.productCode||"",commodity_name:t.popData&&t.popData.selectDataShow||"",commodity_sku_id:"",component_name:t.uniqueName,component_id:t.uniqueId,component_type:t.componentType,hot_zone_id:t.popData&&t.popData.uniqueId||"",hot_zone_name:t.popData&&t.popData.uniqueName||"",material_id:t.materialId,material_name:t.materialName,url_path:t.path||"/",refer_info:t.refererPagePath,position:t.position,trigger_Method_Type:t.componentMethodType};let r="";return localStorage.getItem(t.brand+"Cookie")?r=localStorage.getItem(t.brand+"Cookie"):(r=`${parseInt((new Date).getTime())}${Math.floor(1e4*Math.random())}`,localStorage.setItem(t.brand+"Cookie",r)),{eventProperty:JSON.stringify({...i}),event:t.event,distinctId:r}};var E={bind(e,t){"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype&&b.getInstance(t).observe(e,t)},unbind(){b.getInstance().disconnect()}};function C(e,t,i){const r=new y,s={source:"",medium:"",commodity_id:e.popData.productCode||"",commodity_name:e.popData.selectDataShow||"",commodity_sku_id:"",component_name:e.uniqueName,component_id:e.uniqueId,component_type:e.componentType,hot_zone_id:e.popData.uniqueId||"",hot_zone_name:e.popData.uniqueName||"",material_id:e.materialId,material_name:e.materialName,url_path:e.path,refer_info:e.refererPagePath,position:e.position,trigger_Method_Type:e.componentMethodType};let n="";localStorage.getItem(e.brand+"Cookie")?n=localStorage.getItem(e.brand+"Cookie"):(n=`${parseInt((new Date).getTime())}${Math.floor(1e4*Math.random())}`,localStorage.setItem(e.brand+"Cookie",n));let a={eventProperty:JSON.stringify({...s}),event:e.event,distinctId:n};if("click"==i)return a;r.dataSaveDecorationPageComponentEvent(t,a)}function x(e,t){var i=null,r=Date.now();return function(){var s=Date.now(),n=t-(s-r),a=this,o=arguments;clearTimeout(i),n<=0?(e.apply(a,o),r=Date.now()):i=setTimeout(e,n)}}const k={inheritAttrs:!1,props:{attributeJson:{type:Object,default:function(){}},item:{type:Object,default:()=>{}},ratio:{type:Number,default:1},envUrl:{type:String,default:""},fontRatio:{type:Number,default:1},mode:{type:String,default:"pc"},language:{type:String,default:"zh-CN"},sortId:{type:Number,default:0},sort:{type:[String,Number],default:0},recordId:{type:[String,Number],default:0},refererPagePath:{type:String},brand:{type:String},path:{type:String},isClient:{type:Boolean,default:!0}},data(){return{scrollHandle:x(this.scrollThrottle,200),hoverStyle:{},hoverStyleShow:!1,hoverImage:"",hoverDirection:"",finishAnimation:!1,animationInStyle:{},entranceAnimate:{fade:"fadeIn",scale:"zoomIn"}}},computed:{animationInObj:function(){return this.attributeJson.animationInObj},animationHoverObj:function(){return this.attributeJson.animationHoverObj},baseStyle(){return this.attributeJson.baseStyle},styleType(){return this.attributeJson.styleType},conStyle(){let{attributeJson:e,ratio:t}=this;return{width:Math.round(e.baseStyle.w*t)+"px",height:Math.round(e.baseStyle.h*t)+"px",left:Math.round(e.baseStyle.l*t)+"px",top:Math.round(e.baseStyle.t*t)+"px"}}},watch:{animationHoverObj:{handler(e){this.disposeHoverAnimate(e)},immediate:!0,deep:!0},animationInObj:{handler(){let{type:e,direction:t,delay:i,duration:r}=this.attributeJson.animationInObj;e&&(this.enterClass="",this.enterClass=this.entranceAnimate[e],this.animationInStyle={animationDuration:r+"s",amimationDelay:i+"s",animationName:"slide"!=e?this.entranceAnimate[e]:t,animationPlayState:"paused"})},immediate:!0}},mounted(){this.isInCurrentScreenArea()?(this.$el.style.animationPlayState="running",this.finishAnimation=!0):this.animationInStyle.animationName&&(this.$el.style.animationPlayState="paused",this.startObserver())},methods:{isInCurrentScreenArea(){const{top:e}=this.$el.getBoundingClientRect();return e<=window.innerHeight-100},scrollThrottle(){this.isInCurrentScreenArea()&&!this.finishAnimation&&(this.animationInStyle.animationName&&(this.$el.style.animationPlayState="running"),this.finishAnimation=!0,this.endObserver())},startObserver(){window.addEventListener("scroll",this.scrollHandle,!0)},endObserver(){window.removeEventListener("scroll",this.scrollHandle,!0)},disposeHoverAnimate(e){let t={};if(2===e.type){let i=e.borderStyle;if(1==i.type&&(t={border:i.borderColor?"2px solid "+i.borderColor:"none"}),2==i.type){let{borderTop:e,borderRight:r,borderBottom:s,borderLeft:n}=i;t={borderTop:e?"2px solid "+e:"none",borderRight:r?"2px solid "+r:"none",borderBottom:s?"2px solid "+s:"none",borderLeft:n?"2px solid "+n:"none"}}}if(3===e.type&&(t={transform:"scale(1.2)",transformOrigin:"center center"}),4===e.type&&(this.hoverDirection=e.bgStyle.direction),5===e.type){let{hoverImgList:t}=e;this.hoverImage=t[0]?t[0].resourcePath:""}this.hoverStyle=t},onDrag:function(e,t){let i=this.ratio;this.attributeJson.baseStyle.l=e/i,this.attributeJson.baseStyle.t=t/i,this.$set(this.attributeJson,"baseStyle",this.attributeJson.baseStyle)},onResize:function(e,t,i,r){let s=this.ratio,n=this.attributeJson.baseStyle;n={w:i/s,h:r/s,l:e/s,t:t/s,isLocked:n.isLocked},this.$set(this.attributeJson,"baseStyle",n)},getRefLineParams(e){this.$emit("getRefLineParams",e)}},directives:{hoverAnimate:{inserted:function(e,t,i){e.onmouseover=function(){i.context.hoverStyleShow=!0,t.value&&(i.context[t.value.key]=t.value.value)},e.onmouseleave=function(){i.context.hoverStyleShow=!1,t.value&&(i.context[t.value.key]=-1)}}},treport:E}};var I={name:"textItem",mixins:[k],components:{},props:{},data(){return{}},computed:{tipReportData(){return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:12,popData:{},refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:1,event:"bannerShow"}}},methods:{pageClick(){if(this.attributeJson.linkObj.jumpLinkType)try{let e=JSON.parse(JSON.stringify(this.tipReportData));e.event="bannerClick";let t=C(e,this.envUrl,"click"),i=new Blob([JSON.stringify(t)],{type:"application/json"});navigator.sendBeacon(this.envUrl+"service-zuul/data/collect/acquisition",i)}catch(e){console.log(e)}this.$emit("jumpLink",this.attributeJson.linkObj)}}},A=I,P=A;i("4e30");function O(e,t,i,r,s,n,a,o){var l,d="function"===typeof e?e.options:e;if(t&&(d.render=t,d.staticRenderFns=i,d._compiled=!0),r&&(d.functional=!0),n&&(d._scopeId="data-v-"+n),a?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),s&&s.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},d._ssrRegister=l):s&&(l=o?function(){s.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:s),l)if(d.functional){d._injectStyles=l;var u=d.render;d.render=function(e,t){return l.call(t),u(e,t)}}else{var c=d.beforeCreate;d.beforeCreate=c?[].concat(c,l):[l]}return{exports:e,options:d}}var L=O(P,d,u,!1,null,"1e5d96ce",null),D=L.exports,M=D,N=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{key:e.attributeJson.sort,staticClass:"image-list entrance-con",style:Object.assign({},{width:Math.ceil(e.attributeJson.baseStyle.w*e.ratio)+"px",height:Math.round(e.attributeJson.baseStyle.h*e.ratio)+"px",left:Math.round(e.attributeJson.baseStyle.l*e.ratio)+"px",top:Math.round(e.attributeJson.baseStyle.t*e.ratio)+"px"},e.animationInStyle)},[e.hasConfig?[i("div",{ref:"img"+e.attributeJson.sort,class:["image-warp","image-warp-"+e.sortId],style:{animationDuration:e.animationInObj.duration+"s"}},[e.isSwiper?i("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate"}],style:[e.picStyle,3===e.animationHoverObj.type&&e.hoverStyleShow?e.hoverStyle:""]},[i("div",{class:["swiper-container swiper-container-"+e.sortId]},[i("div",{staticClass:"swiper-wrapper",style:{height:(e.baseStyle.h-(e.hasScrollBar?30:0))*e.ratio+"px!important"}},e._l(e.attributeJson.list,(function(t,r){return i("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData(r),envUrl:e.envUrl},expression:"{data:tipReportData(index), envUrl}"}],key:t.id,staticClass:"swiper-slide",style:{width:e.baseStyle.w/4*e.ratio+"px"}},[i("div",{staticClass:"slide-con",style:{height:(e.baseStyle.h-(e.hasScrollBar?30:0))*e.ratio+"px"}},[i("img",{attrs:{src:t.picList[0].resourcePath,alt:t.picList[0].resourceName.split(".")[0]}}),0!=t.picList.length&&0!=t.popList.length?[i("hotspot",e._g(e._b({ref:"hotspot"+e.sortId+r,refInFor:!0,attrs:{componentType:2,item:t,ratio:e.ratio,path:e.path,envUrl:e.envUrl,sortId:e.sortId,recordId:e.recordId,laySort:e.sort,brand:e.brand,uniqueName:e.attributeJson.uniqueName,language:e.language}},"hotspot",e.$attrs,!1),e.$listeners))]:e._e()],2)])})),0),e.hasSwiperButton?i("div",{class:"swiper-button-prev swiper-button-prev-"+e.sortId},[e._t("swiper-button-prev",(function(){return[2==e.indicatorType||3==e.indicatorType?i("div",[i("span",{staticClass:"cms2iconfont iconleft"})]):e._e()]}))],2):e._e(),e.hasSwiperButton?i("div",{class:"swiper-button-next swiper-button-next-"+e.sortId},[e._t("swiper-button-next",(function(){return[2==e.indicatorType||3==e.indicatorType?i("div",[i("span",{staticClass:"cms2iconfont iconright"})]):e._e()]}))],2):e._e(),e.hasScrollBar?i("div",{class:"swiper-scrollbar swiper-scrollbar-"+e.sortId}):e._e()]),2===e.animationHoverObj.type?i("div",{staticClass:"hover-con",style:[e.hoverStyle,{opacity:e.hoverStyleShow?1:0}]}):e._e()]):i("div",{class:["image-warp",3==e.styleType&&"pc"!=e.mode?"image-type3":""],style:[e.picStyle,3===e.animationHoverObj.type&&e.hoverStyleShow?e.hoverStyle:""]},e._l(e.attributeJson.list,(function(t,r){return i("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate"},{name:"treport",rawName:"v-treport",value:{data:e.tipReportData(r),envUrl:e.envUrl},expression:"{data:tipReportData(index), envUrl}"}],key:r,staticClass:"image-item",style:[e.picItemStyle]},[i("img",{class:{contain:1!=e.styleType},attrs:{src:t.picList[0].resourcePath,alt:t.picList[0].resourceName.split(".")[0]}}),2===e.animationHoverObj.type?i("div",{staticClass:"hover-con",style:[e.hoverStyle,{opacity:e.hoverStyleShow?1:0}]}):e._e(),5===e.animationHoverObj.type&&e.hoverImage&&e.hoverStyleShow?i("img",{staticClass:"hover-image",attrs:{src:e.hoverImage,alt:""}}):e._e(),0!=t.picList.length&&0!=t.popList.length?i("div",[i("hotspot",e._g(e._b({ref:"hotspot"+e.sortId+r,refInFor:!0,attrs:{item:t,ratio:e.ratio,path:e.path,brand:e.brand,envUrl:e.envUrl,sortId:e.sortId,recordId:e.recordId,componentType:2,uniqueName:e.attributeJson.uniqueName,language:e.language}},"hotspot",e.$attrs,!1),e.$listeners))],1):e._e()])})),0)])]:e._e()],2)},R=[],U=(i("13d5"),i("02a3")),B=i.n(U),j=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"pop-wrap",style:{left:e.item.left,top:e.item.top,width:e.item.realWidth*e.ratio+"px"||!1,height:e.item.realHeight*e.ratio+"px"||!1}},e._l(e.item.popList,(function(t,r){return i("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData(r),envUrl:e.envUrl},expression:"{data:tipReportData(index), envUrl}"}],key:r,ref:""+e.sortId+r,refInFor:!0,class:"pop-item",style:{width:t.width/750*100+"%",height:t.height/(e.item.height/e.proportion)*100+"%",left:t.left/750*100+"%",top:t.top/(e.item.height/e.proportion)*100+"%"},attrs:{id:[e.recordId+"_"+e.sortId+"_"+t.uniqueId.split("_")[2],"pop-item"],"data-sensors-click":"","data-sensorsClick":"true",name:[e.recordId+"_"+e.sortId+"_"+t.uniqueId.split("_")[2],"pop-item"]},on:{click:function(i){return e.pageClick(t,r)}}},[t.product.openHot?i("div",{staticClass:"product-hover",on:{mouseover:function(t){return e.mouseover(r)},mouseleave:e.mouseLeave}},[0!=t.product.initImage.length?i("div",{staticStyle:{"{ fontsize":"0"}},[i("img",{attrs:{src:e.hoverIndex==r?t.product.hoverImage[0].resourcePath:t.product.initImage[0].resourcePath,alt:""}})]):e._e(),e.hoverIndex==r?i("div",{staticClass:"product-image"},[i("img",{attrs:{src:1==t.product.imageType?e.productImage[t.productCode]:t.product.productImage[0].resourcePath,alt:""}})]):e._e()]):e._e()])})),0)},F=[],q={name:"hotspot",props:{item:{type:Object,default:()=>{}},width:{type:Number,default:0},height:{type:Number,default:0},ratio:{type:Number,default:1},envUrl:{type:String,default:""},sortId:{type:Number,default:0},recordId:{type:Number,default:0},brand:{type:String},componentType:{type:Number},refererPagePath:{type:String},path:{type:String},pathType:{type:Number},uniqueName:{type:String},language:{type:String,default:"zh-CN"},prePosition:{type:Number}},data(){return{hotList:[],proportion:1,hoverIndex:1,needReport:!0,preTotal:0,productImage:{},service:new y}},watch:{"item.width":{handler(e){this.proportion=e/750},deep:!0,immediate:!0},itemCodeList:{handler(e){this.getProductList(e)},immediate:!0,deep:!0}},computed:{itemCodeList(){let e=this.item.popList.filter(e=>1==e.jumpLinkType&&1==e.product.imageType&&e.product.openHot);return e.map(e=>e.productCode)},tipReportData(){let e=JSON.parse(JSON.stringify(this.item.popList));return function(t){let i=e[t];return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.uniqueName,componentMethodType:0,popData:{productCode:i.productCode,selectDataShow:i.selectDataShow,uniqueName:i.uniqueName,uniqueId:this.recordId+"_"+this.sortId+"_"+i.uniqueId.split("_")[2],brand:1===this.pathType?"defaultPath":this.brand},materialId:this.item.sort?this.recordId+"_"+this.item.sort:this.recordId+"_"+this.sortId,materialName:this.item.uniqueName?this.item.uniqueName:this.uniqueName,refererPagePath:this.refererPagePath,path:this.path,componentType:this.componentType,brand:this.brand,position:this.preTotal+t+1,event:"bannerShow"}}}},mounted(){this.hotList=JSON.parse(JSON.stringify(this.item.popList))},methods:{pageClick(e,t){if(e.jumpLinkType)try{this.dataSend(e,t,1)}catch(i){console.log(i)}this.$emit("jumpLink",e)},dataSend(e,t,i){let r={uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.uniqueName,componentMethodType:i,popData:{...e,uniqueId:this.recordId+"_"+this.sortId+"_"+e.uniqueId.split("_")[2],brand:1===this.pathType?"defaultPath":this.brand},materialId:this.item.sort?this.recordId+"_"+this.item.sort:this.recordId+"_"+this.sortId,materialName:this.item.uniqueName?this.item.uniqueName:this.uniqueName,refererPagePath:this.refererPagePath,path:this.path,componentType:this.componentType,brand:this.brand,position:this.prePosition?this.prePosition+t+1:1*this.preTotal+t+1,event:0==i?"bannerShow":"bannerClick"};if(0==i)C(r,this.envUrl);else{let e=C(r,this.envUrl,"click"),t=new Blob([JSON.stringify(e)],{type:"application/json"});navigator.sendBeacon(this.envUrl+"service-zuul/data/collect/acquisition",t)}},getProductList(e){if(0==e.length)return;let t={itemCodeList:e,pageNum:1,pageSize:e.length},i={};this.service.getProductInfo(this.envUrl,t,this.language).then(e=>{e&&e.list&&(this.productList=e.list,e.list.forEach(e=>{i[e.code]=e.mainPicUrl}),this.productImage=i)})},mouseover(e){this.hoverIndex=e},mouseLeave(){this.hoverIndex=-1}},directives:{treport:E}},$=q,H=$,z=(i("55f9"),O(H,j,F,!1,null,"4c0eac42",null)),V=z.exports,G=V,W={name:"imgNav",mixins:[k],components:{hotspot:G},props:{},data(){return{swiper:"",imageList:[],popList:[],positionList:[],positionTotal:[],hasInitSwiper:!1}},computed:{indicatorType(){return this.attributeJson.indicatorType},picStyle(){let{attributeJson:e,ratio:t,animationInObj:i}=this;return{animationDuration:i.duration+"s",padding:`0 ${e.paddingSpacing*t}px`,width:Math.ceil(e.baseStyle.w*t)+"px"}},picItemStyle(){let{attributeJson:e,ratio:t}=this,{oneLineCount:i}=e;return{width:Math.ceil((e.baseStyle.w*t-2*e.paddingSpacing*t)/i)+"px",height:Math.ceil(e.baseStyle.h*t)+"px",padding:"0 "+e.itemSpacing*t+"px"}},list(){return this.attributeJson.list},isSwiper(){return 3==this.styleType&&2==this.indicatorType&&"pc"==this.mode||2==this.styleType&&2==this.indicatorType&&"mobile"==this.mode},hasConfig(){return this.attributeJson.list.some(e=>0!=e.picList.length)},hasSwiperButton(){return 3==this.styleType&&2==this.indicatorType&&"pc"==this.mode},hasScrollBar(){return 2==this.styleType&&2==this.indicatorType&&"mobile"==this.mode},tipReportData(){let{list:e}=this,t=[],i=[];return e.forEach(e=>{0!=e.popList.length?t.push(e.popList.length):t.push(1)}),t.forEach((e,r)=>{let s=t.slice(0,r),n=s.reduce((e,t)=>e+t,0);i.push(n)}),this.positionList=t,this.positionTotal=i,function(t){let i=e[t];return 0!=i.popList.length?void 0:{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:2,materialId:this.recordId+"_"+this.sortId+"_"+i.sort,materialName:i.uniqueName,refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:this.positionTotal[t]+1,event:"bannerShow"}}}},watch:{isSwiper:{handler(e){e&&this.initSwiper()},immediate:!0}},mounted(){},methods:{initSwiper(){this.hasConfig&&this.isSwiper&&this.$nextTick(()=>{this.swiper&&(this.swiper.destroy(!0,!0),this.swiper=null);let{attributeJson:e}=this;this.options={effect:"slide",autoplay:!1,slidesPerView:this.attributeJson.oneLineCount,spaceBetween:e.itemSpacing},this.hasSwiperButton&&(this.options.navigation={nextEl:".swiper-button-next-"+this.sortId,prevEl:".swiper-button-prev-"+this.sortId}),this.hasScrollBar&&(this.options.scrollbar={el:".swiper-scrollbar-"+this.sortId,draggable:!0},this.options.freeMode=!0),this.swiper=new B.a(".swiper-container-"+this.sortId,this.options),console.log("%s","初始化轮播图",this.swiper)})}}},X=W,Y=X,K=(i("dc72"),O(Y,N,R,!1,null,"5e573198",null)),J=K.exports,Q=J,Z=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"video-wrap entrance-con",style:[e.conStyle,e.animationInStyle]},[0!==e.videoItem.length?i("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData,envUrl:e.envUrl},expression:"{data: tipReportData, envUrl}"}],class:["video-con","video-con-"+e.sortId,e.animationInObj.type?e.enterClass:""],style:{width:Math.round(e.attributeJson.baseStyle.w*e.ratio)+"px",height:Math.round(e.attributeJson.baseStyle.h*e.ratio)+"px"}},[i("myVideoPlayer",{attrs:{sort:(new Date).getTime(),videoInfo:e.videoInfo,autoPlay:e.autoPlay,recordId:e.recordId,sortId:e.sortId}}),1===e.attributeJson.isVideoHasHot&&0!=e.videoHotPic.length?i("div",{staticClass:"hot-image"},[i("img",{attrs:{src:e.videoHotPic[0].resourcePath,alt:""}}),i("hotspot",e._g(e._b({ref:"hotspot",attrs:{componentType:3,item:e.hotData,ratio:e.ratio,envUrl:e.envUrl,language:e.language,recordId:e.recordId,sortId:e.sortId,path:e.path,brand:e.brand,uniqueName:e.attributeJson.uniqueName}},"hotspot",e.$attrs,!1),e.$listeners))],1):e._e()],1):e._e()])},ee=[],te=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticStyle:{height:"100%",position:"relative"}},[i("video",{ref:"myVideo-"+e.sort,staticClass:"video-js vjs-default-skin vjs-big-play-centered vjs-16-9 video-item",attrs:{preload:"auto","data-setup":"{}","x5-playsinline":"","x5-video-orientation":"landscape|portrait","x5-video-player-type":"h5","webkit-playsinline":"true",playsinline:"true",controls:e.videoInfo.checkedAttr.indexOf("controls")>-1,autoplay:e.autoPlay,loop:e.videoInfo.checkedAttr.indexOf("loop")>-1,muted:"",poster:0!=e.videoInfo.list.length?e.videoInfo.list[0].imgUrl:""},domProps:{muted:!0}},[i("source",{attrs:{src:0!=e.videoInfo.list.length?e.videoInfo.list[0].resourcePath:""}})]),e.videoInfo.checkedAttr.indexOf("controls")<0?i("div",{staticClass:"video-cover",attrs:{id:[e.recordId+"_"+e.sortId,"video-cover"],"data-sensors-click":"","data-sensorsClick":"true",name:[e.recordId+"_"+e.sortId,"video-cover"]},on:{click:e.clickVideo}}):e._e()])},ie=[],re=i("f0e2"),se={name:"videoPlayer",props:{videoInfo:{type:Object,default:()=>{}},autoPlay:{type:Boolean,default:!1},sort:{type:Number,default:0},recordId:{type:Number,default:0},sortId:{type:Number,default:0}},data(){return{isPlay:!1}},watch:{autoPlay:{handler(e){this.player&&(e?this.player.play():this.player.pause())},immediate:!0}},mounted(){let e=this;setTimeout(()=>{this.player=Object(re["a"])(this.$refs["myVideo-"+this.sort],{},(function(){this.on("play",()=>{e.isPlay=!0}),this.on("pause",()=>{e.isPlay=!1})})),this.$nextTick(()=>{this.play()})},50)},methods:{play(){0!=this.videoInfo.list.length&&this.autoPlay&&this.player.play()},clickVideo(){this.isPlay?this.player.pause():this.player.play()}}},ne=se,ae=ne,oe=(i("eab8"),O(ae,te,ie,!1,null,"ebbd756a",null)),le=oe.exports,de=le,ue={name:"videoItem",mixins:[k],components:{hotspot:G,myVideoPlayer:de},props:{attributeJson:{type:Object,default:function(){}},ratio:{type:Number,default:1,positionList:[]}},data(){return{autoPlay:!1}},watch:{"videoInfo.checkedAttr":{handler(e){this.autoPlay=e.indexOf("autoPlay")>-1},immediate:!0,deep:!0}},computed:{videoItem(){return this.attributeJson.videoInfo.list},videoHotPic(){return this.attributeJson.videoHotInfo.picList},videoHotPop(){return this.attributeJson.videoHotInfo.popList},videoInfo(){return this.attributeJson.videoInfo},hotData(){let{attributeJson:e}=this;return{popList:e.videoHotInfo.popList,width:e.videoHotInfo.picList[0].width,height:e.videoHotInfo.picList[0].height,realWidth:e.baseStyle.w,realHeight:e.baseStyle.h,top:0,left:0}},tipReportData(){return 1==this.attributeJson.isVideoHasHot?void 0:{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:3,popData:{},refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,event:"bannerShow",position:1}}},methods:{}},ce=ue,he=ce,pe=(i("1abf"),O(he,Z,ee,!1,null,"27d3e021",null)),fe=pe.exports,me=fe,ge=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"swiper-wrap",style:[e.conStyle,e.animationInStyle]},[e.hasSwiperItem||1===e.bgStyle.status&&0!=e.bgStyle.picList.length?i("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate"}],class:["swiper-con","swiper-con-"+e.mode],style:{backgroundImage:0!=e.bgStyle.picList.length?"url("+e.bgStyle.picList[0].resourcePath+")":""}},[i("div",{staticClass:"entrance-con",style:{"--hoverColor":e.paginationStyle.hoverColor||e.paginationStyle.color,"--activeColor":e.paginationStyle.activeColor,"--color":e.paginationStyle.color,width:e.baseStyle.w*e.ratio+"px",height:e.baseStyle.h*e.ratio+"px"}},[i("div",{key:e.indicatorType,ref:"swiper"+e.attributeJson.sort,class:["swiper-container swiper-container-"+e.sortId+" swiper-container-"+e.indicatorType,e.animationInObj.type?e.enterClass:""],style:{animationDuration:e.animationInObj.duration+"s"},attrs:{id:"mySwiper-"+e.sortId}},[i("div",{staticClass:"swiper-wrapper"},e._l(e.swiperList,(function(t,r){return i("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData(r),envUrl:e.envUrl},expression:"{data:tipReportData(index), envUrl}"}],key:t.sort+r,class:["swiper-slide",{"slide-auto":e.isSpaceSwiper}]},[i("div",{staticClass:"swiper-width",style:{width:(e.baseStyle.w-(2==e.styleType?100:0))*e.ratio+"px!important",height:e.baseStyle.h*e.ratio+"px"}},[1===t.type?i("img",{attrs:{src:t.picList[0].resourcePath,alt:t.picList[0].resourceName.split(".")[0]}}):e._e(),2===t.type?i("div",{staticClass:"video-player-con"},[i("myVideoPlayer",{attrs:{recordId:e.recordId,sortId:e.sortId,sort:(new Date).getTime(),videoInfo:t.videoInfo,autoPlay:t.videoInfo.checkedAttr.indexOf("autoPlay")>-1&&e.activeIndex==r}}),2==t.type&&1==t.isVideoHasHot&&0!=t.videoHotInfo.picList.length?i("div",{staticClass:"video-hot-image"},[i("img",{attrs:{src:t.videoHotInfo.picList[0].resourcePath,alt:t.videoHotInfo.picList[0].resourceName.split(".")[0]}}),0!=t.videoHotInfo.picList.length?i("div",{staticClass:"swiper-hot"},[i("hotspot",e._g(e._b({ref:"hotspot"+e.sortId+r,refInFor:!0,attrs:{item:{realWidth:t.realWidth,realHeight:t.realHeight,popList:t.videoHotInfo.popList,width:t.videoHotInfo.picList[0].width,height:t.videoHotInfo.picList[0].height},componentType:1,ratio:e.ratio,uniqueName:e.attributeJson.uniqueName,envUrl:e.envUrl,sortId:e.sortId,laySort:e.sort,path:e.path,brand:e.brand,prePosition:e.positionTotal[t.i],recordId:e.recordId}},"hotspot",e.$attrs,!1),e.$listeners))],1):e._e()]):e._e()],1):e._e(),1==t.type&&0!=t.picList.length?[i("hotspot",e._g(e._b({ref:"hotspot"+e.sortId+r,refInFor:!0,attrs:{item:t,ratio:e.ratio,componentType:1,uniqueName:e.attributeJson.uniqueName,path:e.path,envUrl:e.envUrl,sortId:e.sortId,brand:e.brand,prePosition:e.positionTotal[t.i],recordId:e.recordId}},"hotspot",e.$attrs,!1),e.$listeners))]:e._e()],2)])})),0),e.hasScrollBar?i("div",{staticClass:"swiper-scrollbar-own"},[i("div",{staticClass:"swiper-scrollbar-drag",style:{width:100/e.list.length+"%",left:(e.activeIndex>e.list.length?0:100/e.list.length*(e.activeIndex-1))+"%"}})]):e._e(),e.hasSwiperPagination?i("div",{staticClass:"swiper-pagination-custom"},e._l(e.list,(function(t,r){return i("span",{key:r,class:["pagination-custom-bullt",{"bullt-active":e.slideIndex==r}],attrs:{id:[e.recordId+"_"+e.sortId+"_"+Number(r+1),"pagination-custom-bullt"],name:[e.recordId+"_"+e.sortId+"_"+Number(r+1),"pagination-custom-bullt"],"data-sensors-click":"","data-sensorsClick":"true"},on:{click:function(t){return e.swiperSlide(r)}}})})),0):e._e(),e.hasSwiperButton?[i("div",{class:["swiper-button-prev","swiper-button-prev-"+e.sortId]},[e._t("swiper-button-prev",(function(){return[2==e.indicatorType||3==e.indicatorType?i("div",[i("span",{staticClass:"cms2iconfont iconleft",style:e.pageStyle})]):e._e(),4==e.indicatorType?i("div",{staticClass:"arrow"},[i("span",{staticClass:"cms2iconfont iconarrow-left",style:e.pageStyle})]):e._e()]}))],2),i("div",{class:["swiper-button-next","swiper-button-next-"+e.sortId]},[e._t("swiper-button-next",(function(){return[2==e.indicatorType||3==e.indicatorType?i("div",[i("span",{staticClass:"cms2iconfont iconright",style:e.pageStyle})]):e._e(),4==e.indicatorType?i("div",{staticClass:"arrow"},[i("span",{staticClass:"cms2iconfont iconarrow-right",style:e.pageStyle})]):e._e()]}))],2)]:e._e()],2)]),2===e.animationHoverObj.type?i("div",{staticClass:"hover-con",style:[e.hoverStyle,{opacity:e.hoverStyleShow?1:0}]}):e._e()]):e._e()])},ye=[];let ve=16.7;var be={name:"swiperItem",mixins:[k],components:{hotspot:G,myVideoPlayer:de},props:{sortId:{type:Number}},data(){return{hasSwiperItem:!1,swiper:"",activeIndex:0,slideIndex:0,hasInitSwiper:!1,positionList:[],positionTotal:[]}},computed:{bgStyle(){return this.attributeJson.bgStyle},list(){return this.attributeJson.list},styleType(){return this.attributeJson.styleType},indicatorType(){return this.attributeJson.indicatorType},paginationStyle(){return this.attributeJson.paginationStyle},pageStyle(){return{color:this.attributeJson.paginationStyle.color}},hasSwiperPagination(){return 3==this.indicatorType},hasSwiperButton(){return 1!=this.indicatorType},hasScrollBar(){return"pc"==this.mode&&2==this.indicatorType},isSpaceSwiper(){return"mobile"==this.mode&&2==this.styleType},tipReportData(){let e=[],t=[];return this.list.forEach(t=>{1==t.type&&0!=t.popList.length||0!=t.videoHotInfo.popList.length?e.push(1==t.type?t.popList.length:t.videoHotInfo.popList.length):e.push(1)}),e.forEach((i,r)=>{let s=e.slice(0,r),n=s.reduce((e,t)=>e+t,0);t.push(n)}),this.positionList=e,this.positionTotal=t,function(e){let t=this.swiperList[e];return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:1,popData:{},materialId:this.recordId+"_"+this.sortId+"_"+t.sort,materialName:t.uniqueName,refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:this.positionTotal[e]+1,event:"bannerShow"}}}},mounted(){this.$nextTick(()=>{this.judgeSwiper()})},methods:{judgeSwiper(){let e=this.attributeJson.list,t=e.findIndex(e=>0!=e.picList.length||0!=e.videoInfo.list.length);if(this.hasSwiperItem=t>-1,this.hasSwiperItem){e.forEach((e,t)=>{e.i=t});let t=JSON.parse(JSON.stringify(e));this.swiperList=e.concat(JSON.parse(JSON.stringify(t))),this.swiperList=t.concat(this.swiperList),this.initSwiper(!0)}},initSwiper:function(e){(this.hasSwiperItem||1===this.bgStyle.status&&0!=this.bgStyle.picList.length)&&this.$nextTick(()=>{this.swiper&&(this.swiper.destroy(!0,!0),this.swiper=null);let{attributeJson:e}=this;this.options={effect:"slide",observer:!0,observeParents:!0,preventInteractionOnTransition:!0,autoplay:!!e.autoPlay&&{delay:1e3*e.interval,disableOnInteraction:!1,stopOnLastSlide:!1}},"mobile"==this.mode&&2==this.styleType&&(this.options.spaceBetween=10,this.options.loop=!1,this.options.slidesPerView="auto",this.options.centeredSlides=!0),this.hasSwiperButton&&(this.options.navigation={nextEl:".swiper-button-next-"+this.sortId,prevEl:".swiper-button-prev-"+this.sortId});let t=this,i=this.list.length;this.options.on={slideChangeTransitionEnd:function(){t.activeIndex=this.activeIndex,t.slideIndex=t.swiperList[this.activeIndex].i},slideNextTransitionEnd:function(){this.activeIndex==2*i&&this.slideTo(i,ve)},slidePrevTransitionEnd:function(){this.activeIndex==i-1&&this.slideTo(2*i-1,ve)}},this.swiper=new B.a(".swiper-container-"+this.sortId,this.options),this.swiper instanceof Array?this.swiper.forEach(e=>{e.slideTo(i,ve)}):this.swiper.slideTo(i,ve)})},swiperSlide(e){this.swiper.slideTo(e),this.slideIndex=e}}},_e=be,Te=_e,Se=(i("6e0e"),O(Te,ge,ye,!1,null,"5b4a67cf",null)),we=Se.exports,Ee=we,Ce=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"button-wrap",style:[e.conStyle,e.animationInStyle]},[i("div",{ref:"button"+e.attributeJson.sort,class:["button-cl","button-cl-"+e.sortId],attrs:{id:[e.recordId+"_"+e.sortId,"button-cl"],name:[e.recordId+"_"+e.sortId,"button-cl"],"data-sensors-click":"","data-sensorsClick":"true"},on:{click:e.pageClick}},[i("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate"},{name:"treport",rawName:"v-treport",value:{data:e.tipReportData,envUrl:e.envUrl},expression:"{data:tipReportData, envUrl}"}],staticClass:"button-content",class:[{flexCenterBetween:e.iconImage},4===e.animationHoverObj.type?e.hoverDirection:""],style:[e.buttonStyle,{"--width":e.hoverStyleShow?"100%":"0","--height":e.hoverStyleShow?"100%":"0","--bgColor":e.animationHoverObj.bgStyle.backgroundColor}]},[e.iconStyle&&1===e.iconStyle.type&&1===e.iconStyle.position&&e.iconImage?i("img",{attrs:{src:e.iconImage,alt:""}}):e._e(),i("div",{staticClass:"label",style:e.buttonTextStyle},[e._v(e._s(e.attributeJson.label||"按钮"))]),e.iconStyle&&1===e.iconStyle.type&&2===e.iconStyle.position&&e.iconImage?i("img",{attrs:{src:e.iconImage,alt:""}}):e._e(),5===e.animationHoverObj.type&&e.hoverImage&&e.hoverStyleShow?i("img",{staticClass:"hover-image",attrs:{src:e.hoverImage,alt:""}}):e._e()]),2===e.animationHoverObj.type?i("div",{staticClass:"hover-con",style:[e.hoverStyle,{opacity:e.hoverStyleShow?1:0,borderRadius:e.attributeJson.borderStyle.borderRadius+"px"}]}):e._e()])])},xe=[],ke={name:"buttonItem",mixins:[k],components:{},props:{},data(){return{iconImage:"",backgroundImage:"",hoverButtonStyle:{}}},watch:{bgStyle:{handler(e){0!=e.picList.length&&(this.backgroundImage=2===e.type?e.picList[0].resourcePath:"")},immediate:!0,deep:!0},iconStyle:{handler(e){e&&0!=e.picList.length&&(this.iconImage=1===e.type?e.picList[0].resourcePath:"")},immediate:!0,deep:!0}},computed:{iconStyle(){return this.attributeJson.iconStyle},bgStyle(){return this.attributeJson.bgStyle},buttonStyle(){let{bgStyle:e,fontStyle:t,borderStyle:i,space:r}=this.attributeJson,{borderTop:s,borderRight:n,borderBottom:a,borderLeft:o,borderColor:l}=i,d="mobile"==this.mode?2*this.ratio:this.ratio,u={fontSize:parseFloat(t.fontSize)*d+"px",color:t.color,backgroundColor:1===e.type?e.backgroundColor:"",fontWeight:t.fontWeight?"bold":"",textDecoration:t.textDecoration?"underline":"",fontStyle:t.fontItalic?"italic":"",borderRadius:i.borderRadius+"px",backgroundImage:`url('${this.backgroundImage}')`,paddingLeft:r.left+"px",paddingRight:r.right+"px"};return 1===i.type&&l&&(u.border="1px solid "+l),2===i.type&&(u.borderTop=s?"1px solid "+s:"none",u.borderRight=n?"1px solid "+n:"none",u.borderBottom=a?"1px solid "+a:"none",u.borderLeft=o?"1px solid "+o:"none"),u},buttonTextStyle(){return{color:this.attributeJson.fontStyle.color,"--hoverColor":this.attributeJson.fontStyle.hoverObj.color||this.attributeJson.fontStyle.color}},tipReportData(){return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:17,popData:{},refererPagePath:this.refererPagePath,path:this.path,brand:this.brand,position:1,event:"bannerShow"}}},methods:{pageClick(){if(this.attributeJson.linkObj.jumpLinkType)try{let e=JSON.parse(JSON.stringify(this.tipReportData));e.event="bannerClick";let t=C(e,this.envUrl,"click"),i=new Blob([JSON.stringify(t)],{type:"application/json"});navigator.sendBeacon(this.envUrl+"service-zuul/data/collect/acquisition",i)}catch(e){}this.$emit("jumpLink",this.attributeJson.linkObj)}}},Ie=ke,Ae=Ie,Pe=(i("866e"),O(Ae,Ce,xe,!1,null,"136e477e",null)),Oe=Pe.exports,Le=Oe,De=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"product-wrap entrance-con",style:[e.conStyle,e.paginationShow,e.animationInStyle]},[i("div",{class:["product-con",e.animationInObj.type?e.enterClass:""],style:[{width:e.baseStyle.w*e.ratio+"px",height:e.baseStyle.h*e.ratio+"px",padding:"0 "+e.attributeJson.goodsPaddingSpacing+"px",animationDuration:e.animationInObj.duration+"s"}]},[e.isSwiper?e._e():i("div",{ref:"slide"+e.sortId,class:"slide-con slide-con-"+e.styleType+"-"+e.mode,style:{width:e.attributeJson.baseStyle.w*e.ratio+e.attributeJson.goodsSpacing+"px",margin:"0px -"+e.attributeJson.goodsSpacing/2+"px"}},e._l(e.productList,(function(t,r){return i("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData(r),envUrl:e.envUrl},expression:"{data:tipReportData(index), envUrl}"},{name:"hoverAnimate",rawName:"v-hoverAnimate",value:{key:"productIndex",value:r},expression:"{ key: 'productIndex', value: index }"}],key:t.id,ref:"product"+t.code+r,refInFor:!0,class:["product-item","product"+t.code+r],style:[e.productStyle],attrs:{id:[e.recordId+"_"+e.sortId+"_"+t.code,"product-item"],name:[e.recordId+"_"+e.sortId+"_"+t.code,"product-item"],"data-sensors-click":"","data-sensorsClick":"true"},on:{click:function(i){return e.gotoPDP(t.code,t.colorCode,t.name,r)}}},[i("div",{staticClass:"product-image"},[i("img",{style:[3===e.animationHoverObj.type&&e.productIndex==r?e.hoverStyle:""],attrs:{src:2==e.attributeJson.goodsImgType&&t.customImage?t.customImage:t.mainPicUrl,alt:t.name}})]),0!=e.attributeJson.showInfo.length?i("div",{class:["product-info","position"+e.attributeJson.infoPoisition,{transparent:2==e.attributeJson.isHover&&e.productIndex!=r}]},[e._t("productInfo",(function(){return[e.attributeJson.showInfo.indexOf(1)>-1?i("div",{staticClass:"product-name"},[e._v(e._s(t.name))]):e._e(),i("div",{staticClass:"price-con"},[e.attributeJson.showInfo.indexOf(2)>-1?i("div",[e._v("¥"+e._s(t.salesPrice||0))]):e._e(),t.salesPrice!=t.standardPrice&&e.attributeJson.showInfo.indexOf(3)>-1?i("div",{staticClass:"standardPrice"},[e._v(" ¥"+e._s(t.standardPrice||0)+" ")]):e._e()])]}))],2):e._e(),2===e.animationHoverObj.type?i("div",{staticClass:"hover-con",style:[e.hoverStyle,{opacity:e.productIndex===r?1:0,margin:"0 "+e.goodsSpacing/2+"px"}]}):e._e()])})),0),e.isSwiper?i("div",{key:e.styleType+e.indicatorType,ref:"slide"+e.sortId,class:"swiper-container swiper-container-"+e.sortId,attrs:{id:"mySwiper-"+e.sortId}},[i("div",{staticClass:"swiper-wrapper",style:[{width:e.baseStyle.w*e.ratio+"px"}]},e._l(e.productList,(function(t,r){return i("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate",value:{key:"productIndex",value:r},expression:"{ key: 'productIndex', value: index }"},{name:"treport",rawName:"v-treport",value:{data:e.tipReportData(r),envUrl:e.envUrl},expression:"{data:tipReportData(index), envUrl}"}],key:t.id,class:"swiper-slide swiper-slide-"+e.styleType+"-"+e.mode,style:[e.productStyle]},[i("div",{ref:"product"+t.code+r,refInFor:!0,style:{height:e.attributeJson.baseStyle.h*e.ratio+"px"},attrs:{id:[e.recordId+"_"+e.sortId+"_"+t.code,"product-item"],"data-sensors-click":"","data-sensorsClick":"true",name:[e.recordId+"_"+e.sortId+"_"+t.code,"product-item"]},on:{click:function(i){return e.gotoPDP(t.code,t.colorCode,t.name,r)}}},[i("div",{staticClass:"product-image"},[i("img",{style:[3===e.animationHoverObj.type&&e.productIndex==r?e.hoverStyle:""],attrs:{src:2==e.attributeJson.goodsImgType&&t.customImage?t.customImage:t.mainPicUrl,alt:""}})]),0!=e.attributeJson.showInfo.length?i("div",{class:["product-info","position"+e.attributeJson.infoPoisition,{transparent:2==e.attributeJson.isHover&&e.productIndex!=r}]},[e._t("productInfo",(function(){return[e.attributeJson.showInfo.indexOf(1)>-1?i("div",{staticClass:"product-name"},[e._v(" "+e._s(t.name)+" ")]):e._e(),i("div",{staticClass:"price-con"},[e.attributeJson.showInfo.indexOf(2)>-1?i("div",[e._v("¥"+e._s(t.salesPrice||0))]):e._e(),t.salesPrice!=t.standardPrice&&e.attributeJson.showInfo.indexOf(3)>-1?i("div",{staticClass:"standardPrice"},[e._v(" ¥"+e._s(t.standardPrice||0)+" ")]):e._e()])]}))],2):e._e(),2===e.animationHoverObj.type?i("div",{staticClass:"hover-con",style:[e.hoverStyle,{opacity:e.productIndex===r?1:0}]}):e._e()])])})),0),e.hasScrollBar?i("div",{class:"swiper-scrollbar swiper-scrollbar-"+e.sortId}):e._e(),e.hasSwiperButton?i("div",{class:"swiper-button-prev swiper-button-prev-"+e.sortId},[e._t("swiper-button-prev",(function(){return[2==e.indicatorType?i("div",[i("span",{staticClass:"cms2iconfont iconleft",style:e.pageStyle})]):e._e()]}))],2):e._e(),e.hasSwiperButton?i("div",{class:"swiper-button-next swiper-button-next-"+e.sortId},[e._t("swiper-button-next",(function(){return[2==e.indicatorType?i("div",[i("span",{staticClass:"cms2iconfont iconright",style:e.pageStyle})]):e._e()]}))],2):e._e()]):e._e()])])},Me=[],Ne={name:"productItem",mixins:[k],components:{},props:{sortId:{type:Number}},data(){return{productList:[],swiper:"",productStyle:{},service:new y,productIndex:"",windowHeight:0}},watch:{addProduct:{handler(e){this.isClient&&(1==e.type&&0==e.itemCodeList.length||(2!=e.type||e.categoryGroupCode)&&(3!=e.type||e.cmsSortCode)&&this.getProductList())},immediate:!0,deep:!0},ratio:{handler(){!this.isSwiper&&this.productStyle.width&&(this.productStyle.width=(this.attributeJson.baseStyle.w*this.ratio-2*this.attributeJson.goodsPaddingSpacing+this.goodsSpacing)/this.showNum+"px")}}},computed:{addProduct(){return this.attributeJson.addProduct},goodsPaddingSpacing(){return this.attributeJson.goodsPaddingSpacing},goodsSpacing(){return this.attributeJson.goodsSpacing},itemsPerLine(){return this.attributeJson.itemsPerLine},indicatorType(){return this.attributeJson.indicatorType},isSwiper(){return"pc"==this.mode&&1==this.styleType||"mobile"==this.mode&&2==this.styleType&&(2==this.indicatorType||3==this.indicatorType)},hasSwiperButton(){return"pc"==this.mode&&1==this.styleType&&2==this.indicatorType||"mobile"==this.mode&&2==this.styleType&&2==this.indicatorType},hasScrollBar(){return"mobile"==this.mode&&2==this.styleType&&3==this.indicatorType},paginationShow(){let{paginationStyle:e}=this.attributeJson;return{"--hoverColor":e.hoverColor||e.color,"--activeColor":e.activeColor,"--color":e.color}},pageStyle(){return{color:this.attributeJson.paginationStyle.color}},showNum(){let e=1;return"pc"==this.mode?e=this.attributeJson.itemsPerLine:1==this.attributeJson.styleType?e=2.5:2==this.attributeJson.styleType&&(e=this.attributeJson.itemsPerLine),e},tipReportData(){return function(e){let t=this.productList[e];return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:4,popData:{productCode:t.code,selectDataShow:t.name},materialId:this.recordId+"_"+this.sortId,materialName:this.attributeJson.uniqueName,refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:e+1,event:"bannerShow"}}}},mounted(){this.productList=this.attributeJson.productList,this.initProduct()},methods:{getProductList:function(){let e={};switch(this.addProduct.type){case 1:e={itemCodeList:this.addProduct.itemCodeList,pageNum:1,pageSize:this.addProduct.itemCodeList.length};break;case 2:e={categoryParam:{categoryCodeList:this.addProduct.categoryCodeList,categoryGroupCode:this.addProduct.categoryGroupCode},pageNum:1,pageSize:this.addProduct.max,sortRuleId:this.addProduct.sortId};break;case 3:e={pageNum:1,pageSize:this.addProduct.max,sortField:this.addProduct.cmsSortCode};break}3==this.addProduct.type?this.service.getSortProductInfo(this.envUrl,e,this.language).then(e=>{if(e&&e.list){let t=document.querySelector(".entrance-con"+this.sortId),i=t&&t.classList.contains("entrance-demonstrate");i&&t.firstChild.style&&(t.firstChild.style.display="block"),this.productList=e.list,this.initProduct()}else this.productList=[]}):this.service.getProductInfo(this.envUrl,e,this.language).then(e=>{if(e&&e.list){let t=document.querySelector(".entrance-con"+this.sortId),i=t&&t.classList.contains("entrance-demonstrate");i&&t.firstChild.style&&(t.firstChild.style.display="block"),this.productList=e.list,this.initProduct()}else this.productList=[]})},initProduct:function(){let{attributeJson:e,addProduct:t}=this;2==e.goodsImgType&&0!=t.customImageList.length&&this.productList.forEach((e,i)=>{0!=t.customImageList[i].picList.length&&this.$set(e,"customImage",t.customImageList[i].picList[0].resourcePath)}),this.productList&&this.productList.length>0&&(this.isSwiper?this.initSwiper():this.initSlide())},initSwiper:function(){let{attributeJson:e,indicatorType:t,styleType:i}=this;this.$nextTick(()=>{this.swiper&&(this.swiper.destroy(!0,!0),this.swiper=null),this.options={effect:"slide",autoplay:!1,slidesPerView:this.showNum,spaceBetween:e.goodsSpacing},2==i&&2==t&&(this.options.pagination={el:".swiper-pagination-"+this.sortId,clickable:!0}),this.hasSwiperButton&&(this.options.navigation={nextEl:".swiper-button-next-"+this.sortId,prevEl:".swiper-button-prev-"+this.sortId}),this.hasScrollBar&&(this.options.scrollbar={el:".swiper-scrollbar-"+this.sortId,draggable:!0},this.options.freeMode=!0),this.swiper=new B.a(".swiper-container-"+this.sortId,this.options)})},initSlide(){this.productStyle={padding:`0 ${this.goodsSpacing/2}px`,width:(this.attributeJson.baseStyle.w*this.ratio-2*this.attributeJson.goodsPaddingSpacing+this.goodsSpacing)/this.showNum+"px",marginBottom:this.goodsSpacing+"px"}},gotoPDP(e,t,i,r){try{let e=JSON.parse(JSON.stringify(this.tipReportData(r)));e.event="bannerClick";let t=C(e,this.envUrl,"click"),i=new Blob([JSON.stringify(t)],{type:"application/json"});navigator.sendBeacon(this.envUrl+"service-zuul/data/collect/acquisition",i)}catch(s){}this.$emit("gotoPDP",{code:e,colorCode:t})}}},Re=Ne,Ue=Re,Be=(i("8ee5"),O(Ue,De,Me,!1,null,"5f1e1175",null)),je=Be.exports,Fe=je,qe=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"simplyText-wrap entrance-con",style:[e.conStyle,e.animationInStyle],on:{click:e.pageClick}},[i("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate"},{name:"cursor",rawName:"v-cursor"}],staticClass:"text-con"},[i("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData,envUrl:e.envUrl},expression:"{data:tipReportData, envUrl}"}],staticClass:"text-show",style:[e.textStyle,e.hoverStyleShow?e.hoverStyle:""]},[e._v(e._s(e.attributeJson.label))])])])},$e=[],He={name:"simplyText",inheritAttrs:!1,mixins:[k],computed:{textStyle(){let{fontStyle:{fontSize:e,color:t,fontWeight:i,textDecoration:r,lineHeight:s,fontItalic:n,letterSpacing:a,fontBackColor:o,fontFamily:l},textAlign:d}=this.attributeJson,u="mobile"==this.mode?2*this.ratio:this.ratio,c={fontSize:parseFloat(e)*u+"px",color:t,fontWeight:i?"bold":"",textDecoration:r?"underline":"",fontStyle:n?"italic":"",lineHeight:s,letterSpacing:(a||0)+"px",backgroundColor:o||"",fontFamily:l,textAlign:d};return c},tipReportData(){return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:24,popData:{},refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:1,event:"bannerShow"}}},methods:{pageClick(){if(this.attributeJson.linkObj.jumpLinkType)try{let e=JSON.parse(JSON.stringify(this.tipReportData));e.event="bannerClick";let t=C(e,this.envUrl,"click"),i=new Blob([JSON.stringify(t)],{type:"application/json"});navigator.sendBeacon(this.envUrl+"service-zuul/data/collect/acquisition",i)}catch(e){console.log(e)}this.$emit("jumpLink",this.attributeJson.linkObj)}}},ze=He,Ve=ze,Ge=(i("2e43"),O(Ve,qe,$e,!1,null,"1d184ad9",null)),We=Ge.exports,Xe=We,Ye={name:"singleLayout",inheritAttrs:!1,components:{textItem:M,imgNav:Q,videoItem:me,swiperItem:Ee,buttonItem:Le,productItem:Fe,simplyText:Xe},props:{layOutData:{type:Object,default:()=>{}},ratio:{type:Number,default:1},canDragInc:{type:Boolean,default:!0}},data(){return{vLine:[],hLine:[],componentName:""}},computed:{layoutStyle:function(){return this.layOutData.layoutStyle?{backgroundImage:2===this.layOutData.layoutStyle.bgStyle.type&&0!=this.layOutData.layoutStyle.bgStyle.picList.length&&`url(${this.layOutData.layoutStyle.bgStyle.picList[0].resourcePath})`,backgroundColor:1===this.layOutData.layoutStyle.bgStyle.type&&this.layOutData.layoutStyle.bgStyle.backgroundColor}:{}}},methods:{getCustom(){let e=this.layOutData.componentList.filter(e=>e.type>100);return e}}},Ke=Ye,Je=Ke,Qe=(i("6013"),O(Je,o,l,!1,null,"916fe080",null)),Ze=Qe.exports,et=Ze,tt=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{key:e.layOutData.layoutStyle.height,staticClass:"multiple-layout",style:{height:Math.round(e.layOutData.layoutStyle.height*e.ratio)+"px"}},[e._l(e.layOutData.list,(function(t,r){return[i("div",{key:r,staticClass:"multiple-item",style:{width:Math.round(t.baseStyle.w*e.ratio)+"px",height:Math.round(e.layOutData.layoutStyle.height*e.ratio)+"px",zIndex:e.currentIndex==r?1:"auto"}},[i("singleLayout",e._g(e._b({ref:"multipleSingle",refInFor:!0,attrs:{layOutData:t,componentList:t.componentList,"parent-l":t.baseStyle.l,ratio:e.ratio,recordId:e.recordId,mode:e.mode}},"singleLayout",e.$attrs,!1),e.$listeners))],1)]}))],2)},it=[],rt={name:"multipleLayout",components:{singleLayout:et},props:{layOutData:{type:Object,default:()=>{}},ratio:{type:Number,default:1},mode:{type:String,default:"pc"},recordId:{type:Number,default:0}},inheritAttrs:!1,data(){return{w:200,currentItem:null,currentIndex:""}},watch:{},mounted(){},methods:{}},st=rt,nt=st,at=(i("8b28"),O(nt,tt,it,!1,null,"62f273ef",null)),ot=at.exports,lt=ot,dt=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData,envUrl:e.envUrl,isClient:e.isClient},expression:"{data:tipReportData, envUrl, isClient}"}],ref:"custom"+e.layOutData.sort,staticClass:"custom-layout"},[i("div",{staticClass:"add-con"}),e._t("customComponent",null,{attributeJson:e.layOutData})],2)},ut=[],ct={name:"customLayout",props:{layOutData:{type:Object,default:()=>{}},envUrl:{type:String,default:""},path:{type:String},isClient:{type:Boolean,default:!0}},inheritAttrs:!1,computed:{tipReportData(){return{uniqueId:this.layOutData.sort,uniqueName:this.uniqueName,componentType:7,popData:{},refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:1}}},methods:{},directives:{treport:E}},ht=ct,pt=ht,ft=(i("3de5"),O(pt,dt,ut,!1,null,"2e732634",null)),mt=ft.exports,gt=mt,yt=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"tab-layout"},[e.hasTab?i("div",{staticClass:"tab-detail tab-con"},[i("div",[2==e.tabHeadInfo.showTitle?i("div",{ref:"tabHeadTitleDom",style:e.titleStyle},[i("span",[e._v(e._s(1==e.tabHeadInfo.customTitle?e.tabHeadInfo.title:e.list[e.tabIndex].title))])]):e._e(),i("div",{staticClass:"tab-list"},[i("div",{staticClass:"tab-line"},e._l(e.list,(function(t,r){return i("navItem",{key:r,attrs:{id:[e.recordId+"_"+e.sort+"_"+Number(r+1),"nav-item"],name:[e.recordId+"_"+e.sort+"_"+Number(r+1),"nav-item"],item:t,ratio:e.ratio,mode:e.mode,spacing:e.layOutData.fontStyle.spacing*e.ratio,active:e.tabIndex==r,navStyle:e.navStyle(r),"data-sensors-click":"","data-sensorsClick":"true"},nativeOn:{click:function(i){return e.chooseTab(t,r)}}})})),1)]),i("div",{staticClass:"tab-content",style:{height:e.list[e.tabIndex].height*e.ratio+"px",transform:"translateX("+100*-e.tabIndex+"%)"}},e._l(e.list,(function(t,r){return i("div",{key:r,staticClass:"tab-single"},[i("singleLayout",e._g(e._b({ref:"tabSingle"+r,refInFor:!0,attrs:{layOutData:t,componentList:t.componentList,ratio:e.ratio,recordId:e.recordId,mode:e.mode}},"singleLayout",e.$attrs,!1),e.$listeners))],1)})),0)])]):e._e()])},vt=[],bt=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"nav-item",style:[e.navStyle,e.backStyle]},[i("span",{style:{marginLeft:e.spacing+"px"}},[e._v(e._s(e.item.title))])])},_t=[],Tt={name:"navItem",props:{item:{type:Object,default:()=>{}},active:{type:Boolean,default:!1},navStyle:{type:Object,default:()=>{}},spacing:{type:[String,Number],default:0}},data(){return{}},watch:{},computed:{backStyle(){let{item:e,active:t}=this;return{backgroundColor:1==e.navStyle.type?t?e.navStyle.activeColor:e.navStyle.backgroundColor:"",backgroundImage:2==e.navStyle.type?t?`url('${e.navStyle.activeBackImage}')`:`url('${e.navStyle.backImage}')`:""}}},methods:{}},St=Tt,wt=St,Et=(i("ae5c"),O(wt,bt,_t,!1,null,"45583ab2",null)),Ct=Et.exports,xt=Ct,kt={name:"tabLayout",components:{navItem:xt,singleLayout:et},props:{sort:{type:Number,default:0},layOutData:{type:Object,default:()=>{}},ratio:{type:Number,default:1},mode:{type:String,default:"pc"},recordId:{type:Number,default:0}},data(){return{tabIndex:0,activeSort:"",tabHeadTitleH:0}},computed:{hasTab(){return this.layOutData.list.some(e=>e.title)},list(){return this.layOutData.list},tabHeadInfo(){return this.layOutData.tabHeadInfo},navStyle(){let{tabHeadInfo:{width:e,height:t},borderStyle:i,fontStyle:{fontSize:r,color:s,fontWeight:n,textDecoration:a,fontItalic:o,hoverObj:{color:l}}}=this.layOutData,{borderTop:d,borderRight:u,borderBottom:c,borderLeft:h,borderColor:p,hoverObj:f}=i;return function(){return{width:e*this.ratio+"px",height:t*this.ratio+"px",color:s,fontSize:r,fontWeight:n?"bold":"",textDecoration:a?"underline":"",fontStyle:o?"italic":"",borderTop:2===i.type&&d?"1px solid "+d:1===i.type&&p?"1px solid "+p:"none",borderRight:2===i.type&&u?"1px solid "+u:1===i.type&&p?"1px solid "+p:"none",borderBottom:2===i.type&&c?"1px solid "+c:1===i.type&&p?"1px solid "+p:"none",borderLeft:2===i.type&&h?"1px solid "+h:1===i.type&&p?"1px solid "+p:"none","--hoverColor":l,"--hoverBorderTop":2===f.type&&f.borderTop?"1px solid "+f.borderTop:1===f.type&&f.borderColor?"1px solid "+f.borderColor:"none","--hoverBorderRight":2===f.type&&f.borderRight?"1px solid "+f.borderRight:1===f.type&&f.borderColor?"1px solid "+f.borderColor:"none","--hoverBorderBottom":2===f.type&&f.borderBottom?"1px solid "+f.borderBottom:1===f.type&&f.borderColor?"1px solid "+f.borderColor:"none","--hoverBorderLeft":2===f.type&&f.borderLeft?"1px solid "+f.borderLeft:1===f.type&&f.borderColor?"1px solid "+f.borderColor:"none"}}},titleStyle(){let{tabHeadInfo:{titleStyle:{fontSize:e,color:t,fontWeight:i,textDecoration:r,fontItalic:s}}}=this.layOutData;return{color:t,fontSize:e,fontWeight:i?"bold":"",textDecoration:r?"underline":"",fontStyle:s?"italic":"",paddingLeft:("pc"==this.mode?30:60)*this.ratio+"px",paddingBottom:("pc"==this.mode?40:80)*this.ratio+"px"}}},watch:{"layOutData.tabHeadInfo":{handler:function(){this.$nextTick(()=>{this.tabHeadTitleH=2==this.layOutData.tabHeadInfo.showTitle&&this.$refs["tabHeadTitleDom"]?this.$refs["tabHeadTitleDom"].clientHeight:0,this.setLayoutH()})},immediate:!0,deep:!0},"list.length":{handler:function(){let e=this.list.findIndex(e=>e.sort==this.activeSort);e>-1?this.tabIndex=e:(this.tabIndex=this.tabIndex>0?this.tabIndex-1:0,this.activeSort=this.list[this.tabIndex].sort)},deep:!0},hasTab:{handler:function(e){e&&(this.activeSort=this.list[0].sort,this.tabIndex=0)}}},methods:{chooseTab(e,t){this.activeSort=e.sort,this.tabIndex=t,this.setLayoutH(),this.$emit("updateLayOut",{sort:this.layOutData.sort})},setLayoutH:function(){this.$set(this.layOutData.layoutStyle,"height",1*this.layOutData.list[this.tabIndex].height+1*this.layOutData.tabHeadInfo.height+1*this.tabHeadTitleH/this.ratio)}}},It=kt,At=It,Pt=(i("266b"),O(At,yt,vt,!1,null,"6ab7fd00",null)),Ot=Pt.exports,Lt=Ot,Dt=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"slide-wrap",style:{"--hoverColor":e.paginationStyle.hoverColor||e.paginationStyle.color,"--activeColor":e.paginationStyle.activeColor,"--color":e.paginationStyle.color}},[i("div",{key:e.indicatorType,class:["swiper-container swiper-container-"+e.recordId+" swiper-container-"+e.indicatorType],attrs:{id:"mySwiper-"+e.recordId}},[i("div",{staticClass:"swiper-wrapper"},e._l(e.slideList,(function(t,r){return i("div",{key:r,class:["swiper-slide",{"slide-auto":1==e.widthStyle.type||e.centeredSlides}],style:[e.backStyle(t.i),{width:1==e.widthStyle.type?t.slideWidth*e.ratio+"px":e.backStyle(t.i).width}]},[i("singleLayout",e._g(e._b({ref:t.isCopy?"":"slideSingle",refInFor:!0,attrs:{layOutData:t,ratio:e.ratio,recordId:e.recordId,mode:e.mode}},"singleLayout",e.$attrs,!1),e.$listeners))],1)})),0),e.hasSwiperButton?i("div",{class:["swiper-button-prev","swiper-button-prev-"+e.recordId]},[e._t("swiper-button-prev",(function(){return[i("div",{staticClass:"arrow"},[i("span",{staticClass:"cms2iconfont iconarrow-left",style:e.pageStyle})])]}))],2):e._e(),e.hasSwiperButton?i("div",{class:["swiper-button-next","swiper-button-next-"+e.recordId]},[e._t("swiper-button-next",(function(){return[i("div",{staticClass:"arrow"},[i("span",{staticClass:"cms2iconfont iconarrow-right",style:e.pageStyle})])]}))],2):e._e()])])},Mt=[],Nt={name:"slideLayout",components:{singleLayout:et},props:{layOutData:{type:Object,default:()=>{}},ratio:{type:Number,default:1},mode:{type:String,default:"pc"},recordId:{type:Number,default:0}},data(){return{swiper:"",slideIndex:0,layWidth:1920,isInit:!1,slideList:[]}},watch:{layoutStyle:{handler(e){this.layWidth=("pc"==this.mode?1920:750)*(e.widthStyle.width/100)},deep:!0,immediate:!0},slideLen:{handler(){this.calculateWidth()},immediate:!0}},computed:{layoutStyle(){return this.layOutData.layoutStyle},paginationStyle(){return this.layOutData.paginationStyle},bgStyle(){return this.layOutData.bgStyle},list(){return this.layOutData.list},styleType(){return this.layOutData.styleType},indicatorType(){return this.layOutData.indicatorType},widthStyle(){return this.layOutData.widthStyle},hasSwiperButton(){return 2==this.indicatorType},pageStyle(){return{color:this.layOutData.paginationStyle.color}},backStyle(){let{bgStyle:e,layoutStyle:t,styleType:i,mode:r}=this;return function(s){let n=this.list[s],a="",o="";1==e.status?1==e.type?a=e.backgroundColor||"":o=0!=e.picList.length?`url(${e.picList[0].resourcePath})`:"":1==n.bgStyle.type?a=n.bgStyle.backgroundColor||"":o=0!=n.bgStyle.picList.length?`url(${n.bgStyle.picList[0].resourcePath})`:"";let l="mobile"==r||"pc"==r&&2==i,d=l?this.layWidth-0*(this.layOutData.lineSlideNum+1)-("mobile"==r?20:556):this.layWidth;return{width:d/this.layOutData.lineSlideNum*this.ratio+"px",height:Math.ceil(t.height*this.ratio)+"px",backgroundColor:a,backgroundImage:o}}},slideLen(){return this.layOutData.list.length},centeredSlides(){return"mobile"==this.mode||"pc"==this.mode&&2==this.styleType}},methods:{calculateWidth:function(){let{list:e}=this;e.forEach((e,t)=>{e.i=t});let t=JSON.parse(JSON.stringify(e));t.forEach(e=>{e.isCopy=!0}),this.slideList=e.concat(JSON.parse(JSON.stringify(t))),this.slideList=t.concat(this.slideList),this.$nextTick(()=>{if(2==this.layOutData.widthStyle.type)return void this.initSwiper();let{layWidth:e}=this;this.slideList.forEach(t=>{let i=t.componentList[0],r=0;if(i){let t=i.attributeJson;if(2==i.type){let i=t.list.some(e=>0!=e.picList.length);r=i?t.baseStyle.w+t.baseStyle.l:e}else if(3==i.type){let i=0!=t.videoInfo.list.length;r=i?t.baseStyle.w+t.baseStyle.l:e}else r=t.baseStyle.w+t.baseStyle.l}else r=e;this.$set(t,"slideWidth",r)}),this.$nextTick(()=>{this.initSwiper()})})},initSwiper(){this.$nextTick(()=>{this.swiper&&(this.swiper.destroy(!0,!0),this.swiper=null);let{layOutData:e,widthStyle:t,ratio:i,slideLen:r}=this;this.options={effect:"slide",observer:!0,observeParents:!0,slidesPerView:this.centeredSlides||1==t.type?"auto":e.lineSlideNum,preventInteractionOnTransition:!0,slidesPerGroup:1,slidesPerGroupAuto:!0,centeredSlides:this.centeredSlides||1==t.type,spaceBetween:this.centeredSlides?0*i:0,autoplay:!!(e.autoPlay&&this.list.length>1)&&{delay:1e3*e.interval,disableOnInteraction:!1,stopOnLastSlide:!1}},1==t.type&&(this.options.loopedSlides=4,this.options.loopAdditionalSlides=2);let s=this;this.options.on={slideNextTransitionEnd:function(){this.activeIndex==2*r&&this.slideTo(r,0),s.slideIndex=this.activeIndex},slidePrevTransitionEnd:function(){this.activeIndex==r-1&&this.slideTo(2*r-1,0)}},this.hasSwiperButton&&(this.options.navigation={nextEl:".swiper-button-next-"+this.recordId,prevEl:".swiper-button-prev-"+this.recordId}),this.swiper=new B.a(".swiper-container-"+this.recordId,this.options),this.swiper.slideTo(r,0)})}}},Rt=Nt,Ut=Rt,Bt=(i("1cfd"),O(Ut,Dt,Mt,!1,null,"407dcfa9",null)),jt=Bt.exports,Ft=jt,qt={name:"cms",inheritAttrs:!1,components:{singleLayout:et,multipleLayout:lt,customLayout:gt,tabLayout:Lt,slideLayout:Ft},props:{cmsList:{type:Array,default:()=>[]},canDrag:{type:Boolean,default:!0},mode:{type:String,default:"pc"},ratio:{type:Number,default:1},envUrl:{type:String,default:""},path:{type:String},isClient:{type:Boolean,default:!0}},data(){return{chooseSort:"",activeIndex:-1,layOutObj:{1:"singleLayout",2:"multipleLayout",3:"customLayout",4:"tabLayout",5:"slideLayout"}}},computed:{},mounted(){},methods:{chooseLayout(e,t){this.chooseSort=t,this.$emit("updateLayOut",{layoutType:e,sort:t})},updateSort(e){this.chooseSort=e},deleteModule(e,t){t===this.chooseSort?this.$emit("deleteModule",e):(this.cmsList.splice(e,1),this.$emit("saveVersionId"))},showOrHide(e){let t=this.cmsList[e];this.$set(t,"displayType",t.displayType?0:1),this.$emit("componentChange",t.sort)}}},$t=qt,Ht=$t,zt=(i("4664"),O(Ht,n,a,!1,null,"443f8186",null)),Vt=zt.exports;const Gt=[Vt],Wt=function(e){Wt.installed||Gt.map(t=>e.component(t.name,t))};var Xt={install:Wt};t["default"]=Xt},fc6a:function(e,t,i){"use strict";var r=i("44ad"),s=i("1d80");e.exports=function(e){return r(s(e))}},fda2:function(e,t,i){},fdbf:function(e,t,i){"use strict";var r=i("04f8");e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},fdcb:function(e,t,i){},fe0f:function(e,t,i){},fe1c:function(e,t,i){}});