UNPKG

810 kBJavaScriptView Raw
1!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):"object"==typeof exports?exports.LinViewUi=t(require("vue")):e.LinViewUi=t(e.Vue)}(window,(function(e){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=415)}([function(e,t,n){var i=n(186);e.exports=function(e,t,n){return t in e?i(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){var i=n(44),r=n(46).f,a=Function.prototype,o=a.toString,s=/^\s*function ([^ (]*)/;i&&!("name"in a)&&r(a,"name",{configurable:!0,get:function(){try{return o.call(this).match(s)[1]}catch(e){return""}}})},function(e,t,n){e.exports=n(220)},function(e,t,n){e.exports=n(241)},function(e,t,n){"use strict";var i=n(14),r=n(64).f,a=n(151),o=n(15),s=n(89),l=n(39),u=n(37),c=function(e){var t=function(t,n,i){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,i)}return e.apply(this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,f,d,h,p,v,g,m,y=e.target,_=e.global,b=e.stat,S=e.proto,w=_?i:b?i[y]:(i[y]||{}).prototype,E=_?o:o[y]||(o[y]={}),T=E.prototype;for(d in t)n=!a(_?d:y+(b?".":"#")+d,e.forced)&&w&&u(w,d),p=E[d],n&&(v=e.noTargetGet?(m=r(w,d))&&m.value:w[d]),h=n&&v?v:t[d],n&&typeof p==typeof h||(g=e.bind&&n?s(h,i):e.wrap&&n?c(h):S&&"function"==typeof h?s(Function.call,h):h,(e.sham||h&&h.sham||p&&p.sham)&&l(g,"sham",!0),E[d]=g,S&&(u(o,f=y+"Prototype")||l(o,f,{}),o[f][d]=h,e.real&&T&&!T[d]&&l(T,d,h)))}},function(e,t,n){e.exports=n(340)},function(e,t,n){"use strict";var i=n(44),r=n(17),a=n(99),o=n(47),s=n(41),l=n(66),u=n(182),c=n(127),f=n(31),d=n(140),h=n(134).f,p=n(95).f,v=n(46).f,g=n(279).trim,m=r.Number,y=m.prototype,_="Number"==l(d(y)),b=function(e){var t,n,i,r,a,o,s,l,u=c(e,!1);if("string"==typeof u&&u.length>2)if(43===(t=(u=g(u)).charCodeAt(0))||45===t){if(88===(n=u.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(u.charCodeAt(1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+u}for(o=(a=u.slice(2)).length,s=0;s<o;s++)if((l=a.charCodeAt(s))<48||l>r)return NaN;return parseInt(a,i)}return+u};if(a("Number",!m(" 0o1")||!m("0b1")||m("+0x1"))){for(var S,w=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof w&&(_?f((function(){y.valueOf.call(n)})):"Number"!=l(n))?u(new m(b(t)),n,w):b(t)},E=i?h(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),T=0;E.length>T;T++)s(m,S=E[T])&&!s(w,S)&&v(w,S,p(m,S));w.prototype=y,y.constructor=w,o(r,"Number",w)}},function(e,t,n){e.exports=n(327)},function(e,t,n){e.exports=n(331)},function(e,t,n){e.exports=n(338)},function(e,t,n){e.exports=n(366)},function(e,t,n){e.exports=n(334)},function(e,t,n){(function(e,i){var r;
2/**
3 * @license
4 * Lodash <https://lodash.com/>
5 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
6 * Released under MIT license <https://lodash.com/license>
7 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
8 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
9 */(function(){var a="Expected a function",o="__lodash_placeholder__",s=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],l="[object Arguments]",u="[object Array]",c="[object Boolean]",f="[object Date]",d="[object Error]",h="[object Function]",p="[object GeneratorFunction]",v="[object Map]",g="[object Number]",m="[object Object]",y="[object RegExp]",_="[object Set]",b="[object String]",S="[object Symbol]",w="[object WeakMap]",E="[object ArrayBuffer]",T="[object DataView]",k="[object Float32Array]",x="[object Float64Array]",L="[object Int8Array]",A="[object Int16Array]",C="[object Int32Array]",R="[object Uint8Array]",D="[object Uint16Array]",O="[object Uint32Array]",I=/\b__p \+= '';/g,P=/\b(__p \+=) '' \+/g,M=/(__e\(.*?\)|\b__t\)) \+\n'';/g,F=/&(?:amp|lt|gt|quot|#39);/g,B=/[&<>"']/g,N=RegExp(F.source),U=RegExp(B.source),j=/<%-([\s\S]+?)%>/g,V=/<%([\s\S]+?)%>/g,G=/<%=([\s\S]+?)%>/g,$=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,H=/^\w*$/,W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,K=/[\\^$.*+?()[\]{}|]/g,z=RegExp(K.source),q=/^\s+|\s+$/g,Y=/^\s+/,X=/\s+$/,J=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Z=/\{\n\/\* \[wrapped with (.+)\] \*/,Q=/,? & /,ee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,te=/\\(\\)?/g,ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ie=/\w*$/,re=/^[-+]0x[0-9a-f]+$/i,ae=/^0b[01]+$/i,oe=/^\[object .+?Constructor\]$/,se=/^0o[0-7]+$/i,le=/^(?:0|[1-9]\d*)$/,ue=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ce=/($^)/,fe=/['\n\r\u2028\u2029\\]/g,de="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",he="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pe="[\\ud800-\\udfff]",ve="["+he+"]",ge="["+de+"]",me="\\d+",ye="[\\u2700-\\u27bf]",_e="[a-z\\xdf-\\xf6\\xf8-\\xff]",be="[^\\ud800-\\udfff"+he+me+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Se="\\ud83c[\\udffb-\\udfff]",we="[^\\ud800-\\udfff]",Ee="(?:\\ud83c[\\udde6-\\uddff]){2}",Te="[\\ud800-\\udbff][\\udc00-\\udfff]",ke="[A-Z\\xc0-\\xd6\\xd8-\\xde]",xe="(?:"+_e+"|"+be+")",Le="(?:"+ke+"|"+be+")",Ae="(?:"+ge+"|"+Se+")"+"?",Ce="[\\ufe0e\\ufe0f]?"+Ae+("(?:\\u200d(?:"+[we,Ee,Te].join("|")+")[\\ufe0e\\ufe0f]?"+Ae+")*"),Re="(?:"+[ye,Ee,Te].join("|")+")"+Ce,De="(?:"+[we+ge+"?",ge,Ee,Te,pe].join("|")+")",Oe=RegExp("['’]","g"),Ie=RegExp(ge,"g"),Pe=RegExp(Se+"(?="+Se+")|"+De+Ce,"g"),Me=RegExp([ke+"?"+_e+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ve,ke,"$"].join("|")+")",Le+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ve,ke+xe,"$"].join("|")+")",ke+"?"+xe+"+(?:['’](?:d|ll|m|re|s|t|ve))?",ke+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",me,Re].join("|"),"g"),Fe=RegExp("[\\u200d\\ud800-\\udfff"+de+"\\ufe0e\\ufe0f]"),Be=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ne=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ue=-1,je={};je[k]=je[x]=je[L]=je[A]=je[C]=je[R]=je["[object Uint8ClampedArray]"]=je[D]=je[O]=!0,je[l]=je[u]=je[E]=je[c]=je[T]=je[f]=je[d]=je[h]=je[v]=je[g]=je[m]=je[y]=je[_]=je[b]=je[w]=!1;var Ve={};Ve[l]=Ve[u]=Ve[E]=Ve[T]=Ve[c]=Ve[f]=Ve[k]=Ve[x]=Ve[L]=Ve[A]=Ve[C]=Ve[v]=Ve[g]=Ve[m]=Ve[y]=Ve[_]=Ve[b]=Ve[S]=Ve[R]=Ve["[object Uint8ClampedArray]"]=Ve[D]=Ve[O]=!0,Ve[d]=Ve[h]=Ve[w]=!1;var Ge={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$e=parseFloat,He=parseInt,We="object"==typeof e&&e&&e.Object===Object&&e,Ke="object"==typeof self&&self&&self.Object===Object&&self,ze=We||Ke||Function("return this")(),qe=t&&!t.nodeType&&t,Ye=qe&&"object"==typeof i&&i&&!i.nodeType&&i,Xe=Ye&&Ye.exports===qe,Je=Xe&&We.process,Ze=function(){try{var e=Ye&&Ye.require&&Ye.require("util").types;return e||Je&&Je.binding&&Je.binding("util")}catch(e){}}(),Qe=Ze&&Ze.isArrayBuffer,et=Ze&&Ze.isDate,tt=Ze&&Ze.isMap,nt=Ze&&Ze.isRegExp,it=Ze&&Ze.isSet,rt=Ze&&Ze.isTypedArray;function at(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function ot(e,t,n,i){for(var r=-1,a=null==e?0:e.length;++r<a;){var o=e[r];t(i,o,n(o),e)}return i}function st(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}function lt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function ut(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(!t(e[n],n,e))return!1;return!0}function ct(e,t){for(var n=-1,i=null==e?0:e.length,r=0,a=[];++n<i;){var o=e[n];t(o,n,e)&&(a[r++]=o)}return a}function ft(e,t){return!!(null==e?0:e.length)&&St(e,t,0)>-1}function dt(e,t,n){for(var i=-1,r=null==e?0:e.length;++i<r;)if(n(t,e[i]))return!0;return!1}function ht(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}function pt(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}function vt(e,t,n,i){var r=-1,a=null==e?0:e.length;for(i&&a&&(n=e[++r]);++r<a;)n=t(n,e[r],r,e);return n}function gt(e,t,n,i){var r=null==e?0:e.length;for(i&&r&&(n=e[--r]);r--;)n=t(n,e[r],r,e);return n}function mt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}var yt=kt("length");function _t(e,t,n){var i;return n(e,(function(e,n,r){if(t(e,n,r))return i=n,!1})),i}function bt(e,t,n,i){for(var r=e.length,a=n+(i?1:-1);i?a--:++a<r;)if(t(e[a],a,e))return a;return-1}function St(e,t,n){return t==t?function(e,t,n){var i=n-1,r=e.length;for(;++i<r;)if(e[i]===t)return i;return-1}(e,t,n):bt(e,Et,n)}function wt(e,t,n,i){for(var r=n-1,a=e.length;++r<a;)if(i(e[r],t))return r;return-1}function Et(e){return e!=e}function Tt(e,t){var n=null==e?0:e.length;return n?At(e,t)/n:NaN}function kt(e){return function(t){return null==t?void 0:t[e]}}function xt(e){return function(t){return null==e?void 0:e[t]}}function Lt(e,t,n,i,r){return r(e,(function(e,r,a){n=i?(i=!1,e):t(n,e,r,a)})),n}function At(e,t){for(var n,i=-1,r=e.length;++i<r;){var a=t(e[i]);void 0!==a&&(n=void 0===n?a:n+a)}return n}function Ct(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}function Rt(e){return function(t){return e(t)}}function Dt(e,t){return ht(t,(function(t){return e[t]}))}function Ot(e,t){return e.has(t)}function It(e,t){for(var n=-1,i=e.length;++n<i&&St(t,e[n],0)>-1;);return n}function Pt(e,t){for(var n=e.length;n--&&St(t,e[n],0)>-1;);return n}function Mt(e,t){for(var n=e.length,i=0;n--;)e[n]===t&&++i;return i}var Ft=xt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Bt=xt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Nt(e){return"\\"+Ge[e]}function Ut(e){return Fe.test(e)}function jt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function Vt(e,t){return function(n){return e(t(n))}}function Gt(e,t){for(var n=-1,i=e.length,r=0,a=[];++n<i;){var s=e[n];s!==t&&s!==o||(e[n]=o,a[r++]=n)}return a}function $t(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function Ht(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function Wt(e){return Ut(e)?function(e){var t=Pe.lastIndex=0;for(;Pe.test(e);)++t;return t}(e):yt(e)}function Kt(e){return Ut(e)?function(e){return e.match(Pe)||[]}(e):function(e){return e.split("")}(e)}var zt=xt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var qt=function e(t){var n,i=(t=null==t?ze:qt.defaults(ze.Object(),t,qt.pick(ze,Ne))).Array,r=t.Date,de=t.Error,he=t.Function,pe=t.Math,ve=t.Object,ge=t.RegExp,me=t.String,ye=t.TypeError,_e=i.prototype,be=he.prototype,Se=ve.prototype,we=t["__core-js_shared__"],Ee=be.toString,Te=Se.hasOwnProperty,ke=0,xe=(n=/[^.]+$/.exec(we&&we.keys&&we.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Le=Se.toString,Ae=Ee.call(ve),Ce=ze._,Re=ge("^"+Ee.call(Te).replace(K,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),De=Xe?t.Buffer:void 0,Pe=t.Symbol,Fe=t.Uint8Array,Ge=De?De.allocUnsafe:void 0,We=Vt(ve.getPrototypeOf,ve),Ke=ve.create,qe=Se.propertyIsEnumerable,Ye=_e.splice,Je=Pe?Pe.isConcatSpreadable:void 0,Ze=Pe?Pe.iterator:void 0,yt=Pe?Pe.toStringTag:void 0,xt=function(){try{var e=Qr(ve,"defineProperty");return e({},"",{}),e}catch(e){}}(),Yt=t.clearTimeout!==ze.clearTimeout&&t.clearTimeout,Xt=r&&r.now!==ze.Date.now&&r.now,Jt=t.setTimeout!==ze.setTimeout&&t.setTimeout,Zt=pe.ceil,Qt=pe.floor,en=ve.getOwnPropertySymbols,tn=De?De.isBuffer:void 0,nn=t.isFinite,rn=_e.join,an=Vt(ve.keys,ve),on=pe.max,sn=pe.min,ln=r.now,un=t.parseInt,cn=pe.random,fn=_e.reverse,dn=Qr(t,"DataView"),hn=Qr(t,"Map"),pn=Qr(t,"Promise"),vn=Qr(t,"Set"),gn=Qr(t,"WeakMap"),mn=Qr(ve,"create"),yn=gn&&new gn,_n={},bn=xa(dn),Sn=xa(hn),wn=xa(pn),En=xa(vn),Tn=xa(gn),kn=Pe?Pe.prototype:void 0,xn=kn?kn.valueOf:void 0,Ln=kn?kn.toString:void 0;function An(e){if(Ho(e)&&!Io(e)&&!(e instanceof On)){if(e instanceof Dn)return e;if(Te.call(e,"__wrapped__"))return La(e)}return new Dn(e)}var Cn=function(){function e(){}return function(t){if(!$o(t))return{};if(Ke)return Ke(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Rn(){}function Dn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function On(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function In(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Pn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Mn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Fn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Mn;++t<n;)this.add(e[t])}function Bn(e){var t=this.__data__=new Pn(e);this.size=t.size}function Nn(e,t){var n=Io(e),i=!n&&Oo(e),r=!n&&!i&&Bo(e),a=!n&&!i&&!r&&Zo(e),o=n||i||r||a,s=o?Ct(e.length,me):[],l=s.length;for(var u in e)!t&&!Te.call(e,u)||o&&("length"==u||r&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||oa(u,l))||s.push(u);return s}function Un(e){var t=e.length;return t?e[Fi(0,t-1)]:void 0}function jn(e,t){return Ea(mr(e),Yn(t,0,e.length))}function Vn(e){return Ea(mr(e))}function Gn(e,t,n){(void 0!==n&&!Co(e[t],n)||void 0===n&&!(t in e))&&zn(e,t,n)}function $n(e,t,n){var i=e[t];Te.call(e,t)&&Co(i,n)&&(void 0!==n||t in e)||zn(e,t,n)}function Hn(e,t){for(var n=e.length;n--;)if(Co(e[n][0],t))return n;return-1}function Wn(e,t,n,i){return ei(e,(function(e,r,a){t(i,e,n(e),a)})),i}function Kn(e,t){return e&&yr(t,bs(t),e)}function zn(e,t,n){"__proto__"==t&&xt?xt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function qn(e,t){for(var n=-1,r=t.length,a=i(r),o=null==e;++n<r;)a[n]=o?void 0:vs(e,t[n]);return a}function Yn(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function Xn(e,t,n,i,r,a){var o,s=1&t,u=2&t,d=4&t;if(n&&(o=r?n(e,i,r,a):n(e)),void 0!==o)return o;if(!$o(e))return e;var w=Io(e);if(w){if(o=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Te.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!s)return mr(e,o)}else{var I=na(e),P=I==h||I==p;if(Bo(e))return fr(e,s);if(I==m||I==l||P&&!r){if(o=u||P?{}:ra(e),!s)return u?function(e,t){return yr(e,ta(e),t)}(e,function(e,t){return e&&yr(t,Ss(t),e)}(o,e)):function(e,t){return yr(e,ea(e),t)}(e,Kn(o,e))}else{if(!Ve[I])return r?e:{};o=function(e,t,n){var i=e.constructor;switch(t){case E:return dr(e);case c:case f:return new i(+e);case T:return function(e,t){var n=t?dr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case k:case x:case L:case A:case C:case R:case"[object Uint8ClampedArray]":case D:case O:return hr(e,n);case v:return new i;case g:case b:return new i(e);case y:return function(e){var t=new e.constructor(e.source,ie.exec(e));return t.lastIndex=e.lastIndex,t}(e);case _:return new i;case S:return r=e,xn?ve(xn.call(r)):{}}var r}(e,I,s)}}a||(a=new Bn);var M=a.get(e);if(M)return M;a.set(e,o),Yo(e)?e.forEach((function(i){o.add(Xn(i,t,n,i,e,a))})):Wo(e)&&e.forEach((function(i,r){o.set(r,Xn(i,t,n,r,e,a))}));var F=w?void 0:(d?u?Kr:Wr:u?Ss:bs)(e);return st(F||e,(function(i,r){F&&(i=e[r=i]),$n(o,r,Xn(i,t,n,r,e,a))})),o}function Jn(e,t,n){var i=n.length;if(null==e)return!i;for(e=ve(e);i--;){var r=n[i],a=t[r],o=e[r];if(void 0===o&&!(r in e)||!a(o))return!1}return!0}function Zn(e,t,n){if("function"!=typeof e)throw new ye(a);return _a((function(){e.apply(void 0,n)}),t)}function Qn(e,t,n,i){var r=-1,a=ft,o=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=ht(t,Rt(n))),i?(a=dt,o=!1):t.length>=200&&(a=Ot,o=!1,t=new Fn(t));e:for(;++r<s;){var c=e[r],f=null==n?c:n(c);if(c=i||0!==c?c:0,o&&f==f){for(var d=u;d--;)if(t[d]===f)continue e;l.push(c)}else a(t,f,i)||l.push(c)}return l}An.templateSettings={escape:j,evaluate:V,interpolate:G,variable:"",imports:{_:An}},An.prototype=Rn.prototype,An.prototype.constructor=An,Dn.prototype=Cn(Rn.prototype),Dn.prototype.constructor=Dn,On.prototype=Cn(Rn.prototype),On.prototype.constructor=On,In.prototype.clear=function(){this.__data__=mn?mn(null):{},this.size=0},In.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},In.prototype.get=function(e){var t=this.__data__;if(mn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Te.call(t,e)?t[e]:void 0},In.prototype.has=function(e){var t=this.__data__;return mn?void 0!==t[e]:Te.call(t,e)},In.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=mn&&void 0===t?"__lodash_hash_undefined__":t,this},Pn.prototype.clear=function(){this.__data__=[],this.size=0},Pn.prototype.delete=function(e){var t=this.__data__,n=Hn(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ye.call(t,n,1),--this.size,!0)},Pn.prototype.get=function(e){var t=this.__data__,n=Hn(t,e);return n<0?void 0:t[n][1]},Pn.prototype.has=function(e){return Hn(this.__data__,e)>-1},Pn.prototype.set=function(e,t){var n=this.__data__,i=Hn(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},Mn.prototype.clear=function(){this.size=0,this.__data__={hash:new In,map:new(hn||Pn),string:new In}},Mn.prototype.delete=function(e){var t=Jr(this,e).delete(e);return this.size-=t?1:0,t},Mn.prototype.get=function(e){return Jr(this,e).get(e)},Mn.prototype.has=function(e){return Jr(this,e).has(e)},Mn.prototype.set=function(e,t){var n=Jr(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},Fn.prototype.add=Fn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Fn.prototype.has=function(e){return this.__data__.has(e)},Bn.prototype.clear=function(){this.__data__=new Pn,this.size=0},Bn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Bn.prototype.get=function(e){return this.__data__.get(e)},Bn.prototype.has=function(e){return this.__data__.has(e)},Bn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Pn){var i=n.__data__;if(!hn||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Mn(i)}return n.set(e,t),this.size=n.size,this};var ei=Sr(li),ti=Sr(ui,!0);function ni(e,t){var n=!0;return ei(e,(function(e,i,r){return n=!!t(e,i,r)})),n}function ii(e,t,n){for(var i=-1,r=e.length;++i<r;){var a=e[i],o=t(a);if(null!=o&&(void 0===s?o==o&&!Jo(o):n(o,s)))var s=o,l=a}return l}function ri(e,t){var n=[];return ei(e,(function(e,i,r){t(e,i,r)&&n.push(e)})),n}function ai(e,t,n,i,r){var a=-1,o=e.length;for(n||(n=aa),r||(r=[]);++a<o;){var s=e[a];t>0&&n(s)?t>1?ai(s,t-1,n,i,r):pt(r,s):i||(r[r.length]=s)}return r}var oi=wr(),si=wr(!0);function li(e,t){return e&&oi(e,t,bs)}function ui(e,t){return e&&si(e,t,bs)}function ci(e,t){return ct(t,(function(t){return jo(e[t])}))}function fi(e,t){for(var n=0,i=(t=sr(t,e)).length;null!=e&&n<i;)e=e[ka(t[n++])];return n&&n==i?e:void 0}function di(e,t,n){var i=t(e);return Io(e)?i:pt(i,n(e))}function hi(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":yt&&yt in ve(e)?function(e){var t=Te.call(e,yt),n=e[yt];try{e[yt]=void 0;var i=!0}catch(e){}var r=Le.call(e);i&&(t?e[yt]=n:delete e[yt]);return r}(e):function(e){return Le.call(e)}(e)}function pi(e,t){return e>t}function vi(e,t){return null!=e&&Te.call(e,t)}function gi(e,t){return null!=e&&t in ve(e)}function mi(e,t,n){for(var r=n?dt:ft,a=e[0].length,o=e.length,s=o,l=i(o),u=1/0,c=[];s--;){var f=e[s];s&&t&&(f=ht(f,Rt(t))),u=sn(f.length,u),l[s]=!n&&(t||a>=120&&f.length>=120)?new Fn(s&&f):void 0}f=e[0];var d=-1,h=l[0];e:for(;++d<a&&c.length<u;){var p=f[d],v=t?t(p):p;if(p=n||0!==p?p:0,!(h?Ot(h,v):r(c,v,n))){for(s=o;--s;){var g=l[s];if(!(g?Ot(g,v):r(e[s],v,n)))continue e}h&&h.push(v),c.push(p)}}return c}function yi(e,t,n){var i=null==(e=va(e,t=sr(t,e)))?e:e[ka(Na(t))];return null==i?void 0:at(i,e,n)}function _i(e){return Ho(e)&&hi(e)==l}function bi(e,t,n,i,r){return e===t||(null==e||null==t||!Ho(e)&&!Ho(t)?e!=e&&t!=t:function(e,t,n,i,r,a){var o=Io(e),s=Io(t),h=o?u:na(e),p=s?u:na(t),w=(h=h==l?m:h)==m,k=(p=p==l?m:p)==m,x=h==p;if(x&&Bo(e)){if(!Bo(t))return!1;o=!0,w=!1}if(x&&!w)return a||(a=new Bn),o||Zo(e)?$r(e,t,n,i,r,a):function(e,t,n,i,r,a,o){switch(n){case T:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case E:return!(e.byteLength!=t.byteLength||!a(new Fe(e),new Fe(t)));case c:case f:case g:return Co(+e,+t);case d:return e.name==t.name&&e.message==t.message;case y:case b:return e==t+"";case v:var s=jt;case _:var l=1&i;if(s||(s=$t),e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;i|=2,o.set(e,t);var h=$r(s(e),s(t),i,r,a,o);return o.delete(e),h;case S:if(xn)return xn.call(e)==xn.call(t)}return!1}(e,t,h,n,i,r,a);if(!(1&n)){var L=w&&Te.call(e,"__wrapped__"),A=k&&Te.call(t,"__wrapped__");if(L||A){var C=L?e.value():e,R=A?t.value():t;return a||(a=new Bn),r(C,R,n,i,a)}}if(!x)return!1;return a||(a=new Bn),function(e,t,n,i,r,a){var o=1&n,s=Wr(e),l=s.length,u=Wr(t).length;if(l!=u&&!o)return!1;var c=l;for(;c--;){var f=s[c];if(!(o?f in t:Te.call(t,f)))return!1}var d=a.get(e),h=a.get(t);if(d&&h)return d==t&&h==e;var p=!0;a.set(e,t),a.set(t,e);var v=o;for(;++c<l;){f=s[c];var g=e[f],m=t[f];if(i)var y=o?i(m,g,f,t,e,a):i(g,m,f,e,t,a);if(!(void 0===y?g===m||r(g,m,n,i,a):y)){p=!1;break}v||(v="constructor"==f)}if(p&&!v){var _=e.constructor,b=t.constructor;_==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b||(p=!1)}return a.delete(e),a.delete(t),p}(e,t,n,i,r,a)}(e,t,n,i,bi,r))}function Si(e,t,n,i){var r=n.length,a=r,o=!i;if(null==e)return!a;for(e=ve(e);r--;){var s=n[r];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++r<a;){var l=(s=n[r])[0],u=e[l],c=s[1];if(o&&s[2]){if(void 0===u&&!(l in e))return!1}else{var f=new Bn;if(i)var d=i(u,c,l,e,t,f);if(!(void 0===d?bi(c,u,3,i,f):d))return!1}}return!0}function wi(e){return!(!$o(e)||(t=e,xe&&xe in t))&&(jo(e)?Re:oe).test(xa(e));var t}function Ei(e){return"function"==typeof e?e:null==e?Ks:"object"==typeof e?Io(e)?Ci(e[0],e[1]):Ai(e):tl(e)}function Ti(e){if(!fa(e))return an(e);var t=[];for(var n in ve(e))Te.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ki(e){if(!$o(e))return function(e){var t=[];if(null!=e)for(var n in ve(e))t.push(n);return t}(e);var t=fa(e),n=[];for(var i in e)("constructor"!=i||!t&&Te.call(e,i))&&n.push(i);return n}function xi(e,t){return e<t}function Li(e,t){var n=-1,r=Mo(e)?i(e.length):[];return ei(e,(function(e,i,a){r[++n]=t(e,i,a)})),r}function Ai(e){var t=Zr(e);return 1==t.length&&t[0][2]?ha(t[0][0],t[0][1]):function(n){return n===e||Si(n,e,t)}}function Ci(e,t){return la(e)&&da(t)?ha(ka(e),t):function(n){var i=vs(n,e);return void 0===i&&i===t?gs(n,e):bi(t,i,3)}}function Ri(e,t,n,i,r){e!==t&&oi(t,(function(a,o){if(r||(r=new Bn),$o(a))!function(e,t,n,i,r,a,o){var s=ma(e,n),l=ma(t,n),u=o.get(l);if(u)return void Gn(e,n,u);var c=a?a(s,l,n+"",e,t,o):void 0,f=void 0===c;if(f){var d=Io(l),h=!d&&Bo(l),p=!d&&!h&&Zo(l);c=l,d||h||p?Io(s)?c=s:Fo(s)?c=mr(s):h?(f=!1,c=fr(l,!0)):p?(f=!1,c=hr(l,!0)):c=[]:zo(l)||Oo(l)?(c=s,Oo(s)?c=os(s):$o(s)&&!jo(s)||(c=ra(l))):f=!1}f&&(o.set(l,c),r(c,l,i,a,o),o.delete(l));Gn(e,n,c)}(e,t,o,n,Ri,i,r);else{var s=i?i(ma(e,o),a,o+"",e,t,r):void 0;void 0===s&&(s=a),Gn(e,o,s)}}),Ss)}function Di(e,t){var n=e.length;if(n)return oa(t+=t<0?n:0,n)?e[t]:void 0}function Oi(e,t,n){t=t.length?ht(t,(function(e){return Io(e)?function(t){return fi(t,1===e.length?e[0]:e)}:e})):[Ks];var i=-1;return t=ht(t,Rt(Xr())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(Li(e,(function(e,n,r){return{criteria:ht(t,(function(t){return t(e)})),index:++i,value:e}})),(function(e,t){return function(e,t,n){var i=-1,r=e.criteria,a=t.criteria,o=r.length,s=n.length;for(;++i<o;){var l=pr(r[i],a[i]);if(l){if(i>=s)return l;var u=n[i];return l*("desc"==u?-1:1)}}return e.index-t.index}(e,t,n)}))}function Ii(e,t,n){for(var i=-1,r=t.length,a={};++i<r;){var o=t[i],s=fi(e,o);n(s,o)&&Vi(a,sr(o,e),s)}return a}function Pi(e,t,n,i){var r=i?wt:St,a=-1,o=t.length,s=e;for(e===t&&(t=mr(t)),n&&(s=ht(e,Rt(n)));++a<o;)for(var l=0,u=t[a],c=n?n(u):u;(l=r(s,c,l,i))>-1;)s!==e&&Ye.call(s,l,1),Ye.call(e,l,1);return e}function Mi(e,t){for(var n=e?t.length:0,i=n-1;n--;){var r=t[n];if(n==i||r!==a){var a=r;oa(r)?Ye.call(e,r,1):Qi(e,r)}}return e}function Fi(e,t){return e+Qt(cn()*(t-e+1))}function Bi(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Qt(t/2))&&(e+=e)}while(t);return n}function Ni(e,t){return ba(pa(e,t,Ks),e+"")}function Ui(e){return Un(Cs(e))}function ji(e,t){var n=Cs(e);return Ea(n,Yn(t,0,n.length))}function Vi(e,t,n,i){if(!$o(e))return e;for(var r=-1,a=(t=sr(t,e)).length,o=a-1,s=e;null!=s&&++r<a;){var l=ka(t[r]),u=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(r!=o){var c=s[l];void 0===(u=i?i(c,l,s):void 0)&&(u=$o(c)?c:oa(t[r+1])?[]:{})}$n(s,l,u),s=s[l]}return e}var Gi=yn?function(e,t){return yn.set(e,t),e}:Ks,$i=xt?function(e,t){return xt(e,"toString",{configurable:!0,enumerable:!1,value:$s(t),writable:!0})}:Ks;function Hi(e){return Ea(Cs(e))}function Wi(e,t,n){var r=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var o=i(a);++r<a;)o[r]=e[r+t];return o}function Ki(e,t){var n;return ei(e,(function(e,i,r){return!(n=t(e,i,r))})),!!n}function zi(e,t,n){var i=0,r=null==e?i:e.length;if("number"==typeof t&&t==t&&r<=2147483647){for(;i<r;){var a=i+r>>>1,o=e[a];null!==o&&!Jo(o)&&(n?o<=t:o<t)?i=a+1:r=a}return r}return qi(e,t,Ks,n)}function qi(e,t,n,i){var r=0,a=null==e?0:e.length;if(0===a)return 0;for(var o=(t=n(t))!=t,s=null===t,l=Jo(t),u=void 0===t;r<a;){var c=Qt((r+a)/2),f=n(e[c]),d=void 0!==f,h=null===f,p=f==f,v=Jo(f);if(o)var g=i||p;else g=u?p&&(i||d):s?p&&d&&(i||!h):l?p&&d&&!h&&(i||!v):!h&&!v&&(i?f<=t:f<t);g?r=c+1:a=c}return sn(a,4294967294)}function Yi(e,t){for(var n=-1,i=e.length,r=0,a=[];++n<i;){var o=e[n],s=t?t(o):o;if(!n||!Co(s,l)){var l=s;a[r++]=0===o?0:o}}return a}function Xi(e){return"number"==typeof e?e:Jo(e)?NaN:+e}function Ji(e){if("string"==typeof e)return e;if(Io(e))return ht(e,Ji)+"";if(Jo(e))return Ln?Ln.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Zi(e,t,n){var i=-1,r=ft,a=e.length,o=!0,s=[],l=s;if(n)o=!1,r=dt;else if(a>=200){var u=t?null:Br(e);if(u)return $t(u);o=!1,r=Ot,l=new Fn}else l=t?[]:s;e:for(;++i<a;){var c=e[i],f=t?t(c):c;if(c=n||0!==c?c:0,o&&f==f){for(var d=l.length;d--;)if(l[d]===f)continue e;t&&l.push(f),s.push(c)}else r(l,f,n)||(l!==s&&l.push(f),s.push(c))}return s}function Qi(e,t){return null==(e=va(e,t=sr(t,e)))||delete e[ka(Na(t))]}function er(e,t,n,i){return Vi(e,t,n(fi(e,t)),i)}function tr(e,t,n,i){for(var r=e.length,a=i?r:-1;(i?a--:++a<r)&&t(e[a],a,e););return n?Wi(e,i?0:a,i?a+1:r):Wi(e,i?a+1:0,i?r:a)}function nr(e,t){var n=e;return n instanceof On&&(n=n.value()),vt(t,(function(e,t){return t.func.apply(t.thisArg,pt([e],t.args))}),n)}function ir(e,t,n){var r=e.length;if(r<2)return r?Zi(e[0]):[];for(var a=-1,o=i(r);++a<r;)for(var s=e[a],l=-1;++l<r;)l!=a&&(o[a]=Qn(o[a]||s,e[l],t,n));return Zi(ai(o,1),t,n)}function rr(e,t,n){for(var i=-1,r=e.length,a=t.length,o={};++i<r;){var s=i<a?t[i]:void 0;n(o,e[i],s)}return o}function ar(e){return Fo(e)?e:[]}function or(e){return"function"==typeof e?e:Ks}function sr(e,t){return Io(e)?e:la(e,t)?[e]:Ta(ss(e))}var lr=Ni;function ur(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:Wi(e,t,n)}var cr=Yt||function(e){return ze.clearTimeout(e)};function fr(e,t){if(t)return e.slice();var n=e.length,i=Ge?Ge(n):new e.constructor(n);return e.copy(i),i}function dr(e){var t=new e.constructor(e.byteLength);return new Fe(t).set(new Fe(e)),t}function hr(e,t){var n=t?dr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function pr(e,t){if(e!==t){var n=void 0!==e,i=null===e,r=e==e,a=Jo(e),o=void 0!==t,s=null===t,l=t==t,u=Jo(t);if(!s&&!u&&!a&&e>t||a&&o&&l&&!s&&!u||i&&o&&l||!n&&l||!r)return 1;if(!i&&!a&&!u&&e<t||u&&n&&r&&!i&&!a||s&&n&&r||!o&&r||!l)return-1}return 0}function vr(e,t,n,r){for(var a=-1,o=e.length,s=n.length,l=-1,u=t.length,c=on(o-s,0),f=i(u+c),d=!r;++l<u;)f[l]=t[l];for(;++a<s;)(d||a<o)&&(f[n[a]]=e[a]);for(;c--;)f[l++]=e[a++];return f}function gr(e,t,n,r){for(var a=-1,o=e.length,s=-1,l=n.length,u=-1,c=t.length,f=on(o-l,0),d=i(f+c),h=!r;++a<f;)d[a]=e[a];for(var p=a;++u<c;)d[p+u]=t[u];for(;++s<l;)(h||a<o)&&(d[p+n[s]]=e[a++]);return d}function mr(e,t){var n=-1,r=e.length;for(t||(t=i(r));++n<r;)t[n]=e[n];return t}function yr(e,t,n,i){var r=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],l=i?i(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),r?zn(n,s,l):$n(n,s,l)}return n}function _r(e,t){return function(n,i){var r=Io(n)?ot:Wn,a=t?t():{};return r(n,e,Xr(i,2),a)}}function br(e){return Ni((function(t,n){var i=-1,r=n.length,a=r>1?n[r-1]:void 0,o=r>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(r--,a):void 0,o&&sa(n[0],n[1],o)&&(a=r<3?void 0:a,r=1),t=ve(t);++i<r;){var s=n[i];s&&e(t,s,i,a)}return t}))}function Sr(e,t){return function(n,i){if(null==n)return n;if(!Mo(n))return e(n,i);for(var r=n.length,a=t?r:-1,o=ve(n);(t?a--:++a<r)&&!1!==i(o[a],a,o););return n}}function wr(e){return function(t,n,i){for(var r=-1,a=ve(t),o=i(t),s=o.length;s--;){var l=o[e?s:++r];if(!1===n(a[l],l,a))break}return t}}function Er(e){return function(t){var n=Ut(t=ss(t))?Kt(t):void 0,i=n?n[0]:t.charAt(0),r=n?ur(n,1).join(""):t.slice(1);return i[e]()+r}}function Tr(e){return function(t){return vt(js(Os(t).replace(Oe,"")),e,"")}}function kr(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Cn(e.prototype),i=e.apply(n,t);return $o(i)?i:n}}function xr(e){return function(t,n,i){var r=ve(t);if(!Mo(t)){var a=Xr(n,3);t=bs(t),n=function(e){return a(r[e],e,r)}}var o=e(t,n,i);return o>-1?r[a?t[o]:o]:void 0}}function Lr(e){return Hr((function(t){var n=t.length,i=n,r=Dn.prototype.thru;for(e&&t.reverse();i--;){var o=t[i];if("function"!=typeof o)throw new ye(a);if(r&&!s&&"wrapper"==qr(o))var s=new Dn([],!0)}for(i=s?i:n;++i<n;){var l=qr(o=t[i]),u="wrapper"==l?zr(o):void 0;s=u&&ua(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?s[qr(u[0])].apply(s,u[3]):1==o.length&&ua(o)?s[l]():s.thru(o)}return function(){var e=arguments,i=e[0];if(s&&1==e.length&&Io(i))return s.plant(i).value();for(var r=0,a=n?t[r].apply(this,e):i;++r<n;)a=t[r].call(this,a);return a}}))}function Ar(e,t,n,r,a,o,s,l,u,c){var f=128&t,d=1&t,h=2&t,p=24&t,v=512&t,g=h?void 0:kr(e);return function m(){for(var y=arguments.length,_=i(y),b=y;b--;)_[b]=arguments[b];if(p)var S=Yr(m),w=Mt(_,S);if(r&&(_=vr(_,r,a,p)),o&&(_=gr(_,o,s,p)),y-=w,p&&y<c){var E=Gt(_,S);return Mr(e,t,Ar,m.placeholder,n,_,E,l,u,c-y)}var T=d?n:this,k=h?T[e]:e;return y=_.length,l?_=ga(_,l):v&&y>1&&_.reverse(),f&&u<y&&(_.length=u),this&&this!==ze&&this instanceof m&&(k=g||kr(k)),k.apply(T,_)}}function Cr(e,t){return function(n,i){return function(e,t,n,i){return li(e,(function(e,r,a){t(i,n(e),r,a)})),i}(n,e,t(i),{})}}function Rr(e,t){return function(n,i){var r;if(void 0===n&&void 0===i)return t;if(void 0!==n&&(r=n),void 0!==i){if(void 0===r)return i;"string"==typeof n||"string"==typeof i?(n=Ji(n),i=Ji(i)):(n=Xi(n),i=Xi(i)),r=e(n,i)}return r}}function Dr(e){return Hr((function(t){return t=ht(t,Rt(Xr())),Ni((function(n){var i=this;return e(t,(function(e){return at(e,i,n)}))}))}))}function Or(e,t){var n=(t=void 0===t?" ":Ji(t)).length;if(n<2)return n?Bi(t,e):t;var i=Bi(t,Zt(e/Wt(t)));return Ut(t)?ur(Kt(i),0,e).join(""):i.slice(0,e)}function Ir(e){return function(t,n,r){return r&&"number"!=typeof r&&sa(t,n,r)&&(n=r=void 0),t=ns(t),void 0===n?(n=t,t=0):n=ns(n),function(e,t,n,r){for(var a=-1,o=on(Zt((t-e)/(n||1)),0),s=i(o);o--;)s[r?o:++a]=e,e+=n;return s}(t,n,r=void 0===r?t<n?1:-1:ns(r),e)}}function Pr(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=as(t),n=as(n)),e(t,n)}}function Mr(e,t,n,i,r,a,o,s,l,u){var c=8&t;t|=c?32:64,4&(t&=~(c?64:32))||(t&=-4);var f=[e,t,r,c?a:void 0,c?o:void 0,c?void 0:a,c?void 0:o,s,l,u],d=n.apply(void 0,f);return ua(e)&&ya(d,f),d.placeholder=i,Sa(d,e,t)}function Fr(e){var t=pe[e];return function(e,n){if(e=as(e),(n=null==n?0:sn(is(n),292))&&nn(e)){var i=(ss(e)+"e").split("e");return+((i=(ss(t(i[0]+"e"+(+i[1]+n)))+"e").split("e"))[0]+"e"+(+i[1]-n))}return t(e)}}var Br=vn&&1/$t(new vn([,-0]))[1]==1/0?function(e){return new vn(e)}:Js;function Nr(e){return function(t){var n=na(t);return n==v?jt(t):n==_?Ht(t):function(e,t){return ht(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ur(e,t,n,r,s,l,u,c){var f=2&t;if(!f&&"function"!=typeof e)throw new ye(a);var d=r?r.length:0;if(d||(t&=-97,r=s=void 0),u=void 0===u?u:on(is(u),0),c=void 0===c?c:is(c),d-=s?s.length:0,64&t){var h=r,p=s;r=s=void 0}var v=f?void 0:zr(e),g=[e,t,n,r,s,h,p,l,u,c];if(v&&function(e,t){var n=e[1],i=t[1],r=n|i,a=r<131,s=128==i&&8==n||128==i&&256==n&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n;if(!a&&!s)return e;1&i&&(e[2]=t[2],r|=1&n?0:4);var l=t[3];if(l){var u=e[3];e[3]=u?vr(u,l,t[4]):l,e[4]=u?Gt(e[3],o):t[4]}(l=t[5])&&(u=e[5],e[5]=u?gr(u,l,t[6]):l,e[6]=u?Gt(e[5],o):t[6]);(l=t[7])&&(e[7]=l);128&i&&(e[8]=null==e[8]?t[8]:sn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=r}(g,v),e=g[0],t=g[1],n=g[2],r=g[3],s=g[4],!(c=g[9]=void 0===g[9]?f?0:e.length:on(g[9]-d,0))&&24&t&&(t&=-25),t&&1!=t)m=8==t||16==t?function(e,t,n){var r=kr(e);return function a(){for(var o=arguments.length,s=i(o),l=o,u=Yr(a);l--;)s[l]=arguments[l];var c=o<3&&s[0]!==u&&s[o-1]!==u?[]:Gt(s,u);if((o-=c.length)<n)return Mr(e,t,Ar,a.placeholder,void 0,s,c,void 0,void 0,n-o);var f=this&&this!==ze&&this instanceof a?r:e;return at(f,this,s)}}(e,t,c):32!=t&&33!=t||s.length?Ar.apply(void 0,g):function(e,t,n,r){var a=1&t,o=kr(e);return function t(){for(var s=-1,l=arguments.length,u=-1,c=r.length,f=i(c+l),d=this&&this!==ze&&this instanceof t?o:e;++u<c;)f[u]=r[u];for(;l--;)f[u++]=arguments[++s];return at(d,a?n:this,f)}}(e,t,n,r);else var m=function(e,t,n){var i=1&t,r=kr(e);return function t(){var a=this&&this!==ze&&this instanceof t?r:e;return a.apply(i?n:this,arguments)}}(e,t,n);return Sa((v?Gi:ya)(m,g),e,t)}function jr(e,t,n,i){return void 0===e||Co(e,Se[n])&&!Te.call(i,n)?t:e}function Vr(e,t,n,i,r,a){return $o(e)&&$o(t)&&(a.set(t,e),Ri(e,t,void 0,Vr,a),a.delete(t)),e}function Gr(e){return zo(e)?void 0:e}function $r(e,t,n,i,r,a){var o=1&n,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,h=2&n?new Fn:void 0;for(a.set(e,t),a.set(t,e);++f<s;){var p=e[f],v=t[f];if(i)var g=o?i(v,p,f,t,e,a):i(p,v,f,e,t,a);if(void 0!==g){if(g)continue;d=!1;break}if(h){if(!mt(t,(function(e,t){if(!Ot(h,t)&&(p===e||r(p,e,n,i,a)))return h.push(t)}))){d=!1;break}}else if(p!==v&&!r(p,v,n,i,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function Hr(e){return ba(pa(e,void 0,Ia),e+"")}function Wr(e){return di(e,bs,ea)}function Kr(e){return di(e,Ss,ta)}var zr=yn?function(e){return yn.get(e)}:Js;function qr(e){for(var t=e.name+"",n=_n[t],i=Te.call(_n,t)?n.length:0;i--;){var r=n[i],a=r.func;if(null==a||a==e)return r.name}return t}function Yr(e){return(Te.call(An,"placeholder")?An:e).placeholder}function Xr(){var e=An.iteratee||zs;return e=e===zs?Ei:e,arguments.length?e(arguments[0],arguments[1]):e}function Jr(e,t){var n,i,r=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.map}function Zr(e){for(var t=bs(e),n=t.length;n--;){var i=t[n],r=e[i];t[n]=[i,r,da(r)]}return t}function Qr(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return wi(n)?n:void 0}var ea=en?function(e){return null==e?[]:(e=ve(e),ct(en(e),(function(t){return qe.call(e,t)})))}:rl,ta=en?function(e){for(var t=[];e;)pt(t,ea(e)),e=We(e);return t}:rl,na=hi;function ia(e,t,n){for(var i=-1,r=(t=sr(t,e)).length,a=!1;++i<r;){var o=ka(t[i]);if(!(a=null!=e&&n(e,o)))break;e=e[o]}return a||++i!=r?a:!!(r=null==e?0:e.length)&&Go(r)&&oa(o,r)&&(Io(e)||Oo(e))}function ra(e){return"function"!=typeof e.constructor||fa(e)?{}:Cn(We(e))}function aa(e){return Io(e)||Oo(e)||!!(Je&&e&&e[Je])}function oa(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&le.test(e))&&e>-1&&e%1==0&&e<t}function sa(e,t,n){if(!$o(n))return!1;var i=typeof t;return!!("number"==i?Mo(n)&&oa(t,n.length):"string"==i&&t in n)&&Co(n[t],e)}function la(e,t){if(Io(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Jo(e))||(H.test(e)||!$.test(e)||null!=t&&e in ve(t))}function ua(e){var t=qr(e),n=An[t];if("function"!=typeof n||!(t in On.prototype))return!1;if(e===n)return!0;var i=zr(n);return!!i&&e===i[0]}(dn&&na(new dn(new ArrayBuffer(1)))!=T||hn&&na(new hn)!=v||pn&&"[object Promise]"!=na(pn.resolve())||vn&&na(new vn)!=_||gn&&na(new gn)!=w)&&(na=function(e){var t=hi(e),n=t==m?e.constructor:void 0,i=n?xa(n):"";if(i)switch(i){case bn:return T;case Sn:return v;case wn:return"[object Promise]";case En:return _;case Tn:return w}return t});var ca=we?jo:al;function fa(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Se)}function da(e){return e==e&&!$o(e)}function ha(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in ve(n)))}}function pa(e,t,n){return t=on(void 0===t?e.length-1:t,0),function(){for(var r=arguments,a=-1,o=on(r.length-t,0),s=i(o);++a<o;)s[a]=r[t+a];a=-1;for(var l=i(t+1);++a<t;)l[a]=r[a];return l[t]=n(s),at(e,this,l)}}function va(e,t){return t.length<2?e:fi(e,Wi(t,0,-1))}function ga(e,t){for(var n=e.length,i=sn(t.length,n),r=mr(e);i--;){var a=t[i];e[i]=oa(a,n)?r[a]:void 0}return e}function ma(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ya=wa(Gi),_a=Jt||function(e,t){return ze.setTimeout(e,t)},ba=wa($i);function Sa(e,t,n){var i=t+"";return ba(e,function(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(J,"{\n/* [wrapped with "+t+"] */\n")}(i,function(e,t){return st(s,(function(n){var i="_."+n[0];t&n[1]&&!ft(e,i)&&e.push(i)})),e.sort()}(function(e){var t=e.match(Z);return t?t[1].split(Q):[]}(i),n)))}function wa(e){var t=0,n=0;return function(){var i=ln(),r=16-(i-n);if(n=i,r>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Ea(e,t){var n=-1,i=e.length,r=i-1;for(t=void 0===t?i:t;++n<t;){var a=Fi(n,r),o=e[a];e[a]=e[n],e[n]=o}return e.length=t,e}var Ta=function(e){var t=Eo(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(W,(function(e,n,i,r){t.push(i?r.replace(te,"$1"):n||e)})),t}));function ka(e){if("string"==typeof e||Jo(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function xa(e){if(null!=e){try{return Ee.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function La(e){if(e instanceof On)return e.clone();var t=new Dn(e.__wrapped__,e.__chain__);return t.__actions__=mr(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Aa=Ni((function(e,t){return Fo(e)?Qn(e,ai(t,1,Fo,!0)):[]})),Ca=Ni((function(e,t){var n=Na(t);return Fo(n)&&(n=void 0),Fo(e)?Qn(e,ai(t,1,Fo,!0),Xr(n,2)):[]})),Ra=Ni((function(e,t){var n=Na(t);return Fo(n)&&(n=void 0),Fo(e)?Qn(e,ai(t,1,Fo,!0),void 0,n):[]}));function Da(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:is(n);return r<0&&(r=on(i+r,0)),bt(e,Xr(t,3),r)}function Oa(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=i-1;return void 0!==n&&(r=is(n),r=n<0?on(i+r,0):sn(r,i-1)),bt(e,Xr(t,3),r,!0)}function Ia(e){return(null==e?0:e.length)?ai(e,1):[]}function Pa(e){return e&&e.length?e[0]:void 0}var Ma=Ni((function(e){var t=ht(e,ar);return t.length&&t[0]===e[0]?mi(t):[]})),Fa=Ni((function(e){var t=Na(e),n=ht(e,ar);return t===Na(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?mi(n,Xr(t,2)):[]})),Ba=Ni((function(e){var t=Na(e),n=ht(e,ar);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?mi(n,void 0,t):[]}));function Na(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Ua=Ni(ja);function ja(e,t){return e&&e.length&&t&&t.length?Pi(e,t):e}var Va=Hr((function(e,t){var n=null==e?0:e.length,i=qn(e,t);return Mi(e,ht(t,(function(e){return oa(e,n)?+e:e})).sort(pr)),i}));function Ga(e){return null==e?e:fn.call(e)}var $a=Ni((function(e){return Zi(ai(e,1,Fo,!0))})),Ha=Ni((function(e){var t=Na(e);return Fo(t)&&(t=void 0),Zi(ai(e,1,Fo,!0),Xr(t,2))})),Wa=Ni((function(e){var t=Na(e);return t="function"==typeof t?t:void 0,Zi(ai(e,1,Fo,!0),void 0,t)}));function Ka(e){if(!e||!e.length)return[];var t=0;return e=ct(e,(function(e){if(Fo(e))return t=on(e.length,t),!0})),Ct(t,(function(t){return ht(e,kt(t))}))}function za(e,t){if(!e||!e.length)return[];var n=Ka(e);return null==t?n:ht(n,(function(e){return at(t,void 0,e)}))}var qa=Ni((function(e,t){return Fo(e)?Qn(e,t):[]})),Ya=Ni((function(e){return ir(ct(e,Fo))})),Xa=Ni((function(e){var t=Na(e);return Fo(t)&&(t=void 0),ir(ct(e,Fo),Xr(t,2))})),Ja=Ni((function(e){var t=Na(e);return t="function"==typeof t?t:void 0,ir(ct(e,Fo),void 0,t)})),Za=Ni(Ka);var Qa=Ni((function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,za(e,n)}));function eo(e){var t=An(e);return t.__chain__=!0,t}function to(e,t){return t(e)}var no=Hr((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,r=function(t){return qn(t,e)};return!(t>1||this.__actions__.length)&&i instanceof On&&oa(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:to,args:[r],thisArg:void 0}),new Dn(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(r)}));var io=_r((function(e,t,n){Te.call(e,n)?++e[n]:zn(e,n,1)}));var ro=xr(Da),ao=xr(Oa);function oo(e,t){return(Io(e)?st:ei)(e,Xr(t,3))}function so(e,t){return(Io(e)?lt:ti)(e,Xr(t,3))}var lo=_r((function(e,t,n){Te.call(e,n)?e[n].push(t):zn(e,n,[t])}));var uo=Ni((function(e,t,n){var r=-1,a="function"==typeof t,o=Mo(e)?i(e.length):[];return ei(e,(function(e){o[++r]=a?at(t,e,n):yi(e,t,n)})),o})),co=_r((function(e,t,n){zn(e,n,t)}));function fo(e,t){return(Io(e)?ht:Li)(e,Xr(t,3))}var ho=_r((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var po=Ni((function(e,t){if(null==e)return[];var n=t.length;return n>1&&sa(e,t[0],t[1])?t=[]:n>2&&sa(t[0],t[1],t[2])&&(t=[t[0]]),Oi(e,ai(t,1),[])})),vo=Xt||function(){return ze.Date.now()};function go(e,t,n){return t=n?void 0:t,Ur(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function mo(e,t){var n;if("function"!=typeof t)throw new ye(a);return e=is(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var yo=Ni((function(e,t,n){var i=1;if(n.length){var r=Gt(n,Yr(yo));i|=32}return Ur(e,i,t,n,r)})),_o=Ni((function(e,t,n){var i=3;if(n.length){var r=Gt(n,Yr(_o));i|=32}return Ur(t,i,e,n,r)}));function bo(e,t,n){var i,r,o,s,l,u,c=0,f=!1,d=!1,h=!0;if("function"!=typeof e)throw new ye(a);function p(t){var n=i,a=r;return i=r=void 0,c=t,s=e.apply(a,n)}function v(e){return c=e,l=_a(m,t),f?p(e):s}function g(e){var n=e-u;return void 0===u||n>=t||n<0||d&&e-c>=o}function m(){var e=vo();if(g(e))return y(e);l=_a(m,function(e){var n=t-(e-u);return d?sn(n,o-(e-c)):n}(e))}function y(e){return l=void 0,h&&i?p(e):(i=r=void 0,s)}function _(){var e=vo(),n=g(e);if(i=arguments,r=this,u=e,n){if(void 0===l)return v(u);if(d)return cr(l),l=_a(m,t),p(u)}return void 0===l&&(l=_a(m,t)),s}return t=as(t)||0,$o(n)&&(f=!!n.leading,o=(d="maxWait"in n)?on(as(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h),_.cancel=function(){void 0!==l&&cr(l),c=0,i=u=r=l=void 0},_.flush=function(){return void 0===l?s:y(vo())},_}var So=Ni((function(e,t){return Zn(e,1,t)})),wo=Ni((function(e,t,n){return Zn(e,as(t)||0,n)}));function Eo(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ye(a);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],a=n.cache;if(a.has(r))return a.get(r);var o=e.apply(this,i);return n.cache=a.set(r,o)||a,o};return n.cache=new(Eo.Cache||Mn),n}function To(e){if("function"!=typeof e)throw new ye(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Eo.Cache=Mn;var ko=lr((function(e,t){var n=(t=1==t.length&&Io(t[0])?ht(t[0],Rt(Xr())):ht(ai(t,1),Rt(Xr()))).length;return Ni((function(i){for(var r=-1,a=sn(i.length,n);++r<a;)i[r]=t[r].call(this,i[r]);return at(e,this,i)}))})),xo=Ni((function(e,t){return Ur(e,32,void 0,t,Gt(t,Yr(xo)))})),Lo=Ni((function(e,t){return Ur(e,64,void 0,t,Gt(t,Yr(Lo)))})),Ao=Hr((function(e,t){return Ur(e,256,void 0,void 0,void 0,t)}));function Co(e,t){return e===t||e!=e&&t!=t}var Ro=Pr(pi),Do=Pr((function(e,t){return e>=t})),Oo=_i(function(){return arguments}())?_i:function(e){return Ho(e)&&Te.call(e,"callee")&&!qe.call(e,"callee")},Io=i.isArray,Po=Qe?Rt(Qe):function(e){return Ho(e)&&hi(e)==E};function Mo(e){return null!=e&&Go(e.length)&&!jo(e)}function Fo(e){return Ho(e)&&Mo(e)}var Bo=tn||al,No=et?Rt(et):function(e){return Ho(e)&&hi(e)==f};function Uo(e){if(!Ho(e))return!1;var t=hi(e);return t==d||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!zo(e)}function jo(e){if(!$o(e))return!1;var t=hi(e);return t==h||t==p||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Vo(e){return"number"==typeof e&&e==is(e)}function Go(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function $o(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ho(e){return null!=e&&"object"==typeof e}var Wo=tt?Rt(tt):function(e){return Ho(e)&&na(e)==v};function Ko(e){return"number"==typeof e||Ho(e)&&hi(e)==g}function zo(e){if(!Ho(e)||hi(e)!=m)return!1;var t=We(e);if(null===t)return!0;var n=Te.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ee.call(n)==Ae}var qo=nt?Rt(nt):function(e){return Ho(e)&&hi(e)==y};var Yo=it?Rt(it):function(e){return Ho(e)&&na(e)==_};function Xo(e){return"string"==typeof e||!Io(e)&&Ho(e)&&hi(e)==b}function Jo(e){return"symbol"==typeof e||Ho(e)&&hi(e)==S}var Zo=rt?Rt(rt):function(e){return Ho(e)&&Go(e.length)&&!!je[hi(e)]};var Qo=Pr(xi),es=Pr((function(e,t){return e<=t}));function ts(e){if(!e)return[];if(Mo(e))return Xo(e)?Kt(e):mr(e);if(Ze&&e[Ze])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ze]());var t=na(e);return(t==v?jt:t==_?$t:Cs)(e)}function ns(e){return e?(e=as(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function is(e){var t=ns(e),n=t%1;return t==t?n?t-n:t:0}function rs(e){return e?Yn(is(e),0,4294967295):0}function as(e){if("number"==typeof e)return e;if(Jo(e))return NaN;if($o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=$o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(q,"");var n=ae.test(e);return n||se.test(e)?He(e.slice(2),n?2:8):re.test(e)?NaN:+e}function os(e){return yr(e,Ss(e))}function ss(e){return null==e?"":Ji(e)}var ls=br((function(e,t){if(fa(t)||Mo(t))yr(t,bs(t),e);else for(var n in t)Te.call(t,n)&&$n(e,n,t[n])})),us=br((function(e,t){yr(t,Ss(t),e)})),cs=br((function(e,t,n,i){yr(t,Ss(t),e,i)})),fs=br((function(e,t,n,i){yr(t,bs(t),e,i)})),ds=Hr(qn);var hs=Ni((function(e,t){e=ve(e);var n=-1,i=t.length,r=i>2?t[2]:void 0;for(r&&sa(t[0],t[1],r)&&(i=1);++n<i;)for(var a=t[n],o=Ss(a),s=-1,l=o.length;++s<l;){var u=o[s],c=e[u];(void 0===c||Co(c,Se[u])&&!Te.call(e,u))&&(e[u]=a[u])}return e})),ps=Ni((function(e){return e.push(void 0,Vr),at(Es,void 0,e)}));function vs(e,t,n){var i=null==e?void 0:fi(e,t);return void 0===i?n:i}function gs(e,t){return null!=e&&ia(e,t,gi)}var ms=Cr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),e[t]=n}),$s(Ks)),ys=Cr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),Te.call(e,t)?e[t].push(n):e[t]=[n]}),Xr),_s=Ni(yi);function bs(e){return Mo(e)?Nn(e):Ti(e)}function Ss(e){return Mo(e)?Nn(e,!0):ki(e)}var ws=br((function(e,t,n){Ri(e,t,n)})),Es=br((function(e,t,n,i){Ri(e,t,n,i)})),Ts=Hr((function(e,t){var n={};if(null==e)return n;var i=!1;t=ht(t,(function(t){return t=sr(t,e),i||(i=t.length>1),t})),yr(e,Kr(e),n),i&&(n=Xn(n,7,Gr));for(var r=t.length;r--;)Qi(n,t[r]);return n}));var ks=Hr((function(e,t){return null==e?{}:function(e,t){return Ii(e,t,(function(t,n){return gs(e,n)}))}(e,t)}));function xs(e,t){if(null==e)return{};var n=ht(Kr(e),(function(e){return[e]}));return t=Xr(t),Ii(e,n,(function(e,n){return t(e,n[0])}))}var Ls=Nr(bs),As=Nr(Ss);function Cs(e){return null==e?[]:Dt(e,bs(e))}var Rs=Tr((function(e,t,n){return t=t.toLowerCase(),e+(n?Ds(t):t)}));function Ds(e){return Us(ss(e).toLowerCase())}function Os(e){return(e=ss(e))&&e.replace(ue,Ft).replace(Ie,"")}var Is=Tr((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ps=Tr((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ms=Er("toLowerCase");var Fs=Tr((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Bs=Tr((function(e,t,n){return e+(n?" ":"")+Us(t)}));var Ns=Tr((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Us=Er("toUpperCase");function js(e,t,n){return e=ss(e),void 0===(t=n?void 0:t)?function(e){return Be.test(e)}(e)?function(e){return e.match(Me)||[]}(e):function(e){return e.match(ee)||[]}(e):e.match(t)||[]}var Vs=Ni((function(e,t){try{return at(e,void 0,t)}catch(e){return Uo(e)?e:new de(e)}})),Gs=Hr((function(e,t){return st(t,(function(t){t=ka(t),zn(e,t,yo(e[t],e))})),e}));function $s(e){return function(){return e}}var Hs=Lr(),Ws=Lr(!0);function Ks(e){return e}function zs(e){return Ei("function"==typeof e?e:Xn(e,1))}var qs=Ni((function(e,t){return function(n){return yi(n,e,t)}})),Ys=Ni((function(e,t){return function(n){return yi(e,n,t)}}));function Xs(e,t,n){var i=bs(t),r=ci(t,i);null!=n||$o(t)&&(r.length||!i.length)||(n=t,t=e,e=this,r=ci(t,bs(t)));var a=!($o(n)&&"chain"in n&&!n.chain),o=jo(e);return st(r,(function(n){var i=t[n];e[n]=i,o&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__),r=n.__actions__=mr(this.__actions__);return r.push({func:i,args:arguments,thisArg:e}),n.__chain__=t,n}return i.apply(e,pt([this.value()],arguments))})})),e}function Js(){}var Zs=Dr(ht),Qs=Dr(ut),el=Dr(mt);function tl(e){return la(e)?kt(ka(e)):function(e){return function(t){return fi(t,e)}}(e)}var nl=Ir(),il=Ir(!0);function rl(){return[]}function al(){return!1}var ol=Rr((function(e,t){return e+t}),0),sl=Fr("ceil"),ll=Rr((function(e,t){return e/t}),1),ul=Fr("floor");var cl,fl=Rr((function(e,t){return e*t}),1),dl=Fr("round"),hl=Rr((function(e,t){return e-t}),0);return An.after=function(e,t){if("function"!=typeof t)throw new ye(a);return e=is(e),function(){if(--e<1)return t.apply(this,arguments)}},An.ary=go,An.assign=ls,An.assignIn=us,An.assignInWith=cs,An.assignWith=fs,An.at=ds,An.before=mo,An.bind=yo,An.bindAll=Gs,An.bindKey=_o,An.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Io(e)?e:[e]},An.chain=eo,An.chunk=function(e,t,n){t=(n?sa(e,t,n):void 0===t)?1:on(is(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var a=0,o=0,s=i(Zt(r/t));a<r;)s[o++]=Wi(e,a,a+=t);return s},An.compact=function(e){for(var t=-1,n=null==e?0:e.length,i=0,r=[];++t<n;){var a=e[t];a&&(r[i++]=a)}return r},An.concat=function(){var e=arguments.length;if(!e)return[];for(var t=i(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return pt(Io(n)?mr(n):[n],ai(t,1))},An.cond=function(e){var t=null==e?0:e.length,n=Xr();return e=t?ht(e,(function(e){if("function"!=typeof e[1])throw new ye(a);return[n(e[0]),e[1]]})):[],Ni((function(n){for(var i=-1;++i<t;){var r=e[i];if(at(r[0],this,n))return at(r[1],this,n)}}))},An.conforms=function(e){return function(e){var t=bs(e);return function(n){return Jn(n,e,t)}}(Xn(e,1))},An.constant=$s,An.countBy=io,An.create=function(e,t){var n=Cn(e);return null==t?n:Kn(n,t)},An.curry=function e(t,n,i){var r=Ur(t,8,void 0,void 0,void 0,void 0,void 0,n=i?void 0:n);return r.placeholder=e.placeholder,r},An.curryRight=function e(t,n,i){var r=Ur(t,16,void 0,void 0,void 0,void 0,void 0,n=i?void 0:n);return r.placeholder=e.placeholder,r},An.debounce=bo,An.defaults=hs,An.defaultsDeep=ps,An.defer=So,An.delay=wo,An.difference=Aa,An.differenceBy=Ca,An.differenceWith=Ra,An.drop=function(e,t,n){var i=null==e?0:e.length;return i?Wi(e,(t=n||void 0===t?1:is(t))<0?0:t,i):[]},An.dropRight=function(e,t,n){var i=null==e?0:e.length;return i?Wi(e,0,(t=i-(t=n||void 0===t?1:is(t)))<0?0:t):[]},An.dropRightWhile=function(e,t){return e&&e.length?tr(e,Xr(t,3),!0,!0):[]},An.dropWhile=function(e,t){return e&&e.length?tr(e,Xr(t,3),!0):[]},An.fill=function(e,t,n,i){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&sa(e,t,n)&&(n=0,i=r),function(e,t,n,i){var r=e.length;for((n=is(n))<0&&(n=-n>r?0:r+n),(i=void 0===i||i>r?r:is(i))<0&&(i+=r),i=n>i?0:rs(i);n<i;)e[n++]=t;return e}(e,t,n,i)):[]},An.filter=function(e,t){return(Io(e)?ct:ri)(e,Xr(t,3))},An.flatMap=function(e,t){return ai(fo(e,t),1)},An.flatMapDeep=function(e,t){return ai(fo(e,t),1/0)},An.flatMapDepth=function(e,t,n){return n=void 0===n?1:is(n),ai(fo(e,t),n)},An.flatten=Ia,An.flattenDeep=function(e){return(null==e?0:e.length)?ai(e,1/0):[]},An.flattenDepth=function(e,t){return(null==e?0:e.length)?ai(e,t=void 0===t?1:is(t)):[]},An.flip=function(e){return Ur(e,512)},An.flow=Hs,An.flowRight=Ws,An.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,i={};++t<n;){var r=e[t];i[r[0]]=r[1]}return i},An.functions=function(e){return null==e?[]:ci(e,bs(e))},An.functionsIn=function(e){return null==e?[]:ci(e,Ss(e))},An.groupBy=lo,An.initial=function(e){return(null==e?0:e.length)?Wi(e,0,-1):[]},An.intersection=Ma,An.intersectionBy=Fa,An.intersectionWith=Ba,An.invert=ms,An.invertBy=ys,An.invokeMap=uo,An.iteratee=zs,An.keyBy=co,An.keys=bs,An.keysIn=Ss,An.map=fo,An.mapKeys=function(e,t){var n={};return t=Xr(t,3),li(e,(function(e,i,r){zn(n,t(e,i,r),e)})),n},An.mapValues=function(e,t){var n={};return t=Xr(t,3),li(e,(function(e,i,r){zn(n,i,t(e,i,r))})),n},An.matches=function(e){return Ai(Xn(e,1))},An.matchesProperty=function(e,t){return Ci(e,Xn(t,1))},An.memoize=Eo,An.merge=ws,An.mergeWith=Es,An.method=qs,An.methodOf=Ys,An.mixin=Xs,An.negate=To,An.nthArg=function(e){return e=is(e),Ni((function(t){return Di(t,e)}))},An.omit=Ts,An.omitBy=function(e,t){return xs(e,To(Xr(t)))},An.once=function(e){return mo(2,e)},An.orderBy=function(e,t,n,i){return null==e?[]:(Io(t)||(t=null==t?[]:[t]),Io(n=i?void 0:n)||(n=null==n?[]:[n]),Oi(e,t,n))},An.over=Zs,An.overArgs=ko,An.overEvery=Qs,An.overSome=el,An.partial=xo,An.partialRight=Lo,An.partition=ho,An.pick=ks,An.pickBy=xs,An.property=tl,An.propertyOf=function(e){return function(t){return null==e?void 0:fi(e,t)}},An.pull=Ua,An.pullAll=ja,An.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Pi(e,t,Xr(n,2)):e},An.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Pi(e,t,void 0,n):e},An.pullAt=Va,An.range=nl,An.rangeRight=il,An.rearg=Ao,An.reject=function(e,t){return(Io(e)?ct:ri)(e,To(Xr(t,3)))},An.remove=function(e,t){var n=[];if(!e||!e.length)return n;var i=-1,r=[],a=e.length;for(t=Xr(t,3);++i<a;){var o=e[i];t(o,i,e)&&(n.push(o),r.push(i))}return Mi(e,r),n},An.rest=function(e,t){if("function"!=typeof e)throw new ye(a);return Ni(e,t=void 0===t?t:is(t))},An.reverse=Ga,An.sampleSize=function(e,t,n){return t=(n?sa(e,t,n):void 0===t)?1:is(t),(Io(e)?jn:ji)(e,t)},An.set=function(e,t,n){return null==e?e:Vi(e,t,n)},An.setWith=function(e,t,n,i){return i="function"==typeof i?i:void 0,null==e?e:Vi(e,t,n,i)},An.shuffle=function(e){return(Io(e)?Vn:Hi)(e)},An.slice=function(e,t,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&sa(e,t,n)?(t=0,n=i):(t=null==t?0:is(t),n=void 0===n?i:is(n)),Wi(e,t,n)):[]},An.sortBy=po,An.sortedUniq=function(e){return e&&e.length?Yi(e):[]},An.sortedUniqBy=function(e,t){return e&&e.length?Yi(e,Xr(t,2)):[]},An.split=function(e,t,n){return n&&"number"!=typeof n&&sa(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=ss(e))&&("string"==typeof t||null!=t&&!qo(t))&&!(t=Ji(t))&&Ut(e)?ur(Kt(e),0,n):e.split(t,n):[]},An.spread=function(e,t){if("function"!=typeof e)throw new ye(a);return t=null==t?0:on(is(t),0),Ni((function(n){var i=n[t],r=ur(n,0,t);return i&&pt(r,i),at(e,this,r)}))},An.tail=function(e){var t=null==e?0:e.length;return t?Wi(e,1,t):[]},An.take=function(e,t,n){return e&&e.length?Wi(e,0,(t=n||void 0===t?1:is(t))<0?0:t):[]},An.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?Wi(e,(t=i-(t=n||void 0===t?1:is(t)))<0?0:t,i):[]},An.takeRightWhile=function(e,t){return e&&e.length?tr(e,Xr(t,3),!1,!0):[]},An.takeWhile=function(e,t){return e&&e.length?tr(e,Xr(t,3)):[]},An.tap=function(e,t){return t(e),e},An.throttle=function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new ye(a);return $o(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),bo(e,t,{leading:i,maxWait:t,trailing:r})},An.thru=to,An.toArray=ts,An.toPairs=Ls,An.toPairsIn=As,An.toPath=function(e){return Io(e)?ht(e,ka):Jo(e)?[e]:mr(Ta(ss(e)))},An.toPlainObject=os,An.transform=function(e,t,n){var i=Io(e),r=i||Bo(e)||Zo(e);if(t=Xr(t,4),null==n){var a=e&&e.constructor;n=r?i?new a:[]:$o(e)&&jo(a)?Cn(We(e)):{}}return(r?st:li)(e,(function(e,i,r){return t(n,e,i,r)})),n},An.unary=function(e){return go(e,1)},An.union=$a,An.unionBy=Ha,An.unionWith=Wa,An.uniq=function(e){return e&&e.length?Zi(e):[]},An.uniqBy=function(e,t){return e&&e.length?Zi(e,Xr(t,2)):[]},An.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Zi(e,void 0,t):[]},An.unset=function(e,t){return null==e||Qi(e,t)},An.unzip=Ka,An.unzipWith=za,An.update=function(e,t,n){return null==e?e:er(e,t,or(n))},An.updateWith=function(e,t,n,i){return i="function"==typeof i?i:void 0,null==e?e:er(e,t,or(n),i)},An.values=Cs,An.valuesIn=function(e){return null==e?[]:Dt(e,Ss(e))},An.without=qa,An.words=js,An.wrap=function(e,t){return xo(or(t),e)},An.xor=Ya,An.xorBy=Xa,An.xorWith=Ja,An.zip=Za,An.zipObject=function(e,t){return rr(e||[],t||[],$n)},An.zipObjectDeep=function(e,t){return rr(e||[],t||[],Vi)},An.zipWith=Qa,An.entries=Ls,An.entriesIn=As,An.extend=us,An.extendWith=cs,Xs(An,An),An.add=ol,An.attempt=Vs,An.camelCase=Rs,An.capitalize=Ds,An.ceil=sl,An.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=as(n))==n?n:0),void 0!==t&&(t=(t=as(t))==t?t:0),Yn(as(e),t,n)},An.clone=function(e){return Xn(e,4)},An.cloneDeep=function(e){return Xn(e,5)},An.cloneDeepWith=function(e,t){return Xn(e,5,t="function"==typeof t?t:void 0)},An.cloneWith=function(e,t){return Xn(e,4,t="function"==typeof t?t:void 0)},An.conformsTo=function(e,t){return null==t||Jn(e,t,bs(t))},An.deburr=Os,An.defaultTo=function(e,t){return null==e||e!=e?t:e},An.divide=ll,An.endsWith=function(e,t,n){e=ss(e),t=Ji(t);var i=e.length,r=n=void 0===n?i:Yn(is(n),0,i);return(n-=t.length)>=0&&e.slice(n,r)==t},An.eq=Co,An.escape=function(e){return(e=ss(e))&&U.test(e)?e.replace(B,Bt):e},An.escapeRegExp=function(e){return(e=ss(e))&&z.test(e)?e.replace(K,"\\$&"):e},An.every=function(e,t,n){var i=Io(e)?ut:ni;return n&&sa(e,t,n)&&(t=void 0),i(e,Xr(t,3))},An.find=ro,An.findIndex=Da,An.findKey=function(e,t){return _t(e,Xr(t,3),li)},An.findLast=ao,An.findLastIndex=Oa,An.findLastKey=function(e,t){return _t(e,Xr(t,3),ui)},An.floor=ul,An.forEach=oo,An.forEachRight=so,An.forIn=function(e,t){return null==e?e:oi(e,Xr(t,3),Ss)},An.forInRight=function(e,t){return null==e?e:si(e,Xr(t,3),Ss)},An.forOwn=function(e,t){return e&&li(e,Xr(t,3))},An.forOwnRight=function(e,t){return e&&ui(e,Xr(t,3))},An.get=vs,An.gt=Ro,An.gte=Do,An.has=function(e,t){return null!=e&&ia(e,t,vi)},An.hasIn=gs,An.head=Pa,An.identity=Ks,An.includes=function(e,t,n,i){e=Mo(e)?e:Cs(e),n=n&&!i?is(n):0;var r=e.length;return n<0&&(n=on(r+n,0)),Xo(e)?n<=r&&e.indexOf(t,n)>-1:!!r&&St(e,t,n)>-1},An.indexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:is(n);return r<0&&(r=on(i+r,0)),St(e,t,r)},An.inRange=function(e,t,n){return t=ns(t),void 0===n?(n=t,t=0):n=ns(n),function(e,t,n){return e>=sn(t,n)&&e<on(t,n)}(e=as(e),t,n)},An.invoke=_s,An.isArguments=Oo,An.isArray=Io,An.isArrayBuffer=Po,An.isArrayLike=Mo,An.isArrayLikeObject=Fo,An.isBoolean=function(e){return!0===e||!1===e||Ho(e)&&hi(e)==c},An.isBuffer=Bo,An.isDate=No,An.isElement=function(e){return Ho(e)&&1===e.nodeType&&!zo(e)},An.isEmpty=function(e){if(null==e)return!0;if(Mo(e)&&(Io(e)||"string"==typeof e||"function"==typeof e.splice||Bo(e)||Zo(e)||Oo(e)))return!e.length;var t=na(e);if(t==v||t==_)return!e.size;if(fa(e))return!Ti(e).length;for(var n in e)if(Te.call(e,n))return!1;return!0},An.isEqual=function(e,t){return bi(e,t)},An.isEqualWith=function(e,t,n){var i=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===i?bi(e,t,void 0,n):!!i},An.isError=Uo,An.isFinite=function(e){return"number"==typeof e&&nn(e)},An.isFunction=jo,An.isInteger=Vo,An.isLength=Go,An.isMap=Wo,An.isMatch=function(e,t){return e===t||Si(e,t,Zr(t))},An.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,Si(e,t,Zr(t),n)},An.isNaN=function(e){return Ko(e)&&e!=+e},An.isNative=function(e){if(ca(e))throw new de("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return wi(e)},An.isNil=function(e){return null==e},An.isNull=function(e){return null===e},An.isNumber=Ko,An.isObject=$o,An.isObjectLike=Ho,An.isPlainObject=zo,An.isRegExp=qo,An.isSafeInteger=function(e){return Vo(e)&&e>=-9007199254740991&&e<=9007199254740991},An.isSet=Yo,An.isString=Xo,An.isSymbol=Jo,An.isTypedArray=Zo,An.isUndefined=function(e){return void 0===e},An.isWeakMap=function(e){return Ho(e)&&na(e)==w},An.isWeakSet=function(e){return Ho(e)&&"[object WeakSet]"==hi(e)},An.join=function(e,t){return null==e?"":rn.call(e,t)},An.kebabCase=Is,An.last=Na,An.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=i;return void 0!==n&&(r=(r=is(n))<0?on(i+r,0):sn(r,i-1)),t==t?function(e,t,n){for(var i=n+1;i--;)if(e[i]===t)return i;return i}(e,t,r):bt(e,Et,r,!0)},An.lowerCase=Ps,An.lowerFirst=Ms,An.lt=Qo,An.lte=es,An.max=function(e){return e&&e.length?ii(e,Ks,pi):void 0},An.maxBy=function(e,t){return e&&e.length?ii(e,Xr(t,2),pi):void 0},An.mean=function(e){return Tt(e,Ks)},An.meanBy=function(e,t){return Tt(e,Xr(t,2))},An.min=function(e){return e&&e.length?ii(e,Ks,xi):void 0},An.minBy=function(e,t){return e&&e.length?ii(e,Xr(t,2),xi):void 0},An.stubArray=rl,An.stubFalse=al,An.stubObject=function(){return{}},An.stubString=function(){return""},An.stubTrue=function(){return!0},An.multiply=fl,An.nth=function(e,t){return e&&e.length?Di(e,is(t)):void 0},An.noConflict=function(){return ze._===this&&(ze._=Ce),this},An.noop=Js,An.now=vo,An.pad=function(e,t,n){e=ss(e);var i=(t=is(t))?Wt(e):0;if(!t||i>=t)return e;var r=(t-i)/2;return Or(Qt(r),n)+e+Or(Zt(r),n)},An.padEnd=function(e,t,n){e=ss(e);var i=(t=is(t))?Wt(e):0;return t&&i<t?e+Or(t-i,n):e},An.padStart=function(e,t,n){e=ss(e);var i=(t=is(t))?Wt(e):0;return t&&i<t?Or(t-i,n)+e:e},An.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),un(ss(e).replace(Y,""),t||0)},An.random=function(e,t,n){if(n&&"boolean"!=typeof n&&sa(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=ns(e),void 0===t?(t=e,e=0):t=ns(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var r=cn();return sn(e+r*(t-e+$e("1e-"+((r+"").length-1))),t)}return Fi(e,t)},An.reduce=function(e,t,n){var i=Io(e)?vt:Lt,r=arguments.length<3;return i(e,Xr(t,4),n,r,ei)},An.reduceRight=function(e,t,n){var i=Io(e)?gt:Lt,r=arguments.length<3;return i(e,Xr(t,4),n,r,ti)},An.repeat=function(e,t,n){return t=(n?sa(e,t,n):void 0===t)?1:is(t),Bi(ss(e),t)},An.replace=function(){var e=arguments,t=ss(e[0]);return e.length<3?t:t.replace(e[1],e[2])},An.result=function(e,t,n){var i=-1,r=(t=sr(t,e)).length;for(r||(r=1,e=void 0);++i<r;){var a=null==e?void 0:e[ka(t[i])];void 0===a&&(i=r,a=n),e=jo(a)?a.call(e):a}return e},An.round=dl,An.runInContext=e,An.sample=function(e){return(Io(e)?Un:Ui)(e)},An.size=function(e){if(null==e)return 0;if(Mo(e))return Xo(e)?Wt(e):e.length;var t=na(e);return t==v||t==_?e.size:Ti(e).length},An.snakeCase=Fs,An.some=function(e,t,n){var i=Io(e)?mt:Ki;return n&&sa(e,t,n)&&(t=void 0),i(e,Xr(t,3))},An.sortedIndex=function(e,t){return zi(e,t)},An.sortedIndexBy=function(e,t,n){return qi(e,t,Xr(n,2))},An.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var i=zi(e,t);if(i<n&&Co(e[i],t))return i}return-1},An.sortedLastIndex=function(e,t){return zi(e,t,!0)},An.sortedLastIndexBy=function(e,t,n){return qi(e,t,Xr(n,2),!0)},An.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=zi(e,t,!0)-1;if(Co(e[n],t))return n}return-1},An.startCase=Bs,An.startsWith=function(e,t,n){return e=ss(e),n=null==n?0:Yn(is(n),0,e.length),t=Ji(t),e.slice(n,n+t.length)==t},An.subtract=hl,An.sum=function(e){return e&&e.length?At(e,Ks):0},An.sumBy=function(e,t){return e&&e.length?At(e,Xr(t,2)):0},An.template=function(e,t,n){var i=An.templateSettings;n&&sa(e,t,n)&&(t=void 0),e=ss(e),t=cs({},t,i,jr);var r,a,o=cs({},t.imports,i.imports,jr),s=bs(o),l=Dt(o,s),u=0,c=t.interpolate||ce,f="__p += '",d=ge((t.escape||ce).source+"|"+c.source+"|"+(c===G?ne:ce).source+"|"+(t.evaluate||ce).source+"|$","g"),h="//# sourceURL="+(Te.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ue+"]")+"\n";e.replace(d,(function(t,n,i,o,s,l){return i||(i=o),f+=e.slice(u,l).replace(fe,Nt),n&&(r=!0,f+="' +\n__e("+n+") +\n'"),s&&(a=!0,f+="';\n"+s+";\n__p += '"),i&&(f+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),u=l+t.length,t})),f+="';\n";var p=Te.call(t,"variable")&&t.variable;p||(f="with (obj) {\n"+f+"\n}\n"),f=(a?f.replace(I,""):f).replace(P,"$1").replace(M,"$1;"),f="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(r?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var v=Vs((function(){return he(s,h+"return "+f).apply(void 0,l)}));if(v.source=f,Uo(v))throw v;return v},An.times=function(e,t){if((e=is(e))<1||e>9007199254740991)return[];var n=4294967295,i=sn(e,4294967295);e-=4294967295;for(var r=Ct(i,t=Xr(t));++n<e;)t(n);return r},An.toFinite=ns,An.toInteger=is,An.toLength=rs,An.toLower=function(e){return ss(e).toLowerCase()},An.toNumber=as,An.toSafeInteger=function(e){return e?Yn(is(e),-9007199254740991,9007199254740991):0===e?e:0},An.toString=ss,An.toUpper=function(e){return ss(e).toUpperCase()},An.trim=function(e,t,n){if((e=ss(e))&&(n||void 0===t))return e.replace(q,"");if(!e||!(t=Ji(t)))return e;var i=Kt(e),r=Kt(t);return ur(i,It(i,r),Pt(i,r)+1).join("")},An.trimEnd=function(e,t,n){if((e=ss(e))&&(n||void 0===t))return e.replace(X,"");if(!e||!(t=Ji(t)))return e;var i=Kt(e);return ur(i,0,Pt(i,Kt(t))+1).join("")},An.trimStart=function(e,t,n){if((e=ss(e))&&(n||void 0===t))return e.replace(Y,"");if(!e||!(t=Ji(t)))return e;var i=Kt(e);return ur(i,It(i,Kt(t))).join("")},An.truncate=function(e,t){var n=30,i="...";if($o(t)){var r="separator"in t?t.separator:r;n="length"in t?is(t.length):n,i="omission"in t?Ji(t.omission):i}var a=(e=ss(e)).length;if(Ut(e)){var o=Kt(e);a=o.length}if(n>=a)return e;var s=n-Wt(i);if(s<1)return i;var l=o?ur(o,0,s).join(""):e.slice(0,s);if(void 0===r)return l+i;if(o&&(s+=l.length-s),qo(r)){if(e.slice(s).search(r)){var u,c=l;for(r.global||(r=ge(r.source,ss(ie.exec(r))+"g")),r.lastIndex=0;u=r.exec(c);)var f=u.index;l=l.slice(0,void 0===f?s:f)}}else if(e.indexOf(Ji(r),s)!=s){var d=l.lastIndexOf(r);d>-1&&(l=l.slice(0,d))}return l+i},An.unescape=function(e){return(e=ss(e))&&N.test(e)?e.replace(F,zt):e},An.uniqueId=function(e){var t=++ke;return ss(e)+t},An.upperCase=Ns,An.upperFirst=Us,An.each=oo,An.eachRight=so,An.first=Pa,Xs(An,(cl={},li(An,(function(e,t){Te.call(An.prototype,t)||(cl[t]=e)})),cl),{chain:!1}),An.VERSION="4.17.20",st(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){An[e].placeholder=An})),st(["drop","take"],(function(e,t){On.prototype[e]=function(n){n=void 0===n?1:on(is(n),0);var i=this.__filtered__&&!t?new On(this):this.clone();return i.__filtered__?i.__takeCount__=sn(n,i.__takeCount__):i.__views__.push({size:sn(n,4294967295),type:e+(i.__dir__<0?"Right":"")}),i},On.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),st(["filter","map","takeWhile"],(function(e,t){var n=t+1,i=1==n||3==n;On.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Xr(e,3),type:n}),t.__filtered__=t.__filtered__||i,t}})),st(["head","last"],(function(e,t){var n="take"+(t?"Right":"");On.prototype[e]=function(){return this[n](1).value()[0]}})),st(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");On.prototype[e]=function(){return this.__filtered__?new On(this):this[n](1)}})),On.prototype.compact=function(){return this.filter(Ks)},On.prototype.find=function(e){return this.filter(e).head()},On.prototype.findLast=function(e){return this.reverse().find(e)},On.prototype.invokeMap=Ni((function(e,t){return"function"==typeof e?new On(this):this.map((function(n){return yi(n,e,t)}))})),On.prototype.reject=function(e){return this.filter(To(Xr(e)))},On.prototype.slice=function(e,t){e=is(e);var n=this;return n.__filtered__&&(e>0||t<0)?new On(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=is(t))<0?n.dropRight(-t):n.take(t-e)),n)},On.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},On.prototype.toArray=function(){return this.take(4294967295)},li(On.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),r=An[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);r&&(An.prototype[t]=function(){var t=this.__wrapped__,o=i?[1]:arguments,s=t instanceof On,l=o[0],u=s||Io(t),c=function(e){var t=r.apply(An,pt([e],o));return i&&f?t[0]:t};u&&n&&"function"==typeof l&&1!=l.length&&(s=u=!1);var f=this.__chain__,d=!!this.__actions__.length,h=a&&!f,p=s&&!d;if(!a&&u){t=p?t:new On(this);var v=e.apply(t,o);return v.__actions__.push({func:to,args:[c],thisArg:void 0}),new Dn(v,f)}return h&&p?e.apply(this,o):(v=this.thru(c),h?i?v.value()[0]:v.value():v)})})),st(["pop","push","shift","sort","splice","unshift"],(function(e){var t=_e[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);An.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var r=this.value();return t.apply(Io(r)?r:[],e)}return this[n]((function(n){return t.apply(Io(n)?n:[],e)}))}})),li(On.prototype,(function(e,t){var n=An[t];if(n){var i=n.name+"";Te.call(_n,i)||(_n[i]=[]),_n[i].push({name:t,func:n})}})),_n[Ar(void 0,2).name]=[{name:"wrapper",func:void 0}],On.prototype.clone=function(){var e=new On(this.__wrapped__);return e.__actions__=mr(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=mr(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=mr(this.__views__),e},On.prototype.reverse=function(){if(this.__filtered__){var e=new On(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},On.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Io(e),i=t<0,r=n?e.length:0,a=function(e,t,n){var i=-1,r=n.length;for(;++i<r;){var a=n[i],o=a.size;switch(a.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=sn(t,e+o);break;case"takeRight":e=on(e,t-o)}}return{start:e,end:t}}(0,r,this.__views__),o=a.start,s=a.end,l=s-o,u=i?s:o-1,c=this.__iteratees__,f=c.length,d=0,h=sn(l,this.__takeCount__);if(!n||!i&&r==l&&h==l)return nr(e,this.__actions__);var p=[];e:for(;l--&&d<h;){for(var v=-1,g=e[u+=t];++v<f;){var m=c[v],y=m.iteratee,_=m.type,b=y(g);if(2==_)g=b;else if(!b){if(1==_)continue e;break e}}p[d++]=g}return p},An.prototype.at=no,An.prototype.chain=function(){return eo(this)},An.prototype.commit=function(){return new Dn(this.value(),this.__chain__)},An.prototype.next=function(){void 0===this.__values__&&(this.__values__=ts(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},An.prototype.plant=function(e){for(var t,n=this;n instanceof Rn;){var i=La(n);i.__index__=0,i.__values__=void 0,t?r.__wrapped__=i:t=i;var r=i;n=n.__wrapped__}return r.__wrapped__=e,t},An.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof On){var t=e;return this.__actions__.length&&(t=new On(this)),(t=t.reverse()).__actions__.push({func:to,args:[Ga],thisArg:void 0}),new Dn(t,this.__chain__)}return this.thru(Ga)},An.prototype.toJSON=An.prototype.valueOf=An.prototype.value=function(){return nr(this.__wrapped__,this.__actions__)},An.prototype.first=An.prototype.head,Ze&&(An.prototype[Ze]=function(){return this}),An}();ze._=qt,void 0===(r=function(){return qt}.call(t,n,t,i))||(i.exports=r)}).call(this)}).call(this,n(71),n(285)(e))},function(t,n){t.exports=e},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,n(71))},function(e,t){e.exports={}},function(e,t,n){var i=n(14),r=n(117),a=n(37),o=n(118),s=n(119),l=n(154),u=r("wks"),c=i.Symbol,f=l?c:c&&c.withoutSetter||o;e.exports=function(e){return a(u,e)||(s&&a(c,e)?u[e]=c[e]:u[e]=f("Symbol."+e)),u[e]}},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,n(71))},function(e,t,n){e.exports=n(79)},function(e,t,n){var i=n(15),r=n(37),a=n(138),o=n(49).f;e.exports=function(e){var t=i.Symbol||(i.Symbol={});r(t,e)||o(t,e,{value:a.f(e)})}},function(e,t,n){e.exports=n(281)},function(e,t,n){e.exports=n(343)},function(e,t,n){e.exports=n(293)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){e.exports=n(323)},function(e,t,n){e.exports=n(324)},function(e,t,n){e.exports=n(299)},function(e,t,n){var i=n(17),r=n(162),a=n(41),o=n(163),s=n(168),l=n(240),u=r("wks"),c=i.Symbol,f=l?c:c&&c.withoutSetter||o;e.exports=function(e){return a(u,e)||(s&&a(c,e)?u[e]=c[e]:u[e]=f("Symbol."+e)),u[e]}},function(e,t,n){var i=n(15);e.exports=function(e){return i[e+"Prototype"]}},function(e,t,n){e.exports=n(302)},function(e,t,n){e.exports=n(395)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var i=n(45);e.exports=function(e){if(!i(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){e.exports=n(362)},function(e,t,n){var i=n(23);e.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var i=n(306);function r(e,t,n,r,a,o,s){try{var l=e[o](s),u=l.value}catch(e){return void n(e)}l.done?t(u):i.resolve(u).then(r,a)}e.exports=function(e){return function(){var t=this,n=arguments;return new i((function(i,a){var o=e.apply(t,n);function s(e){r(o,i,a,s,l,"next",e)}function l(e){r(o,i,a,s,l,"throw",e)}s(void 0)}))}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var i=n(34),r=n(23),a=n(37),o=Object.defineProperty,s={},l=function(e){throw e};e.exports=function(e,t){if(a(s,e))return s[e];t||(t={});var n=[][e],u=!!a(t,"ACCESSORS")&&t.ACCESSORS,c=a(t,0)?t[0]:l,f=a(t,1)?t[1]:void 0;return s[e]=!!n&&!r((function(){if(u&&!i)return!0;var e={length:-1};u?o(e,1,{enumerable:!0,get:l}):e[1]=1,n.call(e,c,f)}))}},function(e,t,n){var i=n(34),r=n(49),a=n(63);e.exports=i?function(e,t,n){return r.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var i=n(35);e.exports=function(e){if(!i(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var i=n(114),r=n(61);e.exports=function(e){return i(r(e))}},function(e,t,n){var i=n(15),r=n(14),a=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?a(i[e])||a(r[e]):i[e]&&i[e][t]||r[e]&&r[e][t]}},function(e,t,n){var i=n(31);e.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var i=n(44),r=n(161),a=n(32),o=n(127),s=Object.defineProperty;t.f=i?s:function(e,t,n){if(a(e),t=o(t,!0),a(n),r)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var i=n(17),r=n(53),a=n(41),o=n(129),s=n(130),l=n(76),u=l.get,c=l.enforce,f=String(String).split("String");(e.exports=function(e,t,n,s){var l,u=!!s&&!!s.unsafe,d=!!s&&!!s.enumerable,h=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof t||a(n,"name")||r(n,"name",t),(l=c(n)).source||(l.source=f.join("string"==typeof t?t:""))),e!==i?(u?!h&&e[t]&&(d=!0):delete e[t],d?e[t]=n:r(e,t,n)):d?e[t]=n:o(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||s(this)}))},function(e,t,n){var i=n(247),r=n(251);function a(t){return e.exports=a="function"==typeof r&&"symbol"==typeof i?function(e){return typeof e}:function(e){return e&&"function"==typeof r&&e.constructor===r&&e!==r.prototype?"symbol":typeof e},a(t)}e.exports=a},function(e,t,n){var i=n(34),r=n(148),a=n(40),o=n(86),s=Object.defineProperty;t.f=i?s:function(e,t,n){if(a(e),t=o(t,!0),a(n),r)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var i=n(61);e.exports=function(e){return Object(i(e))}},function(e,t,n){var i=n(91),r=Math.min;e.exports=function(e){return e>0?r(i(e),9007199254740991):0}},function(e,t,n){var i=n(89),r=n(114),a=n(50),o=n(51),s=n(125),l=[].push,u=function(e){var t=1==e,n=2==e,u=3==e,c=4==e,f=6==e,d=7==e,h=5==e||f;return function(p,v,g,m){for(var y,_,b=a(p),S=r(b),w=i(v,g,3),E=o(S.length),T=0,k=m||s,x=t?k(p,E):n||d?k(p,0):void 0;E>T;T++)if((h||T in S)&&(_=w(y=S[T],T,b),e))if(t)x[T]=_;else if(_)switch(e){case 3:return!0;case 5:return y;case 6:return T;case 2:l.call(x,y)}else switch(e){case 4:return!1;case 7:l.call(x,y)}return f?-1:u||c?c:x}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterOut:u(7)}},function(e,t,n){var i=n(44),r=n(46),a=n(126);e.exports=i?function(e,t,n){return r.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var i=n(141),r=n(47),a=n(356);i||r(Object.prototype,"toString",a,{unsafe:!0})},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var i=n(186);function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i(e,r.key,r)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},function(e,t){e.exports=!0},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){"use strict";var i=n(47),r=n(32),a=n(31),o=n(136),s=RegExp.prototype,l=s.toString,u=a((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),c="toString"!=l.name;(u||c)&&i(RegExp.prototype,"toString",(function(){var e=r(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in s)?o.call(e):n)}),{unsafe:!0})},function(e,t,n){e.exports=n(397)},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){e.exports={}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var i=n(34),r=n(150),a=n(63),o=n(42),s=n(86),l=n(37),u=n(148),c=Object.getOwnPropertyDescriptor;t.f=i?c:function(e,t){if(e=o(e),t=s(t,!0),u)try{return c(e,t)}catch(e){}if(l(e,t))return a(!r.f.call(e,t),e[t])}},function(e,t,n){"use strict";var i=n(94),r=n(100);i({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){e.exports=n(408)},function(e,t,n){e.exports=n(282)},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var i=n(124),r=n(49).f,a=n(39),o=n(37),s=n(225),l=n(16)("toStringTag");e.exports=function(e,t,n,u){if(e){var c=n?e:e.prototype;o(c,l)||r(c,l,{configurable:!0,value:t}),u&&!i&&a(c,"toString",s)}}},function(e,t,n){var i=n(39);e.exports=function(e,t,n,r){r&&r.enumerable?e[t]=n:i(e,t,n)}},function(e,t,n){var i=n(70);e.exports=Array.isArray||function(e){return"Array"==i(e)}},function(e,t,n){var i=n(160),r=n(67);e.exports=function(e){return i(r(e))}},function(e,t,n){var i,r,a,o=n(233),s=n(17),l=n(45),u=n(53),c=n(41),f=n(131),d=n(132),h=n(133),p=s.WeakMap;if(o){var v=f.state||(f.state=new p),g=v.get,m=v.has,y=v.set;i=function(e,t){return t.facade=e,y.call(v,e,t),t},r=function(e){return g.call(v,e)||{}},a=function(e){return m.call(v,e)}}else{var _=d("state");h[_]=!0,i=function(e,t){return t.facade=e,u(e,_,t),t},r=function(e){return c(e,_)?e[_]:{}},a=function(e){return c(e,_)}}e.exports={set:i,get:r,has:a,enforce:function(e){return a(e)?r(e):i(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var i=n(236),r=n(17),a=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?a(i[e])||a(r[e]):i[e]&&i[e][t]||r[e]&&r[e][t]}},function(e,t,n){var i=n(23),r=n(16),a=n(103),o=r("species");e.exports=function(e){return a>=51||!i((function(){var t=[];return(t.constructor={})[o]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){var i=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},r=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",o=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function l(e,t,n,i){var r=t&&t.prototype instanceof f?t:f,a=Object.create(r.prototype),o=new E(i||[]);return a._invoke=function(e,t,n){var i="suspendedStart";return function(r,a){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw a;return k()}for(n.method=r,n.arg=a;;){var o=n.delegate;if(o){var s=b(o,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var l=u(e,t,n);if("normal"===l.type){if(i=n.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i="completed",n.method="throw",n.arg=l.arg)}}}(e,n,o),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var c={};function f(){}function d(){}function h(){}var p={};p[r]=function(){return this};var v=Object.getPrototypeOf,g=v&&v(v(T([])));g&&g!==t&&n.call(g,r)&&(p=g);var m=h.prototype=f.prototype=Object.create(p);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var i;this._invoke=function(r,a){function o(){return new t((function(i,o){!function i(r,a,o,s){var l=u(e[r],e,a);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,o,s)}),(function(e){i("throw",e,o,s)})):t.resolve(f).then((function(e){c.value=e,o(c)}),(function(e){return i("throw",e,o,s)}))}s(l.arg)}(r,a,i,o)}))}return i=i?i.then(o,o):o()}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var i=u(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,c;var r=i.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function T(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function t(){for(;++i<e.length;)if(n.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=m.constructor=h,h.constructor=d,d.displayName=s(h,o,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,s(e,o,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},y(_.prototype),_.prototype[a]=function(){return this},e.AsyncIterator=_,e.async=function(t,n,i,r,a){void 0===a&&(a=Promise);var o=new _(l(t,n,i,r),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},y(m),s(m,o,"Generator"),m[r]=function(){return this},m.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var i=t.pop();if(i in e)return n.value=i,n.done=!1,n}return n.done=!0,n}},e.values=T,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(n,i){return o.type="throw",o.arg=e,t.next=n,i&&(t.method="next",t.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],o=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,c):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;w(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=i}catch(e){Function("r","regeneratorRuntime = r")(i)}},function(e,t,n){"use strict";var i=n(58),r=function(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=i})),this.resolve=i(t),this.reject=i(n)};e.exports.f=function(e){return new r(e)}},function(e,t){e.exports={}},function(e,t,n){e.exports=n(370)},function(e,t,n){(function(t){e.exports=function e(t,n,i){function r(o,s){if(!n[o]){if(!t[o]){if(a)return a(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[o]={exports:{}};t[o][0].call(u.exports,(function(e){var n=t[o][1][e];return r(n||e)}),u,u.exports,e,t,n,i)}return n[o].exports}for(var a=!1,o=0;o<i.length;o++)r(i[o]);return r}({1:[function(e,n,i){(function(t,r){
10/*!
11 * @overview es6-promise - a tiny implementation of Promises/A+.
12 * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
13 * @license Licensed under MIT license
14 * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
15 * @version v4.2.5+7f2b526d
16 */
17!function(e,t){"object"==typeof i&&void 0!==n?n.exports=t():e.ES6Promise=t()}(this,(function(){"use strict";function n(e){return"function"==typeof e}var i=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},a=0,o=void 0,s=void 0,l=function(e,t){v[a]=e,v[a+1]=t,2===(a+=2)&&(s?s(g):S())},u="undefined"!=typeof window?window:void 0,c=u||{},f=c.MutationObserver||c.WebKitMutationObserver,d="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var e=setTimeout;return function(){return e(g,1)}}var v=new Array(1e3);function g(){for(var e=0;e<a;e+=2)(0,v[e])(v[e+1]),v[e]=void 0,v[e+1]=void 0;a=0}var m,y,_,b,S=void 0;function w(e,t){var n=this,i=new this.constructor(k);void 0===i[T]&&B(i);var r=n._state;if(r){var a=arguments[r-1];l((function(){return M(r,i,a,n._result)}))}else I(n,i,e,t);return i}function E(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(k);return C(t,e),t}d?S=function(){return t.nextTick(g)}:f?(y=0,_=new f(g),b=document.createTextNode(""),_.observe(b,{characterData:!0}),S=function(){b.data=y=++y%2}):h?((m=new MessageChannel).port1.onmessage=g,S=function(){return m.port2.postMessage(0)}):S=void 0===u&&"function"==typeof e?function(){try{var e=Function("return this")().require("vertx");return void 0!==(o=e.runOnLoop||e.runOnContext)?function(){o(g)}:p()}catch(e){return p()}}():p();var T=Math.random().toString(36).substring(2);function k(){}var x={error:null};function L(e){try{return e.then}catch(e){return x.error=e,x}}function A(e,t,i){t.constructor===e.constructor&&i===w&&t.constructor.resolve===E?function(e,t){1===t._state?D(e,t._result):2===t._state?O(e,t._result):I(t,void 0,(function(t){return C(e,t)}),(function(t){return O(e,t)}))}(e,t):i===x?(O(e,x.error),x.error=null):void 0===i?D(e,t):n(i)?function(e,t,n){l((function(e){var i=!1,r=function(e,t,n,i){try{e.call(t,n,i)}catch(e){return e}}(n,t,(function(n){i||(i=!0,t!==n?C(e,n):D(e,n))}),(function(t){i||(i=!0,O(e,t))}),e._label);!i&&r&&(i=!0,O(e,r))}),e)}(e,t,i):D(e,t)}function C(e,t){var n,i;e===t?O(e,new TypeError("You cannot resolve a promise with itself")):(i=typeof(n=t),null===n||"object"!==i&&"function"!==i?D(e,t):A(e,t,L(t)))}function R(e){e._onerror&&e._onerror(e._result),P(e)}function D(e,t){void 0===e._state&&(e._result=t,e._state=1,0!==e._subscribers.length&&l(P,e))}function O(e,t){void 0===e._state&&(e._state=2,e._result=t,l(R,e))}function I(e,t,n,i){var r=e._subscribers,a=r.length;e._onerror=null,r[a]=t,r[a+1]=n,r[a+2]=i,0===a&&e._state&&l(P,e)}function P(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var i=void 0,r=void 0,a=e._result,o=0;o<t.length;o+=3)i=t[o],r=t[o+n],i?M(n,i,r,a):r(a);e._subscribers.length=0}}function M(e,t,i,r){var a=n(i),o=void 0,s=void 0,l=void 0,u=void 0;if(a){if((o=function(e,t){try{return e(t)}catch(e){return x.error=e,x}}(i,r))===x?(u=!0,s=o.error,o.error=null):l=!0,t===o)return void O(t,new TypeError("A promises callback cannot return that same promise."))}else o=r,l=!0;void 0!==t._state||(a&&l?C(t,o):u?O(t,s):1===e?D(t,o):2===e&&O(t,o))}var F=0;function B(e){e[T]=F++,e._state=void 0,e._result=void 0,e._subscribers=[]}var N=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(k),this.promise[T]||B(this.promise),i(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?D(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&D(this.promise,this._result))):O(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;void 0===this._state&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,i=n.resolve;if(i===E){var r=L(e);if(r===w&&void 0!==e._state)this._settledAt(e._state,t,e._result);else if("function"!=typeof r)this._remaining--,this._result[t]=e;else if(n===U){var a=new n(k);A(a,e,r),this._willSettleAt(a,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(i(e),t)},e.prototype._settledAt=function(e,t,n){var i=this.promise;void 0===i._state&&(this._remaining--,2===e?O(i,n):this._result[t]=n),0===this._remaining&&D(i,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;I(e,void 0,(function(e){return n._settledAt(1,t,e)}),(function(e){return n._settledAt(2,t,e)}))},e}(),U=function(){function e(t){this[T]=F++,this._result=this._state=void 0,this._subscribers=[],k!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(e,t){try{t((function(t){C(e,t)}),(function(t){O(e,t)}))}catch(t){O(e,t)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(e){var t=this.constructor;return n(e)?this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){throw n}))})):this.then(e,e)},e}();return U.prototype.then=w,U.all=function(e){return new N(this,e).promise},U.race=function(e){var t=this;return i(e)?new t((function(n,i){for(var r=e.length,a=0;a<r;a++)t.resolve(e[a]).then(n,i)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},U.resolve=E,U.reject=function(e){var t=new this(k);return O(t,e),t},U._setScheduler=function(e){s=e},U._setAsap=function(e){l=e},U._asap=l,U.polyfill=function(){var e=void 0;if(void 0!==r)e=r;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=U},U.Promise=U,U}))}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:3}],2:[function(e,t,n){function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function a(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}t.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},i.prototype.emit=function(e){var t,n,i,s,l,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(o(n=this._events[e]))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(a(n))for(s=Array.prototype.slice.call(arguments,1),i=(u=n.slice()).length,l=0;l<i;l++)u[l].apply(this,s);return!0},i.prototype.addListener=function(e,t){var n;if(!r(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?a(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,a(this._events[e])&&!this._events[e].warned&&(n=o(this._maxListeners)?i.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},i.prototype.removeListener=function(e,t){var n,i,o,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(s=o;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},i.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},i.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},i.listenerCount=function(e,t){return e.listenerCount(t)}},{}],3:[function(e,t,n){var i,r,a=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(e){if(i===setTimeout)return setTimeout(e,0);if((i===o||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:o}catch(e){i=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u,c=[],f=!1,d=-1;function h(){f&&u&&(f=!1,u.length?c=u.concat(c):d=-1,c.length&&p())}function p(){if(!f){var e=l(h);f=!0;for(var t=c.length;t;){for(u=c,c=[];++d<t;)u&&u[d].run();d=-1,t=c.length}u=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function v(e,t){this.fun=e,this.array=t}function g(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new v(e,t)),1!==c.length||f||l(p)},v.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=g,a.addListener=g,a.once=g,a.off=g,a.removeListener=g,a.removeAllListeners=g,a.emit=g,a.prependListener=g,a.prependOnceListener=g,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],4:[function(e,t,n){var i=arguments[3],r=arguments[4],a=arguments[5],o=JSON.stringify;t.exports=function(e,t){for(var n,s=Object.keys(a),l=0,u=s.length;l<u;l++){var c=s[l],f=a[c].exports;if(f===e||f&&f.default===e){n=c;break}}if(!n){n=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var d={};for(l=0,u=s.length;l<u;l++)d[c=s[l]]=c;r[n]=["function(require,module,exports){"+e+"(self); }",d]}var h=Math.floor(Math.pow(16,8)*Math.random()).toString(16),p={};p[n]=n,r[h]=["function(require,module,exports){var f = require("+o(n)+");(f.default ? f.default : f)(self);}",p];var v={};!function e(t){for(var n in v[t]=!0,r[t][1]){var i=r[t][1][n];v[i]||e(i)}}(h);var g="("+i+")({"+Object.keys(v).map((function(e){return o(e)+":["+r[e][0]+","+o(r[e][1])+"]"})).join(",")+"},{},["+o(h)+"])",m=window.URL||window.webkitURL||window.mozURL||window.msURL,y=new Blob([g],{type:"text/javascript"});if(t&&t.bare)return y;var _=m.createObjectURL(y),b=new Worker(_);return b.objectURL=_,b}},{}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createDefaultConfig=function(){return Object.assign({},i)};var i=n.defaultConfig={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0}},{}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=e("../io/io-controller.js"),o=(i=a)&&i.__esModule?i:{default:i},s=e("../config.js"),l=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"supportMSEH264Playback",value:function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"supportNetworkStreamIO",value:function(){var e=new o.default({},(0,s.createDefaultConfig)()),t=e.loaderType;return e.destroy(),"fetch-stream-loader"==t||"xhr-moz-chunked-loader"==t}},{key:"getNetworkLoaderTypeName",value:function(){var e=new o.default({},(0,s.createDefaultConfig)()),t=e.loaderType;return e.destroy(),t}},{key:"supportNativeMediaPlayback",value:function(t){null==e.videoElement&&(e.videoElement=window.document.createElement("video"));var n=e.videoElement.canPlayType(t);return"probably"===n||"maybe"==n}},{key:"getFeatureList",value:function(){var t={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return t.mseFlvPlayback=e.supportMSEH264Playback(),t.networkStreamIO=e.supportNetworkStreamIO(),t.networkLoaderName=e.getNetworkLoaderTypeName(),t.mseLiveFlvPlayback=t.mseFlvPlayback&&t.networkStreamIO,t.nativeMP4H264Playback=e.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),t.nativeWebmVP8Playback=e.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),t.nativeWebmVP9Playback=e.supportNativeMediaPlayback('video/webm; codecs="vp9"'),t}}]),e}();n.default=l},{"../config.js":5,"../io/io-controller.js":23}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return i(e,[{key:"isComplete",value:function(){var e=!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,t=!1===this.hasVideo||!0===this.hasVideo&&null!=this.videoCodec&&null!=this.width&&null!=this.height&&null!=this.fps&&null!=this.profile&&null!=this.level&&null!=this.refFrames&&null!=this.chromaFormat&&null!=this.sarNum&&null!=this.sarDen;return null!=this.mimeType&&null!=this.duration&&null!=this.metadata&&null!=this.hasKeyframesIndex&&e&&t}},{key:"isSeekable",value:function(){return!0===this.hasKeyframesIndex}},{key:"getNearestKeyframe",value:function(e){if(null==this.keyframesIndex)return null;var t=this.keyframesIndex,n=this._search(t.times,e);return{index:n,milliseconds:t.times[n],fileposition:t.filepositions[n]}}},{key:"_search",value:function(e,t){var n=0,i=e.length-1,r=0,a=0,o=i;for(t<e[0]&&(n=0,a=o+1);a<=o;){if((r=a+Math.floor((o-a)/2))===i||t>=e[r]&&t<e[r+1]){n=r;break}e[r]<t?a=r+1:o=r-1}return n}}]),e}();n.default=r},{}],8:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.SampleInfo=function e(t,n,i,a,o){r(this,e),this.dts=t,this.pts=n,this.duration=i,this.originalDts=a,this.isSyncPoint=o,this.fileposition=null},n.MediaSegmentInfo=function(){function e(){r(this,e),this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return i(e,[{key:"appendSyncPoint",value:function(e){e.isSyncPoint=!0,this.syncPoints.push(e)}}]),e}(),n.IDRSampleList=function(){function e(){r(this,e),this._list=[]}return i(e,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(e){var t=this._list;0!==e.length&&(t.length>0&&e[0].originalDts<t[t.length-1].originalDts&&this.clear(),Array.prototype.push.apply(t,e))}},{key:"getLastSyncPointBeforeDts",value:function(e){if(0==this._list.length)return null;var t=this._list,n=0,i=t.length-1,r=0,a=0,o=i;for(e<t[0].dts&&(n=0,a=o+1);a<=o;){if((r=a+Math.floor((o-a)/2))===i||e>=t[r].dts&&e<t[r+1].dts){n=r;break}t[r].dts<e?a=r+1:o=r-1}return this._list[n]}}]),e}(),n.MediaSegmentInfoList=function(){function e(t){r(this,e),this._type=t,this._list=[],this._lastAppendLocation=-1}return i(e,[{key:"isEmpty",value:function(){return 0===this._list.length}},{key:"clear",value:function(){this._list=[],this._lastAppendLocation=-1}},{key:"_searchNearestSegmentBefore",value:function(e){var t=this._list;if(0===t.length)return-2;var n=t.length-1,i=0,r=0,a=n,o=0;if(e<t[0].originalBeginDts)return o=-1;for(;r<=a;){if((i=r+Math.floor((a-r)/2))===n||e>t[i].lastSample.originalDts&&e<t[i+1].originalBeginDts){o=i;break}t[i].originalBeginDts<e?r=i+1:a=i-1}return o}},{key:"_searchNearestSegmentAfter",value:function(e){return this._searchNearestSegmentBefore(e)+1}},{key:"append",value:function(e){var t=this._list,n=e,i=this._lastAppendLocation,r=0;-1!==i&&i<t.length&&n.originalBeginDts>=t[i].lastSample.originalDts&&(i===t.length-1||i<t.length-1&&n.originalBeginDts<t[i+1].originalBeginDts)?r=i+1:t.length>0&&(r=this._searchNearestSegmentBefore(n.originalBeginDts)+1),this._lastAppendLocation=r,this._list.splice(r,0,n)}},{key:"getLastSegmentBefore",value:function(e){var t=this._searchNearestSegmentBefore(e);return t>=0?this._list[t]:null}},{key:"getLastSampleBefore",value:function(e){var t=this.getLastSegmentBefore(e);return null!=t?t.lastSample:null}},{key:"getLastSyncPointBefore",value:function(e){for(var t=this._searchNearestSegmentBefore(e),n=this._list[t].syncPoints;0===n.length&&t>0;)t--,n=this._list[t].syncPoints;return n.length>0?n[n.length-1]:null}},{key:"type",get:function(){return this._type}},{key:"length",get:function(){return this._list.length}}]),e}()},{}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=c(e("events")),a=c(e("../utils/logger.js")),o=c(e("../utils/browser.js")),s=c(e("./mse-events.js")),l=e("./media-segment-info.js"),u=e("../utils/exception.js");function c(e){return e&&e.__esModule?e:{default:e}}var f=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.TAG="MSEController",this._config=t,this._emitter=new r.default,this._config.isLive&&null==this._config.autoCleanupSourceBuffer&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new l.IDRSampleList}return i(e,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){if(this._mediaSource)throw new u.IllegalStateException("MediaSource has been attached to an HTMLMediaElement!");var t=this._mediaSource=new window.MediaSource;t.addEventListener("sourceopen",this.e.onSourceOpen),t.addEventListener("sourceended",this.e.onSourceEnded),t.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=e,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),e.src=this._mediaSourceObjectURL}},{key:"detachMediaElement",value:function(){if(this._mediaSource){var e=this._mediaSource;for(var t in this._sourceBuffers){var n=this._pendingSegments[t];n.splice(0,n.length),this._pendingSegments[t]=null,this._pendingRemoveRanges[t]=null,this._lastInitSegments[t]=null;var i=this._sourceBuffers[t];if(i){if("closed"!==e.readyState){try{e.removeSourceBuffer(i)}catch(e){a.default.e(this.TAG,e.message)}i.removeEventListener("error",this.e.onSourceBufferError),i.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[t]=null,this._sourceBuffers[t]=null}}if("open"===e.readyState)try{e.endOfStream()}catch(e){a.default.e(this.TAG,e.message)}e.removeEventListener("sourceopen",this.e.onSourceOpen),e.removeEventListener("sourceended",this.e.onSourceEnded),e.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}},{key:"appendInitSegment",value:function(e,t){if(!this._mediaSource||"open"!==this._mediaSource.readyState)return this._pendingSourceBufferInit.push(e),void this._pendingSegments[e.type].push(e);var n=e,i=""+n.container;n.codec&&n.codec.length>0&&(i+=";codecs="+n.codec);var r=!1;if(a.default.v(this.TAG,"Received Initialization Segment, mimeType: "+i),this._lastInitSegments[n.type]=n,i!==this._mimeTypes[n.type]){if(this._mimeTypes[n.type])a.default.v(this.TAG,"Notice: "+n.type+" mimeType changed, origin: "+this._mimeTypes[n.type]+", target: "+i);else{r=!0;try{var l=this._sourceBuffers[n.type]=this._mediaSource.addSourceBuffer(i);l.addEventListener("error",this.e.onSourceBufferError),l.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(e){return a.default.e(this.TAG,e.message),void this._emitter.emit(s.default.ERROR,{code:e.code,msg:e.message})}}this._mimeTypes[n.type]=i}t||this._pendingSegments[n.type].push(n),r||this._sourceBuffers[n.type]&&!this._sourceBuffers[n.type].updating&&this._doAppendSegments(),o.default.safari&&"audio/mpeg"===n.container&&n.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=n.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(e){var t=e;this._pendingSegments[t.type].push(t),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var n=this._sourceBuffers[t.type];!n||n.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()}},{key:"seek",value:function(e){for(var t in this._sourceBuffers)if(this._sourceBuffers[t]){var n=this._sourceBuffers[t];if("open"===this._mediaSource.readyState)try{n.abort()}catch(e){a.default.e(this.TAG,e.message)}this._idrList.clear();var i=this._pendingSegments[t];if(i.splice(0,i.length),"closed"!==this._mediaSource.readyState){for(var r=0;r<n.buffered.length;r++){var s=n.buffered.start(r),l=n.buffered.end(r);this._pendingRemoveRanges[t].push({start:s,end:l})}if(n.updating||this._doRemoveRanges(),o.default.safari){var u=this._lastInitSegments[t];u&&(this._pendingSegments[t].push(u),n.updating||this._doAppendSegments())}}}}},{key:"endOfStream",value:function(){var e=this._mediaSource,t=this._sourceBuffers;e&&"open"===e.readyState?t.video&&t.video.updating||t.audio&&t.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,e.endOfStream()):e&&"closed"===e.readyState&&this._hasPendingSegments()&&(this._hasPendingEos=!0)}},{key:"getNearestKeyframe",value:function(e){return this._idrList.getLastSyncPointBeforeDts(e)}},{key:"_needCleanupSourceBuffer",value:function(){if(!this._config.autoCleanupSourceBuffer)return!1;var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var n=this._sourceBuffers[t];if(n){var i=n.buffered;if(i.length>=1&&e-i.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var n=this._sourceBuffers[t];if(n){for(var i=n.buffered,r=!1,a=0;a<i.length;a++){var o=i.start(a),s=i.end(a);if(o<=e&&e<s+3){if(e-o>=this._config.autoCleanupMaxBackwardDuration){r=!0;var l=e-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[t].push({start:o,end:l})}}else s<e&&(r=!0,this._pendingRemoveRanges[t].push({start:o,end:s}))}r&&!n.updating&&this._doRemoveRanges()}}}},{key:"_updateMediaSourceDuration",value:function(){var e=this._sourceBuffers;if(0!==this._mediaElement.readyState&&"open"===this._mediaSource.readyState&&!(e.video&&e.video.updating||e.audio&&e.audio.updating)){var t=this._mediaSource.duration,n=this._pendingMediaDuration;n>0&&(isNaN(t)||n>t)&&(a.default.v(this.TAG,"Update MediaSource duration from "+t+" to "+n),this._mediaSource.duration=n),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}}},{key:"_doRemoveRanges",value:function(){for(var e in this._pendingRemoveRanges)if(this._sourceBuffers[e]&&!this._sourceBuffers[e].updating)for(var t=this._sourceBuffers[e],n=this._pendingRemoveRanges[e];n.length&&!t.updating;){var i=n.shift();t.remove(i.start,i.end)}}},{key:"_doAppendSegments",value:function(){var e=this._pendingSegments;for(var t in e)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating&&e[t].length>0){var n=e[t].shift();if(n.timestampOffset){var i=this._sourceBuffers[t].timestampOffset,r=n.timestampOffset/1e3;Math.abs(i-r)>.1&&(a.default.v(this.TAG,"Update MPEG audio timestampOffset from "+i+" to "+r),this._sourceBuffers[t].timestampOffset=r),delete n.timestampOffset}if(!n.data||0===n.data.byteLength)continue;try{this._sourceBuffers[t].appendBuffer(n.data),this._isBufferFull=!1,"video"===t&&n.hasOwnProperty("info")&&this._idrList.appendArray(n.info.syncPoints)}catch(e){this._pendingSegments[t].unshift(n),22===e.code?(this._isBufferFull||this._emitter.emit(s.default.BUFFER_FULL),this._isBufferFull=!0):(a.default.e(this.TAG,e.message),this._emitter.emit(s.default.ERROR,{code:e.code,msg:e.message}))}}}},{key:"_onSourceOpen",value:function(){if(a.default.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var e=this._pendingSourceBufferInit;e.length;){var t=e.shift();this.appendInitSegment(t,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(s.default.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){a.default.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){a.default.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&null!=this.e&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var e=this._pendingSegments;return e.video.length>0||e.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var e=this._pendingRemoveRanges;return e.video.length>0||e.audio.length>0}},{key:"_onSourceBufferUpdateEnd",value:function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(s.default.UPDATE_END)}},{key:"_onSourceBufferError",value:function(e){a.default.e(this.TAG,"SourceBuffer Error: "+e)}}]),e}();n.default=f},{"../utils/browser.js":39,"../utils/exception.js":40,"../utils/logger.js":41,"./media-segment-info.js":8,"./mse-events.js":10,events:2}],10:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"}},{}],11:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=f(e("events")),a=f(e("../utils/logger.js")),o=f(e("../utils/logging-control.js")),s=f(e("./transmuxing-controller.js")),l=f(e("./transmuxing-events.js")),u=f(e("./transmuxing-worker.js")),c=f(e("./media-info.js"));function f(e){return e&&e.__esModule?e:{default:e}}var d=function(){function t(n,i){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="Transmuxer",this._emitter=new r.default,i.enableWorker&&"undefined"!=typeof Worker)try{var c=e("webworkify");this._worker=c(u.default),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[n,i]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},o.default.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:o.default.getConfig()})}catch(e){a.default.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new s.default(n,i)}else this._controller=new s.default(n,i);if(this._controller){var f=this._controller;f.on(l.default.IO_ERROR,this._onIOError.bind(this)),f.on(l.default.DEMUX_ERROR,this._onDemuxError.bind(this)),f.on(l.default.INIT_SEGMENT,this._onInitSegment.bind(this)),f.on(l.default.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),f.on(l.default.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),f.on(l.default.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),f.on(l.default.MEDIA_INFO,this._onMediaInfo.bind(this)),f.on(l.default.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),f.on(l.default.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),f.on(l.default.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),f.on(l.default.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return i(t,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),o.default.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"hasWorker",value:function(){return null!=this._worker}},{key:"open",value:function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}},{key:"close",value:function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}},{key:"seek",value:function(e){this._worker?this._worker.postMessage({cmd:"seek",param:e}):this._controller.seek(e)}},{key:"pause",value:function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}},{key:"resume",value:function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}},{key:"_onInitSegment",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(l.default.INIT_SEGMENT,e,t)}))}},{key:"_onMediaSegment",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(l.default.MEDIA_SEGMENT,e,t)}))}},{key:"_onLoadingComplete",value:function(){var e=this;Promise.resolve().then((function(){e._emitter.emit(l.default.LOADING_COMPLETE)}))}},{key:"_onRecoveredEarlyEof",value:function(){var e=this;Promise.resolve().then((function(){e._emitter.emit(l.default.RECOVERED_EARLY_EOF)}))}},{key:"_onMediaInfo",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(l.default.MEDIA_INFO,e)}))}},{key:"_onMetaDataArrived",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(l.default.METADATA_ARRIVED,e)}))}},{key:"_onScriptDataArrived",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(l.default.SCRIPTDATA_ARRIVED,e)}))}},{key:"_onStatisticsInfo",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(l.default.STATISTICS_INFO,e)}))}},{key:"_onIOError",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(l.default.IO_ERROR,e,t)}))}},{key:"_onDemuxError",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(l.default.DEMUX_ERROR,e,t)}))}},{key:"_onRecommendSeekpoint",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(l.default.RECOMMEND_SEEKPOINT,e)}))}},{key:"_onLoggingConfigChanged",value:function(e){this._worker&&this._worker.postMessage({cmd:"logging_config",param:e})}},{key:"_onWorkerMessage",value:function(e){var t=e.data,n=t.data;if("destroyed"===t.msg||this._workerDestroying)return this._workerDestroying=!1,this._worker.terminate(),void(this._worker=null);switch(t.msg){case l.default.INIT_SEGMENT:case l.default.MEDIA_SEGMENT:this._emitter.emit(t.msg,n.type,n.data);break;case l.default.LOADING_COMPLETE:case l.default.RECOVERED_EARLY_EOF:this._emitter.emit(t.msg);break;case l.default.MEDIA_INFO:Object.setPrototypeOf(n,c.default.prototype),this._emitter.emit(t.msg,n);break;case l.default.METADATA_ARRIVED:case l.default.SCRIPTDATA_ARRIVED:case l.default.STATISTICS_INFO:this._emitter.emit(t.msg,n);break;case l.default.IO_ERROR:case l.default.DEMUX_ERROR:this._emitter.emit(t.msg,n.type,n.info);break;case l.default.RECOMMEND_SEEKPOINT:this._emitter.emit(t.msg,n);break;case"logcat_callback":a.default.emitter.emit("log",n.type,n.logcat)}}}]),t}();n.default=d},{"../utils/logger.js":41,"../utils/logging-control.js":42,"./media-info.js":7,"./transmuxing-controller.js":12,"./transmuxing-events.js":13,"./transmuxing-worker.js":14,events:2,webworkify:4}],12:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=h(e("events")),a=h(e("../utils/logger.js")),o=h(e("../utils/browser.js")),s=h(e("./media-info.js")),l=h(e("../demux/flv-demuxer.js")),u=h(e("../remux/mp4-remuxer.js")),c=h(e("../demux/demux-errors.js")),f=h(e("../io/io-controller.js")),d=h(e("./transmuxing-events.js"));function h(e){return e&&e.__esModule?e:{default:e}}e("../io/loader.js");var p=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.TAG="TransmuxingController",this._emitter=new r.default,this._config=n,t.segments||(t.segments=[{duration:t.duration,filesize:t.filesize,url:t.url}]),"boolean"!=typeof t.cors&&(t.cors=!0),"boolean"!=typeof t.withCredentials&&(t.withCredentials=!1),this._mediaDataSource=t,this._currentSegmentIndex=0;var i=0;this._mediaDataSource.segments.forEach((function(e){e.timestampBase=i,i+=e.duration,e.cors=t.cors,e.withCredentials=t.withCredentials,n.referrerPolicy&&(e.referrerPolicy=n.referrerPolicy)})),isNaN(i)||this._mediaDataSource.duration===i||(this._mediaDataSource.duration=i),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return i(e,[{key:"destroy",value:function(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"start",value:function(){this._loadSegment(0),this._enableStatisticsReporter()}},{key:"_loadSegment",value:function(e,t){this._currentSegmentIndex=e;var n=this._mediaDataSource.segments[e],i=this._ioctl=new f.default(n,this._config,e);i.onError=this._onIOException.bind(this),i.onSeeked=this._onIOSeeked.bind(this),i.onComplete=this._onIOComplete.bind(this),i.onRedirect=this._onIORedirect.bind(this),i.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),t?this._demuxer.bindDataSource(this._ioctl):i.onDataArrival=this._onInitChunkArrival.bind(this),i.open(t)}},{key:"stop",value:function(){this._internalAbort(),this._disableStatisticsReporter()}},{key:"_internalAbort",value:function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}},{key:"pause",value:function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}},{key:"resume",value:function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}},{key:"seek",value:function(e){if(null!=this._mediaInfo&&this._mediaInfo.isSeekable()){var t=this._searchSegmentIndexContains(e);if(t===this._currentSegmentIndex){var n=this._mediaInfo.segments[t];if(null==n)this._pendingSeekTime=e;else{var i=n.getNearestKeyframe(e);this._remuxer.seek(i.milliseconds),this._ioctl.seek(i.fileposition),this._pendingResolveSeekPoint=i.milliseconds}}else{var r=this._mediaInfo.segments[t];if(null==r)this._pendingSeekTime=e,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(t);else{var a=r.getNearestKeyframe(e);this._internalAbort(),this._remuxer.seek(e),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[t].timestampBase,this._loadSegment(t,a.fileposition),this._pendingResolveSeekPoint=a.milliseconds,this._reportSegmentMediaInfo(t)}}this._enableStatisticsReporter()}}},{key:"_searchSegmentIndexContains",value:function(e){for(var t=this._mediaDataSource.segments,n=t.length-1,i=0;i<t.length;i++)if(e<t[i].timestampBase){n=i-1;break}return n}},{key:"_onInitChunkArrival",value:function(e,t){var n=this,i=null,r=0;if(t>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,r=this._demuxer.parseChunks(e,t);else if((i=l.default.probe(e)).match){this._demuxer=new l.default(i,this._config),this._remuxer||(this._remuxer=new u.default(this._config));var o=this._mediaDataSource;null==o.duration||isNaN(o.duration)||(this._demuxer.overridedDuration=o.duration),"boolean"==typeof o.hasAudio&&(this._demuxer.overridedHasAudio=o.hasAudio),"boolean"==typeof o.hasVideo&&(this._demuxer.overridedHasVideo=o.hasVideo),this._demuxer.timestampBase=o.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),r=this._demuxer.parseChunks(e,t)}else i=null,a.default.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then((function(){n._internalAbort()})),this._emitter.emit(d.default.DEMUX_ERROR,c.default.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),r=0;return r}},{key:"_onMediaInfo",value:function(e){var t=this;null==this._mediaInfo&&(this._mediaInfo=Object.assign({},e),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,s.default.prototype));var n=Object.assign({},e);Object.setPrototypeOf(n,s.default.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=n,this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pendingSeekTime&&Promise.resolve().then((function(){var e=t._pendingSeekTime;t._pendingSeekTime=null,t.seek(e)}))}},{key:"_onMetaDataArrived",value:function(e){this._emitter.emit(d.default.METADATA_ARRIVED,e)}},{key:"_onScriptDataArrived",value:function(e){this._emitter.emit(d.default.SCRIPTDATA_ARRIVED,e)}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(e){var t=e+1;t<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(t)):(this._remuxer.flushStashedSamples(),this._emitter.emit(d.default.LOADING_COMPLETE),this._disableStatisticsReporter())}},{key:"_onIORedirect",value:function(e){var t=this._ioctl.extraData;this._mediaDataSource.segments[t].redirectedURL=e}},{key:"_onIORecoveredEarlyEof",value:function(){this._emitter.emit(d.default.RECOVERED_EARLY_EOF)}},{key:"_onIOException",value:function(e,t){a.default.e(this.TAG,"IOException: type = "+e+", code = "+t.code+", msg = "+t.msg),this._emitter.emit(d.default.IO_ERROR,e,t),this._disableStatisticsReporter()}},{key:"_onDemuxException",value:function(e,t){a.default.e(this.TAG,"DemuxException: type = "+e+", info = "+t),this._emitter.emit(d.default.DEMUX_ERROR,e,t)}},{key:"_onRemuxerInitSegmentArrival",value:function(e,t){this._emitter.emit(d.default.INIT_SEGMENT,e,t)}},{key:"_onRemuxerMediaSegmentArrival",value:function(e,t){if(null==this._pendingSeekTime&&(this._emitter.emit(d.default.MEDIA_SEGMENT,e,t),null!=this._pendingResolveSeekPoint&&"video"===e)){var n=t.info.syncPoints,i=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,o.default.safari&&n.length>0&&n[0].originalDts===i&&(i=n[0].pts),this._emitter.emit(d.default.RECOMMEND_SEEKPOINT,i)}}},{key:"_enableStatisticsReporter",value:function(){null==this._statisticsReporter&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_reportSegmentMediaInfo",value:function(e){var t=this._mediaInfo.segments[e],n=Object.assign({},t);n.duration=this._mediaInfo.duration,n.segmentCount=this._mediaInfo.segmentCount,delete n.segments,delete n.keyframesIndex,this._emitter.emit(d.default.MEDIA_INFO,n)}},{key:"_reportStatisticsInfo",value:function(){var e={};e.url=this._ioctl.currentURL,e.hasRedirect=this._ioctl.hasRedirect,e.hasRedirect&&(e.redirectedURL=this._ioctl.currentRedirectedURL),e.speed=this._ioctl.currentSpeed,e.loaderType=this._ioctl.loaderType,e.currentSegmentIndex=this._currentSegmentIndex,e.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(d.default.STATISTICS_INFO,e)}}]),e}();n.default=p},{"../demux/demux-errors.js":16,"../demux/flv-demuxer.js":18,"../io/io-controller.js":23,"../io/loader.js":24,"../remux/mp4-remuxer.js":38,"../utils/browser.js":39,"../utils/logger.js":41,"./media-info.js":7,"./transmuxing-events.js":13,events:2}],13:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"}},{}],14:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),s(e("../utils/logger.js"));var i=s(e("../utils/logging-control.js")),r=s(e("../utils/polyfill.js")),a=s(e("./transmuxing-controller.js")),o=s(e("./transmuxing-events.js"));function s(e){return e&&e.__esModule?e:{default:e}}n.default=function(e){var t=null,n=function(t,n){e.postMessage({msg:"logcat_callback",data:{type:t,logcat:n}})}.bind(this);function s(t,n){var i={msg:o.default.INIT_SEGMENT,data:{type:t,data:n}};e.postMessage(i,[n.data])}function l(t,n){var i={msg:o.default.MEDIA_SEGMENT,data:{type:t,data:n}};e.postMessage(i,[n.data])}function u(){var t={msg:o.default.LOADING_COMPLETE};e.postMessage(t)}function c(){var t={msg:o.default.RECOVERED_EARLY_EOF};e.postMessage(t)}function f(t){var n={msg:o.default.MEDIA_INFO,data:t};e.postMessage(n)}function d(t){var n={msg:o.default.METADATA_ARRIVED,data:t};e.postMessage(n)}function h(t){var n={msg:o.default.SCRIPTDATA_ARRIVED,data:t};e.postMessage(n)}function p(t){var n={msg:o.default.STATISTICS_INFO,data:t};e.postMessage(n)}function v(t,n){e.postMessage({msg:o.default.IO_ERROR,data:{type:t,info:n}})}function g(t,n){e.postMessage({msg:o.default.DEMUX_ERROR,data:{type:t,info:n}})}function m(t){e.postMessage({msg:o.default.RECOMMEND_SEEKPOINT,data:t})}r.default.install(),e.addEventListener("message",(function(r){switch(r.data.cmd){case"init":(t=new a.default(r.data.param[0],r.data.param[1])).on(o.default.IO_ERROR,v.bind(this)),t.on(o.default.DEMUX_ERROR,g.bind(this)),t.on(o.default.INIT_SEGMENT,s.bind(this)),t.on(o.default.MEDIA_SEGMENT,l.bind(this)),t.on(o.default.LOADING_COMPLETE,u.bind(this)),t.on(o.default.RECOVERED_EARLY_EOF,c.bind(this)),t.on(o.default.MEDIA_INFO,f.bind(this)),t.on(o.default.METADATA_ARRIVED,d.bind(this)),t.on(o.default.SCRIPTDATA_ARRIVED,h.bind(this)),t.on(o.default.STATISTICS_INFO,p.bind(this)),t.on(o.default.RECOMMEND_SEEKPOINT,m.bind(this));break;case"destroy":t&&(t.destroy(),t=null),e.postMessage({msg:"destroyed"});break;case"start":t.start();break;case"stop":t.stop();break;case"seek":t.seek(r.data.param);break;case"pause":t.pause();break;case"resume":t.resume();break;case"logging_config":var y=r.data.param;i.default.applyConfig(y),!0===y.enableCallback?i.default.addLogListener(n):i.default.removeLogListener(n)}}))}},{"../utils/logger.js":41,"../utils/logging-control.js":42,"../utils/polyfill.js":43,"./transmuxing-controller.js":12,"./transmuxing-events.js":13}],15:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=s(e("../utils/logger.js")),a=s(e("../utils/utf8-conv.js")),o=e("../utils/exception.js");function s(e){return e&&e.__esModule?e:{default:e}}var l,u=(l=new ArrayBuffer(2),new DataView(l).setInt16(0,256,!0),256===new Int16Array(l)[0]),c=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return i(e,null,[{key:"parseScriptData",value:function(t,n,i){var a={};try{var o=e.parseValue(t,n,i),s=e.parseValue(t,n+o.size,i-o.size);a[o.data]=s.data}catch(e){r.default.e("AMF",e.toString())}return a}},{key:"parseObject",value:function(t,n,i){if(i<3)throw new o.IllegalStateException("Data not enough when parse ScriptDataObject");var r=e.parseString(t,n,i),a=e.parseValue(t,n+r.size,i-r.size),s=a.objectEnd;return{data:{name:r.data,value:a.data},size:r.size+a.size,objectEnd:s}}},{key:"parseVariable",value:function(t,n,i){return e.parseObject(t,n,i)}},{key:"parseString",value:function(e,t,n){if(n<2)throw new o.IllegalStateException("Data not enough when parse String");var i=new DataView(e,t,n).getUint16(0,!u);return{data:i>0?(0,a.default)(new Uint8Array(e,t+2,i)):"",size:2+i}}},{key:"parseLongString",value:function(e,t,n){if(n<4)throw new o.IllegalStateException("Data not enough when parse LongString");var i=new DataView(e,t,n).getUint32(0,!u);return{data:i>0?(0,a.default)(new Uint8Array(e,t+4,i)):"",size:4+i}}},{key:"parseDate",value:function(e,t,n){if(n<10)throw new o.IllegalStateException("Data size invalid when parse Date");var i=new DataView(e,t,n),r=i.getFloat64(0,!u),a=i.getInt16(8,!u);return{data:new Date(r+=60*a*1e3),size:10}}},{key:"parseValue",value:function(t,n,i){if(i<1)throw new o.IllegalStateException("Data not enough when parse Value");var a=new DataView(t,n,i),s=1,l=a.getUint8(0),c=void 0,f=!1;try{switch(l){case 0:c=a.getFloat64(1,!u),s+=8;break;case 1:c=!!a.getUint8(1),s+=1;break;case 2:var d=e.parseString(t,n+1,i-1);c=d.data,s+=d.size;break;case 3:c={};var h=0;for(9==(16777215&a.getUint32(i-4,!u))&&(h=3);s<i-4;){var p=e.parseObject(t,n+s,i-s-h);if(p.objectEnd)break;c[p.data.name]=p.data.value,s+=p.size}s<=i-3&&9==(16777215&a.getUint32(s-1,!u))&&(s+=3);break;case 8:c={},s+=4;var v=0;for(9==(16777215&a.getUint32(i-4,!u))&&(v=3);s<i-8;){var g=e.parseVariable(t,n+s,i-s-v);if(g.objectEnd)break;c[g.data.name]=g.data.value,s+=g.size}s<=i-3&&9==(16777215&a.getUint32(s-1,!u))&&(s+=3);break;case 9:c=void 0,s=1,f=!0;break;case 10:c=[];var m=a.getUint32(1,!u);s+=4;for(var y=0;y<m;y++){var _=e.parseValue(t,n+s,i-s);c.push(_.data),s+=_.size}break;case 11:var b=e.parseDate(t,n+1,i-1);c=b.data,s+=b.size;break;case 12:var S=e.parseString(t,n+1,i-1);c=S.data,s+=S.size;break;default:s=i,r.default.w("AMF","Unsupported AMF value type "+l)}}catch(e){r.default.e("AMF",e.toString())}return{data:c,size:s,objectEnd:f}}}]),e}();n.default=c},{"../utils/exception.js":40,"../utils/logger.js":41,"../utils/utf8-conv.js":44}],16:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"}},{}],17:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=e("../utils/exception.js"),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.TAG="ExpGolomb",this._buffer=t,this._buffer_index=0,this._total_bytes=t.byteLength,this._total_bits=8*t.byteLength,this._current_word=0,this._current_word_bits_left=0}return i(e,[{key:"destroy",value:function(){this._buffer=null}},{key:"_fillCurrentWord",value:function(){var e=this._total_bytes-this._buffer_index;if(e<=0)throw new r.IllegalStateException("ExpGolomb: _fillCurrentWord() but no bytes available");var t=Math.min(4,e),n=new Uint8Array(4);n.set(this._buffer.subarray(this._buffer_index,this._buffer_index+t)),this._current_word=new DataView(n.buffer).getUint32(0,!1),this._buffer_index+=t,this._current_word_bits_left=8*t}},{key:"readBits",value:function(e){if(e>32)throw new r.InvalidArgumentException("ExpGolomb: readBits() bits exceeded max 32bits!");if(e<=this._current_word_bits_left){var t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}var n=this._current_word_bits_left?this._current_word:0;n>>>=32-this._current_word_bits_left;var i=e-this._current_word_bits_left;this._fillCurrentWord();var a=Math.min(i,this._current_word_bits_left),o=this._current_word>>>32-a;return this._current_word<<=a,this._current_word_bits_left-=a,n=n<<a|o}},{key:"readBool",value:function(){return 1===this.readBits(1)}},{key:"readByte",value:function(){return this.readBits(8)}},{key:"_skipLeadingZero",value:function(){var e=void 0;for(e=0;e<this._current_word_bits_left;e++)if(0!=(this._current_word&2147483648>>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}},{key:"readUEG",value:function(){var e=this._skipLeadingZero();return this.readBits(e+1)-1}},{key:"readSEG",value:function(){var e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}]),e}();n.default=a},{"../utils/exception.js":40}],18:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=f(e("../utils/logger.js")),o=f(e("./amf-parser.js")),s=f(e("./sps-parser.js")),l=f(e("./demux-errors.js")),u=f(e("../core/media-info.js")),c=e("../utils/exception.js");function f(e){return e&&e.__esModule?e:{default:e}}var d=function(){function e(t,n){var i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.TAG="FLVDemuxer",this._config=n,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=t.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=t.hasAudioTrack,this._hasVideo=t.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new u.default,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=(i=new ArrayBuffer(2),new DataView(i).setInt16(0,256,!0),256===new Int16Array(i)[0])}return r(e,[{key:"destroy",value:function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}},{key:"bindDataSource",value:function(e){return e.onDataArrival=this.parseChunks.bind(this),this}},{key:"resetMediaInfo",value:function(){this._mediaInfo=new u.default}},{key:"_isInitialMetadataDispatched",value:function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched}},{key:"parseChunks",value:function(t,n){if(!(this._onError&&this._onMediaInfo&&this._onTrackMetadata&&this._onDataAvailable))throw new c.IllegalStateException("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var i=0,r=this._littleEndian;if(0===n){if(!(t.byteLength>13))return 0;i=e.probe(t).dataOffset}for(this._firstParse&&(this._firstParse=!1,n+i!==this._dataOffset&&a.default.w(this.TAG,"First time parsing but chunk byteStart invalid!"),0!==new DataView(t,i).getUint32(0,!r)&&a.default.w(this.TAG,"PrevTagSize0 !== 0 !!!"),i+=4);i<t.byteLength;){this._dispatch=!0;var o=new DataView(t,i);if(i+11+4>t.byteLength)break;var s=o.getUint8(0),l=16777215&o.getUint32(0,!r);if(i+11+l+4>t.byteLength)break;if(8===s||9===s||18===s){var u=o.getUint8(4),f=o.getUint8(5),d=o.getUint8(6)|f<<8|u<<16|o.getUint8(7)<<24;0!=(16777215&o.getUint32(7,!r))&&a.default.w(this.TAG,"Meet tag which has StreamID != 0!");var h=i+11;switch(s){case 8:this._parseAudioData(t,h,l,d);break;case 9:this._parseVideoData(t,h,l,d,n+i);break;case 18:this._parseScriptData(t,h,l)}var p=o.getUint32(11+l,!r);p!==11+l&&a.default.w(this.TAG,"Invalid PrevTagSize "+p),i+=11+l+4}else a.default.w(this.TAG,"Unsupported tag type "+s+", skipped"),i+=11+l+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),i}},{key:"_parseScriptData",value:function(e,t,n){var r=o.default.parseScriptData(e,t,n);if(r.hasOwnProperty("onMetaData")){if(null==r.onMetaData||"object"!==i(r.onMetaData))return void a.default.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&a.default.w(this.TAG,"Found another onMetaData tag!"),this._metadata=r;var s=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},s)),"boolean"==typeof s.hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=s.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"==typeof s.hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=s.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"==typeof s.audiodatarate&&(this._mediaInfo.audioDataRate=s.audiodatarate),"number"==typeof s.videodatarate&&(this._mediaInfo.videoDataRate=s.videodatarate),"number"==typeof s.width&&(this._mediaInfo.width=s.width),"number"==typeof s.height&&(this._mediaInfo.height=s.height),"number"==typeof s.duration){if(!this._durationOverrided){var l=Math.floor(s.duration*this._timescale);this._duration=l,this._mediaInfo.duration=l}}else this._mediaInfo.duration=0;if("number"==typeof s.framerate){var u=Math.floor(1e3*s.framerate);if(u>0){var c=u/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=c,this._referenceFrameRate.fps_num=u,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=c}}if("object"===i(s.keyframes)){this._mediaInfo.hasKeyframesIndex=!0;var f=s.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(f),s.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=s,a.default.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(r).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},r))}},{key:"_parseKeyframesIndex",value:function(e){for(var t=[],n=[],i=1;i<e.times.length;i++){var r=this._timestampBase+Math.floor(1e3*e.times[i]);t.push(r),n.push(e.filepositions[i])}return{times:t,filepositions:n}}},{key:"_parseAudioData",value:function(e,t,n,i){if(n<=1)a.default.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");else if(!0!==this._hasAudioFlagOverrided||!1!==this._hasAudio){this._littleEndian;var r=new DataView(e,t,n).getUint8(0),o=r>>>4;if(2===o||10===o){var s=0,u=(12&r)>>>2;if(u>=0&&u<=4){s=this._flvSoundRateTable[u];var c=1&r,f=this._audioMetadata,d=this._audioTrack;if(f||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(f=this._audioMetadata={}).type="audio",f.id=d.id,f.timescale=this._timescale,f.duration=this._duration,f.audioSampleRate=s,f.channelCount=0===c?1:2),10===o){var h=this._parseAACAudioData(e,t+1,n-1);if(null==h)return;if(0===h.packetType){f.config&&a.default.w(this.TAG,"Found another AudioSpecificConfig!");var p=h.data;f.audioSampleRate=p.samplingRate,f.channelCount=p.channelCount,f.codec=p.codec,f.originalCodec=p.originalCodec,f.config=p.config,f.refSampleDuration=1024/f.audioSampleRate*f.timescale,a.default.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",f);var v=this._mediaInfo;v.audioCodec=f.originalCodec,v.audioSampleRate=f.audioSampleRate,v.audioChannelCount=f.channelCount,v.hasVideo?null!=v.videoCodec&&(v.mimeType='video/x-flv; codecs="'+v.videoCodec+","+v.audioCodec+'"'):v.mimeType='video/x-flv; codecs="'+v.audioCodec+'"',v.isComplete()&&this._onMediaInfo(v)}else if(1===h.packetType){var g=this._timestampBase+i,m={unit:h.data,length:h.data.byteLength,dts:g,pts:g};d.samples.push(m),d.length+=h.data.length}else a.default.e(this.TAG,"Flv: Unsupported AAC data type "+h.packetType)}else if(2===o){if(!f.codec){var y=this._parseMP3AudioData(e,t+1,n-1,!0);if(null==y)return;f.audioSampleRate=y.samplingRate,f.channelCount=y.channelCount,f.codec=y.codec,f.originalCodec=y.originalCodec,f.refSampleDuration=1152/f.audioSampleRate*f.timescale,a.default.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",f);var _=this._mediaInfo;_.audioCodec=f.codec,_.audioSampleRate=f.audioSampleRate,_.audioChannelCount=f.channelCount,_.audioDataRate=y.bitRate,_.hasVideo?null!=_.videoCodec&&(_.mimeType='video/x-flv; codecs="'+_.videoCodec+","+_.audioCodec+'"'):_.mimeType='video/x-flv; codecs="'+_.audioCodec+'"',_.isComplete()&&this._onMediaInfo(_)}var b=this._parseMP3AudioData(e,t+1,n-1,!1);if(null==b)return;var S=this._timestampBase+i,w={unit:b,length:b.byteLength,dts:S,pts:S};d.samples.push(w),d.length+=b.length}}else this._onError(l.default.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+u)}else this._onError(l.default.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+o)}}},{key:"_parseAACAudioData",value:function(e,t,n){if(!(n<=1)){var i={},r=new Uint8Array(e,t,n);return i.packetType=r[0],0===r[0]?i.data=this._parseAACAudioSpecificConfig(e,t+1,n-1):i.data=r.subarray(1),i}a.default.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")}},{key:"_parseAACAudioSpecificConfig",value:function(e,t,n){var i,r,a=new Uint8Array(e,t,n),o=null,s=0,u=null;if(s=i=a[0]>>>3,(r=(7&a[0])<<1|a[1]>>>7)<0||r>=this._mpegSamplingRates.length)this._onError(l.default.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var c=this._mpegSamplingRates[r],f=(120&a[1])>>>3;if(!(f<0||f>=8)){5===s&&(u=(7&a[1])<<1|a[2]>>>7,a[2]);var d=self.navigator.userAgent.toLowerCase();return-1!==d.indexOf("firefox")?r>=6?(s=5,o=new Array(4),u=r-3):(s=2,o=new Array(2),u=r):-1!==d.indexOf("android")?(s=2,o=new Array(2),u=r):(s=5,u=r,o=new Array(4),r>=6?u=r-3:1===f&&(s=2,o=new Array(2),u=r)),o[0]=s<<3,o[0]|=(15&r)>>>1,o[1]=(15&r)<<7,o[1]|=(15&f)<<3,5===s&&(o[1]|=(15&u)>>>1,o[2]=(1&u)<<7,o[2]|=8,o[3]=0),{config:o,samplingRate:c,channelCount:f,codec:"mp4a.40."+s,originalCodec:"mp4a.40."+i}}this._onError(l.default.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}}},{key:"_parseMP3AudioData",value:function(e,t,n,i){if(!(n<4)){this._littleEndian;var r=new Uint8Array(e,t,n),o=null;if(i){if(255!==r[0])return;var s=r[1]>>>3&3,l=(6&r[1])>>1,u=(240&r[2])>>>4,c=(12&r[2])>>>2,f=3!=(r[3]>>>6&3)?2:1,d=0,h=0;switch(s){case 0:d=this._mpegAudioV25SampleRateTable[c];break;case 2:d=this._mpegAudioV20SampleRateTable[c];break;case 3:d=this._mpegAudioV10SampleRateTable[c]}switch(l){case 1:u<this._mpegAudioL3BitRateTable.length&&(h=this._mpegAudioL3BitRateTable[u]);break;case 2:u<this._mpegAudioL2BitRateTable.length&&(h=this._mpegAudioL2BitRateTable[u]);break;case 3:u<this._mpegAudioL1BitRateTable.length&&(h=this._mpegAudioL1BitRateTable[u])}o={bitRate:h,samplingRate:d,channelCount:f,codec:"mp3",originalCodec:"mp3"}}else o=r;return o}a.default.w(this.TAG,"Flv: Invalid MP3 packet, header missing!")}},{key:"_parseVideoData",value:function(e,t,n,i,r){if(n<=1)a.default.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");else if(!0!==this._hasVideoFlagOverrided||!1!==this._hasVideo){var o=new Uint8Array(e,t,n)[0],s=(240&o)>>>4,u=15&o;7===u?this._parseAVCVideoPacket(e,t+1,n-1,i,r,s):this._onError(l.default.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+u)}}},{key:"_parseAVCVideoPacket",value:function(e,t,n,i,r,o){if(n<4)a.default.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");else{var s=this._littleEndian,u=new DataView(e,t,n),c=u.getUint8(0),f=(16777215&u.getUint32(0,!s))<<8>>8;if(0===c)this._parseAVCDecoderConfigurationRecord(e,t+4,n-4);else if(1===c)this._parseAVCVideoData(e,t+4,n-4,i,r,o,f);else if(2!==c)return void this._onError(l.default.FORMAT_ERROR,"Flv: Invalid video packet type "+c)}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(e,t,n){if(n<7)a.default.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var i=this._videoMetadata,r=this._videoTrack,o=this._littleEndian,u=new DataView(e,t,n);i?void 0!==i.avcc&&a.default.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(i=this._videoMetadata={}).type="video",i.id=r.id,i.timescale=this._timescale,i.duration=this._duration);var c=u.getUint8(0),f=u.getUint8(1);if(u.getUint8(2),u.getUint8(3),1===c&&0!==f)if(this._naluLengthSize=1+(3&u.getUint8(4)),3===this._naluLengthSize||4===this._naluLengthSize){var d=31&u.getUint8(5);if(0!==d){d>1&&a.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = "+d);for(var h=6,p=0;p<d;p++){var v=u.getUint16(h,!o);if(h+=2,0!==v){var g=new Uint8Array(e,t+h,v);h+=v;var m=s.default.parseSPS(g);if(0===p){i.codecWidth=m.codec_size.width,i.codecHeight=m.codec_size.height,i.presentWidth=m.present_size.width,i.presentHeight=m.present_size.height,i.profile=m.profile_string,i.level=m.level_string,i.bitDepth=m.bit_depth,i.chromaFormat=m.chroma_format,i.sarRatio=m.sar_ratio,i.frameRate=m.frame_rate,!1!==m.frame_rate.fixed&&0!==m.frame_rate.fps_num&&0!==m.frame_rate.fps_den||(i.frameRate=this._referenceFrameRate);var y=i.frameRate.fps_den,_=i.frameRate.fps_num;i.refSampleDuration=i.timescale*(y/_);for(var b=g.subarray(1,4),S="avc1.",w=0;w<3;w++){var E=b[w].toString(16);E.length<2&&(E="0"+E),S+=E}i.codec=S;var T=this._mediaInfo;T.width=i.codecWidth,T.height=i.codecHeight,T.fps=i.frameRate.fps,T.profile=i.profile,T.level=i.level,T.refFrames=m.ref_frames,T.chromaFormat=m.chroma_format_string,T.sarNum=i.sarRatio.width,T.sarDen=i.sarRatio.height,T.videoCodec=S,T.hasAudio?null!=T.audioCodec&&(T.mimeType='video/x-flv; codecs="'+T.videoCodec+","+T.audioCodec+'"'):T.mimeType='video/x-flv; codecs="'+T.videoCodec+'"',T.isComplete()&&this._onMediaInfo(T)}}}var k=u.getUint8(h);if(0!==k){k>1&&a.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = "+k),h++;for(var x=0;x<k;x++){var L=u.getUint16(h,!o);h+=2,0!==L&&(h+=L)}i.avcc=new Uint8Array(n),i.avcc.set(new Uint8Array(e,t,n),0),a.default.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",i)}else this._onError(l.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS")}else this._onError(l.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS")}else this._onError(l.default.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1));else this._onError(l.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord")}}},{key:"_parseAVCVideoData",value:function(e,t,n,i,r,o,s){for(var l=this._littleEndian,u=new DataView(e,t,n),c=[],f=0,d=0,h=this._naluLengthSize,p=this._timestampBase+i,v=1===o;d<n;){if(d+4>=n){a.default.w(this.TAG,"Malformed Nalu near timestamp "+p+", offset = "+d+", dataSize = "+n);break}var g=u.getUint32(d,!l);if(3===h&&(g>>>=8),g>n-h)return void a.default.w(this.TAG,"Malformed Nalus near timestamp "+p+", NaluSize > DataSize!");var m=31&u.getUint8(d+h);5===m&&(v=!0);var y=new Uint8Array(e,t+d,h+g),_={type:m,data:y};c.push(_),f+=y.byteLength,d+=h+g}if(c.length){var b=this._videoTrack,S={units:c,length:f,isKeyframe:v,dts:p,cts:s,pts:p+s};v&&(S.fileposition=r),b.samples.push(S),b.length+=f}}},{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(e){this._onTrackMetadata=e}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(e){this._onMediaInfo=e}},{key:"onMetaDataArrived",get:function(){return this._onMetaDataArrived},set:function(e){this._onMetaDataArrived=e}},{key:"onScriptDataArrived",get:function(){return this._onScriptDataArrived},set:function(e){this._onScriptDataArrived=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(e){this._onDataAvailable=e}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(e){this._timestampBase=e}},{key:"overridedDuration",get:function(){return this._duration},set:function(e){this._durationOverrided=!0,this._duration=e,this._mediaInfo.duration=e}},{key:"overridedHasAudio",set:function(e){this._hasAudioFlagOverrided=!0,this._hasAudio=e,this._mediaInfo.hasAudio=e}},{key:"overridedHasVideo",set:function(e){this._hasVideoFlagOverrided=!0,this._hasVideo=e,this._mediaInfo.hasVideo=e}}],[{key:"probe",value:function(e){var t=new Uint8Array(e),n={match:!1};if(70!==t[0]||76!==t[1]||86!==t[2]||1!==t[3])return n;var i,r,a=(4&t[4])>>>2!=0,o=0!=(1&t[4]),s=(i=t)[r=5]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3];return s<9?n:{match:!0,consumed:s,dataOffset:s,hasAudioTrack:a,hasVideoTrack:o}}}]),e}();n.default=d},{"../core/media-info.js":7,"../utils/exception.js":40,"../utils/logger.js":41,"./amf-parser.js":15,"./demux-errors.js":16,"./sps-parser.js":19}],19:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=e("./exp-golomb.js"),o=(i=a)&&i.__esModule?i:{default:i},s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"_ebsp2rbsp",value:function(e){for(var t=e,n=t.byteLength,i=new Uint8Array(n),r=0,a=0;a<n;a++)a>=2&&3===t[a]&&0===t[a-1]&&0===t[a-2]||(i[r]=t[a],r++);return new Uint8Array(i.buffer,0,r)}},{key:"parseSPS",value:function(t){var n=e._ebsp2rbsp(t),i=new o.default(n);i.readByte();var r=i.readByte();i.readByte();var a=i.readByte();i.readUEG();var s=e.getProfileString(r),l=e.getLevelString(a),u=1,c=420,f=8;if((100===r||110===r||122===r||244===r||44===r||83===r||86===r||118===r||128===r||138===r||144===r)&&(3===(u=i.readUEG())&&i.readBits(1),u<=3&&(c=[0,420,422,444][u]),f=i.readUEG()+8,i.readUEG(),i.readBits(1),i.readBool()))for(var d=3!==u?8:12,h=0;h<d;h++)i.readBool()&&(h<6?e._skipScalingList(i,16):e._skipScalingList(i,64));i.readUEG();var p=i.readUEG();if(0===p)i.readUEG();else if(1===p){i.readBits(1),i.readSEG(),i.readSEG();for(var v=i.readUEG(),g=0;g<v;g++)i.readSEG()}var m=i.readUEG();i.readBits(1);var y=i.readUEG(),_=i.readUEG(),b=i.readBits(1);0===b&&i.readBits(1),i.readBits(1);var S=0,w=0,E=0,T=0;i.readBool()&&(S=i.readUEG(),w=i.readUEG(),E=i.readUEG(),T=i.readUEG());var k=1,x=1,L=0,A=!0,C=0,R=0;if(i.readBool()){if(i.readBool()){var D=i.readByte();D>0&&D<16?(k=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][D-1],x=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][D-1]):255===D&&(k=i.readByte()<<8|i.readByte(),x=i.readByte()<<8|i.readByte())}if(i.readBool()&&i.readBool(),i.readBool()&&(i.readBits(4),i.readBool()&&i.readBits(24)),i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool()){var O=i.readBits(32),I=i.readBits(32);A=i.readBool(),L=(C=I)/(R=2*O)}}var P=1;1===k&&1===x||(P=k/x);var M=0,F=0;0===u?(M=1,F=2-b):(M=3===u?1:2,F=(1===u?2:1)*(2-b));var B=16*(y+1),N=16*(_+1)*(2-b);B-=(S+w)*M,N-=(E+T)*F;var U=Math.ceil(B*P);return i.destroy(),i=null,{profile_string:s,level_string:l,bit_depth:f,ref_frames:m,chroma_format:c,chroma_format_string:e.getChromaFormatString(c),frame_rate:{fixed:A,fps:L,fps_den:R,fps_num:C},sar_ratio:{width:k,height:x},codec_size:{width:B,height:N},present_size:{width:U,height:N}}}},{key:"_skipScalingList",value:function(e,t){for(var n=8,i=8,r=0;r<t;r++)0!==i&&(i=(n+e.readSEG()+256)%256),n=0===i?n:i}},{key:"getProfileString",value:function(e){switch(e){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}},{key:"getLevelString",value:function(e){return(e/10).toFixed(1)}},{key:"getChromaFormatString",value:function(e){switch(e){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}]),e}();n.default=s},{"./exp-golomb.js":17}],20:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=h(e("./utils/polyfill.js")),a=h(e("./core/features.js")),o=e("./io/loader.js"),s=h(e("./player/flv-player.js")),l=h(e("./player/native-player.js")),u=h(e("./player/player-events.js")),c=e("./player/player-errors.js"),f=h(e("./utils/logging-control.js")),d=e("./utils/exception.js");function h(e){return e&&e.__esModule?e:{default:e}}r.default.install();var p={createPlayer:function(e,t){var n=e;if(null==n||"object"!==(void 0===n?"undefined":i(n)))throw new d.InvalidArgumentException("MediaDataSource must be an javascript object!");if(!n.hasOwnProperty("type"))throw new d.InvalidArgumentException("MediaDataSource must has type field to indicate video file type!");switch(n.type){case"flv":return new s.default(n,t);default:return new l.default(n,t)}},isSupported:function(){return a.default.supportMSEH264Playback()},getFeatureList:function(){return a.default.getFeatureList()}};p.BaseLoader=o.BaseLoader,p.LoaderStatus=o.LoaderStatus,p.LoaderErrors=o.LoaderErrors,p.Events=u.default,p.ErrorTypes=c.ErrorTypes,p.ErrorDetails=c.ErrorDetails,p.FlvPlayer=s.default,p.NativePlayer=l.default,p.LoggingControl=f.default,Object.defineProperty(p,"version",{enumerable:!0,get:function(){return"1.5.0"}}),n.default=p},{"./core/features.js":6,"./io/loader.js":24,"./player/flv-player.js":32,"./player/native-player.js":33,"./player/player-errors.js":34,"./player/player-events.js":35,"./utils/exception.js":40,"./utils/logging-control.js":42,"./utils/polyfill.js":43}],21:[function(e,t,n){"use strict";t.exports=e("./flv.js").default},{"./flv.js":20}],22:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=(l(e("../utils/logger.js")),l(e("../utils/browser.js"))),o=e("./loader.js"),s=e("../utils/exception.js");function l(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"fetch-stream-loader"));return i.TAG="FetchStreamLoader",i._seekHandler=e,i._config=n,i._needStash=!0,i._requestAbort=!1,i._contentLength=null,i._receivedLength=0,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,null,[{key:"isSupported",value:function(){try{var e=a.default.msedge&&a.default.version.minor>=15048,t=!a.default.msedge||e;return self.fetch&&self.ReadableStream&&t}catch(e){return!1}}}]),r(t,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),function e(t,n,i){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in r)return r.value;var o=r.get;return void 0!==o?o.call(i):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){var n=this;this._dataSource=e,this._range=t;var r=e.url;this._config.reuseRedirectedURL&&null!=e.redirectedURL&&(r=e.redirectedURL);var a=this._seekHandler.getConfig(r,t),l=new self.Headers;if("object"===i(a.headers)){var u=a.headers;for(var c in u)u.hasOwnProperty(c)&&l.append(c,u[c])}var f={method:"GET",headers:l,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if("object"===i(this._config.headers))for(var d in this._config.headers)l.append(d,this._config.headers[d]);!1===e.cors&&(f.mode="same-origin"),e.withCredentials&&(f.credentials="include"),e.referrerPolicy&&(f.referrerPolicy=e.referrerPolicy),this._status=o.LoaderStatus.kConnecting,self.fetch(a.url,f).then((function(e){if(n._requestAbort)return n._requestAbort=!1,void(n._status=o.LoaderStatus.kIdle);if(e.ok&&e.status>=200&&e.status<=299){if(e.url!==a.url&&n._onURLRedirect){var t=n._seekHandler.removeURLParameters(e.url);n._onURLRedirect(t)}var i=e.headers.get("Content-Length");return null!=i&&(n._contentLength=parseInt(i),0!==n._contentLength&&n._onContentLengthKnown&&n._onContentLengthKnown(n._contentLength)),n._pump.call(n,e.body.getReader())}if(n._status=o.LoaderStatus.kError,!n._onError)throw new s.RuntimeException("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);n._onError(o.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})})).catch((function(e){if(n._status=o.LoaderStatus.kError,!n._onError)throw e;n._onError(o.LoaderErrors.EXCEPTION,{code:-1,msg:e.message})}))}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(e){var t=this;return e.read().then((function(n){if(n.done)if(null!==t._contentLength&&t._receivedLength<t._contentLength){t._status=o.LoaderStatus.kError;var i=o.LoaderErrors.EARLY_EOF,r={code:-1,msg:"Fetch stream meet Early-EOF"};if(!t._onError)throw new s.RuntimeException(r.msg);t._onError(i,r)}else t._status=o.LoaderStatus.kComplete,t._onComplete&&t._onComplete(t._range.from,t._range.from+t._receivedLength-1);else{if(!0===t._requestAbort)return t._requestAbort=!1,t._status=o.LoaderStatus.kComplete,e.cancel();t._status=o.LoaderStatus.kBuffering;var a=n.value.buffer,l=t._range.from+t._receivedLength;t._receivedLength+=a.byteLength,t._onDataArrival&&t._onDataArrival(a,l,t._receivedLength),t._pump(e)}})).catch((function(e){if(11!==e.code||!a.default.msedge){t._status=o.LoaderStatus.kError;var n=0,i=null;if(19!==e.code&&"network error"!==e.message||!(null===t._contentLength||null!==t._contentLength&&t._receivedLength<t._contentLength)?(n=o.LoaderErrors.EXCEPTION,i={code:e.code,msg:e.message}):(n=o.LoaderErrors.EARLY_EOF,i={code:e.code,msg:"Fetch stream meet Early-EOF"}),!t._onError)throw new s.RuntimeException(i.msg);t._onError(n,i)}}))}}]),t}(o.BaseLoader);n.default=u},{"../utils/browser.js":39,"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24}],23:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=p(e("../utils/logger.js")),a=p(e("./speed-sampler.js")),o=e("./loader.js"),s=p(e("./fetch-stream-loader.js")),l=p(e("./xhr-moz-chunked-loader.js")),u=(p(e("./xhr-msstream-loader.js")),p(e("./xhr-range-loader.js"))),c=p(e("./websocket-loader.js")),f=p(e("./range-seek-handler.js")),d=p(e("./param-seek-handler.js")),h=e("../utils/exception.js");function p(e){return e&&e.__esModule?e:{default:e}}var v=function(){function e(t,n,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.TAG="IOController",this._config=n,this._extraData=i,this._stashInitialSize=393216,null!=n.stashInitialSize&&n.stashInitialSize>0&&(this._stashInitialSize=n.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,!1===n.enableStashBuffer&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=t,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(t.url),this._refTotalLength=t.filesize?t.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new a.default,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return i(e,[{key:"destroy",value:function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}},{key:"isWorking",value:function(){return this._loader&&this._loader.isWorking()&&!this._paused}},{key:"isPaused",value:function(){return this._paused}},{key:"_selectSeekHandler",value:function(){var e=this._config;if("range"===e.seekType)this._seekHandler=new f.default(this._config.rangeLoadZeroStart);else if("param"===e.seekType){var t=e.seekParamStart||"bstart",n=e.seekParamEnd||"bend";this._seekHandler=new d.default(t,n)}else{if("custom"!==e.seekType)throw new h.InvalidArgumentException("Invalid seekType in config: "+e.seekType);if("function"!=typeof e.customSeekHandler)throw new h.InvalidArgumentException("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new e.customSeekHandler}}},{key:"_selectLoader",value:function(){if(null!=this._config.customLoader)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=c.default;else if(s.default.isSupported())this._loaderClass=s.default;else if(l.default.isSupported())this._loaderClass=l.default;else{if(!u.default.isSupported())throw new h.RuntimeException("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=u.default}}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),!1===this._loader.needStashBuffer&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}},{key:"open",value:function(e){this._currentRange={from:0,to:-1},e&&(this._currentRange.from=e),this._speedSampler.reset(),e||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),0!==this._stashUsed?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var e=this._resumeFrom;this._resumeFrom=0,this._internalSeek(e,!0)}}},{key:"seek",value:function(e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(e,!0)}},{key:"_internalSeek",value:function(e,t){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(t),this._loader.destroy(),this._loader=null;var n={from:e,to:-1};this._currentRange={from:n.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,n),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(e){if(!e||"string"!=typeof e||0===e.length)throw new h.InvalidArgumentException("Url must be a non-empty string!");this._dataSource.url=e}},{key:"_expandBuffer",value:function(e){for(var t=this._stashSize;t+1048576<e;)t*=2;if((t+=1048576)!==this._bufferSize){var n=new ArrayBuffer(t);if(this._stashUsed>0){var i=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(n,0,t).set(i,0)}this._stashBuffer=n,this._bufferSize=t}}},{key:"_normalizeSpeed",value:function(e){var t=this._speedNormalizeList,n=t.length-1,i=0,r=0,a=n;if(e<t[0])return t[0];for(;r<=a;){if((i=r+Math.floor((a-r)/2))===n||e>=t[i]&&e<t[i+1])return t[i];t[i]<e?r=i+1:a=i-1}}},{key:"_adjustStashSize",value:function(e){var t=0;(t=this._config.isLive||e<512?e:e>=512&&e<=1024?Math.floor(1.5*e):2*e)>8192&&(t=8192);var n=1024*t+1048576;this._bufferSize<n&&this._expandBuffer(n),this._stashSize=1024*t}},{key:"_dispatchChunks",value:function(e,t){return this._currentRange.to=t+e.byteLength-1,this._onDataArrival(e,t)}},{key:"_onURLRedirect",value:function(e){this._redirectedURL=e,this._onRedirect&&this._onRedirect(e)}},{key:"_onContentLengthKnown",value:function(e){e&&this._fullRequestFlag&&(this._totalLength=e,this._fullRequestFlag=!1)}},{key:"_onLoaderChunkArrival",value:function(e,t,n){if(!this._onDataArrival)throw new h.IllegalStateException("IOController: No existing consumer (onDataArrival) callback!");if(!this._paused){this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(e.byteLength);var i=this._speedSampler.lastSecondKBps;if(0!==i){var r=this._normalizeSpeed(i);this._speedNormalized!==r&&(this._speedNormalized=r,this._adjustStashSize(r))}if(this._enableStash)if(0===this._stashUsed&&0===this._stashByteStart&&(this._stashByteStart=t),this._stashUsed+e.byteLength<=this._stashSize)new Uint8Array(this._stashBuffer,0,this._stashSize).set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength;else{var a=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){var o=this._stashBuffer.slice(0,this._stashUsed),s=this._dispatchChunks(o,this._stashByteStart);if(s<o.byteLength){if(s>0){var l=new Uint8Array(o,s);a.set(l,0),this._stashUsed=l.byteLength,this._stashByteStart+=s}}else this._stashUsed=0,this._stashByteStart+=s;this._stashUsed+e.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+e.byteLength),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{var u=this._dispatchChunks(e,t);if(u<e.byteLength){var c=e.byteLength-u;c>this._bufferSize&&(this._expandBuffer(c),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e,u),0),this._stashUsed+=c,this._stashByteStart=t+u}}}else if(0===this._stashUsed){var f=this._dispatchChunks(e,t);if(f<e.byteLength){var d=e.byteLength-f;d>this._bufferSize&&this._expandBuffer(d),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(e,f),0),this._stashUsed+=d,this._stashByteStart=t+f}}else{this._stashUsed+e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength);var p=new Uint8Array(this._stashBuffer,0,this._bufferSize);p.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength;var v=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(v<this._stashUsed&&v>0){var g=new Uint8Array(this._stashBuffer,v);p.set(g,0)}this._stashUsed-=v,this._stashByteStart+=v}}}},{key:"_flushStashBuffer",value:function(e){if(this._stashUsed>0){var t=this._stashBuffer.slice(0,this._stashUsed),n=this._dispatchChunks(t,this._stashByteStart),i=t.byteLength-n;if(n<t.byteLength){if(!e){if(n>0){var a=new Uint8Array(this._stashBuffer,0,this._bufferSize),o=new Uint8Array(t,n);a.set(o,0),this._stashUsed=o.byteLength,this._stashByteStart+=n}return 0}r.default.w(this.TAG,i+" bytes unconsumed data remain when flush buffer, dropped")}return this._stashUsed=0,this._stashByteStart=0,i}return 0}},{key:"_onLoaderComplete",value:function(e,t){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(e,t){switch(r.default.e(this.TAG,"Loader error, code = "+t.code+", msg = "+t.msg),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=o.LoaderErrors.UNRECOVERABLE_EARLY_EOF),e){case o.LoaderErrors.EARLY_EOF:if(!this._config.isLive&&this._totalLength){var n=this._currentRange.to+1;return void(n<this._totalLength&&(r.default.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(n,!1)))}e=o.LoaderErrors.UNRECOVERABLE_EARLY_EOF;break;case o.LoaderErrors.UNRECOVERABLE_EARLY_EOF:case o.LoaderErrors.CONNECTING_TIMEOUT:case o.LoaderErrors.HTTP_STATUS_CODE_INVALID:case o.LoaderErrors.EXCEPTION:}if(!this._onError)throw new h.RuntimeException("IOException: "+t.msg);this._onError(e,t)}},{key:"status",get:function(){return this._loader.status}},{key:"extraData",get:function(){return this._extraData},set:function(e){this._extraData=e}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(e){this._onSeeked=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onComplete",get:function(){return this._onComplete},set:function(e){this._onComplete=e}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(e){this._onRedirect=e}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(e){this._onRecoveredEarlyEof=e}},{key:"currentURL",get:function(){return this._dataSource.url}},{key:"hasRedirect",get:function(){return null!=this._redirectedURL||null!=this._dataSource.redirectedURL}},{key:"currentRedirectedURL",get:function(){return this._redirectedURL||this._dataSource.redirectedURL}},{key:"currentSpeed",get:function(){return this._loaderClass===u.default?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}},{key:"loaderType",get:function(){return this._loader.type}}]),e}();n.default=v},{"../utils/exception.js":40,"../utils/logger.js":41,"./fetch-stream-loader.js":22,"./loader.js":24,"./param-seek-handler.js":25,"./range-seek-handler.js":26,"./speed-sampler.js":27,"./websocket-loader.js":28,"./xhr-moz-chunked-loader.js":29,"./xhr-msstream-loader.js":30,"./xhr-range-loader.js":31}],24:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BaseLoader=n.LoaderErrors=n.LoaderStatus=void 0;var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=e("../utils/exception.js"),a=n.LoaderStatus={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4};n.LoaderErrors={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},n.BaseLoader=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._type=t||"undefined",this._status=a.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return i(e,[{key:"destroy",value:function(){this._status=a.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},{key:"isWorking",value:function(){return this._status===a.kConnecting||this._status===a.kBuffering}},{key:"open",value:function(e,t){throw new r.NotImplementedException("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new r.NotImplementedException("Unimplemented abstract function!")}},{key:"type",get:function(){return this._type}},{key:"status",get:function(){return this._status}},{key:"needStashBuffer",get:function(){return this._needStash}},{key:"onContentLengthKnown",get:function(){return this._onContentLengthKnown},set:function(e){this._onContentLengthKnown=e}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(e){this._onURLRedirect=e}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onComplete",get:function(){return this._onComplete},set:function(e){this._onComplete=e}}]),e}()},{"../utils/exception.js":40}],25:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._startName=t,this._endName=n}return i(e,[{key:"getConfig",value:function(e,t){var n=e;if(0!==t.from||-1!==t.to){var i=!0;-1===n.indexOf("?")&&(n+="?",i=!1),i&&(n+="&"),n+=this._startName+"="+t.from.toString(),-1!==t.to&&(n+="&"+this._endName+"="+t.to.toString())}return{url:n,headers:{}}}},{key:"removeURLParameters",value:function(e){var t=e.split("?")[0],n=void 0,i=e.indexOf("?");-1!==i&&(n=e.substring(i+1));var r="";if(null!=n&&n.length>0)for(var a=n.split("&"),o=0;o<a.length;o++){var s=a[o].split("="),l=o>0;s[0]!==this._startName&&s[0]!==this._endName&&(l&&(r+="&"),r+=a[o])}return 0===r.length?t:t+"?"+r}}]),e}();n.default=r},{}],26:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._zeroStart=t||!1}return i(e,[{key:"getConfig",value:function(e,t){var n={};if(0!==t.from||-1!==t.to){var i=void 0;i=-1!==t.to?"bytes="+t.from.toString()+"-"+t.to.toString():"bytes="+t.from.toString()+"-",n.Range=i}else this._zeroStart&&(n.Range="bytes=0-");return{url:e,headers:n}}},{key:"removeURLParameters",value:function(e){return e}}]),e}();n.default=r},{}],27:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return i(e,[{key:"reset",value:function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}},{key:"addBytes",value:function(e){0===this._firstCheckpoint?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=e,this._totalBytes+=e):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=e,this._totalBytes+=e):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=e,this._totalBytes+=e,this._lastCheckpoint=this._now())}},{key:"currentKBps",get:function(){this.addBytes(0);var e=(this._now()-this._lastCheckpoint)/1e3;return 0==e&&(e=1),this._intervalBytes/e/1024}},{key:"lastSecondKBps",get:function(){return this.addBytes(0),0!==this._lastSecondBytes?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/e/1024}}]),e}();n.default=r},{}],28:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=e("../utils/logger.js"),o=((i=a)&&i.__esModule,e("./loader.js")),s=e("../utils/exception.js"),l=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"websocket-loader"));return e.TAG="WebSocketLoader",e._needStash=!0,e._ws=null,e._requestAbort=!1,e._receivedLength=0,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,null,[{key:"isSupported",value:function(){try{return void 0!==self.WebSocket}catch(e){return!1}}}]),r(t,[{key:"destroy",value:function(){this._ws&&this.abort(),function e(t,n,i){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in r)return r.value;var o=r.get;return void 0!==o?o.call(i):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e){try{var t=this._ws=new self.WebSocket(e.url);t.binaryType="arraybuffer",t.onopen=this._onWebSocketOpen.bind(this),t.onclose=this._onWebSocketClose.bind(this),t.onmessage=this._onWebSocketMessage.bind(this),t.onerror=this._onWebSocketError.bind(this),this._status=o.LoaderStatus.kConnecting}catch(e){this._status=o.LoaderStatus.kError;var n={code:e.code,msg:e.message};if(!this._onError)throw new s.RuntimeException(n.msg);this._onError(o.LoaderErrors.EXCEPTION,n)}}},{key:"abort",value:function(){var e=this._ws;!e||0!==e.readyState&&1!==e.readyState||(this._requestAbort=!0,e.close()),this._ws=null,this._status=o.LoaderStatus.kComplete}},{key:"_onWebSocketOpen",value:function(e){this._status=o.LoaderStatus.kBuffering}},{key:"_onWebSocketClose",value:function(e){!0!==this._requestAbort?(this._status=o.LoaderStatus.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)):this._requestAbort=!1}},{key:"_onWebSocketMessage",value:function(e){var t=this;if(e.data instanceof ArrayBuffer)this._dispatchArrayBuffer(e.data);else if(e.data instanceof Blob){var n=new FileReader;n.onload=function(){t._dispatchArrayBuffer(n.result)},n.readAsArrayBuffer(e.data)}else{this._status=o.LoaderStatus.kError;var i={code:-1,msg:"Unsupported WebSocket message type: "+e.data.constructor.name};if(!this._onError)throw new s.RuntimeException(i.msg);this._onError(o.LoaderErrors.EXCEPTION,i)}}},{key:"_dispatchArrayBuffer",value:function(e){var t=e,n=this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,n,this._receivedLength)}},{key:"_onWebSocketError",value:function(e){this._status=o.LoaderStatus.kError;var t={code:e.code,msg:e.message};if(!this._onError)throw new s.RuntimeException(t.msg);this._onError(o.LoaderErrors.EXCEPTION,t)}}]),t}(o.BaseLoader);n.default=l},{"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24}],29:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=e("../utils/logger.js"),s=(i=o)&&i.__esModule?i:{default:i},l=e("./loader.js"),u=e("../utils/exception.js"),c=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"xhr-moz-chunked-loader"));return i.TAG="MozChunkedLoader",i._seekHandler=e,i._config=n,i._needStash=!0,i._xhr=null,i._requestAbort=!1,i._contentLength=null,i._receivedLength=0,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,null,[{key:"isSupported",value:function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="moz-chunked-arraybuffer","moz-chunked-arraybuffer"===e.responseType}catch(e){return s.default.w("MozChunkedLoader",e.message),!1}}}]),a(t,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),function e(t,n,i){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in r)return r.value;var o=r.get;return void 0!==o?o.call(i):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){this._dataSource=e,this._range=t;var n=e.url;this._config.reuseRedirectedURL&&null!=e.redirectedURL&&(n=e.redirectedURL);var i=this._seekHandler.getConfig(n,t);this._requestURL=i.url;var a=this._xhr=new XMLHttpRequest;if(a.open("GET",i.url,!0),a.responseType="moz-chunked-arraybuffer",a.onreadystatechange=this._onReadyStateChange.bind(this),a.onprogress=this._onProgress.bind(this),a.onloadend=this._onLoadEnd.bind(this),a.onerror=this._onXhrError.bind(this),e.withCredentials&&(a.withCredentials=!0),"object"===r(i.headers)){var o=i.headers;for(var s in o)o.hasOwnProperty(s)&&a.setRequestHeader(s,o[s])}if("object"===r(this._config.headers)){var u=this._config.headers;for(var c in u)u.hasOwnProperty(c)&&a.setRequestHeader(c,u[c])}this._status=l.LoaderStatus.kConnecting,a.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=l.LoaderStatus.kComplete}},{key:"_onReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState){if(null!=t.responseURL&&t.responseURL!==this._requestURL&&this._onURLRedirect){var n=this._seekHandler.removeURLParameters(t.responseURL);this._onURLRedirect(n)}if(0!==t.status&&(t.status<200||t.status>299)){if(this._status=l.LoaderStatus.kError,!this._onError)throw new u.RuntimeException("MozChunkedLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(l.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else this._status=l.LoaderStatus.kBuffering}}},{key:"_onProgress",value:function(e){if(this._status!==l.LoaderStatus.kError){null===this._contentLength&&null!==e.total&&0!==e.total&&(this._contentLength=e.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var t=e.target.response,n=this._range.from+this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,n,this._receivedLength)}}},{key:"_onLoadEnd",value:function(e){!0!==this._requestAbort?this._status!==l.LoaderStatus.kError&&(this._status=l.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)):this._requestAbort=!1}},{key:"_onXhrError",value:function(e){this._status=l.LoaderStatus.kError;var t=0,n=null;if(this._contentLength&&e.loaded<this._contentLength?(t=l.LoaderErrors.EARLY_EOF,n={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(t=l.LoaderErrors.EXCEPTION,n={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new u.RuntimeException(n.msg);this._onError(t,n)}}]),t}(l.BaseLoader);n.default=c},{"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24}],30:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=e("../utils/logger.js"),s=(i=o)&&i.__esModule?i:{default:i},l=e("./loader.js"),u=e("../utils/exception.js"),c=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"xhr-msstream-loader"));return i.TAG="MSStreamLoader",i._seekHandler=e,i._config=n,i._needStash=!0,i._xhr=null,i._reader=null,i._totalRange=null,i._currentRange=null,i._currentRequestURL=null,i._currentRedirectedURL=null,i._contentLength=null,i._receivedLength=0,i._bufferLimit=16777216,i._lastTimeBufferSize=0,i._isReconnecting=!1,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,null,[{key:"isSupported",value:function(){try{if(void 0===self.MSStream||void 0===self.MSStreamReader)return!1;var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="ms-stream","ms-stream"===e.responseType}catch(e){return s.default.w("MSStreamLoader",e.message),!1}}}]),a(t,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._reader&&(this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr=null),function e(t,n,i){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in r)return r.value;var o=r.get;return void 0!==o?o.call(i):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){this._internalOpen(e,t,!1)}},{key:"_internalOpen",value:function(e,t,n){this._dataSource=e,n?this._currentRange=t:this._totalRange=t;var i=e.url;this._config.reuseRedirectedURL&&(null!=this._currentRedirectedURL?i=this._currentRedirectedURL:null!=e.redirectedURL&&(i=e.redirectedURL));var a=this._seekHandler.getConfig(i,t);this._currentRequestURL=a.url;var o=this._reader=new self.MSStreamReader;o.onprogress=this._msrOnProgress.bind(this),o.onload=this._msrOnLoad.bind(this),o.onerror=this._msrOnError.bind(this);var s=this._xhr=new XMLHttpRequest;if(s.open("GET",a.url,!0),s.responseType="ms-stream",s.onreadystatechange=this._xhrOnReadyStateChange.bind(this),s.onerror=this._xhrOnError.bind(this),e.withCredentials&&(s.withCredentials=!0),"object"===r(a.headers)){var u=a.headers;for(var c in u)u.hasOwnProperty(c)&&s.setRequestHeader(c,u[c])}if("object"===r(this._config.headers)){var f=this._config.headers;for(var d in f)f.hasOwnProperty(d)&&s.setRequestHeader(d,f[d])}this._isReconnecting?this._isReconnecting=!1:this._status=l.LoaderStatus.kConnecting,s.send()}},{key:"abort",value:function(){this._internalAbort(),this._status=l.LoaderStatus.kComplete}},{key:"_internalAbort",value:function(){this._reader&&(1===this._reader.readyState&&this._reader.abort(),this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.abort(),this._xhr.onreadystatechange=null,this._xhr=null)}},{key:"_xhrOnReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState)if(t.status>=200&&t.status<=299){if(this._status=l.LoaderStatus.kBuffering,null!=t.responseURL){var n=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&n!==this._currentRedirectedURL&&(this._currentRedirectedURL=n,this._onURLRedirect&&this._onURLRedirect(n))}var i=t.getResponseHeader("Content-Length");if(null!=i&&null==this._contentLength){var r=parseInt(i);r>0&&(this._contentLength=r,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else{if(this._status=l.LoaderStatus.kError,!this._onError)throw new u.RuntimeException("MSStreamLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(l.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else if(3===t.readyState&&t.status>=200&&t.status<=299){this._status=l.LoaderStatus.kBuffering;var a=t.response;this._reader.readAsArrayBuffer(a)}}},{key:"_xhrOnError",value:function(e){this._status=l.LoaderStatus.kError;var t=l.LoaderErrors.EXCEPTION,n={code:-1,msg:e.constructor.name+" "+e.type};if(!this._onError)throw new u.RuntimeException(n.msg);this._onError(t,n)}},{key:"_msrOnProgress",value:function(e){var t=e.target.result;if(null!=t){var n=t.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=t.byteLength;var i=this._totalRange.from+this._receivedLength;this._receivedLength+=n.byteLength,this._onDataArrival&&this._onDataArrival(n,i,this._receivedLength),t.byteLength>=this._bufferLimit&&(s.default.v(this.TAG,"MSStream buffer exceeded max size near "+(i+n.byteLength)+", reconnecting..."),this._doReconnectIfNeeded())}else this._doReconnectIfNeeded()}},{key:"_doReconnectIfNeeded",value:function(){if(null==this._contentLength||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();var e={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,e,!0)}}},{key:"_msrOnLoad",value:function(e){this._status=l.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}},{key:"_msrOnError",value:function(e){this._status=l.LoaderStatus.kError;var t=0,n=null;if(this._contentLength&&this._receivedLength<this._contentLength?(t=l.LoaderErrors.EARLY_EOF,n={code:-1,msg:"MSStream meet Early-Eof"}):(t=l.LoaderErrors.EARLY_EOF,n={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new u.RuntimeException(n.msg);this._onError(t,n)}}]),t}(l.BaseLoader);n.default=c},{"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24}],31:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=u(e("../utils/logger.js")),o=u(e("./speed-sampler.js")),s=e("./loader.js"),l=e("../utils/exception.js");function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"xhr-range-loader"));return i.TAG="RangeLoader",i._seekHandler=e,i._config=n,i._needStash=!1,i._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],i._currentChunkSizeKB=384,i._currentSpeedNormalized=0,i._zeroSpeedChunkCount=0,i._xhr=null,i._speedSampler=new o.default,i._requestAbort=!1,i._waitForTotalLength=!1,i._totalLengthReceived=!1,i._currentRequestURL=null,i._currentRedirectedURL=null,i._currentRequestRange=null,i._totalLength=null,i._contentLength=null,i._receivedLength=0,i._lastTimeLoaded=0,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,null,[{key:"isSupported",value:function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="arraybuffer","arraybuffer"===e.responseType}catch(e){return a.default.w("RangeLoader",e.message),!1}}}]),r(t,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),function e(t,n,i){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in r)return r.value;var o=r.get;return void 0!==o?o.call(i):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){this._dataSource=e,this._range=t,this._status=s.LoaderStatus.kConnecting;var n=!1;null!=this._dataSource.filesize&&0!==this._dataSource.filesize&&(n=!0,this._totalLength=this._dataSource.filesize),this._totalLengthReceived||n?this._openSubRange():(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1}))}},{key:"_openSubRange",value:function(){var e=1024*this._currentChunkSizeKB,t=this._range.from+this._receivedLength,n=t+e;null!=this._contentLength&&n-this._range.from>=this._contentLength&&(n=this._range.from+this._contentLength-1),this._currentRequestRange={from:t,to:n},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(e,t){this._lastTimeLoaded=0;var n=e.url;this._config.reuseRedirectedURL&&(null!=this._currentRedirectedURL?n=this._currentRedirectedURL:null!=e.redirectedURL&&(n=e.redirectedURL));var r=this._seekHandler.getConfig(n,t);this._currentRequestURL=r.url;var a=this._xhr=new XMLHttpRequest;if(a.open("GET",r.url,!0),a.responseType="arraybuffer",a.onreadystatechange=this._onReadyStateChange.bind(this),a.onprogress=this._onProgress.bind(this),a.onload=this._onLoad.bind(this),a.onerror=this._onXhrError.bind(this),e.withCredentials&&(a.withCredentials=!0),"object"===i(r.headers)){var o=r.headers;for(var s in o)o.hasOwnProperty(s)&&a.setRequestHeader(s,o[s])}if("object"===i(this._config.headers)){var l=this._config.headers;for(var u in l)l.hasOwnProperty(u)&&a.setRequestHeader(u,l[u])}a.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=s.LoaderStatus.kComplete}},{key:"_internalAbort",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}},{key:"_onReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState){if(null!=t.responseURL){var n=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&n!==this._currentRedirectedURL&&(this._currentRedirectedURL=n,this._onURLRedirect&&this._onURLRedirect(n))}if(t.status>=200&&t.status<=299){if(this._waitForTotalLength)return;this._status=s.LoaderStatus.kBuffering}else{if(this._status=s.LoaderStatus.kError,!this._onError)throw new l.RuntimeException("RangeLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(s.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}}}},{key:"_onProgress",value:function(e){if(this._status!==s.LoaderStatus.kError){if(null===this._contentLength){var t=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,t=!0;var n=e.total;this._internalAbort(),null!=n&0!==n&&(this._totalLength=n)}if(-1===this._range.to?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,t)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var i=e.loaded-this._lastTimeLoaded;this._lastTimeLoaded=e.loaded,this._speedSampler.addBytes(i)}}},{key:"_normalizeSpeed",value:function(e){var t=this._chunkSizeKBList,n=t.length-1,i=0,r=0,a=n;if(e<t[0])return t[0];for(;r<=a;){if((i=r+Math.floor((a-r)/2))===n||e>=t[i]&&e<t[i+1])return t[i];t[i]<e?r=i+1:a=i-1}}},{key:"_onLoad",value:function(e){if(this._status!==s.LoaderStatus.kError)if(this._waitForTotalLength)this._waitForTotalLength=!1;else{this._lastTimeLoaded=0;var t=this._speedSampler.lastSecondKBps;if(0===t&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(t=this._speedSampler.currentKBps)),0!==t){var n=this._normalizeSpeed(t);this._currentSpeedNormalized!==n&&(this._currentSpeedNormalized=n,this._currentChunkSizeKB=n)}var i=e.target.response,r=this._range.from+this._receivedLength;this._receivedLength+=i.byteLength;var a=!1;null!=this._contentLength&&this._receivedLength<this._contentLength?this._openSubRange():a=!0,this._onDataArrival&&this._onDataArrival(i,r,this._receivedLength),a&&(this._status=s.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}}},{key:"_onXhrError",value:function(e){this._status=s.LoaderStatus.kError;var t=0,n=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(t=s.LoaderErrors.EARLY_EOF,n={code:-1,msg:"RangeLoader meet Early-Eof"}):(t=s.LoaderErrors.EXCEPTION,n={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new l.RuntimeException(n.msg);this._onError(t,n)}},{key:"currentSpeed",get:function(){return this._speedSampler.lastSecondKBps}}]),t}(s.BaseLoader);n.default=c},{"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24,"./speed-sampler.js":27}],32:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=g(e("events")),o=g(e("../utils/logger.js")),s=g(e("../utils/browser.js")),l=g(e("./player-events.js")),u=g(e("../core/transmuxer.js")),c=g(e("../core/transmuxing-events.js")),f=g(e("../core/mse-controller.js")),d=g(e("../core/mse-events.js")),h=e("./player-errors.js"),p=e("../config.js"),v=e("../utils/exception.js");function g(e){return e&&e.__esModule?e:{default:e}}var m=function(){function e(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new a.default,this._config=(0,p.createDefaultConfig)(),"object"===(void 0===n?"undefined":i(n))&&Object.assign(this._config,n),"flv"!==t.type.toLowerCase())throw new v.InvalidArgumentException("FlvPlayer requires an flv MediaDataSource input!");!0===t.isLive&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=t,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var r=s.default.chrome&&(s.default.version.major<50||50===s.default.version.major&&s.default.version.build<2661);this._alwaysSeekKeyframe=!!(r||s.default.msedge||s.default.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return r(e,[{key:"destroy",value:function(){null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){var n=this;e===l.default.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then((function(){n._emitter.emit(l.default.MEDIA_INFO,n.mediaInfo)})):e===l.default.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then((function(){n._emitter.emit(l.default.STATISTICS_INFO,n.statisticsInfo)})),this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){var t=this;if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),e.addEventListener("seeking",this.e.onvSeeking),e.addEventListener("canplay",this.e.onvCanPlay),e.addEventListener("stalled",this.e.onvStalled),e.addEventListener("progress",this.e.onvProgress),this._msectl=new f.default(this._config),this._msectl.on(d.default.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(d.default.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(d.default.SOURCE_OPEN,(function(){t._mseSourceOpened=!0,t._hasPendingLoad&&(t._hasPendingLoad=!1,t.load())})),this._msectl.on(d.default.ERROR,(function(e){t._emitter.emit(l.default.ERROR,h.ErrorTypes.MEDIA_ERROR,h.ErrorDetails.MEDIA_MSE_ERROR,e)})),this._msectl.attachMediaElement(e),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}},{key:"load",value:function(){var e=this;if(!this._mediaElement)throw new v.IllegalStateException("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new v.IllegalStateException("FlvPlayer.load() has been called, please call unload() first!");this._hasPendingLoad||(this._config.deferLoadAfterSourceOpen&&!1===this._mseSourceOpened?this._hasPendingLoad=!0:(this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new u.default(this._mediaDataSource,this._config),this._transmuxer.on(c.default.INIT_SEGMENT,(function(t,n){e._msectl.appendInitSegment(n)})),this._transmuxer.on(c.default.MEDIA_SEGMENT,(function(t,n){if(e._msectl.appendMediaSegment(n),e._config.lazyLoad&&!e._config.isLive){var i=e._mediaElement.currentTime;n.info.endDts>=1e3*(i+e._config.lazyLoadMaxDuration)&&null==e._progressChecker&&(o.default.v(e.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),e._suspendTransmuxer())}})),this._transmuxer.on(c.default.LOADING_COMPLETE,(function(){e._msectl.endOfStream(),e._emitter.emit(l.default.LOADING_COMPLETE)})),this._transmuxer.on(c.default.RECOVERED_EARLY_EOF,(function(){e._emitter.emit(l.default.RECOVERED_EARLY_EOF)})),this._transmuxer.on(c.default.IO_ERROR,(function(t,n){e._emitter.emit(l.default.ERROR,h.ErrorTypes.NETWORK_ERROR,t,n)})),this._transmuxer.on(c.default.DEMUX_ERROR,(function(t,n){e._emitter.emit(l.default.ERROR,h.ErrorTypes.MEDIA_ERROR,t,{code:-1,msg:n})})),this._transmuxer.on(c.default.MEDIA_INFO,(function(t){e._mediaInfo=t,e._emitter.emit(l.default.MEDIA_INFO,Object.assign({},t))})),this._transmuxer.on(c.default.METADATA_ARRIVED,(function(t){e._emitter.emit(l.default.METADATA_ARRIVED,t)})),this._transmuxer.on(c.default.SCRIPTDATA_ARRIVED,(function(t){e._emitter.emit(l.default.SCRIPTDATA_ARRIVED,t)})),this._transmuxer.on(c.default.STATISTICS_INFO,(function(t){e._statisticsInfo=e._fillStatisticsInfo(t),e._emitter.emit(l.default.STATISTICS_INFO,Object.assign({},e._statisticsInfo))})),this._transmuxer.on(c.default.RECOMMEND_SEEKPOINT,(function(t){e._mediaElement&&!e._config.accurateSeek&&(e._requestSetTime=!0,e._mediaElement.currentTime=t/1e3)})),this._transmuxer.open()))}},{key:"unload",value:function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"_fillStatisticsInfo",value:function(e){if(e.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,i=0;if(this._mediaElement.getVideoPlaybackQuality){var r=this._mediaElement.getVideoPlaybackQuality();n=r.totalVideoFrames,i=r.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,i=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=i),e}},{key:"_onmseUpdateEnd",value:function(){if(this._config.lazyLoad&&!this._config.isLive){for(var e=this._mediaElement.buffered,t=this._mediaElement.currentTime,n=0,i=0;i<e.length;i++){var r=e.start(i),a=e.end(i);if(r<=t&&t<a){n=a;break}}n>=t+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(o.default.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}},{key:"_onmseBufferFull",value:function(){o.default.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){for(var e=this._mediaElement.currentTime,t=this._mediaElement.buffered,n=!1,i=0;i<t.length;i++){var r=t.start(i),a=t.end(i);if(e>=r&&e<a){e>=a-this._config.lazyLoadRecoverDuration&&(n=!0);break}}n&&(window.clearInterval(this._progressChecker),this._progressChecker=null,n&&(o.default.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(e){for(var t=this._mediaElement.buffered,n=0;n<t.length;n++){var i=t.start(n),r=t.end(n);if(e>=i&&e<r)return!0}return!1}},{key:"_internalSeek",value:function(e){var t=this._isTimepointBuffered(e),n=!1,i=0;if(e<1&&this._mediaElement.buffered.length>0){var r=this._mediaElement.buffered.start(0);(r<1&&e<r||s.default.safari)&&(n=!0,i=s.default.safari?.1:r)}if(n)this._requestSetTime=!0,this._mediaElement.currentTime=i;else if(t){if(this._alwaysSeekKeyframe){var a=this._msectl.getNearestKeyframe(Math.floor(1e3*e));this._requestSetTime=!0,this._mediaElement.currentTime=null!=a?a.dts/1e3:e}else this._requestSetTime=!0,this._mediaElement.currentTime=e;null!=this._progressChecker&&this._checkProgressAndResume()}else null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e)}},{key:"_checkAndApplyUnbufferedSeekpoint",value:function(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){var e=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(e)||(null!=this._progressChecker&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_checkAndResumeStuckPlayback",value:function(e){var t=this._mediaElement;if(e||!this._receivedCanPlay||t.readyState<2){var n=t.buffered;n.length>0&&t.currentTime<n.start(0)&&(o.default.w(this.TAG,"Playback seems stuck at "+t.currentTime+", seek to "+n.start(0)),this._requestSetTime=!0,this._mediaElement.currentTime=n.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}},{key:"_onvLoadedMetadata",value:function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}},{key:"_onvSeeking",value:function(e){var t=this._mediaElement.currentTime,n=this._mediaElement.buffered;if(this._requestSetTime)this._requestSetTime=!1;else{if(t<1&&n.length>0){var i=n.start(0);if(i<1&&t<i||s.default.safari)return this._requestSetTime=!0,void(this._mediaElement.currentTime=s.default.safari?.1:i)}if(this._isTimepointBuffered(t)){if(this._alwaysSeekKeyframe){var r=this._msectl.getNearestKeyframe(Math.floor(1e3*t));null!=r&&(this._requestSetTime=!0,this._mediaElement.currentTime=r.dts/1e3)}null!=this._progressChecker&&this._checkProgressAndResume()}else this._seekpointRecord={seekPoint:t,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}}},{key:"_onvCanPlay",value:function(e){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}},{key:"_onvStalled",value:function(e){this._checkAndResumeStuckPlayback(!0)}},{key:"_onvProgress",value:function(e){this._checkAndResumeStuckPlayback()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._internalSeek(e):this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return null==this._statisticsInfo&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}}]),e}();n.default=m},{"../config.js":5,"../core/mse-controller.js":9,"../core/mse-events.js":10,"../core/transmuxer.js":11,"../core/transmuxing-events.js":13,"../utils/browser.js":39,"../utils/exception.js":40,"../utils/logger.js":41,"./player-errors.js":34,"./player-events.js":35,events:2}],33:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=u(e("events")),o=u(e("./player-events.js")),s=e("../config.js"),l=e("../utils/exception.js");function u(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new a.default,this._config=(0,s.createDefaultConfig)(),"object"===(void 0===n?"undefined":i(n))&&Object.assign(this._config,n),"flv"===t.type.toLowerCase())throw new l.InvalidArgumentException("NativePlayer does't support flv MediaDataSource input!");if(t.hasOwnProperty("segments"))throw new l.InvalidArgumentException("NativePlayer("+t.type+") doesn't support multipart playback!");this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=t,this._mediaElement=null}return r(e,[{key:"destroy",value:function(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){var n=this;e===o.default.MEDIA_INFO?null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then((function(){n._emitter.emit(o.default.MEDIA_INFO,n.mediaInfo)})):e===o.default.STATISTICS_INFO&&null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then((function(){n._emitter.emit(o.default.STATISTICS_INFO,n.statisticsInfo)})),this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"load",value:function(){if(!this._mediaElement)throw new l.IllegalStateException("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}},{key:"unload",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"_onvLoadedMetadata",value:function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(o.default.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(o.default.STATISTICS_INFO,this.statisticsInfo)}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._mediaElement.currentTime=e:this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){var e={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(e.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(e.width=this._mediaElement.videoWidth,e.height=this._mediaElement.videoHeight)),e}},{key:"statisticsInfo",get:function(){var e={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,i=0;if(this._mediaElement.getVideoPlaybackQuality){var r=this._mediaElement.getVideoPlaybackQuality();n=r.totalVideoFrames,i=r.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,i=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=i),e}}]),e}();n.default=c},{"../config.js":5,"../utils/exception.js":40,"./player-events.js":35,events:2}],34:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ErrorDetails=n.ErrorTypes=void 0;var i,r=e("../io/loader.js"),a=e("../demux/demux-errors.js"),o=(i=a)&&i.__esModule?i:{default:i};n.ErrorTypes={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},n.ErrorDetails={NETWORK_EXCEPTION:r.LoaderErrors.EXCEPTION,NETWORK_STATUS_CODE_INVALID:r.LoaderErrors.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:r.LoaderErrors.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:r.LoaderErrors.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:o.default.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:o.default.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:o.default.CODEC_UNSUPPORTED}},{"../demux/demux-errors.js":16,"../io/loader.js":24}],35:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"}},{}],36:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return i(e,null,[{key:"getSilentFrame",value:function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}]),e}();n.default=r},{}],37:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return i(e,null,[{key:"init",value:function(){for(var t in e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=e.constants={};n.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),n.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),n.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),n.STSC=n.STCO=n.STTS,n.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),n.HDLR_VIDEO=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]),n.HDLR_AUDIO=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]),n.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),n.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(e){for(var t=8,n=null,i=Array.prototype.slice.call(arguments,1),r=i.length,a=0;a<r;a++)t+=i[a].byteLength;(n=new Uint8Array(t))[0]=t>>>24&255,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n.set(e,4);for(var o=8,s=0;s<r;s++)n.set(i[s],o),o+=i[s].byteLength;return n}},{key:"generateInitSegment",value:function(t){var n=e.box(e.types.ftyp,e.constants.FTYP),i=e.moov(t),r=new Uint8Array(n.byteLength+i.byteLength);return r.set(n,0),r.set(i,n.byteLength),r}},{key:"moov",value:function(t){var n=e.mvhd(t.timescale,t.duration),i=e.trak(t),r=e.mvex(t);return e.box(e.types.moov,n,i,r)}},{key:"mvhd",value:function(t,n){return e.box(e.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,n>>>24&255,n>>>16&255,n>>>8&255,255&n,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]))}},{key:"trak",value:function(t){return e.box(e.types.trak,e.tkhd(t),e.mdia(t))}},{key:"tkhd",value:function(t){var n=t.id,i=t.duration,r=t.presentWidth,a=t.presentHeight;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,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,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>>8&255,255&r,0,0,a>>>8&255,255&a,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t),e.hdlr(t),e.minf(t))}},{key:"mdhd",value:function(t){var n=t.timescale,i=t.duration;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,i>>>24&255,i>>>16&255,i>>>8&255,255&i,85,196,0,0]))}},{key:"hdlr",value:function(t){var n=null;return n="audio"===t.type?e.constants.HDLR_AUDIO:e.constants.HDLR_VIDEO,e.box(e.types.hdlr,n)}},{key:"minf",value:function(t){var n=null;return n="audio"===t.type?e.box(e.types.smhd,e.constants.SMHD):e.box(e.types.vmhd,e.constants.VMHD),e.box(e.types.minf,n,e.dinf(),e.stbl(t))}},{key:"dinf",value:function(){return e.box(e.types.dinf,e.box(e.types.dref,e.constants.DREF))}},{key:"stbl",value:function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.constants.STTS),e.box(e.types.stsc,e.constants.STSC),e.box(e.types.stsz,e.constants.STSZ),e.box(e.types.stco,e.constants.STCO))}},{key:"stsd",value:function(t){return"audio"===t.type?"mp3"===t.codec?e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp3(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp4a(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.avc1(t))}},{key:"mp3",value:function(t){var n=t.channelCount,i=t.audioSampleRate,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return e.box(e.types[".mp3"],r)}},{key:"mp4a",value:function(t){var n=t.channelCount,i=t.audioSampleRate,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return e.box(e.types.mp4a,r,e.esds(t))}},{key:"esds",value:function(t){var n=t.config||[],i=n.length,r=new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(n).concat([6,1,2]));return e.box(e.types.esds,r)}},{key:"avc1",value:function(t){var n=t.avcc,i=t.codecWidth,r=t.codecHeight,a=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,i>>>8&255,255&i,r>>>8&255,255&r,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return e.box(e.types.avc1,a,e.box(e.types.avcC,n))}},{key:"mvex",value:function(t){return e.box(e.types.mvex,e.trex(t))}},{key:"trex",value:function(t){var n=t.id,i=new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return e.box(e.types.trex,i)}},{key:"moof",value:function(t,n){return e.box(e.types.moof,e.mfhd(t.sequenceNumber),e.traf(t,n))}},{key:"mfhd",value:function(t){var n=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]);return e.box(e.types.mfhd,n)}},{key:"traf",value:function(t,n){var i=t.id,r=e.box(e.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),a=e.box(e.types.tfdt,new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),o=e.sdtp(t),s=e.trun(t,o.byteLength+16+16+8+16+8+8);return e.box(e.types.traf,r,a,s,o)}},{key:"sdtp",value:function(t){for(var n=t.samples||[],i=n.length,r=new Uint8Array(4+i),a=0;a<i;a++){var o=n[a].flags;r[a+4]=o.isLeading<<6|o.dependsOn<<4|o.isDependedOn<<2|o.hasRedundancy}return e.box(e.types.sdtp,r)}},{key:"trun",value:function(t,n){var i=t.samples||[],r=i.length,a=12+16*r,o=new Uint8Array(a);n+=8+a,o.set([0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0);for(var s=0;s<r;s++){var l=i[s].duration,u=i[s].size,c=i[s].flags,f=i[s].cts;o.set([l>>>24&255,l>>>16&255,l>>>8&255,255&l,u>>>24&255,u>>>16&255,u>>>8&255,255&u,c.isLeading<<2|c.dependsOn,c.isDependedOn<<6|c.hasRedundancy<<4|c.isNonSync,0,0,f>>>24&255,f>>>16&255,f>>>8&255,255&f],12+16*s)}return e.box(e.types.trun,o)}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}}]),e}();r.init(),n.default=r},{}],38:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=c(e("../utils/logger.js")),a=c(e("./mp4-generator.js")),o=c(e("./aac-silent.js")),s=c(e("../utils/browser.js")),l=e("../core/media-segment-info.js"),u=e("../utils/exception.js");function c(e){return e&&e.__esModule?e:{default:e}}var f=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.TAG="MP4Remuxer",this._config=t,this._isLive=!0===t.isLive,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new l.MediaSegmentInfoList("audio"),this._videoSegmentInfoList=new l.MediaSegmentInfoList("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!s.default.chrome||!(s.default.version.major<50||50===s.default.version.major&&s.default.version.build<2661)),this._fillSilentAfterSeek=s.default.msedge||s.default.msie,this._mp3UseMpegAudio=!s.default.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return i(e,[{key:"destroy",value:function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}},{key:"bindDataSource",value:function(e){return e.onDataAvailable=this.remux.bind(this),e.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(e){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(e,t){if(!this._onMediaSegment)throw new u.IllegalStateException("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(e,t),this._remuxVideo(t),this._remuxAudio(e)}},{key:"_onTrackMetadataReceived",value:function(e,t){var n=null,i="mp4",r=t.codec;if("audio"===e)this._audioMeta=t,"mp3"===t.codec&&this._mp3UseMpegAudio?(i="mpeg",r="",n=new Uint8Array):n=a.default.generateInitSegment(t);else{if("video"!==e)return;this._videoMeta=t,n=a.default.generateInitSegment(t)}if(!this._onInitSegment)throw new u.IllegalStateException("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(e,{type:e,data:n.buffer,codec:r,container:e+"/"+i,mediaDuration:t.duration})}},{key:"_calculateDtsBase",value:function(e,t){this._dtsBaseInited||(e.samples&&e.samples.length&&(this._audioDtsBase=e.samples[0].dts),t.samples&&t.samples.length&&(this._videoDtsBase=t.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}},{key:"flushStashedSamples",value:function(){var e=this._videoStashedLastSample,t=this._audioStashedLastSample,n={type:"video",id:1,sequenceNumber:0,samples:[],length:0};null!=e&&(n.samples.push(e),n.length=e.length);var i={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};null!=t&&(i.samples.push(t),i.length=t.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(n,!0),this._remuxAudio(i,!0)}},{key:"_remuxAudio",value:function(e,t){if(null!=this._audioMeta){var n,i=e,u=i.samples,c=void 0,f=-1,d=this._audioMeta.refSampleDuration,h="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,p=this._dtsBaseInited&&void 0===this._audioNextDts,v=!1;if(u&&0!==u.length&&(1!==u.length||t)){var g=0,m=null,y=0;h?(g=0,y=i.length):(g=8,y=8+i.length);var _=null;if(u.length>1&&(y-=(_=u.pop()).length),null!=this._audioStashedLastSample){var b=this._audioStashedLastSample;this._audioStashedLastSample=null,u.unshift(b),y+=b.length}null!=_&&(this._audioStashedLastSample=_);var S=u[0].dts-this._dtsBase;if(this._audioNextDts)c=S-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())c=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(v=!0);else{var w=this._audioSegmentInfoList.getLastSampleBefore(S);if(null!=w){var E=S-(w.originalDts+w.duration);E<=3&&(E=0),c=S-(w.dts+w.duration+E)}else c=0}if(v){var T=S-c,k=this._videoSegmentInfoList.getLastSegmentBefore(S);if(null!=k&&k.beginDts<T){var x=o.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(x){var L=k.beginDts,A=T-k.beginDts;r.default.v(this.TAG,"InsertPrefixSilentAudio: dts: "+L+", duration: "+A),u.unshift({unit:x,dts:L,pts:L}),y+=x.byteLength}}else v=!1}for(var C=[],R=0;R<u.length;R++){var D=u[R],O=D.unit,I=D.dts-this._dtsBase,P=I-c;-1===f&&(f=P);var M=0;M=R!==u.length-1?u[R+1].dts-this._dtsBase-c-P:null!=_?_.dts-this._dtsBase-c-P:C.length>=1?C[C.length-1].duration:Math.floor(d);var F=!1,B=null;if(M>1.5*d&&"mp3"!==this._audioMeta.codec&&this._fillAudioTimestampGap&&!s.default.safari){F=!0;var N=Math.abs(M-d),U=Math.ceil(N/d),j=P+d;r.default.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\ndts: "+(P+M)+" ms, expected: "+(P+Math.round(d))+" ms, delta: "+Math.round(N)+" ms, generate: "+U+" frames");var V=o.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);null==V&&(r.default.w(this.TAG,"Unable to generate silent frame for "+this._audioMeta.originalCodec+" with "+this._audioMeta.channelCount+" channels, repeat last frame"),V=O),B=[];for(var G=0;G<U;G++){var $=Math.round(j);if(B.length>0){var H=B[B.length-1];H.duration=$-H.dts}var W={dts:$,pts:$,cts:0,unit:V,size:V.byteLength,duration:0,originalDts:I,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};B.push(W),y+=W.size,j+=d}var K=B[B.length-1];K.duration=P+M-K.dts,M=Math.round(d)}C.push({dts:P,pts:P,cts:0,unit:D.unit,size:D.unit.byteLength,duration:M,originalDts:I,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),F&&C.push.apply(C,B)}h?m=new Uint8Array(y):((m=new Uint8Array(y))[0]=y>>>24&255,m[1]=y>>>16&255,m[2]=y>>>8&255,m[3]=255&y,m.set(a.default.types.mdat,4));for(var z=0;z<C.length;z++){var q=C[z].unit;m.set(q,g),g+=q.byteLength}var Y=C[C.length-1];n=Y.dts+Y.duration,this._audioNextDts=n;var X=new l.MediaSegmentInfo;X.beginDts=f,X.endDts=n,X.beginPts=f,X.endPts=n,X.originalBeginDts=C[0].originalDts,X.originalEndDts=Y.originalDts+Y.duration,X.firstSample=new l.SampleInfo(C[0].dts,C[0].pts,C[0].duration,C[0].originalDts,!1),X.lastSample=new l.SampleInfo(Y.dts,Y.pts,Y.duration,Y.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(X),i.samples=C,i.sequenceNumber++;var J=null;J=h?new Uint8Array:a.default.moof(i,f),i.samples=[],i.length=0;var Z={type:"audio",data:this._mergeBoxes(J,m).buffer,sampleCount:C.length,info:X};h&&p&&(Z.timestampOffset=f),this._onMediaSegment("audio",Z)}}}},{key:"_remuxVideo",value:function(e,t){if(null!=this._videoMeta){var n,i,r=e,o=r.samples,s=void 0,u=-1,c=-1;if(o&&0!==o.length&&(1!==o.length||t)){var f=8,d=null,h=8+e.length,p=null;if(o.length>1&&(h-=(p=o.pop()).length),null!=this._videoStashedLastSample){var v=this._videoStashedLastSample;this._videoStashedLastSample=null,o.unshift(v),h+=v.length}null!=p&&(this._videoStashedLastSample=p);var g=o[0].dts-this._dtsBase;if(this._videoNextDts)s=g-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())s=0;else{var m=this._videoSegmentInfoList.getLastSampleBefore(g);if(null!=m){var y=g-(m.originalDts+m.duration);y<=3&&(y=0),s=g-(m.dts+m.duration+y)}else s=0}for(var _=new l.MediaSegmentInfo,b=[],S=0;S<o.length;S++){var w=o[S],E=w.dts-this._dtsBase,T=w.isKeyframe,k=E-s,x=w.cts,L=k+x;-1===u&&(u=k,c=L);var A=0;if(A=S!==o.length-1?o[S+1].dts-this._dtsBase-s-k:null!=p?p.dts-this._dtsBase-s-k:b.length>=1?b[b.length-1].duration:Math.floor(this._videoMeta.refSampleDuration),T){var C=new l.SampleInfo(k,L,A,w.dts,!0);C.fileposition=w.fileposition,_.appendSyncPoint(C)}b.push({dts:k,pts:L,cts:x,units:w.units,size:w.length,isKeyframe:T,duration:A,originalDts:E,flags:{isLeading:0,dependsOn:T?2:1,isDependedOn:T?1:0,hasRedundancy:0,isNonSync:T?0:1}})}(d=new Uint8Array(h))[0]=h>>>24&255,d[1]=h>>>16&255,d[2]=h>>>8&255,d[3]=255&h,d.set(a.default.types.mdat,4);for(var R=0;R<b.length;R++)for(var D=b[R].units;D.length;){var O=D.shift().data;d.set(O,f),f+=O.byteLength}var I=b[b.length-1];if(n=I.dts+I.duration,i=I.pts+I.duration,this._videoNextDts=n,_.beginDts=u,_.endDts=n,_.beginPts=c,_.endPts=i,_.originalBeginDts=b[0].originalDts,_.originalEndDts=I.originalDts+I.duration,_.firstSample=new l.SampleInfo(b[0].dts,b[0].pts,b[0].duration,b[0].originalDts,b[0].isKeyframe),_.lastSample=new l.SampleInfo(I.dts,I.pts,I.duration,I.originalDts,I.isKeyframe),this._isLive||this._videoSegmentInfoList.append(_),r.samples=b,r.sequenceNumber++,this._forceFirstIDR){var P=b[0].flags;P.dependsOn=2,P.isNonSync=0}var M=a.default.moof(r,u);r.samples=[],r.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(M,d).buffer,sampleCount:b.length,info:_})}}}},{key:"_mergeBoxes",value:function(e,t){var n=new Uint8Array(e.byteLength+t.byteLength);return n.set(e,0),n.set(t,e.byteLength),n}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(e){this._onInitSegment=e}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(e){this._onMediaSegment=e}}]),e}();n.default=f},{"../core/media-segment-info.js":8,"../utils/browser.js":39,"../utils/exception.js":40,"../utils/logger.js":41,"./aac-silent.js":36,"./mp4-generator.js":37}],39:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i={};!function(){var e=self.navigator.userAgent.toLowerCase(),t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(e)||[],n=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(android)/.exec(e)||/(windows)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||[],r={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",majorVersion:t[4]||t[2]||"0",platform:n[0]||""},a={};if(r.browser){a[r.browser]=!0;var o=r.majorVersion.split(".");a.version={major:parseInt(r.majorVersion,10),string:r.version},o.length>1&&(a.version.minor=parseInt(o[1],10)),o.length>2&&(a.version.build=parseInt(o[2],10))}for(var s in r.platform&&(a[r.platform]=!0),(a.chrome||a.opr||a.safari)&&(a.webkit=!0),(a.rv||a.iemobile)&&(a.rv&&delete a.rv,r.browser="msie",a.msie=!0),a.edge&&(delete a.edge,r.browser="msedge",a.msedge=!0),a.opr&&(r.browser="opera",a.opera=!0),a.safari&&a.android&&(r.browser="android",a.android=!0),a.name=r.browser,a.platform=r.platform,i)i.hasOwnProperty(s)&&delete i[s];Object.assign(i,a)}(),n.default=i},{}],40:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=n.RuntimeException=function(){function e(t){o(this,e),this._message=t}return i(e,[{key:"toString",value:function(){return this.name+": "+this.message}},{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}}]),e}();n.IllegalStateException=function(e){function t(e){return o(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return a(t,e),i(t,[{key:"name",get:function(){return"IllegalStateException"}}]),t}(s),n.InvalidArgumentException=function(e){function t(e){return o(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return a(t,e),i(t,[{key:"name",get:function(){return"InvalidArgumentException"}}]),t}(s),n.NotImplementedException=function(e){function t(e){return o(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return a(t,e),i(t,[{key:"name",get:function(){return"NotImplementedException"}}]),t}(s)},{}],41:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=e("events"),o=(i=a)&&i.__esModule?i:{default:i},s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"e",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","error",i),e.ENABLE_ERROR&&(console.error?console.error(i):console.warn?console.warn(i):console.log(i))}},{key:"i",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","info",i),e.ENABLE_INFO&&(console.info?console.info(i):console.log(i))}},{key:"w",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","warn",i),e.ENABLE_WARN&&(console.warn?console.warn(i):console.log(i))}},{key:"d",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","debug",i),e.ENABLE_DEBUG&&(console.debug?console.debug(i):console.log(i))}},{key:"v",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","verbose",i),e.ENABLE_VERBOSE&&console.log(i)}}]),e}();s.GLOBAL_TAG="flv.js",s.FORCE_GLOBAL_TAG=!1,s.ENABLE_ERROR=!0,s.ENABLE_INFO=!0,s.ENABLE_WARN=!0,s.ENABLE_DEBUG=!0,s.ENABLE_VERBOSE=!0,s.ENABLE_CALLBACK=!1,s.emitter=new o.default,n.default=s},{events:2}],42:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=o(e("events")),a=o(e("./logger.js"));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return i(e,null,[{key:"getConfig",value:function(){return{globalTag:a.default.GLOBAL_TAG,forceGlobalTag:a.default.FORCE_GLOBAL_TAG,enableVerbose:a.default.ENABLE_VERBOSE,enableDebug:a.default.ENABLE_DEBUG,enableInfo:a.default.ENABLE_INFO,enableWarn:a.default.ENABLE_WARN,enableError:a.default.ENABLE_ERROR,enableCallback:a.default.ENABLE_CALLBACK}}},{key:"applyConfig",value:function(e){a.default.GLOBAL_TAG=e.globalTag,a.default.FORCE_GLOBAL_TAG=e.forceGlobalTag,a.default.ENABLE_VERBOSE=e.enableVerbose,a.default.ENABLE_DEBUG=e.enableDebug,a.default.ENABLE_INFO=e.enableInfo,a.default.ENABLE_WARN=e.enableWarn,a.default.ENABLE_ERROR=e.enableError,a.default.ENABLE_CALLBACK=e.enableCallback}},{key:"_notifyChange",value:function(){var t=e.emitter;if(t.listenerCount("change")>0){var n=e.getConfig();t.emit("change",n)}}},{key:"registerListener",value:function(t){e.emitter.addListener("change",t)}},{key:"removeListener",value:function(t){e.emitter.removeListener("change",t)}},{key:"addLogListener",value:function(t){a.default.emitter.addListener("log",t),a.default.emitter.listenerCount("log")>0&&(a.default.ENABLE_CALLBACK=!0,e._notifyChange())}},{key:"removeLogListener",value:function(t){a.default.emitter.removeListener("log",t),0===a.default.emitter.listenerCount("log")&&(a.default.ENABLE_CALLBACK=!1,e._notifyChange())}},{key:"forceGlobalTag",get:function(){return a.default.FORCE_GLOBAL_TAG},set:function(t){a.default.FORCE_GLOBAL_TAG=t,e._notifyChange()}},{key:"globalTag",get:function(){return a.default.GLOBAL_TAG},set:function(t){a.default.GLOBAL_TAG=t,e._notifyChange()}},{key:"enableAll",get:function(){return a.default.ENABLE_VERBOSE&&a.default.ENABLE_DEBUG&&a.default.ENABLE_INFO&&a.default.ENABLE_WARN&&a.default.ENABLE_ERROR},set:function(t){a.default.ENABLE_VERBOSE=t,a.default.ENABLE_DEBUG=t,a.default.ENABLE_INFO=t,a.default.ENABLE_WARN=t,a.default.ENABLE_ERROR=t,e._notifyChange()}},{key:"enableDebug",get:function(){return a.default.ENABLE_DEBUG},set:function(t){a.default.ENABLE_DEBUG=t,e._notifyChange()}},{key:"enableVerbose",get:function(){return a.default.ENABLE_VERBOSE},set:function(t){a.default.ENABLE_VERBOSE=t,e._notifyChange()}},{key:"enableInfo",get:function(){return a.default.ENABLE_INFO},set:function(t){a.default.ENABLE_INFO=t,e._notifyChange()}},{key:"enableWarn",get:function(){return a.default.ENABLE_WARN},set:function(t){a.default.ENABLE_WARN=t,e._notifyChange()}},{key:"enableError",get:function(){return a.default.ENABLE_ERROR},set:function(t){a.default.ENABLE_ERROR=t,e._notifyChange()}}]),e}();s.emitter=new r.default,n.default=s},{"./logger.js":41,events:2}],43:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}return i(t,null,[{key:"install",value:function(){Object.setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Object.assign=Object.assign||function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var r in i)i.hasOwnProperty(r)&&(t[r]=i[r])}return t},"function"!=typeof self.Promise&&e("es6-promise").polyfill()}}]),t}();r.install(),n.default=r},{"es6-promise":1}],44:[function(e,t,n){"use strict";function i(e,t,n){var i=e;if(t+n<i.length){for(;n--;)if(128!=(192&i[++t]))return!1;return!0}return!1}Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){for(var t=[],n=e,r=0,a=e.length;r<a;)if(n[r]<128)t.push(String.fromCharCode(n[r])),++r;else{if(n[r]<192);else if(n[r]<224){if(i(n,r,1)){var o=(31&n[r])<<6|63&n[r+1];if(o>=128){t.push(String.fromCharCode(65535&o)),r+=2;continue}}}else if(n[r]<240){if(i(n,r,2)){var s=(15&n[r])<<12|(63&n[r+1])<<6|63&n[r+2];if(s>=2048&&55296!=(63488&s)){t.push(String.fromCharCode(65535&s)),r+=3;continue}}}else if(n[r]<248&&i(n,r,3)){var l=(7&n[r])<<18|(63&n[r+1])<<12|(63&n[r+2])<<6|63&n[r+3];if(l>65536&&l<1114112){l-=65536,t.push(String.fromCharCode(l>>>10|55296)),t.push(String.fromCharCode(1023&l|56320)),r+=4;continue}}t.push(String.fromCharCode(65533)),++r}return t.join("")}},{}]},{},[21])(21)}).call(this,n(71))},function(e,t){e.exports=function(){}},function(e,t,n){var i,r,a,o=n(222),s=n(14),l=n(35),u=n(39),c=n(37),f=n(115),d=n(87),h=n(88),p=s.WeakMap;if(o){var v=f.state||(f.state=new p),g=v.get,m=v.has,y=v.set;i=function(e,t){return t.facade=e,y.call(v,e,t),t},r=function(e){return g.call(v,e)||{}},a=function(e){return m.call(v,e)}}else{var _=d("state");h[_]=!0,i=function(e,t){return t.facade=e,u(e,_,t),t},r=function(e){return c(e,_)?e[_]:{}},a=function(e){return c(e,_)}}e.exports={set:i,get:r,has:a,enforce:function(e){return a(e)?r(e):i(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var i=n(35);e.exports=function(e,t){if(!i(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var i=n(117),r=n(118),a=i("keys");e.exports=function(e){return a[e]||(a[e]=r(e))}},function(e,t){e.exports={}},function(e,t,n){var i=n(58);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var i=n(37),r=n(50),a=n(87),o=n(153),s=a("IE_PROTO"),l=Object.prototype;e.exports=o?Object.getPrototypeOf:function(e){return e=r(e),i(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},function(e,t,n){var i=n(124),r=n(70),a=n(16)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=i?r:function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),a))?n:o?r(t):"Object"==(i=r(t))&&"function"==typeof t.callee?"Arguments":i}},function(e,t,n){"use strict";var i=n(23);e.exports=function(e,t){var n=[][e];return!!n&&i((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t,n){var i=n(17),r=n(95).f,a=n(53),o=n(47),s=n(129),l=n(234),u=n(99);e.exports=function(e,t){var n,c,f,d,h,p=e.target,v=e.global,g=e.stat;if(n=v?i:g?i[p]||s(p,{}):(i[p]||{}).prototype)for(c in t){if(d=t[c],f=e.noTargetGet?(h=r(n,c))&&h.value:n[c],!u(v?c:p+(g?".":"#")+c,e.forced)&&void 0!==f){if(typeof d==typeof f)continue;l(d,f)}(e.sham||f&&f.sham)&&a(d,"sham",!0),o(n,c,d,e)}}},function(e,t,n){var i=n(44),r=n(232),a=n(126),o=n(75),s=n(127),l=n(41),u=n(161),c=Object.getOwnPropertyDescriptor;t.f=i?c:function(e,t){if(e=o(e),t=s(t,!0),u)try{return c(e,t)}catch(e){}if(l(e,t))return a(!r.f.call(e,t),e[t])}},function(e,t){e.exports=!1},function(e,t,n){var i=n(98),r=Math.min;e.exports=function(e){return e>0?r(i(e),9007199254740991):0}},function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},function(e,t,n){var i=n(31),r=/#|\.prototype\./,a=function(e,t){var n=s[o(e)];return n==u||n!=l&&("function"==typeof t?i(t):!!t)},o=a.normalize=function(e){return String(e).replace(r,".").toLowerCase()},s=a.data={},l=a.NATIVE="N",u=a.POLYFILL="P";e.exports=a},function(e,t,n){"use strict";var i,r,a=n(136),o=n(165),s=RegExp.prototype.exec,l=String.prototype.replace,u=s,c=(i=/a/,r=/b*/g,s.call(i,"a"),s.call(r,"a"),0!==i.lastIndex||0!==r.lastIndex),f=o.UNSUPPORTED_Y||o.BROKEN_CARET,d=void 0!==/()??/.exec("")[1];(c||d||f)&&(u=function(e){var t,n,i,r,o=this,u=f&&o.sticky,h=a.call(o),p=o.source,v=0,g=e;return u&&(-1===(h=h.replace("y","")).indexOf("g")&&(h+="g"),g=String(e).slice(o.lastIndex),o.lastIndex>0&&(!o.multiline||o.multiline&&"\n"!==e[o.lastIndex-1])&&(p="(?: "+p+")",g=" "+g,v++),n=new RegExp("^(?:"+p+")",h)),d&&(n=new RegExp("^"+p+"$(?!\\s)",h)),c&&(t=o.lastIndex),i=s.call(u?n:o,g),u?i?(i.input=i.input.slice(v),i[0]=i[0].slice(v),i.index=o.lastIndex,o.lastIndex+=i[0].length):o.lastIndex=0:c&&i&&(o.lastIndex=o.global?i.index+i[0].length:t),d&&i&&i.length>1&&l.call(i[0],n,(function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(i[r]=void 0)})),i}),e.exports=u},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){"use strict";var i=n(86),r=n(49),a=n(63);e.exports=function(e,t,n){var o=i(t);o in e?r.f(e,o,a(0,n)):e[o]=n}},function(e,t,n){var i,r,a=n(14),o=n(137),s=a.process,l=s&&s.versions,u=l&&l.v8;u?r=(i=u.split("."))[0]+i[1]:o&&(!(i=o.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=o.match(/Chrome\/(\d+)/))&&(r=i[1]),e.exports=r&&+r},function(e,t,n){var i=n(40),r=n(308),a=n(51),o=n(89),s=n(309),l=n(310),u=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,n){var c,f,d,h,p,v,g,m=n&&n.that,y=!(!n||!n.AS_ENTRIES),_=!(!n||!n.IS_ITERATOR),b=!(!n||!n.INTERRUPTED),S=o(t,m,1+y+b),w=function(e){return c&&l(c),new u(!0,e)},E=function(e){return y?(i(e),b?S(e[0],e[1],w):S(e[0],e[1])):b?S(e,w):S(e)};if(_)c=e;else{if("function"!=typeof(f=s(e)))throw TypeError("Target is not iterable");if(r(f)){for(d=0,h=a(e.length);h>d;d++)if((p=E(e[d]))&&p instanceof u)return p;return new u(!1)}c=f.call(e)}for(v=c.next;!(g=v.call(c)).done;){try{p=E(g.value)}catch(e){throw l(c),e}if("object"==typeof p&&p&&p instanceof u)return p}return new u(!1)}},function(e,t,n){var i=n(70),r=n(14);e.exports="process"==i(r.process)},function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},function(e,t){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(e,t,n){e.exports=n(347)},function(e,t,n){e.exports=n(357)},function(e,t,n){"use strict";(function(e){var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,i){return e[0]===t&&(n=i,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),i=this.__entries__[n];return i&&i[1]},t.prototype.set=function(t,n){var i=e(this.__entries__,t);~i?this.__entries__[i][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,i=e(n,t);~i&&n.splice(i,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,i=this.__entries__;n<i.length;n++){var r=i[n];e.call(t,r[1],r[0])}},t}()}(),i="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,r=void 0!==e&&e.Math===Math?e:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),a="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(r):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var o=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,l=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,i=!1,r=0;function o(){n&&(n=!1,e()),i&&l()}function s(){a(o)}function l(){var e=Date.now();if(n){if(e-r<2)return;i=!0}else n=!0,i=!1,setTimeout(s,t);r=e}return l}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){i&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){i&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;o.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),u=function(e,t){for(var n=0,i=Object.keys(t);n<i.length;n++){var r=i[n];Object.defineProperty(e,r,{value:t[r],enumerable:!1,writable:!1,configurable:!0})}return e},c=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||r},f=m(0,0,0,0);function d(e){return parseFloat(e)||0}function h(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+d(e["border-"+n+"-width"])}),0)}function p(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return f;var i=c(e).getComputedStyle(e),r=function(e){for(var t={},n=0,i=["top","right","bottom","left"];n<i.length;n++){var r=i[n],a=e["padding-"+r];t[r]=d(a)}return t}(i),a=r.left+r.right,o=r.top+r.bottom,s=d(i.width),l=d(i.height);if("border-box"===i.boxSizing&&(Math.round(s+a)!==t&&(s-=h(i,"left","right")+a),Math.round(l+o)!==n&&(l-=h(i,"top","bottom")+o)),!function(e){return e===c(e).document.documentElement}(e)){var u=Math.round(s+a)-t,p=Math.round(l+o)-n;1!==Math.abs(u)&&(s-=u),1!==Math.abs(p)&&(l-=p)}return m(r.left,r.top,s,l)}var v="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof c(e).SVGGraphicsElement}:function(e){return e instanceof c(e).SVGElement&&"function"==typeof e.getBBox};function g(e){return i?v(e)?function(e){var t=e.getBBox();return m(0,0,t.width,t.height)}(e):p(e):f}function m(e,t,n,i){return{x:e,y:t,width:n,height:i}}var y=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=m(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=g(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),_=function(e,t){var n,i,r,a,o,s,l,c=(i=(n=t).x,r=n.y,a=n.width,o=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(s.prototype),u(l,{x:i,y:r,width:a,height:o,top:r,right:i+a,bottom:o+r,left:i}),l);u(this,{target:e,contentRect:c})},b=function(){function e(e,t,i){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=i}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new y(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new _(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),S="undefined"!=typeof WeakMap?new WeakMap:new n,w=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=l.getInstance(),i=new b(t,n,this);S.set(this,i)};["observe","unobserve","disconnect"].forEach((function(e){w.prototype[e]=function(){var t;return(t=S.get(this))[e].apply(t,arguments)}}));var E=void 0!==r.ResizeObserver?r.ResizeObserver:w;t.a=E}).call(this,n(71))},function(e,t,n){e.exports=n(411)},function(e,t,n){var i;"undefined"!=typeof window&&(i=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":
18/*!*********************************************!*\
19 !*** ./node_modules/eventemitter3/index.js ***!
20 \*********************************************/
21/*! no static exports found */
22/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var i=Object.prototype.hasOwnProperty,r="~";function a(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,n,i,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,i||e,a),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function l(e,t){0==--e._eventsCount?e._events=new a:delete e._events[t]}function u(){this._events=new a,this._eventsCount=0}Object.create&&(a.prototype=Object.create(null),(new a).__proto__||(r=!1)),u.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)i.call(e,t)&&n.push(r?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},u.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=new Array(a);i<a;i++)o[i]=n[i].fn;return o},u.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},u.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(u=1,l=new Array(f-1);u<f;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var d,h=c.length;for(u=0;u<h;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),f){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,n);break;case 4:c[u].fn.call(c[u].context,t,n,i);break;default:if(!l)for(d=1,l=new Array(f-1);d<f;d++)l[d-1]=arguments[d];c[u].fn.apply(c[u].context,l)}}return!0},u.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},u.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},u.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return l(this,a),this;var o=this._events[a];if(o.fn)o.fn!==t||i&&!o.once||n&&o.context!==n||l(this,a);else{for(var s=0,u=[],c=o.length;s<c;s++)(o[s].fn!==t||i&&!o[s].once||n&&o[s].context!==n)&&u.push(o[s]);u.length?this._events[a]=1===u.length?u[0]:u:l(this,a)}return this},u.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&l(this,t)):(this._events=new a,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,e.exports=u},"./node_modules/url-toolkit/src/url-toolkit.js":
23/*!*****************************************************!*\
24 !*** ./node_modules/url-toolkit/src/url-toolkit.js ***!
25 \*****************************************************/
26/*! no static exports found */
27/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var i,r,a,o,s;i=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#.*)?$/,r=/^([^\/?#]*)(.*)$/,a=/(?:\/|^)\.(?=\/)/g,o=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var i=s.parseURL(e);if(!i)throw new Error("Error trying to parse base URL.");return i.path=s.normalizePath(i.path),s.buildURLFromParts(i)}var a=s.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return n.alwaysNormalize?(a.path=s.normalizePath(a.path),s.buildURLFromParts(a)):t;var o=s.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 u={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(u.netLoc=o.netLoc,"/"!==a.path[0]))if(a.path){var c=o.path,f=c.substring(0,c.lastIndexOf("/")+1)+a.path;u.path=s.normalizePath(f)}else u.path=o.path,a.params||(u.params=o.params,a.query||(u.query=o.query));return null===u.path&&(u.path=n.alwaysNormalize?s.normalizePath(a.path):a.path),s.buildURLFromParts(u)},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){for(e=e.split("").reverse().join("").replace(a,"");e.length!==(e=e.replace(o,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=s},"./node_modules/webworkify-webpack/index.js":
28/*!**************************************************!*\
29 !*** ./node_modules/webworkify-webpack/index.js ***!
30 \**************************************************/
31/*! no static exports found */
32/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){function i(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n.oe=function(e){throw console.error(e),e};var i=n(n.s=ENTRY_MODULE);return i.default||i}function r(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function a(e,t,i){var a={};a[i]=[];var o=t.toString(),s=o.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return a;for(var l,u=s[1],c=new RegExp("(\\\\n|\\W)"+r(u)+"\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)","g");l=c.exec(o);)"dll-reference"!==l[3]&&a[i].push(l[3]);for(c=new RegExp("\\("+r(u)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)',"g");l=c.exec(o);)e[l[2]]||(a[i].push(l[1]),e[l[2]]=n(l[1]).m),a[l[2]]=a[l[2]]||[],a[l[2]].push(l[4]);for(var f,d=Object.keys(a),h=0;h<d.length;h++)for(var p=0;p<a[d[h]].length;p++)f=a[d[h]][p],isNaN(1*f)||(a[d[h]][p]=1*a[d[h]][p]);return a}function o(e){return Object.keys(e).reduce((function(t,n){return t||e[n].length>0}),!1)}e.exports=function(e,t){t=t||{};var r={main:n.m},s=t.all?{main:Object.keys(r.main)}:function(e,t){for(var n={main:[t]},i={main:[]},r={main:{}};o(n);)for(var s=Object.keys(n),l=0;l<s.length;l++){var u=s[l],c=n[u].pop();if(r[u]=r[u]||{},!r[u][c]&&e[u][c]){r[u][c]=!0,i[u]=i[u]||[],i[u].push(c);for(var f=a(e,e[u][c],u),d=Object.keys(f),h=0;h<d.length;h++)n[d[h]]=n[d[h]]||[],n[d[h]]=n[d[h]].concat(f[d[h]])}}return i}(r,e),l="";Object.keys(s).filter((function(e){return"main"!==e})).forEach((function(e){for(var t=0;s[e][t];)t++;s[e].push(t),r[e][t]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",l=l+"var "+e+" = ("+i.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+s[e].map((function(t){return JSON.stringify(t)+": "+r[e][t].toString()})).join(",")+"});\n"})),l=l+"new (("+i.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+s.main.map((function(e){return JSON.stringify(e)+": "+r.main[e].toString()})).join(",")+"}))(self);";var u=new window.Blob([l],{type:"text/javascript"});if(t.bare)return u;var c=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(u),f=new window.Worker(c);return f.objectURL=c,f}},"./src/crypt/decrypter.js":
33/*!********************************************!*\
34 !*** ./src/crypt/decrypter.js + 3 modules ***!
35 \********************************************/
36/*! exports provided: default */
37/*! ModuleConcatenation bailout: Cannot concat with ./src/errors.ts because of ./src/hls.ts */
38/*! ModuleConcatenation bailout: Cannot concat with ./src/events.js because of ./src/hls.ts */
39/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/get-self-scope.js because of ./src/hls.ts */
40/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/logger.js because of ./src/hls.ts */function(e,t,n){"use strict";n.r(t);var i=function(){function e(e,t){this.subtle=e,this.aesIV=t}return e.prototype.decrypt=function(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)},e}(),r=function(){function e(e,t){this.subtle=e,this.key=t}return e.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},e}(),a=function(){function e(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}var t=e.prototype;return t.uint8ArrayToUint32Array_=function(e){for(var t=new DataView(e),n=new Uint32Array(4),i=0;i<4;i++)n[i]=t.getUint32(4*i);return n},t.initTable=function(){var e=this.sBox,t=this.invSBox,n=this.subMix,i=n[0],r=n[1],a=n[2],o=n[3],s=this.invSubMix,l=s[0],u=s[1],c=s[2],f=s[3],d=new Uint32Array(256),h=0,p=0,v=0;for(v=0;v<256;v++)d[v]=v<128?v<<1:v<<1^283;for(v=0;v<256;v++){var g=p^p<<1^p<<2^p<<3^p<<4;g=g>>>8^255&g^99,e[h]=g,t[g]=h;var m=d[h],y=d[m],_=d[y],b=257*d[g]^16843008*g;i[h]=b<<24|b>>>8,r[h]=b<<16|b>>>16,a[h]=b<<8|b>>>24,o[h]=b,b=16843009*_^65537*y^257*m^16843008*h,l[g]=b<<24|b>>>8,u[g]=b<<16|b>>>16,c[g]=b<<8|b>>>24,f[g]=b,h?(h=m^d[d[d[_^m]]],p^=d[d[p]]):h=p=1}},t.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),n=!0,i=0;i<t.length&&n;)n=t[i]===this.key[i],i++;if(!n){this.key=t;var r=this.keySize=t.length;if(4!==r&&6!==r&&8!==r)throw new Error("Invalid aes key size="+r);var a,o,s,l,u=this.ksRows=4*(r+6+1),c=this.keySchedule=new Uint32Array(u),f=this.invKeySchedule=new Uint32Array(u),d=this.sBox,h=this.rcon,p=this.invSubMix,v=p[0],g=p[1],m=p[2],y=p[3];for(a=0;a<u;a++)a<r?s=c[a]=t[a]:(l=s,a%r==0?(l=d[(l=l<<8|l>>>24)>>>24]<<24|d[l>>>16&255]<<16|d[l>>>8&255]<<8|d[255&l],l^=h[a/r|0]<<24):r>6&&a%r==4&&(l=d[l>>>24]<<24|d[l>>>16&255]<<16|d[l>>>8&255]<<8|d[255&l]),c[a]=s=(c[a-r]^l)>>>0);for(o=0;o<u;o++)a=u-o,l=3&o?c[a]:c[a-4],f[o]=o<4||a<=4?l:v[d[l>>>24]]^g[d[l>>>16&255]]^m[d[l>>>8&255]]^y[d[255&l]],f[o]=f[o]>>>0}},t.networkToHostOrderSwap=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},t.decrypt=function(e,t,n,i){for(var r,a,o,s,l,u,c,f,d,h,p,v,g,m,y,_,b,S=this.keySize+6,w=this.invKeySchedule,E=this.invSBox,T=this.invSubMix,k=T[0],x=T[1],L=T[2],A=T[3],C=this.uint8ArrayToUint32Array_(n),R=C[0],D=C[1],O=C[2],I=C[3],P=new Int32Array(e),M=new Int32Array(P.length),F=this.networkToHostOrderSwap;t<P.length;){for(d=F(P[t]),h=F(P[t+1]),p=F(P[t+2]),v=F(P[t+3]),l=d^w[0],u=v^w[1],c=p^w[2],f=h^w[3],g=4,m=1;m<S;m++)r=k[l>>>24]^x[u>>16&255]^L[c>>8&255]^A[255&f]^w[g],a=k[u>>>24]^x[c>>16&255]^L[f>>8&255]^A[255&l]^w[g+1],o=k[c>>>24]^x[f>>16&255]^L[l>>8&255]^A[255&u]^w[g+2],s=k[f>>>24]^x[l>>16&255]^L[u>>8&255]^A[255&c]^w[g+3],l=r,u=a,c=o,f=s,g+=4;r=E[l>>>24]<<24^E[u>>16&255]<<16^E[c>>8&255]<<8^E[255&f]^w[g],a=E[u>>>24]<<24^E[c>>16&255]<<16^E[f>>8&255]<<8^E[255&l]^w[g+1],o=E[c>>>24]<<24^E[f>>16&255]<<16^E[l>>8&255]<<8^E[255&u]^w[g+2],s=E[f>>>24]<<24^E[l>>16&255]<<16^E[u>>8&255]<<8^E[255&c]^w[g+3],g+=3,M[t]=F(r^R),M[t+1]=F(s^D),M[t+2]=F(o^O),M[t+3]=F(a^I),R=d,D=h,O=p,I=v,t+=4}return i?(y=M.buffer,_=y.byteLength,(b=_&&new DataView(y).getUint8(_-1))?y.slice(0,_-b):y):M.buffer},t.destroy=function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0},e}(),o=n("./src/errors.ts"),s=n("./src/utils/logger.js"),l=n("./src/events.js"),u=n("./src/utils/get-self-scope.js"),c=Object(u.getSelfScope)(),f=function(){function e(e,t,n){var i=(void 0===n?{}:n).removePKCS7Padding,r=void 0===i||i;if(this.logEnabled=!0,this.observer=e,this.config=t,this.removePKCS7Padding=r,r)try{var a=c.crypto;a&&(this.subtle=a.subtle||a.webkitSubtle)}catch(e){}this.disableWebCrypto=!this.subtle}var t=e.prototype;return t.isSync=function(){return this.disableWebCrypto&&this.config.enableSoftwareAES},t.decrypt=function(e,t,n,o){var l=this;if(this.disableWebCrypto&&this.config.enableSoftwareAES){this.logEnabled&&(s.logger.log("JS AES decrypt"),this.logEnabled=!1);var u=this.decryptor;u||(this.decryptor=u=new a),u.expandKey(t),o(u.decrypt(e,0,n,this.removePKCS7Padding))}else{this.logEnabled&&(s.logger.log("WebCrypto AES decrypt"),this.logEnabled=!1);var c=this.subtle;this.key!==t&&(this.key=t,this.fastAesKey=new r(c,t)),this.fastAesKey.expandKey().then((function(r){new i(c,n).decrypt(e,r).catch((function(i){l.onWebCryptoError(i,e,t,n,o)})).then((function(e){o(e)}))})).catch((function(i){l.onWebCryptoError(i,e,t,n,o)}))}},t.onWebCryptoError=function(e,t,n,i,r){this.config.enableSoftwareAES?(s.logger.log("WebCrypto Error, disable WebCrypto API"),this.disableWebCrypto=!0,this.logEnabled=!0,this.decrypt(t,n,i,r)):(s.logger.error("decrypting error : "+e.message),this.observer.trigger(l.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.FRAG_DECRYPT_ERROR,fatal:!0,reason:e.message}))},t.destroy=function(){var e=this.decryptor;e&&(e.destroy(),this.decryptor=void 0)},e}();t.default=f},"./src/demux/demuxer-inline.js":
41/*!**************************************************!*\
42 !*** ./src/demux/demuxer-inline.js + 12 modules ***!
43 \**************************************************/
44/*! exports provided: default */
45/*! ModuleConcatenation bailout: Cannot concat with ./src/crypt/decrypter.js because of ./src/hls.ts */
46/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/id3.js because of ./src/hls.ts */
47/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/mp4demuxer.js because of ./src/hls.ts */
48/*! ModuleConcatenation bailout: Cannot concat with ./src/errors.ts because of ./src/hls.ts */
49/*! ModuleConcatenation bailout: Cannot concat with ./src/events.js because of ./src/hls.ts */
50/*! ModuleConcatenation bailout: Cannot concat with ./src/polyfills/number.js because of ./src/hls.ts */
51/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/get-self-scope.js because of ./src/hls.ts */
52/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/logger.js because of ./src/hls.ts */function(e,t,n){"use strict";n.r(t);var i=n("./src/events.js"),r=n("./src/errors.ts"),a=n("./src/crypt/decrypter.js"),o=n("./src/polyfills/number.js"),s=n("./src/utils/logger.js"),l=n("./src/utils/get-self-scope.js");function u(e,t){return 255===e[t]&&240==(246&e[t+1])}function c(e,t){return 1&e[t+1]?7:9}function f(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function d(e,t){return!!(t+1<e.length&&u(e,t))}function h(e,t){if(d(e,t)){var n=c(e,t);if(t+n>=e.length)return!1;var i=f(e,t);if(i<=n)return!1;var r=t+i;if(r===e.length||r+1<e.length&&u(e,r))return!0}return!1}function p(e,t,n,a,o){if(!e.samplerate){var l=function(e,t,n,a){var o,l,u,c,f,d=navigator.userAgent.toLowerCase(),h=a,p=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];if(o=1+((192&t[n+2])>>>6),!((l=(60&t[n+2])>>>2)>p.length-1))return c=(1&t[n+2])<<2,c|=(192&t[n+3])>>>6,s.logger.log("manifest codec:"+a+",ADTS data:type:"+o+",sampleingIndex:"+l+"["+p[l]+"Hz],channelConfig:"+c),/firefox/i.test(d)?l>=6?(o=5,f=new Array(4),u=l-3):(o=2,f=new Array(2),u=l):-1!==d.indexOf("android")?(o=2,f=new Array(2),u=l):(o=5,f=new Array(4),a&&(-1!==a.indexOf("mp4a.40.29")||-1!==a.indexOf("mp4a.40.5"))||!a&&l>=6?u=l-3:((a&&-1!==a.indexOf("mp4a.40.2")&&(l>=6&&1===c||/vivaldi/i.test(d))||!a&&1===c)&&(o=2,f=new Array(2)),u=l)),f[0]=o<<3,f[0]|=(14&l)>>1,f[1]|=(1&l)<<7,f[1]|=c<<3,5===o&&(f[1]|=(14&u)>>1,f[2]=(1&u)<<7,f[2]|=8,f[3]=0),{config:f,samplerate:p[l],channelCount:c,codec:"mp4a.40."+o,manifestCodec:h};e.trigger(i.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+l})}(t,n,a,o);e.config=l.config,e.samplerate=l.samplerate,e.channelCount=l.channelCount,e.codec=l.codec,e.manifestCodec=l.manifestCodec,s.logger.log("parsed codec:"+e.codec+",rate:"+l.samplerate+",nb channel:"+l.channelCount)}}function v(e){return 9216e4/e}function g(e,t,n,i,r){var a=function(e,t,n,i,r){var a,o,s=e.length;if(a=c(e,t),o=f(e,t),(o-=a)>0&&t+a+o<=s)return{headerLength:a,frameLength:o,stamp:n+i*r}}(t,n,i,r,v(e.samplerate));if(a){var o=a.stamp,s=a.headerLength,l=a.frameLength,u={unit:t.subarray(n+s,n+s+l),pts:o,dts:o};return e.samples.push(u),{sample:u,length:l+s}}}var m=n("./src/demux/id3.js"),y=function(){function e(e,t,n){this.observer=e,this.config=n,this.remuxer=t}var t=e.prototype;return t.resetInitSegment=function(e,t,n,i){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:t,duration:i,inputTimeScale:9e4}},t.resetTimeStamp=function(){},e.probe=function(e){if(!e)return!1;for(var t=(m.default.getID3Data(e,0)||[]).length,n=e.length;t<n;t++)if(h(e,t))return s.logger.log("ADTS sync word found !"),!0;return!1},t.append=function(e,t,n,i){for(var r=this._audioTrack,a=m.default.getID3Data(e,0)||[],l=m.default.getTimeStamp(a),u=Object(o.isFiniteNumber)(l)?90*l:9e4*t,c=0,f=u,h=e.length,v=a.length,y=[{pts:f,dts:f,data:a}];v<h-1;)if(d(e,v)&&v+5<h){p(r,this.observer,e,v,r.manifestCodec);var _=g(r,e,v,u,c);if(!_){s.logger.log("Unable to parse AAC frame");break}v+=_.length,f=_.sample.pts,c++}else m.default.isHeader(e,v)?(a=m.default.getID3Data(e,v),y.push({pts:f,dts:f,data:a}),v+=a.length):v++;this.remuxer.remux(r,{samples:[]},{samples:y,inputTimeScale:9e4},{samples:[]},t,n,i)},t.destroy=function(){},e}(),_=n("./src/demux/mp4demuxer.js"),b={BitratesMap:[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],SamplingRateMap:[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],SamplesCoefficients:[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BytesInSlot:[0,1,1,4],appendFrame:function(e,t,n,i,r){if(!(n+24>t.length)){var a=this.parseHeader(t,n);if(a&&n+a.frameLength<=t.length){var o=i+r*(9e4*a.samplesPerFrame/a.sampleRate),s={unit:t.subarray(n,n+a.frameLength),pts:o,dts:o};return e.config=[],e.channelCount=a.channelCount,e.samplerate=a.sampleRate,e.samples.push(s),{sample:s,length:a.frameLength}}}},parseHeader:function(e,t){var n=e[t+1]>>3&3,i=e[t+1]>>1&3,r=e[t+2]>>4&15,a=e[t+2]>>2&3,o=e[t+2]>>1&1;if(1!==n&&0!==r&&15!==r&&3!==a){var s=3===n?3-i:3===i?3:4,l=1e3*b.BitratesMap[14*s+r-1],u=3===n?0:2===n?1:2,c=b.SamplingRateMap[3*u+a],f=e[t+3]>>6==3?1:2,d=b.SamplesCoefficients[n][i],h=b.BytesInSlot[i],p=8*d*h;return{sampleRate:c,channelCount:f,frameLength:parseInt(d*l/c+o,10)*h,samplesPerFrame:p}}},isHeaderPattern:function(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])},isHeader:function(e,t){return!!(t+1<e.length&&this.isHeaderPattern(e,t))},probe:function(e,t){if(t+1<e.length&&this.isHeaderPattern(e,t)){var n=this.parseHeader(e,t),i=4;n&&n.frameLength&&(i=n.frameLength);var r=t+i;if(r===e.length||r+1<e.length&&this.isHeaderPattern(e,r))return!0}return!1}},S=b,w=function(){function e(e){this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}var t=e.prototype;return t.loadWord=function(){var e=this.data,t=this.bytesAvailable,n=e.byteLength-t,i=new Uint8Array(4),r=Math.min(4,t);if(0===r)throw new Error("no bytes available");i.set(e.subarray(n,n+r)),this.word=new DataView(i.buffer).getUint32(0),this.bitsAvailable=8*r,this.bytesAvailable-=r},t.skipBits=function(e){var t;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},t.readBits=function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;return e>32&&s.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),(t=e-t)>0&&this.bitsAvailable?n<<t|this.readBits(t):n},t.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if(0!=(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},t.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.skipEG=function(){this.skipBits(1+this.skipLZ())},t.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},t.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},t.readBoolean=function(){return 1===this.readBits(1)},t.readUByte=function(){return this.readBits(8)},t.readUShort=function(){return this.readBits(16)},t.readUInt=function(){return this.readBits(32)},t.skipScalingList=function(e){var t,n=8,i=8;for(t=0;t<e;t++)0!==i&&(i=(n+this.readEG()+256)%256),n=0===i?n:i},t.readSPS=function(){var e,t,n,i,r,a,o,s=0,l=0,u=0,c=0,f=this.readUByte.bind(this),d=this.readBits.bind(this),h=this.readUEG.bind(this),p=this.readBoolean.bind(this),v=this.skipBits.bind(this),g=this.skipEG.bind(this),m=this.skipUEG.bind(this),y=this.skipScalingList.bind(this);if(f(),e=f(),d(5),v(3),f(),m(),100===e||110===e||122===e||244===e||44===e||83===e||86===e||118===e||128===e){var _=h();if(3===_&&v(1),m(),m(),v(1),p())for(a=3!==_?8:12,o=0;o<a;o++)p()&&y(o<6?16:64)}m();var b=h();if(0===b)h();else if(1===b)for(v(1),g(),g(),t=h(),o=0;o<t;o++)g();m(),v(1),n=h(),i=h(),0===(r=d(1))&&v(1),v(1),p()&&(s=h(),l=h(),u=h(),c=h());var S=[1,1];if(p()&&p())switch(f()){case 1:S=[1,1];break;case 2:S=[12,11];break;case 3:S=[10,11];break;case 4:S=[16,11];break;case 5:S=[40,33];break;case 6:S=[24,11];break;case 7:S=[20,11];break;case 8:S=[32,11];break;case 9:S=[80,33];break;case 10:S=[18,11];break;case 11:S=[15,11];break;case 12:S=[64,33];break;case 13:S=[160,99];break;case 14:S=[4,3];break;case 15:S=[3,2];break;case 16:S=[2,1];break;case 255:S=[f()<<8|f(),f()<<8|f()]}return{width:Math.ceil(16*(n+1)-2*s-2*l),height:(2-r)*(i+1)*16-(r?2:4)*(u+c),pixelRatio:S}},t.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},e}(),E=function(){function e(e,t,n,i){this.decryptdata=n,this.discardEPB=i,this.decrypter=new a.default(e,t,{removePKCS7Padding:!1})}var t=e.prototype;return t.decryptBuffer=function(e,t){this.decrypter.decrypt(e,this.decryptdata.key.buffer,this.decryptdata.iv.buffer,t)},t.decryptAacSample=function(e,t,n,i){var r=e[t].unit,a=r.subarray(16,r.length-r.length%16),o=a.buffer.slice(a.byteOffset,a.byteOffset+a.length),s=this;this.decryptBuffer(o,(function(a){a=new Uint8Array(a),r.set(a,16),i||s.decryptAacSamples(e,t+1,n)}))},t.decryptAacSamples=function(e,t,n){for(;;t++){if(t>=e.length)return void n();if(!(e[t].unit.length<32)){var i=this.decrypter.isSync();if(this.decryptAacSample(e,t,n,i),!i)return}}},t.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,n=new Int8Array(t),i=0,r=32;r<=e.length-16;r+=160,i+=16)n.set(e.subarray(r,r+16),i);return n},t.getAvcDecryptedUnit=function(e,t){t=new Uint8Array(t);for(var n=0,i=32;i<=e.length-16;i+=160,n+=16)e.set(t.subarray(n,n+16),i);return e},t.decryptAvcSample=function(e,t,n,i,r,a){var o=this.discardEPB(r.data),s=this.getAvcEncryptedData(o),l=this;this.decryptBuffer(s.buffer,(function(s){r.data=l.getAvcDecryptedUnit(o,s),a||l.decryptAvcSamples(e,t,n+1,i)}))},t.decryptAvcSamples=function(e,t,n,i){for(;;t++,n=0){if(t>=e.length)return void i();for(var r=e[t].units;!(n>=r.length);n++){var a=r[n];if(!(a.data.length<=48||1!==a.type&&5!==a.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(e,t,n,i,a,o),!o)return}}}},e}(),T={video:1,audio:2,id3:3,text:4},k=function(){function e(e,t,n,i){this.observer=e,this.config=n,this.typeSupported=i,this.remuxer=t,this.sampleAes=null,this.pmtUnknownTypes={}}var t=e.prototype;return t.setDecryptData=function(e){null!=e&&null!=e.key&&"SAMPLE-AES"===e.method?this.sampleAes=new E(this.observer,this.config,e,this.discardEPB):this.sampleAes=null},e.probe=function(t){var n=e._syncOffset(t);return!(n<0||(n&&s.logger.warn("MPEG2-TS detected but first sync word found @ offset "+n+", junk ahead ?"),0))},e._syncOffset=function(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(71===e[n]&&71===e[n+188]&&71===e[n+376])return n;n++}return-1},e.createTrack=function(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:T[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:"video"===e?0:void 0,isAAC:"audio"===e||void 0,duration:"audio"===e?t:void 0}},t.resetInitSegment=function(t,n,i,r){this.pmtParsed=!1,this._pmtId=-1,this.pmtUnknownTypes={},this._avcTrack=e.createTrack("video",r),this._audioTrack=e.createTrack("audio",r),this._id3Track=e.createTrack("id3",r),this._txtTrack=e.createTrack("text",r),this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=n,this.videoCodec=i,this._duration=r},t.resetTimeStamp=function(){},t.append=function(t,n,a,o){var l,u,c,f,d,h=t.length,p=!1;this.pmtUnknownTypes={},this.contiguous=a;var v=this.pmtParsed,g=this._avcTrack,m=this._audioTrack,y=this._id3Track,_=g.pid,b=m.pid,S=y.pid,w=this._pmtId,E=g.pesData,T=m.pesData,k=y.pesData,x=this._parsePAT,L=this._parsePMT.bind(this),A=this._parsePES,C=this._parseAVCPES.bind(this),R=this._parseAACPES.bind(this),D=this._parseMPEGPES.bind(this),O=this._parseID3PES.bind(this),I=e._syncOffset(t);for(h-=(h+I)%188,l=I;l<h;l+=188)if(71===t[l]){if(u=!!(64&t[l+1]),c=((31&t[l+1])<<8)+t[l+2],(48&t[l+3])>>4>1){if((f=l+5+t[l+4])===l+188)continue}else f=l+4;switch(c){case _:u&&(E&&(d=A(E))&&C(d,!1),E={data:[],size:0}),E&&(E.data.push(t.subarray(f,l+188)),E.size+=l+188-f);break;case b:u&&(T&&(d=A(T))&&(m.isAAC?R(d):D(d)),T={data:[],size:0}),T&&(T.data.push(t.subarray(f,l+188)),T.size+=l+188-f);break;case S:u&&(k&&(d=A(k))&&O(d),k={data:[],size:0}),k&&(k.data.push(t.subarray(f,l+188)),k.size+=l+188-f);break;case 0:u&&(f+=t[f]+1),w=this._pmtId=x(t,f);break;case w:u&&(f+=t[f]+1);var P=L(t,f,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);(_=P.avc)>0&&(g.pid=_),(b=P.audio)>0&&(m.pid=b,m.isAAC=P.isAAC),(S=P.id3)>0&&(y.pid=S),p&&!v&&(s.logger.log("reparse from beginning"),p=!1,l=I-188),v=this.pmtParsed=!0;break;case 17:case 8191:break;default:p=!0}}else this.observer.trigger(i.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});E&&(d=A(E))?(C(d,!0),g.pesData=null):g.pesData=E,T&&(d=A(T))?(m.isAAC?R(d):D(d),m.pesData=null):(T&&T.size&&s.logger.log("last AAC PES packet truncated,might overlap between fragments"),m.pesData=T),k&&(d=A(k))?(O(d),y.pesData=null):y.pesData=k,null==this.sampleAes?this.remuxer.remux(m,g,y,this._txtTrack,n,a,o):this.decryptAndRemux(m,g,y,this._txtTrack,n,a,o)},t.decryptAndRemux=function(e,t,n,i,r,a,o){if(e.samples&&e.isAAC){var s=this;this.sampleAes.decryptAacSamples(e.samples,0,(function(){s.decryptAndRemuxAvc(e,t,n,i,r,a,o)}))}else this.decryptAndRemuxAvc(e,t,n,i,r,a,o)},t.decryptAndRemuxAvc=function(e,t,n,i,r,a,o){if(t.samples){var s=this;this.sampleAes.decryptAvcSamples(t.samples,0,0,(function(){s.remuxer.remux(e,t,n,i,r,a,o)}))}else this.remuxer.remux(e,t,n,i,r,a,o)},t.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},t._parsePAT=function(e,t){return(31&e[t+10])<<8|e[t+11]},t._trackUnknownPmt=function(e,t,n){var i=this.pmtUnknownTypes[e]||0;return 0===i&&(this.pmtUnknownTypes[e]=0,t.call(s.logger,n)),this.pmtUnknownTypes[e]++,i},t._parsePMT=function(e,t,n,i){var r,a,o={audio:-1,avc:-1,id3:-1,isAAC:!0};for(r=t+3+((15&e[t+1])<<8|e[t+2])-4,t+=12+((15&e[t+10])<<8|e[t+11]);t<r;){switch(a=(31&e[t+1])<<8|e[t+2],e[t]){case 207:if(!i){this._trackUnknownPmt(e[t],s.logger.warn,"ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:-1===o.audio&&(o.audio=a);break;case 21:-1===o.id3&&(o.id3=a);break;case 219:if(!i){this._trackUnknownPmt(e[t],s.logger.warn,"H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:-1===o.avc&&(o.avc=a);break;case 3:case 4:n?-1===o.audio&&(o.audio=a,o.isAAC=!1):this._trackUnknownPmt(e[t],s.logger.warn,"MPEG audio found, not supported in this browser");break;case 36:this._trackUnknownPmt(e[t],s.logger.warn,"Unsupported HEVC stream type found");break;default:this._trackUnknownPmt(e[t],s.logger.log,"Unknown stream type:"+e[t])}t+=5+((15&e[t+3])<<8|e[t+4])}return o},t._parsePES=function(e){var t,n,i,r,a,o,l,u,c=0,f=e.data;if(!e||0===e.size)return null;for(;f[0].length<19&&f.length>1;){var d=new Uint8Array(f[0].length+f[1].length);d.set(f[0]),d.set(f[1],f[0].length),f[0]=d,f.splice(1,1)}if(1===((t=f[0])[0]<<16)+(t[1]<<8)+t[2]){if((i=(t[4]<<8)+t[5])&&i>e.size-6)return null;if(192&(n=t[7])&&(o=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&n?o-(l=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>54e5&&(s.logger.warn(Math.round((o-l)/9e4)+"s delta between PTS and DTS, align them"),o=l):l=o),u=(r=t[8])+9,e.size<=u)return null;e.size-=u,a=new Uint8Array(e.size);for(var h=0,p=f.length;h<p;h++){var v=(t=f[h]).byteLength;if(u){if(u>v){u-=v;continue}t=t.subarray(u),v-=u,u=0}a.set(t,c),c+=v}return i&&(i-=r+3),{data:a,pts:o,dts:l,len:i}}return null},t.pushAccesUnit=function(e,t){if(e.units.length&&e.frame){var n=t.samples,i=n.length;if(isNaN(e.pts)){if(!i)return void t.dropped++;var r=n[i-1];e.pts=r.pts,e.dts=r.dts}!this.config.forceKeyFrameOnDiscontinuity||!0===e.key||t.sps&&(i||this.contiguous)?(e.id=i,n.push(e)):t.dropped++}e.debug.length&&s.logger.log(e.pts+"/"+e.dts+":"+e.debug)},t._parseAVCPES=function(e,t){var n,i,r,a=this,o=this._avcTrack,s=this._parseAVCNALu(e.data),l=this.avcSample,u=!1,c=this.pushAccesUnit.bind(this),f=function(e,t,n,i){return{key:e,pts:t,dts:n,units:[],debug:i}};e.data=null,l&&s.length&&!o.audFound&&(c(l,o),l=this.avcSample=f(!1,e.pts,e.dts,"")),s.forEach((function(t){switch(t.type){case 1:i=!0,l||(l=a.avcSample=f(!0,e.pts,e.dts,"")),l.frame=!0;var s=t.data;if(u&&s.length>4){var d=new w(s).readSliceType();2!==d&&4!==d&&7!==d&&9!==d||(l.key=!0)}break;case 5:i=!0,l||(l=a.avcSample=f(!0,e.pts,e.dts,"")),l.key=!0,l.frame=!0;break;case 6:i=!0,(n=new w(a.discardEPB(t.data))).readUByte();for(var h=0,p=0,v=!1,g=0;!v&&n.bytesAvailable>1;){h=0;do{h+=g=n.readUByte()}while(255===g);p=0;do{p+=g=n.readUByte()}while(255===g);if(4===h&&0!==n.bytesAvailable){if(v=!0,181===n.readUByte()&&49===n.readUShort()&&1195456820===n.readUInt()&&3===n.readUByte()){var y=n.readUByte(),_=31&y,b=[y,n.readUByte()];for(r=0;r<_;r++)b.push(n.readUByte()),b.push(n.readUByte()),b.push(n.readUByte());a._insertSampleInOrder(a._txtTrack.samples,{type:3,pts:e.pts,bytes:b})}}else if(5===h&&0!==n.bytesAvailable){if(v=!0,p>16){var S=[];for(r=0;r<16;r++)S.push(n.readUByte().toString(16)),3!==r&&5!==r&&7!==r&&9!==r||S.push("-");var E=p-16,T=new Uint8Array(E);for(r=0;r<E;r++)T[r]=n.readUByte();a._insertSampleInOrder(a._txtTrack.samples,{pts:e.pts,payloadType:h,uuid:S.join(""),userDataBytes:T,userData:Object(m.utf8ArrayToStr)(T.buffer)})}}else if(p<n.bytesAvailable)for(r=0;r<p;r++)n.readUByte()}break;case 7:if(i=!0,u=!0,!o.sps){var k=(n=new w(t.data)).readSPS();o.width=k.width,o.height=k.height,o.pixelRatio=k.pixelRatio,o.sps=[t.data],o.duration=a._duration;var x=t.data.subarray(1,4),L="avc1.";for(r=0;r<3;r++){var A=x[r].toString(16);A.length<2&&(A="0"+A),L+=A}o.codec=L}break;case 8:i=!0,o.pps||(o.pps=[t.data]);break;case 9:i=!1,o.audFound=!0,l&&c(l,o),l=a.avcSample=f(!1,e.pts,e.dts,"");break;case 12:i=!1;break;default:i=!1,l&&(l.debug+="unknown NAL "+t.type+" ")}l&&i&&l.units.push(t)})),t&&l&&(c(l,o),this.avcSample=null)},t._insertSampleInOrder=function(e,t){var n=e.length;if(n>0){if(t.pts>=e[n-1].pts)e.push(t);else for(var i=n-1;i>=0;i--)if(t.pts<e[i].pts){e.splice(i,0,t);break}}else e.push(t)},t._getLastNalUnit=function(){var e,t=this.avcSample;if(!t||0===t.units.length){var n=this._avcTrack.samples;t=n[n.length-1]}if(t){var i=t.units;e=i[i.length-1]}return e},t._parseAVCNALu=function(e){var t,n,i,r,a=0,o=e.byteLength,s=this._avcTrack,l=s.naluState||0,u=l,c=[],f=-1;for(-1===l&&(f=0,r=31&e[0],l=0,a=1);a<o;)if(t=e[a++],l)if(1!==l)if(t)if(1===t){if(f>=0)i={data:e.subarray(f,a-l-1),type:r},c.push(i);else{var d=this._getLastNalUnit();if(d&&(u&&a<=4-u&&d.state&&(d.data=d.data.subarray(0,d.data.byteLength-u)),(n=a-l-1)>0)){var h=new Uint8Array(d.data.byteLength+n);h.set(d.data,0),h.set(e.subarray(0,n),d.data.byteLength),d.data=h}}a<o?(f=a,r=31&e[a],l=0):l=-1}else l=0;else l=3;else l=t?0:2;else l=t?0:1;if(f>=0&&l>=0&&(i={data:e.subarray(f,o),type:r,state:l},c.push(i)),0===c.length){var p=this._getLastNalUnit();if(p){var v=new Uint8Array(p.data.byteLength+e.byteLength);v.set(p.data,0),v.set(e,p.data.byteLength),p.data=v}}return s.naluState=l,c},t.discardEPB=function(e){for(var t,n,i=e.byteLength,r=[],a=1;a<i-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return e;t=i-r.length,n=new Uint8Array(t);var o=0;for(a=0;a<t;o++,a++)o===r[0]&&(o++,r.shift()),n[a]=e[o];return n},t._parseAACPES=function(e){var t,n,a,o,l,u,c,f=this._audioTrack,h=e.data,m=e.pts,y=this.aacOverFlow,_=this.aacLastPTS;if(y){var b=new Uint8Array(y.byteLength+h.byteLength);b.set(y,0),b.set(h,y.byteLength),h=b}for(a=0,l=h.length;a<l-1&&!d(h,a);a++);if(!a||(a<l-1?(u="AAC PES did not start with ADTS header,offset:"+a,c=!1):(u="no ADTS header found in AAC PES",c=!0),s.logger.warn("parsing error:"+u),this.observer.trigger(i.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:c,reason:u}),!c)){if(p(f,this.observer,h,a,this.audioCodec),n=0,t=v(f.samplerate),y&&_){var S=_+t;Math.abs(S-m)>1&&(s.logger.log("AAC: align PTS for overlapping frames by "+Math.round((S-m)/90)),m=S)}for(;a<l;){if(d(h,a)){if(a+5<l){var w=g(f,h,a,m,n);if(w){a+=w.length,o=w.sample.pts,n++;continue}}break}a++}y=a<l?h.subarray(a,l):null,this.aacOverFlow=y,this.aacLastPTS=o}},t._parseMPEGPES=function(e){for(var t=e.data,n=t.length,i=0,r=0,a=e.pts;r<n;)if(S.isHeader(t,r)){var o=S.appendFrame(this._audioTrack,t,r,a,i);if(!o)break;r+=o.length,i++}else r++},t._parseID3PES=function(e){this._id3Track.samples.push(e)},e}(),x=function(){function e(e,t,n){this.observer=e,this.config=n,this.remuxer=t}var t=e.prototype;return t.resetInitSegment=function(e,t,n,i){this._audioTrack={container:"audio/mpeg",type:"audio",id:-1,sequenceNumber:0,isAAC:!1,samples:[],len:0,manifestCodec:t,duration:i,inputTimeScale:9e4}},t.resetTimeStamp=function(){},e.probe=function(e){var t,n,i=m.default.getID3Data(e,0);if(i&&void 0!==m.default.getTimeStamp(i))for(t=i.length,n=Math.min(e.length-1,t+100);t<n;t++)if(S.probe(e,t))return s.logger.log("MPEG Audio sync word found !"),!0;return!1},t.append=function(e,t,n,i){for(var r=m.default.getID3Data(e,0)||[],a=m.default.getTimeStamp(r),o=void 0!==a?90*a:9e4*t,s=r.length,l=e.length,u=0,c=0,f=this._audioTrack,d=[{pts:o,dts:o,data:r}];s<l;)if(S.isHeader(e,s)){var h=S.appendFrame(f,e,s,o,u);if(!h)break;s+=h.length,c=h.sample.pts,u++}else m.default.isHeader(e,s)?(r=m.default.getID3Data(e,s),d.push({pts:c,dts:c,data:r}),s+=r.length):s++;this.remuxer.remux(f,{samples:[]},{samples:d,inputTimeScale:9e4},{samples:[]},t,n,i)},t.destroy=function(){},e}(),L=function(){function e(){}return e.getSilentFrame=function(e,t){switch(e){case"mp4a.40.2":if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},e}(),A=Math.pow(2,32)-1,C=function(){function e(){}return e.init=function(){var t;for(t in e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=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]),i=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]);e.HDLR_TYPES={video:n,audio:i};var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=a,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,o,l,o,s),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,r))},e.box=function(e){for(var t,n=Array.prototype.slice.call(arguments,1),i=8,r=n.length,a=r;r--;)i+=n[r].byteLength;for((t=new Uint8Array(i))[0]=i>>24&255,t[1]=i>>16&255,t[2]=i>>8&255,t[3]=255&i,t.set(e,4),r=0,i=8;r<a;r++)t.set(n[r],i),i+=n[r].byteLength;return t},e.hdlr=function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])},e.mdat=function(t){return e.box(e.types.mdat,t)},e.mdhd=function(t,n){n*=t;var i=Math.floor(n/(A+1)),r=Math.floor(n%(A+1));return e.box(e.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,r>>24,r>>16&255,r>>8&255,255&r,85,196,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))},e.mfhd=function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))},e.minf=function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))},e.moof=function(t,n,i){return e.box(e.types.moof,e.mfhd(t),e.traf(i,n))},e.moov=function(t){for(var n=t.length,i=[];n--;)i[n]=e.trak(t[n]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(i).concat(e.mvex(t)))},e.mvex=function(t){for(var n=t.length,i=[];n--;)i[n]=e.trex(t[n]);return e.box.apply(null,[e.types.mvex].concat(i))},e.mvhd=function(t,n){n*=t;var i=Math.floor(n/(A+1)),r=Math.floor(n%(A+1)),a=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,r>>24,r>>16&255,r>>8&255,255&r,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 e.box(e.types.mvhd,a)},e.sdtp=function(t){var n,i,r=t.samples||[],a=new Uint8Array(4+r.length);for(i=0;i<r.length;i++)n=r[i].flags,a[i+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return e.box(e.types.sdtp,a)},e.stbl=function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.STTS),e.box(e.types.stsc,e.STSC),e.box(e.types.stsz,e.STSZ),e.box(e.types.stco,e.STCO))},e.avc1=function(t){var n,i,r,a=[],o=[];for(n=0;n<t.sps.length;n++)r=(i=t.sps[n]).byteLength,a.push(r>>>8&255),a.push(255&r),a=a.concat(Array.prototype.slice.call(i));for(n=0;n<t.pps.length;n++)r=(i=t.pps[n]).byteLength,o.push(r>>>8&255),o.push(255&r),o=o.concat(Array.prototype.slice.call(i));var s=e.box(e.types.avcC,new Uint8Array([1,a[3],a[4],a[5],255,224|t.sps.length].concat(a).concat([t.pps.length]).concat(o))),l=t.width,u=t.height,c=t.pixelRatio[0],f=t.pixelRatio[1];return e.box(e.types.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,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,f>>24,f>>16&255,f>>8&255,255&f])))},e.esds=function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))},e.mp4a=function(t){var n=t.samplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){var n=t.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]))},e.stsd=function(t){return"audio"===t.type?t.isAAC||"mp3"!==t.codec?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.mp3(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))},e.tkhd=function(t){var n=t.id,i=t.duration*t.timescale,r=t.width,a=t.height,o=Math.floor(i/(A+1)),s=Math.floor(i%(A+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s,0,0,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,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>8&255,255&r,0,0,a>>8&255,255&a,0,0]))},e.traf=function(t,n){var i=e.sdtp(t),r=t.id,a=Math.floor(n/(A+1)),o=Math.floor(n%(A+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,o>>24,o>>16&255,o>>8&255,255&o])),e.trun(t,i.length+16+20+8+16+8+8),i)},e.trak=function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.trex=function(t){var n=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,n){var i,r,a,o,s,l,u=t.samples||[],c=u.length,f=12+16*c,d=new Uint8Array(f);for(n+=8+f,d.set([0,0,15,1,c>>>24&255,c>>>16&255,c>>>8&255,255&c,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),i=0;i<c;i++)a=(r=u[i]).duration,o=r.size,s=r.flags,l=r.cts,d.set([a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*i);return e.box(e.types.trun,d)},e.initSegment=function(t){e.types||e.init();var n,i=e.moov(t);return(n=new Uint8Array(e.FTYP.byteLength+i.byteLength)).set(e.FTYP),n.set(i,e.FTYP.byteLength),n},e}();function R(e,t,n,i){void 0===n&&(n=1),void 0===i&&(i=!1);var r=e*t*n;return i?Math.round(r):r}function D(e,t){return void 0===t&&(t=!1),R(e,1e3,1/9e4,t)}function O(e,t){return void 0===t&&(t=1),R(e,9e4,1/t)}var I=O(10),P=O(.2),M=null;function F(e,t){var n;if(void 0===t)return e;for(n=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=n;return e}var B,N=function(){function e(e,t,n,i){if(this.observer=e,this.config=t,this.typeSupported=n,this.ISGenerated=!1,null===M){var r=navigator.userAgent.match(/Chrome\/(\d+)/i);M=r?parseInt(r[1]):0}}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){this._initPTS=this._initDTS=e},t.resetInitSegment=function(){this.ISGenerated=!1},t.getVideoStartPts=function(e){var t=!1,n=e.reduce((function(e,n){var i=n.pts-e;return i<-4294967296?(t=!0,F(e,n.pts)):i>0?e:n.pts}),e[0].pts);return t&&s.logger.debug("PTS rollover detected"),n},t.remux=function(e,t,n,r,a,o,l){if(this.ISGenerated||this.generateIS(e,t,a),this.ISGenerated){var u=e.samples.length,c=t.samples.length,f=a,d=a;if(u&&c){var h=this.getVideoStartPts(t.samples),p=(F(e.samples[0].pts,h)-h)/t.inputTimeScale;f+=Math.max(0,p),d+=Math.max(0,-p)}if(u){e.timescale||(s.logger.warn("regenerate InitSegment as audio detected"),this.generateIS(e,t,a));var v,g=this.remuxAudio(e,f,o,l);c&&(g&&(v=g.endPTS-g.startPTS),t.timescale||(s.logger.warn("regenerate InitSegment as video detected"),this.generateIS(e,t,a)),this.remuxVideo(t,d,o,v))}else if(c){var m=this.remuxVideo(t,d,o,0,l);m&&e.codec&&this.remuxEmptyAudio(e,f,o,m)}}n.samples.length&&this.remuxID3(n,a),r.samples.length&&this.remuxText(r,a),this.observer.trigger(i.default.FRAG_PARSED)},t.generateIS=function(e,t,n){var a,o,l=this.observer,u=e.samples,c=t.samples,f=this.typeSupported,d="audio/mp4",h={},p={tracks:h},v=void 0===this._initPTS;if(v&&(a=o=1/0),e.config&&u.length&&(e.timescale=e.samplerate,s.logger.log("audio sampling rate : "+e.samplerate),e.isAAC||(f.mpeg?(d="audio/mpeg",e.codec=""):f.mp3&&(e.codec="mp3")),h.audio={container:d,codec:e.codec,initSegment:!e.isAAC&&f.mpeg?new Uint8Array:C.initSegment([e]),metadata:{channelCount:e.channelCount}},v&&(a=o=u[0].pts-Math.round(e.inputTimeScale*n))),t.sps&&t.pps&&c.length){var g=t.inputTimeScale;if(t.timescale=g,h.video={container:"video/mp4",codec:t.codec,initSegment:C.initSegment([t]),metadata:{width:t.width,height:t.height}},v){var m=this.getVideoStartPts(c),y=Math.round(g*n);o=Math.min(o,F(c[0].dts,m)-y),a=Math.min(a,m-y),this.observer.trigger(i.default.INIT_PTS_FOUND,{initPTS:a})}}else v&&h.audio&&this.observer.trigger(i.default.INIT_PTS_FOUND,{initPTS:a});Object.keys(h).length?(l.trigger(i.default.FRAG_PARSING_INIT_SEGMENT,p),this.ISGenerated=!0,v&&(this._initPTS=a,this._initDTS=o)):l.trigger(i.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},t.remuxVideo=function(e,t,n,a){var o,l,u,c,f,d=e.timescale,h=e.samples,p=[],v=h.length,g=this._initPTS,m=8,y=Number.POSITIVE_INFINITY,_=Number.NEGATIVE_INFINITY,b=0,S=!1,w=this.nextAvcDts;if(0!==v){n||(w=t*d-(h[0].pts-F(h[0].dts,h[0].pts)));for(var E=0;E<v;E++){var T=h[E];T.pts=F(T.pts-g,w),T.dts=F(T.dts-g,w),T.dts>T.pts&&(b=Math.max(Math.min(b,T.pts-T.dts),-1*P)),T.dts<h[E>0?E-1:E].dts&&(S=!0)}S&&h.sort((function(e,t){var n=e.dts-t.dts,i=e.pts-t.pts;return n||i||e.id-t.id})),c=h[0].dts,f=h[v-1].dts;var k=Math.round((f-c)/(v-1));if(b<0){if(b<-2*k){s.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+D(-k,!0)+" ms");for(var x=b,L=0;L<v;L++)h[L].dts=x=Math.max(x,h[L].pts-k),h[L].pts=Math.max(x,h[L].pts)}else{s.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+D(b,!0)+" ms to overcome this issue");for(var A=0;A<v;A++)h[A].dts=h[A].dts+b}c=h[0].dts,f=h[v-1].dts}if(n){var R=c-w,O=R>k;if(O||R<-1){O?s.logger.warn("AVC: "+D(R,!0)+" ms ("+R+"dts) hole between fragments detected, filling it"):s.logger.warn("AVC: "+D(-R,!0)+" ms ("+R+"dts) overlapping between fragments detected"),c=w;var I=h[0].pts-R;h[0].dts=c,h[0].pts=I,s.logger.log("Video: First PTS/DTS adjusted: "+D(I,!0)+"/"+D(c,!0)+", delta: "+D(R,!0)+" ms")}}M&&M<75&&(c=Math.max(0,c));for(var B=0,N=0,U=0;U<v;U++){for(var j=h[U],V=j.units,G=V.length,$=0,H=0;H<G;H++)$+=V[H].data.length;N+=$,B+=G,j.length=$,j.dts=Math.max(j.dts,c),j.pts=Math.max(j.pts,j.dts,0),y=Math.min(j.pts,y),_=Math.max(j.pts,_)}f=h[v-1].dts;var W=N+4*B+8;try{l=new Uint8Array(W)}catch(e){return void this.observer.trigger(i.default.ERROR,{type:r.ErrorTypes.MUX_ERROR,details:r.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:W,reason:"fail allocating video mdat "+W})}var K=new DataView(l.buffer);K.setUint32(0,W),l.set(C.types.mdat,4);for(var z=0;z<v;z++){for(var q,Y=h[z],X=Y.units,J=0,Z=0,Q=X.length;Z<Q;Z++){var ee=X[Z],te=ee.data,ne=ee.data.byteLength;K.setUint32(m,ne),m+=4,l.set(te,m),m+=ne,J+=4+ne}if(z<v-1)o=h[z+1].dts-Y.dts;else{var ie=this.config,re=Y.dts-h[z>0?z-1:z].dts;if(ie.stretchShortVideoTrack){var ae=ie.maxBufferHole,oe=Math.floor(ae*d),se=(a?y+a*d:this.nextAudioPts)-Y.pts;se>oe?((o=se-re)<0&&(o=re),s.logger.log("It is approximately "+D(se,!1)+" ms to the next segment; using duration "+D(o,!1)+" ms for the last video frame.")):o=re}else o=re}q=Math.round(Y.pts-Y.dts),p.push({size:J,duration:o,cts:q,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:Y.key?2:1,isNonSync:Y.key?0:1}})}this.nextAvcDts=f+o;var le=e.dropped;if(e.nbNalu=0,e.dropped=0,p.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var ue=p[0].flags;ue.dependsOn=2,ue.isNonSync=0}e.samples=p,u=C.moof(e.sequenceNumber++,c,e),e.samples=[];var ce={data1:u,data2:l,startPTS:y/d,endPTS:(_+o)/d,startDTS:c/d,endDTS:this.nextAvcDts/d,type:"video",hasAudio:!1,hasVideo:!0,nb:p.length,dropped:le};return this.observer.trigger(i.default.FRAG_PARSING_DATA,ce),ce}},t.remuxAudio=function(e,t,n,a){var o,l,u,c,f,d,h=e.inputTimeScale,p=e.timescale,v=h/p,g=(e.isAAC?1024:1152)*v,m=this._initPTS,y=!e.isAAC&&this.typeSupported.mpeg,_=y?0:8,b=e.samples,S=[],w=this.nextAudioPts;if(n|=b.length&&w&&(a&&Math.abs(t-w/h)<.1||Math.abs(b[0].pts-w-m)<20*g),b.forEach((function(e){e.pts=e.dts=F(e.pts-m,t*h)})),0!==(b=b.filter((function(e){return e.pts>=0}))).length){if(n||(w=a?Math.max(0,t*h):b[0].pts),e.isAAC)for(var E=this.config.maxAudioFramesDrift,T=0,k=w;T<b.length;){var x=b[T],A=x.pts,R=A-k;if(R<=-E*g)n||T>0?(s.logger.warn("Dropping 1 audio frame @ "+D(k,!0)/1e3+"s due to "+D(R,!0)+" ms overlap."),b.splice(T,1)):(s.logger.warn("Audio frame @ "+D(A,!0)/1e3+"s overlaps nextAudioPts by "+D(R,!0)+" ms."),k=A+g,T++);else if(R>=E*g&&R<I&&k){var O=Math.round(R/g);s.logger.warn("Injecting "+O+" audio frames @ "+D(k,!0)/1e3+"s due to "+D(R,!0)+" ms gap.");for(var P=0;P<O;P++){var M=Math.max(k,0);(l=L.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(s.logger.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),l=x.unit.subarray()),b.splice(T,0,{unit:l,pts:M,dts:M}),k+=g,T++}x.pts=x.dts=k,k+=g,T++}else Math.abs(R),x.pts=x.dts=k,k+=g,T++}for(var B=b.length,N=0;B--;)N+=b[B].unit.byteLength;for(var U=0,j=b.length;U<j;U++){var V=b[U],G=V.unit,$=V.pts;if(void 0!==d&&o)o.duration=Math.round(($-d)/v);else{var H=$-w,W=0;if(n&&e.isAAC&&H){if(H>0&&H<I)W=Math.round(($-w)/g),s.logger.log(D(H,!0)+" ms hole between AAC samples detected,filling it"),W>0&&((l=L.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(l=G.subarray()),N+=W*l.length);else if(H<-12){s.logger.log("drop overlapping AAC sample, expected/parsed/delta: "+D(w,!0)+" ms / "+D($,!0)+" ms / "+D(-H,!0)+" ms"),N-=G.byteLength;continue}$=w}if(f=$,!(N>0))return;N+=_;try{u=new Uint8Array(N)}catch(e){return void this.observer.trigger(i.default.ERROR,{type:r.ErrorTypes.MUX_ERROR,details:r.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:N,reason:"fail allocating audio mdat "+N})}y||(new DataView(u.buffer).setUint32(0,N),u.set(C.types.mdat,4));for(var K=0;K<W;K++)(l=L.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(s.logger.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),l=G.subarray()),u.set(l,_),_+=l.byteLength,o={size:l.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},S.push(o)}u.set(G,_);var z=G.byteLength;_+=z,o={size:z,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},S.push(o),d=$}var q=0;if((B=S.length)>=2&&(q=S[B-2].duration,o.duration=q),B){this.nextAudioPts=w=d+v*q,e.samples=S,c=y?new Uint8Array:C.moof(e.sequenceNumber++,f/v,e),e.samples=[];var Y=f/h,X=w/h,J={data1:c,data2:u,startPTS:Y,endPTS:X,startDTS:Y,endDTS:X,type:"audio",hasAudio:!0,hasVideo:!1,nb:B};return this.observer.trigger(i.default.FRAG_PARSING_DATA,J),J}return null}},t.remuxEmptyAudio=function(e,t,n,i){var r=e.inputTimeScale,a=r/(e.samplerate?e.samplerate:r),o=this.nextAudioPts,l=(void 0!==o?o:i.startDTS*r)+this._initDTS,u=i.endDTS*r+this._initDTS,c=1024*a,f=Math.ceil((u-l)/c),d=L.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(s.logger.warn("remux empty Audio"),d){for(var h=[],p=0;p<f;p++){var v=l+p*c;h.push({unit:d,pts:v,dts:v})}e.samples=h,this.remuxAudio(e,t,n)}else s.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!")},t.remuxID3=function(e,t){var n=e.samples.length;if(n){for(var r=e.inputTimeScale,a=this._initPTS,o=this._initDTS,s=0;s<n;s++){var l=e.samples[s];l.pts=F(l.pts-a,t*r)/r,l.dts=F(l.dts-o,t*r)/r}this.observer.trigger(i.default.FRAG_PARSING_METADATA,{samples:e.samples}),e.samples=[]}},t.remuxText=function(e,t){var n=e.samples.length,r=e.inputTimeScale,a=this._initPTS;if(n){for(var o=0;o<n;o++){var s=e.samples[o];s.pts=F(s.pts-a,t*r)/r}e.samples.sort((function(e,t){return e.pts-t.pts})),this.observer.trigger(i.default.FRAG_PARSING_USERDATA,{samples:e.samples})}e.samples=[]},e}(),U=function(){function e(e){this.observer=e}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(){},t.resetInitSegment=function(){},t.remux=function(e,t,n,r,a,o,s,l){var u=this.observer,c="";e&&(c+="audio"),t&&(c+="video"),u.trigger(i.default.FRAG_PARSING_DATA,{data1:l,startPTS:a,startDTS:a,type:c,hasAudio:!!e,hasVideo:!!t,nb:1,dropped:0}),u.trigger(i.default.FRAG_PARSED)},e}(),j=Object(l.getSelfScope)();try{B=j.performance.now.bind(j.performance)}catch(e){s.logger.debug("Unable to use Performance API on this environment"),B=j.Date.now}var V=function(){function e(e,t,n,i){this.observer=e,this.typeSupported=t,this.config=n,this.vendor=i}var t=e.prototype;return t.destroy=function(){var e=this.demuxer;e&&e.destroy()},t.push=function(e,t,n,r,o,s,l,u,c,f,d,h){var p=this;if(e.byteLength>0&&null!=t&&null!=t.key&&"AES-128"===t.method){var v=this.decrypter;null==v&&(v=this.decrypter=new a.default(this.observer,this.config));var g=B();v.decrypt(e,t.key.buffer,t.iv.buffer,(function(e){var a=B();p.observer.trigger(i.default.FRAG_DECRYPTED,{stats:{tstart:g,tdecrypt:a}}),p.pushDecrypted(new Uint8Array(e),t,new Uint8Array(n),r,o,s,l,u,c,f,d,h)}))}else this.pushDecrypted(new Uint8Array(e),t,new Uint8Array(n),r,o,s,l,u,c,f,d,h)},t.pushDecrypted=function(e,t,n,a,o,s,l,u,c,f,d,h){var p=this.demuxer,v=this.remuxer;if(!p||l||u){for(var g,m=this.observer,b=this.typeSupported,S=this.config,w=[{demux:k,remux:N},{demux:_.default,remux:U},{demux:y,remux:N},{demux:x,remux:N}],E=0,T=w.length;E<T&&!(g=w[E]).demux.probe(e);E++);if(!g)return void m.trigger(i.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});v&&v instanceof g.remux||(v=new g.remux(m,S,b,this.vendor)),p&&p instanceof g.demux||(p=new g.demux(m,v,S,b),this.probe=g.demux.probe),this.demuxer=p,this.remuxer=v}(l||u)&&(p.resetInitSegment(n,a,o,f),v.resetInitSegment()),l&&(p.resetTimeStamp(h),v.resetTimeStamp(h)),"function"==typeof p.setDecryptData&&p.setDecryptData(t),p.append(e,s,c,d)},e}();t.default=V},"./src/demux/demuxer-worker.js":
53/*!*************************************!*\
54 !*** ./src/demux/demuxer-worker.js ***!
55 \*************************************/
56/*! exports provided: default */
57/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/demux/demuxer.js (referenced with require.resolve) */function(e,t,n){"use strict";n.r(t);var i=n(/*! ../demux/demuxer-inline */"./src/demux/demuxer-inline.js"),r=n(/*! ../events */"./src/events.js"),a=n(/*! ../utils/logger */"./src/utils/logger.js"),o=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js");t.default=function(e){var t=new o.EventEmitter;t.trigger=function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];t.emit.apply(t,[e,e].concat(i))},t.off=function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];t.removeListener.apply(t,[e].concat(i))};var n=function(t,n){e.postMessage({event:t,data:n})};e.addEventListener("message",(function(r){var o=r.data;switch(o.cmd){case"init":var s=JSON.parse(o.config);e.demuxer=new i.default(t,o.typeSupported,s,o.vendor),Object(a.enableLogs)(s.debug),n("init",null);break;case"demux":e.demuxer.push(o.data,o.decryptdata,o.initSegment,o.audioCodec,o.videoCodec,o.timeOffset,o.discontinuity,o.trackSwitch,o.contiguous,o.duration,o.accurateTimeOffset,o.defaultInitPTS)}})),t.on(r.default.FRAG_DECRYPTED,n),t.on(r.default.FRAG_PARSING_INIT_SEGMENT,n),t.on(r.default.FRAG_PARSED,n),t.on(r.default.ERROR,n),t.on(r.default.FRAG_PARSING_METADATA,n),t.on(r.default.FRAG_PARSING_USERDATA,n),t.on(r.default.INIT_PTS_FOUND,n),t.on(r.default.FRAG_PARSING_DATA,(function(t,n){var i=[],r={event:t,data:n};n.data1&&(r.data1=n.data1.buffer,i.push(n.data1.buffer),delete n.data1),n.data2&&(r.data2=n.data2.buffer,i.push(n.data2.buffer),delete n.data2),e.postMessage(r,i)}))}},"./src/demux/id3.js":
58/*!**************************!*\
59 !*** ./src/demux/id3.js ***!
60 \**************************/
61/*! exports provided: default, utf8ArrayToStr */function(e,t,n){"use strict";n.r(t),n.d(t,"utf8ArrayToStr",(function(){return s}));var i,r=n(/*! ../utils/get-self-scope */"./src/utils/get-self-scope.js"),a=function(){function e(){}return e.isHeader=function(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},e.isFooter=function(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},e.getID3Data=function(t,n){for(var i=n,r=0;e.isHeader(t,n);)r+=10,r+=e._readSize(t,n+6),e.isFooter(t,n+10)&&(r+=10),n+=r;if(r>0)return t.subarray(i,i+r)},e._readSize=function(e,t){var n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,n|=(127&e[t+2])<<7,n|=127&e[t+3]},e.getTimeStamp=function(t){for(var n=e.getID3Frames(t),i=0;i<n.length;i++){var r=n[i];if(e.isTimeStampFrame(r))return e._readTimeStamp(r)}},e.isTimeStampFrame=function(e){return e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info},e._getFrameData=function(t){var n=String.fromCharCode(t[0],t[1],t[2],t[3]),i=e._readSize(t,4);return{type:n,size:i,data:t.subarray(10,10+i)}},e.getID3Frames=function(t){for(var n=0,i=[];e.isHeader(t,n);){for(var r=e._readSize(t,n+6),a=(n+=10)+r;n+8<a;){var o=e._getFrameData(t.subarray(n)),s=e._decodeFrame(o);s&&i.push(s),n+=o.size+10}e.isFooter(t,n)&&(n+=10)}return i},e._decodeFrame=function(t){return"PRIV"===t.type?e._decodePrivFrame(t):"W"===t.type[0]?e._decodeURLFrame(t):e._decodeTextFrame(t)},e._readTimeStamp=function(e){if(8===e.data.byteLength){var t=new Uint8Array(e.data),n=1&t[3],i=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return i/=45,n&&(i+=47721858.84),Math.round(i)}},e._decodePrivFrame=function(t){if(!(t.size<2)){var n=e._utf8ArrayToStr(t.data,!0),i=new Uint8Array(t.data.subarray(n.length+1));return{key:t.type,info:n,data:i.buffer}}},e._decodeTextFrame=function(t){if(!(t.size<2)){if("TXXX"===t.type){var n=1,i=e._utf8ArrayToStr(t.data.subarray(n),!0);n+=i.length+1;var r=e._utf8ArrayToStr(t.data.subarray(n));return{key:t.type,info:i,data:r}}var a=e._utf8ArrayToStr(t.data.subarray(1));return{key:t.type,data:a}}},e._decodeURLFrame=function(t){if("WXXX"===t.type){if(t.size<2)return;var n=1,i=e._utf8ArrayToStr(t.data.subarray(n),!0);n+=i.length+1;var r=e._utf8ArrayToStr(t.data.subarray(n));return{key:t.type,info:i,data:r}}var a=e._utf8ArrayToStr(t.data);return{key:t.type,data:a}},e._utf8ArrayToStr=function(e,t){void 0===t&&(t=!1);var n=o();if(n){var i=n.decode(e);if(t){var r=i.indexOf("\0");return-1!==r?i.substring(0,r):i}return i.replace(/\0/g,"")}for(var a,s,l,u=e.length,c="",f=0;f<u;){if(0===(a=e[f++])&&t)return c;if(0!==a&&3!==a)switch(a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c+=String.fromCharCode(a);break;case 12:case 13:s=e[f++],c+=String.fromCharCode((31&a)<<6|63&s);break;case 14:s=e[f++],l=e[f++],c+=String.fromCharCode((15&a)<<12|(63&s)<<6|(63&l)<<0)}}return c},e}();function o(){var e=Object(r.getSelfScope)();return i||void 0===e.TextDecoder||(i=new e.TextDecoder("utf-8")),i}var s=a._utf8ArrayToStr;t.default=a},"./src/demux/mp4demuxer.js":
62/*!*********************************!*\
63 !*** ./src/demux/mp4demuxer.js ***!
64 \*********************************/
65/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var i=n(/*! ../utils/logger */"./src/utils/logger.js"),r=n(/*! ../events */"./src/events.js"),a=Math.pow(2,32)-1,o=function(){function e(e,t){this.observer=e,this.remuxer=t}var t=e.prototype;return t.resetTimeStamp=function(e){this.initPTS=e},t.resetInitSegment=function(t,n,i,a){if(t&&t.byteLength){var o=this.initData=e.parseInitSegment(t);null==n&&(n="mp4a.40.5"),null==i&&(i="avc1.42e01e");var s={};o.audio&&o.video?s.audiovideo={container:"video/mp4",codec:n+","+i,initSegment:a?t:null}:(o.audio&&(s.audio={container:"audio/mp4",codec:n,initSegment:a?t:null}),o.video&&(s.video={container:"video/mp4",codec:i,initSegment:a?t:null})),this.observer.trigger(r.default.FRAG_PARSING_INIT_SEGMENT,{tracks:s})}else n&&(this.audioCodec=n),i&&(this.videoCodec=i)},e.probe=function(t){return e.findBox({data:t,start:0,end:Math.min(t.length,16384)},["moof"]).length>0},e.bin2str=function(e){return String.fromCharCode.apply(null,e)},e.readUint16=function(e,t){e.data&&(t+=e.start,e=e.data);var n=e[t]<<8|e[t+1];return n<0?65536+n:n},e.readUint32=function(e,t){e.data&&(t+=e.start,e=e.data);var n=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return n<0?4294967296+n:n},e.writeUint32=function(e,t,n){e.data&&(t+=e.start,e=e.data),e[t]=n>>24,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n},e.findBox=function(t,n){var i,r,a,o,s,l,u=[];if(t.data?(s=t.start,a=t.end,t=t.data):(s=0,a=t.byteLength),!n.length)return null;for(i=s;i<a;)l=(r=e.readUint32(t,i))>1?i+r:a,e.bin2str(t.subarray(i+4,i+8))===n[0]&&(1===n.length?u.push({data:t,start:i+8,end:l}):(o=e.findBox({data:t,start:i+8,end:l},n.slice(1))).length&&(u=u.concat(o))),i=l;return u},e.parseSegmentIndex=function(t){var n,i=e.findBox(t,["moov"])[0],r=i?i.end:null,a=0,o=e.findBox(t,["sidx"]);if(!o||!o[0])return null;n=[];var s=(o=o[0]).data[0];a=0===s?8:16;var l=e.readUint32(o,a);a+=4,a+=0===s?8:16,a+=2;var u=o.end+0,c=e.readUint16(o,a);a+=2;for(var f=0;f<c;f++){var d=a,h=e.readUint32(o,d);d+=4;var p=2147483647&h;if(1==(2147483648&h)>>>31)return void console.warn("SIDX has hierarchical references (not supported)");var v=e.readUint32(o,d);d+=4,n.push({referenceSize:p,subsegmentDuration:v,info:{duration:v/l,start:u,end:u+p-1}}),u+=p,a=d+=4}return{earliestPresentationTime:0,timescale:l,version:s,referencesCount:c,references:n,moovEndOffset:r}},e.parseInitSegment=function(t){var n=[];return e.findBox(t,["moov","trak"]).forEach((function(t){var r=e.findBox(t,["tkhd"])[0];if(r){var a=r.data[r.start],o=0===a?12:20,s=e.readUint32(r,o),l=e.findBox(t,["mdia","mdhd"])[0];if(l){o=0===(a=l.data[l.start])?12:20;var u=e.readUint32(l,o),c=e.findBox(t,["mdia","hdlr"])[0];if(c){var f={soun:"audio",vide:"video"}[e.bin2str(c.data.subarray(c.start+8,c.start+12))];if(f){var d=e.findBox(t,["mdia","minf","stbl","stsd"]);if(d.length){d=d[0];var h=e.bin2str(d.data.subarray(d.start+12,d.start+16));i.logger.log("MP4Demuxer:"+f+":"+h+" found")}n[s]={timescale:u,type:f},n[f]={timescale:u,id:s}}}}}})),n},e.getStartDTS=function(t,n){var i,r,a;return i=e.findBox(n,["moof","traf"]),r=[].concat.apply([],i.map((function(n){return e.findBox(n,["tfhd"]).map((function(i){var r,a;return r=e.readUint32(i,4),a=t[r].timescale||9e4,e.findBox(n,["tfdt"]).map((function(t){var n,i;return n=t.data[t.start],i=e.readUint32(t,4),1===n&&(i*=Math.pow(2,32),i+=e.readUint32(t,8)),i}))[0]/a}))}))),a=Math.min.apply(null,r),isFinite(a)?a:0},e.offsetStartDTS=function(t,n,i){e.findBox(n,["moof","traf"]).map((function(n){return e.findBox(n,["tfhd"]).map((function(r){var o=e.readUint32(r,4),s=t[o].timescale||9e4;e.findBox(n,["tfdt"]).map((function(t){var n=t.data[t.start],r=e.readUint32(t,4);if(0===n)e.writeUint32(t,4,r-i*s);else{r*=Math.pow(2,32),r+=e.readUint32(t,8),r-=i*s,r=Math.max(r,0);var o=Math.floor(r/(a+1)),l=Math.floor(r%(a+1));e.writeUint32(t,4,o),e.writeUint32(t,8,l)}}))}))}))},t.append=function(t,n,i,a){var o=this.initData;o||(this.resetInitSegment(t,this.audioCodec,this.videoCodec,!1),o=this.initData);var s,l=this.initPTS;if(void 0===l){var u=e.getStartDTS(o,t);this.initPTS=l=u-n,this.observer.trigger(r.default.INIT_PTS_FOUND,{initPTS:l})}e.offsetStartDTS(o,t,l),s=e.getStartDTS(o,t),this.remuxer.remux(o.audio,o.video,null,null,s,i,a,t)},t.destroy=function(){},e}();t.default=o},"./src/errors.ts":
66/*!***********************!*\
67 !*** ./src/errors.ts ***!
68 \***********************/
69/*! exports provided: ErrorTypes, ErrorDetails */function(e,t,n){"use strict";var i,r;n.r(t),n.d(t,"ErrorTypes",(function(){return i})),n.d(t,"ErrorDetails",(function(){return r})),function(e){e.NETWORK_ERROR="networkError",e.MEDIA_ERROR="mediaError",e.KEY_SYSTEM_ERROR="keySystemError",e.MUX_ERROR="muxError",e.OTHER_ERROR="otherError"}(i||(i={})),function(e){e.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",e.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",e.KEY_SYSTEM_NO_SESSION="keySystemNoSession",e.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",e.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",e.MANIFEST_LOAD_ERROR="manifestLoadError",e.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",e.MANIFEST_PARSING_ERROR="manifestParsingError",e.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",e.LEVEL_EMPTY_ERROR="levelEmptyError",e.LEVEL_LOAD_ERROR="levelLoadError",e.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",e.LEVEL_SWITCH_ERROR="levelSwitchError",e.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",e.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",e.FRAG_LOAD_ERROR="fragLoadError",e.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",e.FRAG_DECRYPT_ERROR="fragDecryptError",e.FRAG_PARSING_ERROR="fragParsingError",e.REMUX_ALLOC_ERROR="remuxAllocError",e.KEY_LOAD_ERROR="keyLoadError",e.KEY_LOAD_TIMEOUT="keyLoadTimeOut",e.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",e.BUFFER_APPEND_ERROR="bufferAppendError",e.BUFFER_APPENDING_ERROR="bufferAppendingError",e.BUFFER_STALLED_ERROR="bufferStalledError",e.BUFFER_FULL_ERROR="bufferFullError",e.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",e.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",e.INTERNAL_EXCEPTION="internalException"}(r||(r={}))},"./src/events.js":
70/*!***********************!*\
71 !*** ./src/events.js ***!
72 \***********************/
73/*! exports provided: default */function(e,t,n){"use strict";n.r(t),t.default={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",LEVELS_UPDATED:"hlsLevelsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",CUES_PARSED:"hlsCuesParsed",NON_NATIVE_TEXT_TRACKS_FOUND:"hlsNonNativeTextTracksFound",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition",LIVE_BACK_BUFFER_REACHED:"hlsLiveBackBufferReached"}},"./src/hls.ts":
74/*!*********************************!*\
75 !*** ./src/hls.ts + 50 modules ***!
76 \*********************************/
77/*! exports provided: default */
78/*! ModuleConcatenation bailout: Cannot concat with ./src/crypt/decrypter.js because of ./src/demux/demuxer-worker.js */
79/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/demuxer-inline.js because of ./src/demux/demuxer-worker.js */
80/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/id3.js because of ./src/demux/demuxer-worker.js */
81/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/mp4demuxer.js because of ./src/demux/demuxer-worker.js */
82/*! ModuleConcatenation bailout: Cannot concat with ./src/errors.ts because of ./src/demux/demuxer-worker.js */
83/*! ModuleConcatenation bailout: Cannot concat with ./src/events.js because of ./src/demux/demuxer-worker.js */
84/*! ModuleConcatenation bailout: Cannot concat with ./src/polyfills/number.js because of ./src/demux/demuxer-worker.js */
85/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/get-self-scope.js because of ./src/demux/demuxer-worker.js */
86/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/logger.js because of ./src/demux/demuxer-worker.js */
87/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/eventemitter3/index.js (<- Module is not an ECMAScript module) */
88/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/url-toolkit/src/url-toolkit.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return on}));var i={};n.r(i),n.d(i,"newCue",(function(){return ht}));var r,a,o=n("./node_modules/url-toolkit/src/url-toolkit.js"),s=n("./src/errors.ts"),l=n("./src/polyfills/number.js"),u=n("./src/events.js"),c=n("./src/utils/logger.js"),f={hlsEventGeneric:!0,hlsHandlerDestroying:!0,hlsHandlerDestroyed:!0},d=function(){function e(e){this.hls=void 0,this.handledEvents=void 0,this.useGenericHandler=void 0,this.hls=e,this.onEvent=this.onEvent.bind(this);for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.handledEvents=n,this.useGenericHandler=!0,this.registerListeners()}var t=e.prototype;return t.destroy=function(){this.onHandlerDestroying(),this.unregisterListeners(),this.onHandlerDestroyed()},t.onHandlerDestroying=function(){},t.onHandlerDestroyed=function(){},t.isEventHandler=function(){return"object"==typeof this.handledEvents&&this.handledEvents.length&&"function"==typeof this.onEvent},t.registerListeners=function(){this.isEventHandler()&&this.handledEvents.forEach((function(e){if(f[e])throw new Error("Forbidden event-name: "+e);this.hls.on(e,this.onEvent)}),this)},t.unregisterListeners=function(){this.isEventHandler()&&this.handledEvents.forEach((function(e){this.hls.off(e,this.onEvent)}),this)},t.onEvent=function(e,t){this.onEventGeneric(e,t)},t.onEventGeneric=function(e,t){try{(function(e,t){var n="on"+e.replace("hls","");if("function"!=typeof this[n])throw new Error("Event "+e+" has no generic handler in this "+this.constructor.name+" class (tried "+n+")");return this[n].bind(this,t)}).call(this,e,t).call()}catch(t){c.logger.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:e,err:t})}},e}();!function(e){e.MANIFEST="manifest",e.LEVEL="level",e.AUDIO_TRACK="audioTrack",e.SUBTITLE_TRACK="subtitleTrack"}(r||(r={})),function(e){e.MAIN="main",e.AUDIO="audio",e.SUBTITLE="subtitle"}(a||(a={}));var h=n("./src/demux/mp4demuxer.js");function p(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var v,g=function(){function e(e,t){this._uri=null,this.baseuri=void 0,this.reluri=void 0,this.method=null,this.key=null,this.iv=null,this.baseuri=e,this.reluri=t}var t,n,i;return t=e,(n=[{key:"uri",get:function(){return!this._uri&&this.reluri&&(this._uri=Object(o.buildAbsoluteURL)(this.baseuri,this.reluri,{alwaysNormalize:!0})),this._uri}}])&&p(t.prototype,n),i&&p(t,i),e}();function m(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}!function(e){e.AUDIO="audio",e.VIDEO="video"}(v||(v={}));var y=function(){function e(){var e;this._url=null,this._byteRange=null,this._decryptdata=null,this._elementaryStreams=((e={})[v.AUDIO]=!1,e[v.VIDEO]=!1,e),this.deltaPTS=0,this.rawProgramDateTime=null,this.programDateTime=null,this.title=null,this.tagList=[],this.cc=void 0,this.type=void 0,this.relurl=void 0,this.baseurl=void 0,this.duration=void 0,this.start=void 0,this.sn=0,this.urlId=0,this.level=0,this.levelkey=void 0,this.loader=void 0}var t,n,i,r=e.prototype;return r.setByteRange=function(e,t){var n=e.split("@",2),i=[];1===n.length?i[0]=t?t.byteRangeEndOffset:0:i[0]=parseInt(n[1]),i[1]=parseInt(n[0])+i[0],this._byteRange=i},r.addElementaryStream=function(e){this._elementaryStreams[e]=!0},r.hasElementaryStream=function(e){return!0===this._elementaryStreams[e]},r.createInitializationVector=function(e){for(var t=new Uint8Array(16),n=12;n<16;n++)t[n]=e>>8*(15-n)&255;return t},r.setDecryptDataFromLevelKey=function(e,t){var n=e;return(null==e?void 0:e.method)&&e.uri&&!e.iv&&((n=new g(e.baseuri,e.reluri)).method=e.method,n.iv=this.createInitializationVector(t)),n},t=e,(n=[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=Object(o.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(e){this._url=e}},{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var e=this.sn;"number"!=typeof e&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&c.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),e=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,e)}return this._decryptdata}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(l.isFiniteNumber)(this.programDateTime))return null;var e=Object(l.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){return!(!this.decryptdata||null===this.decryptdata.uri||null!==this.decryptdata.key)}}])&&m(t.prototype,n),i&&m(t,i),e}();function _(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var b=function(){function e(e){this.endCC=0,this.endSN=0,this.fragments=[],this.initSegment=null,this.live=!0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=e,this.version=null}var t,n,i;return t=e,(n=[{key:"hasProgramDateTime",get:function(){return!(!this.fragments[0]||!Object(l.isFiniteNumber)(this.fragments[0].programDateTime))}}])&&_(t.prototype,n),i&&_(t,i),e}(),S=/^(\d+)x(\d+)$/,w=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,E=function(){function e(t){for(var n in"string"==typeof t&&(t=e.parseAttrList(t)),t)t.hasOwnProperty(n)&&(this[n]=t[n])}var t=e.prototype;return t.decimalInteger=function(e){var t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var n=new Uint8Array(t.length/2),i=0;i<t.length/2;i++)n[i]=parseInt(t.slice(2*i,2*i+2),16);return n}return null},t.hexadecimalIntegerAsNumber=function(e){var t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.enumeratedString=function(e){return this[e]},t.decimalResolution=function(e){var t=S.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},e.parseAttrList=function(e){var t,n={};for(w.lastIndex=0;null!==(t=w.exec(e));){var i=t[2];0===i.indexOf('"')&&i.lastIndexOf('"')===i.length-1&&(i=i.slice(1,-1)),n[t[1]]=i}return n},e}(),T={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}};function k(e,t){return MediaSource.isTypeSupported((t||"video")+'/mp4;codecs="'+e+'"')}var x=/(?:#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)|#EXT-X-SESSION-DATA:([^\n\r]*)[\r\n]+)/g,L=/#EXT-X-MEDIA:(.*)/g,A=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)([\S+ ?]+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),C=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)([^:]*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,R=/\.(mp4|m4s|m4v|m4a)$/i,D=function(){function e(){}return e.findGroup=function(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(i.id===t)return i}},e.convertAVC1ToAVCOTI=function(e){var t,n=e.split(".");return n.length>2?(t=n.shift()+".",t+=parseInt(n.shift()).toString(16),t+=("000"+parseInt(n.shift()).toString(16)).substr(-4)):t=e,t},e.resolve=function(e,t){return o.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},e.parseMasterPlaylist=function(t,n){var i,r=[],a={},o=!1;function s(e,t){["video","audio"].forEach((function(n){var i=e.filter((function(e){return function(e,t){var n=T[t];return!!n&&!0===n[e.slice(0,4)]}(e,n)}));if(i.length){var r=i.filter((function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)}));t[n+"Codec"]=r.length>0?r[0]:i[0],e=e.filter((function(e){return-1===i.indexOf(e)}))}})),t.unknownCodecs=e}for(x.lastIndex=0;null!=(i=x.exec(t));)if(i[1]){var l={},u=l.attrs=new E(i[1]);l.url=e.resolve(i[2],n);var c=u.decimalResolution("RESOLUTION");c&&(l.width=c.width,l.height=c.height),l.bitrate=u.decimalInteger("AVERAGE-BANDWIDTH")||u.decimalInteger("BANDWIDTH"),l.name=u.NAME,s([].concat((u.CODECS||"").split(/[ ,]+/)),l),l.videoCodec&&-1!==l.videoCodec.indexOf("avc1")&&(l.videoCodec=e.convertAVC1ToAVCOTI(l.videoCodec)),r.push(l)}else if(i[3]){var f=new E(i[3]);f["DATA-ID"]&&(o=!0,a[f["DATA-ID"]]=f)}return{levels:r,sessionData:o?a:null}},e.parseMasterPlaylistMedia=function(t,n,i,r){var a;void 0===r&&(r=[]);var o=[],s=0;for(L.lastIndex=0;null!==(a=L.exec(t));){var l=new E(a[1]);if(l.TYPE===i){var u={attrs:l,id:s++,groupId:l["GROUP-ID"],instreamId:l["INSTREAM-ID"],name:l.NAME||l.LANGUAGE,type:i,default:"YES"===l.DEFAULT,autoselect:"YES"===l.AUTOSELECT,forced:"YES"===l.FORCED,lang:l.LANGUAGE};if(l.URI&&(u.url=e.resolve(l.URI,n)),r.length){var c=e.findGroup(r,u.groupId);u.audioCodec=c?c.codec:r[0].codec}o.push(u)}}return o},e.parseLevelPlaylist=function(e,t,n,i,r){var a,o,s,u=0,f=0,d=new b(t),h=0,p=null,v=new y,m=null;for(A.lastIndex=0;null!==(a=A.exec(e));){var _=a[1];if(_){v.duration=parseFloat(_);var S=(" "+a[2]).slice(1);v.title=S||null,v.tagList.push(S?["INF",_,S]:["INF",_])}else if(a[3]){if(Object(l.isFiniteNumber)(v.duration)){var w=u++;v.type=i,v.start=f,s&&(v.levelkey=s),v.sn=w,v.level=n,v.cc=h,v.urlId=r,v.baseurl=t,v.relurl=(" "+a[3]).slice(1),O(v,p),d.fragments.push(v),p=v,f+=v.duration,v=new y}}else if(a[4]){var T=(" "+a[4]).slice(1);p?v.setByteRange(T,p):v.setByteRange(T)}else if(a[5])v.rawProgramDateTime=(" "+a[5]).slice(1),v.tagList.push(["PROGRAM-DATE-TIME",v.rawProgramDateTime]),null===m&&(m=d.fragments.length);else{if(!(a=a[0].match(C))){c.logger.warn("No matches on slow regex match for level playlist!");continue}for(o=1;o<a.length&&void 0===a[o];o++);var k=(" "+a[o+1]).slice(1),x=(" "+a[o+2]).slice(1);switch(a[o]){case"#":v.tagList.push(x?[k,x]:[k]);break;case"PLAYLIST-TYPE":d.type=k.toUpperCase();break;case"MEDIA-SEQUENCE":u=d.startSN=parseInt(k);break;case"TARGETDURATION":d.targetduration=parseFloat(k);break;case"VERSION":d.version=parseInt(k);break;case"EXTM3U":break;case"ENDLIST":d.live=!1;break;case"DIS":h++,v.tagList.push(["DIS"]);break;case"DISCONTINUITY-SEQ":h=parseInt(k);break;case"KEY":var L=new E(k),D=L.enumeratedString("METHOD"),I=L.URI,P=L.hexadecimalInteger("IV");if("com.apple.streamingkeydelivery"===(L.KEYFORMAT||"identity")){c.logger.warn("Keyformat com.apple.streamingkeydelivery is not supported");continue}D&&(s=new g(t,I),I&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(D)>=0&&(s.method=D,s.key=null,s.iv=P));break;case"START":var M=new E(k).decimalFloatingPoint("TIME-OFFSET");Object(l.isFiniteNumber)(M)&&(d.startTimeOffset=M);break;case"MAP":var F=new E(k);v.relurl=F.URI,F.BYTERANGE&&v.setByteRange(F.BYTERANGE),v.baseurl=t,v.level=n,v.type=i,v.sn="initSegment",d.initSegment=v,(v=new y).rawProgramDateTime=d.initSegment.rawProgramDateTime;break;default:c.logger.warn("line parsed but not handled: "+a)}}}return(v=p)&&!v.relurl&&(d.fragments.pop(),f-=v.duration),d.totalduration=f,d.averagetargetduration=f/d.fragments.length,d.endSN=u-1,d.startCC=d.fragments[0]?d.fragments[0].cc:0,d.endCC=h,!d.initSegment&&d.fragments.length&&d.fragments.every((function(e){return R.test(e.relurl)}))&&(c.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(v=new y).relurl=d.fragments[0].relurl,v.baseurl=t,v.level=n,v.type=i,v.sn="initSegment",d.initSegment=v,d.needSidxRanges=!0),m&&function(e,t){for(var n=e[t],i=t-1;i>=0;i--){var r=e[i];r.programDateTime=n.programDateTime-1e3*r.duration,n=r}}(d.fragments,m),d},e}();function O(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):(null==t?void 0:t.programDateTime)&&(e.programDateTime=t.endProgramDateTime),Object(l.isFiniteNumber)(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}var I=window.performance,P=function(e){var t,n;function i(t){var n;return(n=e.call(this,t,u.default.MANIFEST_LOADING,u.default.LEVEL_LOADING,u.default.AUDIO_TRACK_LOADING,u.default.SUBTITLE_TRACK_LOADING)||this).loaders={},n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.canHaveQualityLevels=function(e){return e!==r.AUDIO_TRACK&&e!==r.SUBTITLE_TRACK},i.mapContextToLevelType=function(e){switch(e.type){case r.AUDIO_TRACK:return a.AUDIO;case r.SUBTITLE_TRACK:return a.SUBTITLE;default:return a.MAIN}},i.getResponseUrl=function(e,t){var n=e.url;return void 0!==n&&0!==n.indexOf("data:")||(n=t.url),n};var o=i.prototype;return o.createInternalLoader=function(e){var t=this.hls.config,n=t.pLoader,i=t.loader,r=new(n||i)(t);return e.loader=r,this.loaders[e.type]=r,r},o.getInternalLoader=function(e){return this.loaders[e.type]},o.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},o.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},o.destroy=function(){this.destroyInternalLoaders(),e.prototype.destroy.call(this)},o.onManifestLoading=function(e){this.load({url:e.url,type:r.MANIFEST,level:0,id:null,responseType:"text"})},o.onLevelLoading=function(e){this.load({url:e.url,type:r.LEVEL,level:e.level,id:e.id,responseType:"text"})},o.onAudioTrackLoading=function(e){this.load({url:e.url,type:r.AUDIO_TRACK,level:null,id:e.id,responseType:"text"})},o.onSubtitleTrackLoading=function(e){this.load({url:e.url,type:r.SUBTITLE_TRACK,level:null,id:e.id,responseType:"text"})},o.load=function(e){var t=this.hls.config;c.logger.debug("Loading playlist of type "+e.type+", level: "+e.level+", id: "+e.id);var n,i,a,o,s=this.getInternalLoader(e);if(s){var l=s.context;if(l&&l.url===e.url)return c.logger.trace("playlist request ongoing"),!1;c.logger.warn("aborting previous loader for type: "+e.type),s.abort()}switch(e.type){case r.MANIFEST:n=t.manifestLoadingMaxRetry,i=t.manifestLoadingTimeOut,a=t.manifestLoadingRetryDelay,o=t.manifestLoadingMaxRetryTimeout;break;case r.LEVEL:n=0,o=0,a=0,i=t.levelLoadingTimeOut;break;default:n=t.levelLoadingMaxRetry,i=t.levelLoadingTimeOut,a=t.levelLoadingRetryDelay,o=t.levelLoadingMaxRetryTimeout}s=this.createInternalLoader(e);var u={timeout:i,maxRetry:n,retryDelay:a,maxRetryDelay:o},f={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};return c.logger.debug("Calling internal loader delegate for URL: "+e.url),s.load(e,u,f),!0},o.loadsuccess=function(e,t,n,i){if(void 0===i&&(i=null),n.isSidxRequest)return this._handleSidxRequest(e,n),void this._handlePlaylistLoaded(e,t,n,i);if(this.resetInternalLoader(n.type),"string"!=typeof e.data)throw new Error('expected responseType of "text" for PlaylistLoader');var r=e.data;t.tload=I.now(),0===r.indexOf("#EXTM3U")?r.indexOf("#EXTINF:")>0||r.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(e,t,n,i):this._handleMasterPlaylist(e,t,n,i):this._handleManifestParsingError(e,n,"no EXTM3U delimiter",i)},o.loaderror=function(e,t,n){void 0===n&&(n=null),this._handleNetworkError(t,n,!1,e)},o.loadtimeout=function(e,t,n){void 0===n&&(n=null),this._handleNetworkError(t,n,!0)},o._handleMasterPlaylist=function(e,t,n,r){var a=this.hls,o=e.data,s=i.getResponseUrl(e,n),l=D.parseMasterPlaylist(o,s),f=l.levels,d=l.sessionData;if(f.length){var h=f.map((function(e){return{id:e.attrs.AUDIO,codec:e.audioCodec}})),p=D.parseMasterPlaylistMedia(o,s,"AUDIO",h),v=D.parseMasterPlaylistMedia(o,s,"SUBTITLES"),g=D.parseMasterPlaylistMedia(o,s,"CLOSED-CAPTIONS");if(p.length){var m=!1;p.forEach((function(e){e.url||(m=!0)})),!1===m&&f[0].audioCodec&&!f[0].attrs.AUDIO&&(c.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),p.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:{},url:""}))}a.trigger(u.default.MANIFEST_LOADED,{levels:f,audioTracks:p,subtitles:v,captions:g,url:s,stats:t,networkDetails:r,sessionData:d})}else this._handleManifestParsingError(e,n,"no level found in manifest",r)},o._handleTrackOrLevelPlaylist=function(e,t,n,a){var o=this.hls,c=n.id,f=n.level,d=n.type,h=i.getResponseUrl(e,n),p=Object(l.isFiniteNumber)(c)?c:0,v=Object(l.isFiniteNumber)(f)?f:p,g=i.mapContextToLevelType(n),m=D.parseLevelPlaylist(e.data,h,v,g,p);if(m.tload=t.tload,m.fragments.length){if(d===r.MANIFEST){var y={url:h,details:m};o.trigger(u.default.MANIFEST_LOADED,{levels:[y],audioTracks:[],url:h,stats:t,networkDetails:a,sessionData:null})}if(t.tparsed=I.now(),m.needSidxRanges){var _=m.initSegment.url;this.load({url:_,isSidxRequest:!0,type:d,level:f,levelDetails:m,id:c,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"})}else n.levelDetails=m,this._handlePlaylistLoaded(e,t,n,a)}else o.trigger(u.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:h,reason:"no fragments found in level",level:"number"==typeof n.level?n.level:void 0})},o._handleSidxRequest=function(e,t){if("string"==typeof e.data)throw new Error("sidx request must be made with responseType of array buffer");var n=h.default.parseSegmentIndex(new Uint8Array(e.data));if(n){var i=n.references,r=t.levelDetails;i.forEach((function(e,t){var n=e.info;if(r){var i=r.fragments[t];0===i.byteRange.length&&i.setByteRange(String(1+n.end-n.start)+"@"+String(n.start))}})),r&&r.initSegment.setByteRange(String(n.moovEndOffset)+"@0")}},o._handleManifestParsingError=function(e,t,n,i){this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:e.url,reason:n,networkDetails:i})},o._handleNetworkError=function(e,t,n,i){var a,o;void 0===n&&(n=!1),void 0===i&&(i=null),c.logger.info("A network error occured while loading a "+e.type+"-type playlist");var l=this.getInternalLoader(e);switch(e.type){case r.MANIFEST:a=n?s.ErrorDetails.MANIFEST_LOAD_TIMEOUT:s.ErrorDetails.MANIFEST_LOAD_ERROR,o=!0;break;case r.LEVEL:a=n?s.ErrorDetails.LEVEL_LOAD_TIMEOUT:s.ErrorDetails.LEVEL_LOAD_ERROR,o=!1;break;case r.AUDIO_TRACK:a=n?s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,o=!1;break;default:o=!1}l&&(l.abort(),this.resetInternalLoader(e.type));var f={type:s.ErrorTypes.NETWORK_ERROR,details:a,fatal:o,url:e.url,loader:l,context:e,networkDetails:t};i&&(f.response=i),this.hls.trigger(u.default.ERROR,f)},o._handlePlaylistLoaded=function(e,t,n,a){var o=n.type,s=n.level,l=n.id,c=n.levelDetails;if(c&&c.targetduration)if(i.canHaveQualityLevels(n.type))this.hls.trigger(u.default.LEVEL_LOADED,{details:c,level:s||0,id:l||0,stats:t,networkDetails:a});else switch(o){case r.AUDIO_TRACK:this.hls.trigger(u.default.AUDIO_TRACK_LOADED,{details:c,id:l,stats:t,networkDetails:a});break;case r.SUBTITLE_TRACK:this.hls.trigger(u.default.SUBTITLE_TRACK_LOADED,{details:c,id:l,stats:t,networkDetails:a})}else this._handleManifestParsingError(e,n,"invalid target duration",a)},i}(d),M=function(e){var t,n;function i(t){var n;return(n=e.call(this,t,u.default.FRAG_LOADING)||this).loaders={},n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.destroy=function(){var t=this.loaders;for(var n in t){var i=t[n];i&&i.destroy()}this.loaders={},e.prototype.destroy.call(this)},r.onFragLoading=function(e){var t=e.frag,n=t.type,i=this.loaders,r=this.hls.config,a=r.fLoader,o=r.loader;t.loaded=0;var s,u,f,d=i[n];d&&(c.logger.warn("abort previous fragment loader for type: "+n),d.abort()),d=i[n]=t.loader=r.fLoader?new a(r):new o(r),s={url:t.url,frag:t,responseType:"arraybuffer",progressData:!1};var h=t.byteRangeStartOffset,p=t.byteRangeEndOffset;Object(l.isFiniteNumber)(h)&&Object(l.isFiniteNumber)(p)&&(s.rangeStart=h,s.rangeEnd=p),u={timeout:r.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:r.fragLoadingMaxRetryTimeout},f={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},d.load(s,u,f)},r.loadsuccess=function(e,t,n,i){void 0===i&&(i=null);var r=e.data,a=n.frag;a.loader=void 0,this.loaders[a.type]=void 0,this.hls.trigger(u.default.FRAG_LOADED,{payload:r,frag:a,stats:t,networkDetails:i})},r.loaderror=function(e,t,n){void 0===n&&(n=null);var i=t.frag,r=i.loader;r&&r.abort(),this.loaders[i.type]=void 0,this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t.frag,response:e,networkDetails:n})},r.loadtimeout=function(e,t,n){void 0===n&&(n=null);var i=t.frag,r=i.loader;r&&r.abort(),this.loaders[i.type]=void 0,this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t.frag,networkDetails:n})},r.loadprogress=function(e,t,n,i){void 0===i&&(i=null);var r=t.frag;r.loaded=e.loaded,this.hls.trigger(u.default.FRAG_LOAD_PROGRESS,{frag:r,stats:e,networkDetails:i})},i}(d),F=function(e){var t,n;function i(t){var n;return(n=e.call(this,t,u.default.KEY_LOADING)||this).loaders={},n.decryptkey=null,n.decrypturl=null,n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.destroy=function(){for(var t in this.loaders){var n=this.loaders[t];n&&n.destroy()}this.loaders={},e.prototype.destroy.call(this)},r.onKeyLoading=function(e){var t=e.frag,n=t.type,i=this.loaders[n];if(t.decryptdata){var r=t.decryptdata.uri;if(r!==this.decrypturl||null===this.decryptkey){var a=this.hls.config;if(i&&(c.logger.warn("abort previous key loader for type:"+n),i.abort()),!r)return void c.logger.warn("key uri is falsy");t.loader=this.loaders[n]=new a.loader(a),this.decrypturl=r,this.decryptkey=null;var o={url:r,frag:t,responseType:"arraybuffer"},s={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:a.fragLoadingRetryDelay,maxRetryDelay:a.fragLoadingMaxRetryTimeout},l={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};t.loader.load(o,s,l)}else this.decryptkey&&(t.decryptdata.key=this.decryptkey,this.hls.trigger(u.default.KEY_LOADED,{frag:t}))}else c.logger.warn("Missing decryption data on fragment in onKeyLoading")},r.loadsuccess=function(e,t,n){var i=n.frag;i.decryptdata?(this.decryptkey=i.decryptdata.key=new Uint8Array(e.data),i.loader=void 0,delete this.loaders[i.type],this.hls.trigger(u.default.KEY_LOADED,{frag:i})):c.logger.error("after key load, decryptdata unset")},r.loaderror=function(e,t){var n=t.frag,i=n.loader;i&&i.abort(),delete this.loaders[n.type],this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:n,response:e})},r.loadtimeout=function(e,t){var n=t.frag,i=n.loader;i&&i.abort(),delete this.loaders[n.type],this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})},i}(d),B="NOT_LOADED",N="APPENDING",U="PARTIAL",j="OK",V=function(e){var t,n;function i(t){var n;return(n=e.call(this,t,u.default.BUFFER_APPENDED,u.default.FRAG_BUFFERED,u.default.FRAG_LOADED)||this).bufferPadding=.2,n.fragments=Object.create(null),n.timeRanges=Object.create(null),n.config=t.config,n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.destroy=function(){this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.config=null,d.prototype.destroy.call(this),e.prototype.destroy.call(this)},r.getBufferedFrag=function(e,t){var n=this.fragments,i=Object.keys(n).filter((function(i){var r=n[i];if(r.body.type!==t)return!1;if(!r.buffered)return!1;var a=r.body;return a.startPTS<=e&&e<=a.endPTS}));if(0===i.length)return null;var r=i.pop();return n[r].body},r.detectEvictedFragments=function(e,t){var n=this;Object.keys(this.fragments).forEach((function(i){var r=n.fragments[i];if(r&&r.buffered){var a=r.range[e];if(a)for(var o=a.time,s=0;s<o.length;s++){var l=o[s];if(!n.isTimeBuffered(l.startPTS,l.endPTS,t)){n.removeFragment(r.body);break}}}}))},r.detectPartialFragments=function(e){var t=this,n=this.getFragmentKey(e),i=this.fragments[n];i&&(i.buffered=!0,Object.keys(this.timeRanges).forEach((function(n){if(e.hasElementaryStream(n)){var r=t.timeRanges[n];i.range[n]=t.getBufferedTimes(e.startPTS,e.endPTS,r)}})))},r.getBufferedTimes=function(e,t,n){for(var i,r,a=[],o=!1,s=0;s<n.length;s++){if(i=n.start(s)-this.bufferPadding,r=n.end(s)+this.bufferPadding,e>=i&&t<=r){a.push({startPTS:Math.max(e,n.start(s)),endPTS:Math.min(t,n.end(s))});break}if(e<r&&t>i)a.push({startPTS:Math.max(e,n.start(s)),endPTS:Math.min(t,n.end(s))}),o=!0;else if(t<=i)break}return{time:a,partial:o}},r.getFragmentKey=function(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.sn},r.getPartialFragment=function(e){var t,n,i,r=this,a=null,o=0;return Object.keys(this.fragments).forEach((function(s){var l=r.fragments[s];r.isPartial(l)&&(n=l.body.startPTS-r.bufferPadding,i=l.body.endPTS+r.bufferPadding,e>=n&&e<=i&&(t=Math.min(e-n,i-e),o<=t&&(a=l.body,o=t)))})),a},r.getState=function(e){var t=this.getFragmentKey(e),n=this.fragments[t],i=B;return void 0!==n&&(i=n.buffered?!0===this.isPartial(n)?U:j:N),i},r.isPartial=function(e){return!0===e.buffered&&(void 0!==e.range.video&&!0===e.range.video.partial||void 0!==e.range.audio&&!0===e.range.audio.partial)},r.isTimeBuffered=function(e,t,n){for(var i,r,a=0;a<n.length;a++){if(i=n.start(a)-this.bufferPadding,r=n.end(a)+this.bufferPadding,e>=i&&t<=r)return!0;if(t<=i)return!1}return!1},r.onFragLoaded=function(e){var t=e.frag;Object(l.isFiniteNumber)(t.sn)&&!t.bitrateTest&&(this.fragments[this.getFragmentKey(t)]={body:t,range:Object.create(null),buffered:!1})},r.onBufferAppended=function(e){var t=this;this.timeRanges=e.timeRanges,Object.keys(this.timeRanges).forEach((function(e){var n=t.timeRanges[e];t.detectEvictedFragments(e,n)}))},r.onFragBuffered=function(e){this.detectPartialFragments(e.frag)},r.hasFragment=function(e){var t=this.getFragmentKey(e);return void 0!==this.fragments[t]},r.removeFragment=function(e){var t=this.getFragmentKey(e);delete this.fragments[t]},r.removeAllFragments=function(){this.fragments=Object.create(null)},i}(d),G={search:function(e,t){for(var n=0,i=e.length-1,r=null,a=null;n<=i;){var o=t(a=e[r=(n+i)/2|0]);if(o>0)n=r+1;else{if(!(o<0))return a;i=r-1}}return null}},$=function(){function e(){}return e.isBuffered=function(e,t){try{if(e)for(var n=e.buffered,i=0;i<n.length;i++)if(t>=n.start(i)&&t<=n.end(i))return!0}catch(e){}return!1},e.bufferInfo=function(e,t,n){try{if(e){var i,r=e.buffered,a=[];for(i=0;i<r.length;i++)a.push({start:r.start(i),end:r.end(i)});return this.bufferedInfo(a,t,n)}}catch(e){}return{len:0,start:t,end:t,nextStart:void 0}},e.bufferedInfo=function(e,t,n){e.sort((function(e,t){var n=e.start-t.start;return n||t.end-e.end}));var i=[];if(n)for(var r=0;r<e.length;r++){var a=i.length;if(a){var o=i[a-1].end;e[r].start-o<n?e[r].end>o&&(i[a-1].end=e[r].end):i.push(e[r])}else i.push(e[r])}else i=e;for(var s,l=0,u=t,c=t,f=0;f<i.length;f++){var d=i[f].start,h=i[f].end;if(t+n>=d&&t<h)u=d,l=(c=h)-t;else if(t+n<d){s=d;break}}return{len:l,start:u,end:c,nextStart:s}},e}(),H=n("./node_modules/eventemitter3/index.js"),W=n("./node_modules/webworkify-webpack/index.js"),K=n("./src/demux/demuxer-inline.js");function z(){return window.MediaSource||window.WebKitMediaSource}var q=n("./src/utils/get-self-scope.js"),Y=function(e){var t,n;function i(){return e.apply(this,arguments)||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.prototype.trigger=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.emit.apply(this,[e,e].concat(n))},i}(H.EventEmitter),X=Object(q.getSelfScope)(),J=z()||{isTypeSupported:function(){return!1}},Z=function(){function e(e,t){var n=this;this.hls=e,this.id=t;var i=this.observer=new Y,r=e.config,a=function(t,i){(i=i||{}).frag=n.frag,i.id=n.id,e.trigger(t,i)};i.on(u.default.FRAG_DECRYPTED,a),i.on(u.default.FRAG_PARSING_INIT_SEGMENT,a),i.on(u.default.FRAG_PARSING_DATA,a),i.on(u.default.FRAG_PARSED,a),i.on(u.default.ERROR,a),i.on(u.default.FRAG_PARSING_METADATA,a),i.on(u.default.FRAG_PARSING_USERDATA,a),i.on(u.default.INIT_PTS_FOUND,a);var o={mp4:J.isTypeSupported("video/mp4"),mpeg:J.isTypeSupported("audio/mpeg"),mp3:J.isTypeSupported('audio/mp4; codecs="mp3"')},l=navigator.vendor;if(r.enableWorker&&"undefined"!=typeof Worker){var f;c.logger.log("demuxing in webworker");try{f=this.w=W(/*! ../demux/demuxer-worker.js */"./src/demux/demuxer-worker.js"),this.onwmsg=this.onWorkerMessage.bind(this),f.addEventListener("message",this.onwmsg),f.onerror=function(t){e.trigger(u.default.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:t.message+" ("+t.filename+":"+t.lineno+")"}})},f.postMessage({cmd:"init",typeSupported:o,vendor:l,id:t,config:JSON.stringify(r)})}catch(e){c.logger.warn("Error in worker:",e),c.logger.error("Error while initializing DemuxerWorker, fallback on DemuxerInline"),f&&X.URL.revokeObjectURL(f.objectURL),this.demuxer=new K.default(i,o,r,l),this.w=void 0}}else this.demuxer=new K.default(i,o,r,l)}var t=e.prototype;return t.destroy=function(){var e=this.w;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.w=null;else{var t=this.demuxer;t&&(t.destroy(),this.demuxer=null)}var n=this.observer;n&&(n.removeAllListeners(),this.observer=null)},t.push=function(e,t,n,i,r,a,o,s){var u=this.w,f=Object(l.isFiniteNumber)(r.startPTS)?r.startPTS:r.start,d=r.decryptdata,h=this.frag,p=!(h&&r.cc===h.cc),v=!(h&&r.level===h.level),g=h&&r.sn===h.sn+1,m=!v&&g;if(p&&c.logger.log(this.id+":discontinuity detected"),v&&c.logger.log(this.id+":switch detected"),this.frag=r,u)u.postMessage({cmd:"demux",data:e,decryptdata:d,initSegment:t,audioCodec:n,videoCodec:i,timeOffset:f,discontinuity:p,trackSwitch:v,contiguous:m,duration:a,accurateTimeOffset:o,defaultInitPTS:s},e instanceof ArrayBuffer?[e]:[]);else{var y=this.demuxer;y&&y.push(e,d,t,n,i,f,p,v,m,a,o,s)}},t.onWorkerMessage=function(e){var t=e.data,n=this.hls;switch(t.event){case"init":X.URL.revokeObjectURL(this.w.objectURL);break;case u.default.FRAG_PARSING_DATA:t.data.data1=new Uint8Array(t.data1),t.data2&&(t.data.data2=new Uint8Array(t.data2));default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,n.trigger(t.event,t.data)}},e}();function Q(e,t,n){switch(t){case"audio":e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds.push(n);break;case"text":e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds.push(n)}}function ee(e,t,n){var i=e[t],r=e[n],a=r.startPTS;if(Object(l.isFiniteNumber)(a))n>t?(i.duration=a-i.start,i.duration<0&&c.logger.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!")):(r.duration=i.start-a,r.duration<0&&c.logger.warn("negative duration computed for frag "+r.sn+",level "+r.level+", there should be some duration drift between playlist and fragment!"));else if(n>t){var o=i.cc===r.cc;r.start=i.start+(o&&i.minEndPTS?i.minEndPTS-i.start:i.duration)}else r.start=Math.max(i.start-r.duration,0)}function te(e,t,n,i,r,a){var o=n,s=i;if(Object(l.isFiniteNumber)(t.startPTS)){var u=Math.abs(t.startPTS-n);Object(l.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(u,t.deltaPTS):t.deltaPTS=u,o=Math.max(n,t.startPTS),n=Math.min(n,t.startPTS),s=Math.min(i,t.endPTS),i=Math.max(i,t.endPTS),r=Math.min(r,t.startDTS),a=Math.max(a,t.endDTS)}var c=n-t.start;t.start=t.startPTS=n,t.maxStartPTS=o,t.endPTS=i,t.minEndPTS=s,t.startDTS=r,t.endDTS=a,t.duration=i-n;var f,d,h,p=t.sn;if(!e||p<e.startSN||p>e.endSN)return 0;for(f=p-e.startSN,(d=e.fragments)[f]=t,h=f;h>0;h--)ee(d,h,h-1);for(h=f;h<d.length-1;h++)ee(d,h,h+1);return e.PTSKnown=!0,c}function ne(e,t){t.initSegment&&e.initSegment&&(t.initSegment=e.initSegment);var n,i=0;if(ie(e,t,(function(e,r){i=e.cc-r.cc,Object(l.isFiniteNumber)(e.startPTS)&&(r.start=r.startPTS=e.startPTS,r.endPTS=e.endPTS,r.duration=e.duration,r.backtracked=e.backtracked,r.dropped=e.dropped,n=r),t.PTSKnown=!0})),t.PTSKnown){if(i){c.logger.log("discontinuity sliding from playlist, take drift into account");for(var r=t.fragments,a=0;a<r.length;a++)r[a].cc+=i}n?te(t,n,n.startPTS,n.endPTS,n.startDTS,n.endDTS):function(e,t){var n=t.startSN-e.startSN,i=e.fragments,r=t.fragments;if(!(n<0||n>i.length))for(var a=0;a<r.length;a++)r[a].start+=i[n].start}(e,t),t.PTSKnown=e.PTSKnown}}function ie(e,t,n){if(e&&t)for(var i=Math.max(e.startSN,t.startSN)-t.startSN,r=Math.min(e.endSN,t.endSN)-t.startSN,a=t.startSN-e.startSN,o=i;o<=r;o++){var s=e.fragments[a+o],l=t.fragments[o];if(!s||!l)break;n(s,l,o)}}function re(e,t,n){var i=1e3*(t.averagetargetduration?t.averagetargetduration:t.targetduration),r=i/2;return e&&t.endSN===e.endSN&&(i=r),n&&(i=Math.max(r,i-(window.performance.now()-n))),Math.round(i)}var ae={toString:function(e){for(var t="",n=e.length,i=0;i<n;i++)t+="["+e.start(i).toFixed(3)+","+e.end(i).toFixed(3)+"]";return t}};function oe(e,t){t.fragments.forEach((function(t){if(t){var n=t.start+e;t.start=t.startPTS=n,t.endPTS=n+t.duration}})),t.PTSKnown=!0}function se(e,t,n){!function(e,t,n){if(function(e,t,n){var i=!1;return t&&t.details&&n&&(n.endCC>n.startCC||e&&e.cc<n.startCC)&&(i=!0),i}(e,n,t)){var i=function(e,t){var n=e.fragments,i=t.fragments;if(i.length&&n.length){var r=function(e,t){for(var n=null,i=0;i<e.length;i+=1){var r=e[i];if(r&&r.cc===t){n=r;break}}return n}(n,i[0].cc);if(r&&(!r||r.startPTS))return r;c.logger.log("No frag in previous level to align on")}else c.logger.log("No fragments to align")}(n.details,t);i&&(c.logger.log("Adjusting PTS using last level due to CC increase within current level"),oe(i.start,t))}}(e,n,t),!n.PTSKnown&&t&&function(e,t){if(t&&t.fragments.length){if(!e.hasProgramDateTime||!t.hasProgramDateTime)return;var n=t.fragments[0].programDateTime,i=(e.fragments[0].programDateTime-n)/1e3+t.fragments[0].start;Object(l.isFiniteNumber)(i)&&(c.logger.log("adjusting PTS using programDateTime delta, sliding:"+i.toFixed(3)),oe(i,e))}}(n,t.details)}function le(e,t,n){if(null===t||!Array.isArray(e)||!e.length||!Object(l.isFiniteNumber)(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;n=n||0;for(var i=0;i<e.length;++i){var r=e[i];if(fe(t,n,r))return r}return null}function ue(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=0);var r=null;if(e?r=t[e.sn-t[0].sn+1]:0===n&&0===t[0].start&&(r=t[0]),r&&0===ce(n,i,r))return r;var a=G.search(t,ce.bind(null,n,i));return a||r}function ce(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0);var i=Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.start+n.duration-i<=e?1:n.start-i>e&&n.start?-1:0}function fe(e,t,n){var i=1e3*Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return(n.endProgramDateTime||0)-i>e}var de=function(){function e(e,t,n,i){this.config=e,this.media=t,this.fragmentTracker=n,this.hls=i,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1}var t=e.prototype;return t.poll=function(e){var t=this.config,n=this.media,i=this.stalled,r=n.currentTime,a=n.seeking,o=this.seeking&&!a,s=!this.seeking&&a;if(this.seeking=a,r===e){if((s||o)&&(this.stalled=null),!n.paused&&!n.ended&&0!==n.playbackRate&&n.buffered.length){var l=$.bufferInfo(n,r,0),u=l.len>0,f=l.nextStart||0;if(u||f){if(a){var d=l.len>2,h=!f||f-r>2&&!this.fragmentTracker.getPartialFragment(r);if(d||h)return;this.moved=!1}if(!this.moved&&this.stalled){var p=Math.max(f,l.start||0)-r;if(p>0&&p<=2)return void this._trySkipBufferHole(null)}var v=self.performance.now();if(null!==i){var g=v-i;!a&&g>=250&&this._reportStall(l.len);var m=$.bufferInfo(n,r,t.maxBufferHole);this._tryFixBufferStall(m,g)}else this.stalled=v}}}else if(this.moved=!0,null!==i){if(this.stallReported){var y=self.performance.now()-i;c.logger.warn("playback not stuck anymore @"+r+", after "+Math.round(y)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},t._tryFixBufferStall=function(e,t){var n=this.config,i=this.fragmentTracker,r=this.media.currentTime,a=i.getPartialFragment(r);a&&this._trySkipBufferHole(a)||e.len>n.maxBufferHole&&t>1e3*n.highBufferWatchdogPeriod&&(c.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},t._reportStall=function(e){var t=this.hls,n=this.media;this.stallReported||(this.stallReported=!0,c.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+e+")"),t.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:e}))},t._trySkipBufferHole=function(e){for(var t=this.config,n=this.hls,i=this.media,r=i.currentTime,a=0,o=0;o<i.buffered.length;o++){var l=i.buffered.start(o);if(r+t.maxBufferHole>=a&&r<l){var f=Math.max(l+.05,i.currentTime+.1);return c.logger.warn("skipping hole, adjusting currentTime from "+r+" to "+f),this.moved=!0,this.stalled=null,i.currentTime=f,e&&n.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+r+" to "+f,frag:e}),f}a=i.buffered.end(o)}return 0},t._tryNudgeBuffer=function(){var e=this.config,t=this.hls,n=this.media,i=n.currentTime,r=(this.nudgeRetry||0)+1;if(this.nudgeRetry=r,r<e.nudgeMaxRetry){var a=i+r*e.nudgeOffset;c.logger.warn("Nudging 'currentTime' from "+i+" to "+a),n.currentTime=a,t.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else c.logger.error("Playhead still not moving while enough data buffered @"+i+" after "+e.nudgeMaxRetry+" nudges"),t.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},e}();function he(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var pe=function(e){var t,n;function i(t){for(var n,i=arguments.length,r=new Array(i>1?i-1:0),a=1;a<i;a++)r[a-1]=arguments[a];return(n=e.call.apply(e,[this,t].concat(r))||this)._boundTick=void 0,n._tickTimer=null,n._tickInterval=null,n._tickCallCount=0,n._boundTick=n.tick.bind(he(n)),n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},r.hasInterval=function(){return!!this._tickInterval},r.hasNextTick=function(){return!!this._tickTimer},r.setInterval=function(e){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,e),!0)},r.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},r.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},r.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&(this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)),this._tickCallCount=0)},r.doTick=function(){},i}(d),ve="STOPPED",ge="STARTING",me="IDLE",ye="PAUSED",_e="KEY_LOADING",be="FRAG_LOADING",Se="FRAG_LOADING_WAITING_RETRY",we="WAITING_TRACK",Ee="PARSING",Te="PARSED",ke="BUFFER_FLUSHING",xe="ENDED",Le="ERROR",Ae="WAITING_INIT_PTS",Ce="WAITING_LEVEL",Re=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.doTick=function(){},r.startLoad=function(){},r.stopLoad=function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),this.fragmentTracker.removeFragment(e)),this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=ve},r._streamEnded=function(e,t){var n=this.fragCurrent,i=this.fragmentTracker;if(!t.live&&n&&!n.backtracked&&n.sn===t.endSN&&!e.nextStart){var r=i.getState(n);return r===U||r===j}return!1},r.onMediaSeeking=function(){var e=this.config,t=this.media,n=this.mediaBuffer,i=this.state,r=t?t.currentTime:null,a=$.bufferInfo(n||t,r,this.config.maxBufferHole);if(c.logger.log("media seeking to "+(Object(l.isFiniteNumber)(r)?r.toFixed(3):r)),i===be){var o=this.fragCurrent;if(0===a.len&&o){var s=e.maxFragLookUpTolerance,u=o.start-s,f=o.start+o.duration+s;r<u||r>f?(o.loader&&(c.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),o.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=me):c.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else i===xe&&(0===a.len&&(this.fragPrevious=null,this.fragCurrent=null),this.state=me);t&&(this.lastCurrentTime=r),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=r),this.tick()},r.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},r.onHandlerDestroying=function(){this.stopLoad(),e.prototype.onHandlerDestroying.call(this)},r.onHandlerDestroyed=function(){this.state=ve,this.fragmentTracker=null},r.computeLivePosition=function(e,t){var n=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*t.targetduration;return e+Math.max(0,t.totalduration-n)},i}(pe);function De(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Oe,Ie=function(e){var t,n;function i(t,n){var i;return(i=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHING,u.default.MANIFEST_LOADING,u.default.MANIFEST_PARSED,u.default.LEVEL_LOADED,u.default.LEVELS_UPDATED,u.default.KEY_LOADED,u.default.FRAG_LOADED,u.default.FRAG_LOAD_EMERGENCY_ABORTED,u.default.FRAG_PARSING_INIT_SEGMENT,u.default.FRAG_PARSING_DATA,u.default.FRAG_PARSED,u.default.ERROR,u.default.AUDIO_TRACK_SWITCHING,u.default.AUDIO_TRACK_SWITCHED,u.default.BUFFER_CREATED,u.default.BUFFER_APPENDED,u.default.BUFFER_FLUSHED)||this).fragmentTracker=n,i.config=t.config,i.audioCodecSwap=!1,i._state=ve,i.stallReported=!1,i.gapController=null,i.altAudio=!1,i.audioOnly=!1,i.bitrateTest=!1,i}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r,o,f,d=i.prototype;return d.startLoad=function(e){if(this.levels){var t=this.lastCurrentTime,n=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var i=n.startLevel;-1===i&&(n.config.testBandwidth?(i=0,this.bitrateTest=!0):i=n.nextAutoLevel),this.level=n.nextLoadLevel=i,this.loadedmetadata=!1}t>0&&-1===e&&(c.logger.log("override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=me,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this.forceStartLoad=!0,this.state=ve},d.stopLoad=function(){this.forceStartLoad=!1,e.prototype.stopLoad.call(this)},d.doTick=function(){switch(this.state){case ke:this.fragLoadError=0;break;case me:this._doTickIdle();break;case Ce:var e=this.levels[this.level];e&&e.details&&(this.state=me);break;case Se:var t=window.performance.now(),n=this.retryDate;(!n||t>=n||this.media&&this.media.seeking)&&(c.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=me)}this._checkBuffer(),this._checkFragmentChanged()},d._doTickIdle=function(){var e=this.hls,t=e.config,n=this.media;if(void 0!==this.levelLastLoaded&&(n||!this.startFragRequested&&t.startFragPrefetch))if(this.altAudio&&this.audioOnly)this.demuxer.frag=null;else{var i;i=this.loadedmetadata?n.currentTime:this.nextLoadPosition;var r=e.nextLoadLevel,a=this.levels[r];if(a){var o,s=a.bitrate;o=s?Math.max(8*t.maxBufferSize/s,t.maxBufferLength):t.maxBufferLength,o=Math.min(o,t.maxMaxBufferLength);var l=i<t.maxBufferHole?Math.max(2,t.maxBufferHole):t.maxBufferHole,f=$.bufferInfo(this.mediaBuffer?this.mediaBuffer:n,i,l),d=f.len;if(!(d>=o)){c.logger.trace("buffer length of "+d.toFixed(3)+" is below max of "+o.toFixed(3)+". checking for more payload ..."),this.level=e.nextLoadLevel=r;var h=a.details;if(!h||h.live&&this.levelLastLoaded!==r)this.state=Ce;else{if(this._streamEnded(f,h)){var p={};return this.altAudio&&(p.type="video"),this.hls.trigger(u.default.BUFFER_EOS,p),void(this.state=xe)}this._fetchPayloadOrEos(i,f,h)}}}}},d._fetchPayloadOrEos=function(e,t,n){var i=this.fragPrevious,r=(this.level,n.fragments),a=r.length;if(0!==a){var o,s=r[0].start,l=r[a-1].start+r[a-1].duration,u=t.end;if(n.initSegment&&!n.initSegment.data)o=n.initSegment;else if(n.live){var f=this.config.initialLiveManifestSize;if(a<f)return void c.logger.warn("Can not start playback of a level, reason: not enough fragments "+a+" < "+f);if(null===(o=this._ensureFragmentAtLivePoint(n,u,s,l,i,r)))return}else u<s&&(o=r[0]);o||(o=this._findFragment(s,i,a,r,u,l,n)),o&&(o.encrypted?this._loadKey(o,n):this._loadFragment(o,n,e,u))}},d._ensureFragmentAtLivePoint=function(e,t,n,i,r,a){var o,s=this.hls.config,u=this.media,f=1/0;if(void 0!==s.liveMaxLatencyDuration?f=s.liveMaxLatencyDuration:Object(l.isFiniteNumber)(s.liveMaxLatencyDurationCount)&&(f=s.liveMaxLatencyDurationCount*e.targetduration),t<Math.max(n-s.maxFragLookUpTolerance,i-f)){var d=this.liveSyncPosition=this.computeLivePosition(n,e);t=d,u&&!u.paused&&u.readyState&&u.duration>d&&d>u.currentTime&&(c.logger.log("buffer end: "+t.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+d.toFixed(3)),u.currentTime=d),this.nextLoadPosition=d}if(e.PTSKnown&&t>i&&u&&u.readyState)return null;if(this.startFragRequested&&!e.PTSKnown&&r)if(e.hasProgramDateTime)c.logger.log("live playlist, switching playlist, load frag with same PDT: "+r.programDateTime),o=le(a,r.endProgramDateTime,s.maxFragLookUpTolerance);else{var h=r.sn+1;if(h>=e.startSN&&h<=e.endSN){var p=a[h-e.startSN];r.cc===p.cc&&(o=p,c.logger.log("live playlist, switching playlist, load frag with next SN: "+o.sn))}o||(o=G.search(a,(function(e){return r.cc-e.cc})))&&c.logger.log("live playlist, switching playlist, load frag with same CC: "+o.sn)}return o},d._findFragment=function(e,t,n,i,r,a,o){var s,l=this.hls.config;if(s=r<a?ue(t,i,r,r>a-l.maxFragLookUpTolerance?0:l.maxFragLookUpTolerance):i[n-1]){var u=s.sn-o.startSN,f=t&&s.level===t.level,d=i[u-1],h=i[u+1];if(t&&s.sn===t.sn)if(f&&!s.backtracked)if(s.sn<o.endSN){var p=t.deltaPTS;p&&p>l.maxBufferHole&&t.dropped&&u?(s=d,c.logger.warn("Previous fragment was dropped with large PTS gap between audio and video. Maybe fragment is not starting with a keyframe? Loading previous one to try to overcome this")):(s=h,this.fragmentTracker.getState(s)!==j&&c.logger.log("Re-loading fragment with SN: "+s.sn))}else s=null;else s.backtracked&&(h&&h.backtracked?(c.logger.warn("Already backtracked from fragment "+h.sn+", will not backtrack to fragment "+s.sn+". Loading fragment "+h.sn),s=h):(c.logger.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),s.dropped=0,d?(s=d).backtracked=!0:u&&(s=null)))}return s},d._loadKey=function(e,t){c.logger.log("Loading key for "+e.sn+" of ["+t.startSN+"-"+t.endSN+"], level "+this.level),this.state=_e,this.hls.trigger(u.default.KEY_LOADING,{frag:e})},d._loadFragment=function(e,t,n,i){var r=this.fragmentTracker.getState(e);this.fragCurrent=e,"initSegment"!==e.sn&&(this.startFragRequested=!0),Object(l.isFiniteNumber)(e.sn)&&!e.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),e.backtracked||r===B||r===U?(e.autoLevel=this.hls.autoLevelEnabled,e.bitrateTest=this.bitrateTest,c.logger.log("Loading "+e.sn+" of ["+t.startSN+"-"+t.endSN+"], level "+this.level+", "+(this.loadedmetadata?"currentTime":"nextLoadPosition")+": "+parseFloat(n.toFixed(3))+", bufferEnd: "+parseFloat(i.toFixed(3))),this.hls.trigger(u.default.FRAG_LOADING,{frag:e}),this.demuxer||(this.demuxer=new Z(this.hls,"main")),this.state=be):r===N&&this._reduceMaxBufferLength(e.duration)&&this.fragmentTracker.removeFragment(e)},d.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,a.MAIN)},d.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.endPTS+.5):null},d._checkFragmentChanged=function(){var e,t,n=this.media;if(n&&n.readyState&&!1===n.seeking&&((t=n.currentTime)>this.lastCurrentTime&&(this.lastCurrentTime=t),$.isBuffered(n,t)?e=this.getBufferedFrag(t):$.isBuffered(n,t+.1)&&(e=this.getBufferedFrag(t+.1)),e)){var i=e;if(i!==this.fragPlaying){this.hls.trigger(u.default.FRAG_CHANGED,{frag:i});var r=i.level;this.fragPlaying&&this.fragPlaying.level===r||this.hls.trigger(u.default.LEVEL_SWITCHED,{level:r}),this.fragPlaying=i}}},d.immediateLevelSwitch=function(){if(c.logger.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var e,t=this.media;t?(e=t.paused)||t.pause():e=!0,this.previouslyPaused=e}var n=this.fragCurrent;n&&n.loader&&n.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},d.immediateLevelSwitchEnd=function(){var e=this.media;e&&e.buffered.length&&(this.immediateSwitch=!1,e.currentTime>0&&$.isBuffered(e,e.currentTime)&&(e.currentTime-=1e-4),this.previouslyPaused||e.play())},d.nextLevelSwitch=function(){var e=this.media;if(e&&e.readyState){var t,n=this.getBufferedFrag(e.currentTime);if(n&&n.startPTS>1&&this.flushMainBuffer(0,n.startPTS-1),e.paused)t=0;else{var i=this.hls.nextLoadLevel,r=this.levels[i],a=this.fragLastKbps;t=a&&this.fragCurrent?this.fragCurrent.duration*r.bitrate/(1e3*a)+1:0}var o=this.getBufferedFrag(e.currentTime+t);if(o){var s=this.followingBufferedFrag(o);if(s){var l=this.fragCurrent;l&&l.loader&&l.loader.abort(),this.fragCurrent=null;var u=Math.max(o.endPTS,s.maxStartPTS+Math.min(this.config.maxFragLookUpTolerance,s.duration));this.flushMainBuffer(u,Number.POSITIVE_INFINITY)}}}},d.flushMainBuffer=function(e,t){this.state=ke;var n={startOffset:e,endOffset:t};this.altAudio&&(n.type="video"),this.hls.trigger(u.default.BUFFER_FLUSHING,n)},d.onMediaAttached=function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("seeked",this.onvseeked),t.addEventListener("ended",this.onvended);var n=this.config;this.levels&&n.autoStartLoad&&this.hls.startLoad(n.startPosition),this.gapController=new de(n,t,this.fragmentTracker,this.hls)},d.onMediaDetaching=function(){var e=this.media;e&&e.ended&&(c.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var t=this.levels;t&&t.forEach((function(e){e.details&&e.details.fragments.forEach((function(e){e.backtracked=void 0}))})),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("seeked",this.onvseeked),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.fragmentTracker.removeAllFragments(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},d.onMediaSeeked=function(){var e=this.media,t=e?e.currentTime:void 0;Object(l.isFiniteNumber)(t)&&c.logger.log("media seeked to "+t.toFixed(3)),this.tick()},d.onManifestLoading=function(){c.logger.log("trigger BUFFER_RESET"),this.hls.trigger(u.default.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0},d.onManifestParsed=function(e){var t,n=!1,i=!1;e.levels.forEach((function(e){(t=e.audioCodec)&&(-1!==t.indexOf("mp4a.40.2")&&(n=!0),-1!==t.indexOf("mp4a.40.5")&&(i=!0))})),this.audioCodecSwitch=n&&i,this.audioCodecSwitch&&c.logger.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.altAudio=e.altAudio,this.levels=e.levels,this.startFragRequested=!1;var r=this.config;(r.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(r.startPosition)},d.onLevelLoaded=function(e){var t=e.details,n=e.level,i=this.levels[this.levelLastLoaded],r=this.levels[n],a=t.totalduration,o=0;if(c.logger.log("level "+n+" loaded ["+t.startSN+","+t.endSN+"],duration:"+a),t.live||r.details&&r.details.live){var s=r.details;s&&t.fragments.length>0?(ne(s,t),o=t.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(o,s),t.PTSKnown&&Object(l.isFiniteNumber)(o)?c.logger.log("live playlist sliding:"+o.toFixed(3)):(c.logger.log("live playlist - outdated PTS, unknown sliding"),se(this.fragPrevious,i,t))):(c.logger.log("live playlist - first load, unknown sliding"),t.PTSKnown=!1,se(this.fragPrevious,i,t))}else t.PTSKnown=!1;if(r.details=t,this.levelLastLoaded=n,this.hls.trigger(u.default.LEVEL_UPDATED,{details:t,level:n}),!1===this.startFragRequested){if(-1===this.startPosition||-1===this.lastCurrentTime){var f=t.startTimeOffset;Object(l.isFiniteNumber)(f)?(f<0&&(c.logger.log("negative start time offset "+f+", count from end of last fragment"),f=o+a+f),c.logger.log("start time offset found in playlist, adjust startPosition to "+f),this.startPosition=f):t.live?(this.startPosition=this.computeLivePosition(o,t),c.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0,this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===Ce&&(this.state=me),this.tick()},d.onKeyLoaded=function(){this.state===_e&&(this.state=me,this.tick())},d.onFragLoaded=function(e){var t=this.fragCurrent,n=this.hls,i=this.levels,r=this.media,a=e.frag;if(this.state===be&&t&&"main"===a.type&&a.level===t.level&&a.sn===t.sn){var o=e.stats,s=i[t.level],l=s.details;if(this.bitrateTest=!1,this.stats=o,c.logger.log("Loaded "+t.sn+" of ["+l.startSN+" ,"+l.endSN+"],level "+t.level),a.bitrateTest&&n.nextLoadLevel)this.state=me,this.startFragRequested=!1,o.tparsed=o.tbuffered=window.performance.now(),n.trigger(u.default.FRAG_BUFFERED,{stats:o,frag:t,id:"main"}),this.tick();else if("initSegment"===a.sn)this.state=me,o.tparsed=o.tbuffered=window.performance.now(),l.initSegment.data=e.payload,n.trigger(u.default.FRAG_BUFFERED,{stats:o,frag:t,id:"main"}),this.tick();else{c.logger.log("Parsing "+t.sn+" of ["+l.startSN+" ,"+l.endSN+"],level "+t.level+", cc "+t.cc),this.state=Ee,this.pendingBuffering=!0,this.appended=!1,a.bitrateTest&&(a.bitrateTest=!1,this.fragmentTracker.onFragLoaded({frag:a}));var f=!(r&&r.seeking)&&(l.PTSKnown||!l.live),d=l.initSegment?l.initSegment.data:[],h=this._getAudioCodec(s);(this.demuxer=this.demuxer||new Z(this.hls,"main")).push(e.payload,d,h,s.videoCodec,t,l.totalduration,f)}}this.fragLoadError=0},d.onFragParsingInitSegment=function(e){var t=this.fragCurrent,n=e.frag;if(t&&"main"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===Ee){var i,r,a=e.tracks;if(this.audioOnly=a.audio&&!a.video,this.altAudio&&!this.audioOnly&&delete a.audio,r=a.audio){var o=this.levels[this.level].audioCodec,s=navigator.userAgent.toLowerCase();o&&this.audioCodecSwap&&(c.logger.log("swapping playlist audio codec"),o=-1!==o.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==r.metadata.channelCount&&-1===s.indexOf("firefox")&&(o="mp4a.40.5"),-1!==s.indexOf("android")&&"audio/mpeg"!==r.container&&(o="mp4a.40.2",c.logger.log("Android: force audio codec to "+o)),r.levelCodec=o,r.id=e.id}for(i in(r=a.video)&&(r.levelCodec=this.levels[this.level].videoCodec,r.id=e.id),this.hls.trigger(u.default.BUFFER_CODECS,a),a){r=a[i],c.logger.log("main track:"+i+",container:"+r.container+",codecs[level/parsed]=["+r.levelCodec+"/"+r.codec+"]");var l=r.initSegment;l&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(u.default.BUFFER_APPENDING,{type:i,data:l,parent:"main",content:"initSegment"}))}this.tick()}},d.onFragParsingData=function(e){var t=this,n=this.fragCurrent,i=e.frag;if(n&&"main"===e.id&&i.sn===n.sn&&i.level===n.level&&("audio"!==e.type||!this.altAudio)&&this.state===Ee){var r=this.levels[this.level],a=n;if(Object(l.isFiniteNumber)(e.endPTS)||(e.endPTS=e.startPTS+n.duration,e.endDTS=e.startDTS+n.duration),!0===e.hasAudio&&a.addElementaryStream(v.AUDIO),!0===e.hasVideo&&a.addElementaryStream(v.VIDEO),c.logger.log("Parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb+",dropped:"+(e.dropped||0)),"video"===e.type)if(a.dropped=e.dropped,a.dropped)if(a.backtracked)c.logger.warn("Already backtracked on this fragment, appending with the gap",a.sn);else{var o=r.details;if(!o||a.sn!==o.startSN)return c.logger.warn("missing video frame(s), backtracking fragment",a.sn),this.fragmentTracker.removeFragment(a),a.backtracked=!0,this.nextLoadPosition=e.startPTS,this.state=me,this.fragPrevious=a,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),void this.tick();c.logger.warn("missing video frame(s) on first frag, appending with gap",a.sn)}else a.backtracked=!1;var s=te(r.details,a,e.startPTS,e.endPTS,e.startDTS,e.endDTS),f=this.hls;f.trigger(u.default.LEVEL_PTS_UPDATED,{details:r.details,level:this.level,drift:s,type:e.type,start:e.startPTS,end:e.endPTS}),[e.data1,e.data2].forEach((function(n){n&&n.length&&t.state===Ee&&(t.appended=!0,t.pendingBuffering=!0,f.trigger(u.default.BUFFER_APPENDING,{type:e.type,data:n,parent:"main",content:"data"}))})),this.tick()}},d.onFragParsed=function(e){var t=this.fragCurrent,n=e.frag;t&&"main"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===Ee&&(this.stats.tparsed=window.performance.now(),this.state=Te,this._checkAppendedParsed())},d.onAudioTrackSwitching=function(e){var t=this.altAudio,n=!!e.url,i=e.id;if(!n){if(this.mediaBuffer!==this.media){c.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var r=this.fragCurrent;r.loader&&(c.logger.log("switching to main audio track, cancel main fragment load"),r.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=me}var a=this.hls;t&&a.trigger(u.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),a.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:i})}},d.onAudioTrackSwitched=function(e){var t=e.id,n=!!this.hls.audioTracks[t].url;if(n){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(c.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=n,this.tick()},d.onBufferCreated=function(e){var t,n,i=e.tracks,r=!1;for(var a in i){var o=i[a];"main"===o.id?(n=a,t=o,"video"===a&&(this.videoBuffer=i[a].buffer)):r=!0}r&&t?(c.logger.log("alternate track found, use "+n+".buffered to schedule main fragment loading"),this.mediaBuffer=t.buffer):this.mediaBuffer=this.media},d.onBufferAppended=function(e){if("main"===e.parent){var t=this.state;t!==Ee&&t!==Te||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}},d._checkAppendedParsed=function(){if(!(this.state!==Te||this.appended&&this.pendingBuffering)){var e=this.fragCurrent;if(e){var t=this.mediaBuffer?this.mediaBuffer:this.media;c.logger.log("main buffered : "+ae.toString(t.buffered)),this.fragPrevious=e;var n=this.stats;n.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*n.total/(n.tbuffered-n.tfirst)),this.hls.trigger(u.default.FRAG_BUFFERED,{stats:n,frag:e,id:"main"}),this.state=me}(this.loadedmetadata||this.startPosition<=0)&&this.tick()}},d.onError=function(e){var t=e.frag||this.fragCurrent;if(!t||"main"===t.type){var n=!!this.media&&$.isBuffered(this.media,this.media.currentTime)&&$.isBuffered(this.media,this.media.currentTime+.5);switch(e.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:if(!e.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var i=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);c.logger.warn("mediaController: frag loading failed, retry in "+i+" ms"),this.retryDate=window.performance.now()+i,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=Se}else c.logger.error("mediaController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.state=Le;break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==Le&&(e.fatal?(this.state=Le,c.logger.warn("streamController: "+e.details+",switch to "+this.state+" state ...")):e.levelRetry||this.state!==Ce||(this.state=me));break;case s.ErrorDetails.BUFFER_FULL_ERROR:"main"!==e.parent||this.state!==Ee&&this.state!==Te||(n?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=me):(c.logger.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)))}}},d._reduceMaxBufferLength=function(e){var t=this.config;return t.maxMaxBufferLength>=e&&(t.maxMaxBufferLength/=2,c.logger.warn("main:reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)},d._checkBuffer=function(){var e=this.media;if(e&&0!==e.readyState){var t=(this.mediaBuffer?this.mediaBuffer:e).buffered;!this.loadedmetadata&&t.length?(this.loadedmetadata=!0,this._seekToStartPos()):this.immediateSwitch?this.immediateLevelSwitchEnd():this.gapController.poll(this.lastCurrentTime,t)}},d.onFragLoadEmergencyAborted=function(){this.state=me,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},d.onBufferFlushed=function(){var e=this.mediaBuffer?this.mediaBuffer:this.media;if(e){var t=this.audioOnly?v.AUDIO:v.VIDEO;this.fragmentTracker.detectEvictedFragments(t,e.buffered)}this.state=me,this.fragPrevious=null},d.onLevelsUpdated=function(e){this.levels=e.levels},d.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},d._seekToStartPos=function(){var e=this.media,t=e.currentTime,n=this.startPosition;if(t!==n&&n>=0){if(e.seeking)return void c.logger.log("could not seek to "+n+", already seeking at "+t);var i=(e.buffered.length?e.buffered.start(0):0)-n;i>0&&i<this.config.maxBufferHole&&(c.logger.log("adjusting start position by "+i+" to match buffer start"),n+=i,this.startPosition=n),c.logger.log("seek to target start position "+n+" from current time "+t+". ready state "+e.readyState),e.currentTime=n}},d._getAudioCodec=function(e){var t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&(c.logger.log("swapping playlist audio codec"),t&&(t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),t},r=i,(o=[{key:"state",set:function(e){if(this.state!==e){var t=this.state;this._state=e,c.logger.log("main stream-controller: "+t+"->"+e),this.hls.trigger(u.default.STREAM_STATE_TRANSITION,{previousState:t,nextState:e})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var e=this.media;if(e){var t=this.getBufferedFrag(e.currentTime);if(t)return t.level}return-1}},{key:"nextBufferedFrag",get:function(){var e=this.media;return e?this.followingBufferedFrag(this.getBufferedFrag(e.currentTime)):null}},{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(e){this._liveSyncPosition=e}}])&&De(r.prototype,o),f&&De(r,f),i}(Re);function Pe(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Me=function(e){var t,n;function i(t){var n;return(n=e.call(this,t,u.default.MANIFEST_LOADED,u.default.LEVEL_LOADED,u.default.AUDIO_TRACK_SWITCHED,u.default.FRAG_LOADED,u.default.ERROR)||this).canload=!1,n.currentLevelIndex=null,n.manualLevelIndex=-1,n.timer=null,Oe=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r,a,o,l=i.prototype;return l.onHandlerDestroying=function(){this.clearTimer(),this.manualLevelIndex=-1},l.clearTimer=function(){null!==this.timer&&(clearTimeout(this.timer),this.timer=null)},l.startLoad=function(){var e=this._levels;this.canload=!0,this.levelRetryCount=0,e&&e.forEach((function(e){e.loadError=0;var t=e.details;t&&t.live&&(e.details=void 0)})),null!==this.timer&&this.loadLevel()},l.stopLoad=function(){this.canload=!1},l.onManifestLoaded=function(e){var t,n=[],i=[],r={},a=null,o=!1,l=!1;if(e.levels.forEach((function(e){var t=e.attrs;e.loadError=0,e.fragmentError=!1,o=o||!!e.videoCodec,l=l||!!e.audioCodec,Oe&&e.audioCodec&&-1!==e.audioCodec.indexOf("mp4a.40.34")&&(e.audioCodec=void 0),(a=r[e.bitrate])?a.url.push(e.url):(e.url=[e.url],e.urlId=0,r[e.bitrate]=e,n.push(e)),t&&(t.AUDIO&&Q(a||e,"audio",t.AUDIO),t.SUBTITLES&&Q(a||e,"text",t.SUBTITLES))})),o&&l&&(n=n.filter((function(e){return!!e.videoCodec}))),n=n.filter((function(e){var t=e.audioCodec,n=e.videoCodec;return(!t||k(t,"audio"))&&(!n||k(n,"video"))})),e.audioTracks&&(i=e.audioTracks.filter((function(e){return!e.audioCodec||k(e.audioCodec,"audio")}))).forEach((function(e,t){e.id=t})),n.length>0){t=n[0].bitrate,n.sort((function(e,t){return e.bitrate-t.bitrate})),this._levels=n;for(var f=0;f<n.length;f++)if(n[f].bitrate===t){this._firstLevel=f,c.logger.log("manifest loaded,"+n.length+" level(s) found, first bitrate:"+t);break}var d=l&&!o;this.hls.trigger(u.default.MANIFEST_PARSED,{levels:n,audioTracks:i,firstLevel:this._firstLevel,stats:e.stats,audio:l,video:o,altAudio:!d&&i.some((function(e){return!!e.url}))})}else this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:this.hls.url,reason:"no level with compatible codecs found in manifest"})},l.setLevelInternal=function(e){var t=this._levels,n=this.hls;if(e>=0&&e<t.length){if(this.clearTimer(),this.currentLevelIndex!==e){c.logger.log("switching to level "+e),this.currentLevelIndex=e;var i=t[e];i.level=e,n.trigger(u.default.LEVEL_SWITCHING,i)}var r=t[e],a=r.details;if(!a||a.live){var o=r.urlId;n.trigger(u.default.LEVEL_LOADING,{url:r.url[o],level:e,id:o})}}else n.trigger(u.default.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.LEVEL_SWITCH_ERROR,level:e,fatal:!1,reason:"invalid level idx"})},l.onError=function(e){if(e.fatal)e.type===s.ErrorTypes.NETWORK_ERROR&&this.clearTimer();else{var t,n=!1,i=!1;switch(e.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:t=e.frag.level,i=!0;break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:t=e.context.level,n=!0;break;case s.ErrorDetails.REMUX_ALLOC_ERROR:t=e.level,n=!0}void 0!==t&&this.recoverLevel(e,t,n,i)}},l.recoverLevel=function(e,t,n,i){var r,a,o,s=this,l=this.hls.config,u=e.details,f=this._levels[t];if(f.loadError++,f.fragmentError=i,n){if(!(this.levelRetryCount+1<=l.levelLoadingMaxRetry))return c.logger.error("level controller, cannot recover from "+u+" error"),this.currentLevelIndex=null,this.clearTimer(),void(e.fatal=!0);a=Math.min(Math.pow(2,this.levelRetryCount)*l.levelLoadingRetryDelay,l.levelLoadingMaxRetryTimeout),this.timer=setTimeout((function(){return s.loadLevel()}),a),e.levelRetry=!0,this.levelRetryCount++,c.logger.warn("level controller, "+u+", retry in "+a+" ms, current retry count is "+this.levelRetryCount)}(n||i)&&((r=f.url.length)>1&&f.loadError<r?(f.urlId=(f.urlId+1)%r,f.details=void 0,c.logger.warn("level controller, "+u+" for level "+t+": switching to redundant URL-id "+f.urlId)):-1===this.manualLevelIndex?(o=0===t?this._levels.length-1:t-1,c.logger.warn("level controller, "+u+": switch to "+o),this.hls.nextAutoLevel=this.currentLevelIndex=o):i&&(c.logger.warn("level controller, "+u+": reload a fragment"),this.currentLevelIndex=null))},l.onFragLoaded=function(e){var t=e.frag;if(void 0!==t&&"main"===t.type){var n=this._levels[t.level];void 0!==n&&(n.fragmentError=!1,n.loadError=0,this.levelRetryCount=0)}},l.onLevelLoaded=function(e){var t=this,n=e.level,i=e.details;if(n===this.currentLevelIndex){var r=this._levels[n];if(r.fragmentError||(r.loadError=0,this.levelRetryCount=0),i.live){var a=re(r.details,i,e.stats.trequest);c.logger.log("live playlist, reload in "+Math.round(a)+" ms"),this.timer=setTimeout((function(){return t.loadLevel()}),a)}else this.clearTimer()}},l.onAudioTrackSwitched=function(e){var t=this.hls.audioTracks[e.id].groupId,n=this.hls.levels[this.currentLevelIndex];if(n&&n.audioGroupIds){for(var i=-1,r=0;r<n.audioGroupIds.length;r++)if(n.audioGroupIds[r]===t){i=r;break}i!==n.urlId&&(n.urlId=i,this.startLoad())}},l.loadLevel=function(){if(c.logger.debug("call to loadLevel"),null!==this.currentLevelIndex&&this.canload){var e=this._levels[this.currentLevelIndex];if("object"==typeof e&&e.url.length>0){var t=this.currentLevelIndex,n=e.urlId,i=e.url[n];c.logger.log("Attempt loading level index "+t+" with URL-id "+n),this.hls.trigger(u.default.LEVEL_LOADING,{url:i,level:t,id:n})}}},l.removeLevel=function(e,t){var n=this.levels.filter((function(n,i){return i!==e||n.url.length>1&&void 0!==t&&(n.url=n.url.filter((function(e,n){return n!==t})),n.urlId=0,!0)})).map((function(e,t){var n=e.details;return n&&n.fragments&&n.fragments.forEach((function(e){e.level=t})),e}));this._levels=n,this.hls.trigger(u.default.LEVELS_UPDATED,{levels:n})},r=i,(a=[{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var t=this._levels;t&&(e=Math.min(e,t.length-1),this.currentLevelIndex===e&&t[e].details||this.setLevelInternal(e))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}}])&&Pe(r.prototype,a),o&&Pe(r,o),i}(d),Fe=n("./src/demux/id3.js");function Be(e,t){var n;try{n=new Event("addtrack")}catch(e){(n=document.createEvent("Event")).initEvent("addtrack",!1,!1)}n.track=e,t.dispatchEvent(n)}function Ne(e){if(null==e?void 0:e.cues)for(;e.cues.length>0;)e.removeCue(e.cues[0])}var Ue=function(e){var t,n;function i(t){var n;return(n=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHING,u.default.FRAG_PARSING_METADATA,u.default.LIVE_BACK_BUFFER_REACHED)||this).id3Track=void 0,n.media=void 0,n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.destroy=function(){d.prototype.destroy.call(this)},r.onMediaAttached=function(e){this.media=e.media,this.media},r.onMediaDetaching=function(){Ne(this.id3Track),this.id3Track=void 0,this.media=void 0},r.getID3Track=function(e){for(var t=0;t<e.length;t++){var n=e[t];if("metadata"===n.kind&&"id3"===n.label)return Be(n,this.media),n}return this.media.addTextTrack("metadata","id3")},r.onFragParsingMetadata=function(e){var t=e.frag,n=e.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var i=window.WebKitDataCue||window.VTTCue||window.TextTrackCue,r=0;r<n.length;r++){var a=Fe.default.getID3Frames(n[r].data);if(a){var o=Math.max(n[r].pts,0),s=r<n.length-1?n[r+1].pts:t.endPTS;s||(s=t.start+t.duration),s-o<=0&&(s=o+.25);for(var l=0;l<a.length;l++){var u=a[l];if(!Fe.default.isTimeStampFrame(u)){var c=new i(o,s,"");c.value=u,this.id3Track.addCue(c)}}}}},r.onLiveBackBufferReached=function(e){var t=e.bufferEnd,n=this.id3Track;if(n&&n.cues&&n.cues.length){var i=function(e,t){if(t<e[0].endTime)return e[0];if(t>e[e.length-1].endTime)return e[e.length-1];for(var n=0,i=e.length-1;n<=i;){var r=Math.floor((i+n)/2);if(t<e[r].endTime)i=r-1;else{if(!(t>e[r].endTime))return e[r];n=r+1}}return e[n].endTime-t<t-e[i].endTime?e[n]:e[i]}(n.cues,t);if(i)for(;n.cues[0]!==i;)n.removeCue(n.cues[0])}},i}(d),je=function(){function e(e){this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=0,this.totalWeight_=0}var t=e.prototype;return t.sample=function(e,t){var n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e},t.getTotalWeight=function(){return this.totalWeight_},t.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/e}return this.estimate_},e}(),Ve=function(){function e(e,t,n,i){this.hls=void 0,this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.hls=e,this.defaultEstimate_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new je(t),this.fast_=new je(n)}var t=e.prototype;return t.sample=function(e,t){var n=(e=Math.max(e,this.minDelayMs_))/1e3,i=8*t/n;this.fast_.sample(n,i),this.slow_.sample(n,i)},t.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},t.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.destroy=function(){},e}();function Ge(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var $e=window.performance,He=function(e){var t,n;function i(t){var n;return(n=e.call(this,t,u.default.FRAG_LOADING,u.default.FRAG_LOADED,u.default.FRAG_BUFFERED,u.default.ERROR)||this).lastLoadedFragLevel=0,n._nextAutoLevel=-1,n.hls=t,n.timer=null,n._bwEstimator=null,n.onCheck=n._abandonRulesCheck.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)),n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r,a,o,f=i.prototype;return f.destroy=function(){this.clearTimer(),d.prototype.destroy.call(this)},f.onFragLoading=function(e){var t=e.frag;if("main"===t.type&&(this.timer||(this.fragCurrent=t,this.timer=setInterval(this.onCheck,100)),!this._bwEstimator)){var n,i,r=this.hls,a=r.config,o=t.level;r.levels[o].details.live?(n=a.abrEwmaFastLive,i=a.abrEwmaSlowLive):(n=a.abrEwmaFastVoD,i=a.abrEwmaSlowVoD),this._bwEstimator=new Ve(r,i,n,a.abrEwmaDefaultEstimate)}},f._abandonRulesCheck=function(){var e=this.hls,t=e.media,n=this.fragCurrent;if(n){var i=n.loader;if(!i||i.stats&&i.stats.aborted)return c.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),void(this._nextAutoLevel=-1);var r=i.stats;if(t&&r&&(!t.paused&&0!==t.playbackRate||!t.readyState)&&n.autoLevel&&n.level){var a=$e.now()-r.trequest,o=Math.abs(t.playbackRate);if(a>500*n.duration/o){var s=e.levels,l=Math.max(1,r.bw?r.bw/8:1e3*r.loaded/a),f=s[n.level];if(!f)return;var d=f.realBitrate?Math.max(f.realBitrate,f.bitrate):f.bitrate,h=r.total?r.total:Math.max(r.loaded,Math.round(n.duration*d/8)),p=t.currentTime,v=(h-r.loaded)/l,g=($.bufferInfo(t,p,e.config.maxBufferHole).end-p)/o;if(g<2*n.duration/o&&v>g){var m,y=e.minAutoLevel;for(m=n.level-1;m>y;m--){var _=s[m].realBitrate?Math.max(s[m].realBitrate,s[m].bitrate):s[m].bitrate;if(n.duration*_/(6.4*l)<g)break}void 0<v&&(c.logger.warn("loading too slow, abort fragment loading and switch to level "+m+":fragLoadedDelay["+m+"]<fragLoadedDelay["+(n.level-1)+"];bufferStarvationDelay:"+(void 0).toFixed(1)+"<"+v.toFixed(1)+":"+g.toFixed(1)),e.nextLoadLevel=m,this._bwEstimator.sample(a,r.loaded),i.abort(),this.clearTimer(),e.trigger(u.default.FRAG_LOAD_EMERGENCY_ABORTED,{frag:n,stats:r}))}}}}},f.onFragLoaded=function(e){var t=e.frag;if("main"===t.type&&Object(l.isFiniteNumber)(t.sn)){if(this.clearTimer(),this.lastLoadedFragLevel=t.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var n=this.hls.levels[t.level],i=(n.loaded?n.loaded.bytes:0)+e.stats.loaded,r=(n.loaded?n.loaded.duration:0)+e.frag.duration;n.loaded={bytes:i,duration:r},n.realBitrate=Math.round(8*i/r)}if(e.frag.bitrateTest){var a=e.stats;a.tparsed=a.tbuffered=a.tload,this.onFragBuffered(e)}}},f.onFragBuffered=function(e){var t=e.stats,n=e.frag;if(!0!==t.aborted&&"main"===n.type&&Object(l.isFiniteNumber)(n.sn)&&(!n.bitrateTest||t.tload===t.tbuffered)){var i=t.tparsed-t.trequest;c.logger.log("latency/loading/parsing/append/kbps:"+Math.round(t.tfirst-t.trequest)+"/"+Math.round(t.tload-t.tfirst)+"/"+Math.round(t.tparsed-t.tload)+"/"+Math.round(t.tbuffered-t.tparsed)+"/"+Math.round(8*t.loaded/(t.tbuffered-t.trequest))),this._bwEstimator.sample(i,t.loaded),t.bwEstimate=this._bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=i/1e3:this.bitrateTestDelay=0}},f.onError=function(e){switch(e.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}},f.clearTimer=function(){clearInterval(this.timer),this.timer=null},f._findBestLevel=function(e,t,n,i,r,a,o,s,l){for(var u=r;u>=i;u--){var f=l[u];if(f){var d=f.details,h=d?d.totalduration/d.fragments.length:t,p=!!d&&d.live,v=void 0;v=u<=e?o*n:s*n;var g=l[u].realBitrate?Math.max(l[u].realBitrate,l[u].bitrate):l[u].bitrate,m=g*h/v;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+u+"/"+Math.round(v)+"/"+g+"/"+h+"/"+a+"/"+m),v>g&&(!m||p&&!this.bitrateTestDelay||m<a))return u}}return-1},r=i,(a=[{key:"nextAutoLevel",get:function(){var e=this._nextAutoLevel,t=this._bwEstimator;if(!(-1===e||t&&t.canEstimate()))return e;var n=this._nextABRAutoLevel;return-1!==e&&(n=Math.min(e,n)),n},set:function(e){this._nextAutoLevel=e}},{key:"_nextABRAutoLevel",get:function(){var e=this.hls,t=e.maxAutoLevel,n=e.levels,i=e.config,r=e.minAutoLevel,a=e.media,o=this.lastLoadedFragLevel,s=this.fragCurrent?this.fragCurrent.duration:0,l=a?a.currentTime:0,u=a&&0!==a.playbackRate?Math.abs(a.playbackRate):1,f=this._bwEstimator?this._bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,d=($.bufferInfo(a,l,i.maxBufferHole).end-l)/u,h=this._findBestLevel(o,s,f,r,t,d,i.abrBandWidthFactor,i.abrBandWidthUpFactor,n);if(h>=0)return h;c.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var p=s?Math.min(s,i.maxStarvationDelay):i.maxStarvationDelay,v=i.abrBandWidthFactor,g=i.abrBandWidthUpFactor;if(0===d){var m=this.bitrateTestDelay;m&&(p=(s?Math.min(s,i.maxLoadingDelay):i.maxLoadingDelay)-m,c.logger.trace("bitrate test took "+Math.round(1e3*m)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*p)+" ms"),v=g=1)}return h=this._findBestLevel(o,s,f,r,t,d+p,v,g,n),Math.max(h,0)}}])&&Ge(r.prototype,a),o&&Ge(r,o),i}(d),We=z(),Ke=function(e){var t,n;function i(t){var n;return(n=e.call(this,t,u.default.MEDIA_ATTACHING,u.default.MEDIA_DETACHING,u.default.MANIFEST_PARSED,u.default.BUFFER_RESET,u.default.BUFFER_APPENDING,u.default.BUFFER_CODECS,u.default.BUFFER_EOS,u.default.BUFFER_FLUSHING,u.default.LEVEL_PTS_UPDATED,u.default.LEVEL_UPDATED)||this)._msDuration=null,n._levelDuration=null,n._levelTargetDuration=10,n._live=null,n._objectUrl=null,n._needsFlush=!1,n._needsEos=!1,n.config=void 0,n.audioTimestampOffset=void 0,n.bufferCodecEventsExpected=0,n._bufferCodecEventsTotal=0,n.media=null,n.mediaSource=null,n.segments=[],n.parent=void 0,n.appending=!1,n.appended=0,n.appendError=0,n.flushBufferCounter=0,n.tracks={},n.pendingTracks={},n.sourceBuffer={},n.flushRange=[],n._onMediaSourceOpen=function(){c.logger.log("media source opened"),n.hls.trigger(u.default.MEDIA_ATTACHED,{media:n.media});var e=n.mediaSource;e&&e.removeEventListener("sourceopen",n._onMediaSourceOpen),n.checkPendingTracks()},n._onMediaSourceClose=function(){c.logger.log("media source closed")},n._onMediaSourceEnded=function(){c.logger.log("media source ended")},n._onSBUpdateEnd=function(){if(n.audioTimestampOffset&&n.sourceBuffer.audio){var e=n.sourceBuffer.audio;c.logger.warn("change mpeg audio timestamp offset from "+e.timestampOffset+" to "+n.audioTimestampOffset),e.timestampOffset=n.audioTimestampOffset,delete n.audioTimestampOffset}n._needsFlush&&n.doFlush(),n._needsEos&&n.checkEos(),n.appending=!1;var t=n.parent,i=n.segments.reduce((function(e,n){return n.parent===t?e+1:e}),0),r={},a=n.sourceBuffer;for(var o in a){var s=a[o];if(!s)throw Error("handling source buffer update end error: source buffer for "+o+" uninitilized and unable to update buffered TimeRanges.");r[o]=s.buffered}n.hls.trigger(u.default.BUFFER_APPENDED,{parent:t,pending:i,timeRanges:r}),n._needsFlush||n.doAppending(),n.updateMediaElementDuration(),0===i&&n.flushLiveBackBuffer()},n._onSBUpdateError=function(e){c.logger.error("sourceBuffer error:",e),n.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})},n.config=t.config,n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.destroy=function(){d.prototype.destroy.call(this)},r.onLevelPtsUpdated=function(e){var t=e.type,n=this.tracks.audio;if("audio"===t&&n&&"audio/mpeg"===n.container){var i=this.sourceBuffer.audio;if(!i)throw Error("Level PTS Updated and source buffer for audio uninitalized");if(Math.abs(i.timestampOffset-e.start)>.1){var r=i.updating;try{i.abort()}catch(e){c.logger.warn("can not abort audio buffer: "+e)}r?this.audioTimestampOffset=e.start:(c.logger.warn("change mpeg audio timestamp offset from "+i.timestampOffset+" to "+e.start),i.timestampOffset=e.start)}}},r.onManifestParsed=function(e){var t=2;(e.audio&&!e.video||!e.altAudio)&&(t=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=t,c.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},r.onMediaAttaching=function(e){var t=this.media=e.media;if(t&&We){var n=this.mediaSource=new We;n.addEventListener("sourceopen",this._onMediaSourceOpen),n.addEventListener("sourceended",this._onMediaSourceEnded),n.addEventListener("sourceclose",this._onMediaSourceClose),t.src=window.URL.createObjectURL(n),this._objectUrl=t.src}},r.onMediaDetaching=function(){c.logger.log("media source detaching");var e=this.mediaSource;if(e){if("open"===e.readyState)try{e.endOfStream()}catch(e){c.logger.warn("onMediaDetaching:"+e.message+" while calling endOfStream")}e.removeEventListener("sourceopen",this._onMediaSourceOpen),e.removeEventListener("sourceended",this._onMediaSourceEnded),e.removeEventListener("sourceclose",this._onMediaSourceClose),this.media&&(this._objectUrl&&window.URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):c.logger.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.hls.trigger(u.default.MEDIA_DETACHED)},r.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.pendingTracks,n=Object.keys(t).length;(n&&!e||2===n)&&(this.createSourceBuffers(t),this.pendingTracks={},this.doAppending())},r.onBufferReset=function(){var e=this.sourceBuffer;for(var t in e){var n=e[t];try{n&&(this.mediaSource&&this.mediaSource.removeSourceBuffer(n),n.removeEventListener("updateend",this._onSBUpdateEnd),n.removeEventListener("error",this._onSBUpdateError))}catch(e){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},r.onBufferCodecs=function(e){var t=this;Object.keys(this.sourceBuffer).length||(Object.keys(e).forEach((function(n){t.pendingTracks[n]=e[n]})),this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},r.createSourceBuffers=function(e){var t=this.sourceBuffer,n=this.mediaSource;if(!n)throw Error("createSourceBuffers called when mediaSource was null");for(var i in e)if(!t[i]){var r=e[i];if(!r)throw Error("source buffer exists for track "+i+", however track does not");var a=r.levelCodec||r.codec,o=r.container+";codecs="+a;c.logger.log("creating sourceBuffer("+o+")");try{var l=t[i]=n.addSourceBuffer(o);l.addEventListener("updateend",this._onSBUpdateEnd),l.addEventListener("error",this._onSBUpdateError),this.tracks[i]={buffer:l,codec:a,id:r.id,container:r.container,levelCodec:r.levelCodec}}catch(e){c.logger.error("error while trying to add sourceBuffer:"+e.message),this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:e,mimeType:o})}}this.hls.trigger(u.default.BUFFER_CREATED,{tracks:this.tracks})},r.onBufferAppending=function(e){this._needsFlush||(this.segments?this.segments.push(e):this.segments=[e],this.doAppending())},r.onBufferEos=function(e){for(var t in this.sourceBuffer)if(!e.type||e.type===t){var n=this.sourceBuffer[t];n&&!n.ended&&(n.ended=!0,c.logger.log(t+" sourceBuffer now EOS"))}this.checkEos()},r.checkEos=function(){var e=this.sourceBuffer,t=this.mediaSource;if(t&&"open"===t.readyState){for(var n in e){var i=e[n];if(i){if(!i.ended)return;if(i.updating)return void(this._needsEos=!0)}}c.logger.log("all media data are available, signal endOfStream() to MediaSource and stop loading fragment");try{t.endOfStream()}catch(e){c.logger.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1}else this._needsEos=!1},r.onBufferFlushing=function(e){e.type?this.flushRange.push({start:e.startOffset,end:e.endOffset,type:e.type}):(this.flushRange.push({start:e.startOffset,end:e.endOffset,type:"video"}),this.flushRange.push({start:e.startOffset,end:e.endOffset,type:"audio"})),this.flushBufferCounter=0,this.doFlush()},r.flushLiveBackBuffer=function(){if(this._live){var e=this.config.liveBackBufferLength;if(isFinite(e)&&!(e<0))if(this.media)for(var t=this.media.currentTime,n=this.sourceBuffer,i=Object.keys(n),r=t-Math.max(e,this._levelTargetDuration),a=i.length-1;a>=0;a--){var o=i[a],s=n[o];if(s){var l=s.buffered;l.length>0&&r>l.start(0)&&this.removeBufferRange(o,s,0,r)&&this.hls.trigger(u.default.LIVE_BACK_BUFFER_REACHED,{bufferEnd:r})}}else c.logger.error("flushLiveBackBuffer called without attaching media")}},r.onLevelUpdated=function(e){var t=e.details;t.fragments.length>0&&(this._levelDuration=t.totalduration+t.fragments[0].start,this._levelTargetDuration=t.averagetargetduration||t.targetduration||10,this._live=t.live,this.updateMediaElementDuration())},r.updateMediaElementDuration=function(){var e,t=this.config;if(null!==this._levelDuration&&this.media&&this.mediaSource&&this.sourceBuffer&&0!==this.media.readyState&&"open"===this.mediaSource.readyState){for(var n in this.sourceBuffer){var i=this.sourceBuffer[n];if(i&&!0===i.updating)return}e=this.media.duration,null===this._msDuration&&(this._msDuration=this.mediaSource.duration),!0===this._live&&!0===t.liveDurationInfinity?(c.logger.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>e||!Object(l.isFiniteNumber)(e))&&(c.logger.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}},r.doFlush=function(){for(;this.flushRange.length;){var e=this.flushRange[0];if(!this.flushBuffer(e.start,e.end,e.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var t=0,n=this.sourceBuffer;try{for(var i in n){var r=n[i];r&&(t+=r.buffered.length)}}catch(e){c.logger.error("error while accessing sourceBuffer.buffered")}this.appended=t,this.hls.trigger(u.default.BUFFER_FLUSHED)}},r.doAppending=function(){var e=this.config,t=this.hls,n=this.segments,i=this.sourceBuffer;if(Object.keys(i).length){if(!this.media||this.media.error)return this.segments=[],void c.logger.error("trying to append although a media error occured, flush segment and abort");if(!this.appending){var r=n.shift();if(r)try{var a=i[r.type];if(!a)return void this._onSBUpdateEnd();if(a.updating)return void n.unshift(r);a.ended=!1,this.parent=r.parent,a.appendBuffer(r.data),this.appendError=0,this.appended++,this.appending=!0}catch(i){c.logger.error("error while trying to append buffer:"+i.message),n.unshift(r);var o={type:s.ErrorTypes.MEDIA_ERROR,parent:r.parent,details:"",fatal:!1};22===i.code?(this.segments=[],o.details=s.ErrorDetails.BUFFER_FULL_ERROR):(this.appendError++,o.details=s.ErrorDetails.BUFFER_APPEND_ERROR,this.appendError>e.appendErrorMaxRetry&&(c.logger.log("fail "+e.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],o.fatal=!0)),t.trigger(u.default.ERROR,o)}}}},r.flushBuffer=function(e,t,n){var i=this.sourceBuffer;if(!Object.keys(i).length)return!0;var r="null";if(this.media&&(r=this.media.currentTime.toFixed(3)),c.logger.log("flushBuffer,pos/start/end: "+r+"/"+e+"/"+t),this.flushBufferCounter>=this.appended)return c.logger.warn("abort flushing too many retries"),!0;var a=i[n];if(a){if(a.ended=!1,a.updating)return c.logger.warn("cannot flush, sb updating in progress"),!1;if(this.removeBufferRange(n,a,e,t))return this.flushBufferCounter++,!1}return c.logger.log("buffer flushed"),!0},r.removeBufferRange=function(e,t,n,i){try{for(var r=0;r<t.buffered.length;r++){var a=t.buffered.start(r),o=t.buffered.end(r),s=Math.max(a,n),l=Math.min(o,i);if(Math.min(l,o)-s>.5){var u="null";return this.media&&(u=this.media.currentTime.toString()),c.logger.log("sb remove "+e+" ["+s+","+l+"], of ["+a+","+o+"], pos:"+u),t.remove(s,l),!0}}}catch(e){c.logger.warn("removeBufferRange failed",e)}return!1},i}(d);function ze(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var qe=function(e){var t,n;function i(t){var n;return(n=e.call(this,t,u.default.FPS_DROP_LEVEL_CAPPING,u.default.MEDIA_ATTACHING,u.default.MANIFEST_PARSED,u.default.LEVELS_UPDATED,u.default.BUFFER_CODECS,u.default.MEDIA_DETACHING)||this).autoLevelCapping=Number.POSITIVE_INFINITY,n.firstLevel=null,n.levels=[],n.media=null,n.restrictedLevels=[],n.timer=null,n.clientRect=null,n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r,a,o,s=i.prototype;return s.destroy=function(){this.hls.config.capLevelToPlayerSize&&(this.media=null,this.clientRect=null,this.stopCapping())},s.onFpsDropLevelCapping=function(e){i.isLevelAllowed(e.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(e.droppedLevel)},s.onMediaAttaching=function(e){this.media=e.media instanceof window.HTMLVideoElement?e.media:null},s.onManifestParsed=function(e){var t=this.hls;this.restrictedLevels=[],this.levels=e.levels,this.firstLevel=e.firstLevel,t.config.capLevelToPlayerSize&&e.video&&this.startCapping()},s.onBufferCodecs=function(e){this.hls.config.capLevelToPlayerSize&&e.video&&this.startCapping()},s.onLevelsUpdated=function(e){this.levels=e.levels},s.onMediaDetaching=function(){this.stopCapping()},s.detectPlayerSize=function(){if(this.media){var e=this.levels?this.levels.length:0;if(e){var t=this.hls;t.autoLevelCapping=this.getMaxLevel(e-1),t.autoLevelCapping>this.autoLevelCapping&&t.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},s.getMaxLevel=function(e){var t=this;if(!this.levels)return-1;var n=this.levels.filter((function(n,r){return i.isLevelAllowed(r,t.restrictedLevels)&&r<=e}));return this.clientRect=null,i.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)},s.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},s.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer),this.timer=null)},s.getDimensions=function(){if(this.clientRect)return this.clientRect;var e=this.media,t={width:0,height:0};if(e){var n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,t.width||t.height||(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t},i.isLevelAllowed=function(e,t){return void 0===t&&(t=[]),-1===t.indexOf(e)},i.getMaxLevelByMediaSize=function(e,t,n){if(!e||e&&!e.length)return-1;for(var i,r,a=e.length-1,o=0;o<e.length;o+=1){var s=e[o];if((s.width>=t||s.height>=n)&&(i=s,!(r=e[o+1])||i.width!==r.width||i.height!==r.height)){a=o;break}}return a},r=i,o=[{key:"contentScaleFactor",get:function(){var e=1;try{e=window.devicePixelRatio}catch(e){}return e}}],(a=[{key:"mediaWidth",get:function(){return this.getDimensions().width*i.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*i.contentScaleFactor}}])&&ze(r.prototype,a),o&&ze(r,o),i}(d),Ye=window.performance,Xe=function(e){var t,n;function i(t){return e.call(this,t,u.default.MEDIA_ATTACHING)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},r.onMediaAttaching=function(e){var t=this.hls.config;t.capLevelOnFPSDrop&&("function"==typeof(this.video=e.media instanceof window.HTMLVideoElement?e.media:null).getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),t.fpsDroppedMonitoringPeriod))},r.checkFPS=function(e,t,n){var i=Ye.now();if(t){if(this.lastTime){var r=i-this.lastTime,a=n-this.lastDroppedFrames,o=t-this.lastDecodedFrames,s=1e3*a/r,l=this.hls;if(l.trigger(u.default.FPS_DROP,{currentDropped:a,currentDecoded:o,totalDroppedFrames:n}),s>0&&a>l.config.fpsDroppedMonitoringThreshold*o){var f=l.currentLevel;c.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+f),f>0&&(-1===l.autoLevelCapping||l.autoLevelCapping>=f)&&(f-=1,l.trigger(u.default.FPS_DROP_LEVEL_CAPPING,{level:f,droppedLevel:l.currentLevel}),l.autoLevelCapping=f,l.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=n,this.lastDecodedFrames=t}},r.checkFPSInterval=function(){var e=this.video;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)},i}(d),Je=function(){function e(e){e&&e.xhrSetup&&(this.xhrSetup=e.xhrSetup)}var t=e.prototype;return t.destroy=function(){this.abort(),this.loader=null},t.abort=function(){var e=this.loader;e&&4!==e.readyState&&(this.stats.aborted=!0,e.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},t.load=function(e,t,n){this.context=e,this.config=t,this.callbacks=n,this.stats={trequest:window.performance.now(),retry:0},this.retryDelay=t.retryDelay,this.loadInternal()},t.loadInternal=function(){var e,t=this.context;e=this.loader=new window.XMLHttpRequest;var n=this.stats;n.tfirst=0,n.loaded=0;var i=this.xhrSetup;try{if(i)try{i(e,t.url)}catch(n){e.open("GET",t.url,!0),i(e,t.url)}e.readyState||e.open("GET",t.url,!0)}catch(n){return void this.callbacks.onError({code:e.status,text:n.message},t,e)}t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),e.send()},t.readystatechange=function(e){var t=e.currentTarget,n=t.readyState,i=this.stats,r=this.context,a=this.config;if(!i.aborted&&n>=2)if(window.clearTimeout(this.requestTimeout),0===i.tfirst&&(i.tfirst=Math.max(window.performance.now(),i.trequest)),4===n){var o=t.status;if(o>=200&&o<300){var s,l;i.tload=Math.max(i.tfirst,window.performance.now()),l="arraybuffer"===r.responseType?(s=t.response).byteLength:(s=t.responseText).length,i.loaded=i.total=l;var u={url:t.responseURL,data:s};this.callbacks.onSuccess(u,i,r,t)}else i.retry>=a.maxRetry||o>=400&&o<499?(c.logger.error(o+" while loading "+r.url),this.callbacks.onError({code:o,text:t.statusText},r,t)):(c.logger.warn(o+" while loading "+r.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,a.maxRetryDelay),i.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),a.timeout)},t.loadtimeout=function(){c.logger.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},t.loadprogress=function(e){var t=e.currentTarget,n=this.stats;n.loaded=e.loaded,e.lengthComputable&&(n.total=e.total);var i=this.callbacks.onProgress;i&&i(n,this.context,null,t)},e}();function Ze(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Qe=function(e){var t,n;function i(t){var n;return(n=e.call(this,t,u.default.MANIFEST_LOADING,u.default.MANIFEST_PARSED,u.default.AUDIO_TRACK_LOADED,u.default.AUDIO_TRACK_SWITCHED,u.default.LEVEL_LOADED,u.default.ERROR)||this)._trackId=-1,n._selectDefaultTrack=!0,n.tracks=[],n.trackIdBlacklist=Object.create(null),n.audioGroupId=null,n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r,a,o,l=i.prototype;return l.onManifestLoading=function(){this.tracks=[],this._trackId=-1,this._selectDefaultTrack=!0},l.onManifestParsed=function(e){var t=this.tracks=e.audioTracks||[];this.hls.trigger(u.default.AUDIO_TRACKS_UPDATED,{audioTracks:t}),this._selectAudioGroup(this.hls.nextLoadLevel)},l.onAudioTrackLoaded=function(e){if(e.id>=this.tracks.length)c.logger.warn("Invalid audio track id:",e.id);else{if(c.logger.log("audioTrack "+e.id+" loaded"),this.tracks[e.id].details=e.details,e.details.live&&!this.hasInterval()){var t=1e3*e.details.targetduration;this.setInterval(t)}!e.details.live&&this.hasInterval()&&this.clearInterval()}},l.onAudioTrackSwitched=function(e){var t=this.tracks[e.id].groupId;t&&this.audioGroupId!==t&&(this.audioGroupId=t)},l.onLevelLoaded=function(e){this._selectAudioGroup(e.level)},l.onError=function(e){e.type===s.ErrorTypes.NETWORK_ERROR&&(e.fatal&&this.clearInterval(),e.details===s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR&&(c.logger.warn("Network failure on audio-track id:",e.context.id),this._handleLoadError()))},l._setAudioTrack=function(e){if(this._trackId===e&&this.tracks[this._trackId].details)c.logger.debug("Same id as current audio-track passed, and track details available -> no-op");else if(e<0||e>=this.tracks.length)c.logger.warn("Invalid id passed to audio-track controller");else{var t=this.tracks[e];c.logger.log("Now switching to audio-track index "+e),this.clearInterval(),this._trackId=e;var n=t.url,i=t.type,r=t.id;this.hls.trigger(u.default.AUDIO_TRACK_SWITCHING,{id:r,type:i,url:n}),this._loadTrackDetailsIfNeeded(t)}},l.doTick=function(){this._updateTrack(this._trackId)},l._selectAudioGroup=function(e){var t=this.hls.levels[e];if(t&&t.audioGroupIds){var n=t.audioGroupIds[t.urlId];this.audioGroupId!==n&&(this.audioGroupId=n,this._selectInitialAudioTrack())}},l._selectInitialAudioTrack=function(){var e=this,t=this.tracks;if(t.length){var n=this.tracks[this._trackId],i=null;if(n&&(i=n.name),this._selectDefaultTrack){var r=t.filter((function(e){return e.default}));r.length?t=r:c.logger.warn("No default audio tracks defined")}var a=!1,o=function(){t.forEach((function(t){a||e.audioGroupId&&t.groupId!==e.audioGroupId||i&&i!==t.name||(e._setAudioTrack(t.id),a=!0)}))};o(),a||(i=null,o()),a||(c.logger.error("No track found for running audio group-ID: "+this.audioGroupId),this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))}},l._needsTrackLoading=function(e){var t=e.details,n=e.url;return!(t&&!t.live||!n)},l._loadTrackDetailsIfNeeded=function(e){if(this._needsTrackLoading(e)){var t=e.url,n=e.id;c.logger.log("loading audio-track playlist for id: "+n),this.hls.trigger(u.default.AUDIO_TRACK_LOADING,{url:t,id:n})}},l._updateTrack=function(e){if(!(e<0||e>=this.tracks.length)){this.clearInterval(),this._trackId=e,c.logger.log("trying to update audio-track "+e);var t=this.tracks[e];this._loadTrackDetailsIfNeeded(t)}},l._handleLoadError=function(){this.trackIdBlacklist[this._trackId]=!0;var e=this._trackId,t=this.tracks[e],n=t.name,i=t.language,r=t.groupId;c.logger.warn("Loading failed on audio track id: "+e+", group-id: "+r+', name/language: "'+n+'" / "'+i+'"');for(var a=e,o=0;o<this.tracks.length;o++)if(!this.trackIdBlacklist[o]&&this.tracks[o].name===n){a=o;break}a!==e?(c.logger.log("Attempting audio-track fallback id:",a,"group-id:",this.tracks[a].groupId),this._setAudioTrack(a)):c.logger.warn('No fallback audio-track found for name/language: "'+n+'" / "'+i+'"')},r=i,(a=[{key:"audioTracks",get:function(){return this.tracks}},{key:"audioTrack",get:function(){return this._trackId},set:function(e){this._setAudioTrack(e),this._selectDefaultTrack=!1}}])&&Ze(r.prototype,a),o&&Ze(r,o),i}(pe);function et(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var tt=window.performance,nt=function(e){var t,n;function i(t,n){var i;return(i=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHING,u.default.AUDIO_TRACKS_UPDATED,u.default.AUDIO_TRACK_SWITCHING,u.default.AUDIO_TRACK_LOADED,u.default.KEY_LOADED,u.default.FRAG_LOADED,u.default.FRAG_PARSING_INIT_SEGMENT,u.default.FRAG_PARSING_DATA,u.default.FRAG_PARSED,u.default.ERROR,u.default.BUFFER_RESET,u.default.BUFFER_CREATED,u.default.BUFFER_APPENDED,u.default.BUFFER_FLUSHED,u.default.INIT_PTS_FOUND)||this).fragmentTracker=n,i.config=t.config,i.audioCodecSwap=!1,i._state=ve,i.initPTS=[],i.waitingFragment=null,i.videoTrackCC=null,i.waitingVideoCC=null,i}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r,a,o,f=i.prototype;return f.onInitPtsFound=function(e){var t=e.id,n=e.frag.cc,i=e.initPTS;"main"===t&&(this.initPTS[n]=i,this.videoTrackCC=n,c.logger.log("InitPTS for cc: "+n+" found from main: "+i),this.state===Ae&&this.tick())},f.startLoad=function(e){if(this.tracks){var t=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),this.fragLoadError=0,t>0&&-1===e?(c.logger.log("audio:override startPosition with lastCurrentTime @"+t.toFixed(3)),this.state=me):(this.lastCurrentTime=this.startPosition?this.startPosition:e,this.state=ge),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=e,this.state=ve},f.doTick=function(){var e,t,n,i=this.hls,r=i.config;switch(this.state){case Le:case ye:case ke:break;case ge:this.state=we,this.loadedmetadata=!1;break;case me:var a=this.tracks;if(!a)break;if(!this.media&&(this.startFragRequested||!r.startFragPrefetch))break;if(this.loadedmetadata)e=this.media.currentTime;else if(void 0===(e=this.nextLoadPosition))break;var o=this.mediaBuffer?this.mediaBuffer:this.media,s=this.videoBuffer?this.videoBuffer:this.media,f=e<r.maxBufferHole?Math.max(2,r.maxBufferHole):r.maxBufferHole,d=$.bufferInfo(o,e,f),h=$.bufferInfo(s,e,f),p=d.len,v=d.end,g=this.fragPrevious,m=Math.min(r.maxBufferLength,r.maxMaxBufferLength),y=Math.max(m,h.len),_=this.audioSwitch,b=this.trackId;if((p<y||_)&&b<a.length){if(void 0===(n=a[b].details)){this.state=we;break}if(!_&&this._streamEnded(d,n))return this.hls.trigger(u.default.BUFFER_EOS,{type:"audio"}),void(this.state=xe);var S,w=n.fragments,E=w.length,T=w[0].start,k=w[E-1].start+w[E-1].duration;if(_)if(n.live&&!n.PTSKnown)c.logger.log("switching audiotrack, live stream, unknown PTS,load first fragment"),v=0;else if(v=e,n.PTSKnown&&e<T){if(!(d.end>T||d.nextStart))return;c.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=T+.05}if(n.initSegment&&!n.initSegment.data)S=n.initSegment;else if(v<=T){if(S=w[0],null!==this.videoTrackCC&&S.cc!==this.videoTrackCC&&(S=function(e,t){return G.search(e,(function(e){return e.cc<t?1:e.cc>t?-1:0}))}(w,this.videoTrackCC)),n.live&&S.loadIdx&&S.loadIdx===this.fragLoadIdx){var x=d.nextStart?d.nextStart:T;return c.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(x+.05)),void(this.media.currentTime=x+.05)}}else{var L,A=r.maxFragLookUpTolerance,C=g?w[g.sn-w[0].sn+1]:void 0;v<k?(v>k-A&&(A=0),L=C&&!ce(v,A,C)?C:G.search(w,(function(e){return ce(v,A,e)}))):L=w[E-1],L&&(S=L,T=L.start,g&&S.level===g.level&&S.sn===g.sn&&(S.sn<n.endSN?(S=w[S.sn+1-n.startSN],this.fragmentTracker.getState(S)!==j&&c.logger.log("SN just loaded, load next one: "+S.sn)):S=null))}S&&(S.encrypted?(c.logger.log("Loading key for "+S.sn+" of ["+n.startSN+" ,"+n.endSN+"],track "+b),this.state=_e,i.trigger(u.default.KEY_LOADING,{frag:S})):(this.fragCurrent=S,(_||this.fragmentTracker.getState(S)===B)&&(c.logger.log("Loading "+S.sn+", cc: "+S.cc+" of ["+n.startSN+" ,"+n.endSN+"],track "+b+", "+(this.loadedmetadata?"currentTime":"nextLoadPosition")+": "+e+", bufferEnd: "+v.toFixed(3)),"initSegment"!==S.sn&&(this.startFragRequested=!0),Object(l.isFiniteNumber)(S.sn)&&(this.nextLoadPosition=S.start+S.duration),i.trigger(u.default.FRAG_LOADING,{frag:S}),this.state=be)))}break;case we:(t=this.tracks[this.trackId])&&t.details&&(this.state=me);break;case Se:var R=tt.now(),D=this.retryDate,O=(o=this.media)&&o.seeking;(!D||R>=D||O)&&(c.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=me);break;case Ae:var I=this.waitingFragment;if(I){var P=I.frag.cc;if(void 0!==this.initPTS[P])this.waitingFragment=null,this.state=be,this.onFragLoaded(I);else if(this.videoTrackCC!==this.waitingVideoCC)c.logger.log("Waiting fragment cc ("+P+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var M=$.bufferInfo(this.mediaBuffer,this.media.currentTime,r.maxBufferHole);ce(M.end,r.maxFragLookUpTolerance,I.frag)<0&&(c.logger.log("Waiting fragment cc ("+P+") @ "+I.frag.start+" cancelled because another fragment at "+M.end+" is needed"),this.clearWaitingFragment())}}else this.state=me}},f.clearWaitingFragment=function(){var e=this.waitingFragment;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingFragment=null,this.waitingVideoCC=null,this.state=me)},f.onMediaAttached=function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("ended",this.onvended);var n=this.config;this.tracks&&n.autoStartLoad&&this.startLoad(n.startPosition)},f.onMediaDetaching=function(){var e=this.media;e&&e.ended&&(c.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},f.onAudioTracksUpdated=function(e){c.logger.log("audio tracks updated"),this.tracks=e.audioTracks},f.onAudioTrackSwitching=function(e){var t=!!e.url;this.trackId=e.id,this.fragCurrent=null,this.clearWaitingFragment(),this.state=ye,t?this.setInterval(100):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),t&&(this.audioSwitch=!0,this.state=me),this.tick()},f.onAudioTrackLoaded=function(e){var t=e.details,n=e.id,i=this.tracks[n],r=i.details,a=t.totalduration,o=0;if(c.logger.log("track "+n+" loaded ["+t.startSN+","+t.endSN+"],duration:"+a),t.live||r&&r.live?r&&t.fragments.length>0?(ne(r,t),o=t.fragments[0].start,t.PTSKnown?c.logger.log("live audio playlist sliding:"+o.toFixed(3)):c.logger.log("live audio playlist - outdated PTS, unknown sliding")):(t.PTSKnown=!1,c.logger.log("live audio playlist - first load, unknown sliding")):t.PTSKnown=!1,i.details=t,!this.startFragRequested){if(-1===this.startPosition){var s=t.startTimeOffset;Object(l.isFiniteNumber)(s)?(c.logger.log("start time offset found in playlist, adjust startPosition to "+s),this.startPosition=s):t.live?(this.startPosition=this.computeLivePosition(o,t),c.logger.log("compute startPosition for audio-track to "+this.startPosition)):this.startPosition=0}this.nextLoadPosition=this.startPosition}this.state===we&&(this.state=me),this.tick()},f.onKeyLoaded=function(){this.state===_e&&(this.state=me,this.tick())},f.onFragLoaded=function(e){var t=this.fragCurrent,n=e.frag;if(this.state===be&&t&&"audio"===n.type&&n.level===t.level&&n.sn===t.sn){var i=this.tracks[this.trackId],r=i.details,a=r.totalduration,o=t.level,s=t.sn,l=t.cc,f=this.config.defaultAudioCodec||i.audioCodec||"mp4a.40.2",d=this.stats=e.stats;if("initSegment"===s)this.state=me,d.tparsed=d.tbuffered=tt.now(),r.initSegment.data=e.payload,this.hls.trigger(u.default.FRAG_BUFFERED,{stats:d,frag:t,id:"audio"}),this.tick();else{this.state=Ee,this.appended=!1,this.demuxer||(this.demuxer=new Z(this.hls,"audio"));var h=this.initPTS[l],p=r.initSegment?r.initSegment.data:[];void 0!==h?(this.pendingBuffering=!0,c.logger.log("Demuxing "+s+" of ["+r.startSN+" ,"+r.endSN+"],track "+o),this.demuxer.push(e.payload,p,f,null,t,a,!1,h)):(c.logger.log("Unknown video PTS for cc "+l+", waiting for video PTS before demuxing audio frag "+s+" of ["+r.startSN+" ,"+r.endSN+"],track "+o),this.waitingFragment=e,this.waitingVideoCC=this.videoTrackCC,this.state=Ae)}}this.fragLoadError=0},f.onFragParsingInitSegment=function(e){var t=this.fragCurrent,n=e.frag;if(t&&"audio"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===Ee){var i,r=e.tracks;if(r.video&&delete r.video,i=r.audio){i.levelCodec=i.codec,i.id=e.id,this.hls.trigger(u.default.BUFFER_CODECS,r),c.logger.log("audio track:audio,container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var a=i.initSegment;if(a){var o={type:"audio",data:a,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[o]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(u.default.BUFFER_APPENDING,o))}this.tick()}}},f.onFragParsingData=function(e){var t=this,n=this.fragCurrent,i=e.frag;if(n&&"audio"===e.id&&"audio"===e.type&&i.sn===n.sn&&i.level===n.level&&this.state===Ee){var r=this.trackId,a=this.tracks[r],o=this.hls;Object(l.isFiniteNumber)(e.endPTS)||(e.endPTS=e.startPTS+n.duration,e.endDTS=e.startDTS+n.duration),n.addElementaryStream(v.AUDIO),c.logger.log("parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb),te(a.details,n,e.startPTS,e.endPTS);var f=this.media,d=!1;if(this.audioSwitch)if(f&&f.readyState){var h=f.currentTime;c.logger.log("switching audio track : currentTime:"+h),h>=e.startPTS&&(c.logger.log("switching audio track : flushing all audio"),this.state=ke,o.trigger(u.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),d=!0,this.audioSwitch=!1,o.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:r}))}else this.audioSwitch=!1,o.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:r});var p=this.pendingData;if(!p)return c.logger.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),void o.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:null,fatal:!0});this.audioSwitch||([e.data1,e.data2].forEach((function(t){t&&t.length&&p.push({type:e.type,data:t,parent:"audio",content:"data"})})),!d&&p.length&&(p.forEach((function(e){t.state===Ee&&(t.pendingBuffering=!0,t.hls.trigger(u.default.BUFFER_APPENDING,e))})),this.pendingData=[],this.appended=!0)),this.tick()}},f.onFragParsed=function(e){var t=this.fragCurrent,n=e.frag;t&&"audio"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===Ee&&(this.stats.tparsed=tt.now(),this.state=Te,this._checkAppendedParsed())},f.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},f.onBufferCreated=function(e){var t=e.tracks.audio;t&&(this.mediaBuffer=t.buffer,this.loadedmetadata=!0),e.tracks.video&&(this.videoBuffer=e.tracks.video.buffer)},f.onBufferAppended=function(e){if("audio"===e.parent){var t=this.state;t!==Ee&&t!==Te||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}},f._checkAppendedParsed=function(){if(!(this.state!==Te||this.appended&&this.pendingBuffering)){var e=this.fragCurrent,t=this.stats,n=this.hls;if(e){this.fragPrevious=e,t.tbuffered=tt.now(),n.trigger(u.default.FRAG_BUFFERED,{stats:t,frag:e,id:"audio"});var i=this.mediaBuffer?this.mediaBuffer:this.media;i&&c.logger.log("audio buffered : "+ae.toString(i.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,n.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=me}this.tick()}},f.onError=function(e){var t=e.frag;if(!t||"audio"===t.type)switch(e.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:var n=e.frag;if(n&&"audio"!==n.type)break;if(!e.fatal){var i=this.fragLoadError;i?i++:i=1;var r=this.config;if(i<=r.fragLoadingMaxRetry){this.fragLoadError=i;var a=Math.min(Math.pow(2,i-1)*r.fragLoadingRetryDelay,r.fragLoadingMaxRetryTimeout);c.logger.warn("AudioStreamController: frag loading failed, retry in "+a+" ms"),this.retryDate=tt.now()+a,this.state=Se}else c.logger.error("AudioStreamController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.state=Le}break;case s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==Le&&(this.state=e.fatal?Le:me,c.logger.warn("AudioStreamController: "+e.details+" while loading frag, now switching to "+this.state+" state ..."));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===e.parent&&(this.state===Ee||this.state===Te)){var o=this.mediaBuffer,l=this.media.currentTime;if(o&&$.isBuffered(o,l)&&$.isBuffered(o,l+.5)){var f=this.config;f.maxMaxBufferLength>=f.maxBufferLength&&(f.maxMaxBufferLength/=2,c.logger.warn("AudioStreamController: reduce max buffer length to "+f.maxMaxBufferLength+"s")),this.state=me}else c.logger.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=ke,this.hls.trigger(u.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}}},f.onBufferFlushed=function(){var e=this,t=this.pendingData;t&&t.length?(c.logger.log("AudioStreamController: appending pending audio data after buffer flushed"),t.forEach((function(t){e.hls.trigger(u.default.BUFFER_APPENDING,t)})),this.appended=!0,this.pendingData=[],this.state=Te):(this.state=me,this.fragPrevious=null,this.tick())},r=i,(a=[{key:"state",set:function(e){if(this.state!==e){var t=this.state;this._state=e,c.logger.log("audio stream:"+t+"->"+e)}},get:function(){return this._state}}])&&et(r.prototype,a),o&&et(r,o),i}(Re),it=function(){if("undefined"!=typeof window&&window.VTTCue)return window.VTTCue;var e={"":!0,lr:!0,rl:!0},t={start:!0,middle:!0,end:!0,left:!0,right:!0};function n(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}function i(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)e[i]=n[i]}return e}function r(t,r,a){var o=this,s={enumerable:!0};o.hasBeenReset=!1;var l="",u=!1,c=t,f=r,d=a,h=null,p="",v=!0,g="auto",m="start",y=50,_="middle",b=50,S="middle";Object.defineProperty(o,"id",i({},s,{get:function(){return l},set:function(e){l=""+e}})),Object.defineProperty(o,"pauseOnExit",i({},s,{get:function(){return u},set:function(e){u=!!e}})),Object.defineProperty(o,"startTime",i({},s,{get:function(){return c},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");c=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"endTime",i({},s,{get:function(){return f},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");f=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"text",i({},s,{get:function(){return d},set:function(e){d=""+e,this.hasBeenReset=!0}})),Object.defineProperty(o,"region",i({},s,{get:function(){return h},set:function(e){h=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"vertical",i({},s,{get:function(){return p},set:function(t){var n=function(t){return"string"==typeof t&&!!e[t.toLowerCase()]&&t.toLowerCase()}(t);if(!1===n)throw new SyntaxError("An invalid or illegal string was specified.");p=n,this.hasBeenReset=!0}})),Object.defineProperty(o,"snapToLines",i({},s,{get:function(){return v},set:function(e){v=!!e,this.hasBeenReset=!0}})),Object.defineProperty(o,"line",i({},s,{get:function(){return g},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");g=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"lineAlign",i({},s,{get:function(){return m},set:function(e){var t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");m=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"position",i({},s,{get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"positionAlign",i({},s,{get:function(){return _},set:function(e){var t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");_=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"size",i({},s,{get:function(){return b},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"align",i({},s,{get:function(){return S},set:function(e){var t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");S=t,this.hasBeenReset=!0}})),o.displayState=void 0}return r.prototype.getCueAsHTML=function(){return window.WebVTT.convertCueToDOMTree(window,this.text)},r}(),rt=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}};function at(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new rt,this.regionList=[]}function ot(){this.values=Object.create(null)}function st(e,t,n,i){var r=i?e.split(i):[e];for(var a in r)if("string"==typeof r[a]){var o=r[a].split(n);2===o.length&&t(o[0],o[1])}}ot.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var i=0;i<n.length;++i)if(t===n[i]){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))>=0&&t<=100)&&(this.set(e,t),!0)}};var lt=new it(0,0,0),ut="middle"===lt.align?"middle":"center";function ct(e,t,n){var i=e;function r(){var t=function(e){function t(e,t,n,i){return 3600*(0|e)+60*(0|t)+(0|n)+(0|i)/1e3}var n=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}(e);if(null===t)throw new Error("Malformed timestamp: "+i);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=r(),a(),"--\x3e"!==e.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);e=e.substr(3),a(),t.endTime=r(),a(),function(e,t){var i=new ot;st(e,(function(e,t){switch(e){case"region":for(var r=n.length-1;r>=0;r--)if(n[r].id===t){i.set(e,n[r].region);break}break;case"vertical":i.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),o=a[0];i.integer(e,o),i.percent(e,o)&&i.set("snapToLines",!1),i.alt(e,o,["auto"]),2===a.length&&i.alt("lineAlign",a[1],["start",ut,"end"]);break;case"position":a=t.split(","),i.percent(e,a[0]),2===a.length&&i.alt("positionAlign",a[1],["start",ut,"end","line-left","line-right","auto"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start",ut,"end","left","right"])}}),/:/,/\s/),t.region=i.get("region",null),t.vertical=i.get("vertical","");var r=i.get("line","auto");"auto"===r&&-1===lt.line&&(r=-1),t.line=r,t.lineAlign=i.get("lineAlign","start"),t.snapToLines=i.get("snapToLines",!0),t.size=i.get("size",100),t.align=i.get("align",ut);var a=i.get("position","auto");"auto"===a&&50===lt.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}(e,t)}function ft(e){return e.replace(/<br(?: \/)?>/gi,"\n")}at.prototype={parse:function(e){var t=this;function n(){var e=t.buffer,n=0;for(e=ft(e);n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var i=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),i}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var i;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var r=(i=n()).match(/^()?WEBVTT([ \t].*)?$/);if(!r||!r[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}for(var a=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(a?a=!1:i=n(),t.state){case"HEADER":/:/.test(i)?st(i,(function(e,t){}),/:/):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;if(t.cue=new it(0,0,""),t.state="CUE",-1===i.indexOf("--\x3e")){t.cue.id=i;continue}case"CUE":try{ct(i,t.cue,t.regionList)}catch(e){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var o=-1!==i.indexOf("--\x3e");if(!i||o&&(a=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=i;continue;case"BADCUE":i||(t.state="ID");continue}}}catch(e){"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(){try{if(this.buffer+=this.decoder.decode(),(this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state)throw new Error("Malformed WebVTT signature.")}catch(e){throw e}return this.onflush&&this.onflush(),this}};var dt=at;function ht(e,t,n,i){for(var r,a,o,s,l,u=[],c=window.VTTCue||TextTrackCue,f=0;f<i.rows.length;f++)if(o=!0,s=0,l="",!(r=i.rows[f]).isEmpty()){for(var d=0;d<r.chars.length;d++)r.chars[d].uchar.match(/\s/)&&o?s++:(l+=r.chars[d].uchar,o=!1);r.cueStartTime=t,t===n&&(n+=1e-4),a=new c(t,n,ft(l.trim())),s>=16?s--:s++,navigator.userAgent.match(/Firefox\//)?a.line=f+1:a.line=f>7?f-2:f+1,a.align="left",a.position=Math.max(0,Math.min(100,s/32*100)),u.push(a),e&&e.addCue(a)}return u}var pt,vt={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},gt=function(e){var t=e;return vt.hasOwnProperty(e)&&(t=vt[e]),String.fromCharCode(t)},mt={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},yt={17:2,18:4,21:6,22:8,23:10,19:13,20:15},_t={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},bt={25:2,26:4,29:6,30:8,31:10,27:13,28:15},St=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];!function(e){e[e.ERROR=0]="ERROR",e[e.TEXT=1]="TEXT",e[e.WARNING=2]="WARNING",e[e.INFO=2]="INFO",e[e.DEBUG=3]="DEBUG",e[e.DATA=3]="DATA"}(pt||(pt={}));var wt=function(){function e(){this.time=null,this.verboseLevel=pt.ERROR}return e.prototype.log=function(e,t){this.verboseLevel>=e&&c.logger.log(this.time+" ["+e+"] "+t)},e}(),Et=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].toString(16));return t},Tt=function(){function e(e,t,n,i,r){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=e||"white",this.underline=t||!1,this.italics=n||!1,this.background=i||"black",this.flash=r||!1}var t=e.prototype;return t.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},t.setStyles=function(e){for(var t=["foreground","underline","italics","background","flash"],n=0;n<t.length;n++){var i=t[n];e.hasOwnProperty(i)&&(this[i]=e[i])}},t.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},t.equals=function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},t.copy=function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},t.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},e}(),kt=function(){function e(e,t,n,i,r,a){this.uchar=void 0,this.penState=void 0,this.uchar=e||" ",this.penState=new Tt(t,n,i,r,a)}var t=e.prototype;return t.reset=function(){this.uchar=" ",this.penState.reset()},t.setChar=function(e,t){this.uchar=e,this.penState.copy(t)},t.setPenState=function(e){this.penState.copy(e)},t.equals=function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},t.copy=function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},t.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},e}(),xt=function(){function e(e){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var t=0;t<100;t++)this.chars.push(new kt);this.logger=e,this.pos=0,this.currPenState=new Tt}var t=e.prototype;return t.equals=function(e){for(var t=!0,n=0;n<100;n++)if(!this.chars[n].equals(e.chars[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<100;t++)this.chars[t].copy(e.chars[t])},t.isEmpty=function(){for(var e=!0,t=0;t<100;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},t.setCursor=function(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(pt.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>100&&(this.logger.log(pt.DEBUG,"Too large cursor position "+this.pos),this.pos=100)},t.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)},t.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},t.insertChar=function(e){e>=144&&this.backSpace();var t=gt(e);this.pos>=100?this.logger.log(pt.ERROR,"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))},t.clearFromPos=function(e){var t;for(t=e;t<100;t++)this.chars[t].reset()},t.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},t.clearToEndOfRow=function(){this.clearFromPos(this.pos)},t.getTextString=function(){for(var e=[],t=!0,n=0;n<100;n++){var i=this.chars[n].uchar;" "!==i&&(t=!1),e.push(i)}return t?"":e.join("")},t.setPenStyles=function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)},e}(),Lt=function(){function e(e){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var t=0;t<15;t++)this.rows.push(new xt(e));this.logger=e,this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var t=e.prototype;return t.reset=function(){for(var e=0;e<15;e++)this.rows[e].clear();this.currRow=14},t.equals=function(e){for(var t=!0,n=0;n<15;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<15;t++)this.rows[t].copy(e.rows[t])},t.isEmpty=function(){for(var e=!0,t=0;t<15;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},t.backSpace=function(){this.rows[this.currRow].backSpace()},t.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},t.insertChar=function(e){this.rows[this.currRow].insertChar(e)},t.setPen=function(e){this.rows[this.currRow].setPenStyles(e)},t.moveCursor=function(e){this.rows[this.currRow].moveCursor(e)},t.setCursor=function(e){this.logger.log(pt.INFO,"setCursor: "+e),this.rows[this.currRow].setCursor(e)},t.setPAC=function(e){this.logger.log(pt.INFO,"pacData = "+JSON.stringify(e));var t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(var n=0;n<15;n++)this.rows[n].clear();var i=this.currRow+1-this.nrRollUpRows,r=this.lastOutputScreen;if(r){var a=r.rows[i].cueStartTime,o=this.logger.time;if(a&&null!==o&&a<o)for(var s=0;s<this.nrRollUpRows;s++)this.rows[t-this.nrRollUpRows+s+1].copy(r.rows[i+s])}}this.currRow=t;var l=this.rows[this.currRow];if(null!==e.indent){var u=e.indent,c=Math.max(u-1,0);l.setCursor(e.indent),e.color=l.chars[c].penState.foreground}var f={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(f)},t.setBkgData=function(e){this.logger.log(pt.INFO,"bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)},t.setRollUpRows=function(e){this.nrRollUpRows=e},t.rollUp=function(){if(null!==this.nrRollUpRows){this.logger.log(pt.TEXT,this.getDisplayText());var e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(pt.INFO,"Rolling up")}else this.logger.log(pt.DEBUG,"roll_up but nrRollUpRows not set yet")},t.getDisplayText=function(e){e=e||!1;for(var t=[],n="",i=-1,r=0;r<15;r++){var a=this.rows[r].getTextString();a&&(i=r+1,e?t.push("Row "+i+": '"+a+"'"):t.push(a.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},t.getTextAndFormat=function(){return this.rows},e}(),At=function(){function e(e,t,n){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new Lt(n),this.nonDisplayedMemory=new Lt(n),this.lastOutputScreen=new Lt(n),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}var t=e.prototype;return t.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},t.getHandler=function(){return this.outputFilter},t.setHandler=function(e){this.outputFilter=e},t.setPAC=function(e){this.writeScreen.setPAC(e)},t.setBkgData=function(e){this.writeScreen.setBkgData(e)},t.setMode=function(e){e!==this.mode&&(this.mode=e,this.logger.log(pt.INFO,"MODE="+e),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},t.insertChars=function(e){for(var t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(pt.INFO,n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(pt.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},t.ccRCL=function(){this.logger.log(pt.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},t.ccBS=function(){this.logger.log(pt.INFO,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},t.ccAOF=function(){},t.ccAON=function(){},t.ccDER=function(){this.logger.log(pt.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},t.ccRU=function(e){this.logger.log(pt.INFO,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},t.ccFON=function(){this.logger.log(pt.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},t.ccRDC=function(){this.logger.log(pt.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},t.ccTR=function(){this.logger.log(pt.INFO,"TR"),this.setMode("MODE_TEXT")},t.ccRTD=function(){this.logger.log(pt.INFO,"RTD"),this.setMode("MODE_TEXT")},t.ccEDM=function(){this.logger.log(pt.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},t.ccCR=function(){this.logger.log(pt.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},t.ccENM=function(){this.logger.log(pt.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},t.ccEOC=function(){if(this.logger.log(pt.INFO,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(pt.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},t.ccTO=function(e){this.logger.log(pt.INFO,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},t.ccMIDROW=function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}this.logger.log(pt.INFO,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},t.outputDataUpdate=function(e){void 0===e&&(e=!1);var t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))},t.cueSplitAtTime=function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))},e}();function Ct(e,t,n){n.a=e,n.b=t}function Rt(e,t,n){return n.a===e&&n.b===t}var Dt=function(){function e(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var i=new wt;this.channels=[null,new At(e,t,i),new At(e+1,n,i)],this.cmdHistory={a:null,b:null},this.logger=i}var t=e.prototype;return t.getHandler=function(e){return this.channels[e].getHandler()},t.setHandler=function(e,t){this.channels[e].setHandler(t)},t.addData=function(e,t){var n,i,r,a=!1;this.logger.time=e;for(var o=0;o<t.length;o+=2)if(i=127&t[o],r=127&t[o+1],0!==i||0!==r){if(this.logger.log(pt.DATA,"["+Et([t[o],t[o+1]])+"] -> ("+Et([i,r])+")"),(n=this.parseCmd(i,r))||(n=this.parseMidrow(i,r)),n||(n=this.parsePAC(i,r)),n||(n=this.parseBackgroundAttributes(i,r)),!n&&(a=this.parseChars(i,r))){var s=this.currentChannel;s&&s>0?this.channels[s].insertChars(a):this.logger.log(pt.WARNING,"No channel found yet. TEXT-MODE?")}n||a||this.logger.log(pt.WARNING,"Couldn't parse cleaned data "+Et([i,r])+" orig: "+Et([t[o],t[o+1]]))}},t.parseCmd=function(e,t){var n=this.cmdHistory;if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=33&&t<=35))return!1;if(Rt(e,t,n))return Ct(null,null,n),this.logger.log(pt.DEBUG,"Repeated command ("+Et([e,t])+") is dropped"),!0;var i=20===e||21===e||23===e?1:2,r=this.channels[i];return 20===e||21===e||28===e||29===e?32===t?r.ccRCL():33===t?r.ccBS():34===t?r.ccAOF():35===t?r.ccAON():36===t?r.ccDER():37===t?r.ccRU(2):38===t?r.ccRU(3):39===t?r.ccRU(4):40===t?r.ccFON():41===t?r.ccRDC():42===t?r.ccTR():43===t?r.ccRTD():44===t?r.ccEDM():45===t?r.ccCR():46===t?r.ccENM():47===t&&r.ccEOC():r.ccTO(t-32),Ct(e,t,n),this.currentChannel=i,!0},t.parseMidrow=function(e,t){var n=0;if((17===e||25===e)&&t>=32&&t<=47){if((n=17===e?1:2)!==this.currentChannel)return this.logger.log(pt.ERROR,"Mismatch channel in midrow parsing"),!1;var i=this.channels[n];return!!i&&(i.ccMIDROW(t),this.logger.log(pt.DEBUG,"MIDROW ("+Et([e,t])+")"),!0)}return!1},t.parsePAC=function(e,t){var n,i=this.cmdHistory;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127||(16===e||24===e)&&t>=64&&t<=95))return!1;if(Rt(e,t,i))return Ct(null,null,i),!0;var r=e<=23?1:2;n=t>=64&&t<=95?1===r?mt[e]:_t[e]:1===r?yt[e]:bt[e];var a=this.channels[r];return!!a&&(a.setPAC(this.interpretPAC(n,t)),Ct(e,t,i),this.currentChannel=r,!0)},t.interpretPAC=function(e,t){var n=t,i={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,i.underline=1==(1&n),n<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(i.italics=!0,i.color="white"):i.indent=4*Math.floor((n-16)/2),i},t.parseChars=function(e,t){var n,i=null,r=null;if(e>=25?(n=2,r=e-8):(n=1,r=e),r>=17&&r<=19){var a=t;a=17===r?t+80:18===r?t+112:t+144,this.logger.log(pt.INFO,"Special char '"+gt(a)+"' in channel "+n),i=[a]}else e>=32&&e<=127&&(i=0===t?[e]:[e,t]);if(i){var o=Et(i);this.logger.log(pt.DEBUG,"Char codes = "+o.join(",")),Ct(e,t,this.cmdHistory)}return i},t.parseBackgroundAttributes=function(e,t){var n;if(!((16===e||24===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=45&&t<=47))return!1;var i={};16===e||24===e?(n=Math.floor((t-32)/2),i.background=St[n],t%2==1&&(i.background=i.background+"_semi")):45===t?i.background="transparent":(i.foreground="black",47===t&&(i.underline=!0));var r=e<=23?1:2;return this.channels[r].setBkgData(i),Ct(e,t,this.cmdHistory),!0},t.reset=function(){for(var e=0;e<Object.keys(this.channels).length;e++){var t=this.channels[e];t&&t.reset()}this.cmdHistory={a:null,b:null}},t.cueSplitAtTime=function(e){for(var t=0;t<this.channels.length;t++){var n=this.channels[t];n&&n.cueSplitAtTime(e)}},e}(),Ot=function(){function e(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}var t=e.prototype;return t.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)},t.newCue=function(e,t,n){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)},t.reset=function(){this.cueRanges=[]},e}(),It=function(e,t,n){return e.substr(n||0,t.length)===t},Pt=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return(t>>>0).toString()},Mt={parse:function(e,t,n,i,r,a){var o,s=Object(Fe.utf8ArrayToStr)(new Uint8Array(e)).trim().replace(/\r\n|\n\r|\n|\r/g,"\n").split("\n"),u="00:00.000",c=0,f=0,d=0,h=[],p=!0,v=!1,g=new dt;g.oncue=function(e){var t=n[i],r=n.ccOffset;t&&t.new&&(void 0!==f?r=n.ccOffset=t.start:function(e,t,n){var i=e[t],r=e[i.prevCC];if(!r||!r.new&&i.new)return e.ccOffset=e.presentationOffset=i.start,void(i.new=!1);for(;r&&r.new;)e.ccOffset+=i.start-r.start,i.new=!1,r=e[(i=r).prevCC];e.presentationOffset=n}(n,i,d)),d&&(r=d-n.presentationOffset),v&&(e.startTime+=r-f,e.endTime+=r-f),e.id=Pt(e.startTime.toString())+Pt(e.endTime.toString())+Pt(e.text),e.text=decodeURIComponent(encodeURIComponent(e.text)),e.endTime>0&&h.push(e)},g.onparsingerror=function(e){o=e},g.onflush=function(){o&&a?a(o):r(h)},s.forEach((function(e){if(p){if(It(e,"X-TIMESTAMP-MAP=")){p=!1,v=!0,e.substr(16).split(",").forEach((function(e){It(e,"LOCAL:")?u=e.substr(6):It(e,"MPEGTS:")&&(c=parseInt(e.substr(7)))}));try{t+(9e4*n[i].start||0)<0&&(t+=8589934592),c-=t,f=function(e){var t=parseInt(e.substr(-3)),n=parseInt(e.substr(-6,2)),i=parseInt(e.substr(-9,2)),r=e.length>9?parseInt(e.substr(0,e.indexOf(":"))):0;if(!(Object(l.isFiniteNumber)(t)&&Object(l.isFiniteNumber)(n)&&Object(l.isFiniteNumber)(i)&&Object(l.isFiniteNumber)(r)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*n,t+=6e4*i,t+=36e5*r}(u)/1e3,d=c/9e4}catch(e){v=!1,o=e}return}""===e&&(p=!1)}g.parse(e+"\n")})),g.flush()}};function Ft(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bt(e,t){return e&&e.label===t.name&&!(e.textTrack1||e.textTrack2)}var Nt=function(e){var t,n;function i(t){var n;if((n=e.call(this,t,u.default.MEDIA_ATTACHING,u.default.MEDIA_DETACHING,u.default.FRAG_PARSING_USERDATA,u.default.FRAG_DECRYPTED,u.default.MANIFEST_LOADING,u.default.MANIFEST_LOADED,u.default.FRAG_LOADED,u.default.INIT_PTS_FOUND)||this).media=null,n.config=void 0,n.enabled=!0,n.Cues=void 0,n.textTracks=[],n.tracks=[],n.initPTS=[],n.unparsedVttFrags=[],n.captionsTracks={},n.nonNativeCaptionsTracks={},n.captionsProperties=void 0,n.cea608Parser1=void 0,n.cea608Parser2=void 0,n.lastSn=-1,n.prevCC=-1,n.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},n.hls=t,n.config=t.config,n.Cues=t.config.cueHandler,n.captionsProperties={textTrack1:{label:n.config.captionsTextTrack1Label,languageCode:n.config.captionsTextTrack1LanguageCode},textTrack2:{label:n.config.captionsTextTrack2Label,languageCode:n.config.captionsTextTrack2LanguageCode},textTrack3:{label:n.config.captionsTextTrack3Label,languageCode:n.config.captionsTextTrack3LanguageCode},textTrack4:{label:n.config.captionsTextTrack4Label,languageCode:n.config.captionsTextTrack4LanguageCode}},n.config.enableCEA708Captions){var i=new Ot(Ft(n),"textTrack1"),r=new Ot(Ft(n),"textTrack2"),a=new Ot(Ft(n),"textTrack3"),o=new Ot(Ft(n),"textTrack4");n.cea608Parser1=new Dt(1,i,r),n.cea608Parser2=new Dt(3,a,o)}return n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.addCues=function(e,t,n,i,r){for(var a,o,s,l,c=!1,f=r.length;f--;){var d=r[f],h=(a=d[0],o=d[1],s=t,l=n,Math.min(o,l)-Math.max(a,s));if(h>=0&&(d[0]=Math.min(d[0],t),d[1]=Math.max(d[1],n),c=!0,h/(n-t)>.5))return}if(c||r.push([t,n]),this.config.renderTextTracksNatively)this.Cues.newCue(this.captionsTracks[e],t,n,i);else{var p=this.Cues.newCue(null,t,n,i);this.hls.trigger(u.default.CUES_PARSED,{type:"captions",cues:p,track:e})}},r.onInitPtsFound=function(e){var t=this,n=e.frag,i=e.id,r=e.initPTS,a=this.unparsedVttFrags;"main"===i&&(this.initPTS[n.cc]=r),a.length&&(this.unparsedVttFrags=[],a.forEach((function(e){t.onFragLoaded(e)})))},r.getExistingTrack=function(e){var t=this.media;if(t)for(var n=0;n<t.textTracks.length;n++){var i=t.textTracks[n];if(i[e])return i}return null},r.createCaptionsTrack=function(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)},r.createNativeTrack=function(e){if(!this.captionsTracks[e]){var t=this.captionsProperties,n=this.captionsTracks,i=this.media,r=t[e],a=r.label,o=r.languageCode,s=this.getExistingTrack(e);if(s)n[e]=s,Ne(n[e]),Be(n[e],i);else{var l=this.createTextTrack("captions",a,o);l&&(l[e]=!0,n[e]=l)}}},r.createNonNativeTrack=function(e){if(!this.nonNativeCaptionsTracks[e]){var t=this.captionsProperties[e];if(t){var n={_id:e,label:t.label,kind:"captions",default:!!t.media&&!!t.media.default,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=n,this.hls.trigger(u.default.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[n]})}}},r.createTextTrack=function(e,t,n){var i=this.media;if(i)return i.addTextTrack(e,t,n)},r.destroy=function(){e.prototype.destroy.call(this)},r.onMediaAttaching=function(e){this.media=e.media,this._cleanTracks()},r.onMediaDetaching=function(){var e=this.captionsTracks;Object.keys(e).forEach((function(t){Ne(e[t]),delete e[t]})),this.nonNativeCaptionsTracks={}},r.onManifestLoading=function(){this.lastSn=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={}},r._cleanTracks=function(){var e=this.media;if(e){var t=e.textTracks;if(t)for(var n=0;n<t.length;n++)Ne(t[n])}},r.onManifestLoaded=function(e){var t=this;if(this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset()),this.config.enableWebVTT){var n=e.subtitles||[],i=this.tracks&&n&&this.tracks.length===n.length;if(this.tracks=e.subtitles||[],this.config.renderTextTracksNatively){var r=this.media?this.media.textTracks:[];this.tracks.forEach((function(e,n){var i;if(n<r.length){for(var a=null,o=0;o<r.length;o++)if(Bt(r[o],e)){a=r[o];break}a&&(i=a)}i||(i=t.createTextTrack("subtitles",e.name,e.lang)),e.default?i.mode=t.hls.subtitleDisplay?"showing":"hidden":i.mode="disabled",t.textTracks.push(i)}))}else if(!i&&this.tracks&&this.tracks.length){var a=this.tracks.map((function(e){return{label:e.name,kind:e.type.toLowerCase(),default:e.default,subtitleTrack:e}}));this.hls.trigger(u.default.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:a})}}this.config.enableCEA708Captions&&e.captions&&e.captions.forEach((function(e){var n=/(?:CC|SERVICE)([1-4])/.exec(e.instreamId);if(n){var i="textTrack"+n[1],r=t.captionsProperties[i];r&&(r.label=e.name,e.lang&&(r.languageCode=e.lang),r.media=e)}}))},r.onFragLoaded=function(e){var t=e.frag,n=e.payload,i=this.cea608Parser1,r=this.cea608Parser2,a=this.initPTS,o=this.lastSn,s=this.unparsedVttFrags;if("main"===t.type){var c=t.sn;t.sn!==o+1&&i&&r&&(i.reset(),r.reset()),this.lastSn=c}else if("subtitle"===t.type)if(n.byteLength){if(!Object(l.isFiniteNumber)(a[t.cc]))return s.push(e),void(a.length&&this.hls.trigger(u.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t}));var f=t.decryptdata;null!=f&&null!=f.key&&"AES-128"===f.method||this._parseVTTs(t,n)}else this.hls.trigger(u.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t})},r._parseVTTs=function(e,t){var n=this,i=this.hls,r=this.prevCC,a=this.textTracks,o=this.vttCCs;o[e.cc]||(o[e.cc]={start:e.start,prevCC:r,new:!0},this.prevCC=e.cc),Mt.parse(t,this.initPTS[e.cc],o,e.cc,(function(t){if(n.config.renderTextTracksNatively){var r=a[e.level];if("disabled"===r.mode)return void i.trigger(u.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e});t.forEach((function(e){if(!r.cues.getCueById(e.id))try{if(r.addCue(e),!r.cues.getCueById(e.id))throw new Error("addCue is failed for: "+e)}catch(n){c.logger.debug("Failed occurred on adding cues: "+n);var t=new window.TextTrackCue(e.startTime,e.endTime,e.text);t.id=e.id,r.addCue(t)}}))}else{var o=n.tracks[e.level].default?"default":"subtitles"+e.level;i.trigger(u.default.CUES_PARSED,{type:"subtitles",cues:t,track:o})}i.trigger(u.default.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(function(t){c.logger.log("Failed to parse VTT cue: "+t),i.trigger(u.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e})}))},r.onFragDecrypted=function(e){var t=e.frag,n=e.payload;if("subtitle"===t.type){if(!Object(l.isFiniteNumber)(this.initPTS[t.cc]))return void this.unparsedVttFrags.push(e);this._parseVTTs(t,n)}},r.onFragParsingUserdata=function(e){var t=this.cea608Parser1,n=this.cea608Parser2;if(this.enabled&&t&&n)for(var i=0;i<e.samples.length;i++){var r=e.samples[i].bytes;if(r){var a=this.extractCea608Data(r);t.addData(e.samples[i].pts,a[0]),n.addData(e.samples[i].pts,a[1])}}},r.extractCea608Data=function(e){for(var t=31&e[0],n=2,i=[[],[]],r=0;r<t;r++){var a=e[n++],o=127&e[n++],s=127&e[n++],l=3&a;0===o&&0===s||0!=(4&a)&&(0!==l&&1!==l||(i[l].push(o),i[l].push(s)))}return i},i}(d);function Ut(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function jt(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];"subtitles"===i.kind&&i.label&&t.push(e[n])}return t}var Vt,Gt=function(e){var t,n;function i(t){var n;return(n=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHING,u.default.MANIFEST_LOADED,u.default.SUBTITLE_TRACK_LOADED)||this).tracks=[],n.trackId=-1,n.media=null,n.stopped=!0,n.subtitleDisplay=!0,n.queuedDefaultTrack=null,n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r,a,o,s=i.prototype;return s.destroy=function(){d.prototype.destroy.call(this)},s.onMediaAttached=function(e){var t=this;this.media=e.media,this.media&&(Object(l.isFiniteNumber)(this.queuedDefaultTrack)&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=null),this.trackChangeListener=this._onTextTracksChanged.bind(this),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.subtitlePollingInterval=setInterval((function(){t.trackChangeListener()}),500):this.media.textTracks.addEventListener("change",this.trackChangeListener))},s.onMediaDetaching=function(){this.media&&(this.useTextTrackPolling?clearInterval(this.subtitlePollingInterval):this.media.textTracks.removeEventListener("change",this.trackChangeListener),Object(l.isFiniteNumber)(this.subtitleTrack)&&(this.queuedDefaultTrack=this.subtitleTrack),jt(this.media.textTracks).forEach((function(e){Ne(e)})),this.subtitleTrack=-1,this.media=null)},s.onManifestLoaded=function(e){var t=this,n=e.subtitles||[];this.tracks=n,this.hls.trigger(u.default.SUBTITLE_TRACKS_UPDATED,{subtitleTracks:n}),n.forEach((function(e){e.default&&(t.media?t.subtitleTrack=e.id:t.queuedDefaultTrack=e.id)}))},s.onSubtitleTrackLoaded=function(e){var t=this,n=e.id,i=e.details,r=this.trackId,a=this.tracks,o=a[r];if(n>=a.length||n!==r||!o||this.stopped)this._clearReloadTimer();else if(c.logger.log("subtitle track "+n+" loaded"),i.live){var s=re(o.details,i,e.stats.trequest);c.logger.log("Reloading live subtitle playlist in "+s+"ms"),this.timer=setTimeout((function(){t._loadCurrentTrack()}),s)}else this._clearReloadTimer()},s.startLoad=function(){this.stopped=!1,this._loadCurrentTrack()},s.stopLoad=function(){this.stopped=!0,this._clearReloadTimer()},s._clearReloadTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},s._loadCurrentTrack=function(){var e=this.trackId,t=this.tracks,n=this.hls,i=t[e];e<0||!i||i.details&&!i.details.live||(c.logger.log("Loading subtitle track "+e),n.trigger(u.default.SUBTITLE_TRACK_LOADING,{url:i.url,id:e}))},s._toggleTrackModes=function(e){var t=this.media,n=this.subtitleDisplay,i=this.trackId;if(t){var r=jt(t.textTracks);if(-1===e)[].slice.call(r).forEach((function(e){e.mode="disabled"}));else{var a=r[i];a&&(a.mode="disabled")}var o=r[e];o&&(o.mode=n?"showing":"hidden")}},s._setSubtitleTrackInternal=function(e){var t=this.hls,n=this.tracks;!Object(l.isFiniteNumber)(e)||e<-1||e>=n.length||(this.trackId=e,c.logger.log("Switching to subtitle track "+e),t.trigger(u.default.SUBTITLE_TRACK_SWITCH,{id:e}),this._loadCurrentTrack())},s._onTextTracksChanged=function(){if(this.media&&this.hls.config.renderTextTracksNatively){for(var e=-1,t=jt(this.media.textTracks),n=0;n<t.length;n++)if("hidden"===t[n].mode)e=n;else if("showing"===t[n].mode){e=n;break}this.subtitleTrack=e}},r=i,(a=[{key:"subtitleTracks",get:function(){return this.tracks}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(e){this.trackId!==e&&(this._toggleTrackModes(e),this._setSubtitleTrackInternal(e))}}])&&Ut(r.prototype,a),o&&Ut(r,o),i}(d),$t=n("./src/crypt/decrypter.js"),Ht=window.performance,Wt=function(e){var t,n;function i(t,n){var i;return(i=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHING,u.default.ERROR,u.default.KEY_LOADED,u.default.FRAG_LOADED,u.default.SUBTITLE_TRACKS_UPDATED,u.default.SUBTITLE_TRACK_SWITCH,u.default.SUBTITLE_TRACK_LOADED,u.default.SUBTITLE_FRAG_PROCESSED,u.default.LEVEL_UPDATED)||this).fragmentTracker=n,i.config=t.config,i.state=ve,i.tracks=[],i.tracksBuffered=[],i.currentTrackId=-1,i.decrypter=new $t.default(t,t.config),i.lastAVStart=0,i._onMediaSeeking=i.onMediaSeeking.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(i)),i}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.startLoad=function(){this.stopLoad(),this.state=me;var e=this.tracks[this.currentTrackId];e&&e.details&&(this.setInterval(500),this.tick())},r.onSubtitleFragProcessed=function(e){var t=e.frag,n=e.success;if(this.fragPrevious=t,this.state=me,n){var i=this.tracksBuffered[this.currentTrackId];if(i){for(var r,a=t.start,o=0;o<i.length;o++)if(a>=i[o].start&&a<=i[o].end){r=i[o];break}var s=t.start+t.duration;r?r.end=s:(r={start:a,end:s},i.push(r))}}},r.onMediaAttached=function(e){var t=e.media;this.media=t,t.addEventListener("seeking",this._onMediaSeeking),this.state=me},r.onMediaDetaching=function(){var e=this;this.media&&(this.media.removeEventListener("seeking",this._onMediaSeeking),this.fragmentTracker.removeAllFragments(),this.currentTrackId=-1,this.tracks.forEach((function(t){e.tracksBuffered[t.id]=[]})),this.media=null,this.state=ve)},r.onError=function(e){var t=e.frag;t&&"subtitle"===t.type&&(this.fragCurrent&&this.fragCurrent.loader&&this.fragCurrent.loader.abort(),this.state=me)},r.onSubtitleTracksUpdated=function(e){var t=this;c.logger.log("subtitle tracks updated"),this.tracksBuffered=[],this.tracks=e.subtitleTracks,this.tracks.forEach((function(e){t.tracksBuffered[e.id]=[]}))},r.onSubtitleTrackSwitch=function(e){if(this.currentTrackId=e.id,this.tracks&&this.tracks.length&&-1!==this.currentTrackId){var t=this.tracks[this.currentTrackId];t&&t.details&&this.setInterval(500)}else this.clearInterval()},r.onSubtitleTrackLoaded=function(e){var t=e.id,n=e.details,i=this.currentTrackId,r=this.tracks,a=r[i];t>=r.length||t!==i||!a||(n.live&&function(e,t,n){void 0===n&&(n=0);var i=-1;ie(e,t,(function(e,t,n){t.start=e.start,i=n}));var r=t.fragments;if(i<0)r.forEach((function(e){e.start+=n}));else for(var a=i+1;a<r.length;a++)r[a].start=r[a-1].start+r[a-1].duration}(a.details,n,this.lastAVStart),a.details=n,this.setInterval(500))},r.onKeyLoaded=function(){this.state===_e&&(this.state=me)},r.onFragLoaded=function(e){var t=this.fragCurrent,n=e.frag.decryptdata,i=e.frag,r=this.hls;if(this.state===be&&t&&"subtitle"===e.frag.type&&t.sn===e.frag.sn&&e.payload.byteLength>0&&n&&n.key&&"AES-128"===n.method){var a=Ht.now();this.decrypter.decrypt(e.payload,n.key.buffer,n.iv.buffer,(function(e){var t=Ht.now();r.trigger(u.default.FRAG_DECRYPTED,{frag:i,payload:e,stats:{tstart:a,tdecrypt:t}})}))}},r.onLevelUpdated=function(e){var t=e.details.fragments;this.lastAVStart=t.length?t[0].start:0},r.doTick=function(){if(this.media)switch(this.state){case me:var e=this.config,t=this.currentTrackId,n=this.fragmentTracker,i=this.media,r=this.tracks;if(!r||!r[t]||!r[t].details)break;var a,o=e.maxBufferHole,s=e.maxFragLookUpTolerance,l=Math.min(e.maxBufferLength,e.maxMaxBufferLength),f=$.bufferedInfo(this._getBuffered(),i.currentTime,o),d=f.end,h=f.len,p=r[t].details,v=p.fragments,g=v.length,m=v[g-1].start+v[g-1].duration;if(h>l)return;var y=this.fragPrevious;d<m?(y&&p.hasProgramDateTime&&(a=le(v,y.endProgramDateTime,s)),a||(a=ue(y,v,d,s))):a=v[g-1],a&&a.encrypted?(c.logger.log("Loading key for "+a.sn),this.state=_e,this.hls.trigger(u.default.KEY_LOADING,{frag:a})):a&&n.getState(a)===B&&(this.fragCurrent=a,this.state=be,this.hls.trigger(u.default.FRAG_LOADING,{frag:a}))}else this.state=me},r.stopLoad=function(){this.lastAVStart=0,this.fragPrevious=null,e.prototype.stopLoad.call(this)},r._getBuffered=function(){return this.tracksBuffered[this.currentTrackId]||[]},r.onMediaSeeking=function(){if(this.fragCurrent){var e=this.media?this.media.currentTime:0,t=this.config.maxFragLookUpTolerance,n=this.fragCurrent.start-t,i=this.fragCurrent.start+this.fragCurrent.duration+t;(e<n||e>i)&&(this.fragCurrent.loader&&this.fragCurrent.loader.abort(),this.fragmentTracker.removeFragment(this.fragCurrent),this.fragCurrent=null,this.fragPrevious=null,this.state=me,this.tick())}},i}(Re);!function(e){e.WIDEVINE="com.widevine.alpha",e.PLAYREADY="com.microsoft.playready"}(Vt||(Vt={}));var Kt="undefined"!=typeof window&&window.navigator&&window.navigator.requestMediaKeySystemAccess?window.navigator.requestMediaKeySystemAccess.bind(window.navigator):null;function zt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var qt=function(e){var t,n;function i(t){var n;return(n=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHED,u.default.MANIFEST_PARSED)||this)._widevineLicenseUrl=void 0,n._licenseXhrSetup=void 0,n._emeEnabled=void 0,n._requestMediaKeySystemAccess=void 0,n._drmSystemOptions=void 0,n._config=void 0,n._mediaKeysList=[],n._media=null,n._hasSetMediaKeys=!1,n._requestLicenseFailureCount=0,n.mediaKeysPromise=null,n._onMediaEncrypted=function(e){if(c.logger.log('Media is encrypted using "'+e.initDataType+'" init data type'),!n.mediaKeysPromise)return c.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),void n.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});var t=function(t){n._media&&(n._attemptSetMediaKeys(t),n._generateRequestWithPreferredKeySession(e.initDataType,e.initData))};n.mediaKeysPromise.then(t).catch(t)},n._config=t.config,n._widevineLicenseUrl=n._config.widevineLicenseUrl,n._licenseXhrSetup=n._config.licenseXhrSetup,n._emeEnabled=n._config.emeEnabled,n._requestMediaKeySystemAccess=n._config.requestMediaKeySystemAccessFunc,n._drmSystemOptions=t.config.drmSystemOptions,n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r,a,o,l=i.prototype;return l.getLicenseServerUrl=function(e){switch(e){case Vt.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+e+'"')},l._attemptKeySystemAccess=function(e,t,n){var i=this,r=function(e,t,n,i){switch(e){case Vt.WIDEVINE:return function(e,t,n){var i={audioCapabilities:[],videoCapabilities:[]};return e.forEach((function(e){i.audioCapabilities.push({contentType:'audio/mp4; codecs="'+e+'"',robustness:n.audioRobustness||""})})),t.forEach((function(e){i.videoCapabilities.push({contentType:'video/mp4; codecs="'+e+'"',robustness:n.videoRobustness||""})})),[i]}(t,n,i);default:throw new Error("Unknown key-system: "+e)}}(e,t,n,this._drmSystemOptions);c.logger.log("Requesting encrypted media key-system access");var a=this.requestMediaKeySystemAccess(e,r);this.mediaKeysPromise=a.then((function(t){return i._onMediaKeySystemAccessObtained(e,t)})),a.catch((function(t){c.logger.error('Failed to obtain key-system "'+e+'" access:',t)}))},l._onMediaKeySystemAccessObtained=function(e,t){var n=this;c.logger.log('Access for key-system "'+e+'" obtained');var i={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:t,mediaKeySystemDomain:e};this._mediaKeysList.push(i);var r=Promise.resolve().then((function(){return t.createMediaKeys()})).then((function(t){return i.mediaKeys=t,c.logger.log('Media-keys created for key-system "'+e+'"'),n._onMediaKeysCreated(),t}));return r.catch((function(e){c.logger.error("Failed to create media-keys:",e)})),r},l._onMediaKeysCreated=function(){var e=this;this._mediaKeysList.forEach((function(t){t.mediaKeysSession||(t.mediaKeysSession=t.mediaKeys.createSession(),e._onNewMediaKeySession(t.mediaKeysSession))}))},l._onNewMediaKeySession=function(e){var t=this;c.logger.log("New key-system session "+e.sessionId),e.addEventListener("message",(function(n){t._onKeySessionMessage(e,n.message)}),!1)},l._onKeySessionMessage=function(e,t){c.logger.log("Got EME message event, creating license request"),this._requestLicense(t,(function(t){c.logger.log("Received license data (length: "+(t?t.byteLength:t)+"), updating key-session"),e.update(t)}))},l._attemptSetMediaKeys=function(e){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var t=this._mediaKeysList[0];if(!t||!t.mediaKeys)return c.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});c.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(t.mediaKeys),this._hasSetMediaKeys=!0}},l._generateRequestWithPreferredKeySession=function(e,t){var n=this,i=this._mediaKeysList[0];if(!i)return c.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});if(i.mediaKeysSessionInitialized)c.logger.warn("Key-Session already initialized but requested again");else{var r=i.mediaKeysSession;if(!r)return c.logger.error("Fatal: Media is encrypted but no key-session existing"),void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});if(!t)return c.logger.warn("Fatal: initData required for generating a key session is null"),void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});c.logger.log('Generating key-session request for "'+e+'" init data type'),i.mediaKeysSessionInitialized=!0,r.generateRequest(e,t).then((function(){c.logger.debug("Key-session generation succeeded")})).catch((function(e){c.logger.error("Error generating key-session request:",e),n.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})}))}},l._createLicenseXhr=function(e,t,n){var i=new XMLHttpRequest,r=this._licenseXhrSetup;try{if(r)try{r(i,e)}catch(t){i.open("POST",e,!0),r(i,e)}i.readyState||i.open("POST",e,!0)}catch(e){throw new Error("issue setting up KeySystem license XHR "+e)}return i.responseType="arraybuffer",i.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,i,e,t,n),i},l._onLicenseRequestReadyStageChange=function(e,t,n,i){switch(e.readyState){case 4:if(200===e.status)this._requestLicenseFailureCount=0,c.logger.log("License request succeeded"),"arraybuffer"!==e.responseType&&c.logger.warn("xhr response type was not set to the expected arraybuffer for license request"),i(e.response);else{if(c.logger.error("License Request XHR failed ("+t+"). Status: "+e.status+" ("+e.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>3)return void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});var r=3-this._requestLicenseFailureCount+1;c.logger.warn("Retrying license request, "+r+" attempts left"),this._requestLicense(n,i)}}},l._generateLicenseRequestChallenge=function(e,t){switch(e.mediaKeySystemDomain){case Vt.WIDEVINE:return t}throw new Error("unsupported key-system: "+e.mediaKeySystemDomain)},l._requestLicense=function(e,t){c.logger.log("Requesting content license for key-system");var n=this._mediaKeysList[0];if(!n)return c.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var i=this.getLicenseServerUrl(n.mediaKeySystemDomain),r=this._createLicenseXhr(i,e,t);c.logger.log("Sending license request to URL: "+i);var a=this._generateLicenseRequestChallenge(n,e);r.send(a)}catch(e){c.logger.error("Failure requesting DRM license: "+e),this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},l.onMediaAttached=function(e){if(this._emeEnabled){var t=e.media;this._media=t,t.addEventListener("encrypted",this._onMediaEncrypted)}},l.onMediaDetached=function(){var e=this._media,t=this._mediaKeysList;e&&(e.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(t.map((function(e){if(e.mediaKeysSession)return e.mediaKeysSession.close().catch((function(){}))}))).then((function(){return e.setMediaKeys(null)})).catch((function(){})))},l.onManifestParsed=function(e){if(this._emeEnabled){var t=e.levels.map((function(e){return e.audioCodec})),n=e.levels.map((function(e){return e.videoCodec}));this._attemptKeySystemAccess(Vt.WIDEVINE,t,n)}},r=i,(a=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&zt(r.prototype,a),o&&zt(r,o),i}(d);function Yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Xt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yt(Object(n),!0).forEach((function(t){Jt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Jt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zt=Xt(Xt({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.5,lowBufferWatchdogPeriod:.5,highBufferWatchdogPeriod:3,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,liveDurationInfinity:!1,liveBackBufferLength:1/0,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:Je,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,abrController:He,bufferController:Ke,capLevelController:qe,fpsController:Xe,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:Kt,testBandwidth:!0},{cueHandler:i,enableCEA708Captions:!0,enableWebVTT:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:Wt,subtitleTrackController:Gt,timelineController:Nt,audioStreamController:nt,audioTrackController:Qe,emeController:qt});function Qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function en(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qt(Object(n),!0).forEach((function(t){tn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function tn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rn(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function an(e,t,n){return t&&rn(e.prototype,t),n&&rn(e,n),e}var on=function(e){var t,n;function i(t){var n;void 0===t&&(t={}),(n=e.call(this)||this).config=void 0,n._autoLevelCapping=void 0,n.abrController=void 0,n.capLevelController=void 0,n.levelController=void 0,n.streamController=void 0,n.networkControllers=void 0,n.audioTrackController=void 0,n.subtitleTrackController=void 0,n.emeController=void 0,n.coreComponents=void 0,n.media=null,n.url=null;var r=i.DefaultConfig;if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");n.config=en(en({},r),t);var a=nn(n).config;if(void 0!==a.liveMaxLatencyDurationCount&&a.liveMaxLatencyDurationCount<=a.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==a.liveMaxLatencyDuration&&(void 0===a.liveSyncDuration||a.liveMaxLatencyDuration<=a.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');Object(c.enableLogs)(a.debug),n._autoLevelCapping=-1;var o=n.abrController=new a.abrController(nn(n)),s=new a.bufferController(nn(n)),l=n.capLevelController=new a.capLevelController(nn(n)),u=new a.fpsController(nn(n)),f=new P(nn(n)),d=new M(nn(n)),h=new F(nn(n)),p=new Ue(nn(n)),v=n.levelController=new Me(nn(n)),g=new V(nn(n)),m=[v,n.streamController=new Ie(nn(n),g)],y=a.audioStreamController;y&&m.push(new y(nn(n),g)),n.networkControllers=m;var _=[f,d,h,o,s,l,u,p,g];if(y=a.audioTrackController){var b=new y(nn(n));n.audioTrackController=b,_.push(b)}if(y=a.subtitleTrackController){var S=new y(nn(n));n.subtitleTrackController=S,m.push(S)}if(y=a.emeController){var w=new y(nn(n));n.emeController=w,_.push(w)}return(y=a.subtitleStreamController)&&m.push(new y(nn(n),g)),(y=a.timelineController)&&_.push(new y(nn(n))),n.coreComponents=_,n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.isSupported=function(){return function(){var e=z();if(!e)return!1;var t=self.SourceBuffer||self.WebKitSourceBuffer,n=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),i=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!n&&!!i}()},an(i,null,[{key:"version",get:function(){return"0.14.17"}},{key:"Events",get:function(){return u.default}},{key:"ErrorTypes",get:function(){return s.ErrorTypes}},{key:"ErrorDetails",get:function(){return s.ErrorDetails}},{key:"DefaultConfig",get:function(){return i.defaultConfig?i.defaultConfig:Zt},set:function(e){i.defaultConfig=e}}]);var r=i.prototype;return r.destroy=function(){c.logger.log("destroy"),this.trigger(u.default.DESTROYING),this.detachMedia(),this.coreComponents.concat(this.networkControllers).forEach((function(e){e.destroy()})),this.url=null,this.removeAllListeners(),this._autoLevelCapping=-1},r.attachMedia=function(e){c.logger.log("attachMedia"),this.media=e,this.trigger(u.default.MEDIA_ATTACHING,{media:e})},r.detachMedia=function(){c.logger.log("detachMedia"),this.trigger(u.default.MEDIA_DETACHING),this.media=null},r.loadSource=function(e){e=o.buildAbsoluteURL(window.location.href,e,{alwaysNormalize:!0}),c.logger.log("loadSource:"+e),this.url=e,this.trigger(u.default.MANIFEST_LOADING,{url:e})},r.startLoad=function(e){void 0===e&&(e=-1),c.logger.log("startLoad("+e+")"),this.networkControllers.forEach((function(t){t.startLoad(e)}))},r.stopLoad=function(){c.logger.log("stopLoad"),this.networkControllers.forEach((function(e){e.stopLoad()}))},r.swapAudioCodec=function(){c.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},r.recoverMediaError=function(){c.logger.log("recoverMediaError");var e=this.media;this.detachMedia(),e&&this.attachMedia(e)},r.removeLevel=function(e,t){void 0===t&&(t=0),this.levelController.removeLevel(e,t)},an(i,[{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){c.logger.log("set currentLevel:"+e),this.loadLevel=e,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){c.logger.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){c.logger.log("set loadLevel:"+e),this.levelController.manualLevel=e}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(e){c.logger.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(e){c.logger.log("set startLevel:"+e),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}},{key:"capLevelToPlayerSize",set:function(e){var t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(e){c.logger.log("set autoLevelCapping:"+e),this._autoLevelCapping=e}},{key:"bandwidthEstimate",get:function(){var e=this.abrController._bwEstimator;return e?e.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){for(var e=this.levels,t=this.config.minAutoBitrate,n=e?e.length:0,i=0;i<n;i++)if((e[i].realBitrate?Math.max(e[i].realBitrate,e[i].bitrate):e[i].bitrate)>t)return i;return 0}},{key:"maxAutoLevel",get:function(){var e=this.levels,t=this.autoLevelCapping;return-1===t&&e&&e.length?e.length-1:t}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}}]),i}(Y);on.defaultConfig=void 0},"./src/polyfills/number.js":
89/*!*********************************!*\
90 !*** ./src/polyfills/number.js ***!
91 \*********************************/
92/*! exports provided: isFiniteNumber, MAX_SAFE_INTEGER */function(e,t,n){"use strict";n.r(t),n.d(t,"isFiniteNumber",(function(){return i})),n.d(t,"MAX_SAFE_INTEGER",(function(){return r}));var i=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},r=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/utils/get-self-scope.js":
93/*!*************************************!*\
94 !*** ./src/utils/get-self-scope.js ***!
95 \*************************************/
96/*! exports provided: getSelfScope */function(e,t,n){"use strict";function i(){return"undefined"==typeof window?self:window}n.r(t),n.d(t,"getSelfScope",(function(){return i}))},"./src/utils/logger.js":
97/*!*****************************!*\
98 !*** ./src/utils/logger.js ***!
99 \*****************************/
100/*! exports provided: enableLogs, logger */function(e,t,n){"use strict";n.r(t),n.d(t,"enableLogs",(function(){return c})),n.d(t,"logger",(function(){return f}));var i=n(/*! ./get-self-scope */"./src/utils/get-self-scope.js");function r(){}var a={trace:r,debug:r,log:r,warn:r,info:r,error:r},o=a;function s(e,t){return t="["+e+"] > "+t}var l=Object(i.getSelfScope)();function u(e){var t=l.console[e];return t?function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];i[0]&&(i[0]=s(e,i[0])),t.apply(l.console,i)}:r}var c=function(e){if(l.console&&!0===e||"object"==typeof e){!function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];n.forEach((function(t){o[t]=e[t]?e[t].bind(e):u(t)}))}(e,"debug","log","info","warn","error");try{o.log()}catch(e){o=a}}else o=a},f=o}}).default},e.exports=i())},function(e,t,n){n(221);var i=n(227),r=n(14),a=n(92),o=n(39),s=n(62),l=n(16)("toStringTag");for(var u in i){var c=r[u],f=c&&c.prototype;f&&a(f)!==l&&o(f,l,u),s[u]=s.Array}},function(e,t,n){var i=n(23),r=n(70),a="".split;e.exports=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==r(e)?a.call(e,""):Object(e)}:Object},function(e,t,n){var i=n(14),r=n(223),a=i["__core-js_shared__"]||r("__core-js_shared__",{});e.exports=a},function(e,t,n){var i=n(14),r=n(35),a=i.document,o=r(a)&&r(a.createElement);e.exports=function(e){return o?a.createElement(e):{}}},function(e,t,n){var i=n(57),r=n(115);(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.8.1",mode:i?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+i).toString(36)}},function(e,t,n){var i=n(23);e.exports=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())}))},function(e,t,n){var i,r=n(40),a=n(155),o=n(123),s=n(88),l=n(158),u=n(116),c=n(87),f=c("IE_PROTO"),d=function(){},h=function(e){return"<script>"+e+"<\/script>"},p=function(){try{i=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;p=i?function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t}(i):((t=u("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F);for(var n=o.length;n--;)delete p.prototype[o[n]];return p()};s[f]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(d.prototype=r(e),n=new d,d.prototype=null,n[f]=e):n=p(),void 0===t?n:a(n,t)}},function(e,t,n){var i=n(156),r=n(123);e.exports=Object.keys||function(e){return i(e,r)}},function(e,t,n){var i=n(91),r=Math.max,a=Math.min;e.exports=function(e,t){var n=i(e);return n<0?r(n+t,0):a(n,t)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){var i={};i[n(16)("toStringTag")]="z",e.exports="[object z]"===String(i)},function(e,t,n){var i=n(35),r=n(74),a=n(16)("species");e.exports=function(e,t){var n;return r(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!r(n.prototype)?i(n)&&null===(n=n[a])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var i=n(45);e.exports=function(e,t){if(!i(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var i=n(17),r=n(45),a=i.document,o=r(a)&&r(a.createElement);e.exports=function(e){return o?a.createElement(e):{}}},function(e,t,n){var i=n(17),r=n(53);e.exports=function(e,t){try{r(i,e,t)}catch(n){i[e]=t}return t}},function(e,t,n){var i=n(131),r=Function.toString;"function"!=typeof i.inspectSource&&(i.inspectSource=function(e){return r.call(e)}),e.exports=i.inspectSource},function(e,t,n){var i=n(17),r=n(129),a=i["__core-js_shared__"]||r("__core-js_shared__",{});e.exports=a},function(e,t,n){var i=n(162),r=n(163),a=i("keys");e.exports=function(e){return a[e]||(a[e]=r(e))}},function(e,t){e.exports={}},function(e,t,n){var i=n(164),r=n(135).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){"use strict";var i=n(32);e.exports=function(){var e=i(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){var i=n(43);e.exports=i("navigator","userAgent")||""},function(e,t,n){var i=n(16);t.f=i},function(e,t,n){var i=n(156),r=n(123).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},function(e,t,n){var i,r=n(32),a=n(277),o=n(135),s=n(133),l=n(184),u=n(128),c=n(132),f=c("IE_PROTO"),d=function(){},h=function(e){return"<script>"+e+"<\/script>"},p=function(){try{i=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;p=i?function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t}(i):((t=u("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F);for(var n=o.length;n--;)delete p.prototype[o[n]];return p()};s[f]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(d.prototype=r(e),n=new d,d.prototype=null,n[f]=e):n=p(),void 0===t?n:a(n,t)}},function(e,t,n){var i={};i[n(27)("toStringTag")]="z",e.exports="[object z]"===String(i)},function(e,t,n){var i=n(61),r="["+n(107)+"]",a=RegExp("^"+r+r+"*"),o=RegExp(r+r+"*$"),s=function(e){return function(t){var n=String(i(t));return 1&e&&(n=n.replace(a,"")),2&e&&(n=n.replace(o,"")),n}};e.exports={start:s(1),end:s(2),trim:s(3)}},function(e,t,n){"use strict";var i=n(75),r=n(378),a=n(81),o=n(76),s=n(200),l=o.set,u=o.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){l(this,{type:"Array Iterator",target:i(e),index:0,kind:t})}),(function(){var e=u(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:i,done:!1}:"values"==n?{value:t[i],done:!1}:{value:[i,t[i]],done:!1}}),"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(e,t,n){var i=n(46).f,r=n(41),a=n(27)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,a)&&i(e,a,{configurable:!0,value:t})}},function(e,t,n){var i=n(66),r=n(17);e.exports="process"==i(r.process)},function(e,t,n){e.exports=n(374)},function(e,t,n){var i=n(115),r=Function.toString;"function"!=typeof i.inspectSource&&(i.inspectSource=function(e){return r.call(e)}),e.exports=i.inspectSource},function(e,t,n){var i=n(34),r=n(23),a=n(116);e.exports=!i&&!r((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){"use strict";var i=n(4),r=n(224),a=n(90),o=n(159),s=n(72),l=n(39),u=n(73),c=n(16),f=n(57),d=n(62),h=n(152),p=h.IteratorPrototype,v=h.BUGGY_SAFARI_ITERATORS,g=c("iterator"),m=function(){return this};e.exports=function(e,t,n,c,h,y,_){r(n,t,c);var b,S,w,E=function(e){if(e===h&&A)return A;if(!v&&e in x)return x[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},T=t+" Iterator",k=!1,x=e.prototype,L=x[g]||x["@@iterator"]||h&&x[h],A=!v&&L||E(h),C="Array"==t&&x.entries||L;if(C&&(b=a(C.call(new e)),p!==Object.prototype&&b.next&&(f||a(b)===p||(o?o(b,p):"function"!=typeof b[g]&&l(b,g,m)),s(b,T,!0,!0),f&&(d[T]=m))),"values"==h&&L&&"values"!==L.name&&(k=!0,A=function(){return L.call(this)}),f&&!_||x[g]===A||l(x,g,A),d[t]=A,h)if(S={values:E("values"),keys:y?A:E("keys"),entries:E("entries")},_)for(w in S)(v||k||!(w in x))&&u(x,w,S[w]);else i({target:t,proto:!0,forced:v||k},S);return S}},function(e,t,n){"use strict";var i={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,a=r&&!i.call({1:2},1);t.f=a?function(e){var t=r(this,e);return!!t&&t.enumerable}:i},function(e,t,n){var i=n(23),r=/#|\.prototype\./,a=function(e,t){var n=s[o(e)];return n==u||n!=l&&("function"==typeof t?i(t):!!t)},o=a.normalize=function(e){return String(e).replace(r,".").toLowerCase()},s=a.data={},l=a.NATIVE="N",u=a.POLYFILL="P";e.exports=a},function(e,t,n){"use strict";var i,r,a,o=n(90),s=n(39),l=n(37),u=n(16),c=n(57),f=u("iterator"),d=!1;[].keys&&("next"in(a=[].keys())?(r=o(o(a)))!==Object.prototype&&(i=r):d=!0),null==i&&(i={}),c||l(i,f)||s(i,f,(function(){return this})),e.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:d}},function(e,t,n){var i=n(23);e.exports=!i((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){var i=n(119);e.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var i=n(34),r=n(49),a=n(40),o=n(121);e.exports=i?Object.defineProperties:function(e,t){a(e);for(var n,i=o(t),s=i.length,l=0;s>l;)r.f(e,n=i[l++],t[n]);return e}},function(e,t,n){var i=n(37),r=n(42),a=n(157).indexOf,o=n(88);e.exports=function(e,t){var n,s=r(e),l=0,u=[];for(n in s)!i(o,n)&&i(s,n)&&u.push(n);for(;t.length>l;)i(s,n=t[l++])&&(~a(u,n)||u.push(n));return u}},function(e,t,n){var i=n(42),r=n(51),a=n(122),o=function(e){return function(t,n,o){var s,l=i(t),u=r(l.length),c=a(o,u);if(e&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},function(e,t,n){var i=n(43);e.exports=i("document","documentElement")},function(e,t,n){var i=n(40),r=n(226);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,a){return i(n),r(a),t?e.call(n,a):n.__proto__=a,n}}():void 0)},function(e,t,n){var i=n(31),r=n(66),a="".split;e.exports=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==r(e)?a.call(e,""):Object(e)}:Object},function(e,t,n){var i=n(44),r=n(31),a=n(128);e.exports=!i&&!r((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var i=n(96),r=n(131);(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.8.1",mode:i?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+i).toString(36)}},function(e,t,n){var i=n(41),r=n(75),a=n(237).indexOf,o=n(133);e.exports=function(e,t){var n,s=r(e),l=0,u=[];for(n in s)!i(o,n)&&i(s,n)&&u.push(n);for(;t.length>l;)i(s,n=t[l++])&&(~a(u,n)||u.push(n));return u}},function(e,t,n){"use strict";var i=n(31);function r(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=i((function(){var e=r("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=i((function(){var e=r("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},function(e,t,n){"use strict";var i=n(167),r=n(169),a=n(32),o=n(67),s=n(170),l=n(171),u=n(97),c=n(173),f=n(100),d=n(31),h=[].push,p=Math.min,v=!d((function(){return!RegExp(4294967295,"y")}));i("split",2,(function(e,t,n){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var i=String(o(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===e)return[i];if(!r(e))return t.call(i,e,a);for(var s,l,u,c=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),p=0,v=new RegExp(e.source,d+"g");(s=f.call(v,i))&&!((l=v.lastIndex)>p&&(c.push(i.slice(p,s.index)),s.length>1&&s.index<i.length&&h.apply(c,s.slice(1)),u=s[0].length,p=l,c.length>=a));)v.lastIndex===s.index&&v.lastIndex++;return p===i.length?!u&&v.test("")||c.push(""):c.push(i.slice(p)),c.length>a?c.slice(0,a):c}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var r=o(this),a=null==t?void 0:t[e];return void 0!==a?a.call(t,r,n):i.call(String(r),t,n)},function(e,r){var o=n(i,e,this,r,i!==t);if(o.done)return o.value;var f=a(e),d=String(this),h=s(f,RegExp),g=f.unicode,m=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(v?"y":"g"),y=new h(v?f:"^(?:"+f.source+")",m),_=void 0===r?4294967295:r>>>0;if(0===_)return[];if(0===d.length)return null===c(y,d)?[d]:[];for(var b=0,S=0,w=[];S<d.length;){y.lastIndex=v?S:0;var E,T=c(y,v?d:d.slice(S));if(null===T||(E=p(u(y.lastIndex+(v?0:S)),d.length))===b)S=l(d,S,g);else{if(w.push(d.slice(b,S)),w.length===_)return w;for(var k=1;k<=T.length-1;k++)if(w.push(T[k]),w.length===_)return w;S=b=E}}return w.push(d.slice(b)),w}]}),!v)},function(e,t,n){"use strict";n(65);var i=n(47),r=n(31),a=n(27),o=n(100),s=n(53),l=a("species"),u=!r((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),c="$0"==="a".replace(/./,"$0"),f=a("replace"),d=!!/./[f]&&""===/./[f]("a","$0"),h=!r((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,f){var p=a(e),v=!r((function(){var t={};return t[p]=function(){return 7},7!=""[e](t)})),g=v&&!r((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[l]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return t=!0,null},n[p](""),!t}));if(!v||!g||"replace"===e&&(!u||!c||d)||"split"===e&&!h){var m=/./[p],y=n(p,""[e],(function(e,t,n,i,r){return t.exec===o?v&&!r?{done:!0,value:m.call(t,n,i)}:{done:!0,value:e.call(n,t,i)}:{done:!1}}),{REPLACE_KEEPS_$0:c,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:d}),_=y[0],b=y[1];i(String.prototype,e,_),i(RegExp.prototype,p,2==t?function(e,t){return b.call(e,this,t)}:function(e){return b.call(e,this)})}f&&s(RegExp.prototype[p],"sham",!0)}},function(e,t,n){var i=n(31);e.exports=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())}))},function(e,t,n){var i=n(45),r=n(66),a=n(27)("match");e.exports=function(e){var t;return i(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==r(e))}},function(e,t,n){var i=n(32),r=n(101),a=n(27)("species");e.exports=function(e,t){var n,o=i(e).constructor;return void 0===o||null==(n=i(o)[a])?t:r(n)}},function(e,t,n){"use strict";var i=n(172).charAt;e.exports=function(e,t,n){return t+(n?i(e,t).length:1)}},function(e,t,n){var i=n(98),r=n(67),a=function(e){return function(t,n){var a,o,s=String(r(t)),l=i(n),u=s.length;return l<0||l>=u?e?"":void 0:(a=s.charCodeAt(l))<55296||a>56319||l+1===u||(o=s.charCodeAt(l+1))<56320||o>57343?e?s.charAt(l):a:e?s.slice(l,l+2):o-56320+(a-55296<<10)+65536}};e.exports={codeAt:a(!1),charAt:a(!0)}},function(e,t,n){var i=n(66),r=n(100);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var a=n.call(e,t);if("object"!=typeof a)throw TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==i(e))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(e,t)}},function(e,t,n){"use strict";var i=n(4),r=n(23),a=n(74),o=n(35),s=n(50),l=n(51),u=n(102),c=n(125),f=n(78),d=n(16),h=n(103),p=d("isConcatSpreadable"),v=h>=51||!r((function(){var e=[];return e[p]=!1,e.concat()[0]!==e})),g=f("concat"),m=function(e){if(!o(e))return!1;var t=e[p];return void 0!==t?!!t:a(e)};i({target:"Array",proto:!0,forced:!v||!g},{concat:function(e){var t,n,i,r,a,o=s(this),f=c(o,0),d=0;for(t=-1,i=arguments.length;t<i;t++)if(m(a=-1===t?o:arguments[t])){if(d+(r=l(a.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<r;n++,d++)n in a&&u(f,d,a[n])}else{if(d>=9007199254740991)throw TypeError("Maximum allowed index exceeded");u(f,d++,a)}return f.length=d,f}})},function(e,t,n){"use strict";var i=n(167),r=n(32),a=n(176),o=n(97),s=n(98),l=n(67),u=n(171),c=n(173),f=Math.max,d=Math.min,h=Math.floor,p=/\$([$&'`]|\d\d?|<[^>]*>)/g,v=/\$([$&'`]|\d\d?)/g;i("replace",2,(function(e,t,n,i){var g=i.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,m=i.REPLACE_KEEPS_$0,y=g?"$":"$0";return[function(n,i){var r=l(this),a=null==n?void 0:n[e];return void 0!==a?a.call(n,r,i):t.call(String(r),n,i)},function(e,i){if(!g&&m||"string"==typeof i&&-1===i.indexOf(y)){var a=n(t,e,this,i);if(a.done)return a.value}var l=r(e),h=String(this),p="function"==typeof i;p||(i=String(i));var v=l.global;if(v){var b=l.unicode;l.lastIndex=0}for(var S=[];;){var w=c(l,h);if(null===w)break;if(S.push(w),!v)break;""===String(w[0])&&(l.lastIndex=u(h,o(l.lastIndex),b))}for(var E,T="",k=0,x=0;x<S.length;x++){w=S[x];for(var L=String(w[0]),A=f(d(s(w.index),h.length),0),C=[],R=1;R<w.length;R++)C.push(void 0===(E=w[R])?E:String(E));var D=w.groups;if(p){var O=[L].concat(C,A,h);void 0!==D&&O.push(D);var I=String(i.apply(void 0,O))}else I=_(L,h,A,C,D,i);A>=k&&(T+=h.slice(k,A)+I,k=A+L.length)}return T+h.slice(k)}];function _(e,n,i,r,o,s){var l=i+e.length,u=r.length,c=v;return void 0!==o&&(o=a(o),c=p),t.call(s,c,(function(t,a){var s;switch(a.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,i);case"'":return n.slice(l);case"<":s=o[a.slice(1,-1)];break;default:var c=+a;if(0===c)return t;if(c>u){var f=h(c/10);return 0===f?t:f<=u?void 0===r[f-1]?a.charAt(1):r[f-1]+a.charAt(1):t}s=r[c-1]}return void 0===s?"":s}))}}))},function(e,t,n){var i=n(67);e.exports=function(e){return Object(i(e))}},function(e,t,n){n(19)("iterator")},function(e,t,n){"use strict";var i=n(250).charAt,r=n(85),a=n(149),o=r.set,s=r.getterFor("String Iterator");a(String,"String",(function(e){o(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=s(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=i(n,r),t.index+=e.length,{value:e,done:!1})}))},function(e,t){},function(e,t,n){"use strict";var i=n(4),r=n(14),a=n(43),o=n(57),s=n(34),l=n(119),u=n(154),c=n(23),f=n(37),d=n(74),h=n(35),p=n(40),v=n(50),g=n(42),m=n(86),y=n(63),_=n(120),b=n(121),S=n(139),w=n(254),E=n(181),T=n(64),k=n(49),x=n(150),L=n(39),A=n(73),C=n(117),R=n(87),D=n(88),O=n(118),I=n(16),P=n(138),M=n(19),F=n(72),B=n(85),N=n(52).forEach,U=R("hidden"),j=I("toPrimitive"),V=B.set,G=B.getterFor("Symbol"),$=Object.prototype,H=r.Symbol,W=a("JSON","stringify"),K=T.f,z=k.f,q=w.f,Y=x.f,X=C("symbols"),J=C("op-symbols"),Z=C("string-to-symbol-registry"),Q=C("symbol-to-string-registry"),ee=C("wks"),te=r.QObject,ne=!te||!te.prototype||!te.prototype.findChild,ie=s&&c((function(){return 7!=_(z({},"a",{get:function(){return z(this,"a",{value:7}).a}})).a}))?function(e,t,n){var i=K($,t);i&&delete $[t],z(e,t,n),i&&e!==$&&z($,t,i)}:z,re=function(e,t){var n=X[e]=_(H.prototype);return V(n,{type:"Symbol",tag:e,description:t}),s||(n.description=t),n},ae=u?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof H},oe=function(e,t,n){e===$&&oe(J,t,n),p(e);var i=m(t,!0);return p(n),f(X,i)?(n.enumerable?(f(e,U)&&e[U][i]&&(e[U][i]=!1),n=_(n,{enumerable:y(0,!1)})):(f(e,U)||z(e,U,y(1,{})),e[U][i]=!0),ie(e,i,n)):z(e,i,n)},se=function(e,t){p(e);var n=g(t),i=b(n).concat(fe(n));return N(i,(function(t){s&&!le.call(n,t)||oe(e,t,n[t])})),e},le=function(e){var t=m(e,!0),n=Y.call(this,t);return!(this===$&&f(X,t)&&!f(J,t))&&(!(n||!f(this,t)||!f(X,t)||f(this,U)&&this[U][t])||n)},ue=function(e,t){var n=g(e),i=m(t,!0);if(n!==$||!f(X,i)||f(J,i)){var r=K(n,i);return!r||!f(X,i)||f(n,U)&&n[U][i]||(r.enumerable=!0),r}},ce=function(e){var t=q(g(e)),n=[];return N(t,(function(e){f(X,e)||f(D,e)||n.push(e)})),n},fe=function(e){var t=e===$,n=q(t?J:g(e)),i=[];return N(n,(function(e){!f(X,e)||t&&!f($,e)||i.push(X[e])})),i};(l||(A((H=function(){if(this instanceof H)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=O(e),n=function(e){this===$&&n.call(J,e),f(this,U)&&f(this[U],t)&&(this[U][t]=!1),ie(this,t,y(1,e))};return s&&ne&&ie($,t,{configurable:!0,set:n}),re(t,e)}).prototype,"toString",(function(){return G(this).tag})),A(H,"withoutSetter",(function(e){return re(O(e),e)})),x.f=le,k.f=oe,T.f=ue,S.f=w.f=ce,E.f=fe,P.f=function(e){return re(I(e),e)},s&&(z(H.prototype,"description",{configurable:!0,get:function(){return G(this).description}}),o||A($,"propertyIsEnumerable",le,{unsafe:!0}))),i({global:!0,wrap:!0,forced:!l,sham:!l},{Symbol:H}),N(b(ee),(function(e){M(e)})),i({target:"Symbol",stat:!0,forced:!l},{for:function(e){var t=String(e);if(f(Z,t))return Z[t];var n=H(t);return Z[t]=n,Q[n]=t,n},keyFor:function(e){if(!ae(e))throw TypeError(e+" is not a symbol");if(f(Q,e))return Q[e]},useSetter:function(){ne=!0},useSimple:function(){ne=!1}}),i({target:"Object",stat:!0,forced:!l,sham:!s},{create:function(e,t){return void 0===t?_(e):se(_(e),t)},defineProperty:oe,defineProperties:se,getOwnPropertyDescriptor:ue}),i({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:ce,getOwnPropertySymbols:fe}),i({target:"Object",stat:!0,forced:c((function(){E.f(1)}))},{getOwnPropertySymbols:function(e){return E.f(v(e))}}),W)&&i({target:"JSON",stat:!0,forced:!l||c((function(){var e=H();return"[null]"!=W([e])||"{}"!=W({a:e})||"{}"!=W(Object(e))}))},{stringify:function(e,t,n){for(var i,r=[e],a=1;arguments.length>a;)r.push(arguments[a++]);if(i=t,(h(t)||void 0!==e)&&!ae(e))return d(t)||(t=function(e,t){if("function"==typeof i&&(t=i.call(this,e,t)),!ae(t))return t}),r[1]=t,W.apply(null,r)}});H.prototype[j]||L(H.prototype,j,H.prototype.valueOf),F(H,"Symbol"),D[U]=!0},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var i=n(45),r=n(183);e.exports=function(e,t,n){var a,o;return r&&"function"==typeof(a=t.constructor)&&a!==n&&i(o=a.prototype)&&o!==n.prototype&&r(e,o),e}},function(e,t,n){var i=n(32),r=n(276);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,a){return i(n),r(a),t?e.call(n,a):n.__proto__=a,n}}():void 0)},function(e,t,n){var i=n(77);e.exports=i("document","documentElement")},function(e,t,n){var i=n(4),r=n(14),a=n(137),o=[].slice,s=function(e){return function(t,n){var i=arguments.length>2,r=i?o.call(arguments,2):void 0;return e(i?function(){("function"==typeof t?t:Function(t)).apply(this,r)}:t,n)}};i({global:!0,bind:!0,forced:/MSIE .\./.test(a)},{setTimeout:s(r.setTimeout),setInterval:s(r.setInterval)})},function(e,t,n){e.exports=n(286)},function(e,t,n){n(287);var i=n(15).Object,r=e.exports=function(e,t,n){return i.defineProperty(e,t,n)};i.defineProperty.sham&&(r.sham=!0)},function(e,t,n){var i=n(292);e.exports=function(e){if(i(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,n){var i=n(16)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[i]=!1,"/./"[e](t)}catch(e){}}return!1}},function(e,t,n){n(191),n(179),n(311),n(197),n(198),n(318),n(178),n(113);var i=n(15);e.exports=i.Promise},function(e,t,n){"use strict";var i=n(4),r=n(90),a=n(159),o=n(120),s=n(39),l=n(63),u=n(104),c=function(e,t){var n=this;if(!(n instanceof c))return new c(e,t);a&&(n=a(new Error(void 0),r(n))),void 0!==t&&s(n,"message",String(t));var i=[];return u(e,i.push,{that:i}),s(n,"errors",i),n};c.prototype=o(Error.prototype,{constructor:l(5,c),message:l(5,""),name:l(5,"AggregateError")}),i({global:!0},{AggregateError:c})},function(e,t,n){var i=n(14);e.exports=i.Promise},function(e,t,n){var i=n(40),r=n(58),a=n(16)("species");e.exports=function(e,t){var n,o=i(e).constructor;return void 0===o||null==(n=i(o)[a])?t:r(n)}},function(e,t,n){var i,r,a,o=n(14),s=n(23),l=n(89),u=n(158),c=n(116),f=n(195),d=n(105),h=o.location,p=o.setImmediate,v=o.clearImmediate,g=o.process,m=o.MessageChannel,y=o.Dispatch,_=0,b={},S=function(e){if(b.hasOwnProperty(e)){var t=b[e];delete b[e],t()}},w=function(e){return function(){S(e)}},E=function(e){S(e.data)},T=function(e){o.postMessage(e+"",h.protocol+"//"+h.host)};p&&v||(p=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return b[++_]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},i(_),_},v=function(e){delete b[e]},d?i=function(e){g.nextTick(w(e))}:y&&y.now?i=function(e){y.now(w(e))}:m&&!f?(a=(r=new m).port2,r.port1.onmessage=E,i=l(a.postMessage,a,1)):o.addEventListener&&"function"==typeof postMessage&&!o.importScripts&&h&&"file:"!==h.protocol&&!s(T)?(i=T,o.addEventListener("message",E,!1)):i="onreadystatechange"in c("script")?function(e){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),S(e)}}:function(e){setTimeout(w(e),0)}),e.exports={set:p,clear:v}},function(e,t,n){var i=n(137);e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(i)},function(e,t,n){var i=n(40),r=n(35),a=n(80);e.exports=function(e,t){if(i(e),r(t)&&t.constructor===e)return t;var n=a.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var i=n(4),r=n(58),a=n(80),o=n(106),s=n(104);i({target:"Promise",stat:!0},{allSettled:function(e){var t=this,n=a.f(t),i=n.resolve,l=n.reject,u=o((function(){var n=r(t.resolve),a=[],o=0,l=1;s(e,(function(e){var r=o++,s=!1;a.push(void 0),l++,n.call(t,e).then((function(e){s||(s=!0,a[r]={status:"fulfilled",value:e},--l||i(a))}),(function(e){s||(s=!0,a[r]={status:"rejected",reason:e},--l||i(a))}))})),--l||i(a)}));return u.error&&l(u.value),n.promise}})},function(e,t,n){"use strict";var i=n(4),r=n(58),a=n(43),o=n(80),s=n(106),l=n(104);i({target:"Promise",stat:!0},{any:function(e){var t=this,n=o.f(t),i=n.resolve,u=n.reject,c=s((function(){var n=r(t.resolve),o=[],s=0,c=1,f=!1;l(e,(function(e){var r=s++,l=!1;o.push(void 0),c++,n.call(t,e).then((function(e){l||f||(f=!0,i(e))}),(function(e){l||f||(l=!0,o[r]=e,--c||u(new(a("AggregateError"))(o,"No one promise resolved")))}))})),--c||u(new(a("AggregateError"))(o,"No one promise resolved"))}));return c.error&&u(c.value),n.promise}})},function(e,t,n){var i=n(141),r=n(66),a=n(27)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=i?r:function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),a))?n:o?r(t):"Object"==(i=r(t))&&"function"==typeof t.callee?"Arguments":i}},function(e,t,n){"use strict";var i=n(94),r=n(379),a=n(202),o=n(183),s=n(144),l=n(53),u=n(47),c=n(27),f=n(96),d=n(81),h=n(201),p=h.IteratorPrototype,v=h.BUGGY_SAFARI_ITERATORS,g=c("iterator"),m=function(){return this};e.exports=function(e,t,n,c,h,y,_){r(n,t,c);var b,S,w,E=function(e){if(e===h&&A)return A;if(!v&&e in x)return x[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},T=t+" Iterator",k=!1,x=e.prototype,L=x[g]||x["@@iterator"]||h&&x[h],A=!v&&L||E(h),C="Array"==t&&x.entries||L;if(C&&(b=a(C.call(new e)),p!==Object.prototype&&b.next&&(f||a(b)===p||(o?o(b,p):"function"!=typeof b[g]&&l(b,g,m)),s(b,T,!0,!0),f&&(d[T]=m))),"values"==h&&L&&"values"!==L.name&&(k=!0,A=function(){return L.call(this)}),f&&!_||x[g]===A||l(x,g,A),d[t]=A,h)if(S={values:E("values"),keys:y?A:E("keys"),entries:E("entries")},_)for(w in S)(v||k||!(w in x))&&u(x,w,S[w]);else i({target:t,proto:!0,forced:v||k},S);return S}},function(e,t,n){"use strict";var i,r,a,o=n(202),s=n(53),l=n(41),u=n(27),c=n(96),f=u("iterator"),d=!1;[].keys&&("next"in(a=[].keys())?(r=o(o(a)))!==Object.prototype&&(i=r):d=!0),null==i&&(i={}),c||l(i,f)||s(i,f,(function(){return this})),e.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:d}},function(e,t,n){var i=n(41),r=n(176),a=n(132),o=n(380),s=a("IE_PROTO"),l=Object.prototype;e.exports=o?Object.getPrototypeOf:function(e){return e=r(e),i(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},function(e,t,n){"use strict";var i,r,a,o,s=n(94),l=n(96),u=n(17),c=n(77),f=n(381),d=n(47),h=n(382),p=n(144),v=n(204),g=n(45),m=n(101),y=n(383),_=n(130),b=n(384),S=n(388),w=n(170),E=n(206).set,T=n(389),k=n(390),x=n(391),L=n(209),A=n(392),C=n(76),R=n(99),D=n(27),O=n(145),I=n(393),P=D("species"),M="Promise",F=C.get,B=C.set,N=C.getterFor(M),U=f,j=u.TypeError,V=u.document,G=u.process,$=c("fetch"),H=L.f,W=H,K=!!(V&&V.createEvent&&u.dispatchEvent),z="function"==typeof PromiseRejectionEvent,q=R(M,(function(){if(!(_(U)!==String(U))){if(66===I)return!0;if(!O&&!z)return!0}if(l&&!U.prototype.finally)return!0;if(I>=51&&/native code/.test(U))return!1;var e=U.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[P]=t,!(e.then((function(){}))instanceof t)})),Y=q||!S((function(e){U.all(e).catch((function(){}))})),X=function(e){var t;return!(!g(e)||"function"!=typeof(t=e.then))&&t},J=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;T((function(){for(var i=e.value,r=1==e.state,a=0;n.length>a;){var o,s,l,u=n[a++],c=r?u.ok:u.fail,f=u.resolve,d=u.reject,h=u.domain;try{c?(r||(2===e.rejection&&te(e),e.rejection=1),!0===c?o=i:(h&&h.enter(),o=c(i),h&&(h.exit(),l=!0)),o===u.promise?d(j("Promise-chain cycle")):(s=X(o))?s.call(o,f,d):f(o)):d(i)}catch(e){h&&!l&&h.exit(),d(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&Q(e)}))}},Z=function(e,t,n){var i,r;K?((i=V.createEvent("Event")).promise=t,i.reason=n,i.initEvent(e,!1,!0),u.dispatchEvent(i)):i={promise:t,reason:n},!z&&(r=u["on"+e])?r(i):"unhandledrejection"===e&&x("Unhandled promise rejection",n)},Q=function(e){E.call(u,(function(){var t,n=e.facade,i=e.value;if(ee(e)&&(t=A((function(){O?G.emit("unhandledRejection",i,n):Z("unhandledrejection",n,i)})),e.rejection=O||ee(e)?2:1,t.error))throw t.value}))},ee=function(e){return 1!==e.rejection&&!e.parent},te=function(e){E.call(u,(function(){var t=e.facade;O?G.emit("rejectionHandled",t):Z("rejectionhandled",t,e.value)}))},ne=function(e,t,n){return function(i){e(t,i,n)}},ie=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,J(e,!0))},re=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw j("Promise can't be resolved itself");var i=X(t);i?T((function(){var n={done:!1};try{i.call(t,ne(re,n,e),ne(ie,n,e))}catch(t){ie(n,t,e)}})):(e.value=t,e.state=1,J(e,!1))}catch(t){ie({done:!1},t,e)}}};q&&(U=function(e){y(this,U,M),m(e),i.call(this);var t=F(this);try{e(ne(re,t),ne(ie,t))}catch(e){ie(t,e)}},(i=function(e){B(this,{type:M,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=h(U.prototype,{then:function(e,t){var n=N(this),i=H(w(this,U));return i.ok="function"!=typeof e||e,i.fail="function"==typeof t&&t,i.domain=O?G.domain:void 0,n.parent=!0,n.reactions.push(i),0!=n.state&&J(n,!1),i.promise},catch:function(e){return this.then(void 0,e)}}),r=function(){var e=new i,t=F(e);this.promise=e,this.resolve=ne(re,t),this.reject=ne(ie,t)},L.f=H=function(e){return e===U||e===a?new r(e):W(e)},l||"function"!=typeof f||(o=f.prototype.then,d(f.prototype,"then",(function(e,t){var n=this;return new U((function(e,t){o.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof $&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return k(U,$.apply(u,arguments))}}))),s({global:!0,wrap:!0,forced:q},{Promise:U}),p(U,M,!1,!0),v(M),a=c(M),s({target:M,stat:!0,forced:q},{reject:function(e){var t=H(this);return t.reject.call(void 0,e),t.promise}}),s({target:M,stat:!0,forced:l||q},{resolve:function(e){return k(l&&this===a?U:this,e)}}),s({target:M,stat:!0,forced:Y},{all:function(e){var t=this,n=H(t),i=n.resolve,r=n.reject,a=A((function(){var n=m(t.resolve),a=[],o=0,s=1;b(e,(function(e){var l=o++,u=!1;a.push(void 0),s++,n.call(t,e).then((function(e){u||(u=!0,a[l]=e,--s||i(a))}),r)})),--s||i(a)}));return a.error&&r(a.value),n.promise},race:function(e){var t=this,n=H(t),i=n.reject,r=A((function(){var r=m(t.resolve);b(e,(function(e){r.call(t,e).then(n.resolve,i)}))}));return r.error&&i(r.value),n.promise}})},function(e,t,n){"use strict";var i=n(77),r=n(46),a=n(27),o=n(44),s=a("species");e.exports=function(e){var t=i(e),n=r.f;o&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){var i=n(101);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var i,r,a,o=n(17),s=n(31),l=n(205),u=n(184),c=n(128),f=n(207),d=n(145),h=o.location,p=o.setImmediate,v=o.clearImmediate,g=o.process,m=o.MessageChannel,y=o.Dispatch,_=0,b={},S=function(e){if(b.hasOwnProperty(e)){var t=b[e];delete b[e],t()}},w=function(e){return function(){S(e)}},E=function(e){S(e.data)},T=function(e){o.postMessage(e+"",h.protocol+"//"+h.host)};p&&v||(p=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return b[++_]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},i(_),_},v=function(e){delete b[e]},d?i=function(e){g.nextTick(w(e))}:y&&y.now?i=function(e){y.now(w(e))}:m&&!f?(a=(r=new m).port2,r.port1.onmessage=E,i=l(a.postMessage,a,1)):o.addEventListener&&"function"==typeof postMessage&&!o.importScripts&&h&&"file:"!==h.protocol&&!s(T)?(i=T,o.addEventListener("message",E,!1)):i="onreadystatechange"in c("script")?function(e){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),S(e)}}:function(e){setTimeout(w(e),0)}),e.exports={set:p,clear:v}},function(e,t,n){var i=n(208);e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(i)},function(e,t,n){var i=n(77);e.exports=i("navigator","userAgent")||""},function(e,t,n){"use strict";var i=n(101),r=function(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=i})),this.resolve=i(t),this.reject=i(n)};e.exports.f=function(e){return new r(e)}},function(e,t,n){"use strict";var i=n(172).charAt,r=n(76),a=n(200),o=r.set,s=r.getterFor("String Iterator");a(String,"String",(function(e){o(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=s(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=i(n,r),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){var i=n(17),r=n(394),a=n(143),o=n(53),s=n(27),l=s("iterator"),u=s("toStringTag"),c=a.values;for(var f in r){var d=i[f],h=d&&d.prototype;if(h){if(h[l]!==c)try{o(h,l,c)}catch(e){h[l]=c}if(h[u]||o(h,u,f),r[f])for(var p in a)if(h[p]!==a[p])try{o(h,p,a[p])}catch(e){h[p]=a[p]}}}},function(e,t,n){e.exports=n(244)},function(e,t,n){"use strict";var i=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===r}(e)}(e)};var r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function a(e,t){return!1!==t.clone&&t.isMergeableObject(e)?c((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function o(e,t,n){return e.concat(t).map((function(e){return a(e,n)}))}function s(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function l(e,t){try{return t in e}catch(e){return!1}}function u(e,t,n){var i={};return n.isMergeableObject(e)&&s(e).forEach((function(t){i[t]=a(e[t],n)})),s(t).forEach((function(r){(function(e,t){return l(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(l(e,r)&&n.isMergeableObject(t[r])?i[r]=function(e,t){if(!t.customMerge)return c;var n=t.customMerge(e);return"function"==typeof n?n:c}(r,n)(e[r],t[r],n):i[r]=a(t[r],n))})),i}function c(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||o,n.isMergeableObject=n.isMergeableObject||i,n.cloneUnlessOtherwiseSpecified=a;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):u(e,t,n):a(t,n)}c.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return c(e,n,t)}),{})};var f=c;e.exports=f},function(e,t,n){e.exports=n(288)},function(e,t,n){e.exports=n(351)},function(e,t,n){"use strict";(function(e){function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function o(e,t,n){return(o=a()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var a=new(Function.bind.apply(e,i));return n&&r(a,n.prototype),a}).apply(null,arguments)}function s(e){var t="function"==typeof Map?new Map:void 0;return(s=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,a)}function a(){return o(e,arguments,i(this).constructor)}return a.prototype=Object.create(e.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),r(a,e)})(e)}var l=/%[sdj%]/g,u=function(){};function c(e){if(!e||!e.length)return null;var t={};return e.forEach((function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)})),t}function f(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=1,r=t[0],a=t.length;if("function"==typeof r)return r.apply(null,t.slice(1));if("string"==typeof r){var o=String(r).replace(l,(function(e){if("%%"===e)return"%";if(i>=a)return e;switch(e){case"%s":return String(t[i++]);case"%d":return Number(t[i++]);case"%j":try{return JSON.stringify(t[i++])}catch(e){return"[Circular]"}break;default:return e}}));return o}return r}function d(e,t){return null==e||(!("array"!==t||!Array.isArray(e)||e.length)||!(!function(e){return"string"===e||"url"===e||"hex"===e||"email"===e||"date"===e||"pattern"===e}(t)||"string"!=typeof e||e))}function h(e,t,n){var i=0,r=e.length;!function a(o){if(o&&o.length)n(o);else{var s=i;i+=1,s<r?t(e[s],a):n([])}}([])}void 0!==e&&e.env;var p=function(e){var t,n;function i(t,n){var i;return(i=e.call(this,"Async Validation Error")||this).errors=t,i.fields=n,i}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(s(Error));function v(e,t,n,i){if(t.first){var r=new Promise((function(t,r){h(function(e){var t=[];return Object.keys(e).forEach((function(n){t.push.apply(t,e[n])})),t}(e),n,(function(e){return i(e),e.length?r(new p(e,c(e))):t()}))}));return r.catch((function(e){return e})),r}var a=t.firstFields||[];!0===a&&(a=Object.keys(e));var o=Object.keys(e),s=o.length,l=0,u=[],f=new Promise((function(t,r){var f=function(e){if(u.push.apply(u,e),++l===s)return i(u),u.length?r(new p(u,c(u))):t()};o.length||(i(u),t()),o.forEach((function(t){var i=e[t];-1!==a.indexOf(t)?h(i,n,f):function(e,t,n){var i=[],r=0,a=e.length;function o(e){i.push.apply(i,e),++r===a&&n(i)}e.forEach((function(e){t(e,o)}))}(i,n,f)}))}));return f.catch((function(e){return e})),f}function g(e){return function(t){return t&&t.message?(t.field=t.field||e.fullField,t):{message:"function"==typeof t?t():t,field:t.field||e.fullField}}}function m(e,t){if(t)for(var i in t)if(t.hasOwnProperty(i)){var r=t[i];"object"==typeof r&&"object"==typeof e[i]?e[i]=n(n({},e[i]),r):e[i]=r}return e}function y(e,t,n,i,r,a){!e.required||n.hasOwnProperty(e.field)&&!d(t,a||e.type)||i.push(f(r.messages.required,e.fullField))}var _={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},b={integer:function(e){return b.number(e)&&parseInt(e,10)===e},float:function(e){return b.number(e)&&!b.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(e){return!1}},date:function(e){return"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&"number"==typeof e},object:function(e){return"object"==typeof e&&!b.array(e)},method:function(e){return"function"==typeof e},email:function(e){return"string"==typeof e&&!!e.match(_.email)&&e.length<255},url:function(e){return"string"==typeof e&&!!e.match(_.url)},hex:function(e){return"string"==typeof e&&!!e.match(_.hex)}};var S={required:y,whitespace:function(e,t,n,i,r){(/^\s+$/.test(t)||""===t)&&i.push(f(r.messages.whitespace,e.fullField))},type:function(e,t,n,i,r){if(e.required&&void 0===t)y(e,t,n,i,r);else{var a=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(a)>-1?b[a](t)||i.push(f(r.messages.types[a],e.fullField,e.type)):a&&typeof t!==e.type&&i.push(f(r.messages.types[a],e.fullField,e.type))}},range:function(e,t,n,i,r){var a="number"==typeof e.len,o="number"==typeof e.min,s="number"==typeof e.max,l=t,u=null,c="number"==typeof t,d="string"==typeof t,h=Array.isArray(t);if(c?u="number":d?u="string":h&&(u="array"),!u)return!1;h&&(l=t.length),d&&(l=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),a?l!==e.len&&i.push(f(r.messages[u].len,e.fullField,e.len)):o&&!s&&l<e.min?i.push(f(r.messages[u].min,e.fullField,e.min)):s&&!o&&l>e.max?i.push(f(r.messages[u].max,e.fullField,e.max)):o&&s&&(l<e.min||l>e.max)&&i.push(f(r.messages[u].range,e.fullField,e.min,e.max))},enum:function(e,t,n,i,r){e.enum=Array.isArray(e.enum)?e.enum:[],-1===e.enum.indexOf(t)&&i.push(f(r.messages.enum,e.fullField,e.enum.join(", ")))},pattern:function(e,t,n,i,r){if(e.pattern)if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||i.push(f(r.messages.pattern.mismatch,e.fullField,t,e.pattern));else if("string"==typeof e.pattern){new RegExp(e.pattern).test(t)||i.push(f(r.messages.pattern.mismatch,e.fullField,t,e.pattern))}}};function w(e,t,n,i,r){var a=e.type,o=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(d(t,a)&&!e.required)return n();S.required(e,t,i,o,r,a),d(t,a)||S.type(e,t,i,o,r)}n(o)}var E={string:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(d(t,"string")&&!e.required)return n();S.required(e,t,i,a,r,"string"),d(t,"string")||(S.type(e,t,i,a,r),S.range(e,t,i,a,r),S.pattern(e,t,i,a,r),!0===e.whitespace&&S.whitespace(e,t,i,a,r))}n(a)},method:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(d(t)&&!e.required)return n();S.required(e,t,i,a,r),void 0!==t&&S.type(e,t,i,a,r)}n(a)},number:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(""===t&&(t=void 0),d(t)&&!e.required)return n();S.required(e,t,i,a,r),void 0!==t&&(S.type(e,t,i,a,r),S.range(e,t,i,a,r))}n(a)},boolean:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(d(t)&&!e.required)return n();S.required(e,t,i,a,r),void 0!==t&&S.type(e,t,i,a,r)}n(a)},regexp:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(d(t)&&!e.required)return n();S.required(e,t,i,a,r),d(t)||S.type(e,t,i,a,r)}n(a)},integer:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(d(t)&&!e.required)return n();S.required(e,t,i,a,r),void 0!==t&&(S.type(e,t,i,a,r),S.range(e,t,i,a,r))}n(a)},float:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(d(t)&&!e.required)return n();S.required(e,t,i,a,r),void 0!==t&&(S.type(e,t,i,a,r),S.range(e,t,i,a,r))}n(a)},array:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(null==t&&!e.required)return n();S.required(e,t,i,a,r,"array"),null!=t&&(S.type(e,t,i,a,r),S.range(e,t,i,a,r))}n(a)},object:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(d(t)&&!e.required)return n();S.required(e,t,i,a,r),void 0!==t&&S.type(e,t,i,a,r)}n(a)},enum:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(d(t)&&!e.required)return n();S.required(e,t,i,a,r),void 0!==t&&S.enum(e,t,i,a,r)}n(a)},pattern:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(d(t,"string")&&!e.required)return n();S.required(e,t,i,a,r),d(t,"string")||S.pattern(e,t,i,a,r)}n(a)},date:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(d(t,"date")&&!e.required)return n();var o;if(S.required(e,t,i,a,r),!d(t,"date"))o=t instanceof Date?t:new Date(t),S.type(e,o,i,a,r),o&&S.range(e,o.getTime(),i,a,r)}n(a)},url:w,hex:w,email:w,required:function(e,t,n,i,r){var a=[],o=Array.isArray(t)?"array":typeof t;S.required(e,t,i,a,r,o),n(a)},any:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(d(t)&&!e.required)return n();S.required(e,t,i,a,r)}n(a)}};function T(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var k=T();function x(e){this.rules=null,this._messages=k,this.define(e)}x.prototype={messages:function(e){return e&&(this._messages=m(T(),e)),this._messages},define:function(e){if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!=typeof e||Array.isArray(e))throw new Error("Rules must be an object");var t,n;for(t in this.rules={},e)e.hasOwnProperty(t)&&(n=e[t],this.rules[t]=Array.isArray(n)?n:[n])},validate:function(e,t,i){var r=this;void 0===t&&(t={}),void 0===i&&(i=function(){});var a,o,s=e,l=t,u=i;if("function"==typeof l&&(u=l,l={}),!this.rules||0===Object.keys(this.rules).length)return u&&u(),Promise.resolve();if(l.messages){var d=this.messages();d===k&&(d=T()),m(d,l.messages),l.messages=d}else l.messages=this.messages();var h={};(l.keys||Object.keys(this.rules)).forEach((function(t){a=r.rules[t],o=s[t],a.forEach((function(i){var a=i;"function"==typeof a.transform&&(s===e&&(s=n({},s)),o=s[t]=a.transform(o)),(a="function"==typeof a?{validator:a}:n({},a)).validator=r.getValidationMethod(a),a.field=t,a.fullField=a.fullField||t,a.type=r.getType(a),a.validator&&(h[t]=h[t]||[],h[t].push({rule:a,value:o,source:s,field:t}))}))}));var p={};return v(h,l,(function(e,t){var i,r=e.rule,a=!("object"!==r.type&&"array"!==r.type||"object"!=typeof r.fields&&"object"!=typeof r.defaultField);function o(e,t){return n(n({},t),{},{fullField:r.fullField+"."+e})}function s(i){void 0===i&&(i=[]);var s=i;if(Array.isArray(s)||(s=[s]),!l.suppressWarning&&s.length&&x.warning("async-validator:",s),s.length&&void 0!==r.message&&(s=[].concat(r.message)),s=s.map(g(r)),l.first&&s.length)return p[r.field]=1,t(s);if(a){if(r.required&&!e.value)return void 0!==r.message?s=[].concat(r.message).map(g(r)):l.error&&(s=[l.error(r,f(l.messages.required,r.field))]),t(s);var u={};if(r.defaultField)for(var c in e.value)e.value.hasOwnProperty(c)&&(u[c]=r.defaultField);for(var d in u=n(n({},u),e.rule.fields))if(u.hasOwnProperty(d)){var h=Array.isArray(u[d])?u[d]:[u[d]];u[d]=h.map(o.bind(null,d))}var v=new x(u);v.messages(l.messages),e.rule.options&&(e.rule.options.messages=l.messages,e.rule.options.error=l.error),v.validate(e.value,e.rule.options||l,(function(e){var n=[];s&&s.length&&n.push.apply(n,s),e&&e.length&&n.push.apply(n,e),t(n.length?n:null)}))}else t(s)}a=a&&(r.required||!r.required&&e.value),r.field=e.field,r.asyncValidator?i=r.asyncValidator(r,e.value,s,e.source,l):r.validator&&(!0===(i=r.validator(r,e.value,s,e.source,l))?s():!1===i?s(r.message||r.field+" fails"):i instanceof Array?s(i):i instanceof Error&&s(i.message)),i&&i.then&&i.then((function(){return s()}),(function(e){return s(e)}))}),(function(e){!function(e){var t,n,i,r=[],a={};for(t=0;t<e.length;t++)n=e[t],i=void 0,Array.isArray(n)?r=(i=r).concat.apply(i,n):r.push(n);r.length?a=c(r):(r=null,a=null),u(r,a)}(e)}))},getType:function(e){if(void 0===e.type&&e.pattern instanceof RegExp&&(e.type="pattern"),"function"!=typeof e.validator&&e.type&&!E.hasOwnProperty(e.type))throw new Error(f("Unknown rule type %s",e.type));return e.type||"string"},getValidationMethod:function(e){if("function"==typeof e.validator)return e.validator;var t=Object.keys(e),n=t.indexOf("message");return-1!==n&&t.splice(n,1),1===t.length&&"required"===t[0]?E.required:E[this.getType(e)]||!1}},x.register=function(e,t){if("function"!=typeof t)throw new Error("Cannot register a validator by type, validator is not a function");E[e]=t},x.warning=u,x.messages=k,x.validators=E,t.a=x}).call(this,n(396))},function(e,t,n){e.exports=n(400)},function(e,t,n){e.exports=n(401)},function(e,t,n){e.exports=function(e){"use strict";var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(e,t){var n=e[0],i=e[1],r=e[2],a=e[3];i=((i+=((r=((r+=((a=((a+=((n=((n+=(i&r|~i&a)+t[0]-680876936|0)<<7|n>>>25)+i|0)&i|~n&r)+t[1]-389564586|0)<<12|a>>>20)+n|0)&n|~a&i)+t[2]+606105819|0)<<17|r>>>15)+a|0)&a|~r&n)+t[3]-1044525330|0)<<22|i>>>10)+r|0,i=((i+=((r=((r+=((a=((a+=((n=((n+=(i&r|~i&a)+t[4]-176418897|0)<<7|n>>>25)+i|0)&i|~n&r)+t[5]+1200080426|0)<<12|a>>>20)+n|0)&n|~a&i)+t[6]-1473231341|0)<<17|r>>>15)+a|0)&a|~r&n)+t[7]-45705983|0)<<22|i>>>10)+r|0,i=((i+=((r=((r+=((a=((a+=((n=((n+=(i&r|~i&a)+t[8]+1770035416|0)<<7|n>>>25)+i|0)&i|~n&r)+t[9]-1958414417|0)<<12|a>>>20)+n|0)&n|~a&i)+t[10]-42063|0)<<17|r>>>15)+a|0)&a|~r&n)+t[11]-1990404162|0)<<22|i>>>10)+r|0,i=((i+=((r=((r+=((a=((a+=((n=((n+=(i&r|~i&a)+t[12]+1804603682|0)<<7|n>>>25)+i|0)&i|~n&r)+t[13]-40341101|0)<<12|a>>>20)+n|0)&n|~a&i)+t[14]-1502002290|0)<<17|r>>>15)+a|0)&a|~r&n)+t[15]+1236535329|0)<<22|i>>>10)+r|0,i=((i+=((r=((r+=((a=((a+=((n=((n+=(i&a|r&~a)+t[1]-165796510|0)<<5|n>>>27)+i|0)&r|i&~r)+t[6]-1069501632|0)<<9|a>>>23)+n|0)&i|n&~i)+t[11]+643717713|0)<<14|r>>>18)+a|0)&n|a&~n)+t[0]-373897302|0)<<20|i>>>12)+r|0,i=((i+=((r=((r+=((a=((a+=((n=((n+=(i&a|r&~a)+t[5]-701558691|0)<<5|n>>>27)+i|0)&r|i&~r)+t[10]+38016083|0)<<9|a>>>23)+n|0)&i|n&~i)+t[15]-660478335|0)<<14|r>>>18)+a|0)&n|a&~n)+t[4]-405537848|0)<<20|i>>>12)+r|0,i=((i+=((r=((r+=((a=((a+=((n=((n+=(i&a|r&~a)+t[9]+568446438|0)<<5|n>>>27)+i|0)&r|i&~r)+t[14]-1019803690|0)<<9|a>>>23)+n|0)&i|n&~i)+t[3]-187363961|0)<<14|r>>>18)+a|0)&n|a&~n)+t[8]+1163531501|0)<<20|i>>>12)+r|0,i=((i+=((r=((r+=((a=((a+=((n=((n+=(i&a|r&~a)+t[13]-1444681467|0)<<5|n>>>27)+i|0)&r|i&~r)+t[2]-51403784|0)<<9|a>>>23)+n|0)&i|n&~i)+t[7]+1735328473|0)<<14|r>>>18)+a|0)&n|a&~n)+t[12]-1926607734|0)<<20|i>>>12)+r|0,i=((i+=((r=((r+=((a=((a+=((n=((n+=(i^r^a)+t[5]-378558|0)<<4|n>>>28)+i|0)^i^r)+t[8]-2022574463|0)<<11|a>>>21)+n|0)^n^i)+t[11]+1839030562|0)<<16|r>>>16)+a|0)^a^n)+t[14]-35309556|0)<<23|i>>>9)+r|0,i=((i+=((r=((r+=((a=((a+=((n=((n+=(i^r^a)+t[1]-1530992060|0)<<4|n>>>28)+i|0)^i^r)+t[4]+1272893353|0)<<11|a>>>21)+n|0)^n^i)+t[7]-155497632|0)<<16|r>>>16)+a|0)^a^n)+t[10]-1094730640|0)<<23|i>>>9)+r|0,i=((i+=((r=((r+=((a=((a+=((n=((n+=(i^r^a)+t[13]+681279174|0)<<4|n>>>28)+i|0)^i^r)+t[0]-358537222|0)<<11|a>>>21)+n|0)^n^i)+t[3]-722521979|0)<<16|r>>>16)+a|0)^a^n)+t[6]+76029189|0)<<23|i>>>9)+r|0,i=((i+=((r=((r+=((a=((a+=((n=((n+=(i^r^a)+t[9]-640364487|0)<<4|n>>>28)+i|0)^i^r)+t[12]-421815835|0)<<11|a>>>21)+n|0)^n^i)+t[15]+530742520|0)<<16|r>>>16)+a|0)^a^n)+t[2]-995338651|0)<<23|i>>>9)+r|0,i=((i+=((a=((a+=(i^((n=((n+=(r^(i|~a))+t[0]-198630844|0)<<6|n>>>26)+i|0)|~r))+t[7]+1126891415|0)<<10|a>>>22)+n|0)^((r=((r+=(n^(a|~i))+t[14]-1416354905|0)<<15|r>>>17)+a|0)|~n))+t[5]-57434055|0)<<21|i>>>11)+r|0,i=((i+=((a=((a+=(i^((n=((n+=(r^(i|~a))+t[12]+1700485571|0)<<6|n>>>26)+i|0)|~r))+t[3]-1894986606|0)<<10|a>>>22)+n|0)^((r=((r+=(n^(a|~i))+t[10]-1051523|0)<<15|r>>>17)+a|0)|~n))+t[1]-2054922799|0)<<21|i>>>11)+r|0,i=((i+=((a=((a+=(i^((n=((n+=(r^(i|~a))+t[8]+1873313359|0)<<6|n>>>26)+i|0)|~r))+t[15]-30611744|0)<<10|a>>>22)+n|0)^((r=((r+=(n^(a|~i))+t[6]-1560198380|0)<<15|r>>>17)+a|0)|~n))+t[13]+1309151649|0)<<21|i>>>11)+r|0,i=((i+=((a=((a+=(i^((n=((n+=(r^(i|~a))+t[4]-145523070|0)<<6|n>>>26)+i|0)|~r))+t[11]-1120210379|0)<<10|a>>>22)+n|0)^((r=((r+=(n^(a|~i))+t[2]+718787259|0)<<15|r>>>17)+a|0)|~n))+t[9]-343485551|0)<<21|i>>>11)+r|0,e[0]=n+e[0]|0,e[1]=i+e[1]|0,e[2]=r+e[2]|0,e[3]=a+e[3]|0}function i(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function a(e){var t,r,a,o,s,l,u=e.length,c=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=u;t+=64)n(c,i(e.substring(t-64,t)));for(r=(e=e.substring(t-64)).length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)a[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(n(c,a),t=0;t<16;t+=1)a[t]=0;return o=(o=8*u).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),l=parseInt(o[1],16)||0,a[14]=s,a[15]=l,n(c,a),c}function o(e){var n,i="";for(n=0;n<4;n+=1)i+=t[e>>8*n+4&15]+t[e>>8*n&15];return i}function s(e){var t;for(t=0;t<e.length;t+=1)e[t]=o(e[t]);return e.join("")}function l(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function u(e){var t,n=[],i=e.length;for(t=0;t<i-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function c(){this.reset()}return s(a("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,i){var r,a,o,s,l=this.byteLength,u=t(n,l),c=l;return i!==e&&(c=t(i,l)),u>c?new ArrayBuffer(0):(r=c-u,a=new ArrayBuffer(r),o=new Uint8Array(a),s=new Uint8Array(this,u,r),o.set(s),a)}}(),c.prototype.append=function(e){return this.appendBinary(l(e)),this},c.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,r=this._buff.length;for(t=64;t<=r;t+=64)n(this._hash,i(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},c.prototype.end=function(e){var t,n,i=this._buff,r=i.length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<r;t+=1)a[t>>2]|=i.charCodeAt(t)<<(t%4<<3);return this._finish(a,r),n=s(this._hash),e&&(n=u(n)),this.reset(),n},c.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},c.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},c.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},c.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},c.prototype._finish=function(e,t){var i,r,a,o=t;if(e[o>>2]|=128<<(o%4<<3),o>55)for(n(this._hash,e),o=0;o<16;o+=1)e[o]=0;i=(i=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),r=parseInt(i[2],16),a=parseInt(i[1],16)||0,e[14]=r,e[15]=a,n(this._hash,e)},c.hash=function(e,t){return c.hashBinary(l(e),t)},c.hashBinary=function(e,t){var n=s(a(e));return t?u(n):n},c.ArrayBuffer=function(){this.reset()},c.ArrayBuffer.prototype.append=function(e){var t,i,a,o,s,l=(i=this._buff.buffer,a=e,o=!0,(s=new Uint8Array(i.byteLength+a.byteLength)).set(new Uint8Array(i)),s.set(new Uint8Array(a),i.byteLength),o?s:s.buffer),u=l.length;for(this._length+=e.byteLength,t=64;t<=u;t+=64)n(this._hash,r(l.subarray(t-64,t)));return this._buff=t-64<u?new Uint8Array(l.buffer.slice(t-64)):new Uint8Array(0),this},c.ArrayBuffer.prototype.end=function(e){var t,n,i=this._buff,r=i.length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<r;t+=1)a[t>>2]|=i[t]<<(t%4<<3);return this._finish(a,r),n=s(this._hash),e&&(n=u(n)),this.reset(),n},c.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},c.ArrayBuffer.prototype.getState=function(){var e,t=c.prototype.getState.call(this);return t.buff=(e=t.buff,String.fromCharCode.apply(null,new Uint8Array(e))),t},c.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e,t){var n,i=e.length,r=new ArrayBuffer(i),a=new Uint8Array(r);for(n=0;n<i;n+=1)a[n]=e.charCodeAt(n);return t?a:r}(e.buff,!0),c.prototype.setState.call(this,e)},c.ArrayBuffer.prototype.destroy=c.prototype.destroy,c.ArrayBuffer.prototype._finish=c.prototype._finish,c.ArrayBuffer.hash=function(e,t){var i=s(function(e){var t,i,a,o,s,l,u=e.length,c=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=u;t+=64)n(c,r(e.subarray(t-64,t)));for(e=t-64<u?e.subarray(t-64):new Uint8Array(0),i=e.length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)a[t>>2]|=e[t]<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(n(c,a),t=0;t<16;t+=1)a[t]=0;return o=(o=8*u).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),l=parseInt(o[1],16)||0,a[14]=s,a[15]=l,n(c,a),c}(new Uint8Array(e)));return t?u(i):i},c}()},function(e,t,n){n(113);var i=n(228),r=n(92),a=Array.prototype,o={DOMTokenList:!0,NodeList:!0};e.exports=function(e){var t=e.forEach;return e===a||e instanceof Array&&t===a.forEach||o.hasOwnProperty(r(e))?i:t}},function(e,t,n){"use strict";var i=n(42),r=n(84),a=n(62),o=n(85),s=n(149),l=o.set,u=o.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){l(this,{type:"Array Iterator",target:i(e),index:0,kind:t})}),(function(){var e=u(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:i,done:!1}:"values"==n?{value:t[i],done:!1}:{value:[i,t[i]],done:!1}}),"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(e,t,n){var i=n(14),r=n(147),a=i.WeakMap;e.exports="function"==typeof a&&/native code/.test(r(a))},function(e,t,n){var i=n(14),r=n(39);e.exports=function(e,t){try{r(i,e,t)}catch(n){i[e]=t}return t}},function(e,t,n){"use strict";var i=n(152).IteratorPrototype,r=n(120),a=n(63),o=n(72),s=n(62),l=function(){return this};e.exports=function(e,t,n){var u=t+" Iterator";return e.prototype=r(i,{next:a(1,n)}),o(e,u,!1,!0),s[u]=l,e}},function(e,t,n){"use strict";var i=n(124),r=n(92);e.exports=i?{}.toString:function(){return"[object "+r(this)+"]"}},function(e,t,n){var i=n(35);e.exports=function(e){if(!i(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){var i=n(229);e.exports=i},function(e,t,n){n(230);var i=n(28);e.exports=i("Array").forEach},function(e,t,n){"use strict";var i=n(4),r=n(231);i({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},function(e,t,n){"use strict";var i=n(52).forEach,r=n(93),a=n(38),o=r("forEach"),s=a("forEach");e.exports=o&&s?[].forEach:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}},function(e,t,n){"use strict";var i={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,a=r&&!i.call({1:2},1);t.f=a?function(e){var t=r(this,e);return!!t&&t.enumerable}:i},function(e,t,n){var i=n(17),r=n(130),a=i.WeakMap;e.exports="function"==typeof a&&/native code/.test(r(a))},function(e,t,n){var i=n(41),r=n(235),a=n(95),o=n(46);e.exports=function(e,t){for(var n=r(t),s=o.f,l=a.f,u=0;u<n.length;u++){var c=n[u];i(e,c)||s(e,c,l(t,c))}}},function(e,t,n){var i=n(77),r=n(134),a=n(239),o=n(32);e.exports=i("Reflect","ownKeys")||function(e){var t=r.f(o(e)),n=a.f;return n?t.concat(n(e)):t}},function(e,t,n){var i=n(17);e.exports=i},function(e,t,n){var i=n(75),r=n(97),a=n(238),o=function(e){return function(t,n,o){var s,l=i(t),u=r(l.length),c=a(o,u);if(e&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},function(e,t,n){var i=n(98),r=Math.max,a=Math.min;e.exports=function(e,t){var n=i(e);return n<0?r(n+t,0):a(n,t)}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var i=n(168);e.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var i=n(242);e.exports=i},function(e,t,n){var i=n(243),r=Array.prototype;e.exports=function(e){var t=e.concat;return e===r||e instanceof Array&&t===r.concat?i:t}},function(e,t,n){n(174);var i=n(28);e.exports=i("Array").concat},function(e,t,n){var i=n(245);e.exports=i},function(e,t,n){n(246);var i=n(15);e.exports=i.Object.getPrototypeOf},function(e,t,n){var i=n(4),r=n(23),a=n(50),o=n(90),s=n(153);i({target:"Object",stat:!0,forced:r((function(){o(1)})),sham:!s},{getPrototypeOf:function(e){return o(a(e))}})},function(e,t,n){e.exports=n(248)},function(e,t,n){var i=n(249);e.exports=i},function(e,t,n){n(177),n(178),n(113);var i=n(138);e.exports=i.f("iterator")},function(e,t,n){var i=n(91),r=n(61),a=function(e){return function(t,n){var a,o,s=String(r(t)),l=i(n),u=s.length;return l<0||l>=u?e?"":void 0:(a=s.charCodeAt(l))<55296||a>56319||l+1===u||(o=s.charCodeAt(l+1))<56320||o>57343?e?s.charAt(l):a:e?s.slice(l,l+2):o-56320+(a-55296<<10)+65536}};e.exports={codeAt:a(!1),charAt:a(!0)}},function(e,t,n){e.exports=n(252)},function(e,t,n){var i=n(253);n(271),n(272),n(273),n(274),n(275),e.exports=i},function(e,t,n){n(174),n(179),n(180),n(255),n(256),n(257),n(258),n(177),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270);var i=n(15);e.exports=i.Symbol},function(e,t,n){var i=n(42),r=n(139).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"[object Window]"==a.call(e)?function(e){try{return r(e)}catch(e){return o.slice()}}(e):r(i(e))}},function(e,t,n){n(19)("asyncIterator")},function(e,t){},function(e,t,n){n(19)("hasInstance")},function(e,t,n){n(19)("isConcatSpreadable")},function(e,t,n){n(19)("match")},function(e,t,n){n(19)("matchAll")},function(e,t,n){n(19)("replace")},function(e,t,n){n(19)("search")},function(e,t,n){n(19)("species")},function(e,t,n){n(19)("split")},function(e,t,n){n(19)("toPrimitive")},function(e,t,n){n(19)("toStringTag")},function(e,t,n){n(19)("unscopables")},function(e,t,n){var i=n(14);n(72)(i.JSON,"JSON",!0)},function(e,t){},function(e,t){},function(e,t,n){n(19)("asyncDispose")},function(e,t,n){n(19)("dispose")},function(e,t,n){n(19)("observable")},function(e,t,n){n(19)("patternMatch")},function(e,t,n){n(19)("replaceAll")},function(e,t,n){var i=n(45);e.exports=function(e){if(!i(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){var i=n(44),r=n(46),a=n(32),o=n(278);e.exports=i?Object.defineProperties:function(e,t){a(e);for(var n,i=o(t),s=i.length,l=0;s>l;)r.f(e,n=i[l++],t[n]);return e}},function(e,t,n){var i=n(164),r=n(135);e.exports=Object.keys||function(e){return i(e,r)}},function(e,t,n){var i=n(67),r="["+n(280)+"]",a=RegExp("^"+r+r+"*"),o=RegExp(r+r+"*$"),s=function(e){return function(t){var n=String(i(t));return 1&e&&(n=n.replace(a,"")),2&e&&(n=n.replace(o,"")),n}};e.exports={start:s(1),end:s(2),trim:s(3)}},function(e,t){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(e,t,n){n(185);var i=n(15);e.exports=i.setTimeout},function(e,t,n){var i=n(283);e.exports=i},function(e,t,n){n(284);var i=n(15);e.exports=i.Date.now},function(e,t,n){n(4)({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}})},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var i=n(187);e.exports=i},function(e,t,n){var i=n(4),r=n(34);i({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperty:n(49).f})},function(e,t,n){var i=n(289);e.exports=i},function(e,t,n){var i=n(290),r=String.prototype;e.exports=function(e){var t=e.startsWith;return"string"==typeof e||e===r||e instanceof String&&t===r.startsWith?i:t}},function(e,t,n){n(291);var i=n(28);e.exports=i("String").startsWith},function(e,t,n){"use strict";var i,r=n(4),a=n(64).f,o=n(51),s=n(188),l=n(61),u=n(189),c=n(57),f="".startsWith,d=Math.min,h=u("startsWith");r({target:"String",proto:!0,forced:!!(c||h||(i=a(String.prototype,"startsWith"),!i||i.writable))&&!h},{startsWith:function(e){var t=String(l(this));s(e);var n=o(d(arguments.length>1?arguments[1]:void 0,t.length)),i=String(e);return f?f.call(t,i,n):t.slice(n,n+i.length)===i}})},function(e,t,n){var i=n(35),r=n(70),a=n(16)("match");e.exports=function(e){var t;return i(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==r(e))}},function(e,t,n){var i=n(294);e.exports=i},function(e,t,n){var i=n(295),r=n(297),a=Array.prototype,o=String.prototype;e.exports=function(e){var t=e.includes;return e===a||e instanceof Array&&t===a.includes?i:"string"==typeof e||e===o||e instanceof String&&t===o.includes?r:t}},function(e,t,n){n(296);var i=n(28);e.exports=i("Array").includes},function(e,t,n){"use strict";var i=n(4),r=n(157).includes,a=n(84);i({target:"Array",proto:!0,forced:!n(38)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},function(e,t,n){n(298);var i=n(28);e.exports=i("String").includes},function(e,t,n){"use strict";var i=n(4),r=n(188),a=n(61);i({target:"String",proto:!0,forced:!n(189)("includes")},{includes:function(e){return!!~String(a(this)).indexOf(r(e),arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var i=n(300);e.exports=i},function(e,t,n){n(301);var i=n(15);e.exports=i.Array.isArray},function(e,t,n){n(4)({target:"Array",stat:!0},{isArray:n(74)})},function(e,t,n){var i=n(303);e.exports=i},function(e,t,n){var i=n(304),r=Array.prototype;e.exports=function(e){var t=e.slice;return e===r||e instanceof Array&&t===r.slice?i:t}},function(e,t,n){n(305);var i=n(28);e.exports=i("Array").slice},function(e,t,n){"use strict";var i=n(4),r=n(35),a=n(74),o=n(122),s=n(51),l=n(42),u=n(102),c=n(16),f=n(78),d=n(38),h=f("slice"),p=d("slice",{ACCESSORS:!0,0:0,1:2}),v=c("species"),g=[].slice,m=Math.max;i({target:"Array",proto:!0,forced:!h||!p},{slice:function(e,t){var n,i,c,f=l(this),d=s(f.length),h=o(e,d),p=o(void 0===t?d:t,d);if(a(f)&&("function"!=typeof(n=f.constructor)||n!==Array&&!a(n.prototype)?r(n)&&null===(n=n[v])&&(n=void 0):n=void 0,n===Array||void 0===n))return g.call(f,h,p);for(i=new(void 0===n?Array:n)(m(p-h,0)),c=0;h<p;h++,c++)h in f&&u(i,c,f[h]);return i.length=c,i}})},function(e,t,n){e.exports=n(307)},function(e,t,n){var i=n(190);n(319),n(320),n(321),n(322),e.exports=i},function(e,t,n){var i=n(16),r=n(62),a=i("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[a]===e)}},function(e,t,n){var i=n(92),r=n(62),a=n(16)("iterator");e.exports=function(e){if(null!=e)return e[a]||e["@@iterator"]||r[i(e)]}},function(e,t,n){var i=n(40);e.exports=function(e){var t=e.return;if(void 0!==t)return i(t.call(e)).value}},function(e,t,n){"use strict";var i,r,a,o,s=n(4),l=n(57),u=n(14),c=n(43),f=n(192),d=n(73),h=n(312),p=n(72),v=n(313),g=n(35),m=n(58),y=n(314),_=n(147),b=n(104),S=n(315),w=n(193),E=n(194).set,T=n(316),k=n(196),x=n(317),L=n(80),A=n(106),C=n(85),R=n(151),D=n(16),O=n(105),I=n(103),P=D("species"),M="Promise",F=C.get,B=C.set,N=C.getterFor(M),U=f,j=u.TypeError,V=u.document,G=u.process,$=c("fetch"),H=L.f,W=H,K=!!(V&&V.createEvent&&u.dispatchEvent),z="function"==typeof PromiseRejectionEvent,q=R(M,(function(){if(!(_(U)!==String(U))){if(66===I)return!0;if(!O&&!z)return!0}if(l&&!U.prototype.finally)return!0;if(I>=51&&/native code/.test(U))return!1;var e=U.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[P]=t,!(e.then((function(){}))instanceof t)})),Y=q||!S((function(e){U.all(e).catch((function(){}))})),X=function(e){var t;return!(!g(e)||"function"!=typeof(t=e.then))&&t},J=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;T((function(){for(var i=e.value,r=1==e.state,a=0;n.length>a;){var o,s,l,u=n[a++],c=r?u.ok:u.fail,f=u.resolve,d=u.reject,h=u.domain;try{c?(r||(2===e.rejection&&te(e),e.rejection=1),!0===c?o=i:(h&&h.enter(),o=c(i),h&&(h.exit(),l=!0)),o===u.promise?d(j("Promise-chain cycle")):(s=X(o))?s.call(o,f,d):f(o)):d(i)}catch(e){h&&!l&&h.exit(),d(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&Q(e)}))}},Z=function(e,t,n){var i,r;K?((i=V.createEvent("Event")).promise=t,i.reason=n,i.initEvent(e,!1,!0),u.dispatchEvent(i)):i={promise:t,reason:n},!z&&(r=u["on"+e])?r(i):"unhandledrejection"===e&&x("Unhandled promise rejection",n)},Q=function(e){E.call(u,(function(){var t,n=e.facade,i=e.value;if(ee(e)&&(t=A((function(){O?G.emit("unhandledRejection",i,n):Z("unhandledrejection",n,i)})),e.rejection=O||ee(e)?2:1,t.error))throw t.value}))},ee=function(e){return 1!==e.rejection&&!e.parent},te=function(e){E.call(u,(function(){var t=e.facade;O?G.emit("rejectionHandled",t):Z("rejectionhandled",t,e.value)}))},ne=function(e,t,n){return function(i){e(t,i,n)}},ie=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,J(e,!0))},re=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw j("Promise can't be resolved itself");var i=X(t);i?T((function(){var n={done:!1};try{i.call(t,ne(re,n,e),ne(ie,n,e))}catch(t){ie(n,t,e)}})):(e.value=t,e.state=1,J(e,!1))}catch(t){ie({done:!1},t,e)}}};q&&(U=function(e){y(this,U,M),m(e),i.call(this);var t=F(this);try{e(ne(re,t),ne(ie,t))}catch(e){ie(t,e)}},(i=function(e){B(this,{type:M,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=h(U.prototype,{then:function(e,t){var n=N(this),i=H(w(this,U));return i.ok="function"!=typeof e||e,i.fail="function"==typeof t&&t,i.domain=O?G.domain:void 0,n.parent=!0,n.reactions.push(i),0!=n.state&&J(n,!1),i.promise},catch:function(e){return this.then(void 0,e)}}),r=function(){var e=new i,t=F(e);this.promise=e,this.resolve=ne(re,t),this.reject=ne(ie,t)},L.f=H=function(e){return e===U||e===a?new r(e):W(e)},l||"function"!=typeof f||(o=f.prototype.then,d(f.prototype,"then",(function(e,t){var n=this;return new U((function(e,t){o.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof $&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return k(U,$.apply(u,arguments))}}))),s({global:!0,wrap:!0,forced:q},{Promise:U}),p(U,M,!1,!0),v(M),a=c(M),s({target:M,stat:!0,forced:q},{reject:function(e){var t=H(this);return t.reject.call(void 0,e),t.promise}}),s({target:M,stat:!0,forced:l||q},{resolve:function(e){return k(l&&this===a?U:this,e)}}),s({target:M,stat:!0,forced:Y},{all:function(e){var t=this,n=H(t),i=n.resolve,r=n.reject,a=A((function(){var n=m(t.resolve),a=[],o=0,s=1;b(e,(function(e){var l=o++,u=!1;a.push(void 0),s++,n.call(t,e).then((function(e){u||(u=!0,a[l]=e,--s||i(a))}),r)})),--s||i(a)}));return a.error&&r(a.value),n.promise},race:function(e){var t=this,n=H(t),i=n.reject,r=A((function(){var r=m(t.resolve);b(e,(function(e){r.call(t,e).then(n.resolve,i)}))}));return r.error&&i(r.value),n.promise}})},function(e,t,n){var i=n(73);e.exports=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:i(e,r,t[r],n);return e}},function(e,t,n){"use strict";var i=n(43),r=n(49),a=n(16),o=n(34),s=a("species");e.exports=function(e){var t=i(e),n=r.f;o&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){var i=n(16)("iterator"),r=!1;try{var a=0,o={next:function(){return{done:!!a++}},return:function(){r=!0}};o[i]=function(){return this},Array.from(o,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var a={};a[i]=function(){return{next:function(){return{done:n=!0}}}},e(a)}catch(e){}return n}},function(e,t,n){var i,r,a,o,s,l,u,c,f=n(14),d=n(64).f,h=n(194).set,p=n(195),v=n(105),g=f.MutationObserver||f.WebKitMutationObserver,m=f.document,y=f.process,_=f.Promise,b=d(f,"queueMicrotask"),S=b&&b.value;S||(i=function(){var e,t;for(v&&(e=y.domain)&&e.exit();r;){t=r.fn,r=r.next;try{t()}catch(e){throw r?o():a=void 0,e}}a=void 0,e&&e.enter()},!p&&!v&&g&&m?(s=!0,l=m.createTextNode(""),new g(i).observe(l,{characterData:!0}),o=function(){l.data=s=!s}):_&&_.resolve?(u=_.resolve(void 0),c=u.then,o=function(){c.call(u,i)}):o=v?function(){y.nextTick(i)}:function(){h.call(f,i)}),e.exports=S||function(e){var t={fn:e,next:void 0};a&&(a.next=t),r||(r=t,o()),a=t}},function(e,t,n){var i=n(14);e.exports=function(e,t){var n=i.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},function(e,t,n){"use strict";var i=n(4),r=n(57),a=n(192),o=n(23),s=n(43),l=n(193),u=n(196),c=n(73);i({target:"Promise",proto:!0,real:!0,forced:!!a&&o((function(){a.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=l(this,s("Promise")),n="function"==typeof e;return this.then(n?function(n){return u(t,e()).then((function(){return n}))}:e,n?function(n){return u(t,e()).then((function(){throw n}))}:e)}}),r||"function"!=typeof a||a.prototype.finally||c(a.prototype,"finally",s("Promise").prototype.finally)},function(e,t,n){n(191)},function(e,t,n){n(197)},function(e,t,n){"use strict";var i=n(4),r=n(80),a=n(106);i({target:"Promise",stat:!0},{try:function(e){var t=r.f(this),n=a(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}})},function(e,t,n){n(198)},function(e,t,n){var i=n(187);e.exports=i},function(e,t,n){var i=n(325);e.exports=i},function(e,t,n){n(326);var i=n(15).Object,r=e.exports=function(e,t){return i.defineProperties(e,t)};i.defineProperties.sham&&(r.sham=!0)},function(e,t,n){var i=n(4),r=n(34);i({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperties:n(155)})},function(e,t,n){var i=n(328);e.exports=i},function(e,t,n){n(329);var i=n(15);e.exports=i.Object.getOwnPropertyDescriptors},function(e,t,n){var i=n(4),r=n(34),a=n(330),o=n(42),s=n(64),l=n(102);i({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(e){for(var t,n,i=o(e),r=s.f,u=a(i),c={},f=0;u.length>f;)void 0!==(n=r(i,t=u[f++]))&&l(c,t,n);return c}})},function(e,t,n){var i=n(43),r=n(139),a=n(181),o=n(40);e.exports=i("Reflect","ownKeys")||function(e){var t=r.f(o(e)),n=a.f;return n?t.concat(n(e)):t}},function(e,t,n){var i=n(332);e.exports=i},function(e,t,n){n(333);var i=n(15).Object,r=e.exports=function(e,t){return i.getOwnPropertyDescriptor(e,t)};i.getOwnPropertyDescriptor.sham&&(r.sham=!0)},function(e,t,n){var i=n(4),r=n(23),a=n(42),o=n(64).f,s=n(34),l=r((function(){o(1)}));i({target:"Object",stat:!0,forced:!s||l,sham:!s},{getOwnPropertyDescriptor:function(e,t){return o(a(e),t)}})},function(e,t,n){var i=n(335);e.exports=i},function(e,t,n){var i=n(336),r=Array.prototype;e.exports=function(e){var t=e.filter;return e===r||e instanceof Array&&t===r.filter?i:t}},function(e,t,n){n(337);var i=n(28);e.exports=i("Array").filter},function(e,t,n){"use strict";var i=n(4),r=n(52).filter,a=n(78),o=n(38),s=a("filter"),l=o("filter");i({target:"Array",proto:!0,forced:!s||!l},{filter:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var i=n(339);e.exports=i},function(e,t,n){n(180);var i=n(15);e.exports=i.Object.getOwnPropertySymbols},function(e,t,n){var i=n(341);e.exports=i},function(e,t,n){n(342);var i=n(15);e.exports=i.Object.keys},function(e,t,n){var i=n(4),r=n(50),a=n(121);i({target:"Object",stat:!0,forced:n(23)((function(){a(1)}))},{keys:function(e){return a(r(e))}})},function(e,t,n){var i=n(344);e.exports=i},function(e,t,n){var i=n(345),r=Array.prototype;e.exports=function(e){var t=e.findIndex;return e===r||e instanceof Array&&t===r.findIndex?i:t}},function(e,t,n){n(346);var i=n(28);e.exports=i("Array").findIndex},function(e,t,n){"use strict";var i=n(4),r=n(52).findIndex,a=n(84),o=n(38),s=!0,l=o("findIndex");"findIndex"in[]&&Array(1).findIndex((function(){s=!1})),i({target:"Array",proto:!0,forced:s||!l},{findIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),a("findIndex")},function(e,t,n){var i=n(348);e.exports=i},function(e,t,n){var i=n(349),r=Array.prototype;e.exports=function(e){var t=e.every;return e===r||e instanceof Array&&t===r.every?i:t}},function(e,t,n){n(350);var i=n(28);e.exports=i("Array").every},function(e,t,n){"use strict";var i=n(4),r=n(52).every,a=n(93),o=n(38),s=a("every"),l=o("every");i({target:"Array",proto:!0,forced:!s||!l},{every:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var i=n(352);e.exports=i},function(e,t,n){var i=n(353),r=Array.prototype;e.exports=function(e){var t=e.reduce;return e===r||e instanceof Array&&t===r.reduce?i:t}},function(e,t,n){n(354);var i=n(28);e.exports=i("Array").reduce},function(e,t,n){"use strict";var i=n(4),r=n(355).left,a=n(93),o=n(38),s=n(103),l=n(105),u=a("reduce"),c=o("reduce",{1:0});i({target:"Array",proto:!0,forced:!u||!c||!l&&s>79&&s<83},{reduce:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var i=n(58),r=n(50),a=n(114),o=n(51),s=function(e){return function(t,n,s,l){i(n);var u=r(t),c=a(u),f=o(u.length),d=e?f-1:0,h=e?-1:1;if(s<2)for(;;){if(d in c){l=c[d],d+=h;break}if(d+=h,e?d<0:f<=d)throw TypeError("Reduce of empty array with no initial value")}for(;e?d>=0:f>d;d+=h)d in c&&(l=n(l,c[d],d,u));return l}};e.exports={left:s(!1),right:s(!0)}},function(e,t,n){"use strict";var i=n(141),r=n(199);e.exports=i?{}.toString:function(){return"[object "+r(this)+"]"}},function(e,t,n){var i=n(358);e.exports=i},function(e,t,n){var i=n(359),r=String.prototype;e.exports=function(e){var t=e.trim;return"string"==typeof e||e===r||e instanceof String&&t===r.trim?i:t}},function(e,t,n){n(360);var i=n(28);e.exports=i("String").trim},function(e,t,n){"use strict";var i=n(4),r=n(142).trim;i({target:"String",proto:!0,forced:n(361)("trim")},{trim:function(){return r(this)}})},function(e,t,n){var i=n(23),r=n(107);e.exports=function(e){return i((function(){return!!r[e]()||"​…᠎"!="​…᠎"[e]()||r[e].name!==e}))}},function(e,t,n){var i=n(363);e.exports=i},function(e,t,n){var i=n(364),r=Array.prototype;e.exports=function(e){var t=e.splice;return e===r||e instanceof Array&&t===r.splice?i:t}},function(e,t,n){n(365);var i=n(28);e.exports=i("Array").splice},function(e,t,n){"use strict";var i=n(4),r=n(122),a=n(91),o=n(51),s=n(50),l=n(125),u=n(102),c=n(78),f=n(38),d=c("splice"),h=f("splice",{ACCESSORS:!0,0:0,1:2}),p=Math.max,v=Math.min;i({target:"Array",proto:!0,forced:!d||!h},{splice:function(e,t){var n,i,c,f,d,h,g=s(this),m=o(g.length),y=r(e,m),_=arguments.length;if(0===_?n=i=0:1===_?(n=0,i=m-y):(n=_-2,i=v(p(a(t),0),m-y)),m+n-i>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(c=l(g,i),f=0;f<i;f++)(d=y+f)in g&&u(c,f,g[d]);if(c.length=i,n<i){for(f=y;f<m-i;f++)h=f+n,(d=f+i)in g?g[h]=g[d]:delete g[h];for(f=m;f>m-i+n;f--)delete g[f-1]}else if(n>i)for(f=m-i;f>y;f--)h=f+n-1,(d=f+i-1)in g?g[h]=g[d]:delete g[h];for(f=0;f<n;f++)g[f+y]=arguments[f+2];return g.length=m-i+n,c}})},function(e,t,n){var i=n(367);e.exports=i},function(e,t,n){var i=n(368),r=Array.prototype;e.exports=function(e){var t=e.map;return e===r||e instanceof Array&&t===r.map?i:t}},function(e,t,n){n(369);var i=n(28);e.exports=i("Array").map},function(e,t,n){"use strict";var i=n(4),r=n(52).map,a=n(78),o=n(38),s=a("map"),l=o("map");i({target:"Array",proto:!0,forced:!s||!l},{map:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var i=n(371);e.exports=i},function(e,t,n){var i=n(372),r=Array.prototype;e.exports=function(e){var t=e.some;return e===r||e instanceof Array&&t===r.some?i:t}},function(e,t,n){n(373);var i=n(28);e.exports=i("Array").some},function(e,t,n){"use strict";var i=n(4),r=n(52).some,a=n(93),o=n(38),s=a("some"),l=o("some");i({target:"Array",proto:!0,forced:!s||!l},{some:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var i=n(375);e.exports=i},function(e,t,n){n(376);var i=n(15);e.exports=i.parseInt},function(e,t,n){var i=n(4),r=n(377);i({global:!0,forced:parseInt!=r},{parseInt:r})},function(e,t,n){var i=n(14),r=n(142).trim,a=n(107),o=i.parseInt,s=/^[+-]?0[Xx]/,l=8!==o(a+"08")||22!==o(a+"0x16");e.exports=l?function(e,t){var n=r(String(e));return o(n,t>>>0||(s.test(n)?16:10))}:o},function(e,t,n){var i=n(27),r=n(140),a=n(46),o=i("unscopables"),s=Array.prototype;null==s[o]&&a.f(s,o,{configurable:!0,value:r(null)}),e.exports=function(e){s[o][e]=!0}},function(e,t,n){"use strict";var i=n(201).IteratorPrototype,r=n(140),a=n(126),o=n(144),s=n(81),l=function(){return this};e.exports=function(e,t,n){var u=t+" Iterator";return e.prototype=r(i,{next:a(1,n)}),o(e,u,!1,!0),s[u]=l,e}},function(e,t,n){var i=n(31);e.exports=!i((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){var i=n(17);e.exports=i.Promise},function(e,t,n){var i=n(47);e.exports=function(e,t,n){for(var r in t)i(e,r,t[r],n);return e}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){var i=n(32),r=n(385),a=n(97),o=n(205),s=n(386),l=n(387),u=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,n){var c,f,d,h,p,v,g,m=n&&n.that,y=!(!n||!n.AS_ENTRIES),_=!(!n||!n.IS_ITERATOR),b=!(!n||!n.INTERRUPTED),S=o(t,m,1+y+b),w=function(e){return c&&l(c),new u(!0,e)},E=function(e){return y?(i(e),b?S(e[0],e[1],w):S(e[0],e[1])):b?S(e,w):S(e)};if(_)c=e;else{if("function"!=typeof(f=s(e)))throw TypeError("Target is not iterable");if(r(f)){for(d=0,h=a(e.length);h>d;d++)if((p=E(e[d]))&&p instanceof u)return p;return new u(!1)}c=f.call(e)}for(v=c.next;!(g=v.call(c)).done;){try{p=E(g.value)}catch(e){throw l(c),e}if("object"==typeof p&&p&&p instanceof u)return p}return new u(!1)}},function(e,t,n){var i=n(27),r=n(81),a=i("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[a]===e)}},function(e,t,n){var i=n(199),r=n(81),a=n(27)("iterator");e.exports=function(e){if(null!=e)return e[a]||e["@@iterator"]||r[i(e)]}},function(e,t,n){var i=n(32);e.exports=function(e){var t=e.return;if(void 0!==t)return i(t.call(e)).value}},function(e,t,n){var i=n(27)("iterator"),r=!1;try{var a=0,o={next:function(){return{done:!!a++}},return:function(){r=!0}};o[i]=function(){return this},Array.from(o,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var a={};a[i]=function(){return{next:function(){return{done:n=!0}}}},e(a)}catch(e){}return n}},function(e,t,n){var i,r,a,o,s,l,u,c,f=n(17),d=n(95).f,h=n(206).set,p=n(207),v=n(145),g=f.MutationObserver||f.WebKitMutationObserver,m=f.document,y=f.process,_=f.Promise,b=d(f,"queueMicrotask"),S=b&&b.value;S||(i=function(){var e,t;for(v&&(e=y.domain)&&e.exit();r;){t=r.fn,r=r.next;try{t()}catch(e){throw r?o():a=void 0,e}}a=void 0,e&&e.enter()},!p&&!v&&g&&m?(s=!0,l=m.createTextNode(""),new g(i).observe(l,{characterData:!0}),o=function(){l.data=s=!s}):_&&_.resolve?(u=_.resolve(void 0),c=u.then,o=function(){c.call(u,i)}):o=v?function(){y.nextTick(i)}:function(){h.call(f,i)}),e.exports=S||function(e){var t={fn:e,next:void 0};a&&(a.next=t),r||(r=t,o()),a=t}},function(e,t,n){var i=n(32),r=n(45),a=n(209);e.exports=function(e,t){if(i(e),r(t)&&t.constructor===e)return t;var n=a.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){var i=n(17);e.exports=function(e,t){var n=i.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},function(e,t,n){var i,r,a=n(17),o=n(208),s=a.process,l=s&&s.versions,u=l&&l.v8;u?r=(i=u.split("."))[0]+i[1]:o&&(!(i=o.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=o.match(/Chrome\/(\d+)/))&&(r=i[1]),e.exports=r&&+r},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){var i=n(190);e.exports=i},function(e,t){var n,i,r=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{i="function"==typeof clearTimeout?clearTimeout:o}catch(e){i=o}}();var l,u=[],c=!1,f=-1;function d(){c&&l&&(c=!1,l.length?u=l.concat(u):f=-1,u.length&&h())}function h(){if(!c){var e=s(d);c=!0;for(var t=u.length;t;){for(l=u,u=[];++f<t;)l&&l[f].run();f=-1,t=u.length}l=null,c=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===o||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function v(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),1!==u.length||c||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=v,r.addListener=v,r.once=v,r.off=v,r.removeListener=v,r.removeAllListeners=v,r.emit=v,r.prependListener=v,r.prependOnceListener=v,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){var i=n(398);e.exports=i},function(e,t,n){n(399);var i=n(15);e.exports=i.Number.isNaN},function(e,t,n){n(4)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},function(e,t,n){n(185);var i=n(15);e.exports=i.setInterval},function(e,t,n){var i=n(402);e.exports=i},function(e,t,n){n(403);var i=n(15);e.exports=i.parseFloat},function(e,t,n){var i=n(4),r=n(404);i({global:!0,forced:parseFloat!=r},{parseFloat:r})},function(e,t,n){var i=n(14),r=n(142).trim,a=n(107),o=i.parseFloat,s=1/o(a+"-0")!=-1/0;e.exports=s?function(e){var t=r(String(e)),n=o(t);return 0===n&&"-"==t.charAt(0)?-0:n}:o},function(e,t,n){var i=n(44),r=n(17),a=n(99),o=n(182),s=n(46).f,l=n(134).f,u=n(169),c=n(136),f=n(165),d=n(47),h=n(31),p=n(76).set,v=n(204),g=n(27)("match"),m=r.RegExp,y=m.prototype,_=/a/g,b=/a/g,S=new m(_)!==_,w=f.UNSUPPORTED_Y;if(i&&a("RegExp",!S||w||h((function(){return b[g]=!1,m(_)!=_||m(b)==b||"/a/i"!=m(_,"i")})))){for(var E=function(e,t){var n,i=this instanceof E,r=u(e),a=void 0===t;if(!i&&r&&e.constructor===E&&a)return e;S?r&&!a&&(e=e.source):e instanceof E&&(a&&(t=c.call(e)),e=e.source),w&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var s=o(S?new m(e,t):m(e,t),i?this:y,E);return w&&n&&p(s,{sticky:n}),s},T=function(e){e in E||s(E,e,{configurable:!0,get:function(){return m[e]},set:function(t){m[e]=t}})},k=l(m),x=0;k.length>x;)T(k[x++]);y.constructor=E,E.prototype=y,d(r,"RegExp",E)}v("RegExp")},function(e,t,n){"use strict";var i=n(94),r=n(160),a=n(75),o=n(407),s=[].join,l=r!=Object,u=o("join",",");i({target:"Array",proto:!0,forced:l||!u},{join:function(e){return s.call(a(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var i=n(31);e.exports=function(e,t){var n=[][e];return!!n&&i((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t,n){var i=n(409);e.exports=i},function(e,t,n){n(410);var i=n(15);i.JSON||(i.JSON={stringify:JSON.stringify}),e.exports=function(e,t,n){return i.JSON.stringify.apply(null,arguments)}},function(e,t,n){var i=n(4),r=n(43),a=n(23),o=r("JSON","stringify"),s=/[\uD800-\uDFFF]/g,l=/^[\uD800-\uDBFF]$/,u=/^[\uDC00-\uDFFF]$/,c=function(e,t,n){var i=n.charAt(t-1),r=n.charAt(t+1);return l.test(e)&&!u.test(r)||u.test(e)&&!l.test(i)?"\\u"+e.charCodeAt(0).toString(16):e},f=a((function(){return'"\\udf06\\ud834"'!==o("\udf06\ud834")||'"\\udead"'!==o("\udead")}));o&&i({target:"JSON",stat:!0,forced:f},{stringify:function(e,t,n){var i=o.apply(null,arguments);return"string"==typeof i?i.replace(s,c):i}})},function(e,t,n){var i=n(412);e.exports=i},function(e,t,n){var i=n(413),r=Array.prototype;e.exports=function(e){var t=e.find;return e===r||e instanceof Array&&t===r.find?i:t}},function(e,t,n){n(414);var i=n(28);e.exports=i("Array").find},function(e,t,n){"use strict";var i=n(4),r=n(52).find,a=n(84),o=n(38),s=!0,l=o("find");"find"in[]&&Array(1).find((function(){s=!1})),i({target:"Array",proto:!0,forced:s||!l},{find:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),a("find")},function(e,t,n){"use strict";n.r(t);var i=n(2),r=n.n(i),a=(n(65),n(166),n(3)),o=n.n(a),s=n(212),l=n.n(s),u=n(13),c=n.n(u),f=n(213),d=n.n(f),h=(n(175),n(48)),p=n.n(h);function v(e,t){return hasOwnProperty.call(e,t)}var g=/(%|)\{([0-9a-zA-Z_]+)\}/g;var m=(c.a,function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return 1===n.length&&"object"===p()(n[0])&&(n=n[0]),n&&n.hasOwnProperty||(n={}),e.replace(g,(function(t,i,r,a){if("{"===e[a-1]&&"}"===e[a+t.length])return r;var o=v(n,r)?n[r]:null;return null==o?"":o}))}),y={LinViewUI:{ShowMore:{showText:"显示更多",hiddenText:"收起"},Dialog:{title:"提示"},Selector:{show:"展开",hide:"收起"},Choice:{placeholder:"请选择",emptyTip:"暂无数据",searchPlaceholder:"请输入"},DatePicker:{year:"年",month:"月",placeholder:"请选择日期",sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fir:"五",sat:"六"},LimitTextarea:{exceeded:"已超出",enterInput:"还可以输入",word:"个字",entered:"已输入",placeholder:"请输入内容"},Image:{errorMsg:"加载失败"},Pagination:{total:"共",strip:"条",goto:"前往",page:"页"},VideoCard:{imgAlt:"图片",errorTip:"加载失败"},LiveComment:{viewPeople:"人正在观看",see:"查看",publishOpinion:"发表您的观点",login:"登录",commentAfter:"后发表评论",btnText:"发送",placeholder:"请输入",title:"直播评论"},VideoPlayer:{live:"直播",goBack:"快退",fastForward:"快进",second:"秒",speed:"倍速",switch:"已经切换至",quality:"画质",volume:"音量"},PageHeader:{more:"更多",backTip:"返回"},Cascader:{placeholder:"请选择",emptyTip:"暂无数据"},DateAxis:{more:"更多",sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fir:"星期五",sat:"星期六"},MessageBox:{cancelButtonText:"取消",confirmButtonText:"确定",inputErrorMessage:"输入的数据不合法!"}}},_=!1,b=function(){var e=l()(this||c.a).$t;if("function"==typeof e&&c.a.locale){var t;_||(_=!0,c.a.locale(c.a.config.lang,d()(y,c.a.locale(c.a.config.lang)||{},{clone:!0})));for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e.apply(this,o()(t=[]).call(t,i))}},S=function(e,t){var n=b.apply(this,[e,t]);if(null!=n)return n;for(var i=e.split("."),r=y,a=0,o=i.length;a<o;a++){if(n=r[i[a]],a===o-1)return m(n,t);if(!n)return"";r=n}return""},w={use:function(e){y=e||y},t:S,i18n:function(e){b=e||b}},E=(n(1),function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"lin-alert-fade"},on:{"after-leave":e.afterLeave}},[e.show?n("div",{class:["lin-alert","lin-alert-"+e.type,"lin-alert-"+e.effect,{"lin-alert-center":e.center}]},[e._t("icon",[e.icon?n("i",{class:["lin-alert-icon",e.icon]}):e._e()]),e._v(" "),n("div",{staticClass:"lin-alert-content"},[e._t("title",[n("span",{staticClass:"lin-alert-title"},[e._v(e._s(e.title))])]),e._v(" "),e._t("description",[e.description?n("span",{staticClass:"lin-alert-description"},[e._v(e._s(e.description))]):e._e()])],2),e._v(" "),e.closable?n("span",{staticClass:"lin-alert-close",on:{click:e.onCloseClick}},[e._t("close",[n("i",{staticClass:"lin-icon-close"})])],2):e._e()],2):e._e()])});function T(e,t,n,i,r,a,o,s){var l,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),a&&(u._scopeId="data-v-"+a),o?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=l):r&&(l=s?function(){r.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(e,t){return l.call(t),c(e,t)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,l):[l]}return{exports:e,options:u}}E._withStripped=!0;var k=T({name:"LinAlert",props:{title:{type:String,default:""},description:{type:String,default:""},icon:{type:String,default:""},closable:{type:Boolean,default:!1},type:{type:String,default:"success",options:["success","warning","info","danger"]},effect:{type:String,default:"light",options:["light","dark"]},center:{type:Boolean,default:!1}},data:function(){return{show:!0}},methods:{onCloseClick:function(){this.show=!1},afterLeave:function(){this.$emit("close")}}},E,[],!1,null,null,null);k.options.__file="packages/alert/src/alert.vue";var x=k.exports;x.install=function(e){return e.component(x.name,x)};var L=x,A=function(){var e=this.$createElement,t=this._self._c||e;return t("transition",{attrs:{name:"lin-backtop-fade"}},[this.visible?t("div",{staticClass:"lin-backtop",style:{right:this.right+"px",bottom:this.bottom+"px"},on:{click:this.onClick}},[this._t("default",[t("div",{staticClass:"lin-backtop-container"},[t("span",{staticClass:"lin-backtop-triangle"})])])],2):this._e()])};A._withStripped=!0;n(6);var C=n(20),R=n.n(C),D=n(69),O=n.n(D),I=n(12),P=function(e){return Math.pow(e,3)},M=T({name:"LinBacktop",props:{right:{type:Number,default:40},bottom:{type:Number,default:40},target:{type:String,default:null},visibilityHeight:{type:Number,default:200}},data:function(){return{visible:!1}},mounted:function(){this.el=null,this.container=null,this.init(),this.throttledScrollHandler=Object(I.throttle)(this.onScroll,300),this.container.addEventListener("scroll",this.throttledScrollHandler)},methods:{init:function(){if(this.container=document,this.el=document.documentElement||document.body,this.target){if(this.el=document.querySelector(this.target),!this.el)throw new Error("target is not existed: ".concat(this.target));this.container=this.el}},onScroll:function(){var e=this.el.scrollTop;this.visible=e>=this.visibilityHeight},onClick:function(e){this.scrollToTop(),this.$emit("click",e)},scrollToTop:function(){var e=this,t=this.el,n=O()(),i=t.scrollTop,r=window.requestAnimationFrame||function(e){return R()(e,16)};r((function a(){var o,s=(O()()-n)/500;s<1?(t.scrollTop=i*(1-((o=s)<.5?P(2*o)/2:1-P(2*(1-o))/2)),e.$emit("scroll",t.scrollTop),r(a)):(t.scrollTop=0,e.$emit("end"))}))}},beforeDestroy:function(){this.container.removeEventListener("scroll",this.throttledScrollHandler),this.el=null,this.container=null}},A,[],!1,null,null,null);M.options.__file="packages/backtop/src/backtop.vue";var F=M.exports;F.install=function(e){return e.component(F.name,F)};var B=F,N=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"lin-badge"},[e._t("default"),e._v(" "),e.isDot?e._e():n("span",{class:["lin-badge-fix","lin-badge-text","lin-badge-"+e.type]},[e._v("\n "+e._s(e.text)+"\n ")]),e._v(" "),e.isDot?n("span",{class:["lin-badge-fix","lin-badge-dot","lin-badge-"+e.type]}):e._e()],2)};N._withStripped=!0;var U=T({name:"LinBadge",props:{value:{type:[String,Number],default:""},max:{type:Number},isDot:{type:Boolean,default:!1},type:{type:String,default:"primary",options:["primary","success","warning","danger","info"]}},computed:{text:function(){return"string"==typeof this.value?this.value:"number"==typeof this.value?this.max&&this.max<this.value?"".concat(this.max,"+"):this.value:""}}},N,[],!1,null,null,null);U.options.__file="packages/badge/src/badge.vue";var j=U.exports;j.install=function(e){return e.component(j.name,j)};var V=j,G=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("button",{staticClass:"lin-button",class:["lin-button-"+e.type,{"lin-button-plain":e.plain},{"lin-button-round":e.round},{"lin-button-circle":e.circle},{"lin-button-disabled":e.disabled},{"lin-button-loading":e.loading},"lin-button-size-"+e.size],attrs:{disabled:e.disabled},on:{click:e.onButtonClick}},[e.loading?n("lin-spinner",{staticClass:"lin-button-spinner",attrs:{loadingColor:e.loadingColor,size:e.loadingSize}}):e._e(),e._v(" "),e.icon?n("i",{class:e.icon}):e._e(),e._v(" "),e.$slots.default?n("span",[e._t("default")],2):e._e()],1)};G._withStripped=!0;var $=n(0),H=n.n($),W=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:["lin-spinner","lin-spinner-"+e.vertical]},[n("div",{class:["lin-spinner-loading","lin-spinner-type-"+e.type,"lin-spinner-proportion-"+e.proportion],style:e.loadingStyle}),e._v(" "),e.text?n("div",{staticClass:"lin-spinner-text",style:e.textStyle},[e._v("\n "+e._s(e.text)+"\n ")]):e._e()])};W._withStripped=!0;var K=n(214),z=n.n(K),q=n(22),Y=n.n(q),X=T({name:"LinSpinner",props:{type:{type:String,default:"primary",validator:function(e){var t;return Y()(t=["primary","success","info","warning","danger"]).call(t,e)}},vertical:{type:String,default:"row",validator:function(e){var t;return Y()(t=["col","row"]).call(t,e)}},proportion:{type:[String,Number],default:"1",validator:function(e){var t;return Y()(t=["1","2","3",1,2,3]).call(t,e)}},loadingColor:String,size:String,strokeWidth:String,lineStyle:{type:String,validator:function(e){var t;return Y()(t=["dotted","dashed","solid","double","groove","ridge","inset","outset"]).call(t,e)}},animationName:String,animationDuration:String,timingFunction:{type:String,validator:function(e){var t;return!!Y()(t=["linear","ease","ease-in","ease-out","ease-in-out"]).call(t,e)||!!z()(e).call(e,"cubic-bezie")}},iterationCount:{type:[String,Number],validator:function(e){return"number"==typeof e||"infinite"===e}},text:String,textSize:String,textColor:String},computed:{loadingStyle:function(){var e={};return this.loadingColor&&(e["border-color"]=this.loadingColor),this.size&&(e.width=this.size,e.height=this.size),this.strokeWidth&&(e["border-width"]=this.strokeWidth),this.lineStyle&&(e["border-style"]=this.lineStyle),this.animationName&&(e["animation-name"]=this.animationName),this.animationDuration&&(e["animation-duration"]=this.animationDuration),this.timingFunction&&(e["animation-timing-function"]=this.timingFunction),this.iterationCount&&(e["animation-iteration-count"]=this.iterationCount),e},textStyle:function(){var e={};return this.textSize&&(e["font-size"]=this.textSize),this.textColor&&(e.color=this.textColor),e}}},W,[],!1,null,null,null);X.options.__file="packages/spinner/src/spinner.vue";var J=X.exports;J.install=function(e){return e.component(J.name,J)};var Z=J,Q=T({name:"LinButton",components:H()({},Z.name,Z),props:{type:{type:String,default:"default",options:["default","primary","success","warning","danger","info"]},plain:{type:Boolean,default:!1},round:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},icon:{type:String,default:""},size:{type:String,default:"default",options:["default","medium","small"]},loading:{type:Boolean,default:!1},loadingColor:{type:String,default:"#fff"},loadingSize:{type:String,default:"14px"}},methods:{onButtonClick:function(){this.loading||this.$emit("click")}}},G,[],!1,null,null,null);Q.options.__file="packages/button/src/button.vue";var ee=Q.exports;ee.install=function(e){return e.component(ee.name,ee)};var te=ee,ne=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"notOutsideContainer",staticClass:"lin-cascader"},[n("div",{ref:"boxContainer",on:{mouseenter:e.onMouseEnter,mouseleave:e.onMouseLeave,click:e.onInputClick}},[n("lin-input",{staticClass:"lin-cascader-input",attrs:{value:e.text,placeholder:e.myPlaceholder,readonly:""},on:{blur:e.onBlur,focus:e.onFocus}},[e.showClose||e.showPopup?e._e():n("i",{staticClass:"lin-icon-down"}),e._v(" "),!e.showClose&&e.showPopup?n("i",{staticClass:"lin-icon-up"}):e._e(),e._v(" "),e.showClose?n("i",{staticClass:"lin-icon-close",on:{click:function(t){return t.stopPropagation(),e.clearValue(t)}}}):e._e()])],1),e._v(" "),n("transition",{attrs:{name:"lin-cascader-fade"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.showPopup,expression:"showPopup"}],ref:"popupContainer",class:["lin-cascader-popup",{"lin-cascader-popup-up":!e.isDown},,{"lin-cascader-popup-down":e.isDown}],style:{top:e.top}},[0!==e.myOptions.length?n("div",{staticClass:"lin-panel-wrapper"},[n("lin-panel",{attrs:{options:e.myOptions}})],1):e._e(),e._v(" "),0===e.myOptions.length?n("div",{staticClass:"lin-panel-wrapper"},[n("div",{staticClass:"lin-panel-empty",on:{click:e.hidePuop}},[e._t("empty",[e._v("\n "+e._s(e.myEmptyTip)+"\n ")])],2)]):e._e()])])],1)};ne._withStripped=!0;var ie=n(26),re=n.n(ie),ae=n(29),oe=n.n(ae),se=n(18),le=n.n(se),ue=(n(79),n(36)),ce=n.n(ue),fe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"lin-input",class:{"lin-input-suffix-content":e.showSuffix||e.$slots.default}},[n("input",e._b({staticClass:"lin-input-inner",class:{"lin-input-is-disabled":e.disabled},attrs:{autocomplete:"off",placeholder:e.placeholder,type:e.showPassword?e.passwordVisible?"text":"password":e.type,disabled:e.disabled},domProps:{value:e.value},on:{blur:e.onBlur,focus:e.onFocus,keyup:e.handleInput}},"input",e.inputAttr,!1)),e._v(" "),e.showSuffix&&!e.$slots.default?n("span",{staticClass:"lin-input-suffix"},[e.clearable&&e.value?n("i",{staticClass:"lin-input-icon lin-icon-close",on:{click:e.clear}}):e._e(),e._v(" "),e.showPassword?n("i",{staticClass:"lin-input-icon lin-icon-password",class:{"lin-icon-view-active":e.passwordVisible},on:{click:e.handlePassword}}):e._e()]):e._e(),e._v(" "),e.$slots.default?n("span",{staticClass:"lin-input-suffix"},[e._t("default")],2):e._e()])};fe._withStripped=!0;var de=n(24),he=n.n(de),pe=n(25),ve=n.n(pe),ge=n(7),me=n.n(ge),ye=n(8),_e=n.n(ye),be=n(11),Se=n.n(be),we=n(9),Ee=n.n(we),Te=n(5),ke=n.n(Te);var xe=function(e){for(var t=e.eventName,n=e.params,i=e.componentName,r=this.$parent||this.$root,a=r.$options.name;r;){var o;i?a===i&&r.$emit(t,n):r.$emit(t,n),a=null===(o=r=r.$parent)||void 0===o?void 0:o.$options.name}};function Le(e,t){var n=ke()(e);if(Ee.a){var i=Ee()(e);t&&(i=Se()(i).call(i,(function(t){return _e()(e,t).enumerable}))),n.push.apply(n,i)}return n}function Ae(e){for(var t=1;t<arguments.length;t++){var n,i=null!=arguments[t]?arguments[t]:{};if(t%2)r()(n=Le(Object(i),!0)).call(n,(function(t){H()(e,t,i[t])}));else if(me.a)ve()(e,me()(i));else{var a;r()(a=Le(Object(i))).call(a,(function(t){he()(e,t,_e()(i,t))}))}}return e}var Ce=T({name:"LinInput",data:function(){return{passwordVisible:!1}},props:{placeholder:{type:String,default:""},type:{type:String,default:"text"},name:{type:String,default:""},disabled:{type:Boolean,default:!1},value:{type:String,default:""},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},maxlength:{type:Number,default:-1},minlength:{type:Number,default:-1}},computed:{showSuffix:function(){return this.clearable||this.showPassword},inputAttr:function(){var e={};return-1!==this.maxlength&&(e.maxlength=this.maxlength),-1!==this.minlength&&(e.minlength=this.minlength),this.name&&(e.name=this.name),Ae(Ae({},e),this.$attrs)}},methods:{handleInput:function(e){this.emitInputEvent(e.target.value)},clear:function(){this.emitInputEvent(""),this.$emit("clear")},emitInputEvent:function(e){this.$emit("input",e),xe.call(this,{eventName:"validate",componentName:"LinFormItem"})},handlePassword:function(){this.passwordVisible=!this.passwordVisible},onBlur:function(e){this.$emit("blur",e)},onFocus:function(e){this.$emit("focus",e)}}},fe,[],!1,null,null,null);Ce.options.__file="packages/input/src/input.vue";var Re=Ce.exports;Re.install=function(e){return e.component(Re.name,Re)};var De=Re,Oe={mounted:function(){document.addEventListener("click",this._onDocumentClick)},methods:{_onDocumentClick:function(e){"function"==typeof this.onDocumentClick&&this.onDocumentClick(e)}},beforeDestroy:function(){document.removeEventListener("click",this._onDocumentClick)}},Ie={methods:{t:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return S.apply(this,t)}}},Pe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"lin-panel"},[n("div",{staticClass:"lin-panel-container lin-panel-scroll"},[n("ul",{staticClass:"lin-panel-list"},e._l(e.options,(function(t,i){return n("li",{key:i,class:["lin-panel-item",{"lin-panel-active":e.current[e.valueKey]===t[e.valueKey]},{"lin-panel-disabled":t[e.disabled]}],on:{click:function(n){return e.onItemClick(t)}}},[e._v("\n "+e._s(t[e.label])+"\n "),e.showIconRight(t)&&!e.showLoading(t)?n("span",{staticClass:"lin-icon-right"}):e._e(),e._v(" "),e.showLoading(t)?n("span",{staticClass:"lin-panel-loading"}):e._e()])})),0)]),e._v(" "),0!==e.currentList.length?n("div",{staticClass:"lin-panel"},[n("lin-panel",{attrs:{level:e.level+1,options:e.currentList}})],1):e._e()])};Pe._withStripped=!0;var Me=n(21),Fe=n.n(Me),Be=T({name:"LinPanel",props:{options:{type:Array,default:function(){return[]}},level:{type:Number,default:0}},inject:["cascader"],computed:{valueKey:function(){return this.cascader?this.cascader.valueKey:"id"},label:function(){return this.cascader?this.cascader.label:"label"},disabled:function(){return this.cascader?this.cascader.disabled:"disabled"},leaf:function(){return this.cascader?this.cascader.leaf:"leaf"},children:function(){return this.cascader?this.cascader.children:"children"},valueArr:function(){return this.cascader?this.cascader.valueArr:[]},lazy:function(){return!!this.cascader&&this.cascader.lazy},lazyLoad:function(){return this.cascader?this.cascader.lazyLoad:null}},created:function(){var e=this;this.$on("displayPuop",(function(t){if(t&&t[e.level]){var n,i=e.valueKey,a=Fe()(n=e.options).call(n,(function(n){return n[i]===t[e.level][i]}));if(a>-1){var o=e.options[a];if(o[e.disabled])return;e.currentList=o[e.children]||[],e.current=o||{},e.$nextTick((function(){var t;r()(t=e.$children).call(t,(function(t){"LinPanel"===t.$options.name&&t.$emit("displayPuop",e.valueArr)}))}))}else e.currentList=[],e.current={}}else e.currentList=[],e.current={}}))},data:function(){return{currentList:[],current:{},loading:!1}},methods:{onItemClick:function(e){var t=this;return ce()(le.a.mark((function n(){var i,r,a,o;return le.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!e[t.disabled]){n.next=2;break}return n.abrupt("return");case 2:if(i=t.valueKey,e[i]!==t.current[i]){n.next=5;break}return n.abrupt("return");case 5:if(t.current=e,!t.lazy||!t.lazyLoad||e[t.leaf]){n.next=15;break}if(e[t.children]){n.next=15;break}return t.loading=!0,n.next=11,t.lazyLoad({level:t.level+1,data:e});case 11:a=n.sent,o=Fe()(r=t.options).call(r,(function(t){return t[i]===e[i]})),t.options[o][t.children]=a,t.loading=!1;case 15:t.handleBehaver(e);case 16:case"end":return n.stop()}}),n)})))()},handleBehaver:function(e){var t,n;(this.clearList(this.$children),this.currentList=[],e[this.children]&&0!==e[this.children].length)?this.currentList=e[this.children]:null===(n=this.cascader)||void 0===n||n.hidePuop();null===(t=this.cascader)||void 0===t||t.setValue(e,this.level)},clearList:function(e){var t=this;r()(e).call(e,(function(e){e.currentList=[],0!==e.$children.length&&t.clearList(e.$children)}))},showIconRight:function(e){return this.lazy&&this.lazyLoad?!e[this.leaf]:e[this.children]&&0!==e[this.children].length},showLoading:function(e){var t=this.valueKey;return e[t]===this.current[t]&&this.loading}}},Pe,[],!1,null,null,null);Be.options.__file="packages/cascader/src/panel.vue";var Ne,Ue=Be.exports,je=T({name:"LinCascader",mixins:[Oe,Ie],components:(Ne={},H()(Ne,De.name,De),H()(Ne,Ue.name,Ue),Ne),props:{options:{type:Array,default:function(){return[]}},showFormat:{type:Function},value:{type:Array,default:null},clearable:{type:Boolean,default:!1},placeholder:{type:String},lazy:{type:Boolean,default:!1},lazyLoad:{type:Function},separator:{type:String,default:"/"},label:{type:String,default:"label"},children:{type:String,default:"children"},leaf:{type:String,default:"leaf"},disabled:{type:String,default:"disabled"},valueKey:{type:String,default:"id"},emptyTip:{type:String}},provide:function(){return{cascader:this}},data:function(){return{myValueArr:[],showPopup:!1,isHover:!1,optionsList:[],top:0,isDown:!1}},created:function(){var e=this;return ce()(le.a.mark((function t(){return le.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.lazy||!e.lazyLoad){t.next=4;break}return t.next=3,e.lazyLoad({level:0});case 3:e.optionsList=t.sent;case 4:case"end":return t.stop()}}),t)})))()},methods:{setPlacement:function(){var e=this;this.$nextTick((function(){var t=e.$refs.popupContainer,n=e.$refs.notOutsideContainer,i=window.innerHeight-n.getBoundingClientRect().bottom,r=n.getBoundingClientRect().top;i>t.clientHeight?e.setDownTop():r>t.clientHeight?e.setUpTop():e.setDownTop()}))},setDownTop:function(){this.isDown=!0;var e=this.$refs.boxContainer;this.top="".concat(e.clientHeight+10,"px")},setUpTop:function(){this.isDown=!1;var e=this.$refs.popupContainer;this.top="".concat(-e.clientHeight-10,"px")},onBlur:function(e){this.$emit("blur",e)},onFocus:function(e){this.$emit("focus",e)},clearValue:function(){this.valueArr=[],this.hidePuop()},onMouseEnter:function(){this.isHover=!0},onMouseLeave:function(){this.isHover=!1},setValue:function(e,t){var n=this.valueArr;(n=oe()(n).call(n,0,t)).push(e),this.valueArr=n,this.$emit("change",{data:e,level:t})},onInputClick:function(){this.showPopup?this.hidePuop():this.displayPuop()},displayPuop:function(){var e,t=this;this.showPopup=!0,r()(e=this.$children).call(e,(function(e){"LinPanel"===e.$options.name&&e.$emit("displayPuop",t.valueArr)})),this.setPlacement(),this.$emit("visible-change",!0)},hidePuop:function(){this.showPopup=!1,this.$emit("visible-change",!1)},emitInputEvent:function(e){this.$emit("input",e)},onDocumentClick:function(e){this.$refs.notOutsideContainer.contains(e.target)||this.hidePuop()}},computed:{valueArr:{get:function(){return null!==this.value?re()(this.value)?this.value:[]:this.myValueArr||[]},set:function(e){null!==this.value?this.emitInputEvent(e):this.myValueArr=e}},text:function(){var e=this;if(this.showFormat)return this.showFormat(this.valueArr);if(this.valueArr&&this.valueArr.length>0){var t,n="";return r()(t=this.valueArr).call(t,(function(t){var i;n+=o()(i="".concat(t[e.label]," ")).call(i,e.separator," ")})),oe()(n).call(n,0,-2)}return""},showClose:function(){return this.clearable&&this.isHover&&this.valueArr&&0!==this.valueArr.length},myPlaceholder:function(){return this.placeholder?this.placeholder:this.t("LinViewUI.Cascader.placeholder")},myEmptyTip:function(){return this.emptyTip?this.emptyTip:this.t("LinViewUI.Cascader.emptyTip")},myOptions:function(){return this.lazy&&this.lazyLoad?this.optionsList:this.options}}},ne,[],!1,null,null,null);je.options.__file="packages/cascader/src/cascader.vue";var Ve=je.exports;Ve.install=function(e){return e.component(Ve.name,Ve)};var Ge=Ve,$e=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("label",{staticClass:"lin-checkbox",class:{"lin-checkbox-is-checked":e.isChecked,"lin-checkbox-is-disabled":e.isDisabled}},[n("span",{staticClass:"lin-checkbox-input"},[n("span",{staticClass:"lin-checkbox-inner"}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.model,expression:"model"}],staticClass:"lin-checkbox-original",attrs:{type:"checkbox",name:e.name,disabled:e.isDisabled},domProps:{value:e.label,checked:Array.isArray(e.model)?e._i(e.model,e.label)>-1:e.model},on:{change:function(t){var n=e.model,i=t.target,r=!!i.checked;if(Array.isArray(n)){var a=e.label,o=e._i(n,a);i.checked?o<0&&(e.model=n.concat([a])):o>-1&&(e.model=n.slice(0,o).concat(n.slice(o+1)))}else e.model=r}}})]),e._v(" "),n("span",{staticClass:"lin-checkbox-label"},[e._t("default"),e._v(" "),e.$slots.default?e._e():[e._v(e._s(e.label))]],2)])};$e._withStripped=!0;var He=T({name:"LinCheckbox",inject:{CheckboxGroup:{default:""}},computed:{isGroup:function(){return!!this.CheckboxGroup},model:{get:function(){return this.isGroup?this.CheckboxGroup.value:this.value},set:function(e){this.isGroup?this.CheckboxGroup.$emit("input",e):this.$emit("input",e),xe.call(this,{eventName:"validate",componentName:"LinFormItem"})}},isChecked:function(){var e;return this.isGroup?Y()(e=this.model).call(e,this.label):this.model},isDisabled:function(){return!(!this.isGroup||!this.CheckboxGroup.disabled)||this.disabled}},props:{value:{type:Boolean,default:!1},name:{type:String,default:""},label:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1}}},$e,[],!1,null,null,null);He.options.__file="packages/checkbox/src/checkbox.vue";var We=He.exports;We.install=function(e){return e.component(We.name,We)};var Ke=We,ze=function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"lin-checkbox-group"},[this._t("default")],2)};ze._withStripped=!0;var qe=T({name:"LinCheckboxGroup",props:{value:{type:Array},disabled:{type:Boolean,default:!1}},provide:function(){return{CheckboxGroup:this}}},ze,[],!1,null,null,null);qe.options.__file="packages/checkbox-group/src/checkbox-group.vue";var Ye=qe.exports;Ye.install=function(e){return e.component(Ye.name,Ye)};var Xe=Ye,Je=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"choiceGroup",staticClass:"lin-choice-group"},[n("div",{ref:"choiceGroupInput",class:[{"lin-choice-group-disabled":e.disabled},"lin-choice-group-input-container"],on:{mouseleave:e.onMouseLeave,mouseenter:e.onMouseEnter}},[n("input",{staticClass:"lin-choice-group-input",attrs:{readonly:!e.filterable,placeholder:e.placeholder||e.t("LinViewUI.Choice.placeholder"),type:"text"},domProps:{value:e.innerValue},on:{keyup:e.onInputChange,click:e.onClick,blur:e.onBlur,focus:e.onFocus}}),e._v(" "),e.showCloseIcon?e._e():n("i",{class:[{"lin-choice-group-icon-up":e.isShow},"lin-icon-down","lin-choice-group-down-icon","lin-choice-group-icon"]}),e._v(" "),e.showCloseIcon?n("i",{staticClass:"lin-icon-close lin-choice-group-icon lin-choice-group-close-icon",on:{click:e.clearValue}}):e._e()]),e._v(" "),n("transition",{attrs:{name:"lin-choice-group-fade"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.isShow,expression:"isShow"}],class:["lin-choice-container-wrapper",{"lin-choice-container-wrapper-up":!e.isDown},{"lin-choice-container-wrapper-down":e.isDown}],style:{top:e.top}},[e.showSearchInput?n("div",{staticClass:"lin-choice-search-wrapper"},[n("lin-input",{attrs:{placeholder:e.searchPlaceholder||e.t("LinViewUI.Choice.searchPlaceholder")},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.onSearch(t)}},model:{value:e.searchKey,callback:function(t){e.searchKey=t},expression:"searchKey"}},[n("i",{staticClass:"lin-icon-search",on:{click:function(t){return t.stopPropagation(),e.onSearch(t)}}})])],1):e._e(),e._v(" "),n("div",{ref:"scrollContainer",staticClass:"lin-choice-container",on:{scroll:function(t){return t.stopPropagation(),e.onScroll(t)}}},[n("div",{ref:"scrollContent"},[e._t("default"),e._v(" "),!e.$slots.default||e.noData?n("div",{staticClass:"lin-choice-group-empty"},[e._t("empty",[n("p",{staticClass:"lin-choice-group-empty-tip"},[e._v("\n "+e._s(e.emptyTip||e.t("LinViewUI.Choice.emptyTip"))+"\n ")])])],2):e._e()],2),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.loading,expression:"loading"}],staticClass:"lin-choice-loading-wrapper"},[e._t("loading",[n("span",{staticClass:"lin-choice-loading"}),e._v(" "),e.loadingTip?n("span",{staticClass:"lin-choice-loading-tip"},[e._v("\n "+e._s(e.loadingTip)+"\n ")]):e._e()])],2)])])])],1)};Je._withStripped=!0;var Ze=n(108),Qe=n.n(Ze),et=n(215),tt=n.n(et);var nt=T({name:"LinChoiceGroup",mixins:[Ie,Oe],components:H()({},De.name,De),props:{placeholder:{type:String},value:{type:[Object,String,Number]},valueKey:{type:String,default:""},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},isThrottle:{type:Boolean,default:!0},scroll:{type:Boolean,default:!1},time:{type:Number,default:500},loading:{type:Boolean,default:!1},loadingTip:{type:String,default:""},emptyTip:{type:String},finishLoading:{type:Boolean,default:!1},defaultLabelName:{type:[String,Number],default:""},showSearchInput:{type:Boolean,default:!1},searchPlaceholder:{type:String,default:""},filterable:{type:Boolean,default:!1},filterMethod:{type:Function}},data:function(){return{groupLabel:"",isShow:!1,isHover:!1,isDown:!0,top:0,searchKey:"",inputValue:"",noData:!1,isSearch:!1}},provide:function(){return{group:this}},computed:{showCloseIcon:function(){return this.clearable&&this.isHover&&this.value&&!this.disabled},innerValue:function(){return this.isSearch?this.inputValue:this.groupLabel||this.defaultLabelName}},mounted:function(){this.timer=null,this.lock=!1,this.lockTimer=null,this.setPlacement()},watch:{loading:function(e){var t=this;e?this.lock=!0:(this.lockTimer&&clearTimeout(this.lockTimer),this.lockTimer=R()((function(){t.lock=!1}),500))}},methods:{setPlacement:function(){var e=this;this.$nextTick((function(){var t=e.$refs.scrollContainer,n=e.$refs.choiceGroup,i=window.innerHeight-n.getBoundingClientRect().bottom,r=n.getBoundingClientRect().top;i>t.clientHeight?e.setDownTop():r>t.clientHeight?e.setUpTop():e.setDownTop()}))},setDownTop:function(){this.isDown=!0;var e=this.$refs.choiceGroupInput;this.top="".concat(e.clientHeight+8,"px")},setUpTop:function(){this.isDown=!1;var e=this.$refs.scrollContainer;this.top="".concat(-(e.clientHeight+20),"px")},onScroll:function(e){var t=this;!this.scroll||this.loading||this.lock||this.finishLoading||(this.isThrottle?(this.timer&&clearTimeout(this.timer),this.timer=R()((function(){t.handleScroll(e)}),this.time)):this.handleScroll(e))},handleScroll:function(e){e.target.scrollTop+this.$refs.scrollContainer.clientHeight>=this.$refs.scrollContent.clientHeight&&this.$emit("scrollToBottom",e)},onMouseLeave:function(){this.isHover=!1},onMouseEnter:function(){this.isHover=!0},onBlur:function(e){this.$emit("blur",e)},onFocus:function(e){this.$emit("focus",e)},onClick:function(){this.disabled||(this.isShow?this.hideVisible():this.showVisible())},clearValue:function(){this.groupLabel="",this.emitInputEvent(""),this.$emit("clear")},emitInputEvent:function(e){this.$emit("input",e),this.$emit("change",e),this.hideVisible()},hideVisible:function(){this.isShow&&(this.isShow=!1,this.isSearch=!1,this.$emit("visible-change",!1))},showVisible:function(){this.isShow||(this.isShow=!0,this.setPlacement(),this.inputValue="",this.noData=!1,this.$emit("visible-change",!0))},onDocumentClick:function(e){this.$refs.choiceGroup.contains(e.target)||this.hideVisible()},onSearch:function(){this.$emit("search",this.searchKey)},onInputChange:function(e){var t=this;this.isSearch=!0,this.inputValue=e.currentTarget.value,this.$nextTick((function(){var e=function e(t,n){var i;return tt()(i=t.$children).call(i,(function(t,i){i.$options.name===n&&t.push(i);var r=e(i,n);return o()(t).call(t,r)}),[])}(t,"LinChoiceItem");t.noData=Qe()(e).call(e,(function(e){return!e.isShow}))}))}},beforeDestroy:function(){this.timer&&clearTimeout(this.timer),this.lockTimer&&clearTimeout(this.lockTimer)}},Je,[],!1,null,null,null);nt.options.__file="packages/choice-group/src/choice-group.vue";var it=nt.exports;it.install=function(e){return e.component(it.name,it)};var rt=it,at=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{directives:[{name:"show",rawName:"v-show",value:e.isShow,expression:"isShow"}],class:[{"lin-choice-item-active":e.itemValue===e.groupValue},{"lin-choice-item-disabled":e.itemDisabled},"lin-choice-item"],on:{click:e.onItemClick}},[e._t("default",[e._v("\n "+e._s(e.itemLabel)+"\n ")])],2)};at._withStripped=!0;n(54),n(59);var ot=n(109),st=n.n(ot),lt=T({name:"LinChoiceItem",props:{label:{type:String,default:""},value:{type:[Object,String,Number]},disabled:{type:Boolean,default:!1}},inject:{group:{default:""},option:{default:""}},data:function(){return{isShow:!0}},computed:{itemDisabled:function(){return!(!this.option||!this.option.disabled)||this.disabled},itemValue:function(){var e,t=null===(e=this.group)||void 0===e?void 0:e.valueKey;return t&&this.value?this.value[t]:this.value},groupValue:function(){var e,t,n=null===(e=this.group)||void 0===e?void 0:e.valueKey,i=null===(t=this.group)||void 0===t?void 0:t.value;return n&&i?i[n]:i},itemLabel:function(){return this.label?this.label:this.value},inputValue:function(){return this.group?this.group.inputValue:""}},methods:{onItemClick:function(){this.group&&!this.itemDisabled&&this.group.emitInputEvent(this.value)},matchLabel:function(e){var t;""!==e?this.group&&"function"==typeof this.group.filterMethod?this.isShow=this.group.filterMethod(e,this.$props):this.isShow=Y()(t=this.itemLabel.toString()).call(t,e):this.isShow=!0}},watch:{groupValue:{immediate:!0,handler:function(e){this.itemValue===e&&this.group&&(this.group.groupLabel=this.itemLabel)}},inputValue:function(e){"string"==typeof e&&(e=st()(e).call(e)),this.matchLabel(e)}}},at,[],!1,null,null,null);lt.options.__file="packages/choice-item/src/choice-item.vue";var ut=lt.exports;ut.install=function(e){return e.component(ut.name,ut)};var ct=ut,ft=function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"lin-choice-option"},[this._t("label",[t("div",{staticClass:"lin-choice-option-label"},[this._v("\n "+this._s(this.label)+"\n ")])]),this._v(" "),this._t("default")],2)};ft._withStripped=!0;var dt=T({name:"LinChoiceOption",props:{label:{type:String,default:""},disabled:{type:Boolean,default:!1}},provide:function(){return{option:this}}},ft,[],!1,null,null,null);dt.options.__file="packages/choice-option/src/choice-option.vue";var ht=dt.exports;ht.install=function(e){return e.component(ht.name,ht)};var pt=ht,vt={name:"LinCol",props:{tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:[Number,Object],sm:[Number,Object],md:[Number,Object],lg:[Number,Object]},inject:{row:{default:""}},computed:{gutter:function(){return this.row?this.row.gutter:0}},render:function(e){var t,n,i=this,a={},s=[];return this.gutter&&(a.paddingLeft="".concat(this.gutter/2,"px"),a.paddingRight=a.paddingLeft),r()(t=["offset","push","pull","span"]).call(t,(function(e){var t;i[e]&&("span"!==e?s.push(o()(t="lin-col-".concat(e,"-")).call(t,i[e])):s.push("lin-col-".concat(i[e])))})),r()(n=["xs","sm","md","lg"]).call(n,(function(e){var t;if("number"==typeof i[e])s.push(o()(t="lin-col-".concat(e,"-")).call(t,i[e]));else if("object"===p()(i[e])){var n,a=i[e];r()(n=ke()(a)).call(n,(function(t){var n,i,r;"span"!==t?s.push(o()(n=o()(i="lin-col-".concat(e,"-")).call(i,t,"-")).call(n,a[t])):s.push(o()(r="lin-col-".concat(e,"-")).call(r,a[t]))}))}})),e(this.tag,{class:["lin-col",s],style:a},this.$slots.default)},install:function(e){return e.component(vt.name,vt)}},gt=vt,mt=function(){var e=this.$createElement;return(this._self._c||e)("div",{class:[{"lin-collapse-group-simple":this.simple},"lin-collapse-group"]},[this._t("default")],2)};mt._withStripped=!0;var yt=T({name:"LinCollapseGroup",props:{value:{type:[Array,String,Number]},accordion:{type:Boolean,default:!1},simple:{type:Boolean,default:!1}},computed:{collapseValue:{get:function(){return this.canUseValue()?this.value:this.valueData},set:function(e){this.canUseValue()?this.$emit("input",this.handleData(e)):this.valueData=this.handleData(e),this.$emit("onChange",e)}}},provide:function(){return{collapseGroup:this}},data:function(){return{valueData:""}},methods:{handleData:function(e){var t;return t=this.accordion?e.length>0?e[0]:"":e,Object(I.cloneDeep)(t)},canUseValue:function(){var e=this.value;return"string"==typeof e||re()(e)||"number"==typeof e}}},mt,[],!1,null,null,null);yt.options.__file="packages/collapse-group/src/collapse-group.vue";var _t=yt.exports;_t.install=function(e){return e.component(_t.name,_t)};var bt=_t,St=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:[{"lin-collapse-item-simple":e.simple},"lin-collapse-item"]},[n("div",{staticClass:"lin-collapse-item-header",on:{click:e.onHeaderClick}},[e.hideArrow?e._e():n("i",{class:[{"lin-collapse-arrow-down":e.show},"lin-icon-right","lin-collapse-arrow"]}),e._v(" "),e._t("default")],2),e._v(" "),n("collapse-transition",[n("div",{directives:[{name:"show",rawName:"v-show",value:e.show,expression:"show"}],staticClass:"lin-collapse-item-content"},[e._t("content")],2)])],1)};St._withStripped=!0;var wt=n(33),Et=n.n(wt),Tt="0.3s height ease-in-out, 0.3s padding-top ease-in-out, 0.3s padding-bottom ease-in-out",kt={"before-enter":function(e){e.style.transition=Tt,e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0},enter:function(e){e.dataset.oldOverflow=e.style.overflow,0!==e.scrollHeight?(e.style.height="".concat(e.scrollHeight,"px"),e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom):(e.style.height="",e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom),e.style.overflow="hidden"},"after-enter":function(e){e.style.transition="",e.style.height="",e.style.overflow=e.dataset.oldOverflow},"before-leave":function(e){e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.dataset.oldOverflow=e.style.overflow,e.style.height="".concat(e.scrollHeight,"px"),e.style.overflow="hidden"},leave:function(e){0!==e.scrollHeight&&(e.style.transition=Tt,e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0)},"after-leave":function(e){e.style.transition="",e.style.height="",e.style.overflow=e.dataset.oldOverflow,e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom}},xt=T({name:"LinCollapseItem",props:{name:{type:[String,Number],require:!0},hideArrow:{type:Boolean,default:!1}},components:{collapseTransition:{name:"collapseTransition",functional:!0,render:function(e,t){return e("transition",{on:kt},t.children)}}},inject:{collapseGroup:{default:""}},computed:{simple:function(){return!!this.collapseGroup&&this.collapseGroup.simple},collapseValue:function(){if(this.collapseGroup){var e=this.collapseGroup.collapseValue;if(e&&("string"==typeof e||"number"==typeof e))return[e];if(re()(e))return e}return[]},accordion:function(){return!!this.collapseGroup&&this.collapseGroup.accordion},show:{get:function(){var e;return!!Y()(e=this.collapseValue).call(e,this.name)},set:function(e){var t=this;if(this.collapseGroup){var n=Object(I.cloneDeep)(this.collapseValue);if(this.accordion)n=!1===e?[]:[this.name];else if(!1===e){var i=Fe()(n).call(n,(function(e){return e===t.name}));i>-1&&Et()(n).call(n,i,1)}else n.push(this.name);this.collapseGroup.collapseValue=n}}}},methods:{onHeaderClick:function(){this.show=!this.show}}},St,[],!1,null,null,null);xt.options.__file="packages/collapse-item/src/collapse-item.vue";var Lt=xt.exports;Lt.install=function(e){return e.component(Lt.name,Lt)};var At=Lt,Ct=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"lin-data-axis"},[n("div",{ref:"dateAxisWrapper",staticClass:"lin-date-axis-wrapper"},[n("span",{staticClass:"lin-date-axis-left lin-date-axis-arrow",on:{click:e.prevWeek}},[e._t("prevWeek",[n("i",{staticClass:"lin-icon-leftarrow lin-data-axis-icon"})])],2),e._v(" "),n("span",{staticClass:"lin-date-axis-left lin-date-axis-arrow",on:{click:e.prevDay}},[e._t("prevDay",[n("i",{staticClass:"lin-icon-left lin-data-axis-icon"})])],2),e._v(" "),n("ul",{staticClass:"lin-date-axis-list"},e._l(e.timeList,(function(t,i){return n("li",{key:i,class:["lin-date-axis-item",{"lin-date-axis-active":e.isEqual(e.currentDate,t)},{"lin-date-axis-disabled":e.isDisabledDate(t)}],attrs:{id:"dateAxis-"+t.getDay()},on:{click:function(n){return e.onItemClick(t)}}},[e._t("default",[n("p",{staticClass:"lin-date-axis-text lin-date-axis-day"},[e._v("\n "+e._s(e.formatDay(t))+"\n ")]),e._v(" "),n("p",{staticClass:"lin-date-axis-text lin-date-axis-date"},[e._v("\n "+e._s(e.formatDate(t))+"\n ")])],{date:t})],2)})),0),e._v(" "),n("span",{staticClass:"lin-date-axis-right lin-date-axis-arrow",on:{click:e.nextDay}},[e._t("nextDay",[n("i",{staticClass:"lin-icon-right lin-data-axis-icon"})])],2),e._v(" "),n("span",{staticClass:"lin-date-axis-right lin-date-axis-arrow",on:{click:e.nextWeek}},[e._t("nextWeek",[n("i",{staticClass:"lin-icon-rightarrow lin-data-axis-icon"})])],2),e._v(" "),n("div",{staticClass:"lin-date-axis-line",style:{width:e.lineWidth,transform:"translateX("+e.lineTranslateX+")"}})]),e._v(" "),n("div",{ref:"notOutsideContainer",staticClass:"lin-date-axis-more"},[n("div",{on:{click:e.onMoreClick}},[e._t("more",[n("div",{staticClass:"lin-date-axis-more-content"},[n("i",{staticClass:"lin-icon-date"}),e._v(" "),n("span",[e._v(e._s(e.t("LinViewUI.DateAxis.more")))])])])],2),e._v(" "),n("transition",{attrs:{name:"lin-date-axis-fade"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.isShowPopup,expression:"isShowPopup"}],ref:"scrollContainer",class:["lin-date-axis-popup",{"lin-date-axis-popup-left":!e.isRight},{"lin-date-axis-popup-right":e.isRight}],style:{left:e.left}},[n("lin-date-picker",{attrs:{format:"Date",showAlways:"",showInput:!1,disabledBeforeDate:e.disabledBeforeDate,disabledAfterDate:e.disabledAfterDate,disabledRangeDate:e.disabledRangeDate,disabledDate:e.disabledDate,disabled:e.disabled},on:{select:e.onDateSelect},model:{value:e.currentDate,callback:function(t){e.currentDate=t},expression:"currentDate"}})],1)])],1)])};Ct._withStripped=!0;var Rt=n(10),Dt=n.n(Rt),Ot=function(e,t,n){return e&&t&&n?new Date(e,t-1,n):new Date},It=function(e){return e?{year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}:""},Pt=n(82),Mt=n.n(Pt),Ft={props:{disabled:{type:Boolean,default:!1},disabledBeforeDate:{type:[Date,String,Number],default:""},disabledAfterDate:{type:[Date,String,Number],default:""},disabledRangeDate:{type:Array,default:function(){return[]}},disabledDate:{type:Array,default:function(){return[]}}},methods:{isDisabledDate:function(e){var t,n=this;if(this.disabled)return!0;if(this.disabledBeforeDate){var i=new Date(this.disabledBeforeDate);if(this.isEqAndGt(i,e))return!0}if(this.disabledAfterDate){var r=new Date(this.disabledAfterDate);if(this.isEqAndLt(r,e))return!0}if(re()(this.disabledRangeDate)&&0!==this.disabledRangeDate.length){if(1===this.disabledRangeDate.length){var a=new Date(this.disabledRangeDate[0]);if(this.isEqAndLt(a,e))return!0}if(this.disabledRangeDate.length>=2){var o=new Date(this.disabledRangeDate[0]),s=new Date(this.disabledRangeDate[1]);if(this.isEqAndLt(o,e)&&this.isEqAndGt(s,e))return!0}}if(re()(this.disabledDate)&&0!==this.disabledDate.length&&Mt()(t=this.disabledDate).call(t,(function(t){return n.isEqual(t,e)})))return!0;return!1},compareDate:function(e,t,n){var i,r,a,s;e instanceof Date||(e=new Date(e)),t instanceof Date||(t=new Date(t));var l=new Date(o()(i=o()(r="".concat(e.getFullYear(),"/")).call(r,e.getMonth(),"/")).call(i,e.getDate())),u=new Date(o()(a=o()(s="".concat(t.getFullYear(),"/")).call(s,t.getMonth(),"/")).call(a,t.getDate()));return{Equal:l.getTime()===u.getTime(),EqAndLt:l<=u,EqAndGt:l>=u,Lt:l<u,Gt:l>u}[n]},isEqual:function(e,t){return this.compareDate(e,t,"Equal")},isEqAndLt:function(e,t){return this.compareDate(e,t,"EqAndLt")},isEqAndGt:function(e,t){return this.compareDate(e,t,"EqAndGt")},isLt:function(e,t){return this.compareDate(e,t,"Lt")},isGt:function(e,t){return this.compareDate(e,t,"Gt")}}},Bt={name:"LinDatePicker",mixins:[Ie,Ft],render:function(e){var t,n=this.cellWidth,i=this.focus,r=this.placeholder,a=this.formatDate,o=this.disabled,s=this.prevYear,l=this.prevMonth,u=this.nextMonth,c=this.time,f=this.nextYear,d=this.labelHeight,h=this.visibeDays,p=this.isVisible,v=this.weekDays,g=this.isCurrentMonth,m=this.isCurrentval,y=this.cellHeight,_=this.isDisabledDate,b=this.selectDate,S=this.renderInfo,w=this.radius,E=this.showAlways,T=this.showInput,k=this.t,x=this.top;return e("div",{directives:[{name:"click-outside",value:!0}],class:"lin-date-picker",ref:"container"},[T&&e("div",{class:"lin-date-picker-input-box",ref:"boxContainer"},[e("i",{class:"lin-icon-date lin-date-picker-icon"}),e("input",{on:{click:i},attrs:{readonly:!0,placeholder:r||k("LinViewUI.DatePicker.placeholder"),type:"text",disabled:o},domProps:{value:a},class:[{"lin-date-picker-disabled":o},"lin-date-picker-input"]})]),e("transition",{attrs:{name:"lin-date-picker-fade"}},[(p||E)&&e("div",{style:{top:x},ref:"popupContainer",class:[{"lin-date-picker-absolute":!E},"lin-date-picker-pannel"]},[e("div",{class:"lin-date-picker-pannel-header"},[e("span",{on:{click:s},class:"lin-icon-left"}),e("span",{on:{click:l},class:"lin-icon-leftarrow"}),e("span",[e("span",[c.year,k("LinViewUI.DatePicker.year")]),e("span",{class:"lin-date-picker-month"},[c.month,k("LinViewUI.DatePicker.month")])]),e("span",{on:{click:u},class:"lin-icon-rightarrow"}),e("span",{on:{click:f},class:"lin-icon-right"})]),e("div",{class:"lin-date-picker-pannel-content"},[e("div",{class:"lin-date-picker-pannel-days"},[e("div",{class:"lin-date-picker-pannel-row"},[Dt()(v).call(v,(function(t){return e("span",{style:{width:"".concat(n,"px"),height:"".concat(d,"px")},class:"lin-date-picker-pannel-label-cell lin-date-picker-cell",key:t},[t])}))]),Dt()(t=[1,2,3,4,5,6]).call(t,(function(t){var i;return e("div",{key:t},[Dt()(i=[1,2,3,4,5,6,7]).call(i,(function(i){var r=h[7*(t-1)+(i-1)],a=S&&S(e,r);return e("span",{key:i,style:{width:"".concat(n,"px"),height:"".concat(y,"px")},on:{click:function(){return b(r)}},class:["lin-date-picker-pannel-cell lin-date-picker-cell",{"lin-date-picker-not-current-month":!g(r)},{"lin-date-picker-current-val":m(r)},{"lin-date-picker-disabled-date":_(r)},{"lin-date-picker-radius":w}]},[a||e("span",{class:"lin-date-picker-info"},[r.getDate()])])}))])}))])])])])])},directives:{clickOutside:{bind:function(e,t,n){var i=function(t){e.contains(t.target)||n.context.showAlways||n.context.isVisible&&n.context.blur()};e.handler=i,document.addEventListener("click",i)},unbind:function(e){document.removeEventListener("click",e.handler)}}},props:{radius:{type:Boolean,default:!1},cellWidth:{type:Number,default:32},cellHeight:{type:Number,default:32},labelHeight:{type:Number,default:32},value:{type:[Date,String,Number],default:""},placeholder:{type:String},renderInfo:{type:Function,default:null},format:{type:String,default:"string"},showFormat:{type:Function,default:null},showAlways:{type:Boolean,default:!1},showInput:{type:Boolean,default:!0}},data:function(){var e=It(this.handleValue()),t=e.year,n=e.month;return{weekDays:[this.t("LinViewUI.DatePicker.sun"),this.t("LinViewUI.DatePicker.mon"),this.t("LinViewUI.DatePicker.tue"),this.t("LinViewUI.DatePicker.wed"),this.t("LinViewUI.DatePicker.thu"),this.t("LinViewUI.DatePicker.fir"),this.t("LinViewUI.DatePicker.sat")],isVisible:!1,time:{year:t,month:n},top:0}},computed:{currentValue:function(){return this.value?"string"==typeof this.value||"number"==typeof this.value?new Date(this.value):this.value instanceof Date?this.value:"":""},visibeDays:function(){for(var e=It(Ot(this.time.year,this.time.month,1)),t=e.year,n=e.month,i=Ot(t,n,1),r=i.getDay(),a=i-60*r*60*1e3*24,o=[],s=0;s<42;s++)o.push(new Date(a+60*s*60*1e3*24));return o},formatDate:function(){var e,t;if(this.showFormat)return this.showFormat(this.currentValue);if(!this.currentValue)return"";var n=It(this.currentValue),i=n.year,r=n.month,a=n.day;return o()(e=o()(t="".concat(i,"-")).call(t,r,"-")).call(e,a)}},methods:{setPlacement:function(){var e=this;this.$nextTick((function(){var t=e.$refs.popupContainer,n=e.$refs.container,i=window.innerHeight-n.getBoundingClientRect().bottom,r=n.getBoundingClientRect().top;i>t.clientHeight?e.setDownTop():r>t.clientHeight?e.setUpTop():e.setDownTop()}))},setDownTop:function(){var e=this.$refs.boxContainer;this.top="".concat(e.clientHeight,"px")},setUpTop:function(){var e=this.$refs.popupContainer;this.top="".concat(-e.clientHeight,"px")},handleValue:function(){return this.value?"string"==typeof this.value||"number"==typeof this.value?new Date(this.value):this.value instanceof Date?this.value:new Date:new Date},prevYear:function(){var e=Ot(this.time.year,this.time.month,1);e.setFullYear(e.getFullYear()-1),this.setTime(e),this.$emit("prevYear",e)},prevMonth:function(){var e=Ot(this.time.year,this.time.month,1);e.setMonth(e.getMonth()-1),this.setTime(e),this.$emit("prevMonth",e)},nextMonth:function(){var e=Ot(this.time.year,this.time.month,1);e.setMonth(e.getMonth()+1),this.setTime(e),this.$emit("nextMonth",e)},nextYear:function(){var e=Ot(this.time.year,this.time.month,1);e.setFullYear(e.getFullYear()+1),this.setTime(e),this.$emit("nextYear",e)},isCurrentMonth:function(e){var t=It(Ot(this.time.year,this.time.month,1)),n=t.year,i=t.month,r=It(e),a=r.year,o=r.month;return n===a&&i===o},isCurrentval:function(e){var t=It(this.currentValue),n=t.year,i=t.month,r=t.day,a=It(e),o=a.year,s=a.month,l=a.day;return n===o&&i===s&&r===l},selectDate:function(e){if(!this.isDisabledDate(e)){var t,n,i,r=It(e),a=r.year,s=r.month,l=r.day;if(this.time={year:a,month:s},"string"===this.format)t=o()(n=o()(i="".concat(a,"-")).call(i,s,"-")).call(n,l);else t="number"===this.format?new Date(e).getTime():e;this.$emit("input",t),xe.call(this,{eventName:"validate",componentName:"LinFormItem"}),this.$emit("select",t),this.blur()}},focus:function(){this.disabled||(this.isVisible=!this.isVisible,this.isVisible?(this.setPlacement(),this.$emit("focus")):this.$emit("blur"))},blur:function(){this.isVisible=!1,this.$emit("blur")},setTime:function(e){var t=It(e),n=t.year,i=t.month;this.time={year:n,month:i}}},install:function(e){return e.component(Bt.name,Bt)}},Nt=Bt,Ut=864e5,jt=T({name:"LinDateAxis",mixins:[Oe,Ie,Ft],components:H()({},Nt.name,Nt),model:{prop:"value",event:"change"},props:{value:{type:[Date,String]}},data:function(){return{isShowPopup:!1,selectTime:new Date,timeList:[],lineWidth:"0px",lineTranslateX:"0px",isRight:!0,left:"0px"}},created:function(){this.daysObj={0:this.t("LinViewUI.DateAxis.sun"),1:this.t("LinViewUI.DateAxis.mon"),2:this.t("LinViewUI.DateAxis.tue"),3:this.t("LinViewUI.DateAxis.wed"),4:this.t("LinViewUI.DateAxis.thu"),5:this.t("LinViewUI.DateAxis.fir"),6:this.t("LinViewUI.DateAxis.sat")},this.init(this.currentDate)},mounted:function(){this.throttleFn=Object(I.throttle)(this.setLine,500),window.addEventListener("resize",this.throttleFn)},beforeDestroy:function(){window.removeEventListener("resize",this.throttleFn)},methods:{setPlacement:function(){var e=this;this.$nextTick((function(){var t=e.$refs.scrollContainer,n=e.$refs.notOutsideContainer,i=window.innerWidth-n.getBoundingClientRect().left,r=n.getBoundingClientRect().left;i>t.clientWidth?e.setToRight():r>t.clientWidth?e.setToLeft():e.setToRight()}))},setToRight:function(){this.isRight=!0,this.left="0px"},setToLeft:function(){this.isRight=!1;var e=this.$refs.scrollContainer,t=this.$refs.notOutsideContainer;this.left="".concat(-e.clientWidth+t.clientWidth,"px")},onDateSelect:function(e){var t=this.timeList[0],n=this.timeList[this.timeList.length-1];e<t||e>n?this.init(e):this.setLine(),this.hidePopup(),this.$emit("select",e)},prevWeek:function(){if(!this.disabled){var e=this.currentDate;e=e.getTime()-6048e5;var t=e=new Date(e),n=new Date(e.getTime()+Ut*(6-e.getDay()));if(this.disabledBeforeDate){var i=new Date(this.disabledBeforeDate);if(this.isEqAndLt(n,i))return}for(;this.isDisabledDate(e)&&this.isLt(e,n);)e=e.getTime()+Ut,e=new Date(e);if(this.isDisabledDate(e))for(e=new Date(t.getTime()-Ut);this.isDisabledDate(e);)e=e.getTime()-Ut,e=new Date(e);this.currentDate=e,this.init(e),this.$emit("prevWeek",e)}},nextWeek:function(){if(!this.disabled){var e=this.currentDate;e=e.getTime()+6048e5;var t=e=new Date(e),n=new Date(e.getTime()-Ut*e.getDay());if(this.disabledAfterDate){var i=new Date(this.disabledAfterDate);if(this.isEqAndGt(n,i))return}for(;this.isDisabledDate(e)&&this.isGt(e,n);)e=e.getTime()-Ut,e=new Date(e);if(this.isDisabledDate(e))for(e=new Date(t.getTime()+Ut);this.isDisabledDate(e);)e=e.getTime()+Ut,e=new Date(e);this.currentDate=e,this.init(e),this.$emit("nextWeek",e)}},prevDay:function(){if(!this.disabled){var e=this.currentDate;if(e=e.getTime()-Ut,e=new Date(e),this.disabledBeforeDate){var t=new Date(this.disabledBeforeDate);if(this.isEqAndLt(e,t))return}for(;this.isDisabledDate(e);)e=e.getTime()-Ut,e=new Date(e);this.currentDate=e,e<this.timeList[0].getTime()?this.init(e):this.setLine(),this.$emit("prevDay",e)}},nextDay:function(){if(!this.disabled){var e=this.currentDate;if(e=e.getTime()+Ut,e=new Date(e),this.disabledAfterDate){var t=new Date(this.disabledAfterDate);if(this.isEqAndGt(e,t))return}for(;this.isDisabledDate(e);)e=e.getTime()+Ut,e=new Date(e);this.currentDate=e,e>this.timeList[this.timeList.length-1].getTime()?this.init(e):this.setLine(),this.$emit("nextDay",e)}},onItemClick:function(e){this.isDisabledDate(e)||this.isEqual(this.currentDate,e)||(this.currentDate=e,this.setLine(),this.$emit("select",e))},formatDate:function(e){var t,n=It(e);return o()(t="".concat(n.month,"-")).call(t,n.day)},formatDay:function(e){var t=e.getDay();return this.daysObj[t]},init:function(e){var t=e.getDay(),n=[],i=new Date(e);i.setDate(i.getDate()-t);for(var r=0;r<7;r++)n.push(new Date(i)),i.setDate(i.getDate()+1);this.timeList=n,this.setLine()},setLine:function(){var e=this;this.$nextTick((function(){var t=document.getElementById("dateAxis-".concat(e.currentDate.getDay()));if(t){e.lineWidth="".concat(t.offsetWidth,"px");var n=t.getBoundingClientRect().left,i=e.$refs.dateAxisWrapper.getBoundingClientRect().left;e.lineTranslateX="".concat(n-i,"px")}}))},onMoreClick:function(){this.isShowPopup?this.hidePopup():this.showPopup()},hidePopup:function(){this.isShowPopup=!1,this.$emit("hide")},showPopup:function(){this.isShowPopup=!0,this.$emit("show"),this.setPlacement()},onDocumentClick:function(e){this.$refs.notOutsideContainer.contains(e.target)||this.hidePopup()}},computed:{currentDate:{get:function(){return null==this.value?this.selectTime:this.value instanceof Date?this.value:new Date},set:function(e){this.isEqual(this.currentDate,e)||(null==this.value&&(this.selectTime=e),this.$emit("change",e))}}}},Ct,[],!1,null,null,null);jt.options.__file="packages/date-axis/src/date-axis.vue";var Vt=jt.exports;Vt.install=function(e){return e.component(Vt.name,Vt)};var Gt=Vt,$t=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"lin-dialog-fade"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.visible,expression:"visible"}],staticClass:"lin-dialog-wrapper",on:{click:function(t){return t.target!==t.currentTarget?null:e.onWrapperClick(t)}}},[n("div",{ref:"dragContainer",staticClass:"lin-dialog",style:Object.assign({},{width:e.width,marginTop:e.top},e.dialogStyle),on:{mousedown:e.onDragClick}},[n("div",{staticClass:"lin-dialog-header"},[e._t("title",[n("span",{staticClass:"lin-dialog-title"},[e._v(e._s(e.title||e.t("LinViewUI.Dialog.title")))])]),e._v(" "),n("button",{staticClass:"lin-dialog-headerbtn",on:{click:e.handleClose}},[n("i",{staticClass:"lin-icon-close"})])],2),e._v(" "),n("div",{staticClass:"lin-dialog-body"},[e._t("default")],2),e._v(" "),e.$slots.footer?n("div",{staticClass:"lin-dialog-footer"},[e._t("footer")],2):e._e()])])])};$t._withStripped=!0;var Ht=n(146),Wt=n.n(Ht),Kt={props:{drag:{type:Boolean,default:!1}},data:function(){return{dialogStyle:{top:"0",left:"50%",transform:"translateX(-50%)"}}},mounted:function(){this.startY=0,this.startX=0},beforeDestroy:function(){this.removeListener()},methods:{onDragClick:function(e){this.drag&&(document.body.classList.add("user-select-none"),this.startY=e.clientY,this.startX=e.clientX,document.addEventListener("mousemove",this.onMousemove),document.addEventListener("mouseup",this.onMouseup))},onMousemove:function(e){var t=e.clientY,n=e.clientX,i=t-this.startY,r=n-this.startX,a=this.$refs.dragContainer.getBoundingClientRect(),o=a.left,s=a.top,l=a.width,u=a.height,c=window.innerWidth,f=window.innerHeight;this.startY=t,this.startX=n;var d=Wt()(s+i,10),h=Wt()(o+r,10);d=(d=d<0?0:d)>f-u?f-u:d,h=(h=h<0?0:h)>c-l?c-l:h,this.dialogStyle={top:"".concat(d,"px"),left:"".concat(h,"px"),transform:"none",marginTop:0,marginBottom:0,marginLeft:0,marginRight:0}},onMouseup:function(){document.body.classList.remove("user-select-none"),this.removeListener()},removeListener:function(){document.removeEventListener("mousemove",this.onMousemove),document.removeEventListener("mouseup",this.onMouseup)}}},zt=T({name:"LinDialog",mixins:[Ie,Kt],props:{title:{type:String},width:{type:String,default:"50%"},top:{type:String,default:"15vh"},visible:{type:Boolean,default:!1},beforeClose:{type:Function},closeOnClickModa:{type:Boolean,default:!0}},methods:{handleClose:function(){var e=this,t=function(){e.$emit("update:visible",!1),e.$emit("close")};this.beforeClose?this.beforeClose(t):t()},onWrapperClick:function(){this.closeOnClickModa&&this.handleClose()}}},$t,[],!1,null,null,null);zt.options.__file="packages/dialog/src/dialog.vue";var qt=zt.exports;qt.install=function(e){return e.component(qt.name,qt)};var Yt=qt,Xt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"notOutsideContainer",staticClass:"lin-dropdown",on:{mouseenter:e.onMouseEnter,mouseleave:e.onMouseLeave,click:function(e){e.stopPropagation()}}},[n("div",{ref:"dropdownLabel",staticClass:"lin-dropdown-label",on:{click:e.onLabelClick}},[e._t("default")],2),e._v(" "),n("transition",{attrs:{name:"lin-dropdown-fade"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.isShow,expression:"isShow"}],ref:"dropdownContainer",class:["lin-dropdown-container",{"lin-dropdown-container-down":e.isDown},{"lin-dropdown-container-up":!e.isDown}],style:{top:e.top}},[e._t("dropdown")],2)])],1)};Xt._withStripped=!0;var Jt=T({name:"LinDropdown",mixins:[Oe],props:{trigger:{type:String,default:"hover"},hideOnClick:{type:Boolean,default:!0}},data:function(){return{isShow:!1,top:0,isDown:!0}},mounted:function(){this.setPlacement()},provide:function(){return{dropdown:this}},methods:{onMouseEnter:function(){"hover"===this.trigger&&this.showList()},onMouseLeave:function(){"hover"===this.trigger&&this.hideList()},onLabelClick:function(){"click"===this.trigger&&this.toggleList()},showList:function(){this.isShow||(this.isShow=!0,this.setPlacement(),this.$emit("visible-change",!0))},setDownTop:function(){this.isDown=!0;var e=this.$refs.dropdownLabel;this.top="".concat(e.clientHeight+8,"px")},setUpTop:function(){this.isDown=!1;var e=this.$refs.dropdownContainer;this.top="".concat(-(e.clientHeight+10),"px")},setPlacement:function(){var e=this;this.$nextTick((function(){var t=e.$refs.dropdownContainer,n=e.$refs.notOutsideContainer,i=window.innerHeight-n.getBoundingClientRect().bottom,r=n.getBoundingClientRect().top;i>t.clientHeight?e.setDownTop():r>t.clientHeight?e.setUpTop():e.setDownTop()}))},hideList:function(){this.isShow&&(this.isShow=!1,this.$emit("visible-change",!1))},toggleList:function(){this.isShow?this.hideList():this.showList()},onDocumentClick:function(e){this.$refs.notOutsideContainer.contains(e.target)||this.hideList()}}},Xt,[],!1,null,null,null);Jt.options.__file="packages/dropdown/src/dropdown.vue";var Zt=Jt.exports;Zt.install=function(e){return e.component(Zt.name,Zt)};var Qt=Zt,en=function(){var e=this.$createElement,t=this._self._c||e;return t("div",[this.label?t("div",{staticClass:"lin-dropdown-group-label"},[this._v(this._s(this.label))]):this._e(),this._v(" "),this._t("default")],2)};en._withStripped=!0;var tn=T({name:"LinDropdownGroup",props:{label:String}},en,[],!1,null,null,null);tn.options.__file="packages/dropdown-group/src/dropdown-group.vue";var nn=tn.exports;nn.install=function(e){return e.component(nn.name,nn)};var rn=nn,an=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:[{"lin-dropdown-item-divided":e.divided},{"lin-dropdown-item-disabled":e.disabled},"lin-dropdown-item"],on:{click:e.onItemClick}},[e.icon?n("span",{class:[e.icon,"lin-dropdown-item-icon"]}):e._e(),e._v(" "),n("div",[e._t("default")],2)])};an._withStripped=!0;var on=T({name:"LinDropdownItem",props:{disabled:{type:Boolean,default:!1},divided:{type:Boolean,default:!1},command:null,icon:{type:String,default:""}},computed:{hideOnClick:function(){return!this.dropdown||this.dropdown.hideOnClick}},inject:{dropdown:{default:null}},methods:{onItemClick:function(){this.dropdown&&(this.hideOnClick&&this.dropdown.hideList(),this.dropdown.$emit("command",this.command))}}},an,[],!1,null,null,null);on.options.__file="packages/dropdown-item/src/dropdown-item.vue";var sn=on.exports;sn.install=function(e){return e.component(sn.name,sn)};var ln=sn,un=function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"lin-form"},[this._t("default")],2)};un._withStripped=!0;n(143),n(203),n(210),n(211);var cn=n(30),fn=n.n(cn),dn=T({name:"LinForm",props:{model:{type:Object,required:!0},labelWidth:{type:String,default:"80px"},rules:{type:Object,default:function(){return{}}}},provide:function(){return{Form:this}},methods:{validate:function(e){var t,n,i=Dt()(t=Se()(n=this.$children).call(n,(function(e){return e.prop}))).call(t,(function(e){return e.validate()}));fn.a.all(i).then((function(t){e(Qe()(t).call(t,Boolean))})).catch((function(){return e(!1)}))},clearValidate:function(){!function e(t){r()(t).call(t,(function(t){"LinFormItem"===t.$options.name&&t.clearValidate&&t.clearValidate(),t.$children&&e(t.$children)}))}(this.$children)}}},un,[],!1,null,null,null);dn.options.__file="packages/form/src/form.vue";var hn=dn.exports;hn.install=function(e){return e.component(hn.name,hn)};var pn=hn,vn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"lin-form-item"},[e.label?n("label",{staticClass:"lin-form-item-label",style:{width:e.itemLabelWidth}},[e._v("\n "+e._s(e.label)+"\n ")]):e._e(),e._v(" "),n("div",{staticClass:"lin-form-item-content"},[e._t("default")],2),e._v(" "),n("transition",{attrs:{name:"lin-formItem-fade"}},[e.errorMsg?n("p",{staticClass:"lin-form-item-errormsg",style:{left:e.itemLabelWidth}},[e._v("\n "+e._s(e.errorMsg)+"\n ")]):e._e()])],1)};vn._withStripped=!0;var gn=n(216);function mn(e,t){var n=ke()(e);if(Ee.a){var i=Ee()(e);t&&(i=Se()(i).call(i,(function(t){return _e()(e,t).enumerable}))),n.push.apply(n,i)}return n}var yn=T({name:"LinFormItem",props:{label:String,prop:String,labelWidth:String},inject:["Form"],data:function(){return{errorMsg:""}},mounted:function(){this.$on("validate",this.validate)},methods:{validate:function(){var e=this;if(this.prop){var t=this.Form.model[this.prop],n=this.Form.rules[this.prop];return new gn.a(H()({},this.prop,n)).validate(H()({},this.prop,t)).then((function(){return e.errorMsg="",e.Form.$emit("validate",H()({result:!0},e.prop,t)),!0})).catch((function(n){var i=n.fields;return e.errorMsg=i[e.prop][0].message,e.Form.$emit("validate",function(e){for(var t=1;t<arguments.length;t++){var n,i=null!=arguments[t]?arguments[t]:{};if(t%2)r()(n=mn(Object(i),!0)).call(n,(function(t){H()(e,t,i[t])}));else if(me.a)ve()(e,me()(i));else{var a;r()(a=mn(Object(i))).call(a,(function(t){he()(e,t,_e()(i,t))}))}}return e}(H()({result:!1},e.prop,t),i)),!1}))}},clearValidate:function(){this.errorMsg=""}},computed:{itemLabelWidth:function(){return this.label?this.labelWidth?this.labelWidth:this.Form.labelWidth:0}}},vn,[],!1,null,null,null);yn.options.__file="packages/form-item/src/form-item.vue";var _n=yn.exports;_n.install=function(e){return e.component(_n.name,_n)};var bn=_n,Sn=function(){var e=this.$createElement;return(this._self._c||e)("button",{class:["lin-hover-effect","lin-hover-effect-theme-"+this.theme,"lin-hover-effect-type-"+this.type],on:{click:this.onClick}},[this._t("default",[this._v(this._s(this.text))])],2)};Sn._withStripped=!0;var wn=T({name:"LinHoverEffect",props:{type:{type:String,default:"primary"},theme:{type:String,default:"neon"},text:{type:String}},methods:{onClick:function(){this.$emit("click")}}},Sn,[],!1,null,null,null);wn.options.__file="packages/hover-effect/src/hover-effect.vue";var En=wn.exports;En.install=function(e){return e.component(En.name,En)};var Tn=En,kn=function(){var e,t=this,n=t.$createElement,i=t._self._c||n;return i("div",{staticClass:"lin-image"},[t.isShowImg?i("img",{class:[(e={},e["lin-image-object-"+t.fit]=t.fit,e),"lin-image-img"],attrs:{alt:t.alt,"referrer-policy":t.referrerPolicy,src:t.url},on:{click:t.onImageClick,error:t.onError,load:t.onLoad}}):t._t("default",[i("div",{staticClass:"lin-image-error"},[t._v("\n "+t._s(t.errorMsg||t.t("LinViewUI.Image.errorMsg"))+"\n ")])]),t._v(" "),i("transition",{attrs:{name:t.transitionName}},[t.showPreview?i("div",{staticClass:"lin-image-mask",on:{click:t.onMaskClick}},[i("span",{staticClass:"lin-image-close",on:{click:function(e){return e.stopPropagation(),t.onImageClick(e)}}},[i("span",{staticClass:"lin-image-line lin-image-line-left"}),t._v(" "),i("span",{staticClass:"lin-image-line lin-image-line-right"})]),t._v(" "),i("img",{attrs:{src:t.url,alt:t.alt}})]):t._e()])],2)};kn._withStripped=!0;var xn=T({name:"LinImage",mixins:[Ie],props:{imgUrl:[Array,String],fit:{type:String,default:""},referrerPolicy:{type:String,default:""},alt:{type:String,default:""},preview:{type:Boolean,default:!1},transitionName:{type:String,default:"lin-image-animation"},clickMask:{type:Boolean,default:!0},errorMsg:{type:String}},data:function(){return{index:0,isError:!1,showPreview:!1}},methods:{onImageClick:function(){this.preview&&(this.showPreview=!this.showPreview)},onMaskClick:function(){this.clickMask&&this.onImageClick()},onError:function(e){if(re()(this.imgUrl)){var t;if(this.$emit("error",{url:this.imgUrl[this.index],index:this.index,e:e}),this.index===this.imgUrl.length-1)return this.isError=!0,void this.$emit("AllError",{urls:oe()(t=this.imgUrl).call(t),e:e});this.index+=1}else this.$emit("error",{url:this.imgUrl,e:e})},onLoad:function(e){re()(this.imgUrl)?this.$emit("success",{url:this.imgUrl[this.index],index:this.index,e:e}):this.$emit("success",{url:this.imgUrl,e:e})},getUrl:function(){var e=this.imgUrl[this.index];return!e&&this.imgUrl.length>this.index?(this.index+=1,this.getUrl()):e},setError:function(e){this.isError=e}},computed:{url:function(){if(re()(this.imgUrl)){var e=this.getUrl();return e||this.setError(!0),e}return this.imgUrl},isShowImg:function(){return!!this.imgUrl&&((!re()(this.imgUrl)||0!==this.imgUrl.length)&&!this.isError)}}},kn,[],!1,null,null,null);xn.options.__file="packages/image/src/image.vue";var Ln=xn.exports;Ln.install=function(e){return e.component(Ln.name,Ln)};var An=Ln,Cn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"lin-input-number",class:{"lin-input-number-disabled":e.disabled}},[n("span",{staticClass:"lin-input-number-reduce lin-input-number-btn",class:{"lin-input-number-btn-disabled":e.disabledReduce},on:{click:e.reduce}},[e._v("-")]),e._v(" "),n("input",{staticClass:"lin-input-number-text",attrs:{disabled:e.disabled,type:"text"},domProps:{value:e.value},on:{blur:e.onBlur}}),e._v(" "),n("span",{staticClass:"lin-input-number-plus lin-input-number-btn",class:{"lin-input-number-btn-disabled":e.disabledPlus},on:{click:e.plus}},[e._v("+")])])};Cn._withStripped=!0;var Rn=n(60),Dn=n.n(Rn),On=T({name:"LinInputNumber",props:{value:{type:[Number,String]},min:{type:Number,default:NaN},max:{type:Number,default:NaN},step:{type:Number,default:1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:""},stepStrictly:{type:Boolean,default:!1}},methods:{reduce:function(){if(!this.disabledReduce){var e=1*this.value-this.step;this.emitInputEvent(e),this.$emit("reduce",e)}},plus:function(){if(!this.disabledPlus){var e=1*this.value+this.step;this.emitInputEvent(e),this.$emit("plus",e)}},onBlur:function(e){var t=1*e.target.value;this.stepStrictly?!Dn()(this.min)&&t<this.min?t=this.min+(this.step-this.min%this.step):!Dn()(this.max)&&t>this.max?t=this.max-this.min%this.step:t-=t%this.step:!Dn()(this.min)&&t<this.min?t=this.min:!Dn()(this.max)&&t>this.max&&(t=this.max),this.emitInputEvent(t)},emitInputEvent:function(e){this.$emit("input",e),xe.call(this,{eventName:"validate",componentName:"LinFormItem"})}},computed:{disabledReduce:function(){return!!this.disabled||!Dn()(this.min)&&(""!==this.value&&null!==this.value&&void 0!==this.value&&this.value<=this.min)},disabledPlus:function(){return!!this.disabled||!Dn()(this.max)&&(""!==this.value&&null!==this.value&&void 0!==this.value&&this.value>=this.max)}}},Cn,[],!1,null,null,null);On.options.__file="packages/input-number/src/input-number.vue";var In=On.exports;In.install=function(e){return e.component(In.name,In)};var Pn=In,Mn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"lin-limit-textarea"},[n("textarea",e._b({staticClass:"lin-limit-textarea-input",class:{"lin-limit-textarea-over":e.isOver},domProps:{value:e.value},on:{keyup:e.handleInput}},"textarea",e.textareaProps,!1)),e._v(" "),-1!==e.maxLen?n("span",{staticClass:"lin-limit-textarea-text"},[e._v("\n "+e._s(e.isOver?e.t("LinViewUI.LimitTextarea.exceeded"):e.t("LinViewUI.LimitTextarea.enterInput"))+"\n "),n("span",{staticClass:"lin-limit-textarea-num",class:{"lin-limit-textarea-num-over":e.isOver}},[e._v(e._s(e.num))]),e._v(e._s(e.t("LinViewUI.LimitTextarea.word"))+"\n ")]):n("span",{staticClass:"lin-limit-textarea-text"},[e._v("\n "+e._s(e.t("LinViewUI.LimitTextarea.entered"))+"\n "),n("span",{staticClass:"lin-limit-textarea-num"},[e._v(e._s(e.value.toString().length))]),e._v(e._s(e.t("LinViewUI.LimitTextarea.word"))+"\n ")])])};function Fn(e,t){var n=ke()(e);if(Ee.a){var i=Ee()(e);t&&(i=Se()(i).call(i,(function(t){return _e()(e,t).enumerable}))),n.push.apply(n,i)}return n}function Bn(e){for(var t=1;t<arguments.length;t++){var n,i=null!=arguments[t]?arguments[t]:{};if(t%2)r()(n=Fn(Object(i),!0)).call(n,(function(t){H()(e,t,i[t])}));else if(me.a)ve()(e,me()(i));else{var a;r()(a=Fn(Object(i))).call(a,(function(t){he()(e,t,_e()(i,t))}))}}return e}Mn._withStripped=!0;var Nn=T({name:"LinLimitTextarea",mixins:[Ie],model:{prop:"value",event:"change"},props:{placeholder:{type:String},rows:{type:Number,default:4},maxLen:{type:Number,default:-1},isCut:{type:Boolean,default:!1},value:{type:[String,Number],default:""}},data:function(){return{isOver:!1,num:this.maxLen}},methods:{handleInput:function(e){var t=e.target.value;-1===this.maxLen?this.$emit("change",t):(t.length<=this.maxLen||!this.isCut)&&(this.$emit("change",t),this.setCurrentValue(t))},setCurrentValue:function(e){var t=e.toString();if(t.length<=this.maxLen)this.isOver=!1,this.num=this.maxLen-t.length;else{if(this.isCut)return void(this.num=t.length-this.maxLen);this.isOver=!0,this.num=t.length-this.maxLen,this.$emit("overText",t)}}},computed:{maxlength:function(){return this.isCut?this.maxLen:-1},textareaProps:function(){var e={placeholder:this.placeholder?this.placeholder:this.t("LinViewUI.LimitTextarea.placeholder"),rows:this.rows};return-1!==this.maxlength&&(e.maxlength=this.maxlength),Bn(Bn({},this.$attrs),e)}}},Mn,[],!1,null,null,null);Nn.options.__file="packages/limit-textarea/src/limit-textarea.vue";var Un=Nn.exports;Un.install=function(e){return e.component(Un.name,Un)};var jn=Un,Vn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a",e._b({class:["lin-link","lin-link-"+e.type,{"lin-link-disabled":e.disabled,"lin-link-underline":e.underline&&!e.disabled}],attrs:{href:e.href},on:{click:e.onClick}},"a",e.$attrs,!1),[e.icon?n("i",{class:[e.icon,"lin-link-icon"]}):e._e(),e._v(" "),n("span",[e._t("default")],2)])};Vn._withStripped=!0;var Gn=T({name:"LinLink",props:{type:{type:String,default:"default"},underline:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},href:{type:String,default:""},icon:{type:String,default:""}},methods:{onClick:function(e){this.href&&!this.disabled||e.preventDefault()}}},Vn,[],!1,null,null,null);Gn.options.__file="packages/link/src/link.vue";var $n=Gn.exports;$n.install=function(e){return e.component($n.name,$n)};var Hn=$n,Wn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"lin-live-comment"},[e._t("title",[n("p",{staticClass:"lin-live-comment-title"},[e._v("\n "+e._s(e.title||e.t("LinViewUI.LiveComment.title"))+"\n ")])]),e._v(" "),e._t("view-count",[n("p",{staticClass:"lin-live-comment-view-count"},[e._v("\n "+e._s(e.viewCount)+e._s(e.t("LinViewUI.LiveComment.viewPeople"))+"\n ")])]),e._v(" "),n("div",{ref:"scroll",staticClass:"lin-live-comment-content",on:{scroll:e.onScroll}},[e._l(e.commentList,(function(t,i){return e._t("default",[n("div",{key:i,staticClass:"lin-live-comment-item"},[n("lin-image",{staticClass:"lin-live-comment-user-avator",attrs:{errorMsg:"",imgUrl:[t._avatorUrl,e.defaultAvator]}}),e._v(" "),n("div",{staticClass:"lin-live-comment-info-box"},[n("div",{staticClass:"lin-live-comment-user-name"},[n("span",[e._v(e._s(t._username))]),e._v(" "),n("span",[e._v(e._s(t._createTimeTip))])]),e._v(" "),n("div",{staticClass:"lin-live-comment-info",domProps:{innerHTML:e._s(e.changeContent(t._content))}})])],1)],{item:t})}))],2),e._v(" "),!e.isScrollToBottom&&e.fixComment?n("div",{staticClass:"lin-live-comment-fix"},[n("span",[e._v(e._s(e.fixComment._username)+":")]),e._v(" "),n("span",{domProps:{innerHTML:e._s(e.changeContent(e.fixComment._content))}}),e._v(" "),n("span",{on:{click:e.toBottom}},[n("span",[e._v(e._s(e.t("LinViewUI.LiveComment.see")))]),e._v(" "),n("i",{staticClass:"lin-icon-downarrow"})])]):e._e(),e._v(" "),n("div",{staticClass:"lin-live-comment-input"},[e.arrowComment?e._e():n("div",{staticClass:"lin-live-comment-mask"},[e._t("mask",[n("span",{staticClass:"lin-live-comment-mask-default"},[e._v("\n "+e._s(e.t("LinViewUI.LiveComment.publishOpinion"))+" /\n "),n("span",{staticClass:"lin-live-comment-login-btn",on:{click:e.gotoLogin}},[e._v(e._s(e.t("LinViewUI.LiveComment.login")))]),e._v("\n "+e._s(e.t("LinViewUI.LiveComment.commentAfter"))+"\n ")])])],2),e._v(" "),n("textarea",e._b({staticClass:"lin-live-comment-textarea",domProps:{value:e.value},on:{keyup:e.onInput}},"textarea",e.textareaAttr,!1)),e._v(" "),n("span",{staticClass:"lin-live-comment-send-btn",on:{click:e.publishComment}},[e._v(e._s(e.btnText||e.t("LinViewUI.LiveComment.btnText")))])])],2)};Wn._withStripped=!0;var Kn=n.p+"assets/images/default_avatar.72854663.png",zn=T({name:"LinLiveComment",mixins:[Ie],components:H()({},An.name,An),props:{commentList:{type:Array,default:function(){return[]}},fixComment:{type:Object,default:null},value:{type:String,default:""},btnText:{type:String},arrowComment:{type:Boolean,default:!1},placeholder:{type:String},maxlength:{type:Number,default:-1},throttle:{type:Boolean,default:!0},title:{type:String},viewCount:{type:Number,default:0},defaultAvator:{type:String,default:Kn},isLoading:{type:Boolean,default:!1}},data:function(){return{isScrollToBottom:!0}},methods:{onScroll:function(e){var t=this;this.scrollTimer&&clearTimeout(this.scrollTimer),this.throttle?this.scrollTimer=R()((function(){t.handlerOnScroll(e)}),500):this.handlerOnScroll(e)},handlerOnScroll:function(e){var t=e.target,n=t.scrollTop,i=t.scrollHeight;n+t.offsetHeight+40<i?this.isScrollToBottom=!1:(this.isScrollToBottom=!0,this.$emit("toBottom")),this.$emit("scroll",e)},changeContent:function(e){return e?e.replace(/\n/g,"<br/>"):""},toBottom:function(){this.$refs.scroll.scrollTop=this.$refs.scroll.scrollHeight,this.isScrollToBottom=!0},publishComment:function(){this.isLoading||this.$emit("sendBtnClick")},onInput:function(e){var t=e.target.value;this.$emit("input",t)},gotoLogin:function(){this.$emit("loginBtnClick")}},watch:{commentList:{immediate:!0,handler:function(e){var t=this;e.length>0&&this.isScrollToBottom&&this.$nextTick((function(){t.$refs.scroll.scrollTop=t.$refs.scroll.scrollHeight}))}}},computed:{commentPlaceholder:function(){return this.placeholder?this.placeholder:this.t("LinViewUI.LiveComment.placeholder")},textareaAttr:function(){var e={};return-1!==this.maxlength&&(e.maxlength=this.maxlength),this.arrowComment&&(e.placeholder=this.commentPlaceholder),e}},beforeDestroy:function(){this.scrollTimer&&clearTimeout(this.scrollTimer)}},Wn,[],!1,null,null,null);zn.options.__file="packages/live-comment/src/live-comment.vue";var qn=zn.exports;qn.install=function(e){return e.component(qn.name,qn)};var Yn=qn;var Xn=function(){var e={height:document.documentElement.scrollHeight||document.body.scrollHeight||0,width:document.documentElement.scrollWidth||document.body.scrollWidth||0},t={left:window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0,top:window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0};return{scrollHeight:e.height,scrollWidth:e.width,scrollLeft:t.left,scrollTop:t.top}},Jn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"lin-loading-fade"},on:{"after-leave":e.handleAfterLeave}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.visible,expression:"visible"}],staticClass:"lin-loading-mask",class:[{"lin-loading-is-fullscreen":e.fullscreen}],style:{backgroundColor:e.background||""}},[n("div",{staticClass:"lin-loading-content"},[n("span",{staticClass:"lin-loading-icon",style:{"border-top-color":e.iconColor||"","border-right-color":e.iconColor||""}}),e._v(" "),e.text?n("span",{staticClass:"lin-loading-text",style:{color:e.textColor||""}},[e._v(e._s(e.text))]):e._e()])])])};Jn._withStripped=!0;var Zn=T({name:"LinLoading",data:function(){return{text:null,fullscreen:!0,visible:!1,background:null,iconColor:null,textColor:null}},methods:{handleAfterLeave:function(){this.$emit("after-leave")}}},Jn,[],!1,null,null,null);Zn.options.__file="packages/loading/src/loading.vue";var Qn=Zn.exports;function ei(e,t,n){document.body===e?t.style.marginTop="".concat(Xn().scrollTop,"px"):t.style.marginTop="".concat(n.scrollTop,"px")}function ti(e,t){document.body===e?window.addEventListener("scroll",t):e.addEventListener("scroll",t)}var ni=c.a.extend(Qn);ni.prototype.open=function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n&&n.target&&(r()(e=ke()(n)).call(e,(function(e){t[e]=n[e]})),this.fullscreen||this.target.classList.contains("lin-loading-position-relative")||this.target.classList.add("lin-loading-position-relative"),this.lock&&!this.target.classList.contains("lin-loading-lock")&&this.target.classList.add("lin-loading-lock"),this.visible||(this.vm=this.$mount(),this.fullscreen||(this.onScroll=function(){ei(t.target,t.vm.$el,t.target)},ei(this.target,this.vm.$el,this.target),this.lock||ti(this.target,this.onScroll)),this.target.appendChild(this.vm.$el),this.visible=!0))},ni.prototype.close=function(){var e=this;this.target&&this.visible&&(this.visible=!1,this.$once("after-leave",(function(){var t,n;!e.fullscreen&&e.target.classList.contains("lin-loading-position-relative")&&e.target.classList.remove("lin-loading-position-relative"),e.lock&&e.target.classList.contains("lin-loading-lock")&&e.target.classList.remove("lin-loading-lock"),e.fullscreen||(e.vm.$el.style.marginTop="",e.lock||(t=e.target,n=e.onScroll,document.body===t?window.removeEventListener("scroll",n):t.removeEventListener("scroll",n))),e.vm.$el&&e.target.removeChild(e.vm.$el)})))};var ii=ni;function ri(e,t){var n=ke()(e);if(Ee.a){var i=Ee()(e);t&&(i=Se()(i).call(i,(function(t){return _e()(e,t).enumerable}))),n.push.apply(n,i)}return n}function ai(e){for(var t=1;t<arguments.length;t++){var n,i=null!=arguments[t]?arguments[t]:{};if(t%2)r()(n=ri(Object(i),!0)).call(n,(function(t){H()(e,t,i[t])}));else if(me.a)ve()(e,me()(i));else{var a;r()(a=ri(Object(i))).call(a,(function(t){he()(e,t,_e()(i,t))}))}}return e}var oi=null,si=null;function li(e,t){if(!e)return!1;e.instance||(e.instance=new ii);var n=t.modifiers.fullscreen,i=t.modifiers.lock,r={fullscreen:n,target:t.modifiers.body?document.body:e,lock:i},a=e.getAttribute("lin-loading-text"),o=e.getAttribute("lin-loading-background"),s=e.getAttribute("lin-loading-textColor");return r.text=a,r.background=o,r.textColor=s,e.instance.open(r),!0}function ui(e){return!!e&&(e.instance&&(e.instance.close(),e.instance=null),!0)}var ci={install:function(e){e.directive("loading",{bind:function(e,t){t.value&&li(e,t)},update:function(e,t){t.value?li(e,t):ui(e)},unbind:function(e){ui(e)}})}},fi={service:{open:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return oi||(oi=new ii),e.target||(e.target=document.body),oi.open(ai({},e)),e.time&&(si&&clearTimeout(si),si=R()((function(){oi.close()}),e.time)),oi},close:function(){oi&&(si&&clearTimeout(si),oi.close(),oi=null)}},directive:ci},di={install:function(e){e.use(fi.directive),e.prototype.$loading=fi.service},directive:fi.service,service:fi.service},hi=n(217),pi=n.n(hi),vi=function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"lin-loading-bar"},[t("div",{staticClass:"lin-loading-bar-progress",class:{"lin-loading-bar-error":this.isError},style:{transform:"translateX(-"+(100-this.totalProgress)+"%)"}},[t("div",{staticClass:"lin-loading-bar-peg"})]),this._v(" "),this.showSpinner?t("div",{staticClass:"lin-loading-bar-spinner"},[t("div",{staticClass:"lin-loading-bar-icon",class:{"lin-loading-bar-icon-error":this.isError},style:{"animation-timing-function":this.easing}})]):this._e()])};vi._withStripped=!0;var gi=T({name:"LinLoadingBar",data:function(){return{easing:"linear",isError:!1,showSpinner:!0,totalProgress:0,percentNum:0,speed:5}}},vi,[],!1,null,null,null);gi.options.__file="packages/loading-bar/src/loading-bar.vue";var mi=gi.exports,yi=c.a.extend(mi),_i=null,bi=null;yi.prototype.config=function(e){var t,n=this;r()(t=ke()(e)).call(t,(function(t){"isError"!==t&&"totalProgress"!==t&&(n[t]=e[t])}))},yi.prototype.init=function(){return clearTimeout(_i),this.totalProgress=0,this.isError=!1,this.vm=this.$mount(),document.body.appendChild(this.vm.$el),this},yi.prototype.start=function(){var e=this;this.init(),_i=pi()((function(){e.totalProgress<90&&(e.totalProgress+=(e.percentNum||Math.random())*e.speed)}),100)},yi.prototype.end=function(){var e=this;_i||this.init(),this.totalProgress=100,clearTimeout(bi),bi=R()((function(){clearTimeout(_i),_i=null,document.body.removeChild(e.vm.$el)}),200)},yi.prototype.error=function(){this.end(),this.totalProgress=100,this.isError=!0};var Si=new yi;Si.install=function(e){e.prototype.$loadingBar=Si};var wi=Si,Ei=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"lin-magnifier"},[n("div",{ref:"smallBox",staticClass:"lin-magnifier-small",style:e.smallStyle,on:{mousemove:e.onMousemove,mouseout:e.onMouseout,mouseover:e.onMouseover}},[e._t("small",[n("img",{attrs:{src:e.smallPic,alt:""}})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.showMoveMask,expression:"showMoveMask"}],ref:"moveMask",staticClass:"lin-magnifier-move-slot",style:e.moveStyle},[e._t("move",[n("div",{staticClass:"lin-magnifier-move",style:{"background-color":e.maskColor}})])],2)],2),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.showBigImg,expression:"showBigImg"}],ref:"bigBox",staticClass:"lin-magnifier-big",style:e.bigBoxStyle},[n("div",{staticClass:"lin-magnifier-big-slot",style:e.bigImgStyle},[e._t("big",[n("img",{staticClass:"lin-magnifier-big-img",attrs:{src:e.bigPic}})])],2)])])};Ei._withStripped=!0;var Ti=n(218),ki=n.n(Ti);function xi(e,t){var n=ke()(e);if(Ee.a){var i=Ee()(e);t&&(i=Se()(i).call(i,(function(t){return _e()(e,t).enumerable}))),n.push.apply(n,i)}return n}function Li(e){for(var t=1;t<arguments.length;t++){var n,i=null!=arguments[t]?arguments[t]:{};if(t%2)r()(n=xi(Object(i),!0)).call(n,(function(t){H()(e,t,i[t])}));else if(me.a)ve()(e,me()(i));else{var a;r()(a=xi(Object(i))).call(a,(function(t){he()(e,t,_e()(i,t))}))}}return e}var Ai=T({name:"LinMagnifier",props:{smallPic:{type:String,require:!0},bigPic:{type:String,require:!0},smallStyle:{type:Object,default:function(){return{width:0,height:0}}},bigStyle:{type:Object,default:function(){return{width:0,height:0}}},maskColor:String},data:function(){return{showMoveMask:!1,showBigImg:!1,moveStyle:{left:0,top:0},bigImgStyle:{left:0,top:0}}},computed:{bigBoxStyle:function(){return Li(Li({},this.bigStyle),{},{left:"".concat(ki()(this.smallStyle.width)+10,"px")})}},mounted:function(){this.smallBox=this.$refs.smallBox,this.moveMask=this.$refs.moveMask,this.bigBox=this.$refs.bigBox},methods:{onMouseover:function(){this.showMoveMask=!0,this.showBigImg=!0,this.$emit("show")},onMouseout:function(){this.showMoveMask=!1,this.showBigImg=!1,this.$emit("hide")},onMousemove:function(e){var t=this.smallBox,n=this.moveMask,i=this.bigBox,r=e.clientX-t.getBoundingClientRect().left-n.offsetWidth/2,a=e.clientY-t.getBoundingClientRect().top-n.offsetHeight/2;r<0?r=0:r>t.offsetWidth-n.offsetWidth&&(r=t.offsetWidth-n.offsetWidth),a<0?a=0:a>t.offsetHeight-n.offsetHeight&&(a=t.offsetHeight-n.offsetHeight),this.moveStyle={left:"".concat(r,"px"),top:"".concat(a,"px")},this.bigImgStyle={left:"".concat(-r*i.offsetWidth/t.offsetWidth,"px"),top:"".concat(-a*i.offsetHeight/t.offsetHeight,"px")},this.$emit("move",e)}}},Ei,[],!1,null,null,null);Ai.options.__file="packages/magnifier/src/magnifier.vue";var Ci=Ai.exports;Ci.install=function(e){return e.component(Ci.name,Ci)};var Ri=Ci,Di=n(55),Oi=n.n(Di),Ii=n(56),Pi=n.n(Ii),Mi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"message"},on:{"after-leave":e.afterLeave}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.show,expression:"show"}],class:["lin-message","lin-message-"+e.type,{"lin-message-center":e.center},e.customClass?e.customClass:""],style:{top:e.offsetTop+"px"}},[n("i",{class:["lin-message-icon",e.iconClass?e.iconClass:"lin-icon-"+e.type]}),e._v(" "),e.dangerouslyUseHTMLString?e._e():n("p",{staticClass:"lin-message-content"},[e._v("\n "+e._s(e.message)+"\n ")]),e._v(" "),e.dangerouslyUseHTMLString?n("p",{staticClass:"lin-message-content",domProps:{innerHTML:e._s(e.message)}}):e._e(),e._v(" "),e.showClose?n("i",{staticClass:"lin-icon-close lin-message-close-icon",on:{click:e.onCloseClick}}):e._e()])])};Mi._withStripped=!0;var Fi=T({name:"LinMessage",props:{type:{type:String,default:"info"},showClose:{type:Boolean,default:!1},message:{type:String},iconClass:{type:String},dangerouslyUseHTMLString:{type:Boolean,default:!1},customClass:{type:String},center:{type:Boolean,default:!1},onClose:{type:Function},offset:{type:Number,default:20}},data:function(){return{show:!1,top:0}},methods:{onCloseClick:function(){this.show&&(this.show=!1,this.$emit("close"))},afterLeave:function(){this.$emit("closed"),this.onClose&&this.onClose()}},computed:{offsetTop:function(){return this.top+this.offset}}},Mi,[],!1,null,null,null);Fi.options.__file="packages/message/src/message.vue";var Bi=Fi.exports;function Ni(e,t){var n=ke()(e);if(Ee.a){var i=Ee()(e);t&&(i=Se()(i).call(i,(function(t){return _e()(e,t).enumerable}))),n.push.apply(n,i)}return n}function Ui(e){for(var t=1;t<arguments.length;t++){var n,i=null!=arguments[t]?arguments[t]:{};if(t%2)r()(n=Ni(Object(i),!0)).call(n,(function(t){H()(e,t,i[t])}));else if(me.a)ve()(e,me()(i));else{var a;r()(a=Ni(Object(i))).call(a,(function(t){he()(e,t,_e()(i,t))}))}}return e}var ji=c.a.extend(Bi),Vi=[];var Gi=function(){function e(t){Oi()(this,e),H()(this,"options",null),H()(this,"instance",null),H()(this,"propsData",{}),H()(this,"timer",null),this.options=t||{},this.initProps(t),this.init()}return Pi()(e,[{key:"initProps",value:function(){var e=this,t=["type","showClose","message","iconClass","dangerouslyUseHTMLString","customClass","center","onClose","offset"],n={};r()(t).call(t,(function(t){t in e.options&&(n[t]=e.options[t])})),this.propsData=n}},{key:"init",value:function(){var e=this;this.instance||(this.instance=new ji({propsData:Ui({},this.propsData)}),this.instance&&(Vi.push(this.instance),this.instance.$mount(),document.body.appendChild(this.instance.$el),this.instance.show=!0,this.saveOffsetTop(),this.setTimer(),this.instance.$once("closed",(function(){e.destory()}))))}},{key:"saveOffsetTop",value:function(){var e=this,t=Fe()(Vi).call(Vi,(function(t){return t._uid===e.instance._uid}));if(t>0){var n=Vi[t-1].$el,i=n.offsetHeight,r=n.offsetTop;this.instance.top=r+i}else this.instance.top=0}},{key:"setTimer",value:function(){var e=this,t=this.options.duration;0!==t&&(this.timer=R()((function(){e.close()}),t||3e3))}},{key:"close",value:function(){this.instance&&this.instance.show&&(this.instance.show=!1)}},{key:"destory",value:function(){var e=this;if(this.instance){var t=Fe()(Vi).call(Vi,(function(t){return t._uid===e.instance._uid}));t>-1&&(!function(e){for(var t=Vi.length-1;t>e;t--){var n=Vi[t],i=Vi[t-1];n.top=i.top}}(t),Et()(Vi).call(Vi,t,1)),document.body.removeChild(this.instance.$el),this.instance.$destroy()}this.timer&&clearTimeout(this.timer),this.instance=null}}]),e}();function $i(e){var t,n=Object.prototype.toString;return Y()(t=n.call(e)).call(t,"Object")?new Gi(e):new Gi({message:e.toString()})}function Hi(e,t){var n,i=Object.prototype.toString;return Y()(n=i.call(e)).call(n,"Object")?new Gi(Ui(Ui({},e),{},{type:t})):new Gi({message:e.toString(),type:t})}$i.success=function(e){return Hi(e,"success")},$i.info=function(e){return Hi(e,"info")},$i.error=function(e){return Hi(e,"error")},$i.warning=function(e){return Hi(e,"warning")},$i.closeAll=function(){r()(Vi).call(Vi,(function(e){e.onCloseClick()}))};var Wi=$i;Wi.install=function(e){e.prototype.$Message=Wi};var Ki=Wi,zi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"lin-message-fade"}},[e.show?n("div",{class:["lin-message-box",e.customClass],on:{click:function(t){return t.target!==t.currentTarget?null:e.onMaskClick(t)}}},[n("div",{ref:"dragContainer",staticClass:"lin-message-box-wrapper",style:e.dialogStyle,on:{mousedown:e.onDragClick}},[n("div",{staticClass:"lin-message-box-header"},[n("div",{staticClass:"lin-message-box-title"},[e._v(e._s(e.title))]),e._v(" "),e.showClose?n("span",{staticClass:"lin-icon-close lin-message-box-icon",on:{click:e.onIconClick}}):e._e()]),e._v(" "),n("div",{staticClass:"lin-message-box-content"},[n("div",{staticClass:"lin-message-box-container"},[e.iconClass?n("span",{class:[e.iconClass,"lin-message-box-type"]}):n("span",{class:[e.type?"lin-icon-"+e.type+" lin-message-box-"+e.type:"","lin-message-box-type"]}),e._v(" "),e.dangerouslyUseHTMLString?n("div",{staticClass:"lin-message-box-message",domProps:{innerHTML:e._s(e.message)}}):n("div",{staticClass:"lin-message-box-message"},[e._v("\n "+e._s(e.message)+"\n ")])]),e._v(" "),e.showInput?n("div",{staticClass:"lin-message-box-entering"},[n("lin-input",{attrs:{placeholder:e.inputPlaceholder,type:e.inputType},on:{input:e.onInputChange},model:{value:e.value,callback:function(t){e.value=t},expression:"value"}}),e._v(" "),n("p",{staticClass:"lin-message-box-errormsg",style:{visibility:e.showErrorMessage?"visible":"hidden"}},[e._v("\n "+e._s(e.errorMessage)+"\n ")])],1):e._e()]),e._v(" "),n("div",{staticClass:"lin-message-box-btns"},[e.showCancelButton?n("lin-button",{class:[e.cancelButtonClass],attrs:{round:e.roundButton},on:{click:e.onCancelBtnClick}},[e._v(e._s(e.myCancelButtonText))]):e._e(),e._v(" "),e.showConfirmButton?n("lin-button",{class:[e.confirmButtonClass],attrs:{loadingSize:e.loadingSize,loading:e.confirmButtonLoading,round:e.roundButton,type:"primary"},on:{click:e.onConfirmBtnClick}},[e._v(e._s(e.myConfirmButtonText))]):e._e()],1)])]):e._e()])};zi._withStripped=!0;n(405);var qi,Yi=T({name:"LinMessageBox",mixins:[Ie,Kt],components:(qi={},H()(qi,te.name,te),H()(qi,De.name,De),qi),props:{title:String,message:String,dangerouslyUseHTMLString:Boolean,type:String,iconClass:String,customClass:String,showClose:{type:Boolean,default:!0},beforeClose:Function,showCancelButton:Boolean,showConfirmButton:{type:Boolean,default:!0},cancelButtonText:String,confirmButtonText:String,cancelButtonClass:String,confirmButtonClass:String,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},showInput:{typs:Boolean,default:!1},inputPlaceholder:String,inputType:{type:String,default:"text"},inputValue:String,inputPattern:RegExp,inputValidator:Function,inputErrorMessage:String,roundButton:Boolean,confirmButtonLoading:Boolean,loadingSize:{type:String,default:"11px"}},data:function(){return{show:!1,value:"",errorMessage:"",showErrorMessage:!1,dialogStyle:{top:"50%",left:"50%",transform:"translate(-50%,-50%)"}}},computed:{myCancelButtonText:function(){return this.cancelButtonText?this.cancelButtonText:this.t("LinViewUI.MessageBox.cancelButtonText")},myConfirmButtonText:function(){return this.confirmButtonText?this.confirmButtonText:this.t("LinViewUI.MessageBox.confirmButtonText")},myInputErrorMessage:function(){return this.inputErrorMessage?this.inputErrorMessage:this.t("LinViewUI.MessageBox.inputErrorMessage")}},mounted:function(){this.closeOnPressEscape&&window.addEventListener("keyup",this.onESCDown),this.closeOnHashChange&&window.addEventListener("hashchange",this.hashchange),this.inputValue&&(this.value=this.inputValue),this.myInputErrorMessage&&(this.errorMessage=this.myInputErrorMessage)},methods:{emitClose:function(e){this.$emit("close",{by:e,value:this.value})},handleClose:function(e){var t=this;if("function"==typeof this.beforeClose){this.beforeClose({by:e},this,(function(){t.show=!1,t.emitClose(e)}))}else this.show=!1,this.emitClose(e)},onMaskClick:function(){this.closeOnClickModal&&this.handleClose("mask")},onCancelBtnClick:function(){this.handleClose("cancelButton")},onConfirmBtnClick:function(){this.showInput&&(this.inputPattern||this.inputValidator)?(this.onInputChange(this.value),this.showErrorMessage||this.handleClose("confirmButton")):this.handleClose("confirmButton")},onIconClick:function(){this.handleClose("icon")},onESCDown:function(e){27===e.keyCode&&this.handleClose("esc")},hashchange:function(){this.handleClose("hash")},onInputChange:function(e){if("function"==typeof this.inputValidator){var t=this.inputValidator(e);"boolean"==typeof t?this.showErrorMessage=!t:"string"==typeof t&&(t?(this.showErrorMessage=!0,this.errorMessage=t):(this.showErrorMessage=!1,this.errorMessage=this.myInputErrorMessage))}else if(this.inputPattern){var n=this.inputPattern.test(e);this.showErrorMessage=!n}}},beforeDestroy:function(){this.closeOnPressEscape&&window.removeEventListener("keyup",this.onESCDown),this.closeOnHashChange&&window.removeEventListener("hashchange",this.hashchange)}},zi,[],!1,null,null,null);Yi.options.__file="packages/message-box/src/message-box.vue";var Xi=Yi.exports;function Ji(e,t){var n=ke()(e);if(Ee.a){var i=Ee()(e);t&&(i=Se()(i).call(i,(function(t){return _e()(e,t).enumerable}))),n.push.apply(n,i)}return n}function Zi(e){for(var t=1;t<arguments.length;t++){var n,i=null!=arguments[t]?arguments[t]:{};if(t%2)r()(n=Ji(Object(i),!0)).call(n,(function(t){H()(e,t,i[t])}));else if(me.a)ve()(e,me()(i));else{var a;r()(a=Ji(Object(i))).call(a,(function(t){he()(e,t,_e()(i,t))}))}}return e}var Qi=c.a.extend(Xi),er=function(){function e(t){Oi()(this,e),H()(this,"options",{}),H()(this,"instance",null),this.options=t||{},this.handleLockScroll(),this.init()}return Pi()(e,[{key:"init",value:function(){var e,t=this;(this.instance=new Qi,this.instance)&&(r()(e=ke()(this.instance.$props||{})).call(e,(function(e){e in t.options&&(t.instance[e]=t.options[e])})),this.instance.$mount(),document.body.appendChild(this.instance.$el),this.instance.show=!0,this.instance.$once("close",(function(e){"confirmButton"===e.by?t.options.resolve(e):t.options.reject(e),t.instance.$nextTick((function(){t.destory()}))})))}},{key:"handleLockScroll",value:function(){var e=!0;"lockScroll"in this.options&&(e=this.options.lockScroll),e&&document.body.classList.add("lin-message-box-hiden")}},{key:"destory",value:function(){this.instance&&(document.body.removeChild(this.instance.$el),this.instance.$destroy()),document.body.classList.remove("lin-message-box-hiden"),this.instance=null}}]),e}();function tr(e){return new fn.a((function(t,n){return new er(Zi(Zi({},e),{},{resolve:t,reject:n}))}))}tr.alert=function(e){var t={closeOnClickModal:!1,closeOnPressEscape:!1};return new fn.a((function(n,i){return new er(Zi(Zi(Zi({},e),t),{},{resolve:n,reject:i}))}))},tr.confirm=function(e){var t={showCancelButton:!0};return new fn.a((function(n,i){return new er(Zi(Zi(Zi({},e),t),{},{resolve:n,reject:i}))}))},tr.prompt=function(e){var t={showInput:!0,showCancelButton:!0};return new fn.a((function(n,i){return new er(Zi(Zi(Zi({},e),t),{},{resolve:n,reject:i}))}))};var nr=tr;nr.install=function(e){e.prototype.$MessageBox=nr};var ir=nr;function rr(){var e=document.getElementsByTagName("head")[0];return{setMetaInfo:function(t){var n;r()(n=ke()(t||{})).call(n,(function(n){var i;"title"!==n?r()(i=t[n]).call(i,(function(t){var i=document.createElement(n);!function(e,t){var n;e.setAttribute("data-vue-meta-info",!0),r()(n=ke()(t||{})).call(n,(function(n){e.setAttribute(n,t[n])}))}(i,t),e.appendChild(i)})):document.title=t.title}))},removeMetaInfo:function(){!function(e){for(var t=e.querySelectorAll("[".concat("data-vue-meta-info","]")),n=t.length-1;n>-1;n--){var i=t[n];"true"===i.getAttribute("data-vue-meta-info")&&e.removeChild(i)}}(e)}}}function ar(e){rr().removeMetaInfo(),rr().setMetaInfo(e)}var or={install:function(e){e.mixin({beforeCreate:function(){var e=this.$options.metaInfo;if(void 0!==e){var t=p()(e);this._hasMetaInfo=!0,void 0===this.$options.computed&&(this.$options.computed={}),this.$options.computed.$metaInfo="function"===t?e:function(){return e}}},beforeMount:function(){this._hasMetaInfo&&ar(this.$metaInfo)},mounted:function(){var e=this;this._hasMetaInfo&&this.$watch("$metaInfo",(function(){ar(e.$metaInfo)}))},activated:function(){this._hasMetaInfo&&ar(this.$metaInfo)},deactivated:function(){this._hasMetaInfo&&ar(this.$metaInfo)}})}},sr=or,lr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"container",class:["lin-multi-player",{"lin-multi-player-fix":e.isWebFullscreen}],on:{mouseleave:e.onMouseLeave,mouseenter:e.onMouseEnter}},[n("div",{directives:[{name:"show",rawName:"v-show",value:!e.isSingleFullscreen||1===e.singleFullscreenId,expression:"isSingleFullscreen ? singleFullscreenId === 1 : true"}]},[n("div",{class:["lin-multi-player-frame",{"lin-multi-player-move":1===e.screen}],style:e.formatStyle(e.frameStyle1),on:{mousedown:function(t){return e.onMainMousedown("frameStyle1",t)}}},[n("span",{staticClass:"lin-multi-player-single-full lin-icon-full-screen",on:{mousedown:function(e){e.stopPropagation()},click:function(t){return t.stopPropagation(),e.onSingleFullscreenClick(1)}}})]),e._v(" "),n("div",{staticClass:"lin-multi-player-screen",style:e.formatStyle(e.videoStyle1)},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.videoList[0],expression:"videoList[0]"}],staticClass:"lin-multi-player-container",attrs:{id:e.randomId+"-1"}}),e._v(" "),n("lin-no-screen",{directives:[{name:"show",rawName:"v-show",value:!e.videoList[0],expression:"!videoList[0]"}]})],1)]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.isSingleFullscreen||2===e.singleFullscreenId,expression:"isSingleFullscreen ? singleFullscreenId === 2 : true"}]},[n("div",{class:["lin-multi-player-frame",{"lin-multi-player-move":2===e.screen}],style:e.formatStyle(e.frameStyle2),on:{mousedown:function(t){return e.onMainMousedown("frameStyle2",t)}}},[n("span",{staticClass:"lin-multi-player-single-full lin-icon-full-screen",on:{mousedown:function(e){e.stopPropagation()},click:function(t){return t.stopPropagation(),e.onSingleFullscreenClick(2)}}})]),e._v(" "),n("div",{staticClass:"lin-multi-player-screen",style:e.formatStyle(e.videoStyle2)},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.videoList[1],expression:"videoList[1]"}],staticClass:"lin-multi-player-container",attrs:{id:e.randomId+"-2"}}),e._v(" "),n("lin-no-screen",{directives:[{name:"show",rawName:"v-show",value:!e.videoList[1],expression:"!videoList[1]"}]})],1)]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.isSingleFullscreen||3===e.singleFullscreenId,expression:"isSingleFullscreen ? singleFullscreenId === 3 : true"}]},[n("div",{class:["lin-multi-player-frame",{"lin-multi-player-move":3===e.screen}],style:e.formatStyle(e.frameStyle3),on:{mousedown:function(t){return e.onMainMousedown("frameStyle3",t)}}},[n("span",{staticClass:"lin-multi-player-single-full lin-icon-full-screen",on:{mousedown:function(e){e.stopPropagation()},click:function(t){return t.stopPropagation(),e.onSingleFullscreenClick(3)}}})]),e._v(" "),n("div",{staticClass:"lin-multi-player-screen",style:e.formatStyle(e.videoStyle3)},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.videoList[2],expression:"videoList[2]"}],staticClass:"lin-multi-player-container",attrs:{id:e.randomId+"-3"}}),e._v(" "),n("lin-no-screen",{directives:[{name:"show",rawName:"v-show",value:!e.videoList[2],expression:"!videoList[2]"}]})],1)]),e._v(" "),n("lin-multi-controls",{attrs:{totalTime:e.totalTime,currentTime:e.currentTime,isPlaying:e.isPlaying,volume:e.volume,isEnter:e.isEnter,live:e.live},on:{play:e.onpPlayClick,pause:e.onPauseClick,seek:e.onSeek,setVolume:e.setVolume,"browser-fullscreen":e.onBrowserFullscreen,"web-fullscreen":e.onWebFullscreen}})],1)};lr._withStripped=!0;var ur=n(110),cr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"videoPlayerContainer",class:["lin-video-player",{"lin-video-player-fix":e.isWebFullscreen}],on:{mouseleave:e.onMouseLeave,mouseenter:e.onMouseEnter}},[n("video",{ref:"videoPlayerVideo",staticClass:"lin-video-player-video",attrs:{crossorigin:"anonymous",id:"lin_hls_player_video",autoplay:e.autoplay},on:{timeupdate:e.onTimeUpdate,loadedmetadata:e.onLoadedmetadata,progress:e.onprogress,play:e.onPlay,pause:e.onPause,click:e.switchPlayingStatus,canplaythrough:e.onCanplaythrough,waiting:e.onWaiting,volumechange:e.onVolumechange}}),e._v(" "),n("player-image"),e._v(" "),n("player-loading"),e._v(" "),n("player-tip"),e._v(" "),n("player-animation"),e._v(" "),n("player-controls",{attrs:{isPlaying:e.isPlaying,currentTime:e.currentTime,totalTime:e.totalTime,live:e.live,isEnter:e.isEnter,preloadTime:e.preloadTime,volume:e.volume},on:{play:e.switchPlayingStatus,pause:e.switchPlayingStatus,seek:e.seek,setVolume:e.setVolume,offsetTime:e.onOffsetTime,"browser-fullscreen":e.onBrowserFullscreen,"web-fullscreen":e.onWebFullscreen}})],1)};cr._withStripped=!0;var fr=n(112),dr=n.n(fr),hr=n(83),pr=n.n(hr),vr=function(){return document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||!1},gr=function(){return document.fullscreenEnabled||document.mozFullScreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled||!1},mr=function(e){e&&gr()&&!vr()&&(e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen())},yr=function(){gr()&&vr()&&(document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen())},_r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"lin-video-player-fade"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.isEnter||!e.isPlaying,expression:"isEnter || !isPlaying"}],staticClass:"lin-video-player-controls"},[n("div",{staticClass:"lin-video-player-controls-mask"}),e._v(" "),n("div",{staticClass:"lin-video-player-controls-group"},[e.live?e._e():n("div",{staticClass:"lin-video-player-process-box"},[n("player-process",{attrs:{totalTime:e.totalTime,currentTime:e.currentTime,preloadTime:e.preloadTime},on:{seek:e.onSeek,offsetTime:e.onOffsetTime}})],1),e._v(" "),n("span",{staticClass:"lin-video-player-icon-item"},[e.isPlaying?n("i",{staticClass:"lin-icon-pause",on:{click:e.onPauseClick}}):n("i",{staticClass:"lin-icon-play",on:{click:e.onPlayClick}})]),e._v(" "),n("player-volume",{attrs:{volume:e.volume},on:{setVolume:e.setVolume}}),e._v(" "),e.live?e._e():n("span",{staticClass:"lin-video-player-time"},[e._v(e._s(e._f("secondToTime")(e.currentTime))+"/"+e._s(e._f("secondToTime")(e.totalTime)))]),e._v(" "),e.live?n("span",{staticClass:"lin-video-player-live-tip"},[n("i"),e._v("\n "+e._s(e.t("LinViewUI.VideoPlayer.live"))+"\n ")]):e._e(),e._v(" "),n("div",{staticClass:"lin-video-player-controls-right"},[n("player-definition"),e._v(" "),e.live?e._e():n("player-speed"),e._v(" "),n("player-fullscreen",{on:{"browser-fullscreen":e.onBrowserFullscreen,"web-fullscreen":e.onWebFullscreen}})],1)],1)])])};_r._withStripped=!0;n(406);var br=function(e){var t;if(0===(e=e||0)||e===1/0||"NaN"===e.toString())return"00:00";var n=Math.floor(e/3600),i=Math.floor((e-3600*n)/60),r=Math.floor(e-3600*n-60*i);return Dt()(t=n>0?[n,i,r]:[i,r]).call(t,(function(e){return e<10?"0".concat(e):"".concat(e)})).join(":")},Sr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return 0!==e.speedList.length?n("div",{staticClass:"lin-video-player-speed"},[n("span",{staticClass:"lin-video-player-speed-label"},[e._v(e._s(e.currentSpeed?e.currentSpeed.label:e.t("LinViewUI.VideoPlayer.speed")))]),e._v(" "),e.list.length>0?n("ul",{staticClass:"lin-video-player-speed-list",style:{top:e.top}},e._l(e.list,(function(t,i){return n("li",{key:i,staticClass:"lin-video-player-speed-label",on:{click:function(n){return e.switchSpeed(t)}}},[e._v("\n "+e._s(t.label)+"\n ")])})),0):e._e()]):e._e()};Sr._withStripped=!0;var wr=T({name:"LinVideoPlayerSpeed",mixins:[Ie],inject:{videoPlayer:{default:null}},data:function(){return{currentSpeed:null,list:[]}},computed:{speedList:function(){return this.videoPlayer?this.videoPlayer.speedList:[]},top:function(){if(!this.list.length)return 0;var e=30*this.list.length+10;return"".concat(-e,"px")}},mounted:function(){var e=this;this.$nextTick((function(){if(e.speedList.length>0){var t=Object(I.cloneDeep)(e.speedList);e.currentSpeed=t[0],e.list=oe()(t).call(t,1),e.setSpeed()}}))},methods:{switchSpeed:function(e){var t=Object(I.cloneDeep)(this.list),n=Fe()(t).call(t,(function(t){return t.label===e.label&&t.value===e.value}));Et()(t).call(t,n,1),t.push(this.currentSpeed),this.list=t,this.currentSpeed=e,this.setSpeed()},setSpeed:function(){if(this.videoPlayer){var e=this.currentSpeed.value;this.videoPlayer.setSpeed(e)}}}},Sr,[],!1,null,null,null);wr.options.__file="packages/video-player/src/video-player-speed.vue";var Er=wr.exports,Tr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"lin-video-player-definition"},[n("span",{staticClass:"lin-video-player-definition-label"},[e._v(e._s(e.currentDefinitionVideo?e.currentDefinitionVideo.label:""))]),e._v(" "),e.definitionList.length>0?n("ul",{staticClass:"lin-video-player-definition-list",style:{top:e.top}},e._l(e.definitionList,(function(t,i){return n("li",{key:i,staticClass:"lin-video-player-definition-label",on:{click:function(n){return e.setDefinition(t)}}},[e._v("\n "+e._s(t.label)+"\n ")])})),0):e._e()])};Tr._withStripped=!0;var kr=T({name:"LinVideoPlayerDefinition",inject:{videoPlayer:{default:null}},computed:{video:function(){return this.videoPlayer?this.videoPlayer.video:null},videoList:function(){return this.videoPlayer?this.videoPlayer.videoList:[]},top:function(){if(!this.definitionList.length)return 0;var e=30*this.definitionList.length+10;return"".concat(-e,"px")},currentDefinitionVideo:{get:function(){return this.videoPlayer?this.videoPlayer.currentDefinitionVideo:null},set:function(e){this.videoPlayer&&(this.videoPlayer.currentDefinitionVideo=e)}},definitionList:{get:function(){return this.videoPlayer?this.videoPlayer.definitionList:[]},set:function(e){this.videoPlayer&&(this.videoPlayer.definitionList=e)}}},methods:{setDefinition:function(e){var t;null===(t=this.videoPlayer)||void 0===t||t.setDefinition(e)}}},Tr,[],!1,null,null,null);kr.options.__file="packages/video-player/src/video-player-definition.vue";var xr=kr.exports,Lr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"lin-player-process-mask",on:{click:e.onMaskClick,mousemove:e.onMaskMouseMove,mouseleave:e.onMaskMouseLeave}},[n("transition",{attrs:{name:"lin-player-process-fade"}},[n("span",{directives:[{name:"show",rawName:"v-show",value:e.isEnterMask,expression:"isEnterMask"}],ref:"processTime",staticClass:"lin-player-process-time",style:{left:e.maskLeft}},[e._v(e._s(e._f("secondToTime")(e.maskCurrentTime)))])]),e._v(" "),n("div",{ref:"playerProcess",staticClass:"lin-player-process"},[n("div",{staticClass:"lin-player-process-loaded",style:{width:e.loadedWidth,"transition-duration":e.mousedown?"0ms":"300ms"}}),e._v(" "),n("div",{staticClass:"lin-player-process-played",style:{width:e.currentPlayedWidth,"transition-duration":e.mousedown?"0ms":"300ms"}},[n("transition",{attrs:{name:"lin-player-process-ball"}},[n("span",{directives:[{name:"show",rawName:"v-show",value:e.isEnterMask,expression:"isEnterMask"}],ref:"processBall",staticClass:"lin-player-process-ball",on:{mousedown:e.onBallMouseDown,click:function(e){e.stopPropagation()}}})])],1)])],1)};Lr._withStripped=!0;var Ar=T({name:"LinPlayerProcess",mixins:[Ie],filters:{secondToTime:br},props:{totalTime:{type:Number,default:0},currentTime:{type:Number,default:0},preloadTime:{type:Number,default:0}},data:function(){return{mousedown:!1,mousedownWidth:0,maskCurrentTime:0,maskLeft:0,isEnterMask:!1}},mounted:function(){this.processBall=this.$refs.processBall,this.playerProcess=this.$refs.playerProcess,this.processTime=this.$refs.processTime},computed:{currentPlayedWidth:function(){return this.mousedown?"".concat(this.mousedownWidth,"px"):this.playedWidth},playedWidth:function(){if(0===this.totalTime)return 0;var e=this.currentTime/this.totalTime;return"".concat(100*(e=e>1?1:e),"%")},loadedWidth:function(){if(0===this.totalTime)return 0;var e=this.preloadTime/this.totalTime;return"".concat(100*(e=e>1?1:e),"%")}},methods:{onMaskMouseLeave:function(){this.isEnterMask=!1},onMaskMouseMove:function(e){this.isEnterMask=!0;var t=this.playerProcess.getBoundingClientRect().x,n=this.playerProcess.getBoundingClientRect().width,i=this.processTime.clientWidth,r=e.pageX-t;r<=0?r=0:r>n&&(r=n),this.maskLeft="".concat(r-i/2,"px"),n&&(this.maskCurrentTime=this.totalTime*(r/n))},onBallMouseDown:function(){this.mousedownWidth=this.playedWidth,this.mousedown=!0,window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp)},onMouseMove:function(e){if(this.mousedown){var t=this.playerProcess.getBoundingClientRect().x,n=this.playerProcess.getBoundingClientRect().width,i=e.pageX-t;i<=0?i=0:i>n&&(i=n),this.mousedownWidth=i}},onMouseUp:function(e){this.onMouseMove(e);var t=this.playerProcess.clientWidth||0,n=0;t&&(n=this.mousedownWidth/t),this.seekByPercent(n),this.mousedown=!1,window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove)},onMaskClick:function(e){var t=e.offsetX||0,n=e.currentTarget.clientWidth||0,i=0;n&&(i=t/n),this.seekByPercent(i)},seekByPercent:function(e){e=e>1?1:e;var t=this.totalTime*e,n=t-this.currentTime;this.$emit("seek",t),this.setTip(n)},setTip:function(e){this.$emit("offsetTime",e)},destroyProcess:function(){this.processBall=null,this.playerProcess=null,this.processTime=null}},beforeDestroy:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),this.destroyProcess()}},Lr,[],!1,null,null,null);Ar.options.__file="packages/player-process/src/player-process.vue";var Cr=Ar.exports;Cr.install=function(e){return e.component(Cr.name,Cr)};var Rr=Cr,Dr=function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"lin-player-volume"},[t("span",{staticClass:"lin-player-volume-icon"},[0!==this.processWidth?t("i",{staticClass:"lin-icon-volume",on:{click:this.onVolumeClick}}):t("i",{staticClass:"lin-icon-mute",on:{click:this.onMuteClick}})]),this._v(" "),t("div",{staticClass:"lin-player-volume-mask",on:{click:this.onMaskClick}},[t("div",{ref:"videoPlayerVolumeProcess",staticClass:"lin-player-volume-process"},[t("div",{staticClass:"lin-player-volume-process-line",style:{width:this.processWidth+"px"}},[t("span",{staticClass:"lin-player-volume-process-ball",on:{mousedown:this.onBallMouseDown,click:function(e){e.stopPropagation()}}})])])])])};Dr._withStripped=!0;var Or=T({name:"LinPlayerVolume",props:{volume:{type:Number,default:1}},data:function(){return{processWidth:0}},mounted:function(){this.oldVolume=0,this.mousedown=!1,this.videoPlayerVolumeProcess=this.$refs.videoPlayerVolumeProcess,this.$nextTick(this.initProcessWidth)},methods:{setProcessWidth:function(e){var t=this.videoPlayerVolumeProcess.clientWidth||0;this.processWidth=t*e},onVolumeClick:function(){this.oldVolume=this.processWidth,this.setVolume(0)},onMuteClick:function(){this.setVolume(this.oldVolume)},initProcessWidth:function(){var e=this.videoPlayerVolumeProcess.clientWidth||0,t=this.volume*e;this.oldVolume=t,this.processWidth=t},onMaskClick:function(e){var t=this.videoPlayerVolumeProcess.clientWidth||0,n=e.offsetX||0;n=(n=n<0?0:n)>t?t:n,this.setVolume(n)},onBallMouseDown:function(){this.mousedown=!0,window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp)},onMouseMove:function(e){if(this.mousedown){var t=this.videoPlayerVolumeProcess.getBoundingClientRect().x,n=this.videoPlayerVolumeProcess.getBoundingClientRect().width,i=e.pageX-t;i<=0?i=0:i>n&&(i=n),this.processWidth=i}},onMouseUp:function(e){this.onMouseMove(e),this.setVolume(this.processWidth),this.mousedown=!1,window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove)},setVolume:function(e){var t=this.videoPlayerVolumeProcess.clientWidth||0,n=0;t&&(n=e/t),this.$emit("setVolume",n)}},watch:{volume:function(e){this.setProcessWidth(e)}},beforeDestroy:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),this.videoPlayerVolumeProcess=null}},Dr,[],!1,null,null,null);Or.options.__file="packages/player-volume/src/player-volume.vue";var Ir=Or.exports;Ir.install=function(e){return e.component(Ir.name,Ir)};var Pr=Ir,Mr=function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"lin-player-fullscreen"},[t("span",{staticClass:"lin-icon-fullscreen",on:{click:this.onBrowserFullscreen}}),this._v(" "),t("div",{staticClass:"lin-player-fullscreen-hover-full"},[t("span",{staticClass:"lin-icon-full-screen",on:{click:this.onWebFullscreen}})])])};Mr._withStripped=!0;var Fr=T({name:"LinPlayerFullscreen",methods:{onBrowserFullscreen:function(){this.$emit("browser-fullscreen")},onWebFullscreen:function(){this.$emit("web-fullscreen")}}},Mr,[],!1,null,null,null);Fr.options.__file="packages/player-fullscreen/src/player-fullscreen.vue";var Br=Fr.exports;Br.install=function(e){return e.component(Br.name,Br)};var Nr=Br,Ur=T({name:"LinVideoPlayerControls",mixins:[Ie],filters:{secondToTime:br},components:{PlayerProcess:Rr,PlayerFullscreen:Nr,PlayerSpeed:Er,PlayerVolume:Pr,PlayerDefinition:xr},inject:{videoPlayer:{default:null}},props:{isPlaying:{type:Boolean,default:!1},currentTime:{type:Number,default:0},totalTime:{type:Number,default:0},live:{type:Boolean,default:!1},isEnter:{type:Boolean,default:!0},preloadTime:{type:Number,default:0},volume:{type:Number,default:1}},methods:{onPlayClick:function(){this.$emit("play")},onPauseClick:function(){this.$emit("pause")},onSeek:function(e){this.$emit("seek",e)},setVolume:function(e){this.$emit("setVolume",e)},onOffsetTime:function(e){this.$emit("offsetTime",e)},onBrowserFullscreen:function(){this.$emit("browser-fullscreen")},onWebFullscreen:function(){this.$emit("web-fullscreen")}}},_r,[],!1,null,null,null);Ur.options.__file="packages/video-player/src/video-player-controls.vue";var jr=Ur.exports,Vr=function(){var e=this.$createElement,t=this._self._c||e;return t("transition",{attrs:{name:"lin-video-player-animation"}},[this.showAnimation?t("div",{staticClass:"lin-video-player-animation",on:{animationend:this.animationend}},[this.isPlaying?t("span",{staticClass:"lin-icon-play"}):t("span",{staticClass:"lin-icon-pause"})]):this._e()])};Vr._withStripped=!0;var Gr=T({name:"LinVideoPlayerAnimation",inject:{videoPlayer:{default:null}},data:function(){return{showAnimation:!1}},computed:{isPlaying:function(){return!!this.videoPlayer&&this.videoPlayer.isPlaying}},methods:{animationend:function(){this.showAnimation=!1}},watch:{isPlaying:function(){this.showAnimation=!0}}},Vr,[],!1,null,null,null);Gr.options.__file="packages/video-player/src/video-player-animation.vue";var $r=Gr.exports,Hr=function(){var e=this.$createElement,t=this._self._c||e;return this.imgSrc?t("img",{staticClass:"lin-video-player-image",attrs:{src:this.imgSrc}}):this._e()};Hr._withStripped=!0;var Wr=T({name:"LinVideoPlayerImage",inject:{videoPlayer:{default:null}},computed:{imgSrc:function(){return this.videoPlayer?this.videoPlayer.imgSrc:""}}},Hr,[],!1,null,null,null);Wr.options.__file="packages/video-player/src/video-player-image.vue";var Kr=Wr.exports,zr=function(){var e=this.$createElement,t=this._self._c||e;return this.isLoading?t("div",{staticClass:"lin-video-player-loading"},[t("span",{staticClass:"lin-icon-loading"})]):this._e()};zr._withStripped=!0;var qr=T({name:"LinVideoPlayerLoading",inject:{videoPlayer:{default:null}},computed:{isLoading:function(){return!!this.videoPlayer&&this.videoPlayer.isLoading}}},zr,[],!1,null,null,null);qr.options.__file="packages/video-player/src/video-player-loading.vue";var Yr=qr.exports,Xr=function(){var e=this.$createElement,t=this._self._c||e;return t("transition",{attrs:{name:"lin-video-player-fade"}},[this.tip?t("div",{staticClass:"lin-video-player-tip"},[this._v(this._s(this.tip))]):this._e()])};Xr._withStripped=!0;var Jr=T({name:"LinVideoPlayerTip",inject:{videoPlayer:{default:null}},computed:{tip:function(){return this.videoPlayer?this.videoPlayer.tip:""},tipTime:{get:function(){return this.videoPlayer?this.videoPlayer.tipTime:2e3},set:function(e){this.videoPlayer&&(this.videoPlayer.tipTime=e)}}},mounted:function(){this.timer=null},methods:{destroyTimeout:function(){this.timer&&clearTimeout(this.timer)}},watch:{tip:function(e){var t=this;e&&(this.destroyTimeout(),this.timer=R()((function(){t.videoPlayer&&(t.videoPlayer.tip=""),t.tipTime=2e3,t.destroyTimeout()}),this.tipTime))}},beforeDestroy:function(){this.destroyTimeout()}},Xr,[],!1,null,null,null);function Zr(e,t){var n=ke()(e);if(Ee.a){var i=Ee()(e);t&&(i=Se()(i).call(i,(function(t){return _e()(e,t).enumerable}))),n.push.apply(n,i)}return n}function Qr(e){for(var t=1;t<arguments.length;t++){var n,i=null!=arguments[t]?arguments[t]:{};if(t%2)r()(n=Zr(Object(i),!0)).call(n,(function(t){H()(e,t,i[t])}));else if(me.a)ve()(e,me()(i));else{var a;r()(a=Zr(Object(i))).call(a,(function(t){he()(e,t,_e()(i,t))}))}}return e}Jr.options.__file="packages/video-player/src/video-player-tip.vue";var ea=T({name:"LinVideoPlayer",mixins:[Ie],components:{PlayerControls:jr,PlayerAnimation:$r,PlayerImage:Kr,PlayerLoading:Yr,PlayerTip:Jr.exports},provide:function(){return{videoPlayer:this}},data:function(){return{currentTime:0,totalTime:0,preloadTime:0,isPlaying:!1,isWebFullscreen:!1,speedList:[],videoList:[],imgSrc:"",isLoading:!1,tip:"",tipTime:2e3,type:"hls",autoplay:!1,currentDefinitionVideo:null,definitionList:[],live:!1,isEnter:!0,customType:null,volume:1}},mounted:function(){this.hls=null,this.flv=null,this.video=this.$refs.videoPlayerVideo,this.initParams()},methods:{initParams:function(){if(this.videoList.length>0){var e=Object(I.cloneDeep)(this.videoList);this.currentDefinitionVideo=e[0],this.definitionList=oe()(e).call(e,1),this.initPlayer(this.currentDefinitionVideo)}},initPlayer:function(e){if(this.isLoading=!0,"function"==typeof this.customType)this.initCustomType(e);else{var t=e.url;"hls"===this.type?this.initHls(t):"flv"===this.type?this.initFlv(t):"mp4"===this.type&&(this.video.src=t)}},switchPlayerUrl:function(e){var t,n,i=e.url,r=e.label;i&&(this.isLoading=!0,this.tip=o()(t=o()(n="".concat(this.t("LinViewUI.VideoPlayer.switch")," ")).call(n,r," ")).call(t,this.t("LinViewUI.VideoPlayer.quality")),this.getImage(),"function"==typeof this.customType?this.initCustomType(e):"hls"===this.type?this.initHls(i):"flv"===this.type?(this.destoryFlv(),this.initFlv(i)):"mp4"===this.type&&(this.video.src=i),this.seek(this.currentTime))},initHls:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!dr.a)throw new ReferenceError("Hls is not defind");dr.a.isSupported()?(this.hls||(this.hls=new dr.a(t)),this.hls.loadSource(e),this.hls.attachMedia(this.video)):this.video.canPlayType("application/vnd.apple.mpegurl")&&(this.video.src=e)},initFlv:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!pr.a)throw new ReferenceError("flvjs is not defind");pr.a.isSupported()&&(pr.a.LoggingControl.enableAll=!1,this.flv=pr.a.createPlayer(Qr({type:"flv",url:e,isLive:this.live},t)),this.flv.attachMediaElement(this.video),this.flv.load())},initCustomType:function(e){this.customType(this.video,Object(I.cloneDeep)({currenVideo:e,autoplay:this.autoplay,speedList:this.speedList,videoList:this.videoList,live:this.live}))},onTimeUpdate:function(){var e,t=(null===(e=this.video)||void 0===e?void 0:e.currentTime)||0;this.currentTime=t},onLoadedmetadata:function(){var e,t,n=(null===(e=this.video)||void 0===e?void 0:e.duration)||0,i=(null===(t=this.video)||void 0===t?void 0:t.volume)||0;this.totalTime=n,this.volume=i},onCanplaythrough:function(){this.imgSrc="",this.isLoading=!1,this.isPlaying?this.play():this.pause()},onWaiting:function(){this.isLoading=!0},onprogress:function(){var e;if(this.video&&0!==(null===(e=this.video.buffered)||void 0===e?void 0:e.length)){var t,n=(null===(t=this.video)||void 0===t?void 0:t.buffered.end(0))||0;this.preloadTime=n}},onVolumechange:function(){this.video&&(this.volume=this.video.volume)},seek:function(e){this.video&&(this.video.currentTime=e)},onPlay:function(){var e;this.emitPlayingStatus(null===(e=this.video)||void 0===e?void 0:e.paused)},onPause:function(){var e;this.emitPlayingStatus(null===(e=this.video)||void 0===e?void 0:e.paused)},emitPlayingStatus:function(e){this.isPlaying=!e},switchPlayingStatus:function(){this.video&&this.video.paused?this.play():this.video&&!this.video.paused&&this.pause()},play:function(){var e;null===(e=this.video)||void 0===e||e.play()},pause:function(){var e;null===(e=this.video)||void 0===e||e.pause()},getImage:function(){if(this.video)try{var e=document.createElement("canvas"),t=e.getContext("2d");e.width=this.video.clientWidth,e.height=this.video.clientHeight,t.drawImage(this.video,0,0,e.width,e.height),this.imgSrc=e.toDataURL()}catch(e){}},destoryHls:function(){this.hls&&(this.hls.destroy(),this.hls=null)},destoryFlv:function(){this.flv&&(this.flv.pause(),this.flv.unload(),this.flv.detachMediaElement(),this.flv.destroy(),this.flv=null)},destoryPlayer:function(){this.destoryFlv(),this.destoryHls(),this.video=null},setTip:function(e){this.tip=e},onOffsetTime:function(e){var t,n,i,r;e<0?this.setTip(o()(t=o()(n="".concat(this.t("LinViewUI.VideoPlayer.goBack")," ")).call(n,Math.round(-e)," ")).call(t,this.t("LinViewUI.VideoPlayer.second"))):this.setTip(o()(i=o()(r="".concat(this.t("LinViewUI.VideoPlayer.fastForward")," ")).call(r,Math.round(e)," ")).call(i,this.t("LinViewUI.VideoPlayer.second")))},setSpeed:function(e){if(this.video){var t=e;t=t<0?0:t,this.video.playbackRate=t}},setVolume:function(e){if(this.video){var t,n=e;return n=(n=n<0?0:n)>1?1:n,this.video.volume=n,this.setTip(o()(t="".concat(this.t("LinViewUI.VideoPlayer.volume"))).call(t,Math.round(100*n),"%")),n}return-1},switchWebfullscreen:function(){this.isWebFullscreen=!this.isWebFullscreen},setWebFullScreen:function(){yr(),this.isWebFullscreen=!0},setBrowserFullScreen:function(){var e;this.isWebFullscreen&&(this.isWebFullscreen=!1),mr(null===(e=this.$refs)||void 0===e?void 0:e.videoPlayerContainer)},cancelWebFullScreen:function(){yr(),this.isWebFullscreen=!1},cancelBrowserFullScreen:function(){this.isWebFullscreen&&(this.isWebFullscreen=!1),yr()},setDefinition:function(e){if(!Object(I.isEqual)(this.currentDefinitionVideo,e)){var t=Object(I.cloneDeep)(this.definitionList),n=Fe()(t).call(t,(function(t){return Object(I.isEqual)(t,e)}));n>-1&&(Et()(t).call(t,n,1),t.push(this.currentDefinitionVideo),this.definitionList=t,this.currentDefinitionVideo=e,this.switchPlayerUrl(e))}},onMouseLeave:function(){this.isEnter=!1},onMouseEnter:function(){this.isEnter=!0},onBrowserFullscreen:function(){this.isWebFullscreen&&(this.isWebFullscreen=!1),gr()&&(vr()?yr():mr(this.$refs.videoPlayerContainer))},onWebFullscreen:function(){yr(),this.switchWebfullscreen()}},beforeDestroy:function(){this.destoryPlayer()}},cr,[],!1,null,null,null);ea.options.__file="packages/video-player/src/video-player.vue";var ta=ea.exports,na=function(e){if(!e)throw new TypeError("el 没有定义");if("string"!=typeof e&&(t=e,!("object"===("undefined"==typeof HTMLElement?"undefined":p()(HTMLElement))?function(e){return e instanceof HTMLElement}:function(e){return e&&"object"===p()(e)&&1===e.nodeType&&"string"==typeof e.nodeName})(t)))throw new TypeError("el 只能是 string 类型 或者是 HTMLElement 类型");if("string"==typeof e&&!document.querySelector(e))throw new ReferenceError("can not find DOM");var t},ia=function(e){if(!re()(e))throw new TypeError("videoList 只能是数组");if(Mt()(e).call(e,(function(e){return!("label"in e)||!("url"in e)})))throw new TypeError("videoList 类型不正确,每个数组项必须包含 label 和 url")},ra=c.a.extend(ta),aa=function(){function e(t){Oi()(this,e),H()(this,"hls",null),H()(this,"flv",null),H()(this,"video",null),H()(this,"instance",null),H()(this,"container",null),H()(this,"vm",null),H()(this,"videoList",[]),H()(this,"speedList",[]),H()(this,"type",null),H()(this,"autoplay",!1),H()(this,"el",null),H()(this,"customType",null),H()(this,"live",!1);var n=t.el,i=t.type,r=t.speedList,a=void 0===r?[]:r,o=t.videoList,s=void 0===o?[]:o,l=t.customType;na(n),function(e,t){if("function"!=typeof t){var n=["mp4","hls","flv"];if(!e)throw new ReferenceError("type 没有定义");if(!Y()(n).call(n,e))throw new TypeError("type 只能是 hls 或者 mp4 或者 flv")}}(i,l),function(e){if(!re()(e))throw new TypeError("speedList 只能是数组");if(Mt()(e).call(e,(function(e){return!("label"in e)||!("value"in e)})))throw new TypeError("speedList 类型不正确,每个数组项必须包含 label 和 value")}(a),ia(s),this.initParams(t),this.initPlayer(t)}return Pi()(e,[{key:"initParams",value:function(e){var t=e.el,n=e.type,i=e.autoplay,r=void 0!==i&&i,a=e.speedList,o=void 0===a?[]:a,s=e.videoList,l=void 0===s?[]:s,u=e.live,c=void 0!==u&&u,f=e.customType;this.videoList=l,this.speedList=o,this.autoplay=r,this.type=n,this.el=t,this.live=c,"function"==typeof f&&(this.customType=f)}},{key:"initPlayer",value:function(){var e,t,n,i,r;this.instance=new ra({data:{autoplay:this.autoplay,speedList:this.speedList,videoList:this.videoList,type:this.type,live:this.live,customType:this.customType}}),"string"==typeof this.el?this.container=document.querySelector(this.el):this.container=this.el,this.vm=null===(e=this.instance)||void 0===e?void 0:e.$mount(),this.hls=null===(t=this.instance)||void 0===t?void 0:t.hls,this.flv=null===(n=this.instance)||void 0===n?void 0:n.flv,this.video=null===(i=this.instance)||void 0===i?void 0:i.video,null===(r=this.container)||void 0===r||r.appendChild(this.vm.$el)}},{key:"on",value:function(e,t){this.video&&this.video.addEventListener(e,t)}},{key:"seek",value:function(e){this.video&&(this.video.currentTime=e)}},{key:"play",value:function(){var e;null===(e=this.video)||void 0===e||e.play()}},{key:"pause",value:function(){var e;null===(e=this.video)||void 0===e||e.pause()}},{key:"toggle",value:function(){var e;null===(e=this.instance)||void 0===e||e.switchPlayingStatus()}},{key:"switchVideo",value:function(e){var t=e.videoList,n=void 0===t?[]:t;ia(n),this.videoList=n,"autoplay"in e&&(this.autoplay=e.autoplay),this.instance&&(this.instance.videoList=n,this.instance.autoplay=this.autoplay,this.instance.initParams())}},{key:"notice",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3;this.instance&&(this.instance.tipTime=t,this.instance.tip=e)}},{key:"switchQuality",value:function(e){var t,n=this.videoList[e];n&&(null===(t=this.instance)||void 0===t||t.setDefinition(n))}},{key:"speed",value:function(e){var t;null===(t=this.instance)||void 0===t||t.setSpeed(e)}},{key:"volume",value:function(e){var t;null===(t=this.instance)||void 0===t||t.setVolume(e)}},{key:"resetParams",value:function(){this.hls=null,this.flv=null,this.video=null,this.instance=null,this.container=null,this.vm=null,this.videoList=[],this.speedList=[],this.type=null,this.autoplay=!1,this.el=null,this.live=!1,this.customType=null}},{key:"destory",value:function(){var e,t;null===(e=this.instance)||void 0===e||e.destoryPlayer(),this.vm&&this.vm.$el&&this.container&&this.container.removeChild(this.vm.$el),null===(t=this.vm)||void 0===t||t.$destroy(),this.resetParams()}},{key:"fullScreen",get:function(){var e=this;return{request:function(t){var n;if("web"===t)null===(n=e.instance)||void 0===n||n.setWebFullScreen();else if("browser"===t){var i;null===(i=e.instance)||void 0===i||i.setBrowserFullScreen()}},cancel:function(t){var n;if("web"===t)null===(n=e.instance)||void 0===n||n.cancelWebFullScreen();else if("browser"===t){var i;null===(i=e.instance)||void 0===i||i.cancelBrowserFullScreen()}}}}},{key:"currentTime",get:function(){var e;return(null===(e=this.video)||void 0===e?void 0:e.currentTime)||0}},{key:"totalTime",get:function(){var e;return(null===(e=this.video)||void 0===e?void 0:e.duration)||0}},{key:"paused",get:function(){var e;return(null===(e=this.video)||void 0===e?void 0:e.paused)||!0}}]),e}();aa.install=function(e){e.prototype.$VideoPlayer=aa};var oa=aa,sa=function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"lin-noscreen"},[this._v("暂无画面")])};sa._withStripped=!0;var la=T({name:"LinNoScreen"},sa,[],!1,null,null,null);la.options.__file="packages/multi-player/src/no-screen.vue";var ua,ca=la.exports,fa=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"lin-video-player-fade"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.isEnter||!e.isPlaying,expression:"isEnter || !isPlaying"}],staticClass:"lin-video-player-controls lin-multi-controls"},[n("div",{staticClass:"lin-video-player-controls-mask"}),e._v(" "),n("div",{staticClass:"lin-video-player-controls-group"},[e.live?e._e():n("div",{staticClass:"lin-video-player-process-box"},[n("lin-player-process",{attrs:{totalTime:e.totalTime,currentTime:e.currentTime},on:{seek:e.onSeek}})],1),e._v(" "),n("span",{staticClass:"lin-video-player-icon-item"},[e.isPlaying?n("i",{staticClass:"lin-icon-pause",on:{click:e.onPauseClick}}):n("i",{staticClass:"lin-icon-play",on:{click:e.onPlayClick}})]),e._v(" "),n("lin-player-volume",{attrs:{volume:e.volume},on:{setVolume:e.setVolume}}),e._v(" "),e.live?e._e():n("span",{staticClass:"lin-video-player-time"},[e._v(e._s(e._f("secondToTime")(e.currentTime))+"/"+e._s(e._f("secondToTime")(e.totalTime)))]),e._v(" "),e.live?n("span",{staticClass:"lin-video-player-live-tip"},[n("i"),e._v("\n "+e._s(e.t("LinViewUI.VideoPlayer.live"))+"\n ")]):e._e()],1),e._v(" "),n("div",{staticClass:"lin-video-player-controls-right"},[n("lin-player-fullscreen",{on:{"browser-fullscreen":function(t){return e.$emit("browser-fullscreen")},"web-fullscreen":function(t){return e.$emit("web-fullscreen")}}})],1)])])};fa._withStripped=!0;var da=T({name:"LinMultiControls",mixins:[Ie],components:(ua={},H()(ua,Pr.name,Pr),H()(ua,Nr.name,Nr),H()(ua,Rr.name,Rr),ua),filters:{secondToTime:br},props:{isPlaying:{type:Boolean,default:!1},isEnter:{type:Boolean,default:!1},currentTime:{type:Number,default:0},totalTime:{type:Number,default:0},volume:{type:Number,default:1},live:{type:Boolean,value:!1}},methods:{onPlayClick:function(){this.$emit("play")},onPauseClick:function(){this.$emit("pause")},onSeek:function(e){this.$emit("seek",e)},setVolume:function(e){this.$emit("setVolume",e)}}},fa,[],!1,null,null,null);da.options.__file="packages/multi-player/src/multi-controls.vue";var ha,pa=da.exports,va=T({name:"linMultiPlayer",components:(ha={},H()(ha,ca.name,ca),H()(ha,pa.name,pa),ha),data:function(){return{frameStyle1:{height:0,width:0,top:0,left:0},frameStyle2:{height:0,width:0,top:0,left:0},frameStyle3:{height:0,width:0,top:0,left:0},frameStyle4:{height:0,width:0,top:0,left:0},index:-1,screen:-1,videoStyle1:{width:0,top:0,left:0,height:0},videoStyle2:{width:0,top:0,left:0,height:0},videoStyle3:{width:0,top:0,left:0,height:0},isPlaying:!1,currentTime:0,totalTime:0,volume:1,isWebFullscreen:!1,isEnter:!0,isSingleFullscreen:!1,singleFullscreenId:-1,autoplay:!1,videoList:[],type:"mp4",live:!1}},computed:{randomId:function(){var e;return"multi-screen-".concat(oe()(e=Math.random().toString(16)).call(e,-9))}},mounted:function(){this.isMove=!1,this.sortArr=[1,2,3],this.movedownTime=0,this.originalStyle1={top:0,left:0,height:0,width:0},this.originalStyle2={top:0,left:0,height:0,width:0},this.originalStyle3={top:0,left:0,height:0,width:0},this.container={height:0,width:0,left:0,top:0},this.startPosition={x:0,y:0},this.playerList=[],this.observer=null,this.isFirst=!0,this.initData(),this.initObserver()},methods:{initObserver:function(){var e=this;this.observer=new ur.a((function(){if(!e.isFirst){var t=vr();e.isSingleFullscreen&&t||e.initData(),t||(e.isSingleFullscreen=!1,e.singleFullscreenId=-1)}})),this.observer.observe(this.$refs.container)},initData:function(){var e=this;return ce()(le.a.mark((function t(){var n,i,r,a,o,s,l,u,c,f,d,h,p;return le.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick();case 2:e.isFirst=!1,n=e.$refs.container.getBoundingClientRect(),e.container.height=n.height,e.container.width=n.width,e.container.left=n.left,e.container.top=n.top,i=n.width/3,r=n.height/2,o=1*i,s=r,l={width:a=2*i,height:n.height,left:0,top:0},f={frameStyle1:l,frameStyle2:u={width:o,height:s,left:a,top:0},frameStyle3:c={width:o,height:s,left:a,top:s}},e.initStyle("originalStyle1",l),e.initStyle("originalStyle2",u),e.initStyle("originalStyle3",c),d=e.getScreenByFrame(1),h=e.getScreenByFrame(2),p=e.getScreenByFrame(3),e.initStyle("frameStyle1",f["frameStyle".concat(d)]),e.initStyle("frameStyle2",f["frameStyle".concat(h)]),e.initStyle("frameStyle3",f["frameStyle".concat(p)]),e.initStyle("videoStyle1",f["frameStyle".concat(d)]),e.initStyle("videoStyle2",f["frameStyle".concat(h)]),e.initStyle("videoStyle3",f["frameStyle".concat(p)]);case 29:case"end":return t.stop()}}),t)})))()},initStyle:function(e,t){this[e]=t},onMainMousedown:function(e,t){this.movedownTime=O()(),this.isMove=!1,this.index=this.getDirection(this[e].left+20,this[e].top+20),-1!==this.index&&(this.startPosition={x:t.x,y:t.y},document.addEventListener("mousemove",this.onMousemove),document.addEventListener("mouseup",this.onMouseup))},onMouseup:function(e){var t=O()()-this.movedownTime;if(this.isMove&&!this.isSingleFullscreen&&t>500){var n=e.x,i=e.y,r=n-this.container.left,a=i-this.container.top,o=this.getDirection(r,a),s=this.getFrameByScreen(o);if(-1===s||-1===this.screen||-1===o){var l=this["originalStyle".concat(this.index)],u=this.getFrameByScreen(this.index);this.initStyle("frameStyle".concat(u),{width:l.width,height:l.height,left:l.left,top:l.top})}else{var c=this["originalStyle".concat(o)],f=this["originalStyle".concat(this.index)];this.initStyle("frameStyle".concat(this.screen),{width:c.width,height:c.height,left:c.left,top:c.top}),this.initStyle("frameStyle".concat(s),{width:f.width,height:f.height,left:f.left,top:f.top}),this.initStyle("videoStyle".concat(this.screen),{width:c.width,height:c.height,left:c.left,top:c.top}),this.initStyle("videoStyle".concat(s),{width:f.width,height:f.height,left:f.left,top:f.top}),this.exchangeScreen(this.index,o)}}else this.toggle();this.screen=-1,this.index=-1,this.isMove=!1,this.removeEventListener()},onMousemove:function(e){if(!this.isSingleFullscreen){this.isMove=!0;var t=e.x,n=e.y,i=this.getFrameByScreen(this.index);this.screen=i;var r=this["frameStyle".concat(i)],a=r.width,o=r.height,s=r.top,l=r.left+(t-this.startPosition.x),u=s+(n-this.startPosition.y);this.initStyle("frameStyle".concat(i),{width:a,height:o,left:l,top:u}),this.startPosition.x=t,this.startPosition.y=n}},getDirection:function(e,t){return e>this.originalStyle2.left&&e<this.container.width&&t>0&&t<this.originalStyle3.top?2:e>this.originalStyle2.left&&e<this.container.width&&t>this.originalStyle3.top&&t<this.container.height?3:e>0&&e<this.originalStyle2.left&&t>0&&t<this.container.height?1:-1},formatStyle:function(e){var t,n={};return r()(t=ke()(e)).call(t,(function(t){"number"==typeof e[t]?n[t]="".concat(e[t],"px"):n[t]=e[t]})),n},getFrameByScreen:function(e){return e-=1,this.sortArr[e]},getScreenByFrame:function(e){var t;return Fe()(t=this.sortArr).call(t,(function(t){return t===e}))+1},exchangeScreen:function(e,t){e-=1,t-=1;var n=this.sortArr[e],i=this.sortArr[t];this.sortArr[e]=i,this.sortArr[t]=n},initPlayer:function(){var e=this.videoList.length;e=e>3?3:e;for(var t=0;t<e;t++){var n,i=this.videoList[t],r=new oa({el:document.getElementById(o()(n="".concat(this.randomId,"-")).call(n,t+1)),type:this.type,autoplay:this.autoplay,live:this.live,videoList:[{label:"",url:i}]});this.playerList.push(r)}this.initListener()},onpPlayClick:function(){this.play(),this.isPlaying=!0},onPauseClick:function(){this.pause(),this.isPlaying=!1},onSeek:function(e){this.seek(e)},onBrowserFullscreen:function(){this.isWebFullscreen&&(this.isWebFullscreen=!1),gr()&&(vr()?yr():mr(this.$refs.container))},onWebFullscreen:function(){yr(),this.isWebFullscreen=!this.isWebFullscreen},initListener:function(){var e=this.playerList[0];e&&(this.live||e.on("timeupdate",this.onTimeupdate),e.on("loadedmetadata",this.onLoadedmetadata),e.on("volumechange",this.onVolumechange),e.on("play",this.onPlay),e.on("pause",this.onPause))},onTimeupdate:function(e){this.currentTime=e.target.currentTime||0},onLoadedmetadata:function(e){var t=e.target.duration||0;this.totalTime=t,this.volume=e.target.volume},onVolumechange:function(e){this.volume=e.target.volume},onPlay:function(){this.isPlaying=!0},onPause:function(){this.isPlaying=!1},toggle:function(){this.handelVideo((function(e){e.toggle()}))},play:function(){this.handelVideo((function(e){e.play()}))},pause:function(){this.handelVideo((function(e){e.pause()}))},seek:function(e){this.handelVideo((function(t){t.seek(e)}))},setVolume:function(e){this.handelVideo((function(t){t.volume(e)}))},handelVideo:function(e){for(var t=0;t<this.playerList.length;t++){var n=this.playerList[t];n&&"function"==typeof e&&e(n)}},onMouseLeave:function(){this.isEnter=!1},onMouseEnter:function(){this.isEnter=!0},onSingleFullscreenClick:function(e){if(e>0&&e<=3){this.isSingleFullscreen=!0,this.singleFullscreenId=e,this.onBrowserFullscreen();var t={width:"100%",height:"100%",left:0,top:0};this.initStyle("frameStyle".concat(e),t),this.initStyle("videoStyle".concat(e),t)}},destoryPlayer:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.handelVideo((function(e){e.destory()}))},removeEventListener:function(){document.removeEventListener("mousemove",this.onMousemove),document.removeEventListener("mouseup",this.onMouseup)}},beforeDestroy:function(){this.destoryPlayer(),this.removeEventListener()}},lr,[],!1,null,null,null);va.options.__file="packages/multi-player/src/multi-player.vue";var ga=va.exports,ma=c.a.extend(ga),ya=function(){function e(t){Oi()(this,e),H()(this,"instance",null),H()(this,"container",null),H()(this,"vm",null),H()(this,"videoList",[]),H()(this,"type",null),H()(this,"live",!1),H()(this,"autoplay",!1),H()(this,"el",null);var n=t.el;na(n),this.initParams(t),this.initPlayer(t)}return Pi()(e,[{key:"initParams",value:function(e){var t=e.el,n=e.type,i=void 0===n?"mp4":n,r=e.autoplay,a=void 0!==r&&r,o=e.videoList,s=void 0===o?[]:o,l=e.live,u=void 0!==l&&l;this.videoList=s,this.autoplay=a,this.type=i,this.el=t,this.live=u}},{key:"initPlayer",value:function(){var e,t,n,i;this.instance=new ma({data:{autoplay:this.autoplay,videoList:this.videoList,type:this.type,live:this.live}}),"string"==typeof this.el?this.container=document.querySelector(this.el):this.container=this.el,this.vm=null===(e=this.instance)||void 0===e?void 0:e.$mount(),this.videos=null===(t=this.instance)||void 0===t?void 0:t.playerList,null===(n=this.container)||void 0===n||n.appendChild(this.vm.$el),null===(i=this.instance)||void 0===i||i.initPlayer()}},{key:"on",value:function(e,t){this.videos&&this.videos[0]&&this.videos[0].on(e,t)}},{key:"seek",value:function(e){var t;null===(t=this.instance)||void 0===t||t.seek(e)}},{key:"play",value:function(){var e;null===(e=this.instance)||void 0===e||e.play()}},{key:"pause",value:function(){var e;null===(e=this.instance)||void 0===e||e.pause()}},{key:"toggle",value:function(){var e;null===(e=this.instance)||void 0===e||e.toggle()}},{key:"setVolume",value:function(e){var t;null===(t=this.instance)||void 0===t||t.setVolume(e)}},{key:"resetParams",value:function(){this.instance=null,this.container=null,this.vm=null,this.videoList=[],this.type=null,this.autoplay=!1,this.el=null,this.live=!1}},{key:"destory",value:function(){var e;this.vm&&this.vm.$el&&this.container&&this.container.removeChild(this.vm.$el),null===(e=this.vm)||void 0===e||e.$destroy(),this.resetParams()}},{key:"fullScreen",get:function(){var e=this;return{request:function(t){var n;if("web"===t)null===(n=e.instance)||void 0===n||n.onWebFullscreen();else if("browser"===t){var i;null===(i=e.instance)||void 0===i||i.onBrowserFullscreen()}},cancel:function(t){var n;if("web"===t)null===(n=e.instance)||void 0===n||n.onWebFullscreen();else if("browser"===t){var i;null===(i=e.instance)||void 0===i||i.onBrowserFullscreen()}},singleFullscreen:function(t){var n=e.instance.getFrameByScreen(t);e.instance.onSingleFullscreenClick(n)}}}},{key:"currentTime",get:function(){var e;return(null===(e=this.instance)||void 0===e?void 0:e.currentTime)||0}},{key:"totalTime",get:function(){var e;return(null===(e=this.instance)||void 0===e?void 0:e.totalTime)||0}},{key:"paused",get:function(){var e;return!(null!==(e=this.instance)&&void 0!==e&&e.isPlaying)}}]),e}();ya.install=function(e){e.prototype.$MultiPlayer=ya};var _a=ya,ba=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:["lin-page-header",{"lin-page-header-border-bottom":e.border}]},[n("div",{staticClass:"lin-page-header-left"},[e.back?n("div",{staticClass:"lin-page-header-back"},[e._t("back",[n("div",{staticClass:"lin-page-header-back-wrapper",on:{click:function(t){return e.$emit("back")}}},[n("i",{staticClass:"lin-icon-back"}),e._v(" "),n("span",[e._v(e._s(e.backTip||e.t("LinViewUI.PageHeader.backTip")))])])])],2):e._e(),e._v(" "),n("div",{class:["lin-page-header-content",{"lin-page-header-active":e.active}]},[e._t("default",[e._v("\n "+e._s(e.title)+"\n ")])],2)]),e._v(" "),e.right?n("div",{staticClass:"lin-page-header-right"},[e._t("right",[n("div",{staticClass:"lin-page-header-more",on:{click:function(t){return e.$emit("more")}}},[n("span",[e._v(e._s(e.t("LinViewUI.PageHeader.more")))]),e._v(" "),n("i",{staticClass:"lin-icon-right"})])])],2):e._e()])};ba._withStripped=!0;var Sa=T({name:"LinPageHeader",mixins:[Ie],props:{back:{type:Boolean,default:!0},backTip:{type:String},title:{type:String,default:""},right:{type:Boolean,default:!1},active:{type:Boolean,default:!1},border:{type:Boolean,default:!1}}},ba,[],!1,null,null,null);Sa.options.__file="packages/page-header/src/page-header.vue";var wa=Sa.exports;wa.install=function(e){return e.component(wa.name,wa)};var Ea=wa,Ta={name:"LinPagination",mixins:[Ie],props:{pageCount:{default:7,type:Number},pageSize:{default:10,type:Number},total:{type:Number,default:0},pageIndex:{type:Number},background:{type:Boolean,default:!1},layout:{type:String,default:"prev, pager, next, jumper,total"}},data:function(){return{myPageIndex:1}},render:function(e){var t=this,n=this.background,i=this.layoutList;return e("div",{class:["lin-pagination",{"lin-pagination-background":n}]},[Dt()(i).call(i,(function(n){var i=t["render".concat(n)];return i?i(e):null}))])},methods:{onItemClick:function(e){var t=1;"number"===e.type?t=e.index:"prev"===e.type?t=this.currentPage-1:"next"===e.type&&(t=this.currentPage+1),this.currentPage=t,this.$emit("currentChange",t)},prevClick:function(){if(!this.disabledPrev){var e=this.currentPage-1;this.currentPage=e,this.$emit("prevClick",e)}},nextClick:function(){if(!this.disabledNext){var e=this.currentPage+1;this.currentPage=e,this.$emit("nextClick",e)}},gotoPageByEnter:function(e){if(13===e.keyCode){var t,n=e.target.value;t=n?n<1?1:n>this.totalPage?this.totalPage:n:1,this.currentPage=1*t,e.target.value=t}},gotoPageByBlur:function(e){var t,n=e.target.value;t=n?n<1?1:n>this.totalPage?this.totalPage:n:1,this.currentPage=1*t,e.target.value=t},rendertotal:function(e){var t=this.total,n=this.t;return e("span",{class:"lin-pagination-total"},[n("LinViewUI.Pagination.total"),t,n("LinViewUI.Pagination.strip")])},renderprev:function(e){return e("span",{class:["lin-pagination-item","lin-icon-left",{"lin-pagination-disabled":this.disabledPrev}],on:{click:this.prevClick}})},renderpager:function(e){var t=this.pageList,n=this.currentPage,i=this.onItemClick;return e("ul",{class:"lin-pagination-pager"},[Dt()(t).call(t,(function(t,r){return e("li",{class:["lin-pagination-item",{"lin-pagination-active":t.index===n},{"lin-pagination-ellipsis":"prev"===t.type||"next"===t.type}],key:r,on:{click:function(){return i(t)}}},[t.index,"prev"===t.type?e("span",{class:"lin-pagination-icon lin-icon-leftarrow"}):null,"next"===t.type?e("span",{class:"lin-pagination-icon lin-icon-rightarrow"}):null])}))])},rendernext:function(e){return e("span",{class:["lin-pagination-item","lin-icon-right",{"lin-pagination-disabled":this.disabledNext}],on:{click:this.nextClick}})},renderjumper:function(e){var t=this.totalPage,n=this.gotoPageByEnter,i=this.gotoPageByBlur,r=this.currentPage,a=this.t;return e("div",{class:"lin-pagintaion-jumpe"},[e("span",[a("LinViewUI.Pagination.goto")]),e("input",{attrs:{min:"1",max:t,type:"number"},on:{keyup:n,blur:i},domProps:{value:r},class:"lin-pagintaion-input"}),e("span",[a("LinViewUI.Pagination.page")])])}},computed:{currentPage:{get:function(){return this.pageIndex?this.pageIndex:this.myPageIndex},set:function(e){this.pageIndex?this.$emit("update:pageIndex",e):this.myPageIndex=e}},disabledPrev:function(){return 1===this.currentPage||0===this.total},disabledNext:function(){return this.currentPage===this.totalPage||0===this.total},totalPage:function(){return Math.ceil(this.total/this.pageSize)},pageList:function(){if(0===this.total)return[];var e=1,t=this.totalPage,n=[];for(this.totalPage>=this.pageCount&&(this.currentPage>Math.ceil(this.pageCount/2)&&this.currentPage<this.totalPage-Math.floor(this.pageCount/2)?(e=this.currentPage-Math.floor(this.pageCount/2),t=this.currentPage+Math.floor(this.pageCount/2)):this.currentPage<=Math.ceil(this.pageCount/2)?(e=1,t=this.pageCount):(e=this.totalPage-(this.pageCount-1),t=this.totalPage));e<=t;)n.push({index:e,type:"number"}),e++;return this.totalPage>this.pageCount&&(n[0]={index:1,type:"number"},this.currentPage>Math.ceil(this.pageCount/2)&&(n[1]={index:"...",type:"prev"}),this.currentPage<this.totalPage-Math.floor(this.pageCount/2)&&(n[n.length-2]={index:"...",type:"next"}),n[n.length-1]={index:this.totalPage,type:"number"}),n},layoutList:function(){var e=this.layout.split(",")||[];return e=Dt()(e).call(e,(function(e){return st()(e).call(e)}))}},install:function(e){return e.component(Ta.name,Ta)}},ka=Ta,xa=function(){var e,t=this,n=t.$createElement,i=t._self._c||n;return i("div",{staticClass:"lin-progress"},[i("div",{staticClass:"lin-progress-out",style:t.outStyle},[i("div",{class:["lin-progress-inner",(e={},e["lin-progress-"+t.type]=t.type,e)],style:t.innerStyle},[t.isShowInsideText?i("div",{staticClass:"lin-progress-inside-text"},[t._t("text",[i("span",{staticClass:"lin-progress-inside-tip"},[t._v(t._s(t.textInside))])])],2):t._e()])]),t._v(" "),t.isShowOutsideText?i("div",{staticClass:"lin-progress-outside-text"},[t._t("default",[i("span",{staticClass:"lin-progress-outside-tip"},[t._v(t._s(t.textOutside))])])],2):t._e()])};xa._withStripped=!0;var La=T({name:"LinProgress",props:{percent:{type:Number,default:0},innerColor:{type:String,default:""},outColor:{type:String,default:""},height:{type:Number,default:10},radius:{type:Boolean,default:!0},textOutside:{type:String,default:""},type:{type:String,default:"primary"},textInside:{type:String,default:""}},computed:{width:function(){return this.percent<0?"0%":this.percent>1?"100%":"".concat(100*this.percent,"%")},innerStyle:function(){var e={width:this.width};return this.innerColor&&(e.backgroundColor=this.innerColor),this.radius&&(e.borderRadius="".concat(this.height/2,"px")),e},outStyle:function(){var e={};return this.outColor&&(e.backgroundColor=this.outColor),this.height&&(e.height="".concat(this.height,"px")),this.radius&&(e.borderRadius="".concat(this.height/2,"px")),e},isShowOutsideText:function(){return!(!this.textOutside&&!this.$slots.default)},isShowInsideText:function(){return!(!this.textInside&&!this.$slots.text)}}},xa,[],!1,null,null,null);La.options.__file="packages/progress/src/progress.vue";var Aa=La.exports;Aa.install=function(e){return e.component(Aa.name,Aa)};var Ca=Aa,Ra=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("label",{staticClass:"lin-radio",class:{"lin-radio-is-checked":e.label===e.model,"lin-radio-is-disabled":e.isDisable}},[n("span",{staticClass:"lin-radio-input"},[n("span",{staticClass:"lin-radio-inner"}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.model,expression:"model"}],staticClass:"lin-radio-original",attrs:{disabled:e.isDisable,type:"radio",name:e.name},domProps:{value:e.label,checked:e._q(e.model,e.label)},on:{change:function(t){e.model=e.label}}})]),e._v(" "),n("span",{staticClass:"lin-radio-label"},[e._t("default"),e._v(" "),e.$slots.default?e._e():[e._v(e._s(e.label))]],2)])};Ra._withStripped=!0;var Da=T({name:"LinRadio",inject:{RadioGroup:{default:""}},computed:{model:{get:function(){return this.isGroup?this.RadioGroup.value:this.value},set:function(e){this.isGroup?this.RadioGroup.$emit("input",e):this.$emit("input",e),xe.call(this,{eventName:"validate",componentName:"LinFormItem"})}},isGroup:function(){return!!this.RadioGroup},isDisable:function(){return!(!this.isGroup||!this.RadioGroup.disabled)||this.disabled}},props:{label:{type:[String,Number,Boolean],default:""},value:null,name:{type:String,default:""},disabled:{type:Boolean,default:!1}}},Ra,[],!1,null,null,null);Da.options.__file="packages/radio/src/radio.vue";var Oa=Da.exports;Oa.install=function(e){return e.component(Oa.name,Oa)};var Ia=Oa,Pa=function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"lin-radio-group"},[this._t("default")],2)};Pa._withStripped=!0;var Ma=T({name:"LinRadioGroup",provide:function(){return{RadioGroup:this}},props:{value:null,disabled:{type:Boolean,default:!1}}},Pa,[],!1,null,null,null);Ma.options.__file="packages/radio-group/src/radio-group.vue";var Fa=Ma.exports;Fa.install=function(e){return e.component(Fa.name,Fa)};var Ba=Fa,Na={name:"LinRow",props:{tag:{type:String,default:"div"},gutter:{type:Number,default:0},type:{type:String,default:""},justify:{type:String,default:""},align:{type:String,default:""}},provide:function(){return{row:this}},render:function(e){var t=[];return this.type&&t.push("lin-row-".concat(this.type)),this.justify&&t.push("lin-row-justify-".concat(this.justify)),this.align&&t.push("lin-row-align-".concat(this.align)),e(this.tag,{class:["lin-row",t]},this.$slots.default)},install:function(e){return e.component(Na.name,Na)}},Ua=Na,ja=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"lin-scroll-bar",style:Object.assign({},e.style,{width:e.width}),on:{mouseenter:e.onMouseEnter,mouseleave:e.onMouseLeave}},[n("div",{ref:"wrapper",staticClass:"lin-scroll-bar-wrapper",style:e.style,on:{scroll:e.onWrapperScroll}},[n("div",{ref:"content",staticClass:"lin-scroll-bar-content"},[e._t("default"),e._v(" "),e.loading?n("div",{staticClass:"lin-scroll-bar-spinner"},[e._t("loading",[n("lin-spinner",{attrs:{text:e.loadingText,size:e.loadingSize}})])],2):e._e()],2)]),e._v(" "),e.showBar?n("div",{staticClass:"lin-srcoll-bar-barwrapper",on:{click:e.onBarWrapperClick}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.hoverBar||e.hover,expression:"hoverBar || hover"}],ref:"bar",staticClass:"lin-srcoll-bar-bar",style:{height:e.barHeight+"px",top:e.barTop+"px"},on:{mousedown:e.onMouseDown}})]):e._e()])};ja._withStripped=!0;var Va=T({name:"LinScrollBar",components:H()({},Z.name,Z),props:{hover:{type:Boolean,default:!1},height:{type:String,default:"100%"},width:{type:String,default:"100%"},maxHeight:{type:String},minHeight:{type:String},loading:{type:Boolean,default:!1},loadingText:String,loadingSize:String},data:function(){return{barHeight:0,barTop:0,showBar:!1,hoverBar:!1}},mounted:function(){this.wrapperHeight=0,this.contentHeight=0,this.startY=0,this.observer=null,this.isMove=!1,this.isLeave=!1,this.init(),this.initObserver()},methods:{initObserver:function(){var e=this;this.observer=new ur.a((function(){e.init()})),this.observer.observe(this.$refs.content)},init:function(){this.initDom(),this.initBar()},initDom:function(){this.wrapperHeight=this.$refs.wrapper.clientHeight,this.contentHeight=this.$refs.content.clientHeight},initBar:function(){var e=this.wrapperHeight,t=this.contentHeight;if(e/t<1?(this.barHeight=e/t*e,this.showBar=!0):this.showBar=!1,this.showBar){var n=this.$refs.wrapper.scrollTop/t*e;this.barTop=n}},onWrapperScroll:function(e){var t=this.contentHeight,n=this.wrapperHeight,i=e.target.scrollTop,r=i/(t-n)*(n-this.barHeight);this.barTop=r,this.$emit("scroll",e),i+n>=t&&this.$emit("scrollToBottom",e)},onMouseDown:function(e){this.isMove=!0,document.getElementsByTagName("body")[0].classList.add("user-no-select"),this.startY=e.clientY,document.addEventListener("mousemove",this.onMousemove),document.addEventListener("mouseup",this.onMouseup)},onMousemove:function(e){var t=e.clientY-this.startY,n=this.$refs.bar.offsetTop+t;this.updatePosition(n),this.startY=e.clientY},onMouseup:function(){this.isMove=!1,this.isLeave&&(this.hoverBar=!1),document.getElementsByTagName("body")[0].classList.remove("user-no-select"),document.removeEventListener("mousemove",this.onMousemove),document.removeEventListener("mouseup",this.onMouseup)},updatePosition:function(e){var t=this.wrapperHeight,n=this.contentHeight,i=this.$refs.bar.clientHeight;e>=t-i&&(e=t-i),e<=0&&(e=0),this.barTop=e;var r=e/t*n;this.$refs.wrapper.scrollTop=r},onMouseEnter:function(){this.hoverBar=!0,this.isLeave=!1},onMouseLeave:function(){this.isLeave=!0,this.isMove||(this.hoverBar=!1)},onBarWrapperClick:function(e){var t=e.clientY,n=this.$refs.wrapper.getBoundingClientRect().top;this.updatePosition(t-n-this.barHeight/2)}},computed:{style:function(){var e={};return this.height&&(e.height=this.height),this.maxHeight&&(e["max-height"]=this.maxHeight),this.minHeight&&(e["min-height"]=this.minHeight),e}},beforeDestroy:function(){this.observer&&(this.observer.disconnect(),this.observer=null),document.removeEventListener("mousemove",this.onMousemove),document.removeEventListener("mouseup",this.onMouseup)}},ja,[],!1,null,null,null);Va.options.__file="packages/scroll-bar/src/scroll-bar.vue";var Ga=Va.exports;Ga.install=function(e){return e.component(Ga.name,Ga)};var $a=Ga,Ha=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"lin-scroll-view",style:{height:e.height+"px"},on:{scroll:e.onScroll}},[n("div",{ref:"lScrollViewContent"},[n("div",{staticClass:"lin-scroll-view-content"},[e._t("default")],2),e._v(" "),e.isShowLoading?e._t("loading",[n("div",{staticClass:"lin-scroll-view-loading"},[n("span",{staticClass:"lin-scroll-view-icon"}),e._v(" "),n("span",{staticClass:"lin-scroll-view-tip"},[e._v(e._s(e.loadingTip))])])]):e._e(),e._v(" "),e.isShowNoMoreTip?e._t("no-more",[n("p",{staticClass:"lin-scroll-view-nomore-tip"},[e._v(e._s(e.noMoreTip))])]):e._e()],2)])};Ha._withStripped=!0;var Wa=T({name:"LinScrollView",props:{height:{type:Number,default:700},isThrottle:{type:Boolean,default:!0},time:{type:Number,default:500},isEnd:{type:Boolean,default:!1},showLoading:{type:Boolean,default:!0},emitScrollEvent:{type:Boolean,default:!0},data:[Object,Array],loadingTip:{type:String,default:""},noMoreTip:{type:String,default:""}},data:function(){return{contentHeight:0}},mounted:function(){var e=this;this.timer=null,this.$nextTick((function(){e.$refs.lScrollViewContent&&(e.contentHeight=e.$refs.lScrollViewContent.clientHeight)}))},methods:{onScroll:function(e){var t=this;this.isThrottle?(this.timer&&clearTimeout(this.timer),this.timer=R()((function(){t.handelScroll(e)}),this.time)):this.handelScroll(e)},handelScroll:function(e){this.isEnd||e.target.scrollTop+this.height>=this.contentHeight&&this.$emit("scrollToEnd",e);this.emitScrollEvent&&this.$emit("scroll",e)}},computed:{isShowLoading:function(){return!(this.contentHeight<=this.height)&&!(!this.showLoading||this.isEnd)},isShowNoMoreTip:function(){return!(this.contentHeight<=this.height)&&!(!this.isEnd||!this.noMoreTip&&!this.$slots["no-more"])}},watch:{data:function(){this.$refs.lScrollViewContent?this.contentHeight=this.$refs.lScrollViewContent.clientHeight:this.contentHeight=0}},beforeDestroy:function(){this.timer&&clearTimeout(this.timer)}},Ha,[],!1,null,null,null);Wa.options.__file="packages/scroll-view/src/scroll-view.vue";var Ka=Wa.exports;Ka.install=function(e){return e.component(Ka.name,Ka)};var za=Ka,qa=T({name:"LinSelectorGroup",mixins:[Ie],render:function(e){var t=this.renderMore,n=this.width,i=this.labelWidth,r=this.height,a=this.$slots,o=this.switchMore,s=this.label,l=this.status,u=this.renderLabel,c=this.t;return e("div",{class:"lin-selector-group",ref:"selector",style:{width:"".concat(n,"px")}},[e("label",[u?u(e):e("span",{class:"lin-selector-label",style:{width:i}},[s])]),e("div",{class:"lin-selector-list",ref:"selectorList",style:{height:r}},[a.default]),this.isShowBtn?e("span",{class:"lin-selector-more-text",ref:"more",on:{click:o}},[t?t(e,l):e("span",{class:"lin-selector-more-text-tip"},[c(2===l?"LinViewUI.Selector.hide":"LinViewUI.Selector.show")])]):null])},props:{width:{type:String,default:""},labelWidth:{type:String,default:"40px"},value:{type:[String,Object,Number,Boolean]},valueKey:{type:String,default:""},renderMore:{type:Function,default:null},renderLabel:{type:Function,default:null},label:{type:String,default:""},disabled:{type:Boolean,default:!1}},provide:function(){return{group:this}},data:function(){return{isShowBtn:!1,height:"auto",status:1}},mounted:function(){var e=this;this.$nextTick((function(){e.init(),window.addEventListener("resize",e.onResize)}))},methods:{onResize:function(){this.resetStatus()},resetStatus:function(){var e=this;"auto"===this.$refs.selectorList.style.height?this.init():(this.height="auto",this.$nextTick((function(){e.init()})))},init:function(){this.$refs.selectorList.clientHeight>26?(this.isShowBtn=!0,this.hide()):(this.isShowBtn=!1,this.show())},switchMore:function(){1===this.status?(this.show(),this.$emit("show")):(this.hide(),this.$emit("hide"))},show:function(){this.height="auto",this.status=2},hide:function(){this.height="".concat(26,"px"),this.status=1}},beforeDestroy:function(){window.removeEventListener("resize",this.onResize)}},void 0,void 0,!1,null,null,null);qa.options.__file="packages/selector-group/src/selector-group.vue";var Ya=qa.exports;Ya.install=function(e){return e.component(Ya.name,Ya)};var Xa=Ya,Ja=function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"lin-selecotr-item",class:{"lin-selecotr-active":this.active,"lin-selecotr-disabled":this.isDisabled},on:{click:this.onClick}},[this._t("default",[this._v(this._s(this.label))])],2)};Ja._withStripped=!0;var Za=n(68),Qa=n.n(Za),eo=T({name:"LinSelectorItem",props:{label:{type:String,default:""},value:{default:""},disabled:{type:Boolean,default:!1}},inject:{group:{default:""}},computed:{active:function(){if(this.group){var e=this.group.valueKey;return"[object Object]"===Object.prototype.toString.call(this.value)&&e?this.value[e]===this.group.value[e]:this.value===this.group.value}return!1},isDisabled:function(){return!(!this.group||!this.group.disabled)||this.disabled}},methods:{onClick:function(){if(this.group&&!this.isDisabled){var e=JSON.parse(Qa()(this.value));this.group.$emit("input",e),this.group.$emit("onChange",e)}}}},Ja,[],!1,null,null,null);eo.options.__file="packages/selector-item/src/selector-item.vue";var to=eo.exports;to.install=function(e){return e.component(to.name,to)};var no=to,io=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"lin-show-more"},[n("span",[e._v(e._s(e._f("filterText")(e.text,e.textLen)))]),e._v(" "),-1!==e.textLen&&e.textLen<e.text.length?n("a",{staticClass:"lin-show-more-tip",on:{click:e.showMore}},[e._v(e._s(e.showText||e.t("LinViewUI.ShowMore.showText")))]):e._e(),e._v(" "),-1!==e.textLen&&e.textLen===e.text.length&&e.allowFold?n("a",{staticClass:"lin-show-more-tip",on:{click:e.showMore}},[e._v(e._s(e.hiddenText||e.t("LinViewUI.ShowMore.hiddenText")))]):e._e()])};io._withStripped=!0;var ro=T({name:"LinShowMore",mixins:[Ie],props:{len:{type:Number,default:-1},text:{type:String,default:""},showText:{type:String},hiddenText:{type:String},allowFold:Boolean},data:function(){return{textLen:this.len}},methods:{showMore:function(){this.textLen=this.textLen===this.text.length?this.len:this.text.length}},filters:{filterText:function(e,t){return-1!==t&&t<e.length?"".concat(e.substring(0,t),"..."):e}}},io,[],!1,null,null,null);ro.options.__file="packages/show-more/src/show-more.vue";var ao=ro.exports;ao.install=function(e){return e.component(ao.name,ao)};var oo=ao,so=function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"lin-skeleton",style:{background:this.bgColor,paddingBottom:this.paddingBottom,width:this.width}})};so._withStripped=!0;var lo=T({name:"LinSkeleton",props:{proportion:{type:Number,default:1},bgColor:{type:String,default:"#b4bccc"},width:{type:String,default:"100%"},height:{type:[String,Boolean],default:!1}},data:function(){return{paddingBottom:this.height||"".concat(100*this.proportion,"%")}}},so,[],!1,null,null,null);lo.options.__file="packages/skeleton/src/skeleton.vue";var uo=lo.exports;uo.install=function(e){return e.component(uo.name,uo)};var co=uo,fo=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"lin-switch",class:{"lin-switch-is-checked":e.value,"lin-switch-is-disabled":e.disabled},on:{click:e.handleClick}},[e.name?n("input",{staticClass:"lin-switch-input",attrs:{type:"checkbox",name:e.name},domProps:{value:e.value}}):e._e(),e._v(" "),n("span",{staticClass:"lin-switch-core",style:{"border-color":e.color,"background-color":e.color}},[n("span",{staticClass:"lin-switch-button"})])])};fo._withStripped=!0;var ho=T({name:"LinSwitch",props:{value:{type:Boolean,default:!1},activeColor:{type:String,default:""},inactiveColor:{type:String,default:""},name:{type:String,default:""},disabled:{type:Boolean,default:!1}},methods:{handleClick:function(){this.disabled||(this.$emit("input",!this.value),xe.call(this,{eventName:"validate",componentName:"LinFormItem"}))}},computed:{color:function(){return this.value?this.activeColor?this.activeColor:"":this.inactiveColor?this.inactiveColor:""}}},fo,[],!1,null,null,null);ho.options.__file="packages/switch/src/switch.vue";var po=ho.exports;po.install=function(e){return e.component(po.name,po)};var vo=po,go={name:"LinTabGroup",render:function(e){var t=this.type,n=this.lineWidth,i=this.translateX,r=this.$slots,a=this.isScroll,o=this.onNextClick,s=this.onPrevClick,l=this.containerTranslateX,u=this.containerWidth,c=this.renderTabLabel,f=u,d=n;return e("div",{class:[{"lin-tab-group-card":"card"===t},{"lin-tab-group-border":"border-card"===t},"lin-tab-group"]},[e("div",{class:["lin-tab-group-header",{"lin-tab-group-header-scroll":a}],ref:"tabheader"},[e("div",{style:{transform:"translateX(".concat(l,"px)"),width:f},class:"lin-tab-group-item-wrapper",ref:"tabheaderWrapper"},[c(e),"default"!==t||e("div",{class:"lin-tab-group-active-line",style:{width:d,transform:"translateX(".concat(i,")")}})]),a?e("span",{class:"lin-tab-group-icon lin-icon-left",on:{click:s}}):null,a?e("span",{class:"lin-tab-group-icon lin-icon-right",on:{click:o}}):null]),e("div",{class:"lin-tab-group-content"},[r.default])])},data:function(){return{tabChildren:[],currentIndex:-1,lineWidth:"0px",translateX:"0px",isScroll:!1,containerTranslateX:0,containerWidth:"0px",step:60}},props:{value:{type:String,default:null},type:{type:String,default:"default"}},provide:function(){return{tabGroup:this}},mounted:function(){this.initTabChildren(),this.initScroll(),this.timer=null,window.addEventListener("resize",this.onResize)},methods:{renderTabLabel:function(e){var t=this.tabChildren,n=this.currentValue,i=this.onTabClick;return e("div",{class:"lin-tab-group-item-container",ref:"tabheaderContainer"},[Dt()(t).call(t,(function(t,r){return e("div",{class:[{"lin-tab-group-active":n===t.name},"lin-tab-group-header-item",{"lin-tab-group-header-item-disabled":t.disabled}],attrs:{id:"tab-".concat(t.name)},key:r,on:{click:function(){return i(t)}}},[t.labelSlot||t.label])}))])},onResize:function(){this.timer&&clearTimeout(this.timer),this.timer=R()(this.initScroll,500)},initScroll:function(){var e=this;this.$nextTick((function(){var t=e.$refs.tabheader,n=e.$refs.tabheaderContainer;e.containerTranslateX=0,t.clientWidth<n.scrollWidth?(e.isScroll=!0,e.containerWidth="".concat(n.scrollWidth,"px")):(e.containerWidth="100%",e.isScroll=!1),"default"===e.type&&e.initVar()}))},onTabClick:function(e){e.disabled||(this.currentValue=e.name,this.$emit("tab-click",e.name))},initTabChildren:function(){var e=this.getTabs(),t=Dt()(e).call(e,(function(e,t){return e.name||(e.index=t),{label:e.label,name:e.name||t,labelSlot:e.$slots.label||null,disabled:e.disabled}}));this.tabChildren=t,this.currentIndex=t.length>0?t[0].name:0},getTabs:function(){var e;return Se()(e=this.$children).call(e,(function(e){return"LinTabItem"===e.$options.name}))},initVar:function(){var e=this;this.$nextTick((function(){if(-1!==e.currentValue){var t=document.getElementById("tab-".concat(e.currentValue));if(t){e.lineWidth="".concat(t.offsetWidth,"px");var n=t.getBoundingClientRect().left,i=e.$refs.tabheaderWrapper.getBoundingClientRect().left;e.translateX="".concat(n-i,"px")}}}))},onPrevClick:function(){this.containerTranslateX+=this.step,this.containerTranslateX>0&&(this.containerTranslateX=0)},onNextClick:function(){var e=this.$refs.tabheader,t=this.$refs.tabheaderContainer,n=e.clientWidth-t.scrollWidth-40;this.containerTranslateX-=this.step,this.containerTranslateX<n&&(this.containerTranslateX=n)}},computed:{currentValue:{get:function(){return null!==this.value?this.value||(this.tabChildren.length>0?this.tabChildren[0].name:0):this.currentIndex},set:function(e){null!==this.value?this.$emit("input",e):this.currentIndex=e}}},watch:{currentValue:{immediate:!0,handler:function(){this.initVar()}}},beforeDestroy:function(){this.timer&&(clearTimeout(this.timer),this.timer=null),window.removeEventListener("resize",this.onResize)},install:function(e){return e.component(go.name,go)}},mo=go,yo=function(){var e=this.$createElement;return(this._self._c||e)("div",{directives:[{name:"show",rawName:"v-show",value:this.currentValue===this.childrenIndex,expression:"currentValue === childrenIndex"}],staticClass:"lin-tab-item"},[this._t("default")],2)};yo._withStripped=!0;var _o=T({name:"LinTabItem",props:{label:{type:String,default:""},name:{type:String,default:""},disabled:{type:Boolean,default:!1}},inject:{tabGroup:{default:null}},data:function(){return{index:0}},computed:{childrenIndex:function(){return this.name?this.name:this.index},currentValue:function(){return this.tabGroup?this.tabGroup.currentValue:0}}},yo,[],!1,null,null,null);_o.options.__file="packages/tab-item/src/tab-item.vue";var bo=_o.exports;bo.install=function(e){return e.component(bo.name,bo)};var So=bo,wo=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"lin-table-slot"},[e._t("default")],2),e._v(" "),n("table",{staticClass:"lin-table",class:[{"lin-table-border":e.border},{"lin-table-stripe":e.stripe}]},[n("colgroup",e._l(e.columns,(function(e){return n("col",{key:e.id,attrs:{width:e.width}})})),0),e._v(" "),n("lin-table-header",{ref:"linTableHeaderComp"}),e._v(" "),n("lin-table-body",{ref:"linTableBodyComp"})],1)])};wo._withStripped=!0;var Eo=n(111),To=n.n(Eo),ko=T({name:"LinTable",components:{LinTableHeader:{name:"LinTableHeader",inject:{table:{default:null}},computed:{selectData:{set:function(e){this.table&&(this.table.selectData=e)},get:function(){return this.table?this.table.selectData:[]}},dataSource:function(){return this.table?this.table.dataSource:[]}},watch:{selectData:function(e){this.changeCheckboxStatus(e)}},methods:{renderTh:function(e,t){var n=null;switch(t.type){case"selection":n=e("input",{class:"lin-table-checkbox",on:{click:this.onClick},attrs:{type:"checkbox"},ref:"linTableHeaderCheckbox"});break;case"index":n=t.label;break;default:n=t.label}return n},onClick:function(e){if(this.table){var t=e.target.checked;this.selectData=t?Object(I.cloneDeep)(this.dataSource):[],this.table.emitSelectChange(),this.table.emitSelectAll()}},switchCheckboxStatus:function(e){var t=this.$refs.linTableHeaderCheckbox;switch(e){case 1:t.indeterminate=!0,t.checked=!1;break;case 2:t.indeterminate=!1,t.checked=!0;break;case 3:t.indeterminate=!1,t.checked=!1}},changeCheckboxStatus:function(e){e.length>0?e.length<this.dataSource.length?this.switchCheckboxStatus(1):e.length===this.dataSource.length&&this.switchCheckboxStatus(2):this.switchCheckboxStatus(3)}},render:function(e){var t=this.renderTh,n=this.table.columns,i=void 0===n?[]:n;return e("thead",[e("tr",{class:"lin-table-tr"},[Dt()(i).call(i,(function(n,i){return e("th",{class:["lin-table-th","lin-table-align-".concat(n.align)],key:i},[t(e,n)])}))])])}},LinTableBody:{name:"LinTableBody",computed:{dataSource:function(){return this.table?this.table.dataSource:[]},columns:function(){return this.table?this.table.columns:[]},valueKey:function(){return this.table?this.table.valueKey:""}},inject:{table:{default:null}},mounted:function(){this.table&&this.table.$on("select-all",this.selectAll)},methods:{trClassName:function(e,t){var n=["lin-table-tr"];if(this.table){var i=this.table.rowClassName;if("function"==typeof i){var r=i({row:e,rowIndex:t});r&&n.push(r)}else"string"==typeof i&&n.push(i)}return n},selectAll:function(e){for(var t=this.$refs.linTableTbody.getElementsByClassName("lin-table-checkbox"),n=0;n<t.length;n++){var i=t[n];0===e.length?i.checked=!1:i.checked=!0}},clearSelection:function(){for(var e=this.$refs.linTableTbody.getElementsByClassName("lin-table-checkbox"),t=0;t<e.length;t++){e[t].checked=!1}},toggleAllSelection:function(){for(var e=this.$refs.linTableTbody.getElementsByClassName("lin-table-checkbox"),t=0;t<e.length;t++){var n=e[t];n.checked=!n.checked}},selectSelection:function(e){for(var t=this,n=this.$refs.linTableTbody.getElementsByClassName("lin-table-checkbox"),i=this.dataSource.length,r=function(i){var r=t.dataSource[i],a=To()(e).call(e,(function(e){return e[t.valueKey]===r[t.valueKey]}));n[i].checked=a},a=0;a<i;a++)r(a)},rowClick:function(e,t){var n;null===(n=this.table)||void 0===n||n.emitrRowClick({row:e,rowIndex:t})},cellClick:function(e,t,n,i){var r;null===(r=this.table)||void 0===r||r.emitrCellClick({row:e,prop:t,rowIndex:n,cellIndex:i})}},render:function(e){var t=this.dataSource,n=this.columns,i=this.trClassName,r=this.valueKey,a=this.rowClick,s=this.cellClick;return e("tbody",{class:"lin-table-tbody",ref:"linTableTbody"},[Dt()(t).call(t,(function(t,l){var u=t[r]||l;return e("tr",{key:u,class:i(t,l),on:{click:function(){return a(t,l)}}},[Dt()(n).call(n,(function(n,i){var r;return e("td",{on:{click:function(){s(t,n.prop,l,i)}},class:["lin-table-td","lin-table-align-".concat(n.align)],key:o()(r="".concat(u,"-")).call(r,i)},[n.renderCell(e,{row:t,column:n,rowIndex:l})])}))])}))])}}},props:{dataSource:{type:Array,default:function(){return[]},require:!0},border:{type:Boolean,default:!1},stripe:{type:Boolean,default:!1},rowClassName:{type:[Function,String]},valueKey:{type:String,require:!0}},provide:function(){return{table:this}},data:function(){return{columns:[],selectData:[]}},methods:{emitSelectChange:function(){var e=Object(I.cloneDeep)(this.selectData);this.$emit("selection-change",e)},emitSelectAll:function(){var e=Object(I.cloneDeep)(this.selectData);this.$emit("select-all",e)},emitSelect:function(e){this.$emit("select",Object(I.cloneDeep)(e))},emitrRowClick:function(e){this.$emit("row-click",Object(I.cloneDeep)(e))},emitrCellClick:function(e){this.$emit("cell-click",Object(I.cloneDeep)(e))},clearSelection:function(){this.selectData=[],this.$refs.linTableBodyComp.clearSelection(),this.emitSelectChange()},toggleAllSelection:function(){var e,t=this;this.$refs.linTableBodyComp.toggleAllSelection(),this.selectData=Se()(e=this.dataSource).call(e,(function(e){var n;return!!!To()(n=t.selectData).call(n,(function(n){return n[t.valueKey]===e[t.valueKey]}))})),this.$refs.linTableHeaderComp.changeCheckboxStatus(this.selectData),this.emitSelectChange()},selectSelection:function(e){this.selectData=e||[],this.$refs.linTableBodyComp.selectSelection(this.selectData),this.$refs.linTableHeaderComp.changeCheckboxStatus(this.selectData)}}},wo,[],!1,null,null,null);ko.options.__file="packages/table/src/table.vue";var xo=ko.exports;xo.install=function(e){return e.component(xo.name,xo)};var Lo=xo;function Ao(e,t){var n=ke()(e);if(Ee.a){var i=Ee()(e);t&&(i=Se()(i).call(i,(function(t){return _e()(e,t).enumerable}))),n.push.apply(n,i)}return n}function Co(e){for(var t=1;t<arguments.length;t++){var n,i=null!=arguments[t]?arguments[t]:{};if(t%2)r()(n=Ao(Object(i),!0)).call(n,(function(t){H()(e,t,i[t])}));else if(me.a)ve()(e,me()(i));else{var a;r()(a=Ao(Object(i))).call(a,(function(t){he()(e,t,_e()(i,t))}))}}return e}var Ro=0,Do={name:"LinTableColumn",props:{prop:String,label:String,width:String,align:{type:String,default:"left"},type:String},inject:{table:{default:null}},computed:{valueKey:function(){return this.table?this.table.valueKey:""}},watch:{prop:function(e){this.column.prop=e},label:function(e){this.column.label=e}},beforeCreate:function(){this.colums={}},created:function(){var e=this,t=Co(Co({},this.$props),{},{id:"col-".concat(Ro++)});t.renderCell=function(n,i){var r=function(n,i){return"selection"===i.column.type?n("input",{class:"lin-table-checkbox",on:{click:function(t){return e.onClick(t,i)}},attrs:{type:"checkbox"}}):"index"===i.column.type?i.rowIndex+1:i.row[t.prop]};return e.$scopedSlots.default&&"selection"!==i.column.type&&(r=function(t,n){return e.$scopedSlots.default(n)}),r(n,i)},this.column=t},mounted:function(){this.table&&this.table.columns.push(this.column)},destroyed:function(){var e=this;if(this.table){var t,n,i=Fe()(t=this.table.columns).call(t,(function(t){return t.id===e.column.id}));if(i>-1)Et()(n=this.table.columns).call(n,i,1)}},methods:{onClick:function(e,t){var n=this;if(e.stopPropagation(),this.table){var i,r=Fe()(i=this.table.selectData).call(i,(function(e){return e[n.valueKey]===t.row[n.valueKey]})),a=e.target.checked;if(a)-1===r&&this.table.selectData.push(t.row),this.table.emitSelectChange();else if(r>-1){var o;Et()(o=this.table.selectData).call(o,r,1),this.table.emitSelectChange()}this.table.emitSelect({row:t.row,checked:a,rowIndex:t.rowIndex})}}},render:function(){return null},install:function(e){return e.component(Do.name,Do)}},Oo=Do,Io=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"lin-tag-fade"},on:{"after-leave":e.afterLeave}},[e.show?n("div",{class:["lin-tag","lin-tag-"+e.type,"lin-tag-"+e.effect],style:{"background-color":e.color},on:{click:e.onTagclick}},[n("span",[e._v(e._s(e.text))]),e._v(" "),e.closable?n("i",{staticClass:"lin-icon-close lin-tag-close",on:{click:e.onCloseClick}}):e._e()]):e._e()])};Io._withStripped=!0;var Po=T({name:"LinTag",props:{type:{type:String,default:"primary"},text:{type:String,default:""},color:{type:String,default:""},closable:{type:Boolean,default:!1},effect:{type:String,default:"light"}},data:function(){return{show:!0}},methods:{onTagclick:function(){this.$emit("click")},onCloseClick:function(){this.show=!1},afterLeave:function(){this.$emit("close")}}},Io,[],!1,null,null,null);Po.options.__file="packages/tag/src/tag.vue";var Mo=Po.exports;Mo.install=function(e){return e.component(Mo.name,Mo)};var Fo=Mo,Bo=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"lin-tooltip-fade"},on:{"after-leave":e.handleAfterLeave}},[e.show?n("div",{staticClass:"lin-tooltip",class:e.classes,style:e.style},[e._v("\n "+e._s(e.text)+"\n ")]):e._e()])};Bo._withStripped=!0;var No=T({name:"LinTooltip",data:function(){return{style:{},show:!1,placement:"bottom",text:""}},methods:{handleAfterLeave:function(){this.$emit("after-leave")}},computed:{classes:function(){return{"lin-tooltip-bottom":"top"===this.placement,"lin-tooltip-top":"bottom"===this.placement,"lin-tooltip-left":"right"===this.placement,"lin-tooltip-right":"left"===this.placement}}}},Bo,[],!1,null,null,null);No.options.__file="packages/tooltip/src/tooltip.vue";var Uo=No.exports,jo=c.a.extend(Uo);jo.prototype.addTip=function(){this.vm=this.$mount(),document.body.appendChild(this.vm.$el)},jo.prototype.removeTip=function(){var e=this;this.show=!1,this.$once("after-leave",(function(){e.vm.$el&&document.body.removeChild(e.vm.$el)}))};var Vo=jo,Go={},$o=null;Go.install=function(e){e.directive("tooltip",{bind:function(e,t){e.mouseenter=function(n){if(n.currentTarget===e){var i=t.value;if(i){$o||($o=new Vo).addTip();var r=t.modifiers,a=r.bottom,o=r.top,s=r.left,l=r.right,u=r.auto,c="bottom";a?c="bottom":o?c="top":s?c="left":l&&(c="right"),$o.placement=c,$o.text=i;var f=n.currentTarget,d=f.offsetWidth,h=f.offsetHeight;if(u)if(f.scrollWidth<=d)return;$o.show=!0,$o.$nextTick((function(){var t,n,i=$o.vm.$el,r=f.getBoundingClientRect(),a=r.left,o=r.top,s=i.offsetWidth,l=i.offsetHeight,u=1*e.getAttribute("lin-tooltip-top"),p=1*e.getAttribute("lin-tooltip-left");"number"!=typeof u&&(u=0),"number"!=typeof p&&(p=0),"bottom"===c?(t="".concat(a+(d/2-s/2)-p,"px"),n="".concat(o+h+7+u,"px")):"top"===c?(t="".concat(a+(d/2-s/2)-p,"px"),n="".concat(o-l-7+u,"px")):"left"===c?(t="".concat(a-s-7-p,"px"),n="".concat(o+(h/2-l/2)+u,"px")):"right"===c&&(t="".concat(a+d+7-p,"px"),n="".concat(o+(h/2-l/2)+u,"px")),$o.style={left:t,top:n}}))}}},e.mouseleave=function(){$o&&($o.removeTip(),$o=null)},e.addEventListener("mouseenter",e.mouseenter),e.addEventListener("mouseleave",e.mouseleave)},unbind:function(e){$o&&($o.removeTip(),$o=null),e.removeEventListener("mouseenter",e.mouseenter),e.removeEventListener("mouseleave",e.mouseleave)}})};var Ho=Go,Wo=function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("input",{ref:"linUploadInput",staticClass:"lin-upload-input",attrs:{type:"file"},on:{change:this.onFileChange}}),this._v(" "),t("lin-button",{attrs:{type:"primary"},on:{click:this.onBtnClick}},[this._v(this._s(this.text))])],1)};Wo._withStripped=!0;var Ko=function(e,t){for(var n=[],i=0;i<e.size;)n.push(oe()(e).call(e,i,i+t)),i+=t;return n},zo=n(219),qo=n.n(zo),Yo=function(e){return new fn.a((function(t,n){var i=oe()(File.prototype)||File.prototype.mozSlice||File.prototype.webkitSlice,r=Math.ceil(e.size/2097152),a=0,o=new qo.a.ArrayBuffer,s=new FileReader;function l(){var t=2097152*a,n=t+2097152>=e.size?e.size:t+2097152;s.readAsArrayBuffer(i.call(e,t,n))}s.onload=function(e){o.append(e.target.result),++a<r?l():t(o.end())},s.onerror=function(e){n(e)},l()}))};var Xo=function(e){var t=e.url,n=e.method,i=void 0===n?"post":n,a=e.data,o=e.headers,s=void 0===o?{}:o,l=e.requestList,u=e.hash,c=e.fileHash;return new fn.a((function(e,n){var o,f=new XMLHttpRequest;f.open(i,t),r()(o=ke()(s)).call(o,(function(e){f.setRequestHeader(e,s[e])})),f.send(a),f.onload=function(t){if(l){var n=Fe()(l).call(l,(function(e){return e===f}));Et()(l).call(l,n,1);var i=[];if(window.localStorage.getItem(c))try{i=JSON.parse(window.localStorage.getItem(c))}catch(e){}i.push(u),window.localStorage.setItem(c,Qa()(i))}e(t.target.response)},l&&l.push(f),f.onerror=function(e){n(e)}}))},Jo=T({name:"LinUpload",components:{"lin-button":te},props:{text:{type:String,default:""},fileChunkSize:{type:Number,default:10485760},uploadUrl:{type:String,required:!0},mergeUrl:{type:String},isSlice:{type:Boolean,default:!1},breakpoint:{type:Boolean,default:!1},beforeUpload:{type:Function},splitFileChunk:{type:Function},caculateFileHash:{type:Function},requestMergeFileFn:{type:Function}},mounted:function(){this.selectedFile=null,this.fileChunkListData=[],this.requestList=[],this.fileHash=null,this.fileChunkList=[]},methods:{onFileChange:function(e){var t=this;if(this.selectedFile=e.target.files[0],this.$refs.linUploadInput.value="","function"==typeof this.beforeUpload){var n=this.beforeUpload(this.selectedFile);n instanceof fn.a?n.then((function(){t.handleUpload()})).catch((function(){})):n||this.handleUpload()}else this.handleUpload()},onBtnClick:function(){this.$refs.linUploadInput.click()},handleUpload:function(){this.breakpoint?this.uploadFileByBreakpoint():this.isSlice?this.uploadFileBySlice():this.uploadFile()},uploadFileBySlice:function(){var e,t=this;this.createFileChunkList(),this.fileChunkListData=Dt()(e=this.fileChunkList).call(e,(function(e,n){var i;return{chunk:e,hash:o()(i="".concat(t.selectedFile.name,"-")).call(i,n)}})),this.uploadChunksBySlice()},uploadFileByBreakpoint:function(){var e=this;return ce()(le.a.mark((function t(){var n,i;return le.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.createFileChunkList(),t.prev=1,"function"!=typeof e.caculateFileHash){t.next=8;break}return t.next=5,e.caculateFileHash(e.selectedFile);case 5:e.fileHash=t.sent,t.next=11;break;case 8:return t.next=10,Yo(e.selectedFile);case 10:e.fileHash=t.sent;case 11:e.$emit("caculateFileHashSuccess",e.fileHash),t.next=17;break;case 14:t.prev=14,t.t0=t.catch(1),e.$emit("caculateFileHashFail",t.t0);case 17:if(i=[],window.localStorage.getItem(e.fileHash))try{i=JSON.parse(window.localStorage.getItem(e.fileHash))}catch(e){}e.fileChunkListData=Dt()(n=e.fileChunkList).call(n,(function(t,n){var i;return{chunk:t,hash:o()(i="".concat(e.fileHash,"-")).call(i,n),fileHash:e.fileHash}})),e.uploadChunksByBreakpoint(i);case 21:case"end":return t.stop()}}),t,null,[[1,14]])})))()},uploadFile:function(){var e=this;return ce()(le.a.mark((function t(){var n,i;return le.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,(n=new FormData).append("file",e.selectedFile),t.next=5,Xo({url:e.uploadUrl,data:n});case 5:i=t.sent,e.$emit("uploadSuccess",i),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),e.$emit("uploadFail",t.t0);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})))()},uploadChunksBySlice:function(){var e=this;return ce()(le.a.mark((function t(){var n,i,r,a;return le.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.uploadUrl){t.next=2;break}throw new TypeError("uploadUrl is not define");case 2:return r=Dt()(n=Dt()(i=e.fileChunkListData).call(i,(function(t){var n=t.chunk,i=t.hash,r=t.index,a=new FormData;return a.append("chunk",n),a.append("hash",i),a.append("filename",e.selectedFile.name),{formData:a,index:r}}))).call(n,(function(t){var n=t.formData;return Xo({url:e.uploadUrl,data:n})})),t.prev=3,t.next=6,fn.a.all(r);case 6:a=t.sent,e.$emit("uploadChunkSuccess",a),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(3),e.$emit("uploadChunkFail",t.t0);case 13:e.requestMergeFile();case 14:case"end":return t.stop()}}),t,null,[[3,10]])})))()},uploadChunksByBreakpoint:function(e){var t=this;return ce()(le.a.mark((function n(){var i,r,a,o,s;return le.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t.uploadUrl){n.next=2;break}throw new TypeError("uploadUrl is not define");case 2:if(!((o=Dt()(i=Dt()(r=Se()(a=t.fileChunkListData).call(a,(function(t){var n=t.hash;return!Y()(e).call(e,n)}))).call(r,(function(e){var n=e.chunk,i=e.hash,r=e.fileHash,a=new FormData;return a.append("chunk",n),a.append("hash",i),a.append("filename",t.selectedFile.name),a.append("fileHash",r),{formData:a,hash:i,fileHash:r}}))).call(i,(function(e){var n=e.formData,i=e.hash,r=e.fileHash;return Xo({url:t.uploadUrl,data:n,requestList:t.requestList,hash:i,fileHash:r})}))).length>0)){n.next=14;break}return n.prev=4,n.next=7,fn.a.all(o);case 7:s=n.sent,t.$emit("uploadChunkSuccess",s),n.next=14;break;case 11:n.prev=11,n.t0=n.catch(4),t.$emit("uploadChunkFail",n.t0);case 14:e.length+o.length===t.fileChunkListData.length&&t.requestMergeFile();case 15:case"end":return n.stop()}}),n,null,[[4,11]])})))()},createFileChunkList:function(){try{"function"==typeof this.splitFileChunk?this.fileChunkList=this.splitFileChunk(this.selectedFile,this.fileChunkSize):this.fileChunkList=Ko(this.selectedFile,this.fileChunkSize),this.$emit("createChunkListSuccess",this.fileChunkList)}catch(e){this.$emit("createChunkListFail",e)}},requestMergeFile:function(){var e=this;return ce()(le.a.mark((function t(){var n,i;return le.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,e.mergeUrl){t.next=3;break}throw new TypeError("mergeUrl is not define");case 3:if(i={filename:e.selectedFile.name,size:e.fileChunkSize},e.breakpoint&&(i.fileHash=e.fileHash),"function"!=typeof e.requestMergeFileFn){t.next=11;break}return t.next=8,e.requestMergeFileFn(i);case 8:n=t.sent,t.next=14;break;case 11:return t.next=13,Xo({url:e.mergeUrl,headers:{"content-type":"application/json"},data:Qa()(i)});case 13:n=t.sent;case 14:e.$emit("mergeFileSuccess",n),window.localStorage.removeItem(e.fileHash),t.next=21;break;case 18:t.prev=18,t.t0=t.catch(0),e.$emit("mergeFileFail",t.t0);case 21:case"end":return t.stop()}}),t,null,[[0,18]])})))()}}},Wo,[],!1,null,null,null);Jo.options.__file="packages/upload/src/upload.vue";var Zo=Jo.exports;Zo.install=function(e){return e.component(Zo.name,Zo)};var Qo=Zo,es=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"video-card",style:{width:e.cardWidth,height:e.cardHeight},on:{click:e.onCardClick}},[e._t("top",[n("div",{staticClass:"video-cover-box",style:{height:e.imageHeight}},[e.imageLoadError?n("div",{staticClass:"error-tip"},[e._v("\n "+e._s(e.errorTip||e.t("LinViewUI.VideoCard.errorTip"))+"\n ")]):n("img",{staticClass:"cover-image",attrs:{src:e.url,alt:e.t("LinViewUI.VideoCard.imgAlt")},on:{error:e.loadError}}),e._v(" "),e.coverTip?n("span",{staticClass:"cover-tip"},[e._v(e._s(e.coverTip))]):e._e()])]),e._v(" "),e._t("default")],2)};es._withStripped=!0;var ts=T({name:"LinVideoCard",mixins:[Ie],props:{data:{type:Object},cardHeight:{type:String,default:"auto"},cardWidth:{type:String,default:"262px"},imageHeight:{type:String,default:"146px"},coverTip:{type:String,default:""},errorTip:{type:String},defaultImageUrl:{type:String,default:""},imageUrl:{type:String,default:""}},data:function(){return{imageLoadError:!1,url:""}},methods:{loadError:function(){this.defaultImageUrl&&this.url!==this.defaultImageUrl?this.url=this.defaultImageUrl:this.imageLoadError=!0},onCardClick:function(){this.$emit("click",this.data)}},watch:{imageUrl:{immediate:!0,handler:function(e){this.url=e}}}},es,[],!1,null,null,null);ts.options.__file="packages/video-card/src/video-card.vue";var ns=ts.exports;ns.install=function(e){return e.component(ns.name,ns)};var is=ns,rs=[L,B,V,te,Ge,Ke,Xe,rt,ct,pt,gt,bt,At,Gt,Nt,Yt,Qt,rn,ln,pn,bn,Tn,An,De,Pn,jn,Hn,Yn,di,wi,Ri,Ki,ir,sr,_a,Ea,ka,Ca,Ia,Ba,Ua,$a,za,Xa,no,oo,co,Z,vo,mo,So,Lo,Oo,Fo,Ho,Qo,is,oa,Rr,Nr,Pr],as=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};w.use(t.locale),w.i18n(t.i18n),r()(rs).call(rs,(function(t){e.use(t)}))};"undefined"!=typeof window&&window.Vue&&as(window.Vue);t.default={locale:w.use,i18n:w.i18n,install:as,version:"1.1.1",Alert:L,Backtop:B,Badge:V,Button:te,Cascader:Ge,Checkbox:Ke,CheckboxGroup:Xe,ChoiceGroup:rt,ChoiceItem:ct,ChoiceOption:pt,Col:gt,CollapseGroup:bt,CollapseItem:At,DateAxis:Gt,DatePicker:Nt,Dialog:Yt,Dropdown:Qt,DropdownGroup:rn,DropdownItem:ln,Form:pn,FormItem:bn,HoverEffect:Tn,Image:An,Input:De,InputNumber:Pn,LimitTextarea:jn,Link:Hn,LiveComment:Yn,Loading:di,LoadingBar:wi,Magnifier:Ri,Message:Ki,MessageBox:ir,MetaInfo:sr,PageHeader:Ea,Pagination:ka,Progress:Ca,Radio:Ia,RadioGroup:Ba,Row:Ua,ScrollBar:$a,ScrollView:za,SelectorGroup:Xa,SelectorItem:no,ShowMore:oo,Skeleton:co,Spinner:Z,Switch:vo,TabGroup:mo,TabItem:So,Table:Lo,TableColumn:Oo,Tag:Fo,Tooltip:Ho,Upload:Qo,VideoCard:is,VideoPlayer:oa,PlayerProcess:Rr,MultiPlayer:_a,PlayerFullscreen:Nr,PlayerVolume:Pr}}]).default}));
\No newline at end of file